[cleanup] Minor style cleanup + use MDIv6
This commit is contained in:
parent
5952c9b7f2
commit
59920e23a5
|
@ -40,10 +40,10 @@ module.exports = configure(function (/* ctx */) {
|
||||||
extras: [
|
extras: [
|
||||||
// 'eva-icons',
|
// 'eva-icons',
|
||||||
// 'fontawesome-v5',
|
// 'fontawesome-v5',
|
||||||
// 'ionicons-v4',
|
// 'ionicons-v5',
|
||||||
// 'line-awesome',
|
// 'line-awesome',
|
||||||
// 'material-icons',
|
// 'material-icons',
|
||||||
'mdi-v5',
|
'mdi-v6',
|
||||||
// 'themify',
|
// 'themify',
|
||||||
|
|
||||||
// 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both!
|
// 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both!
|
||||||
|
@ -110,7 +110,7 @@ module.exports = configure(function (/* ctx */) {
|
||||||
|
|
||||||
// https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-framework
|
// https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-framework
|
||||||
framework: {
|
framework: {
|
||||||
iconSet: 'mdi-v5', // Quasar icon set
|
iconSet: 'mdi-v6', // Quasar icon set
|
||||||
lang: 'de', // Quasar language pack
|
lang: 'de', // Quasar language pack
|
||||||
config: {
|
config: {
|
||||||
dark: 'auto',
|
dark: 'auto',
|
||||||
|
|
|
@ -19,7 +19,11 @@
|
||||||
{{ notifications.length }}
|
{{ notifications.length }}
|
||||||
</q-badge>
|
</q-badge>
|
||||||
<q-menu style="max-height: 400px; overflow: auto">
|
<q-menu style="max-height: 400px; overflow: auto">
|
||||||
<q-btn v-if="useNative && noPermission" label="Benachrichtigungen erlauben" @click="requestPermission" />
|
<q-btn
|
||||||
|
v-if="useNative && noPermission"
|
||||||
|
label="Benachrichtigungen erlauben"
|
||||||
|
@click="requestPermission"
|
||||||
|
/>
|
||||||
<template v-if="notifications.length > 0">
|
<template v-if="notifications.length > 0">
|
||||||
<Notification
|
<Notification
|
||||||
v-for="(notification, index) in notifications"
|
v-for="(notification, index) in notifications"
|
||||||
|
@ -40,7 +44,13 @@
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
</q-header>
|
</q-header>
|
||||||
|
|
||||||
<q-drawer v-model="leftDrawer" side="left" bordered :mini="leftDrawerMini" @click.capture="openMenu">
|
<q-drawer
|
||||||
|
v-model="leftDrawer"
|
||||||
|
side="left"
|
||||||
|
bordered
|
||||||
|
:mini="leftDrawerMini"
|
||||||
|
@click.capture="openMenu"
|
||||||
|
>
|
||||||
<!-- Plugins -->
|
<!-- Plugins -->
|
||||||
<essential-expansion-link
|
<essential-expansion-link
|
||||||
v-for="(entry, index) in mainLinks"
|
v-for="(entry, index) in mainLinks"
|
||||||
|
@ -49,7 +59,11 @@
|
||||||
@add-short-cut="addShortcut"
|
@add-short-cut="addShortcut"
|
||||||
/>
|
/>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<essential-link v-for="(entry, index) in essentials" :key="'essential' + index" :entry="entry" />
|
<essential-link
|
||||||
|
v-for="(entry, index) in essentials"
|
||||||
|
:key="'essential' + index"
|
||||||
|
:entry="entry"
|
||||||
|
/>
|
||||||
</q-drawer>
|
</q-drawer>
|
||||||
<q-page-container>
|
<q-page-container>
|
||||||
<router-view />
|
<router-view />
|
||||||
|
@ -91,7 +105,7 @@ export default defineComponent({
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const mainStore = useMainStore();
|
const mainStore = useMainStore();
|
||||||
const flaschengeist = inject<FG_Plugin.Flaschengeist>('flaschengeist');
|
const flaschengeist = inject<FG_Plugin.Flaschengeist>('flaschengeist');
|
||||||
const leftDrawer = ref(true);
|
const leftDrawer = ref(false);
|
||||||
const leftDrawerMini = ref(false);
|
const leftDrawerMini = ref(false);
|
||||||
const mainLinks = flaschengeist?.menuLinks || [];
|
const mainLinks = flaschengeist?.menuLinks || [];
|
||||||
const notifications = computed(() => mainStore.notifications.slice().reverse());
|
const notifications = computed(() => mainStore.notifications.slice().reverse());
|
||||||
|
@ -129,19 +143,23 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
|
|
||||||
function requestPermission() {
|
function requestPermission() {
|
||||||
void window.Notification.requestPermission().then((p) => (noPermission.value = p !== 'granted'));
|
void window.Notification.requestPermission().then(
|
||||||
|
(p) => (noPermission.value = p !== 'granted')
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function pollNotification() {
|
function pollNotification() {
|
||||||
void mainStore.loadNotifications(<FG_Plugin.Flaschengeist>flaschengeist).then((notifications) => {
|
void mainStore
|
||||||
if (useNative && !noPermission.value)
|
.loadNotifications(<FG_Plugin.Flaschengeist>flaschengeist)
|
||||||
notifications.forEach(
|
.then((notifications) => {
|
||||||
(notif) =>
|
if (useNative && !noPermission.value)
|
||||||
new window.Notification(notif.text, {
|
notifications.forEach(
|
||||||
timestamp: notif.time.getTime(),
|
(notif) =>
|
||||||
})
|
new window.Notification(notif.text, {
|
||||||
);
|
timestamp: notif.time.getTime(),
|
||||||
});
|
})
|
||||||
|
);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const shortCuts = computed({
|
const shortCuts = computed({
|
||||||
|
|
|
@ -19,9 +19,9 @@ export default defineComponent({
|
||||||
name: 'PageDashboard',
|
name: 'PageDashboard',
|
||||||
setup() {
|
setup() {
|
||||||
const flaschengeist = inject<FG_Plugin.Flaschengeist>('flaschengeist');
|
const flaschengeist = inject<FG_Plugin.Flaschengeist>('flaschengeist');
|
||||||
const widgets = computed(() => {
|
const widgets = computed(() =>
|
||||||
return flaschengeist?.widgets.filter((widget) => hasPermissions(widget.permissions));
|
flaschengeist?.widgets.filter((widget) => hasPermissions(widget.permissions))
|
||||||
});
|
);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
widgets,
|
widgets,
|
||||||
|
|
Loading…
Reference in New Issue