Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable25] Fix user status emoji picking #34320

Merged
merged 2 commits into from
Sep 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions apps/user_status/src/components/CustomMessageInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand All @@ -78,6 +86,7 @@ export default {
return this.icon || '😀'
},
},

methods: {
focus() {
this.$refs.input.focus()
Expand All @@ -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)
},
},
}
Expand Down
15 changes: 8 additions & 7 deletions apps/user_status/src/components/SetStatusModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions dist/user-status-modal-8299.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/user-status-modal-8299.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/user_status-menu.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/user_status-menu.js.map

Large diffs are not rendered by default.