Merge remote-tracking branch 'sedum/feat/allowgeoloc' into dev_geo
This commit is contained in:
@@ -25,6 +25,19 @@ v-container
|
||||
v-model='place.address'
|
||||
:placeholder='$t("common.address")')
|
||||
|
||||
v-text-field(v-if="settings.allow_geolocation"
|
||||
:rules="[$validators.required('common.latitude')]"
|
||||
:label="$t('common.latitude')"
|
||||
v-model='place.latitude'
|
||||
:placeholder='$t("common.latitude")')
|
||||
|
||||
v-text-field(v-if="settings.allow_geolocation"
|
||||
:rules="[$validators.required('common.longitude')]"
|
||||
:label="$t('common.longitude')"
|
||||
v-model='place.longitude'
|
||||
:placeholder='$t("common.longitude")')
|
||||
|
||||
|
||||
v-card-actions
|
||||
v-spacer
|
||||
v-btn(@click='dialog = false' outlined color='warning') {{ $t('common.cancel') }}
|
||||
@@ -47,6 +60,7 @@ v-container
|
||||
</template>
|
||||
<script>
|
||||
import { mdiPencil, mdiChevronLeft, mdiChevronRight, mdiMagnify, mdiEye } from '@mdi/js'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -68,10 +82,17 @@ export default {
|
||||
async fetch() {
|
||||
this.places = await this.$axios.$get('/place/all')
|
||||
},
|
||||
computed: {
|
||||
...mapState(['settings']),
|
||||
},
|
||||
methods: {
|
||||
editPlace(item) {
|
||||
this.place.name = item.name
|
||||
this.place.address = item.address
|
||||
if (this.settings.allow_geolocation) {
|
||||
this.place.latitude = item.latitude
|
||||
this.place.longitude = item.longitude
|
||||
}
|
||||
this.place.id = item.id
|
||||
this.dialog = true
|
||||
},
|
||||
|
||||
@@ -48,6 +48,10 @@ v-container
|
||||
inset
|
||||
:label="$t('admin.recurrent_event_visible')")
|
||||
|
||||
v-switch.mt-1(v-model='allow_geolocation'
|
||||
inset
|
||||
:label="$t('admin.allow_geolocation')")
|
||||
|
||||
v-dialog(v-model='showSMTP' destroy-on-close max-width='700px' :fullscreen='$vuetify.breakpoint.xsOnly')
|
||||
SMTP(@close='showSMTP = false')
|
||||
|
||||
@@ -107,6 +111,10 @@ export default {
|
||||
get () { return this.settings.recurrent_event_visible },
|
||||
set (value) { this.setSetting({ key: 'recurrent_event_visible', value }) }
|
||||
},
|
||||
allow_geolocation: {
|
||||
get () { return this.settings.allow_geolocation },
|
||||
set (value) { this.setSetting({ key: 'allow_geolocation', value }) }
|
||||
},
|
||||
filteredTimezones () {
|
||||
const current_timezone = moment.tz.guess()
|
||||
tzNames.unshift(current_timezone)
|
||||
|
||||
Reference in New Issue
Block a user