diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-05-19 19:15:41 +0300 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-05-19 19:15:41 +0300 |
commit | 4f4d777767ae254a6ce7eff07f9a404e3acc0f65 (patch) | |
tree | 78ff19f17545cc39b9a6fa5242a3dfdcd5b31a18 /apps/settings/src | |
parent | eb720b9726aebc20ab0ed19e39ebf9c1c01ec80e (diff) |
Cleanup admin delegation setting pagecleanup/admin-delegation-setting
- Simplify code a bit
- Add link to doc
- Use Nextcloud vue component a bit more
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/settings/src')
-rw-r--r-- | apps/settings/src/components/AdminDelegating.vue | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/apps/settings/src/components/AdminDelegating.vue b/apps/settings/src/components/AdminDelegating.vue index d669e26efd0..9dd0d66cc31 100644 --- a/apps/settings/src/components/AdminDelegating.vue +++ b/apps/settings/src/components/AdminDelegating.vue @@ -1,36 +1,33 @@ <template> - <div id="admin-right-sub-granting" class="section"> - <h2>{{ t('settings', 'Administration privileges') }}</h2> - <p class="settings-hint"> - {{ t('settings', 'Here you can decide which group can access certain sections of the administration settings.') }} - </p> - + <SettingsSection :title="t('settings', 'Administration privileges')" + :description="t('settings', 'Here you can decide which group can access certain sections of the administration settings.')" + :doc-url="authorizedSettingsDocLink"> <div class="setting-list"> <div v-for="setting in availableSettings" :key="setting.class"> <h3>{{ setting.sectionName }}</h3> <GroupSelect :available-groups="availableGroups" :authorized-groups="authorizedGroups" :setting="setting" /> </div> </div> - </div> + </SettingsSection> </template> <script> import GroupSelect from './AdminDelegation/GroupSelect' +import SettingsSection from '@nextcloud/vue/dist/Components/SettingsSection' import { loadState } from '@nextcloud/initial-state' export default { name: 'AdminDelegating', components: { GroupSelect, + SettingsSection, }, data() { - const availableSettings = loadState('settings', 'available-settings') - const availableGroups = loadState('settings', 'available-groups') - const authorizedGroups = loadState('settings', 'authorized-groups') return { - availableSettings, - availableGroups, - authorizedGroups, + availableSettings: loadState('settings', 'available-settings'), + availableGroups: loadState('settings', 'available-groups'), + authorizedGroups: loadState('settings', 'authorized-groups'), + authorizedSettingsDocLink: loadState('settings', 'authorized-settings-doc-link'), } }, } |