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>
|
<span :class="$style.itemDescription">{{ i18n.ts._visibility.specifiedDescription }}</span>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</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}`}">
|
<div :class="$style.body" :style="{borderLeft: `solid 2px ${channel.color}`}">
|
||||||
<span :class="$style.itemTitle">{{ channel.name }}</span>
|
<span :class="$style.itemTitle">{{ channel.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -51,7 +51,7 @@ import { nextTick, shallowRef, ref } from 'vue';
|
||||||
import * as Misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkModal from '@/components/MkModal.vue';
|
import MkModal from '@/components/MkModal.vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import * as os from "@/os.js";
|
import * as os from '@/os.js';
|
||||||
|
|
||||||
const modal = shallowRef<InstanceType<typeof MkModal>>();
|
const modal = shallowRef<InstanceType<typeof MkModal>>();
|
||||||
|
|
||||||
|
@ -82,16 +82,18 @@ const v = ref(props.currentVisibility);
|
||||||
|
|
||||||
*/
|
*/
|
||||||
const channels = ref([]);
|
const channels = ref([]);
|
||||||
async function getChannel(){
|
|
||||||
|
async function getChannel() {
|
||||||
const res = await os.api('channels/my-favorites', {
|
const res = await os.api('channels/my-favorites', {
|
||||||
limit: 100,
|
limit: 100,
|
||||||
});
|
});
|
||||||
channels.value.splice(0, 0, ...res);
|
channels.value.splice(0, 0, ...res);
|
||||||
}
|
}
|
||||||
|
|
||||||
getChannel();
|
getChannel();
|
||||||
|
|
||||||
async function chooseChannel(channel: string ){
|
async function chooseChannel(channel: string ) {
|
||||||
emit("changeChannel", channel);
|
emit('changeChannel', channel);
|
||||||
await nextTick();
|
await nextTick();
|
||||||
if (modal.value) modal.value.close();
|
if (modal.value) modal.value.close();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue