Compare commits

...

3 Commits

5 changed files with 63 additions and 42 deletions

View File

@ -1,6 +1,6 @@
{ {
"license": "MIT", "license": "MIT",
"version": "1.0.0-alpha.8", "version": "1.0.0",
"name": "@flaschengeist/api", "name": "@flaschengeist/api",
"author": "Tim Gröger <flaschengeist@wu5.de>", "author": "Tim Gröger <flaschengeist@wu5.de>",
"homepage": "https://flaschengeist.dev/Flaschengeist", "homepage": "https://flaschengeist.dev/Flaschengeist",
@ -11,11 +11,11 @@
"main": "./src/index.ts", "main": "./src/index.ts",
"peerDependencies": { "peerDependencies": {
"@quasar/app-webpack": "^3.7.2", "@quasar/app-webpack": "^3.7.2",
"flaschengeist": "^2.0.0-alpha.1", "flaschengeist": "^2.0.0",
"pinia": "^2.0.8" "pinia": "^2.0.8"
}, },
"devDependencies": { "devDependencies": {
"@flaschengeist/types": "^1.0.0-alpha.10", "@flaschengeist/types": "^1.0.0",
"@types/node": "^14.18.0", "@types/node": "^14.18.0",
"typescript": "^4.5.4" "typescript": "^4.5.4"
}, },

View File

@ -1,7 +1,7 @@
{ {
"private": true, "private": true,
"license": "MIT", "license": "MIT",
"version": "2.0.0-alpha.2", "version": "2.0.0",
"productName": "flaschengeist-frontend", "productName": "flaschengeist-frontend",
"name": "flaschengeist", "name": "flaschengeist",
"author": "Tim Gröger <flaschengeist@wu5.de>", "author": "Tim Gröger <flaschengeist@wu5.de>",
@ -15,11 +15,11 @@
"lint": "eslint --ext .js,.ts,.vue ./src ./api" "lint": "eslint --ext .js,.ts,.vue ./src ./api"
}, },
"dependencies": { "dependencies": {
"@flaschengeist/api": "^1.0.0-alpha.8", "@flaschengeist/api": "^1.0.0",
"@flaschengeist/balance": "^1.0.0-alpha.2", "@flaschengeist/balance": "^1.0.0",
"@flaschengeist/pricelist-old": "^1.0.0-alpha.1", "@flaschengeist/pricelist-old": "^1.0.0",
"@flaschengeist/schedule": "^1.0.0-alpha.8", "@flaschengeist/schedule": "^1.0.0",
"@flaschengeist/users": "^1.0.0-alpha.4", "@flaschengeist/users": "^1.0.0",
"axios": "^1.4.0", "axios": "^1.4.0",
"pinia": "^2.0.8", "pinia": "^2.0.8",
"quasar": "^2.11.10", "quasar": "^2.11.10",
@ -29,7 +29,7 @@
"devDependencies": { "devDependencies": {
"@capacitor/core": "^5.0.0", "@capacitor/core": "^5.0.0",
"@capacitor/preferences": "^5.0.0", "@capacitor/preferences": "^5.0.0",
"@flaschengeist/types": "^1.0.0-alpha.10", "@flaschengeist/types": "^1.0.0",
"@quasar/app-webpack": "^3.7.2", "@quasar/app-webpack": "^3.7.2",
"@quasar/extras": "^1.16.3", "@quasar/extras": "^1.16.3",
"@types/node": "^14.18.0", "@types/node": "^14.18.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "flaschengeist", "name": "flaschengeist",
"version": "2.0.0-alpha.1", "version": "2.0.0",
"description": "Modular student club administration system", "description": "Modular student club administration system",
"author": "Tim Gröger <flaschengeist@wu5.de>", "author": "Tim Gröger <flaschengeist@wu5.de>",
"private": true, "private": true,
@ -13,4 +13,4 @@
"@capacitor/preferences": "^5.0.0", "@capacitor/preferences": "^5.0.0",
"@capacitor/splash-screen": "^5.0.0" "@capacitor/splash-screen": "^5.0.0"
} }
} }

View File

@ -14,7 +14,7 @@
class="q-ma-xs" class="q-ma-xs"
title="Löschen" title="Löschen"
style="position: absolute; top: 0; right: 0; z-index: 999" style="position: absolute; top: 0; right: 0; z-index: 999"
@click="dismiss" @click.stop.prevent="dismiss"
/> />
<q-card-section class="q-pa-xs"> <q-card-section class="q-pa-xs">
<div class="text-overline">{{ dateString }}</div> <div class="text-overline">{{ dateString }}</div>
@ -34,7 +34,7 @@
flat flat
dense dense
size="sm" size="sm"
@click="accept" @click.stop.prevent="accept"
/> />
<q-btn <q-btn
v-if="modelValue.reject" v-if="modelValue.reject"
@ -44,7 +44,7 @@
flat flat
dense dense
size="sm" size="sm"
@click="reject" @click.stop.prevent="reject"
/> />
</q-card-actions> </q-card-actions>
</q-card> </q-card>

View File

@ -2,7 +2,7 @@
<q-layout view="hHh Lpr lff"> <q-layout view="hHh Lpr lff">
<q-header elevated class="bg-primary text-white"> <q-header elevated class="bg-primary text-white">
<q-toolbar> <q-toolbar>
<q-btn dense flat round icon="mdi-menu" @click="openMenu" /> <q-btn dense flat round icon="mdi-menu" @click="openMenu(true)" />
<q-toolbar-title> <q-toolbar-title>
<router-link :to="{ name: 'dashboard' }" style="text-decoration: none; color: inherit"> <router-link :to="{ name: 'dashboard' }" style="text-decoration: none; color: inherit">
@ -56,32 +56,44 @@
side="left" side="left"
bordered bordered
:mini="leftDrawerMini" :mini="leftDrawerMini"
@click.capture="openMenu" @click.capture="openMenuMini"
> >
<!-- Plugins --> <!-- Plugins -->
<essential-expansion-link <q-scroll-area class="fit">
v-for="(entry, index) in mainLinks" <essential-expansion-link
:key="'plugin' + index" v-for="(entry, index) in mainLinks"
:entry="entry" :key="'plugin' + index"
@add-short-cut="addShortcut" :entry="entry"
/> @add-short-cut="addShortcut"
<q-separator /> />
<essential-link
v-for="(entry, index) in essentials"
:key="'essential' + index"
:entry="entry"
/>
<div v-if="platform.is.capacitor">
<q-separator /> <q-separator />
<q-item clickable tag="a" target="self" @click="logout"> <essential-link
<q-item-section avatar> v-for="(entry, index) in essentials"
<q-icon name="mdi-exit-to-app" /> :key="'essential' + index"
</q-item-section> :entry="entry"
/>
<div v-if="platform.is.capacitor">
<q-separator />
<q-item clickable tag="a" target="self" @click="logout">
<q-item-section avatar>
<q-icon name="mdi-exit-to-app" />
</q-item-section>
<q-item-section> <q-item-section>
<q-item-label>Logout</q-item-label> <q-item-label>Logout</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
</div>
</q-scroll-area>
<div class="q-mini-drawer-hide absolute" style="top: 15px; right: -17px">
<q-btn
dense
round
unelevated
color="accent"
icon="mdi-chevron-left"
@click="openMenuMini(true)"
/>
</div> </div>
</q-drawer> </q-drawer>
<q-page-container> <q-page-container>
@ -125,7 +137,7 @@ export default defineComponent({
const mainStore = useMainStore(); const mainStore = useMainStore();
const flaschengeist = inject<FG_Plugin.Flaschengeist>('flaschengeist'); const flaschengeist = inject<FG_Plugin.Flaschengeist>('flaschengeist');
const leftDrawer = ref(!Platform.is.mobile); const leftDrawer = ref(!Platform.is.mobile);
const leftDrawerMini = ref(false); const leftDrawerMini = ref(true);
const mainLinks = flaschengeist?.menuLinks || []; const mainLinks = flaschengeist?.menuLinks || [];
const notifications = computed(() => mainStore.notifications.slice().reverse()); const notifications = computed(() => mainStore.notifications.slice().reverse());
const polling = ref(NaN); const polling = ref(NaN);
@ -138,9 +150,11 @@ export default defineComponent({
void mainStore.getShortcuts(); void mainStore.getShortcuts();
}); });
onBeforeUnmount(() => window.clearInterval(polling.value)); onBeforeUnmount(() => window.clearInterval(polling.value));
/*
function openMenu(event: { target: HTMLInputElement }) { function openMenu(event: { target: HTMLInputElement }) {
if (event.target.nodeName === 'DIV') leftDrawerMini.value = false; console.log(event.target.nodeName);
if (event.target.nodeName === 'DIV' || event.target.nodeName === 'I')
leftDrawerMini.value = false;
else { else {
if (!leftDrawer.value || leftDrawerMini.value) { if (!leftDrawer.value || leftDrawerMini.value) {
leftDrawer.value = true; leftDrawer.value = true;
@ -151,7 +165,13 @@ export default defineComponent({
} }
} }
} }
*/
function openMenu(value = !leftDrawer.value) {
leftDrawer.value = value;
}
function openMenuMini(value = !leftDrawerMini.value) {
leftDrawerMini.value = value;
}
function logout() { function logout() {
void router.push({ name: 'login', params: { logout: 'logout' } }); void router.push({ name: 'login', params: { logout: 'logout' } });
void mainStore.logout(); void mainStore.logout();
@ -214,6 +234,7 @@ export default defineComponent({
notifications, notifications,
noPermission, noPermission,
openMenu, openMenu,
openMenuMini,
remove, remove,
requestPermission, requestPermission,
useNative, useNative,