preparing for main menu configuration

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2026-02-06 10:05:13 +01:00
parent d0866ab73f
commit e48bac4ce2
4 changed files with 63 additions and 2 deletions

View File

@@ -2,6 +2,8 @@
import { onMount } from 'svelte';
import { useTinyRouter } from 'svelte-tiny-router';
import { api, get } from '../urls.svelte.js';
import { logout, user } from '../user.svelte.js';
import { t } from '../translations.svelte.js';
@@ -13,8 +15,11 @@ const modules = $state([]);
let expand = $state(false);
async function fetchModules(){
const url = `${location.protocol}//${location.host.replace('5173','8080')}/legacy/user/modules`;
const resp = await fetch(url,{credentials:'include'});
let url = api('settings/menu');
const res = await get(url);
url = `${location.protocol}//${location.host.replace('5173','8080')}/legacy/user/modules`;
const resp = await get(url);
if (resp.ok){
const arr = await resp.json();
for (let entry of arr) {