very basic launch button
This commit is contained in:
parent
a51b20add7
commit
e7e0f9d33e
@ -10,13 +10,11 @@
|
|||||||
|
|
||||||
import vaultDoorSvg from '../assets/vault_door.svg?raw';
|
import vaultDoorSvg from '../assets/vault_door.svg?raw';
|
||||||
|
|
||||||
|
let launchBase = false;
|
||||||
// onMount(async () => {
|
function launchTerminal() {
|
||||||
// // will block until a request comes in
|
invoke('launch_terminal', {base: launchBase});
|
||||||
// let req = await $appState.pendingRequests.get();
|
launchBase = false;
|
||||||
// $appState.currentRequest = req;
|
}
|
||||||
// navigate('Approve');
|
|
||||||
// });
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
@ -25,6 +23,7 @@
|
|||||||
</Nav>
|
</Nav>
|
||||||
|
|
||||||
<div class="flex flex-col h-screen items-center justify-center p-4 space-y-4">
|
<div class="flex flex-col h-screen items-center justify-center p-4 space-y-4">
|
||||||
|
<div class="flex flex-col items-center space-y-4">
|
||||||
{#await invoke('get_session_status') then status}
|
{#await invoke('get_session_status') then status}
|
||||||
{#if status === 'locked'}
|
{#if status === 'locked'}
|
||||||
|
|
||||||
@ -37,6 +36,13 @@
|
|||||||
{:else if status === 'unlocked'}
|
{:else if status === 'unlocked'}
|
||||||
{@html vaultDoorSvg}
|
{@html vaultDoorSvg}
|
||||||
<h2 class="text-2xl font-bold">Waiting for requests</h2>
|
<h2 class="text-2xl font-bold">Waiting for requests</h2>
|
||||||
|
<button class="btn btn-primary w-full" on:click={launchTerminal}>
|
||||||
|
Launch Terminal
|
||||||
|
</button>
|
||||||
|
<label class="label cursor-pointer flex items-center space-x-2">
|
||||||
|
<input type="checkbox" class="checkbox checkbox-sm" bind:checked={launchBase}>
|
||||||
|
<span class="label-text">Launch with base credentials</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
{:else if status === 'empty'}
|
{:else if status === 'empty'}
|
||||||
{@html vaultDoorSvg}
|
{@html vaultDoorSvg}
|
||||||
@ -46,4 +52,5 @@
|
|||||||
</Link>
|
</Link>
|
||||||
{/if}
|
{/if}
|
||||||
{/await}
|
{/await}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
Loading…
x
Reference in New Issue
Block a user