Skip to content

Commit 3044345

Browse files
committed
fix(settings): Split group lists
Signed-off-by: Christopher Ng <chrng8@gmail.com>
1 parent ba866cd commit 3044345

1 file changed

Lines changed: 34 additions & 29 deletions

File tree

apps/settings/src/views/Users.vue

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
</template>
3535
</NcAppNavigationNew>
3636

37-
<template #list>
37+
<NcAppNavigationList>
3838
<NcAppNavigationItem id="everyone"
3939
:exact="true"
4040
:name="t('settings', 'Active accounts')"
@@ -79,41 +79,44 @@
7979
</NcCounterBubble>
8080
</template>
8181
</NcAppNavigationItem>
82+
</NcAppNavigationList>
83+
84+
<NcAppNavigationCaption :name="t('settings', 'Groups')"
85+
:disabled="loadingAddGroup"
86+
:aria-label="loadingAddGroup ? t('settings', 'Creating group …') : t('settings', 'Create group')"
87+
force-menu
88+
is-heading
89+
:open.sync="isAddGroupOpen">
90+
<template #actionsTriggerIcon>
91+
<NcLoadingIcon v-if="loadingAddGroup" />
92+
<Plus v-else :size="20" />
93+
</template>
94+
<template #actions>
95+
<NcActionText>
96+
<template #icon>
97+
<AccountGroup :size="20" />
98+
</template>
99+
{{ t('settings', 'Create group') }}
100+
</NcActionText>
101+
<NcActionInput :label="t('settings', 'Group name')"
102+
data-cy-settings-new-group-name
103+
:label-outside="false"
104+
:disabled="loadingAddGroup"
105+
:value.sync="newGroupName"
106+
:error="hasAddGroupError"
107+
:helper-text="hasAddGroupError ? t('settings', 'Please enter a valid group name') : ''"
108+
@submit="createGroup" />
109+
</template>
110+
</NcAppNavigationCaption>
82111

83-
<NcAppNavigationCaption :name="t('settings', 'Groups')"
84-
:disabled="loadingAddGroup"
85-
:aria-label="loadingAddGroup ? t('settings', 'Creating group …') : t('settings', 'Create group')"
86-
force-menu
87-
:open.sync="isAddGroupOpen">
88-
<template #actionsTriggerIcon>
89-
<NcLoadingIcon v-if="loadingAddGroup" />
90-
<Plus v-else :size="20" />
91-
</template>
92-
<template #actions>
93-
<NcActionText>
94-
<template #icon>
95-
<AccountGroup :size="20" />
96-
</template>
97-
{{ t('settings', 'Create group') }}
98-
</NcActionText>
99-
<NcActionInput :label="t('settings', 'Group name')"
100-
data-cy-settings-new-group-name
101-
:label-outside="false"
102-
:disabled="loadingAddGroup"
103-
:value.sync="newGroupName"
104-
:error="hasAddGroupError"
105-
:helper-text="hasAddGroupError ? t('settings', 'Please enter a valid group name') : ''"
106-
@submit="createGroup" />
107-
</template>
108-
</NcAppNavigationCaption>
109-
112+
<NcAppNavigationList>
110113
<GroupListItem v-for="group in groupList"
111114
:id="group.id"
112115
:key="group.id"
113116
:active="selectedGroupDecoded === group.id"
114117
:name="group.title"
115118
:count="group.count" />
116-
</template>
119+
</NcAppNavigationList>
117120

118121
<template #footer>
119122
<ul class="app-navigation-entry__settings">
@@ -150,6 +153,7 @@ import NcAppContent from '@nextcloud/vue/dist/Components/NcAppContent.js'
150153
import NcAppNavigation from '@nextcloud/vue/dist/Components/NcAppNavigation.js'
151154
import NcAppNavigationCaption from '@nextcloud/vue/dist/Components/NcAppNavigationCaption.js'
152155
import NcAppNavigationItem from '@nextcloud/vue/dist/Components/NcAppNavigationItem.js'
156+
import NcAppNavigationList from '@nextcloud/vue/dist/Components/NcAppNavigationList.js'
153157
import NcAppNavigationNew from '@nextcloud/vue/dist/Components/NcAppNavigationNew.js'
154158
import NcContent from '@nextcloud/vue/dist/Components/NcContent.js'
155159
import NcCounterBubble from '@nextcloud/vue/dist/Components/NcCounterBubble.js'
@@ -182,6 +186,7 @@ export default {
182186
NcAppNavigation,
183187
NcAppNavigationCaption,
184188
NcAppNavigationItem,
189+
NcAppNavigationList,
185190
NcAppNavigationNew,
186191
NcContent,
187192
NcCounterBubble,

0 commit comments

Comments
 (0)