Disable input in upgraded rooms
Also, fix some console warnings for missing emits.
This commit is contained in:
parent
615aa2b781
commit
f804e0377b
4 changed files with 11 additions and 4 deletions
|
|
@ -126,7 +126,7 @@
|
||||||
</v-btn>
|
</v-btn>
|
||||||
|
|
||||||
<!-- Input area -->
|
<!-- Input area -->
|
||||||
<v-container v-if="!useVoiceMode && !useFileModeNonAdmin && room" fluid :class="['input-area-outer', replyToEvent ? 'reply-to' : '']">
|
<v-container v-if="!useVoiceMode && !useFileModeNonAdmin && room && room.currentState.getStateEvents('m.room.tombstone').length == 0" fluid :class="['input-area-outer', replyToEvent ? 'reply-to' : '']">
|
||||||
<div :class="[replyToEvent ? 'iput-area-inner-box' : '']">
|
<div :class="[replyToEvent ? 'iput-area-inner-box' : '']">
|
||||||
<v-row class="ma-0 pa-0">
|
<v-row class="ma-0 pa-0">
|
||||||
<div v-if="replyToEvent" class="row">
|
<div v-if="replyToEvent" class="row">
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { inject, ref, Ref, watch } from "vue";
|
import { inject, ref, Ref, watch } from "vue";
|
||||||
import { MessageProps, useMessage } from "./useMessage";
|
import { MessageEmits, MessageProps, useMessage } from "./useMessage";
|
||||||
import utils from "@/plugins/utils";
|
import utils from "@/plugins/utils";
|
||||||
import { Room } from "matrix-js-sdk";
|
import { Room } from "matrix-js-sdk";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
|
|
@ -23,8 +23,9 @@ const $matrix: any = inject("globalMatrix");
|
||||||
const $navigation: any = inject("globalNavigation");
|
const $navigation: any = inject("globalNavigation");
|
||||||
|
|
||||||
const props = defineProps<MessageProps>();
|
const props = defineProps<MessageProps>();
|
||||||
|
const emits = defineEmits<MessageEmits>();
|
||||||
|
|
||||||
const predecessorRoom: Ref<Room | undefined> = ref(undefined);
|
const predecessorRoom: Ref<Room | undefined> = ref(undefined);
|
||||||
|
|
||||||
const { event, eventSenderDisplayName } = useMessage(
|
const { event, eventSenderDisplayName } = useMessage(
|
||||||
$matrix,
|
$matrix,
|
||||||
|
|
|
||||||
|
|
@ -10,12 +10,13 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { inject } from "vue";
|
import { inject } from "vue";
|
||||||
import { MessageProps } from "./useMessage";
|
import { MessageEmits, MessageProps } from "./useMessage";
|
||||||
import utils from "@/plugins/utils";
|
import utils from "@/plugins/utils";
|
||||||
|
|
||||||
const $navigation: any = inject("globalNavigation");
|
const $navigation: any = inject("globalNavigation");
|
||||||
|
|
||||||
const props = defineProps<MessageProps>();
|
const props = defineProps<MessageProps>();
|
||||||
|
const emits = defineEmits<MessageEmits>();
|
||||||
|
|
||||||
const goToSuccessor = (e: Event) => {
|
const goToSuccessor = (e: Event) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,11 @@ export type MessageEmits = {
|
||||||
(event: "other-avatar-clicked", value: { event: KeanuEvent; anchor: any }): void;
|
(event: "other-avatar-clicked", value: { event: KeanuEvent; anchor: any }): void;
|
||||||
(event: "contextMenu", value: { event: KeanuEvent; anchor: any }): void;
|
(event: "contextMenu", value: { event: KeanuEvent; anchor: any }): void;
|
||||||
(event: "addQuickHeartReaction", value: { position: { top: string; left: string } }): void;
|
(event: "addQuickHeartReaction", value: { position: { top: string; left: string } }): void;
|
||||||
|
(event: "send-quick-reaction", value: {reaction: string, event: KeanuEvent }): void;
|
||||||
|
(event: "download", value: { event: KeanuEvent }): void;
|
||||||
|
(event: "poll-closed", value: any): void;
|
||||||
|
(event: "more", value: { event: KeanuEvent }): void;
|
||||||
|
(event: "layout-change", value: { element: Element | undefined; action: () => void }): void;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const useMessage = (
|
export const useMessage = (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue