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,25 +1,24 @@
<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" :zoom="zoom"
:zoom="zoom" :options="{attributionControl: false}"
:options="{attributionControl: false}" :center="center")
:center="center") LControlAttribution(position='bottomright' prefix="")
LControlAttribution(position='bottomright' prefix="") LTileLayer(
LTileLayer( :url="url"
:url="url" :attribution="attribution")
:attribution="attribution") LMarker(
LMarker( :lat-lng="marker.coordinates")
:lat-lng="marker.coordinates")
v-row.my-4.d-flex.flex-column.align-center.text-center v-row.my-4.d-flex.flex-column.align-center.text-center
.text-h6 .text-h6
v-icon(v-text='mdiMapMarker' ) v-icon(v-text='mdiMapMarker' )
nuxt-link.ml-2.text-decoration-none(v-text="event.place.name" :to='`/place/${event.place.name}`') nuxt-link.ml-2.text-decoration-none(v-text="event.place.name" :to='`/place/${event.place.name}`')
.mx-2(v-text="`${event.place.address}`") .mx-2(v-text="`${event.place.address}`")
v-card-actions v-card-actions
v-row v-row
//- p.my-4(v-text="$t('common.getting_there')") //- p.my-4(v-text="$t('common.getting_there')")

View file

@ -1,23 +1,58 @@
<template lang='pug'> <template lang='pug'>
v-list(dense nav) span
v-list-group(:append-icon='mdiChevronUp' :value='true') v-list(dense nav)
template(v-slot:activator) v-list-group(:append-icon='mdiChevronUp' :value='true')
v-list-item.text-overline Admin actions template(v-slot:activator)
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-content v-list-item-icon
v-list-item-title(v-text="$t(`common.${event.is_visible?'hide':'confirm'}`)") 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-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-content v-list-item-icon
v-list-item-title(v-text="$t('common.edit')") v-icon(v-text='mdiCalendarEdit')
v-list-item-content
v-list-item-title(v-text="$t('common.edit')")
//- Remove
v-list-item(@click='remove(false)')
v-list-item-icon
v-icon(v-text='mdiDelete')
v-list-item-content
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')")
//- Remove
v-list-item(@click='remove(false)')
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')}}
@ -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)
} }
}, },