migrate admin settings
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<div>
|
||||
<template v-if="!expanded">
|
||||
<select v-model="model" v-if="!expanded" :multiple="multiple">
|
||||
<option
|
||||
v-for="option in options"
|
||||
:value="option.id"
|
||||
>
|
||||
{{ t('side_menu', option.label) }}
|
||||
</option>
|
||||
</select>
|
||||
</template>
|
||||
<template v-else>
|
||||
<NcCheckboxRadioSwitch
|
||||
v-for="option in options"
|
||||
v-model="model"
|
||||
:value="option.id"
|
||||
:key="option.id"
|
||||
:type="multiple ? 'checkbox' : 'radio'"
|
||||
name="value"
|
||||
>
|
||||
{{ option.label }}
|
||||
</NcCheckboxRadioSwitch>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { NcCheckboxRadioSwitch } from '@nextcloud/vue'
|
||||
|
||||
const model = defineModel()
|
||||
const { options, expanded } = defineProps({
|
||||
options: {
|
||||
type: Array,
|
||||
required: true,
|
||||
},
|
||||
expanded: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
multiple: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user