mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-10-27 11:34:13 +00:00
* fix(misskey-js): チャットのChannel型定義を追加 * fix(backend); canChatで塞いでいない書き込み系のAPIを塞ぐ * fix(frontend): チャット周りのフロントエンド型修正 * lint fix * fix broken lockfile * fix * refactor * wip * wip * wip * clean up --------- Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
45 lines
1,022 B
Vue
45 lines
1,022 B
Vue
<!--
|
|
SPDX-FileCopyrightText: syuilo and misskey-project
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
-->
|
|
|
|
<template>
|
|
<div class="_gaps">
|
|
<div v-if="memberships.length > 0" class="_gaps_s">
|
|
<XRoom v-for="membership in memberships" :key="membership.id" :room="membership.room!"/>
|
|
</div>
|
|
<div v-if="!fetching && memberships.length == 0" class="_fullinfo">
|
|
<div>{{ i18n.ts._chat.noRooms }}</div>
|
|
</div>
|
|
<MkLoading v-if="fetching"/>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { onMounted, ref } from 'vue';
|
|
import * as Misskey from 'misskey-js';
|
|
import XRoom from './XRoom.vue';
|
|
import { i18n } from '@/i18n.js';
|
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
|
|
|
const fetching = ref(true);
|
|
const memberships = ref<Misskey.entities.ChatRoomMembership[]>([]);
|
|
|
|
async function fetchRooms() {
|
|
fetching.value = true;
|
|
|
|
const res = await misskeyApi('chat/rooms/joining');
|
|
|
|
memberships.value = res;
|
|
|
|
fetching.value = false;
|
|
}
|
|
|
|
onMounted(() => {
|
|
fetchRooms();
|
|
});
|
|
</script>
|
|
|
|
<style lang="scss" module>
|
|
|
|
</style>
|