wiwi
This commit is contained in:
+1
-1
@@ -109,7 +109,7 @@ external:
|
|||||||
items:
|
items:
|
||||||
#- name: ""
|
#- name: ""
|
||||||
# icon: ""
|
# icon: ""
|
||||||
# subtitle: ""
|
# subtitle: " http://192.168.44.5:3000 "
|
||||||
- url: "/api/sysStatus"
|
- url: "/api/sysStatus"
|
||||||
- name: "TV Status"
|
- name: "TV Status"
|
||||||
icon: "fas fa-tv"
|
icon: "fas fa-tv"
|
||||||
|
|||||||
+14
-10
@@ -28,9 +28,9 @@
|
|||||||
:links="config.links"
|
:links="config.links"
|
||||||
@navbar:toggle="showMenu = !showMenu"
|
@navbar:toggle="showMenu = !showMenu"
|
||||||
>
|
>
|
||||||
|
<Clock />
|
||||||
<DarkMode @updated="isDark = $event" />
|
<DarkMode @updated="isDark = $event" />
|
||||||
|
<!-- <SettingToggle
|
||||||
<SettingToggle
|
|
||||||
@updated="vlayout = $event"
|
@updated="vlayout = $event"
|
||||||
name="vlayout"
|
name="vlayout"
|
||||||
icon="fa-list"
|
icon="fa-list"
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
@search:focus="showMenu = true"
|
@search:focus="showMenu = true"
|
||||||
@search:open="navigateToFirstService"
|
@search:open="navigateToFirstService"
|
||||||
@search:cancel="filterServices"
|
@search:cancel="filterServices"
|
||||||
/>
|
/> -->
|
||||||
</Navbar>
|
</Navbar>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -60,7 +60,9 @@
|
|||||||
<!-- Horizontal layout -->
|
<!-- Horizontal layout -->
|
||||||
<div v-if="!vlayout || filter" class="columns is-multiline">
|
<div v-if="!vlayout || filter" class="columns is-multiline">
|
||||||
<template v-for="group in services">
|
<template v-for="group in services">
|
||||||
<h2 v-if="group.name" class="column is-full group-title">
|
<h2 v-if="group.name"
|
||||||
|
:key="group.name"
|
||||||
|
class="column is-full group-title">
|
||||||
<i v-if="group.icon" :class="group.icon"></i>
|
<i v-if="group.icon" :class="group.icon"></i>
|
||||||
{{ group.name }}
|
{{ group.name }}
|
||||||
</h2>
|
</h2>
|
||||||
@@ -72,7 +74,7 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template v-for="group in external">
|
<template v-for="group in external">
|
||||||
<h2 v-if="group.name" class="column is-full group-title">
|
<h2 v-if="group.name" v-bind:key="group.name" class="column is-full group-title">
|
||||||
<i v-if="group.icon" :class="group.icon"></i>
|
<i v-if="group.icon" :class="group.icon"></i>
|
||||||
{{ group.name }}
|
{{ group.name }}
|
||||||
</h2>
|
</h2>
|
||||||
@@ -146,10 +148,11 @@ import ConnectivityChecker from "./components/ConnectivityChecker.vue";
|
|||||||
import Service from "./components/Service.vue";
|
import Service from "./components/Service.vue";
|
||||||
import External from "./components/External.vue";
|
import External from "./components/External.vue";
|
||||||
import Message from "./components/Message.vue";
|
import Message from "./components/Message.vue";
|
||||||
import SearchInput from "./components/SearchInput.vue";
|
// import SearchInput from "./components/SearchInput.vue";
|
||||||
import SettingToggle from "./components/SettingToggle.vue";
|
// import SettingToggle from "./components/SettingToggle.vue";
|
||||||
import DarkMode from "./components/DarkMode.vue";
|
import DarkMode from "./components/DarkMode.vue";
|
||||||
import DynamicTheme from "./components/DynamicTheme.vue";
|
import DynamicTheme from "./components/DynamicTheme.vue";
|
||||||
|
import Clock from "./components/Clock.vue";
|
||||||
|
|
||||||
import defaultConfig from "./assets/defaults.yml";
|
import defaultConfig from "./assets/defaults.yml";
|
||||||
|
|
||||||
@@ -161,10 +164,11 @@ export default {
|
|||||||
Service,
|
Service,
|
||||||
External,
|
External,
|
||||||
Message,
|
Message,
|
||||||
SearchInput,
|
// SearchInput,
|
||||||
SettingToggle,
|
// SettingToggle,
|
||||||
DarkMode,
|
DarkMode,
|
||||||
DynamicTheme,
|
DynamicTheme,
|
||||||
|
Clock,
|
||||||
},
|
},
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
@@ -175,7 +179,7 @@ export default {
|
|||||||
filter: "",
|
filter: "",
|
||||||
vlayout: true,
|
vlayout: true,
|
||||||
isDark: null,
|
isDark: null,
|
||||||
showMenu: false,
|
showMenu: true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created: async function () {
|
created: async function () {
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<template>
|
||||||
|
<a aria-label="clock" class="navbar-item is-inline-block-mobile">
|
||||||
|
<i class="fas fa-clock"></i>
|
||||||
|
{{clock}}
|
||||||
|
</a>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "Clock",
|
||||||
|
data: function () {
|
||||||
|
return {
|
||||||
|
clock: '',
|
||||||
|
time: 0
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created: function () {
|
||||||
|
//let today = new Date();
|
||||||
|
//this.clock =`${today.toLocaleString("it-IT",{timeZone: "Europe/Rome"}).split(",")[1].trim()} Rome\t${today.toLocaleString("it-IT", {timeZone: "UTC"}).split(",")[1].trim()} UTC\t${today.toLocaleString("it-IT",{timeZone:"America/Chicago"}).split(",")[1].trim()} CT\t${today.toLocaleString("it-IT", {timeZone: "America/Los_Angeles"}).split(",")[1].trim()} PT`;
|
||||||
|
// this.time = setTimeout(this.updateClock,1000);
|
||||||
|
this.updateClock()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
updateClock: function () {
|
||||||
|
let today = new Date();
|
||||||
|
this.clock =`${today.toLocaleString("it-IT", {timeZone: "UTC"}).split(",")[1].trim()} UTC ${today.toLocaleString("it-IT",{timeZone:"America/Chicago"}).split(",")[1].trim()} CT ${today.toLocaleString("it-IT", {timeZone: "America/Los_Angeles"}).split(",")[1].trim()} PT`;
|
||||||
|
this.time = setTimeout(this.updateClock,1000);
|
||||||
|
},
|
||||||
|
cancelAutoUpdate: function () {
|
||||||
|
clearTimeout(this.time);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
this.cancelAutoUpdate();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -2,25 +2,25 @@
|
|||||||
<div v-cloak v-if="links" class="container-fluid">
|
<div v-cloak v-if="links" class="container-fluid">
|
||||||
<nav class="navbar" role="navigation" aria-label="main navigation">
|
<nav class="navbar" role="navigation" aria-label="main navigation">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="navbar-brand">
|
<!-- <div class="navbar-brand">
|
||||||
<a
|
<a
|
||||||
role="button"
|
role="button"
|
||||||
aria-label="menu"
|
aria-label="menu"
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
class="navbar-burger"
|
class="navbar-burger"
|
||||||
:class="{ 'is-active': showMenu }"
|
:class="{ 'is-active': showMenu }"
|
||||||
v-on:click="$emit('navbar-toggle')"
|
@click="$emit('navbar-toggle')"
|
||||||
>
|
>
|
||||||
<span aria-hidden="true"></span>
|
<span aria-hidden="true"></span>
|
||||||
<span aria-hidden="true"></span>
|
<span aria-hidden="true"></span>
|
||||||
<span aria-hidden="true"></span>
|
<span aria-hidden="true"></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="navbar-menu" :class="{ 'is-active': showMenu }">
|
<div class="navbar-menu" :class="{ 'is-active': showMenu }">
|
||||||
<div class="navbar-start">
|
<div class="navbar-start">
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<a
|
<a
|
||||||
class="navbar-item"
|
class="navbar-item is-inline-block-mobile"
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
v-for="link in links"
|
v-for="link in links"
|
||||||
:key="link.url"
|
:key="link.url"
|
||||||
@@ -29,15 +29,16 @@
|
|||||||
>
|
>
|
||||||
<i
|
<i
|
||||||
v-if="link.icon"
|
v-if="link.icon"
|
||||||
style="margin-right: 6px;"
|
style="margin-right: 2px;"
|
||||||
:class="link.icon"
|
:class="link.icon"
|
||||||
></i>
|
></i>
|
||||||
{{ link.name }}
|
{{ link.name }}
|
||||||
</a>
|
</a>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-end">
|
<div class="navbar-end">
|
||||||
<slot></slot>
|
<!-- <slot></slot> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -51,13 +52,13 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
open: {
|
open: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: true,
|
||||||
},
|
},
|
||||||
links: Array,
|
links: Array,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
showMenu: function () {
|
showMenu: function () {
|
||||||
return this.open && this.isSmallScreen();
|
return this.open;// && this.isSmallScreen();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
Reference in New Issue
Block a user