fix lint
This commit is contained in:
parent
20e4c6b01e
commit
86ac1f6492
|
@ -37,7 +37,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<span :class="$style.itemDescription">{{ i18n.ts._visibility.specifiedDescription }}</span>
|
||||
</div>
|
||||
</button>
|
||||
<button v-for="channel in channels" :class="$style.item" class="_button" @click="chooseChannel(channel)" >
|
||||
<button v-for="channel in channels" :class="$style.item" class="_button" @click="chooseChannel(channel)">
|
||||
<div :class="$style.body" :style="{borderLeft: `solid 2px ${channel.color}`}">
|
||||
<span :class="$style.itemTitle">{{ channel.name }}</span>
|
||||
</div>
|
||||
|
@ -51,7 +51,7 @@ import { nextTick, shallowRef, ref } from 'vue';
|
|||
import * as Misskey from 'misskey-js';
|
||||
import MkModal from '@/components/MkModal.vue';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import * as os from "@/os.js";
|
||||
import * as os from '@/os.js';
|
||||
|
||||
const modal = shallowRef<InstanceType<typeof MkModal>>();
|
||||
|
||||
|
@ -82,16 +82,18 @@ const v = ref(props.currentVisibility);
|
|||
|
||||
*/
|
||||
const channels = ref([]);
|
||||
async function getChannel(){
|
||||
|
||||
async function getChannel() {
|
||||
const res = await os.api('channels/my-favorites', {
|
||||
limit: 100,
|
||||
});
|
||||
channels.value.splice(0, 0, ...res);
|
||||
}
|
||||
|
||||
getChannel();
|
||||
|
||||
async function chooseChannel(channel: string ){
|
||||
emit("changeChannel", channel);
|
||||
async function chooseChannel(channel: string ) {
|
||||
emit('changeChannel', channel);
|
||||
await nextTick();
|
||||
if (modal.value) modal.value.close();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue