Skip to content

Commit

Permalink
Convert Add group link to button
Browse files Browse the repository at this point in the history
The "Add group" peforms an on-page action and does not route or link to
anywhere else hence, not semantically a link but a button.

This commit implements the ehancement described at the respository level.

A change would be required in [@nextcloud/nextcloud-vue](nextcloud-libraries/nextcloud-vue#4108)
since the `NcAppNavigationNewItem` is an out-of-repo dependency.

Signed-off-by: fenn-cs <[email protected]>
  • Loading branch information
nfebe committed May 14, 2023
1 parent 598859d commit 1ee8fba
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions apps/settings/src/views/Users.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,18 @@
@keyup.enter="showNewUserMenu"
@keyup.space="showNewUserMenu" />
<template #list>
<NcAppNavigationItem id="addgroup"
<NcAppNavigationNewItem id="addgroup"
ref="addGroup"
:edit-placeholder="t('settings', 'Enter group name')"
:editable="true"
:loading="loadingAddGroup"
:title="t('settings', 'Add group')"
icon="icon-add"
@click="showAddGroupForm"
@update:title="createGroup" />
@update:title="createGroup">
<template #icon>
<Plus :size="20" />
</template>
</NcAppNavigationNewItem>
<NcAppNavigationItem id="everyone"
:exact="true"
:title="t('settings', 'Active users')"
Expand Down Expand Up @@ -148,6 +151,7 @@ import NcAppNavigationCaption from '@nextcloud/vue/dist/Components/NcAppNavigati
import NcAppNavigationCounter from '@nextcloud/vue/dist/Components/NcAppNavigationCounter.js'
import NcAppNavigationItem from '@nextcloud/vue/dist/Components/NcAppNavigationItem.js'
import NcAppNavigationNew from '@nextcloud/vue/dist/Components/NcAppNavigationNew.js'
import NcAppNavigationNewItem from '@nextcloud/vue/dist/Components/NcAppNavigationNewItem.js'
import NcAppNavigationSettings from '@nextcloud/vue/dist/Components/NcAppNavigationSettings.js'
import axios from '@nextcloud/axios'
import NcContent from '@nextcloud/vue/dist/Components/NcContent.js'
Expand All @@ -158,6 +162,7 @@ import VueLocalStorage from 'vue-localstorage'

import GroupListItem from '../components/GroupListItem.vue'
import UserList from '../components/UserList.vue'
import Plus from 'vue-material-design-icons/Plus.vue'

Vue.use(VueLocalStorage)

Expand All @@ -170,10 +175,12 @@ export default {
NcAppNavigationCounter,
NcAppNavigationItem,
NcAppNavigationNew,
NcAppNavigationNewItem,
NcAppNavigationSettings,
NcContent,
GroupListItem,
NcMultiselect,
Plus,
UserList,
},
props: {
Expand Down

0 comments on commit 1ee8fba

Please sign in to comment.