diff options
author | Simon L <szaimen@e.mail.de> | 2022-09-29 01:22:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-29 01:22:41 +0200 |
commit | f7067f4e5817e6c1c2b7ba12e562c860e66a22f7 (patch) | |
tree | 143abce7840e51a30d2d042c83ee17c7f1c629dc /apps | |
parent | f170f306376e95671075ed85aba1f6236bbd1f15 (diff) | |
parent | 076d4dd7db93bcab7a59cbb647d97f75fa117718 (diff) | |
download | nextcloud-server-f7067f4e5817e6c1c2b7ba12e562c860e66a22f7.tar.gz nextcloud-server-f7067f4e5817e6c1c2b7ba12e562c860e66a22f7.zip |
Merge pull request #34308 from nextcloud/fix/user-status
Fix user status emoji picking
Diffstat (limited to 'apps')
-rw-r--r-- | apps/user_status/src/components/CustomMessageInput.vue | 13 | ||||
-rw-r--r-- | apps/user_status/src/components/SetStatusModal.vue | 15 |
2 files changed, 19 insertions, 9 deletions
diff --git a/apps/user_status/src/components/CustomMessageInput.vue b/apps/user_status/src/components/CustomMessageInput.vue index d5a25bfb69d..da985613506 100644 --- a/apps/user_status/src/components/CustomMessageInput.vue +++ b/apps/user_status/src/components/CustomMessageInput.vue @@ -48,11 +48,17 @@ import NcEmojiPicker from '@nextcloud/vue/dist/Components/NcEmojiPicker.js' export default { name: 'CustomMessageInput', + components: { NcButton, NcEmojiPicker, }, + props: { + icon: { + type: String, + default: '😀', + }, message: { type: String, required: true, @@ -63,11 +69,13 @@ export default { default: false, }, }, + emits: [ 'change', 'submit', 'icon-selected', ], + computed: { /** * Returns the user-set icon or a smiley in case no icon is set @@ -78,6 +86,7 @@ export default { return this.icon || '😀' }, }, + methods: { focus() { this.$refs.input.focus() @@ -96,8 +105,8 @@ export default { this.$emit('submit', event.target.value) }, - setIcon(event) { - this.$emit('icon-selected', event) + setIcon(icon) { + this.$emit('select-icon', icon) }, }, } diff --git a/apps/user_status/src/components/SetStatusModal.vue b/apps/user_status/src/components/SetStatusModal.vue index e1ba63337ef..b04af52eefb 100644 --- a/apps/user_status/src/components/SetStatusModal.vue +++ b/apps/user_status/src/components/SetStatusModal.vue @@ -42,10 +42,11 @@ </div> <div class="set-status-modal__custom-input"> <CustomMessageInput ref="customMessageInput" + :icon="icon" :message="message" @change="setMessage" @submit="saveStatus" - @iconSelected="setIcon" /> + @select-icon="setIcon" /> </div> <PredefinedStatusesList @select-status="selectPredefinedMessage" /> <ClearAtSelect :clear-at="clearAt" @@ -74,12 +75,12 @@ import { showError } from '@nextcloud/dialogs' import NcModal from '@nextcloud/vue/dist/Components/NcModal' import NcButton from '@nextcloud/vue/dist/Components/NcButton' -import { getAllStatusOptions } from '../services/statusOptionsService' -import OnlineStatusMixin from '../mixins/OnlineStatusMixin' -import PredefinedStatusesList from './PredefinedStatusesList' -import CustomMessageInput from './CustomMessageInput' -import ClearAtSelect from './ClearAtSelect' -import OnlineStatusSelect from './OnlineStatusSelect' +import { getAllStatusOptions } from '../services/statusOptionsService.js' +import OnlineStatusMixin from '../mixins/OnlineStatusMixin.js' +import PredefinedStatusesList from './PredefinedStatusesList.vue' +import CustomMessageInput from './CustomMessageInput.vue' +import ClearAtSelect from './ClearAtSelect.vue' +import OnlineStatusSelect from './OnlineStatusSelect.vue' export default { name: 'SetStatusModal', |