diff options
author | Dennis Tang <dtang@gitlab.com> | 2018-10-02 10:07:48 +0000 |
---|---|---|
committer | Dennis Tang <dtang@gitlab.com> | 2018-10-02 10:16:21 +0000 |
commit | e7e69a0e8ca5f5c17ffc05fbcb2654733685b246 (patch) | |
tree | 9c863f320df1c45b4da0600fdd57ea11461b86b2 | |
parent | ce0976b87cb57f38b57a7ff11ff7522922fd87f3 (diff) | |
download | gitlab-ce-e7e69a0e8ca5f5c17ffc05fbcb2654733685b246.tar.gz |
Show input clear button only if emoji or message is set
-rw-r--r-- | app/assets/javascripts/set_status_modal/set_status_modal_wrapper.vue | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/assets/javascripts/set_status_modal/set_status_modal_wrapper.vue b/app/assets/javascripts/set_status_modal/set_status_modal_wrapper.vue index 1ba21bdae83..2534c8432ba 100644 --- a/app/assets/javascripts/set_status_modal/set_status_modal_wrapper.vue +++ b/app/assets/javascripts/set_status_modal/set_status_modal_wrapper.vue @@ -36,6 +36,11 @@ export default { noEmoji: true, }; }, + computed: { + isDirty() { + return this.message.length || this.emoji.length; + }, + }, mounted() { eventHub.$on('openModal', this.openModal); }, @@ -213,7 +218,10 @@ export default { @keyup.enter.prevent @click="hideEmojiMenu" /> - <span class="input-group-btn"> + <span + v-show="isDirty" + class="input-group-btn" + > <button v-gl-tooltip.bottom :title="s__('SetStatusModal|Clear Status')" |