fix: incorrect password autocompletes (#557)

* fix: correct password autocompletes

* fix: file view inconsistency

---------

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
This commit is contained in:
Vetlix
2024-06-04 05:50:53 +02:00
committed by GitHub
parent 3c5b5bcdc9
commit bc0b463f3e
8 changed files with 9 additions and 9 deletions

View File

@@ -142,6 +142,7 @@ export default function EditFileDetailsModal({
label='Password'
description='Set a password for these files. Leave blank to disable password protection.'
value={password ?? ''}
autoComplete='off'
onChange={(event) =>
setPassword(event.currentTarget.value.trim() === '' ? null : event.currentTarget.value.trim())
}

View File

@@ -83,13 +83,7 @@ export default function DashboardFileType({
return <Placeholder text={`Click to view file ${file.name}`} Icon={icon[type] ?? IconFileUnknown} />;
if (dbFile && file.password === true && !show)
return (
<Placeholder
text={`Click to view protected ${file.name}`}
Icon={IconShieldLockFilled}
onClick={() => window.open(`/view/${file.name}${password ? `?pw=${password}` : ''}`)}
/>
);
return <Placeholder text={`Click to view protected ${file.name}`} Icon={IconShieldLockFilled} />;
if (dbFile && file.password === true && show)
return (

View File

@@ -122,6 +122,7 @@ export default function SettingsUser() {
<PasswordInput
label='Password'
description='Leave blank to keep the same password'
autoComplete='new-password'
{...form.getInputProps('password')}
leftSection={<IconAsteriskSimple size='1rem' />}
/>

View File

@@ -225,6 +225,7 @@ export default function UploadOptionsButton({ numFiles }: { numFiles: number })
description='Set a password for these files. Leave blank to disable password protection. This value is not saved to your browser, and is cleared after uploading.'
leftSection={<IconKey size='1rem' />}
value={ephemeral.password ?? ''}
autoComplete='off'
onChange={(event) =>
setEphemeral(
'password',
@@ -233,7 +234,7 @@ export default function UploadOptionsButton({ numFiles }: { numFiles: number })
}
/>
<Text color='dimmed' size='sm'>
<Text c='dimmed' size='sm'>
<b>Other Options</b>
</Text>

View File

@@ -144,6 +144,7 @@ export default function DashboardURLs() {
<PasswordInput
label='Password'
description='Protect your link with a password'
autoComplete='off'
{...form.getInputProps('password')}
/>

View File

@@ -170,6 +170,7 @@ export default function EditUserModal({
<PasswordInput
label='Password'
placeholder='Enter a password...'
autoComplete='new-password'
{...form.getInputProps('password')}
/>
<FileInput

View File

@@ -106,6 +106,7 @@ export default function DashboardUsers() {
<PasswordInput
label='Password'
placeholder='Enter a password...'
autoComplete='new-password'
{...form.getInputProps('password')}
/>
<FileInput

View File

@@ -100,7 +100,7 @@ export default function Register({ config, invite }: InferGetServerSidePropsType
</div>
)}
<Text size='sm' color='dimmed'>
<Text size='sm' c='dimmed'>
Create an account to get started.
</Text>