Skip to content

Commit

Permalink
fix: incorrect password autocompletes (#557)
Browse files Browse the repository at this point in the history
* fix: correct password autocompletes

* fix: file view inconsistency

---------

Co-authored-by: dicedtomato <[email protected]>
  • Loading branch information
Vetlix and diced authored Jun 4, 2024
1 parent 3c5b5bc commit bc0b463
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/components/file/DashboardFile/EditFileDetailsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
Expand Down
8 changes: 1 addition & 7 deletions src/components/file/DashboardFileType.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
1 change: 1 addition & 0 deletions src/components/pages/settings/parts/SettingsUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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' />}
/>
Expand Down
3 changes: 2 additions & 1 deletion src/components/pages/upload/UploadOptionsButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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>

Expand Down
1 change: 1 addition & 0 deletions src/components/pages/urls/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ export default function DashboardURLs() {
<PasswordInput
label='Password'
description='Protect your link with a password'
autoComplete='off'
{...form.getInputProps('password')}
/>

Expand Down
1 change: 1 addition & 0 deletions src/components/pages/users/EditUserModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ export default function EditUserModal({
<PasswordInput
label='Password'
placeholder='Enter a password...'
autoComplete='new-password'
{...form.getInputProps('password')}
/>
<FileInput
Expand Down
1 change: 1 addition & 0 deletions src/components/pages/users/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export default function DashboardUsers() {
<PasswordInput
label='Password'
placeholder='Enter a password...'
autoComplete='new-password'
{...form.getInputProps('password')}
/>
<FileInput
Expand Down
2 changes: 1 addition & 1 deletion src/pages/auth/register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down

0 comments on commit bc0b463

Please sign in to comment.