Files
Starseed/frontend/app/layouts/default.vue
Matthieu 93cbd48bf5
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
chore : rename Coltura to Starseed
- Rename project name across code, configs, docs, dev/prod infra
- Dev: DOCKER_APP_NAME + POSTGRES_DB switched to starseed, containers become php-starseed-fpm / nginx-starseed / starseed-db-1
- Dev: mount nginx.conf on default.conf instead of starseed.conf to avoid alphabetical-order clash with image's default site
- Makefile: export CURRENT_UID/CURRENT_GID at top level so docker compose builds (db-reset etc.) get them
- Prod: image registry path, container_name, volumes, vhost server_name + paths, DATABASE_URL, CORS, CI workflow
- Add doc/prompt-rename-prod.md with the migration runbook for the prod server (DB rename, FS move, vhost, Let's Encrypt)
2026-05-19 08:24:19 +02:00

68 lines
2.1 KiB
Vue

<template>
<div class="h-screen overflow-hidden">
<div class="flex h-full">
<MalioSidebar
v-model="ui.sidebarCollapsed"
:sections="translatedSections"
>
<template #logo>
<img src="/LOGO_MALIO.png" alt="Malio"/>
</template>
<template #logo-collapsed>
<img src="/LOGO_MALIO_COLLAPSED.png" alt="Malio"/>
</template>
</MalioSidebar>
<div class="h-full flex-1 flex flex-col min-h-0 min-w-0">
<SiteSelector v-if="showSiteSelector"/>
<main
class="flex flex-1 flex-col overflow-y-auto overflow-x-hidden bg-white px-4 pb-24 sm:px-8 lg:px-16">
<div
aria-hidden="true"
class="pointer-events-none sticky top-0 z-30 h-8 flex-shrink-0 bg-white sm:h-12"/>
<slot/>
</main>
</div>
</div>
</div>
</template>
<script setup lang="ts">
const {t} = useI18n()
const ui = useUiStore()
const {sections} = useSidebar()
const {isModuleActive} = useModules()
const auth = useAuthStore()
const route = useRoute()
// Le SiteSelector est rendu si :
// - le module Sites est actif dans config/modules.php (sinon la feature
// n'a pas de sens, cf. ticket 3 spec criteres d'acceptation) ;
// - ET l'user connecte a au moins un site autorise (sinon "barre vide"
// sans tile cliquable).
// Les deux flags sont resolus par le middleware auth.global.ts avant
// que le layout ne soit rendu (plan load parallele), donc pas de flash.
const showSiteSelector = computed(() =>
isModuleActive('sites') && (auth.user?.sites?.length ?? 0) > 0,
)
const translatedSections = computed(() =>
sections.value.map(section => ({
label: t(section.label),
icon: section.icon,
items: section.items.map(item => ({
label: t(item.label),
to: item.to,
})),
}))
)
watch(() => route.path, () => {
ui.closeMobileSidebar()
})
useHead({
titleTemplate: (title) => title || 'Starseed',
})
</script>