-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move user group select to edit panel
- Loading branch information
1 parent
efea26e
commit fdc88ff
Showing
10 changed files
with
194 additions
and
152 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
changelog/unreleased/enhancement-move-user-group-select-to-edit-panel
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,6 @@ | ||
Enhancement: Move user group select to edit panel | ||
|
||
The user group select input has been moved to the user edit panel for better editing. | ||
|
||
https://github.com/owncloud/web/pull/8279 | ||
https://github.com/owncloud/web/issues/8278 |
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
98 changes: 0 additions & 98 deletions
98
packages/web-app-admin-settings/src/components/Users/SideBar/GroupAssignmentsPanel.vue
This file was deleted.
Oops, something went wrong.
72 changes: 72 additions & 0 deletions
72
packages/web-app-admin-settings/src/components/Users/SideBar/GroupSelect.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,72 @@ | ||
<template> | ||
<div id="user-group-select-form"> | ||
<oc-select | ||
:model-value="selectedOption" | ||
class="oc-mb-s" | ||
multiple | ||
:options="availableGroups" | ||
option-label="displayName" | ||
:label="$gettext('Groups')" | ||
:fix-message-line="true" | ||
@update:modelValue="onUpdate" | ||
> | ||
<template #selected-option="{ displayName, id }"> | ||
<span class="oc-flex oc-flex-center"> | ||
<avatar-image | ||
class="oc-flex oc-align-self-center oc-mr-s" | ||
:width="16.8" | ||
:userid="id" | ||
:user-name="displayName" | ||
/> | ||
<span>{{ displayName }}</span> | ||
</span> | ||
</template> | ||
<template #option="{ displayName, id }"> | ||
<div class="oc-flex"> | ||
<span class="oc-flex oc-flex-center"> | ||
<avatar-image | ||
class="oc-flex oc-align-self-center oc-mr-s" | ||
:width="16.8" | ||
:userid="id" | ||
:user-name="displayName" | ||
/> | ||
<span>{{ displayName }}</span> | ||
</span> | ||
</div> | ||
</template> | ||
</oc-select> | ||
</div> | ||
</template> | ||
<script lang="ts"> | ||
import { defineComponent, PropType, ref, unref, watch } from 'vue' | ||
import { computed } from 'vue' | ||
import { Group } from 'web-client/src/generated' | ||
export default defineComponent({ | ||
name: 'GroupSelect', | ||
props: { | ||
selectedGroups: { | ||
type: Array as PropType<Group[]>, | ||
required: true | ||
}, | ||
availableGroups: { | ||
type: Array as PropType<Group[]>, | ||
required: true | ||
} | ||
}, | ||
setup(props, { emit }) { | ||
const selectedOption = ref(props.selectedGroups) | ||
const onUpdate = (event) => { | ||
selectedOption.value = event | ||
emit('selectedOptionChange', unref(selectedOption)) | ||
} | ||
const currentGroups = computed(() => props.selectedGroups) | ||
watch(currentGroups, () => { | ||
selectedOption.value = props.selectedGroups | ||
}) | ||
return { selectedOption, onUpdate } | ||
} | ||
}) | ||
</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
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.