Skip to content

Commit

Permalink
chore: add dummy event handlers for all actions in inbox-form
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriansaliou committed Oct 21, 2023
1 parent a92277e commit af39b48
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/assemblies/inbox/InboxForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ layout-toolbar(
class="a-inbox-form__action-popover a-inbox-form__action-popover--left"
)
inbox-form-formatting(
@action="onFormattingAction"
class="a-inbox-form__action-formatting"
)

Expand Down Expand Up @@ -85,6 +86,7 @@ layout-toolbar(
)
layout-actions
base-action(
@click="onActionAttachClick"
:disabled="isFormDisabled"
class="a-inbox-form__action"
icon="paperclip"
Expand Down Expand Up @@ -120,7 +122,10 @@ import { JID, Room, RoomType } from "@prose-im/prose-sdk-js";

// PROJECT: COMPONENTS
import FormField from "@/components/form/FormField.vue";
import InboxFormFormatting from "@/components/inbox/InboxFormFormatting.vue";
import {
default as InboxFormFormatting,
FormattingAction
} from "@/components/inbox/InboxFormFormatting.vue";
import InboxFormChatstate from "@/components/inbox/InboxFormChatstate.vue";

// PROJECT: STORES
Expand Down Expand Up @@ -230,6 +235,10 @@ export default {
this.isActionFormattingPopoverVisible = false;
},

onActionAttachClick(): void {
// TODO: open file picker
},

onActionEmojisClick(): void {
// Toggle popover
this.isActionEmojisPopoverVisible = !this.isActionEmojisPopoverVisible;
Expand All @@ -240,6 +249,10 @@ export default {
this.isActionEmojisPopoverVisible = false;
},

onFormattingAction(action: FormattingAction): void {
// TODO: apply formatting to text
},

onEmojiPick(glyph: string): void {
// Insert emoji glyph into message field
// Notice: prefix with a separator space if field is non-empty.
Expand Down

0 comments on commit af39b48

Please sign in to comment.