mirror of
https://github.com/OliveTin/OliveTin
synced 2025-12-11 16:45:42 +00:00
fix: #685 - show navigation (and picocrank upgrade)
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -17,3 +17,5 @@ webui/
|
|||||||
server.log
|
server.log
|
||||||
OliveTin
|
OliveTin
|
||||||
integration-tests/configs/authRequireGuestsToLogin/sessions.yaml
|
integration-tests/configs/authRequireGuestsToLogin/sessions.yaml
|
||||||
|
webui
|
||||||
|
webui.dev
|
||||||
|
|||||||
8
frontend/package-lock.json
generated
8
frontend/package-lock.json
generated
@@ -17,7 +17,7 @@
|
|||||||
"@xterm/addon-fit": "^0.10.0",
|
"@xterm/addon-fit": "^0.10.0",
|
||||||
"@xterm/xterm": "^5.5.0",
|
"@xterm/xterm": "^5.5.0",
|
||||||
"iconify-icon": "^3.0.2",
|
"iconify-icon": "^3.0.2",
|
||||||
"picocrank": "^1.6.4",
|
"picocrank": "^1.8.0",
|
||||||
"unplugin-vue-components": "^30.0.0",
|
"unplugin-vue-components": "^30.0.0",
|
||||||
"vite": "^7.1.12",
|
"vite": "^7.1.12",
|
||||||
"vue-router": "^4.6.3"
|
"vue-router": "^4.6.3"
|
||||||
@@ -2362,9 +2362,9 @@
|
|||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
"node_modules/picocrank": {
|
"node_modules/picocrank": {
|
||||||
"version": "1.6.4",
|
"version": "1.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/picocrank/-/picocrank-1.6.4.tgz",
|
"resolved": "https://registry.npmjs.org/picocrank/-/picocrank-1.8.0.tgz",
|
||||||
"integrity": "sha512-zD1wnkoUDAXZOUs9zKqS4rqz9mljeqFwM7QWx4ykXJsmH6iOLAIKh2AVlxa384oeXJXIWM9VLiySEnhQZmQmjA==",
|
"integrity": "sha512-YPGmXvw7vvjIcgrAe3io87kZDM+NUa+aiEYxk8CVqBzgI4koXeF+2VEGPHBwknZBBEbJfXsSdnxVwXrLKpWKfw==",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hugeicons/core-free-icons": "^1.0.16",
|
"@hugeicons/core-free-icons": "^1.0.16",
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
"@xterm/addon-fit": "^0.10.0",
|
"@xterm/addon-fit": "^0.10.0",
|
||||||
"@xterm/xterm": "^5.5.0",
|
"@xterm/xterm": "^5.5.0",
|
||||||
"iconify-icon": "^3.0.2",
|
"iconify-icon": "^3.0.2",
|
||||||
"picocrank": "^1.6.4",
|
"picocrank": "^1.8.0",
|
||||||
"unplugin-vue-components": "^30.0.0",
|
"unplugin-vue-components": "^30.0.0",
|
||||||
"vite": "^7.1.12",
|
"vite": "^7.1.12",
|
||||||
"vue-router": "^4.6.3"
|
"vue-router": "^4.6.3"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Header title="OliveTin" :logoUrl="logoUrl" @toggleSidebar="toggleSidebar">
|
<Header title="OliveTin" :logoUrl="logoUrl" @toggleSidebar="toggleSidebar" :sidebarEnabled="showNavigation">
|
||||||
<template #toolbar>
|
<template #toolbar>
|
||||||
<div id="banner" v-if="bannerMessage" :style="bannerCss">
|
<div id="banner" v-if="bannerMessage" :style="bannerCss">
|
||||||
<p>{{ bannerMessage }}</p>
|
<p>{{ bannerMessage }}</p>
|
||||||
@@ -86,8 +86,10 @@ const initError = ref(false)
|
|||||||
const initErrorMessage = ref('')
|
const initErrorMessage = ref('')
|
||||||
|
|
||||||
function toggleSidebar() {
|
function toggleSidebar() {
|
||||||
|
if (sidebar.value && showNavigation.value) {
|
||||||
sidebar.value.toggle()
|
sidebar.value.toggle()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function updateHeaderFromInit() {
|
function updateHeaderFromInit() {
|
||||||
if (window.initResponse) {
|
if (window.initResponse) {
|
||||||
@@ -132,6 +134,7 @@ async function requestInit() {
|
|||||||
showLogs.value = initResponse.showLogList
|
showLogs.value = initResponse.showLogList
|
||||||
showDiagnostics.value = initResponse.showDiagnostics
|
showDiagnostics.value = initResponse.showDiagnostics
|
||||||
|
|
||||||
|
if (showNavigation.value && sidebar.value) {
|
||||||
for (const rootDashboard of initResponse.rootDashboards) {
|
for (const rootDashboard of initResponse.rootDashboards) {
|
||||||
sidebar.value.addNavigationLink({
|
sidebar.value.addNavigationLink({
|
||||||
id: rootDashboard,
|
id: rootDashboard,
|
||||||
@@ -152,6 +155,7 @@ async function requestInit() {
|
|||||||
if (showDiagnostics.value) {
|
if (showDiagnostics.value) {
|
||||||
sidebar.value.addRouterLink('Diagnostics')
|
sidebar.value.addRouterLink('Diagnostics')
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
hasLoaded.value = true;
|
hasLoaded.value = true;
|
||||||
initError.value = false;
|
initError.value = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user