mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
Port admin delegation selects
Signed-off-by: Christopher Ng <chrng8@gmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
This commit is contained in:
parent
c92fd66175
commit
ed8bae0cdf
7 changed files with 26 additions and 17 deletions
|
|
@ -82,9 +82,11 @@ class Delegation implements ISettings {
|
|||
$settings = array_merge(
|
||||
$settings,
|
||||
array_map(function (IDelegatedSettings $setting) use ($section) {
|
||||
$sectionName = $section->getName() . ($setting->getName() !== null ? ' - ' . $setting->getName() : '');
|
||||
return [
|
||||
'class' => get_class($setting),
|
||||
'sectionName' => $section->getName() . ($setting->getName() !== null ? ' - ' . $setting->getName() : ''),
|
||||
'sectionName' => $sectionName,
|
||||
'id' => mb_strtolower(str_replace(' ', '-', $sectionName)),
|
||||
'priority' => $section->getPriority(),
|
||||
];
|
||||
}, $sectionSettings)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
:doc-url="authorizedSettingsDocLink">
|
||||
<div class="setting-list">
|
||||
<div v-for="setting in availableSettings" :key="setting.class">
|
||||
<h3>{{ setting.sectionName }}</h3>
|
||||
<label :for="setting.id">{{ setting.sectionName }}</label>
|
||||
<GroupSelect :available-groups="availableGroups" :authorized-groups="authorizedGroups" :setting="setting" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -32,3 +32,12 @@ export default {
|
|||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
label {
|
||||
display: block;
|
||||
font-size: 16px;
|
||||
margin: 12px 0;
|
||||
color: var(--color-text-light);
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,17 +1,16 @@
|
|||
<template>
|
||||
<NcMultiselect v-model="selected"
|
||||
class="group-multiselect"
|
||||
<NcSelect :input-id="setting.id"
|
||||
v-model="selected"
|
||||
class="group-select"
|
||||
:placeholder="t('settings', 'None')"
|
||||
track-by="gid"
|
||||
label="displayName"
|
||||
:options="availableGroups"
|
||||
open-direction="bottom"
|
||||
:multiple="true"
|
||||
:allow-empty="true" />
|
||||
:close-on-select="false" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NcMultiselect from '@nextcloud/vue/dist/Components/NcMultiselect'
|
||||
import NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'
|
||||
import { generateUrl } from '@nextcloud/router'
|
||||
import axios from '@nextcloud/axios'
|
||||
import { showError } from '@nextcloud/dialogs'
|
||||
|
|
@ -20,7 +19,7 @@ import logger from '../../logger'
|
|||
export default {
|
||||
name: 'GroupSelect',
|
||||
components: {
|
||||
NcMultiselect,
|
||||
NcSelect,
|
||||
},
|
||||
props: {
|
||||
availableGroups: {
|
||||
|
|
@ -67,8 +66,7 @@ export default {
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.group-multiselect {
|
||||
.group-select {
|
||||
width: 100%;
|
||||
margin-right: 0;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
4
dist/core-common.js
vendored
4
dist/core-common.js
vendored
File diff suppressed because one or more lines are too long
2
dist/core-common.js.map
vendored
2
dist/core-common.js.map
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue