appbar, map dialog

This commit is contained in:
lesion 2022-11-21 13:21:32 +01:00
parent 41a1805e65
commit b598f0d105
No known key found for this signature in database
GPG key ID: 352918250B012177
7 changed files with 79 additions and 44 deletions

View file

@ -10,7 +10,7 @@ li {
} }
.v-main { .v-main {
padding-top: 224px !important; padding-top: 176px !important;
} }
.v-dialog .theme--dark.v-card { .v-dialog .theme--dark.v-card {

View file

@ -1,5 +1,5 @@
<template> <template>
<v-app-bar shrink-on-scroll promiment app src="/headerimage.png"> <v-app-bar prominent absolute app src="/headerimage.png">
<template v-slot:img="{ props }"> <template v-slot:img="{ props }">
<v-img <v-img
v-bind="props" v-bind="props"

View file

@ -14,6 +14,7 @@ v-card
:error-messages='errorMessage') :error-messages='errorMessage')
.col .col
v-file-input( v-file-input(
:prepend-icon='mdiAttachment'
v-model='file' v-model='file'
accept=".ics" accept=".ics"
:label="$t('event.ics')" :label="$t('event.ics')"
@ -22,12 +23,13 @@ v-card
v-card-actions v-card-actions
v-spacer v-spacer
v-btn(text @click='$emit("close")' color='warning') {{$t('common.cancel')}} v-btn(outlined @click='$emit("close")' color='warning') {{$t('common.cancel')}}
v-btn(text @click='importGeneric' :loading='loading' :disabled='loading' v-btn(outlined @click='importGeneric' :loading='loading' :disabled='loading'
color='primary') {{$t('common.import')}} color='primary') {{$t('common.import')}}
</template> </template>
<script> <script>
import { mdiAttachment } from '@mdi/js'
import ical from 'ical.js' import ical from 'ical.js'
import get from 'lodash/get' import get from 'lodash/get'
@ -35,6 +37,7 @@ export default {
name: 'ImportDialog', name: 'ImportDialog',
data () { data () {
return { return {
mdiAttachment,
file: null, file: null,
errorMessage: '', errorMessage: '',
error: false, error: false,

View file

@ -1,7 +1,6 @@
<template lang="pug"> <template lang="pug">
client-only(placeholder='Loading...' ) client-only(placeholder='Loading...' )
v-card v-card
v-card-text
v-container v-container
LMap(ref="map" LMap(ref="map"
id="leaflet-map" id="leaflet-map"

View file

@ -1,24 +1,59 @@
<template lang='pug'> <template lang='pug'>
v-list(dense nav) span
v-list(dense nav)
v-list-group(:append-icon='mdiChevronUp' :value='true') v-list-group(:append-icon='mdiChevronUp' :value='true')
template(v-slot:activator) template(v-slot:activator)
v-list-item.text-overline Admin actions v-list-item.text-overline Admin actions
//- Hide / confirm event //- Hide / confirm event
v-list-item(@click='toggle(false)') v-list-item(@click='toggle(false)')
v-list-item-icon
v-icon(v-if='event.is_visible' v-text='mdiEyeOff')
v-icon(v-else='event.is_visible' v-text='mdiEye')
v-list-item-content v-list-item-content
v-list-item-title(v-text="$t(`common.${event.is_visible?'hide':'confirm'}`)") v-list-item-title(v-text="$t(`common.${event.is_visible?'hide':'confirm'}`)")
//- Edit event //- Edit event
v-list-item(:to='`/add/${event.id}`') v-list-item(:to='`/add/${event.id}`')
v-list-item-icon
v-icon(v-text='mdiCalendarEdit')
v-list-item-content v-list-item-content
v-list-item-title(v-text="$t('common.edit')") v-list-item-title(v-text="$t('common.edit')")
//- Remove //- Remove
v-list-item(@click='remove(false)') v-list-item(@click='remove(false)')
v-list-item-icon
v-icon(v-text='mdiDelete')
v-list-item-content v-list-item-content
v-list-item-title(v-text="$t('common.remove')") v-list-item-title(v-text="$t('common.remove')")
template(v-if='event.parentId')
v-list-item.text-overline Recurring event actions <a href="https://gancio.org/">?</a>
//- Pause / Start to generate recurring event
v-list-item(@click='toggle(true)')
v-list-item-icon
v-icon(v-text='event.parent.is_visible ? mdiPause : mdiPlay')
v-list-item-content
v-list-item-title(v-text="$t(`common.${event.parent.is_visible ? 'pause': 'start'}`)")
//- Edit event
v-list-item(:to='`/add/${event.parentId}`')
v-list-item-icon
v-icon(v-text='mdiCalendarEdit')
v-list-item-content
v-list-item-title(v-text="$t('common.edit')")
//- Remove
v-list-item(@click='remove(true)')
v-list-item-icon
v-icon(v-text='mdiDeleteForever')
v-list-item-content
v-list-item-title(v-text="$t('common.remove')")
//- v-btn(text color='primary' v-if='event.is_visible' @click='toggle(false)') {{$t(`common.${event.parentId?'skip':'hide'}`)}} //- v-btn(text color='primary' v-if='event.is_visible' @click='toggle(false)') {{$t(`common.${event.parentId?'skip':'hide'}`)}}
//- v-btn(text color='success' v-else @click='toggle(false)') <v-icon color='yellow' v-text='mdiAlert'></v-icon> {{$t('common.confirm')}} //- v-btn(text color='success' v-else @click='toggle(false)') <v-icon color='yellow' v-text='mdiAlert'></v-icon> {{$t('common.confirm')}}
//- v-btn(text color='primary' @click='$router.push(`/add/${event.id}`)') {{$t('common.edit')}} //- v-btn(text color='primary' @click='$router.push(`/add/${event.id}`)') {{$t('common.edit')}}
@ -33,11 +68,11 @@ v-list(dense nav)
//- v-btn(text color='primary' @click='remove(true)') {{$t('common.remove')}} //- v-btn(text color='primary' @click='remove(true)') {{$t('common.remove')}}
</template> </template>
<script> <script>
import { mdiChevronUp, mdiRepeat } from '@mdi/js' import { mdiChevronUp, mdiRepeat, mdiDelete, mdiCalendarEdit, mdiEyeOff, mdiEye, mdiPause, mdiPlay, mdiDeleteForever } from '@mdi/js'
export default { export default {
name: 'EventAdmin', name: 'EventAdmin',
data () { data () {
return { mdiChevronUp, mdiRepeat } return { mdiChevronUp, mdiRepeat, mdiDelete, mdiCalendarEdit, mdiEyeOff, mdiEye, mdiPause, mdiPlay, mdiDeleteForever }
}, },
props: { props: {
event: { event: {

View file

@ -9,9 +9,7 @@
<v-btn class='ml-2 mt-2' outlined v-for='collection in collections' color='primary' :key='collection.id' :to='`/collection/${collection.name}`'>{{collection.name}}</v-btn> <v-btn class='ml-2 mt-2' outlined v-for='collection in collections' color='primary' :key='collection.id' :to='`/collection/${collection.name}`'>{{collection.name}}</v-btn>
</div> --> </div> -->
<!-- <v-fade-transition hide-on-leave> --> <!-- <v-fade-transition hide-on-leave> -->
<v-container>
<nuxt /> <nuxt />
</v-container>
<!-- </v-fade-transition> --> <!-- </v-fade-transition> -->
</v-main> </v-main>
<Footer/> <Footer/>

View file

@ -79,7 +79,7 @@ const pluginController = {
} }
if (plugin.load && typeof plugin.load === 'function') { if (plugin.load && typeof plugin.load === 'function') {
plugin.load({ settings: settingsController.settings }, settings) plugin.load({ helpers: require('../../helpers'), settings: settingsController.settings }, settings)
} }
}, },