forked from mirrors/misskey
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']>([]);
|
||||
|
||||
@@ -10,7 +10,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<div :class="$style.nonTitlebarArea">
|
||||
<XSidebar v-if="!isMobile && prefer.r['deck.navbarPosition'].value === 'left'"/>
|
||||
|
||||
<div :class="[$style.main, { [$style.withWallpaper]: withWallpaper, [$style.withSidebarAndTitlebar]: !isMobile && prefer.r['deck.navbarPosition'].value === 'left' && prefer.r.showTitlebar.value }]" :style="{ backgroundImage: prefer.s['deck.wallpaper'] != null ? `url(${ prefer.s['deck.wallpaper'] })` : null }">
|
||||
<div :class="[$style.main, { [$style.withWallpaper]: withWallpaper, [$style.withSidebarAndTitlebar]: !isMobile && prefer.r['deck.navbarPosition'].value === 'left' && prefer.r.showTitlebar.value }]" :style="{ backgroundImage: prefer.s['deck.wallpaper'] != null ? `url(${ prefer.s['deck.wallpaper'] })` : '' }">
|
||||
<XNavbarH v-if="!isMobile && prefer.r['deck.navbarPosition'].value === 'top'"/>
|
||||
|
||||
<XReloadSuggestion v-if="shouldSuggestReload"/>
|
||||
|
||||
Reference in New Issue
Block a user