move app state to store
This commit is contained in:
@ -1,13 +1,12 @@
|
||||
<script>
|
||||
import { invoke } from '@tauri-apps/api/tauri';
|
||||
|
||||
import { appState } from '../lib/state.js';
|
||||
import { navigate } from '../lib/routing.js';
|
||||
import { getRootCause } from '../lib/errors.js';
|
||||
import ErrorAlert from '../ui/ErrorAlert.svelte';
|
||||
import Link from '../ui/Link.svelte';
|
||||
|
||||
export let appState;
|
||||
|
||||
|
||||
let errorMsg = null;
|
||||
let alert;
|
||||
@ -15,8 +14,8 @@
|
||||
async function unlock() {
|
||||
try {
|
||||
let r = await invoke('unlock', {passphrase});
|
||||
appState.credentialStatus = 'unlocked';
|
||||
if (appState.currentRequest) {
|
||||
$appState.credentialStatus = 'unlocked';
|
||||
if ($appState.currentRequest) {
|
||||
navigate('ShowApproved');
|
||||
}
|
||||
else {
|
||||
|
Reference in New Issue
Block a user