✨ Channel manage
This commit is contained in:
@@ -4,8 +4,13 @@
|
||||
<v-app-bar-nav-icon icon="mdi-chat" :loading="loading" />
|
||||
|
||||
<h2 class="ml-2 text-lg font-500">{{ channels.current?.name }}</h2>
|
||||
|
||||
<p class="ml-3 text-xs opacity-80">{{ channels.current?.description }}</p>
|
||||
|
||||
<v-spacer />
|
||||
|
||||
<div v-if="channels.current">
|
||||
<channel-action :item="channels.current" />
|
||||
</div>
|
||||
</div>
|
||||
</v-app-bar>
|
||||
|
||||
@@ -20,6 +25,7 @@ import { request } from "@/scripts/request"
|
||||
import { useRoute } from "vue-router"
|
||||
import { ref, watch } from "vue"
|
||||
import { useChannels } from "@/stores/channels"
|
||||
import ChannelAction from "@/components/chat/channels/ChannelAction.vue"
|
||||
|
||||
const route = useRoute()
|
||||
const channels = useChannels()
|
||||
@@ -47,4 +53,13 @@ watch(
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
watch(() => channels.done, (val) => {
|
||||
if (val) {
|
||||
readMetadata().then(() => {
|
||||
channels.messages = []
|
||||
channels.done = false
|
||||
})
|
||||
}
|
||||
}, { immediate: true })
|
||||
</script>
|
Reference in New Issue
Block a user