-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jan
committed
Mar 30, 2023
1 parent
d4a384c
commit 84e4a0d
Showing
13 changed files
with
239 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Enhancement: Enable rename groups | ||
|
||
https://github.com/owncloud/web/pull/8715 | ||
https://github.com/owncloud/web/issues/8714 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
packages/web-app-admin-settings/src/components/Groups/SideBar/GroupInfoBox.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<template> | ||
<div class="oc-flex group-info oc-mb-l"> | ||
<avatar-image class="oc-mb-m" :width="80" :userid="_group.id" :user-name="_group.displayName" /> | ||
<span class="oc-text-muted group-info-display-name" v-text="_group.displayName"></span> | ||
<span class="oc-text-muted" v-text="groupMembersText"></span> | ||
</div> | ||
</template> | ||
<script lang="ts"> | ||
import { computed, defineComponent, PropType, unref } from 'vue' | ||
import { Group } from 'web-client/src/generated' | ||
import { useGettext } from 'vue3-gettext' | ||
export default defineComponent({ | ||
name: 'GroupInfoBox', | ||
setup(props) { | ||
const _group = computed(() => props.group as Group) | ||
const { $ngettext } = useGettext() | ||
const groupMembersText = computed(() => { | ||
return $ngettext( | ||
'%{groupCount} member', | ||
'%{groupCount} members', | ||
unref(_group).members.length, | ||
{ | ||
groupCount: unref(_group).members.length.toString() | ||
} | ||
) | ||
}) | ||
return { | ||
groupMembersText, | ||
_group | ||
} | ||
}, | ||
props: { | ||
group: { | ||
type: Object as PropType<Group>, | ||
required: true | ||
} | ||
} | ||
}) | ||
</script> | ||
<style lang="scss"> | ||
.gr-info { | ||
align-items: center; | ||
flex-direction: column; | ||
} | ||
.group-info-display-name { | ||
font-size: 1.5rem; | ||
} | ||
</style> |
1 change: 1 addition & 0 deletions
1
packages/web-app-admin-settings/src/composables/actions/groups/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from './useGroupActionsDelete' | ||
export * from './useGroupActionsEdit' |
27 changes: 27 additions & 0 deletions
27
packages/web-app-admin-settings/src/composables/actions/groups/useGroupActionsEdit.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { eventBus } from 'web-pkg' | ||
import { SideBarEventTopics } from 'web-pkg/src/composables/sideBar' | ||
import { useGettext } from 'vue3-gettext' | ||
import { computed } from 'vue' | ||
import { UserAction } from 'web-pkg/src/composables/actions' | ||
|
||
export const useGroupActionsEdit = () => { | ||
const { $gettext } = useGettext() | ||
|
||
const actions = computed((): UserAction[] => [ | ||
{ | ||
name: 'edit', | ||
icon: 'pencil', | ||
label: () => $gettext('Edit'), | ||
handler: () => eventBus.publish(SideBarEventTopics.openWithPanel, 'EditPanel'), | ||
isEnabled: ({ resources }) => { | ||
return resources.length > 0 | ||
}, | ||
componentType: 'button', | ||
class: 'oc-groups-actions-edit-trigger' | ||
} | ||
]) | ||
|
||
return { | ||
actions | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.