mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
Fix user status emoji picking
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
fafc1ee807
commit
21fd2d8317
2 changed files with 19 additions and 9 deletions
|
|
@ -48,11 +48,17 @@ import NcEmojiPicker from '@nextcloud/vue/dist/Components/NcEmojiPicker.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CustomMessageInput',
|
name: 'CustomMessageInput',
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
NcButton,
|
NcButton,
|
||||||
NcEmojiPicker,
|
NcEmojiPicker,
|
||||||
},
|
},
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
|
icon: {
|
||||||
|
type: String,
|
||||||
|
default: '😀',
|
||||||
|
},
|
||||||
message: {
|
message: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
|
|
@ -63,11 +69,13 @@ export default {
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
emits: [
|
emits: [
|
||||||
'change',
|
'change',
|
||||||
'submit',
|
'submit',
|
||||||
'icon-selected',
|
'icon-selected',
|
||||||
],
|
],
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
/**
|
/**
|
||||||
* Returns the user-set icon or a smiley in case no icon is set
|
* Returns the user-set icon or a smiley in case no icon is set
|
||||||
|
|
@ -78,6 +86,7 @@ export default {
|
||||||
return this.icon || '😀'
|
return this.icon || '😀'
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
focus() {
|
focus() {
|
||||||
this.$refs.input.focus()
|
this.$refs.input.focus()
|
||||||
|
|
@ -96,8 +105,8 @@ export default {
|
||||||
this.$emit('submit', event.target.value)
|
this.$emit('submit', event.target.value)
|
||||||
},
|
},
|
||||||
|
|
||||||
setIcon(event) {
|
setIcon(icon) {
|
||||||
this.$emit('icon-selected', event)
|
this.$emit('select-icon', icon)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,10 +42,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="set-status-modal__custom-input">
|
<div class="set-status-modal__custom-input">
|
||||||
<CustomMessageInput ref="customMessageInput"
|
<CustomMessageInput ref="customMessageInput"
|
||||||
|
:icon="icon"
|
||||||
:message="message"
|
:message="message"
|
||||||
@change="setMessage"
|
@change="setMessage"
|
||||||
@submit="saveStatus"
|
@submit="saveStatus"
|
||||||
@iconSelected="setIcon" />
|
@select-icon="setIcon" />
|
||||||
</div>
|
</div>
|
||||||
<PredefinedStatusesList @select-status="selectPredefinedMessage" />
|
<PredefinedStatusesList @select-status="selectPredefinedMessage" />
|
||||||
<ClearAtSelect :clear-at="clearAt"
|
<ClearAtSelect :clear-at="clearAt"
|
||||||
|
|
@ -74,12 +75,12 @@
|
||||||
import { showError } from '@nextcloud/dialogs'
|
import { showError } from '@nextcloud/dialogs'
|
||||||
import NcModal from '@nextcloud/vue/dist/Components/NcModal'
|
import NcModal from '@nextcloud/vue/dist/Components/NcModal'
|
||||||
import NcButton from '@nextcloud/vue/dist/Components/NcButton'
|
import NcButton from '@nextcloud/vue/dist/Components/NcButton'
|
||||||
import { getAllStatusOptions } from '../services/statusOptionsService'
|
import { getAllStatusOptions } from '../services/statusOptionsService.js'
|
||||||
import OnlineStatusMixin from '../mixins/OnlineStatusMixin'
|
import OnlineStatusMixin from '../mixins/OnlineStatusMixin.js'
|
||||||
import PredefinedStatusesList from './PredefinedStatusesList'
|
import PredefinedStatusesList from './PredefinedStatusesList.vue'
|
||||||
import CustomMessageInput from './CustomMessageInput'
|
import CustomMessageInput from './CustomMessageInput.vue'
|
||||||
import ClearAtSelect from './ClearAtSelect'
|
import ClearAtSelect from './ClearAtSelect.vue'
|
||||||
import OnlineStatusSelect from './OnlineStatusSelect'
|
import OnlineStatusSelect from './OnlineStatusSelect.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SetStatusModal',
|
name: 'SetStatusModal',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue