Skip to content

Commit

Permalink
fix: file view inconsistency
Browse files Browse the repository at this point in the history
  • Loading branch information
Vetlix committed Jun 3, 2024
1 parent 88ad921 commit a80f611
Showing 1 changed file with 1 addition and 7 deletions.
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

0 comments on commit a80f611

Please sign in to comment.