settings page
This commit is contained in:
@ -15,33 +15,28 @@
|
||||
$appState.currentRequest = req;
|
||||
navigate('Approve');
|
||||
});
|
||||
|
||||
let status = 'unknown';
|
||||
onMount(async() => {
|
||||
status = await invoke('get_session_status');
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<Nav />
|
||||
|
||||
{#if status === 'locked'}
|
||||
<div class="flex flex-col h-screen justify-center items-center space-y-4">
|
||||
<img src="/static/padlock-closed.svg" alt="An unlocked padlock" class="w-32" />
|
||||
<h2 class="text-2xl font-bold">Creddy is locked</h2>
|
||||
<Link target="Unlock">
|
||||
<button class="btn btn-primary">Unlock</button>
|
||||
</Link>
|
||||
</div>
|
||||
<div class="flex flex-col h-screen justify-center items-center space-y-4">
|
||||
{#await invoke('get_session_status') then status}
|
||||
{#if status === 'locked'}
|
||||
<img src="/static/padlock-closed.svg" alt="A locked padlock" class="w-32" />
|
||||
<h2 class="text-2xl font-bold">Creddy is locked</h2>
|
||||
<Link target="Unlock">
|
||||
<button class="btn btn-primary">Unlock</button>
|
||||
</Link>
|
||||
|
||||
{:else if status === 'unlocked'}
|
||||
<div class="flex flex-col h-screen justify-center items-center space-y-4">
|
||||
<img src="/static/padlock-open.svg" alt="An unlocked padlock" class="w-24" />
|
||||
<h2 class="text-2xl font-bold">Waiting for requests</h2>
|
||||
</div>
|
||||
{:else if status === 'unlocked'}
|
||||
<img src="/static/padlock-open.svg" alt="An unlocked padlock" class="w-24" />
|
||||
<h2 class="text-2xl font-bold">Waiting for requests</h2>
|
||||
|
||||
{:else if status === 'empty'}
|
||||
<Link target="EnterCredentials">
|
||||
<button class="btn btn-primary">Enter Credentials</button>
|
||||
</Link>
|
||||
{/if}
|
||||
{:else if status === 'empty'}
|
||||
<Link target="EnterCredentials">
|
||||
<button class="btn btn-primary">Enter Credentials</button>
|
||||
</Link>
|
||||
{/if}
|
||||
{/await}
|
||||
</div>
|
Reference in New Issue
Block a user