-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implement basic Members list * Make Members in own panel * Fix sidebar panel select, run linter * Add PR link to changelog * Remove empty style Co-authored-by: Jannik Stehle <[email protected]>
- Loading branch information
1 parent
8bf41b9
commit 697a6fa
Showing
4 changed files
with
139 additions
and
8 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
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
105 changes: 105 additions & 0 deletions
105
packages/web-app-admin-settings/src/components/Spaces/SideBar/MembersPanel.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,105 @@ | ||
<template> | ||
<div class="oc-ml-s"> | ||
<div v-if="spaceResource.spaceRoles.manager.length" class="oc-mb-m"> | ||
<h4 v-translate>Managers</h4> | ||
<div | ||
v-for="(manager, index) in [...spaceResource.spaceRoles.manager].sort((a, b) => | ||
a.displayName.localeCompare(b.displayName) | ||
)" | ||
:key="index" | ||
class="oc-flex oc-flex-middle oc-mb-s" | ||
> | ||
<oc-avatar | ||
v-if="manager.kind === 'user'" | ||
:user-name="manager.displayName" | ||
:width="36" | ||
class="oc-mr-s" | ||
/><oc-avatar-item | ||
v-else | ||
:width="36" | ||
icon-size="medium" | ||
:icon="groupIcon" | ||
name="group" | ||
class="oc-mr-s" | ||
/> | ||
{{ manager.displayName }} | ||
</div> | ||
</div> | ||
<div v-if="spaceResource.spaceRoles.editor.length" class="oc-mb-m"> | ||
<h4 v-translate>Editors</h4> | ||
<div | ||
v-for="(editor, index) in [...spaceResource.spaceRoles.editor].sort((a, b) => | ||
a.displayName.localeCompare(b.displayName) | ||
)" | ||
:key="index" | ||
class="oc-flex oc-flex-middle oc-mb-s" | ||
> | ||
<oc-avatar | ||
v-if="editor.kind === 'user'" | ||
:user-name="editor.displayName" | ||
:width="36" | ||
class="oc-mr-s" | ||
/> | ||
<oc-avatar-item | ||
v-else | ||
:width="36" | ||
icon-size="medium" | ||
:icon="groupIcon" | ||
name="group" | ||
class="oc-mr-s" | ||
/> | ||
{{ editor.displayName }} | ||
</div> | ||
</div> | ||
<div v-if="spaceResource.spaceRoles.viewer.length" class="oc-mb-m"> | ||
<h4 v-translate>Viewers</h4> | ||
<div | ||
v-for="(viewer, index) in [...spaceResource.spaceRoles.viewer].sort((a, b) => | ||
a.displayName.localeCompare(b.displayName) | ||
)" | ||
:key="index" | ||
class="oc-flex oc-flex-middle oc-mb-s" | ||
> | ||
<oc-avatar | ||
v-if="viewer.kind === 'user'" | ||
:user-name="viewer.displayName" | ||
:width="36" | ||
class="oc-mr-s" | ||
/> | ||
<oc-avatar-item | ||
v-else | ||
:width="36" | ||
icon-size="medium" | ||
:icon="groupIcon" | ||
name="group" | ||
class="oc-mr-s" | ||
/> | ||
{{ viewer.displayName }} | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
<script lang="ts"> | ||
import { computed, defineComponent, PropType } from 'vue' | ||
import { SpaceResource } from 'web-client/src' | ||
import { ShareTypes } from 'web-client/src/helpers/share' | ||
export default defineComponent({ | ||
name: 'MembersPanel', | ||
props: { | ||
spaceResource: { | ||
type: Object as PropType<SpaceResource>, | ||
required: true | ||
} | ||
}, | ||
setup() { | ||
const groupIcon = computed(() => { | ||
return ShareTypes.group.icon | ||
}) | ||
return { | ||
groupIcon | ||
} | ||
} | ||
}) | ||
</script> | ||
|
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