This commit is contained in:
fabien committed 2026-09-05 11:15:36 +02:00
1 parent 0bb8d1cb46
commit f1b176ae4a
18 files changed
+35 -49

No files matched your search

Binary file not shown.
@@ -3,9 +3,8 @@
import Menu from "$lib/components/Menu.svelte"
import { logout } from "$lib/state/auth.svelte"
import logo from "$lib/assets/logo-txt.png"
import { space } from '$lib/state/space.svelte'
let {spaceid, handleMenuDesktop, handleMenuMobile} = $props();
let {spaces, spaceid, handleMenuDesktop, handleMenuMobile} = $props();
const handleLogout = () => {
logout()
@@ -30,7 +29,7 @@
<div class="m-2">
<div class="formelement">
<select class="textinput">
{#each space.spaces as s (s.id)}
{#each spaces as s (s.id)}
<option value={s.id}>{s.label}</option>
{/each}
</select>
+2 -1
View File
@@ -1,5 +1,6 @@
import type { Team } from "$lib/types/api"
export const space = $state({
spaces: [] as Team[]
spaces: [] as Team[],
current: "",
});
@@ -41,7 +41,6 @@
handleResize()
if (data.me) {
auth.user = data.me.user
space.spaces = data.me.teams
themeToLocalStorage(auth.user.theme)
applyTheme()
auth.status = 'authenticated'
@@ -61,18 +60,20 @@
<svelte:window onresize={handleResize} />
<div id="outer" class={[uiState.sidebarDesktopOpen ? "desktopMenuOpen" : "desktopMenuClosed", uiState.sidebarMobileOpen ? "mobileMenuOpen" : "mobileMenuClosed" ]}>
<div id="sidebar" class="flex flex-col">
<Sidebar spaceid={data.spaceid} {handleMenuDesktop} {handleMenuMobile}/>
<div id="sidebar" class="flex flex-col z-10">
<Sidebar spaces={space.spaces} spaceid={data.spaceid} {handleMenuDesktop} {handleMenuMobile}/>
</div>
<div id="main">
<div class="flex flex-col h-screen ">
<div class={["header", "container" , page.data.theme]}>
<h1 class="flex">
<span class="flex-1">{page.data.title}</span>
{#if page.data.back}
<span><a href={page.data.back} title="retour"><i class="icon-left-big"></i></a></span>
{/if}
</h1>
<div class="px-2">
<div class="header container">
<h1 class="flex">
<span class="flex-1">{page.data.title}</span>
{#if page.data.back}
<span><a href={page.data.back} title="retour"><i class="icon-left-big"></i></a></span>
{/if}
</h1>
</div>
</div>
<div class="overflow-scroll flex-1 p-2">
{@render children()}
@@ -1,9 +1,16 @@
import { userApi } from "$lib/api/endpoints/user"
import type { LayoutLoad } from './$types';
import { space } from '$lib/state/space.svelte'
export const load: LayoutLoad = async () => {
const me = await userApi.me()
space.spaces = me.teams
if (!space.current) {
space.current = space.spaces[0].id
}
export const load: LayoutLoad = async ({params}) => {
return {
spaceid: params.space,
me: await userApi.me()
spaceid: space.current,
me: me,
}
}
@@ -1,9 +1,7 @@
<script lang="ts">
import type { PageProps } from './$types';
import { goto } from '$app/navigation';
import { space } from '$lib/state/space.svelte'
let { data }: PageProps = $props();
goto(`/${data.me.teams[0].id}/`, { replaceState: true });
goto(`/${space.current}/`, { replaceState: true });
</script>
@@ -1,8 +1,4 @@
<script lang="ts">
import { space } from '$lib/state/space.svelte'
</script>
<div class="container grid grid-cols-[repeat(auto-fit,minmax(250px,1fr))] gap-4">
<div class="container grid grid-cols-[repeat(auto-fit,minmax(250px, 1fr))] gap-4">
<a class="bt p-5 text-center"
title="Modèles"
@@ -1,3 +1,3 @@
export function load() {
return { title: 'Paramétrage', theme: "settings" };
return { title: 'Paramétrage' };
}
@@ -6,7 +6,6 @@ export const load: PageLoad = async ({ params }) => {
return {
title: 'Paramétrage : Agents',
back: "../settings",
theme: "settings",
space: params.space,
agents: await agentApi.getAgents(params.space),
providersModels: await providerApi.getProvidersModels(params.space),
@@ -59,9 +59,10 @@ const handleCancel = (e: Event) => {
<div class="formelement">
<label for="systemPrompt">Prompt système</label>
<textarea
rows="10"
id="systemPrompt"
bind:value={item.systemPrompt}
class="textinput"
class="areainput"
placeholder="prompt système"
></textarea>
<FormError key="baseUrl" errors={errors} />
@@ -79,7 +80,6 @@ const handleCancel = (e: Event) => {
<div class="text-right">
<span>{item._version}</span>
<button type="button" class="bt" onclick={handleCancel}>Annuler</button>
<button type="submit" class="bt mx-4">Enregistrer</button>
</div>
@@ -2,6 +2,5 @@ export function load() {
return {
title: 'Paramétrage : Canaux de communication',
back: "/settings",
theme: "settings"
};
}
@@ -2,6 +2,5 @@ export function load() {
return {
title: 'Paramétrage : Base de connaissance',
back: "/settings",
theme: "settings"
};
}
@@ -2,6 +2,5 @@ export function load() {
return {
title: 'Paramétrage : Mémoire',
back: "/settings",
theme: "settings"
};
}
@@ -5,7 +5,6 @@ export const load: PageLoad = async ({params}) => {
return {
title: 'Paramétrage : Modèles',
back: "../settings",
theme: "settings",
space: params.space,
providerTypes: await providerApi.providerTypes(),
};
@@ -2,6 +2,5 @@ export function load() {
return {
title: 'Paramétrage : Skills',
back: "/settings",
theme: "settings"
};
}
@@ -2,6 +2,5 @@ export function load() {
return {
title: 'Paramétrage : Outils',
back: "/settings",
theme: "settings"
};
}
@@ -2,6 +2,5 @@ export function load() {
return {
title: 'Paramétrage : Utilisateurs',
back: "/settings",
theme: "settings"
};
}
+4 -12
View File
@@ -41,18 +41,6 @@ h2 {
.header {
@apply py-2 text-lg font-bold;
/*
h1 {
@apply rounded bg-stone-200 px-2 font-bold uppercase dark:bg-stone-800;
}
*/
&.settings {
h1 {
@apply rounded border-none bg-sky-200 px-2 text-sky-700 dark:bg-sky-950 dark:text-sky-300;
}
}
}
.public h1 {
@@ -123,6 +111,10 @@ h2 {
@apply h-8 w-full rounded border-stone-700 bg-stone-50 px-2 py-1 text-sm text-stone-900 dark:bg-stone-950 dark:text-stone-100;
}
.areainput {
@apply w-full rounded border-stone-700 bg-stone-50 px-2 py-1 text-sm text-stone-900 dark:bg-stone-950 dark:text-stone-100;
}
/* svelte select */
.svelte-select {