[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: [
|
||||
// 'eva-icons',
|
||||
// 'fontawesome-v5',
|
||||
// 'ionicons-v4',
|
||||
// 'ionicons-v5',
|
||||
// 'line-awesome',
|
||||
// 'material-icons',
|
||||
'mdi-v5',
|
||||
'mdi-v6',
|
||||
// 'themify',
|
||||
|
||||
// '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
|
||||
framework: {
|
||||
iconSet: 'mdi-v5', // Quasar icon set
|
||||
iconSet: 'mdi-v6', // Quasar icon set
|
||||
lang: 'de', // Quasar language pack
|
||||
config: {
|
||||
dark: 'auto',
|
||||
|
|
|
@ -19,7 +19,11 @@
|
|||
{{ notifications.length }}
|
||||
</q-badge>
|
||||
<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">
|
||||
<Notification
|
||||
v-for="(notification, index) in notifications"
|
||||
|
@ -40,7 +44,13 @@
|
|||
</q-toolbar>
|
||||
</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 -->
|
||||
<essential-expansion-link
|
||||
v-for="(entry, index) in mainLinks"
|
||||
|
@ -49,7 +59,11 @@
|
|||
@add-short-cut="addShortcut"
|
||||
/>
|
||||
<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-page-container>
|
||||
<router-view />
|
||||
|
@ -91,7 +105,7 @@ export default defineComponent({
|
|||
const router = useRouter();
|
||||
const mainStore = useMainStore();
|
||||
const flaschengeist = inject<FG_Plugin.Flaschengeist>('flaschengeist');
|
||||
const leftDrawer = ref(true);
|
||||
const leftDrawer = ref(false);
|
||||
const leftDrawerMini = ref(false);
|
||||
const mainLinks = flaschengeist?.menuLinks || [];
|
||||
const notifications = computed(() => mainStore.notifications.slice().reverse());
|
||||
|
@ -129,19 +143,23 @@ export default defineComponent({
|
|||
}
|
||||
|
||||
function requestPermission() {
|
||||
void window.Notification.requestPermission().then((p) => (noPermission.value = p !== 'granted'));
|
||||
void window.Notification.requestPermission().then(
|
||||
(p) => (noPermission.value = p !== 'granted')
|
||||
);
|
||||
}
|
||||
|
||||
function pollNotification() {
|
||||
void mainStore.loadNotifications(<FG_Plugin.Flaschengeist>flaschengeist).then((notifications) => {
|
||||
if (useNative && !noPermission.value)
|
||||
notifications.forEach(
|
||||
(notif) =>
|
||||
new window.Notification(notif.text, {
|
||||
timestamp: notif.time.getTime(),
|
||||
})
|
||||
);
|
||||
});
|
||||
void mainStore
|
||||
.loadNotifications(<FG_Plugin.Flaschengeist>flaschengeist)
|
||||
.then((notifications) => {
|
||||
if (useNative && !noPermission.value)
|
||||
notifications.forEach(
|
||||
(notif) =>
|
||||
new window.Notification(notif.text, {
|
||||
timestamp: notif.time.getTime(),
|
||||
})
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
const shortCuts = computed({
|
||||
|
|
|
@ -19,9 +19,9 @@ export default defineComponent({
|
|||
name: 'PageDashboard',
|
||||
setup() {
|
||||
const flaschengeist = inject<FG_Plugin.Flaschengeist>('flaschengeist');
|
||||
const widgets = computed(() => {
|
||||
return flaschengeist?.widgets.filter((widget) => hasPermissions(widget.permissions));
|
||||
});
|
||||
const widgets = computed(() =>
|
||||
flaschengeist?.widgets.filter((widget) => hasPermissions(widget.permissions))
|
||||
);
|
||||
|
||||
return {
|
||||
widgets,
|
||||
|
|
Loading…
Reference in New Issue