move geocoding / map settings into separate tab
This commit is contained in:
@@ -5,60 +5,69 @@ v-card
|
|||||||
p.mb-6(v-html="$t('admin.geolocation_description')")
|
p.mb-6(v-html="$t('admin.geolocation_description')")
|
||||||
|
|
||||||
v-form
|
v-form
|
||||||
v-autocomplete.mb-4(v-model='geocoding_provider_type'
|
v-row
|
||||||
@blur="save('geocoding_provider_type', geocoding_provider_type )"
|
v-col(md=3)
|
||||||
:label="$t('admin.geocoding_provider_type')"
|
v-autocomplete.mb-4(v-model='geocoding_provider_type'
|
||||||
:hint="$t('admin.geocoding_provider_type_help')"
|
@blur="save('geocoding_provider_type', geocoding_provider_type )"
|
||||||
persistent-hint
|
:label="$t('admin.geocoding_provider_type')"
|
||||||
:items="geocoding_provider_type_items"
|
:hint="$t('admin.geocoding_provider_type_help')"
|
||||||
:placeholder="geocoding_provider_type_default")
|
persistent-hint
|
||||||
|
:items="geocoding_provider_type_items"
|
||||||
|
:placeholder="geocoding_provider_type_default")
|
||||||
|
|
||||||
v-text-field.mb-4(v-model='geocoding_provider'
|
v-col(md=5)
|
||||||
@blur="save('geocoding_provider', geocoding_provider )"
|
v-text-field.mb-4(v-model='geocoding_provider'
|
||||||
:label="$t('admin.geocoding_provider')"
|
@blur="save('geocoding_provider', geocoding_provider )"
|
||||||
:hint="$t('admin.geocoding_provider_help')"
|
:label="$t('admin.geocoding_provider')"
|
||||||
persistent-hint
|
:hint="$t('admin.geocoding_provider_help')"
|
||||||
:placeholder="geocoding_provider_default")
|
persistent-hint
|
||||||
|
:placeholder="geocoding_provider_default")
|
||||||
|
|
||||||
v-autocomplete.mb-6(v-model="geocoding_countrycodes" :disabled="!(geocoding_provider_type === null || geocoding_provider_type === 'Nominatim')"
|
v-col(md=4)
|
||||||
@blur="save('geocoding_countrycodes', geocoding_countrycodes )"
|
v-autocomplete.mb-6(v-model="geocoding_countrycodes" :disabled="!(geocoding_provider_type === null || geocoding_provider_type === 'Nominatim')"
|
||||||
:label="$t('admin.geocoding_countrycodes')"
|
@blur="save('geocoding_countrycodes', geocoding_countrycodes )"
|
||||||
:items="countries"
|
:label="$t('admin.geocoding_countrycodes')"
|
||||||
multiple chips small-chips persistent-hint
|
:items="countries"
|
||||||
item-value="code"
|
multiple chips small-chips persistent-hint
|
||||||
item-text="name"
|
item-value="code"
|
||||||
:hint="$t('admin.geocoding_countrycodes_help')")
|
item-text="name"
|
||||||
|
:hint="$t('admin.geocoding_countrycodes_help')")
|
||||||
|
|
||||||
|
v-row
|
||||||
|
v-col(md=6)
|
||||||
|
v-text-field.mb-4(v-model='tilelayer_provider'
|
||||||
|
@blur="save('tilelayer_provider', tilelayer_provider )"
|
||||||
|
:label="$t('admin.tilelayer_provider')"
|
||||||
|
:hint="$t('admin.tilelayer_provider_help')"
|
||||||
|
persistent-hint
|
||||||
|
:placeholder="tilelayer_provider_default")
|
||||||
|
|
||||||
v-text-field.mb-4(v-model='tilelayer_provider'
|
v-col(md=6)
|
||||||
@blur="save('tilelayer_provider', tilelayer_provider )"
|
v-text-field(v-model='tilelayer_provider_attribution'
|
||||||
:label="$t('admin.tilelayer_provider')"
|
@blur="save('tilelayer_provider_attribution', tilelayer_provider_attribution )"
|
||||||
:hint="$t('admin.tilelayer_provider_help')"
|
:label="$t('admin.tilelayer_provider_attribution')"
|
||||||
persistent-hint
|
:placeholder="tilelayer_provider_attribution_default")
|
||||||
:placeholder="tilelayer_provider_default")
|
|
||||||
|
|
||||||
v-text-field(v-model='tilelayer_provider_attribution'
|
|
||||||
@blur="save('tilelayer_provider_attribution', tilelayer_provider_attribution )"
|
|
||||||
:label="$t('admin.tilelayer_provider_attribution')"
|
|
||||||
:placeholder="tilelayer_provider_attribution_default")
|
|
||||||
|
|
||||||
div(id="leaflet-map-preview" max-height='10px')
|
div(id="leaflet-map-preview" max-height='10px')
|
||||||
|
//- Map
|
||||||
|
|
||||||
v-card-actions
|
v-card-actions
|
||||||
v-spacer
|
v-spacer
|
||||||
v-btn(color='primary' @click='testGeocodingProvider' :loading='testGeocodingLoading' outlined ) {{$t('admin.geocoding_test_button')}}
|
v-btn(color='primary' @click='testGeocodingProvider' :loading='testGeocodingLoading' outlined ) {{$t('admin.geocoding_test_button')}}
|
||||||
v-btn(color='primary' @click='testTileLayerProvider' :loading='testTileLayerLoading' outlined ) {{$t('admin.tilelayer_test_button')}}
|
v-btn(color='primary' @click='testTileLayerProvider' :loading='testTileLayerLoading' outlined ) {{$t('admin.tilelayer_test_button')}}
|
||||||
v-btn(color='warning' @click="done" outlined) {{$t("common.ok")}}
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { mapActions, mapState } from 'vuex'
|
import { mapActions, mapState } from 'vuex'
|
||||||
import { isoCountries } from '../../server/helpers/geolocation'
|
import { isoCountries } from '../../server/helpers/geolocation'
|
||||||
|
// import Map from '~/components/Map'
|
||||||
import "leaflet/dist/leaflet.css"
|
import "leaflet/dist/leaflet.css"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
setup: { type: Boolean, default: false }
|
setup: { type: Boolean, default: false }
|
||||||
},
|
},
|
||||||
|
// components: { Map },
|
||||||
data ({ $store }) {
|
data ({ $store }) {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
|
|||||||
@@ -58,16 +58,11 @@ v-container
|
|||||||
|
|
||||||
v-dialog(v-model='showSMTP' destroy-on-close max-width='700px' :fullscreen='$vuetify.breakpoint.xsOnly')
|
v-dialog(v-model='showSMTP' destroy-on-close max-width='700px' :fullscreen='$vuetify.breakpoint.xsOnly')
|
||||||
SMTP(@close='showSMTP = false')
|
SMTP(@close='showSMTP = false')
|
||||||
|
|
||||||
v-card-actions
|
v-card-actions
|
||||||
v-btn(text @click='showSMTP=true')
|
v-btn(text @click='showSMTP=true')
|
||||||
<v-icon v-if='!settings.admin_email' color='error' class="mr-2" v-text='mdiAlert'></v-icon> {{$t('admin.show_smtp_setup')}}
|
<v-icon v-if='!settings.admin_email' color='error' class="mr-2" v-text='mdiAlert'></v-icon> {{$t('admin.show_smtp_setup')}}
|
||||||
|
|
||||||
v-dialog(v-model='showGeolocationConfigs' destroy-on-close max-width='700px' :fullscreen='$vuetify.breakpoint.xsOnly')
|
|
||||||
Geolocation(setup, @close='showGeolocationConfigs = false')
|
|
||||||
v-card-actions
|
|
||||||
v-btn(text @click='showGeolocationConfigs=true')
|
|
||||||
<v-icon v-if='!settings.admin_email' color='primary' class="mr-2" v-text='mdiMap'></v-icon> {{$t('admin.show_geolocation_setup')}}
|
|
||||||
|
|
||||||
v-btn(text @click='$emit("complete")' color='primary' v-if='setup') {{$t('common.next')}}
|
v-btn(text @click='$emit("complete")' color='primary' v-if='setup') {{$t('common.next')}}
|
||||||
v-icon(v-text='mdiArrowRight')
|
v-icon(v-text='mdiArrowRight')
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,12 @@ v-container.container.pa-0.pa-md-3
|
|||||||
v-tab(href='#places') {{$t('common.places')}}
|
v-tab(href='#places') {{$t('common.places')}}
|
||||||
v-tab-item(value='places')
|
v-tab-item(value='places')
|
||||||
Places
|
Places
|
||||||
|
|
||||||
|
//- GEOCODING / MAPS
|
||||||
|
v-tab(href='#geolocation' v-if='settings.allow_geolocation') {{$t('admin.geolocation')}}
|
||||||
|
v-tab-item(value='geolocation')
|
||||||
|
Geolocation
|
||||||
|
|
||||||
|
|
||||||
//- Collections
|
//- Collections
|
||||||
v-tab(href='#collections') {{$t('common.collections')}}
|
v-tab(href='#collections') {{$t('common.collections')}}
|
||||||
@@ -71,6 +77,7 @@ export default {
|
|||||||
Events: () => import(/* webpackChunkName: "admin" */'../components/admin/Events'),
|
Events: () => import(/* webpackChunkName: "admin" */'../components/admin/Events'),
|
||||||
Places: () => import(/* webpackChunkName: "admin" */'../components/admin/Places'),
|
Places: () => import(/* webpackChunkName: "admin" */'../components/admin/Places'),
|
||||||
Collections: () => import(/* webpackChunkName: "admin" */'../components/admin/Collections'),
|
Collections: () => import(/* webpackChunkName: "admin" */'../components/admin/Collections'),
|
||||||
|
Geolocation: () => import(/* webpackChunkName: "admin" */'../components/admin/Geolocation.vue'),
|
||||||
Federation: () => import(/* webpackChunkName: "admin" */'../components/admin/Federation.vue'),
|
Federation: () => import(/* webpackChunkName: "admin" */'../components/admin/Federation.vue'),
|
||||||
Moderation: () => import(/* webpackChunkName: "admin" */'../components/admin/Moderation.vue'),
|
Moderation: () => import(/* webpackChunkName: "admin" */'../components/admin/Moderation.vue'),
|
||||||
Plugin: () => import(/* webpackChunkName: "admin" */'../components/admin/Plugin.vue'),
|
Plugin: () => import(/* webpackChunkName: "admin" */'../components/admin/Plugin.vue'),
|
||||||
|
|||||||
Reference in New Issue
Block a user