preparing for main menu configuration
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user