Merge pull request #3889 from timmw/timmw/vue3-prep
Changes required for vue 3
This commit is contained in:
commit
512fc5ca04
@ -57,7 +57,6 @@ rules:
|
|||||||
yoda: error
|
yoda: error
|
||||||
vue/require-default-prop: off
|
vue/require-default-prop: off
|
||||||
vue/no-v-html: off
|
vue/no-v-html: off
|
||||||
vue/no-use-v-if-with-v-for: off
|
|
||||||
|
|
||||||
plugins:
|
plugins:
|
||||||
- vue
|
- vue
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
<div class="chat">
|
<div class="chat">
|
||||||
<div class="messages">
|
<div class="messages">
|
||||||
<div class="msg">
|
<div class="msg">
|
||||||
<Component
|
<component
|
||||||
:is="specialComponent"
|
:is="specialComponent"
|
||||||
:network="network"
|
:network="network"
|
||||||
:channel="channel"
|
:channel="channel"
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else-if="isAction()">
|
<template v-else-if="isAction()">
|
||||||
<span class="from"><span class="only-copy">*** </span></span>
|
<span class="from"><span class="only-copy">*** </span></span>
|
||||||
<Component :is="messageComponent" :network="network" :message="message" />
|
<component :is="messageComponent" :network="network" :message="message" />
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="message.type === 'action'">
|
<template v-else-if="message.type === 'action'">
|
||||||
<span class="from"><span class="only-copy">* </span></span>
|
<span class="from"><span class="only-copy">* </span></span>
|
||||||
|
@ -63,6 +63,8 @@ import Message from "./Message.vue";
|
|||||||
import MessageCondensed from "./MessageCondensed.vue";
|
import MessageCondensed from "./MessageCondensed.vue";
|
||||||
import DateMarker from "./DateMarker.vue";
|
import DateMarker from "./DateMarker.vue";
|
||||||
|
|
||||||
|
let unreadMarkerShown = false;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MessageList",
|
name: "MessageList",
|
||||||
components: {
|
components: {
|
||||||
@ -183,7 +185,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeUpdate() {
|
beforeUpdate() {
|
||||||
this.unreadMarkerShown = false;
|
unreadMarkerShown = false;
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
eventbus.off("resize", this.handleResize);
|
eventbus.off("resize", this.handleResize);
|
||||||
@ -205,8 +207,8 @@ export default {
|
|||||||
return new Date(previousMessage.time).getDay() !== new Date(message.time).getDay();
|
return new Date(previousMessage.time).getDay() !== new Date(message.time).getDay();
|
||||||
},
|
},
|
||||||
shouldDisplayUnreadMarker(id) {
|
shouldDisplayUnreadMarker(id) {
|
||||||
if (!this.unreadMarkerShown && id > this.channel.firstUnread) {
|
if (!unreadMarkerShown && id > this.channel.firstUnread) {
|
||||||
this.unreadMarkerShown = true;
|
unreadMarkerShown = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,8 +106,8 @@
|
|||||||
@start="onDragStart"
|
@start="onDragStart"
|
||||||
@end="onDragEnd"
|
@end="onDragEnd"
|
||||||
>
|
>
|
||||||
|
<template v-for="(channel, index) in network.channels">
|
||||||
<Channel
|
<Channel
|
||||||
v-for="(channel, index) in network.channels"
|
|
||||||
v-if="index > 0"
|
v-if="index > 0"
|
||||||
:key="channel.id"
|
:key="channel.id"
|
||||||
:channel="channel"
|
:channel="channel"
|
||||||
@ -117,6 +117,7 @@
|
|||||||
channel === $store.state.activeChannel.channel
|
channel === $store.state.activeChannel.channel
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
|
</template>
|
||||||
</Draggable>
|
</Draggable>
|
||||||
</div>
|
</div>
|
||||||
</Draggable>
|
</Draggable>
|
||||||
|
Loading…
Reference in New Issue
Block a user