Disable geolocation on prefered events area selection
Since we restrict to administrative areas and not full addresses Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
3fade65c8e
commit
468c04d24a
@ -20,7 +20,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</b-autocomplete>
|
</b-autocomplete>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field v-if="isSecureContext()">
|
<b-field v-if="canDoGeoLocation">
|
||||||
<b-button
|
<b-button
|
||||||
type="is-text"
|
type="is-text"
|
||||||
v-if="!gettingLocation"
|
v-if="!gettingLocation"
|
||||||
@ -72,6 +72,8 @@ import { IConfig } from "../../types/config.model";
|
|||||||
export default class AddressAutoComplete extends Vue {
|
export default class AddressAutoComplete extends Vue {
|
||||||
@Prop({ required: true }) value!: IAddress;
|
@Prop({ required: true }) value!: IAddress;
|
||||||
@Prop({ required: false, default: false }) type!: string | false;
|
@Prop({ required: false, default: false }) type!: string | false;
|
||||||
|
@Prop({ required: false, default: true, type: Boolean })
|
||||||
|
doGeoLocation!: boolean;
|
||||||
|
|
||||||
addressData: IAddress[] = [];
|
addressData: IAddress[] = [];
|
||||||
|
|
||||||
@ -244,9 +246,13 @@ export default class AddressAutoComplete extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line class-methods-use-this
|
// eslint-disable-next-line class-methods-use-this
|
||||||
isSecureContext(): boolean {
|
get isSecureContext(): boolean {
|
||||||
return window.isSecureContext;
|
return window.isSecureContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get canDoGeoLocation(): boolean {
|
||||||
|
return this.isSecureContext && this.doGeoLocation;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
@ -63,6 +63,7 @@
|
|||||||
loggedUser && loggedUser.settings && loggedUser.settings.location
|
loggedUser && loggedUser.settings && loggedUser.settings.location
|
||||||
"
|
"
|
||||||
:type="AddressSearchType.ADMINISTRATIVE"
|
:type="AddressSearchType.ADMINISTRATIVE"
|
||||||
|
:doGeoLocation="false"
|
||||||
v-model="address"
|
v-model="address"
|
||||||
>
|
>
|
||||||
</address-auto-complete>
|
</address-auto-complete>
|
||||||
|
Loading…
Reference in New Issue
Block a user