Merge branch 'master' of framagit.org:/les/gancio into feat/geolocation_allow_to_change_providers_merge

This commit is contained in:
sedum
2022-12-06 00:07:57 +01:00
22 changed files with 173 additions and 358 deletions

View File

@@ -32,13 +32,13 @@ export default {
</script>
<style>
nav {
background-image: linear-gradient(rgba(59, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url(/headerimage.png);
background-image: linear-gradient(rgba(0, 0, 0, 0.8), rgba(20, 20, 20, 0.7)), url(/headerimage.png);
background-position: center center;
background-size: cover;
}
.theme--light nav {
background-image: linear-gradient(to bottom, rgba(255,230,230,.95), rgba(250,250,250,.95)), url(/headerimage.png);
background-image: linear-gradient(to bottom, rgba(230,230,230,.95), rgba(250,250,250,.95)), url(/headerimage.png);
}
#title {

View File

@@ -3,12 +3,11 @@ v-col(cols=12)
.text-center
v-btn-toggle.v-col-6.flex-column.flex-sm-row(v-model='type' color='primary' @change='type => change("type", type)')
v-btn(value='normal' label="normal") {{ $t('event.normal') }}
v-btn(value='multidate' label='multidate') {{ $t('event.multidate') }}
v-btn(v-if='settings.allow_multidate_event' value='multidate' label='multidate') {{ $t('event.multidate') }}
v-btn(v-if='settings.allow_recurrent_event' value='recurrent' label="recurrent") {{ $t('event.recurrent') }}
p {{ $t(`event.${type}_description`) }}
v-btn-toggle.v-col-6.flex-column.flex-sm-row(v-if='type === "recurrent"' color='primary' :value='value.recurrent.frequency' @change='fq => change("frequency", fq)')
v-btn(v-for='f in frequencies' :key='f.value' :value='f.value') {{ f.text }}
@@ -60,7 +59,7 @@ v-col(cols=12)
:allowedMinutes='allowedMinutes'
format='24hr'
@click:minute='menuFromHour = false'
@change='hr => change("fromHour", hr)')
@input='hr => change("fromHour", hr)')
v-col.col-12.col-sm-6
@@ -88,7 +87,7 @@ v-col(cols=12)
:allowedMinutes='allowedMinutes'
format='24hr'
@click:minute='menuDueHour = false'
@change='hr => change("dueHour", hr)')
@input='hr => change("dueHour", hr)')
List(v-if='type === "normal" && todayEvents.length' :events='todayEvents' :title='$t("event.same_day")')
@@ -235,6 +234,15 @@ export default {
} else if (what === 'dueHour') {
if (value) {
this.value.due = this.value.due ? this.value.due : this.value.from
const [hour, minute] = value.split(':')
const [fromHour, fromMinute] = this.value.fromHour.split(':')
if (!this.value.multidate) {
if (hour < fromHour) {
this.value.due = dayjs(this.value.from).add(1, 'day').toDate()
} else {
this.value.due = dayjs(this.value.from).toDate()
}
}
} else {
this.value.due = null
}

View File

@@ -39,6 +39,10 @@ v-container
inset
:label="$t('admin.allow_anon_event')")
v-switch.mt-1(v-model='allow_multidate_event'
inset
:label="$t('admin.allow_multidate_event')")
v-switch.mt-1(v-model='allow_recurrent_event'
inset
:label="$t('admin.allow_recurrent_event')")
@@ -115,6 +119,10 @@ export default {
get () { return this.settings.allow_recurrent_event },
set (value) { this.setSetting({ key: 'allow_recurrent_event', value }) }
},
allow_multidate_event: {
get () { return this.settings.allow_multidate_event },
set (value) { this.setSetting({ key: 'allow_multidate_event', value }) }
},
recurrent_event_visible: {
get () { return this.settings.recurrent_event_visible },
set (value) { this.setSetting({ key: 'recurrent_event_visible', value }) }

View File

@@ -16,6 +16,7 @@ v-container
:label="$t('admin.hide_calendar')")
v-card-title {{$t('admin.default_images')}}
v-card-subtitle(v-html="$t('admin.default_images_help')")
v-card-text
v-row
v-col(cols='4')
@@ -109,12 +110,13 @@ import { mdiDeleteForever, mdiRestore, mdiPlus, mdiChevronUp } from '@mdi/js'
export default {
name: 'Theme',
data () {
const t = new Date().getMilliseconds()
return {
mdiDeleteForever, mdiRestore, mdiPlus, mdiChevronUp,
valid: false,
logoKey: 0,
fallbackImageKey: 0,
headerImageKey: 0,
logoKey: t,
fallbackImageKey: t,
headerImageKey: t,
link: { href: '', label: '' },
linkModal: false
// menu: [false, false, false, false]