2018-07-27 16:13:16 +02:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<v-switch
|
|
|
|
class="switch"
|
2018-11-25 17:43:54 +01:00
|
|
|
:messages="preventSuspendMessages"
|
2018-07-27 16:13:16 +02:00
|
|
|
color="success"
|
|
|
|
:label="$t('permissions.preventSuspend')"
|
|
|
|
v-model="hasPreventSuspendPermission"
|
|
|
|
>
|
|
|
|
</v-switch>
|
|
|
|
<v-switch
|
|
|
|
class="switch"
|
|
|
|
color="success"
|
|
|
|
:label="$t('permissions.playSound')"
|
|
|
|
v-model="hasPlaySoundPermission"
|
|
|
|
>
|
|
|
|
</v-switch>
|
|
|
|
<v-switch
|
|
|
|
class="switch"
|
|
|
|
color="success"
|
|
|
|
:label="$t('permissions.vibrate')"
|
|
|
|
v-model="hasVibratePermission"
|
|
|
|
>
|
|
|
|
</v-switch>
|
|
|
|
<v-switch
|
|
|
|
class="switch"
|
2018-11-25 17:43:54 +01:00
|
|
|
:messages="geolocationPermissionMessages"
|
2018-07-27 16:13:16 +02:00
|
|
|
color="success"
|
|
|
|
:label="$t('permissions.geolocation')"
|
|
|
|
v-model="hasGeolocationPermission"
|
|
|
|
>
|
|
|
|
</v-switch>
|
2018-09-14 15:42:10 +02:00
|
|
|
<v-switch
|
|
|
|
class="switch"
|
2018-11-25 17:43:54 +01:00
|
|
|
:messages="permanentNotificationMessages"
|
2018-09-14 15:42:10 +02:00
|
|
|
color="success"
|
|
|
|
:label="$t('permissions.permanentNotification')"
|
|
|
|
v-model="hasPermanentNotificationPermission"
|
|
|
|
>
|
|
|
|
</v-switch>
|
2018-07-27 16:13:16 +02:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
computed: {
|
|
|
|
hasGeolocationPermission: {
|
|
|
|
get() {
|
|
|
|
return this.$store.state.settings.hasGeolocationPermission;
|
|
|
|
},
|
|
|
|
set(value) {
|
|
|
|
this.$store.dispatch('setSetting', { setting: 'hasGeolocationPermission', value });
|
2018-09-14 15:42:10 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
hasPermanentNotificationPermission: {
|
|
|
|
get() {
|
|
|
|
return this.$store.state.settings.hasPermanentNotificationPermission;
|
|
|
|
},
|
|
|
|
set(value) {
|
|
|
|
this.$store.dispatch('setSetting', { setting: 'hasPermanentNotificationPermission', value });
|
2018-07-27 16:13:16 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
hasPlaySoundPermission: {
|
|
|
|
get() {
|
|
|
|
return this.$store.state.settings.hasPlaySoundPermission;
|
|
|
|
},
|
|
|
|
set(value) {
|
|
|
|
this.$store.dispatch('setSetting', { setting: 'hasPlaySoundPermission', value });
|
|
|
|
},
|
|
|
|
},
|
|
|
|
hasPreventSuspendPermission: {
|
|
|
|
get() {
|
|
|
|
return this.$store.state.settings.hasPreventSuspendPermission;
|
|
|
|
},
|
|
|
|
set(value) {
|
|
|
|
this.$store.dispatch('setSetting', { setting: 'hasPreventSuspendPermission', value });
|
|
|
|
},
|
|
|
|
},
|
|
|
|
hasVibratePermission: {
|
|
|
|
get() {
|
|
|
|
return this.$store.state.settings.hasVibratePermission;
|
|
|
|
},
|
|
|
|
set(value) {
|
|
|
|
this.$store.dispatch('setSetting', { setting: 'hasVibratePermission', value });
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2018-11-25 17:43:54 +01:00
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
geolocationPermissionMessages: [
|
|
|
|
`<i aria-hidden='true' class='v-icon material-icons' style='vertical-align: middle;'>help</i> ${this.$t('permissions.geolocationDescription')}`,
|
|
|
|
],
|
|
|
|
permanentNotificationMessages: [
|
|
|
|
`<i aria-hidden='true' class='v-icon material-icons' style='vertical-align: middle;'>help</i> ${this.$t('permissions.permanentNotificationDescription')}`,
|
|
|
|
],
|
|
|
|
preventSuspendMessages: [
|
|
|
|
`<i aria-hidden='true' class='v-icon material-icons' style='vertical-align: middle;'>help</i> ${this.$t('permissions.preventSuspendDescription')}`,
|
|
|
|
],
|
|
|
|
};
|
|
|
|
},
|
2018-07-27 16:13:16 +02:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
.switch .v-label {
|
|
|
|
color: rgba(0,0,0,.87);
|
|
|
|
}
|
|
|
|
</style>
|