Move non-component helper files to utils

This commit is contained in:
Ferdinand Thiessen 2020-11-24 18:42:43 +01:00
parent 17e203b5c9
commit eabc520762
11 changed files with 19 additions and 44 deletions

View File

@ -1,4 +1,5 @@
{ {
"singleQuote": true, "singleQuote": true,
"semi": true "semi": true,
"printWidth": 100
} }

View File

@ -1,4 +1,5 @@
module.exports = { module.exports = {
singleQuote: true, singleQuote: true,
semi: true semi: true,
printWidth: 100
}; };

View File

@ -15,7 +15,7 @@
<script lang="ts"> <script lang="ts">
import { computed, defineComponent } from '@vue/composition-api'; import { computed, defineComponent } from '@vue/composition-api';
import { hasPermissions } from 'src/components/permission'; import { hasPermissions } from 'src/utils/permission';
export default defineComponent({ export default defineComponent({
name: 'EssentialLink', name: 'EssentialLink',

View File

@ -4,7 +4,7 @@
<script lang="ts"> <script lang="ts">
import { computed, defineComponent } from '@vue/composition-api'; import { computed, defineComponent } from '@vue/composition-api';
import { hasPermissions } from 'src/components/permission'; import { hasPermissions } from 'src/utils/permission';
export default defineComponent({ export default defineComponent({
name: 'ShortCutLink', name: 'ShortCutLink',

View File

@ -1,9 +1,6 @@
<template> <template>
<q-layout view="hHh lpr lFf"> <q-layout view="hHh lpr lFf">
<q-header <q-header elevated class="bg-primary text-white">
elevated
class="bg-primary text-white"
>
<q-toolbar> <q-toolbar>
<!-- Button um Navigationsleiset ein und auszublenden. Nötig bei Desktop? --> <!-- Button um Navigationsleiset ein und auszublenden. Nötig bei Desktop? -->
<q-btn <q-btn
@ -16,16 +13,11 @@
/> />
<q-toolbar-title> <q-toolbar-title>
<router-link <router-link :to="{ name: 'dashboard' }" style="text-decoration: none; color: inherit">
:to="{ name: 'dashboard' }"
style="text-decoration: none; color: inherit;"
>
<q-avatar> <q-avatar>
<img src="logo.svg" /> <img src="logo.svg" />
</q-avatar> </q-avatar>
<span class="gt-xs"> <span class="gt-xs"> Flaschengeist </span>
Flaschengeist
</span>
</router-link> </router-link>
</q-toolbar-title> </q-toolbar-title>
@ -39,13 +31,7 @@
:permissions="shortcut.permissions" :permissions="shortcut.permissions"
/> />
</div> </div>
<q-btn <q-btn flat round dense icon="mdi-exit-to-app" @click="logout()" />
flat
round
dense
icon="mdi-exit-to-app"
@click="logout()"
/>
</q-toolbar> </q-toolbar>
</q-header> </q-header>
@ -83,10 +69,7 @@
/> />
</q-list> </q-list>
<div <div class="q-mini-drawer-hide absolute" style="top: 15px; right: -11px">
class="q-mini-drawer-hide absolute"
style="top: 15px; right: -11px"
>
<q-btn <q-btn
size="sm" size="sm"
dense dense

View File

@ -16,7 +16,7 @@
<script lang="ts"> <script lang="ts">
import { defineComponent, onMounted, ref } from '@vue/composition-api'; import { defineComponent, onMounted, ref } from '@vue/composition-api';
import { hasPermissions } from 'src/components/permission'; import { hasPermissions } from 'src/utils/permission';
import { AsyncComponentPromise } from 'vue/types/options'; import { AsyncComponentPromise } from 'vue/types/options';
export default defineComponent({ export default defineComponent({

View File

@ -118,7 +118,7 @@ import {
} from '@vue/composition-api'; } from '@vue/composition-api';
import { Store } from 'vuex'; import { Store } from 'vuex';
import { StateInterface } from 'src/store'; import { StateInterface } from 'src/store';
import { hasPermission } from 'src/components/permission'; import { hasPermission } from 'src/utils/permission';
import IsoDateInput from 'src/components/utils/IsoDateInput.vue'; import IsoDateInput from 'src/components/utils/IsoDateInput.vue';
import { Notify } from 'quasar'; import { Notify } from 'quasar';

View File

@ -71,7 +71,7 @@ import UpdateUser from '../components/UpdateUser.vue';
import NewUser from '../components/NewUser.vue'; import NewUser from '../components/NewUser.vue';
import { Store } from 'vuex'; import { Store } from 'vuex';
import { StateInterface } from 'src/store'; import { StateInterface } from 'src/store';
import { hasPermission } from 'src/components/permission'; import { hasPermission } from 'src/utils/permission';
import { PERMISSIONS } from '../permissions'; import { PERMISSIONS } from '../permissions';
import { Screen } from 'quasar'; import { Screen } from 'quasar';

View File

@ -1,23 +1,14 @@
<template> <template>
<div> <div>
<q-page <q-page padding class="fit row justify-center content-center items-center q-gutter-sm">
padding
class="fit row justify-center content-center items-center q-gutter-sm"
>
<q-card class="col-12"> <q-card class="col-12">
<q-card-section <q-card-section class="fit row justify-start content-center items-center">
class="fit row justify-start content-center items-center"
>
<div class="col-12 text-center text-h6">Benutzereinstellungen</div> <div class="col-12 text-center text-h6">Benutzereinstellungen</div>
</q-card-section> </q-card-section>
<MainUserSettings :user="currentUser" @update:user="updateUser" /> <MainUserSettings :user="currentUser" @update:user="updateUser" />
</q-card> </q-card>
<div class="col-12 text-left text-h6">Aktive Sessions:</div> <div class="col-12 text-left text-h6">Aktive Sessions:</div>
<sessions <sessions v-for="(session, index) in sessions" :key="'session' + index" :session="session" />
v-for="(session, index) in sessions"
:key="'session' + index"
:session="session"
/>
</q-page> </q-page>
</div> </div>
</template> </template>
@ -29,16 +20,15 @@ import {
onBeforeMount, onBeforeMount,
ref ref
} from '@vue/composition-api'; } from '@vue/composition-api';
import CircularProgress from 'components/loading/CircularProgress.vue';
import Sessions from '../components/settings/Sessions.vue'; import Sessions from '../components/settings/Sessions.vue';
import MainUserSettings from '../components/settings/MainUserSettings.vue'; import MainUserSettings from '../components/settings/MainUserSettings.vue';
import { Store } from 'vuex'; import { Store } from 'vuex';
import { StateInterface } from 'src/store'; import { StateInterface } from 'src/store';
import setLoadingBar from 'components/loading'; import setLoadingBar from 'src/utils/loading';
export default defineComponent({ export default defineComponent({
// name: 'PageName' // name: 'PageName'
components: { CircularProgress, Sessions, MainUserSettings }, components: { Sessions, MainUserSettings },
setup(_, { root }) { setup(_, { root }) {
const store = <Store<StateInterface>>root.$store; const store = <Store<StateInterface>>root.$store;