mirror of
https://github.com/OliveTin/OliveTin
synced 2025-12-11 16:45:42 +00:00
chore: frontend updates
This commit is contained in:
@@ -11,10 +11,6 @@
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="fg1">
|
||||
<Breadcrumbs />
|
||||
</div>
|
||||
|
||||
<div id="banner" v-if="bannerMessage" :style="bannerCss">
|
||||
<p>{{ bannerMessage }}</p>
|
||||
</div>
|
||||
@@ -65,10 +61,11 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import Sidebar from './components/Sidebar.vue';
|
||||
import Sidebar from 'picocrank/vue/components/Sidebar.vue';
|
||||
import { HugeiconsIcon } from '@hugeicons/vue'
|
||||
import { Menu01Icon } from '@hugeicons/core-free-icons'
|
||||
import { UserCircle02Icon } from '@hugeicons/core-free-icons'
|
||||
import { DashboardSquare01Icon } from '@hugeicons/core-free-icons'
|
||||
|
||||
const sidebar = ref(null);
|
||||
const username = ref('guest');
|
||||
@@ -88,22 +85,29 @@ async function requestInit() {
|
||||
try {
|
||||
const initResponse = await window.client.init({})
|
||||
|
||||
console.log("init response", initResponse)
|
||||
|
||||
username.value = initResponse.authenticatedUser
|
||||
currentVersion.value = initResponse.currentVersion
|
||||
bannerMessage.value = initResponse.bannerMessage || '';
|
||||
bannerCss.value = initResponse.bannerCss || '';
|
||||
|
||||
sidebar.value.addRouterLink('Actions')
|
||||
|
||||
for (const rootDashboard of initResponse.rootDashboards) {
|
||||
sidebar.value.addNavigationLink({
|
||||
id: rootDashboard,
|
||||
name: rootDashboard,
|
||||
title: rootDashboard,
|
||||
path: `/dashboards/${rootDashboard}`,
|
||||
icon: '📊'
|
||||
icon: DashboardSquare01Icon,
|
||||
})
|
||||
}
|
||||
|
||||
sidebar.value.addSeparator()
|
||||
sidebar.value.addRouterLink('Entities')
|
||||
sidebar.value.addRouterLink('Logs')
|
||||
sidebar.value.addRouterLink('Diagnostics')
|
||||
|
||||
|
||||
hasLoaded.value = true;
|
||||
} catch (error) {
|
||||
console.error("Error initializing client", error)
|
||||
|
||||
Reference in New Issue
Block a user