mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-03-16 22:47:11 -04:00
single choice list now - uses raw radio input instead of the one from ODS because it's broken - implements default value selection if no value is set
45 lines
841 B
Vue
45 lines
841 B
Vue
<template>
|
|
<div>
|
|
<oc-checkbox v-model="value" :label="setting.boolValue.label" />
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'SettingBoolean',
|
|
props: {
|
|
bundle: {
|
|
type: Object,
|
|
required: true
|
|
},
|
|
setting: {
|
|
type: Object,
|
|
required: true
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
initialValue: null,
|
|
value: null
|
|
}
|
|
},
|
|
computed: {
|
|
isChanged() {
|
|
return this.initialValue !== this.value
|
|
}
|
|
},
|
|
methods: {
|
|
applyValue() {
|
|
// TODO: propagate value to parent
|
|
// TODO: show a spinner while the request for saving the value is running!
|
|
}
|
|
},
|
|
mounted() {
|
|
// TODO: load the settings value of the authenticated user and apply it to the value
|
|
if (this.value === null) {
|
|
this.value = this.setting.boolValue.default
|
|
}
|
|
}
|
|
}
|
|
</script>
|