thelounge/client/components/MessageTypes/topic.vue

37 lines
869 B
Vue
Raw Normal View History

2018-07-10 11:10:37 +02:00
<template>
2018-07-09 12:44:12 +02:00
<span class="content">
2019-07-17 11:33:59 +02:00
<template v-if="message.from && message.from.nick"
><Username :user="message.from" /> has changed the topic to:
</template>
2019-11-09 09:55:50 +01:00
<template v-else>The topic is: </template>
2019-07-17 11:33:59 +02:00
<span v-if="message.text" class="new-topic"
><ParsedMessage :network="network" :message="message"
/></span>
2018-07-09 12:44:12 +02:00
</span>
</template>
<script lang="ts">
import {defineComponent, PropType} from "vue";
import type {ClientMessage, ClientNetwork} from "../../js/types";
2018-07-12 10:41:40 +02:00
import ParsedMessage from "../ParsedMessage.vue";
2018-07-09 12:44:12 +02:00
import Username from "../Username.vue";
export default defineComponent({
2018-07-09 12:44:12 +02:00
name: "MessageTypeTopic",
components: {
2018-07-12 10:41:40 +02:00
ParsedMessage,
2018-07-09 12:44:12 +02:00
Username,
},
props: {
network: {
type: Object as PropType<ClientNetwork>,
required: true,
},
message: {
type: Object as PropType<ClientMessage>,
required: true,
},
2018-07-09 12:44:12 +02:00
},
});
2018-07-09 12:44:12 +02:00
</script>