File tree Expand file tree Collapse file tree 2 files changed +19
-9
lines changed
apps/user_status/src/components Expand file tree Collapse file tree 2 files changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -48,11 +48,17 @@ import NcEmojiPicker from '@nextcloud/vue/dist/Components/NcEmojiPicker.js'
4848
4949export default {
5050 name: ' CustomMessageInput' ,
51+
5152 components: {
5253 NcButton,
5354 NcEmojiPicker,
5455 },
56+
5557 props: {
58+ icon: {
59+ type: String ,
60+ default: ' 😀' ,
61+ },
5662 message: {
5763 type: String ,
5864 required: true ,
@@ -63,11 +69,13 @@ export default {
6369 default: false ,
6470 },
6571 },
72+
6673 emits: [
6774 ' change' ,
6875 ' submit' ,
6976 ' icon-selected' ,
7077 ],
78+
7179 computed: {
7280 /**
7381 * Returns the user-set icon or a smiley in case no icon is set
@@ -78,6 +86,7 @@ export default {
7886 return this .icon || ' 😀'
7987 },
8088 },
89+
8190 methods: {
8291 focus () {
8392 this .$refs .input .focus ()
@@ -96,8 +105,8 @@ export default {
96105 this .$emit (' submit' , event .target .value )
97106 },
98107
99- setIcon (event ) {
100- this .$emit (' icon-selected ' , event )
108+ setIcon (icon ) {
109+ this .$emit (' select-icon ' , icon )
101110 },
102111 },
103112}
Original file line number Diff line number Diff line change 4242 </div >
4343 <div class =" set-status-modal__custom-input" >
4444 <CustomMessageInput ref =" customMessageInput"
45+ :icon =" icon"
4546 :message =" message"
4647 @change =" setMessage"
4748 @submit =" saveStatus"
48- @iconSelected =" setIcon" />
49+ @select-icon =" setIcon" />
4950 </div >
5051 <PredefinedStatusesList @select-status =" selectPredefinedMessage" />
5152 <ClearAtSelect :clear-at =" clearAt"
7475import { showError } from ' @nextcloud/dialogs'
7576import NcModal from ' @nextcloud/vue/dist/Components/NcModal'
7677import NcButton from ' @nextcloud/vue/dist/Components/NcButton'
77- import { getAllStatusOptions } from ' ../services/statusOptionsService'
78- import OnlineStatusMixin from ' ../mixins/OnlineStatusMixin'
79- import PredefinedStatusesList from ' ./PredefinedStatusesList'
80- import CustomMessageInput from ' ./CustomMessageInput'
81- import ClearAtSelect from ' ./ClearAtSelect'
82- import OnlineStatusSelect from ' ./OnlineStatusSelect'
78+ import { getAllStatusOptions } from ' ../services/statusOptionsService.js '
79+ import OnlineStatusMixin from ' ../mixins/OnlineStatusMixin.js '
80+ import PredefinedStatusesList from ' ./PredefinedStatusesList.vue '
81+ import CustomMessageInput from ' ./CustomMessageInput.vue '
82+ import ClearAtSelect from ' ./ClearAtSelect.vue '
83+ import OnlineStatusSelect from ' ./OnlineStatusSelect.vue '
8384
8485export default {
8586 name: ' SetStatusModal' ,
You can’t perform that action at this time.
0 commit comments