mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-08 07:12:49 +00:00
use alertDialog
within key mnanager panel
This commit is contained in:
parent
d8b6789cb7
commit
0ba0945662
|
@ -2,6 +2,7 @@ import { Eye, EyeSlash, Gear, Lock } from 'phosphor-react';
|
|||
import { useState } from 'react';
|
||||
import { useLibraryMutation, useLibraryQuery } from '@sd/client';
|
||||
import { Button, ButtonLink, Input, Tabs } from '@sd/ui';
|
||||
import { showAlertDialog } from '~/util/dialog';
|
||||
import { DefaultProps } from '../primitive/types';
|
||||
import { KeyList } from './KeyList';
|
||||
import { KeyMounter } from './KeyMounter';
|
||||
|
@ -13,7 +14,10 @@ export function KeyManager(props: KeyManagerProps) {
|
|||
const isKeyManagerUnlocking = useLibraryQuery(['keys.isKeyManagerUnlocking']);
|
||||
const setMasterPasswordMutation = useLibraryMutation('keys.unlockKeyManager', {
|
||||
onError: () => {
|
||||
alert('Incorrect information provided.');
|
||||
showAlertDialog({
|
||||
title: 'Unlock Error',
|
||||
value: 'The information provided to the key manager was incorrect'
|
||||
});
|
||||
}
|
||||
});
|
||||
const unmountAll = useLibraryMutation('keys.unmountAll');
|
||||
|
|
Loading…
Reference in a new issue