mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2024-11-22 07:10:09 +01:00
Fixed some CSS issue on mobile
This commit is contained in:
parent
084c95f0e5
commit
ec5f4f2778
@ -1,5 +1,5 @@
|
|||||||
<script setup async>
|
<script setup async>
|
||||||
import { RouterView } from 'vue-router'
|
import {RouterView, useRoute} from 'vue-router'
|
||||||
import {DashboardConfigurationStore} from "@/stores/DashboardConfigurationStore.js";
|
import {DashboardConfigurationStore} from "@/stores/DashboardConfigurationStore.js";
|
||||||
import {computed, watch} from "vue";
|
import {computed, watch} from "vue";
|
||||||
const store = DashboardConfigurationStore();
|
const store = DashboardConfigurationStore();
|
||||||
@ -14,26 +14,24 @@ watch(store.CrossServerConfiguration, () => {
|
|||||||
}, {
|
}, {
|
||||||
deep: true
|
deep: true
|
||||||
});
|
});
|
||||||
const getActiveCrossServer = computed(() => {
|
const route = useRoute()
|
||||||
if (store.ActiveServerConfiguration){
|
|
||||||
return store.CrossServerConfiguration.ServerList[store.ActiveServerConfiguration]
|
|
||||||
}
|
|
||||||
return undefined
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div style="z-index: 9999; height: 5px" class="position-absolute loadingBar top-0 start-0"></div>
|
<div style="z-index: 9999; height: 5px" class="position-absolute loadingBar top-0 start-0"></div>
|
||||||
<nav class="navbar bg-dark sticky-top" data-bs-theme="dark">
|
<nav class="navbar bg-dark sticky-top" data-bs-theme="dark">
|
||||||
<div class="container-fluid d-flex text-body align-items-center">
|
<div class="container-fluid d-flex text-body align-items-center">
|
||||||
<span class="navbar-brand mb-0 h1">WGDashboard</span>
|
<RouterLink to="/" class="navbar-brand mb-0 h1">
|
||||||
<small class="ms-auto text-muted" v-if="getActiveCrossServer !== undefined">
|
<img src="../public/img/logo.png" alt="WGDashboard Logo" style="width: 32px">
|
||||||
<i class="bi bi-server me-2"></i>{{getActiveCrossServer.host}}
|
</RouterLink>
|
||||||
</small>
|
|
||||||
<a role="button" class="navbarBtn text-body"
|
<a role="button" class="navbarBtn text-body"
|
||||||
@click="store.ShowNavBar = !store.ShowNavBar"
|
@click="store.ShowNavBar = !store.ShowNavBar"
|
||||||
style="line-height: 0; font-size: 2rem">
|
style="line-height: 0; font-size: 2rem">
|
||||||
<i class="bi bi-list"></i>
|
<Transition name="fade2" mode="out-in">
|
||||||
|
<i class="bi bi-list" v-if="!store.ShowNavBar"></i>
|
||||||
|
<i class="bi bi-x-lg" v-else></i>
|
||||||
|
</Transition>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
@ -23,6 +23,15 @@ export default {
|
|||||||
openHelpModal: false,
|
openHelpModal: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
getActiveCrossServer(){
|
||||||
|
if (this.dashboardConfigurationStore.ActiveServerConfiguration){
|
||||||
|
return new URL(this.dashboardConfigurationStore.CrossServerConfiguration.ServerList
|
||||||
|
[this.dashboardConfigurationStore.ActiveServerConfiguration].host)
|
||||||
|
}
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
fetchGet("/api/getDashboardUpdate", {}, (res) => {
|
fetchGet("/api/getDashboardUpdate", {}, (res) => {
|
||||||
if (res.status){
|
if (res.status){
|
||||||
@ -47,7 +56,14 @@ export default {
|
|||||||
>
|
>
|
||||||
<nav id="sidebarMenu" class=" bg-body-tertiary sidebar border h-100 rounded-3 shadow overflow-y-scroll" >
|
<nav id="sidebarMenu" class=" bg-body-tertiary sidebar border h-100 rounded-3 shadow overflow-y-scroll" >
|
||||||
<div class="sidebar-sticky ">
|
<div class="sidebar-sticky ">
|
||||||
<h5 class="text-white text-center m-0 py-3 mb-3 btn-brand">WGDashboard</h5>
|
<div class="text-white text-center m-0 py-3 mb-3 btn-brand">
|
||||||
|
<h5 class="mb-0">
|
||||||
|
WGDashboard
|
||||||
|
</h5>
|
||||||
|
<small class="ms-auto" v-if="getActiveCrossServer !== undefined">
|
||||||
|
<i class="bi bi-hdd-rack-fill me-2"></i>{{getActiveCrossServer.host}}
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
<ul class="nav flex-column px-2">
|
<ul class="nav flex-column px-2">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<RouterLink class="nav-link rounded-3"
|
<RouterLink class="nav-link rounded-3"
|
||||||
@ -139,8 +155,6 @@ export default {
|
|||||||
animation-fill-mode: both;
|
animation-fill-mode: both;
|
||||||
display: none;
|
display: none;
|
||||||
animation-timing-function: cubic-bezier(0.82, 0.58, 0.17, 0.9);
|
animation-timing-function: cubic-bezier(0.82, 0.58, 0.17, 0.9);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.navbar-container.active{
|
.navbar-container.active{
|
||||||
animation-direction: normal;
|
animation-direction: normal;
|
||||||
|
@ -126,7 +126,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="mt-5 text-body">
|
<div class="mt-md-5 mt-3 text-body">
|
||||||
<div class="container mb-4">
|
<div class="container mb-4">
|
||||||
<div class="mb-4 d-flex align-items-center gap-4">
|
<div class="mb-4 d-flex align-items-center gap-4">
|
||||||
<RouterLink to="/"
|
<RouterLink to="/"
|
||||||
|
@ -16,7 +16,7 @@ const selectedConfiguration = ref("")
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="mt-5 text-body">
|
<div class="mt-md-5 mt-3 text-body">
|
||||||
<div class="container mb-4">
|
<div class="container mb-4">
|
||||||
<div class="mb-5 d-flex align-items-center gap-4">
|
<div class="mb-5 d-flex align-items-center gap-4">
|
||||||
<RouterLink to="/"
|
<RouterLink to="/"
|
||||||
|
Loading…
Reference in New Issue
Block a user