display setup errors

This commit is contained in:
2023-04-30 10:52:46 -07:00
parent 913148a75a
commit 871dedf0a3
5 changed files with 41 additions and 14 deletions

View File

@ -29,10 +29,7 @@
if (alt && !event.altKey) return;
if (shift && !event.shiftKey) return;
if (event.code === hotkey) {
click();
}
else if (hotkey === 'Enter' && event.code === 'NumpadEnter') {
if (event.key === hotkey) {
click();
}
}
@ -41,6 +38,6 @@
<svelte:window on:keydown={handleHotkey} />
<a href="#" on:click="{click}" class={classes}>
<a href="/{target}" on:click|preventDefault="{click}" class={classes}>
<slot></slot>
</a>

View File

@ -1,5 +1,6 @@
<script>
import { invoke } from '@tauri-apps/api/tauri';
import { type } from '@tauri-apps/api/os';
import { appState } from '../lib/state.js';
import Nav from '../ui/Nav.svelte';
@ -21,6 +22,9 @@
$appState.config = await invoke('get_config');
}
}
let osType = '';
type().then(t => osType = t);
</script>
@ -52,7 +56,12 @@
</svelte:fragment>
</NumericSetting>
<NumericSetting title="Listen port" bind:value={$appState.config.listen_port} min=1 on:update={save}>
<NumericSetting
title="Listen port"
bind:value={$appState.config.listen_port}
min={osType === 'Windows_NT' ? 1 : 0}
on:update={save}
>
<svelte:fragment slot="description">
Listen for credentials requests on this port.
(Should be used with <code>$AWS_CONTAINER_CREDENTIALS_FULL_URI</code>)