💄 style: Update node secret UI and add telephone code field to authentication form

This commit is contained in:
web@ppanel 2025-01-16 12:13:44 +07:00
parent 1cdb7e7872
commit 770932e957
2 changed files with 11 additions and 7 deletions

View File

@ -144,13 +144,16 @@ export default function NodeConfig() {
value={data?.node_secret} value={data?.node_secret}
onValueBlur={(value) => updateConfig('node_secret', value)} onValueBlur={(value) => updateConfig('node_secret', value)}
suffix={ suffix={
<DicesIcon <div className='bg-muted flex h-9 items-center text-nowrap px-3'>
onClick={() => { <DicesIcon
const id = uid(32).toLowerCase(); onClick={() => {
const formatted = `${id.slice(0, 8)}-${id.slice(8, 12)}-${id.slice(12, 16)}-${id.slice(16, 20)}-${id.slice(20)}`; const id = uid(32).toLowerCase();
updateConfig('node_secret', formatted); const formatted = `${id.slice(0, 8)}-${id.slice(8, 12)}-${id.slice(12, 16)}-${id.slice(16, 20)}-${id.slice(20)}`;
}} updateConfig('node_secret', formatted);
/> }}
className='cursor-pointer'
/>
</div>
} }
/> />
</TableCell> </TableCell>

View File

@ -23,6 +23,7 @@ export default function PhoneAuthForm() {
telephone: '', telephone: '',
telephone_area_code: '1', telephone_area_code: '1',
password: '', password: '',
telephone_code: '',
}); });
const handleFormSubmit = async (params: any) => { const handleFormSubmit = async (params: any) => {