release v2.0.0 #4

Merged
crimsen merged 481 commits from develop into master 2024-01-18 15:15:08 +00:00
3 changed files with 38 additions and 20 deletions
Showing only changes of commit 59920e23a5 - Show all commits

View File

@ -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',

View File

@ -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,11 +143,15 @@ 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
.loadNotifications(<FG_Plugin.Flaschengeist>flaschengeist)
.then((notifications) => {
if (useNative && !noPermission.value) if (useNative && !noPermission.value)
notifications.forEach( notifications.forEach(
(notif) => (notif) =>

View File

@ -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,