Skip to content

Commit

Permalink
fix(message): add coming soon to edit message button
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonwoodland committed Jun 9, 2022
1 parent 34fbef7 commit 84aeaa3
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 9 deletions.
4 changes: 2 additions & 2 deletions components/views/chat/message/actions/Actions.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
<archive-icon size="1x" :class="'control-icon'" />
</div>
<div
class="reply-command"
class="reply-command coming-soon"
v-tooltip.top="$t('controls.edit')"
v-if="isEditable"
@click="editMessage"
@click="toggleModal(ModalWindows.CALL_TO_ACTION)"
>
<edit-icon size="1x" :class="'control-icon'" />
</div>
Expand Down
8 changes: 8 additions & 0 deletions components/views/chat/message/actions/Actions.less
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@
justify-content: center;
cursor: pointer;

&.coming-soon,
&.coming-soon:hover {
cursor: not-allowed;
svg {
color: grey;
}
}

&:hover {
&:extend(.background-semitransparent-light);
.control-icon {
Expand Down
22 changes: 16 additions & 6 deletions components/views/chat/message/actions/Actions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
} from 'satellite-lucide-icons'
import { mapState } from 'vuex'
import { UIMessage } from '~/types/messaging'
import { ModalWindows } from '~/store/ui/types'
export default Vue.extend({
components: {
Expand All @@ -20,12 +21,6 @@ export default Vue.extend({
EditIcon,
MoreVerticalIcon,
},
data() {
return {
hasMoreSettings: false,
featureReadyToShow: false,
}
},
props: {
setReplyChatbarContent: {
type: Function,
Expand Down Expand Up @@ -55,6 +50,12 @@ export default Vue.extend({
}),
},
},
data() {
return {
hasMoreSettings: false,
featureReadyToShow: false,
}
},
computed: {
...mapState(['ui', 'accounts']),
isEditable(): boolean {
Expand All @@ -63,6 +64,15 @@ export default Vue.extend({
!(this.message.type === 'glyph' || this.message.type === 'file')
)
},
ModalWindows: () => ModalWindows,
},
methods: {
toggleModal(modalName: ModalWindows) {
this.$store.commit('ui/toggleModal', {
name: modalName,
state: !this.ui.modals[modalName],
})
},
},
})
</script>
Expand Down
2 changes: 1 addition & 1 deletion locales/en-US.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default {
turn_off_camera: 'Turn Off Camera',
turn_on_camera: 'Turn On Camera',
crop: 'Crop',
edit: 'Edit',
edit: 'Edit\nComing soon',
end_stream: 'End Stream',
not_connected: 'Offline calling unavailable',
not_available: 'Not available yet',
Expand Down

0 comments on commit 84aeaa3

Please sign in to comment.