preparing to re-implement message settings

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2026-01-17 00:46:17 +01:00
parent 5c36ab23bf
commit 32063f046c
11 changed files with 140 additions and 33 deletions

View File

@@ -1,7 +1,31 @@
<script>
import { onMount } from 'svelte';
import { useTinyRouter } from 'svelte-tiny-router';
import { t } from '../../translations.svelte';
import { api, get } from '../../urls.svelte';
import { error, yikes } from '../../warn.svelte';
let router = useTinyRouter();
async function load(){
const url = api('message');
const res = await get(url);
if (res.ok){
let json = await res.json();
console.log(json);
yikes();
} else {
error(res);
}
}
function showSettings(){
router.navigate("message/settings");
}
onMount(load);
</script>
<fieldset>
<legend>{t('messages')}</legend>
<legend>{t('messages')} <button onclick={showSettings}>{t('settings')}</button></legend>
</fieldset>