[ENG-358] Malicious client protection for the KM (#562)

* add `queue_check`, `mount_check` and `unlock_check`

* make `unlock_check` marginally more readable

* clippy

* clean up & rename functions

* remove unlock check on `keys.list`

* use american spelling of `favorite`

* use `then_some` (thanks clippy)

* more american spelling
This commit is contained in:
jake
2023-02-09 09:30:26 +00:00
committed by GitHub
parent 638f8cd166
commit 08059ae700
8 changed files with 107 additions and 75 deletions

View File

@@ -348,7 +348,7 @@ export function FileItemContextMenu({ data, ...props }: FileItemContextMenuProps
dialogManager.create((dp) => (
<DecryptFileDialog
{...dp}
location_id={useExplorerStore().locationId!}
location_id={store.locationId!}
path_id={data.item.id}
/>
));

View File

@@ -140,9 +140,11 @@ export function KeyManager(props: KeyManagerProps) {
</ButtonLink>
</Tabs.List>
</div>
<Tabs.Content value="keys">
<KeyList />
</Tabs.Content>
{isUnlocked && (
<Tabs.Content value="keys">
<KeyList />
</Tabs.Content>
)}
<Tabs.Content value="mount">
<KeyMounter />
</Tabs.Content>

View File

@@ -210,9 +210,11 @@ export default function KeysSettings() {
}
/>
<div className="grid space-y-2">
<ListOfKeys />
</div>
{isUnlocked && (
<div className="grid space-y-2">
<ListOfKeys />
</div>
)}
{keyringSk?.data && (
<>