mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-23 22:44:11 +02:00
refactor
This commit is contained in:
@@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div :class="$style.root">
|
||||
<div v-if="$i" :class="$style.root">
|
||||
<MkA
|
||||
v-for="announcement in $i.unreadAnnouncements.filter(x => x.display === 'banner')"
|
||||
:key="announcement.id"
|
||||
|
||||
@@ -12,7 +12,7 @@ import { i18n } from '@/i18n.js';
|
||||
import { $i } from '@/i.js';
|
||||
|
||||
function toolsMenuItems(): MenuItem[] {
|
||||
return [{
|
||||
const items: MenuItem[] = [{
|
||||
type: 'link',
|
||||
to: '/scratchpad',
|
||||
text: i18n.ts.scratchpad,
|
||||
@@ -27,17 +27,27 @@ function toolsMenuItems(): MenuItem[] {
|
||||
to: '/clicker',
|
||||
text: '🍪👈',
|
||||
icon: 'ti ti-cookie',
|
||||
}, ($i && ($i.isAdmin || $i.policies.canManageCustomEmojis)) ? {
|
||||
type: 'link',
|
||||
to: '/custom-emojis-manager',
|
||||
text: i18n.ts.manageCustomEmojis,
|
||||
icon: 'ti ti-icons',
|
||||
} : undefined, ($i && ($i.isAdmin || $i.policies.canManageAvatarDecorations)) ? {
|
||||
type: 'link',
|
||||
to: '/avatar-decorations',
|
||||
text: i18n.ts.manageAvatarDecorations,
|
||||
icon: 'ti ti-sparkles',
|
||||
} : undefined];
|
||||
}];
|
||||
|
||||
if ($i && ($i.isAdmin || $i.policies.canManageCustomEmojis)) {
|
||||
items.push({
|
||||
type: 'link',
|
||||
to: '/custom-emojis-manager',
|
||||
text: i18n.ts.manageCustomEmojis,
|
||||
icon: 'ti ti-icons',
|
||||
});
|
||||
}
|
||||
|
||||
if ($i && ($i.isAdmin || $i.policies.canManageAvatarDecorations)) {
|
||||
items.push({
|
||||
type: 'link' as const,
|
||||
to: '/avatar-decorations',
|
||||
text: i18n.ts.manageAvatarDecorations,
|
||||
icon: 'ti ti-sparkles',
|
||||
});
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
export function openInstanceMenu(ev: MouseEvent) {
|
||||
|
||||
@@ -29,18 +29,18 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkMarqueeText from '@/components/MkMarqueeText.vue';
|
||||
import { useInterval } from '@@/js/use-interval.js';
|
||||
import MkMarqueeText from '@/components/MkMarqueeText.vue';
|
||||
import { shuffle } from '@/utility/shuffle.js';
|
||||
|
||||
const props = defineProps<{
|
||||
url?: string;
|
||||
url: string;
|
||||
shuffle?: boolean;
|
||||
display?: 'marquee' | 'oneByOne';
|
||||
marqueeDuration?: number;
|
||||
marqueeReverse?: boolean;
|
||||
oneByOneInterval?: number;
|
||||
refreshIntervalSec?: number;
|
||||
refreshIntervalSec: number;
|
||||
}>();
|
||||
|
||||
const items = ref<Misskey.entities.FetchRssResponse['items']>([]);
|
||||
|
||||
Reference in New Issue
Block a user