refactor(client): refactoring

This commit is contained in:
syuilo 2022-07-02 14:00:37 +09:00
parent 52a1ec9af1
commit ded0f6f0df
90 changed files with 27 additions and 114 deletions

View File

@ -139,5 +139,6 @@ defineExpose({
<style lang="scss" scoped>
.yrolvcoq {
min-height: 100%;
background: var(--bg);
}
</style>

View File

@ -204,7 +204,6 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.aboutMisskey,
icon: null,
bg: 'var(--bg)',
});
</script>

View File

@ -131,7 +131,6 @@ const headerTabs = $computed(() => [{
definePageMetadata(computed(() => ({
title: i18n.ts.instanceInfo,
icon: 'fas fa-info-circle',
bg: 'var(--bg)',
})));
</script>

View File

@ -117,7 +117,6 @@ const headerTabs = $computed(() => [{
definePageMetadata(computed(() => ({
title: file ? i18n.ts.file + ': ' + file.name : i18n.ts.file,
icon: 'fas fa-file',
bg: 'var(--bg)',
})));
</script>

View File

@ -87,7 +87,6 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.abuseReports,
icon: 'fas fa-exclamation-circle',
bg: 'var(--bg)',
});
</script>

View File

@ -116,7 +116,6 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.ads,
icon: 'fas fa-audio-description',
bg: 'var(--bg)',
});
</script>

View File

@ -102,7 +102,6 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.announcements,
icon: 'fas fa-broadcast-tower',
bg: 'var(--bg)',
});
</script>

View File

@ -29,6 +29,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.database,
icon: 'fas fa-database',
bg: 'var(--bg)',
});
</script>

View File

@ -122,6 +122,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.emailServer,
icon: 'fas fa-envelope',
bg: 'var(--bg)',
});
</script>

View File

@ -292,7 +292,6 @@ const headerTabs = $computed(() => [{
definePageMetadata(computed(() => ({
title: i18n.ts.customEmojis,
icon: 'fas fa-laugh',
bg: 'var(--bg)',
})));
</script>

View File

@ -110,7 +110,6 @@ const headerTabs = $computed(() => []);
definePageMetadata(computed(() => ({
title: i18n.ts.files,
icon: 'fas fa-cloud',
bg: 'var(--bg)',
})));
</script>

View File

@ -41,7 +41,6 @@ const router = useRouter();
const indexInfo = {
title: i18n.ts.controlPanel,
icon: 'fas fa-cog',
bg: 'var(--bg)',
hideHeader: true,
};

View File

@ -47,6 +47,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.instanceBlocking,
icon: 'fas fa-ban',
bg: 'var(--bg)',
});
</script>

View File

@ -53,6 +53,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.integration,
icon: 'fas fa-share-alt',
bg: 'var(--bg)',
});
</script>

View File

@ -144,6 +144,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.objectStorage,
icon: 'fas fa-cloud',
bg: 'var(--bg)',
});
</script>

View File

@ -40,6 +40,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.other,
icon: 'fas fa-cogs',
bg: 'var(--bg)',
});
</script>

View File

@ -468,7 +468,6 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.dashboard,
icon: 'fas fa-tachometer-alt',
bg: 'var(--bg)',
});
</script>

View File

@ -58,6 +58,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.proxyAccount,
icon: 'fas fa-ghost',
bg: 'var(--bg)',
});
</script>

View File

@ -52,6 +52,5 @@ const headerTabs = $computed(() => [{
definePageMetadata({
title: i18n.ts.jobQueue,
icon: 'fas fa-clipboard-list',
bg: 'var(--bg)',
});
</script>

View File

@ -78,7 +78,6 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.relays,
icon: 'fas fa-globe',
bg: 'var(--bg)',
});
</script>

View File

@ -74,6 +74,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.security,
icon: 'fas fa-lock',
bg: 'var(--bg)',
});
</script>

View File

@ -258,6 +258,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.general,
icon: 'fas fa-cog',
bg: 'var(--bg)',
});
</script>

View File

@ -135,7 +135,6 @@ const headerTabs = $computed(() => []);
definePageMetadata(computed(() => ({
title: i18n.ts.users,
icon: 'fas fa-users',
bg: 'var(--bg)',
})));
</script>

View File

@ -47,7 +47,6 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.announcements,
icon: 'fas fa-broadcast-tower',
bg: 'var(--bg)',
});
</script>

View File

@ -1,4 +1,6 @@
<template>
<MkStickyContainer>
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
<div ref="rootEl" v-hotkey.global="keymap" v-size="{ min: [800] }" class="tqmomfks">
<div v-if="queue > 0" class="new"><button class="_buttonPrimary" @click="top()">{{ $ts.newNoteRecived }}</button></div>
<div class="tl _block">
@ -12,6 +14,7 @@
/>
</div>
</div>
</MkStickyContainer>
</template>
<script lang="ts" setup>
@ -68,15 +71,7 @@ watch(() => props.antennaId, async () => {
});
}, { immediate: true });
const headerActions = $computed(() => []);
const headerTabs = $computed(() => []);
definePageMetadata(computed(() => antenna ? {
title: antenna.name,
icon: 'fas fa-satellite',
bg: 'var(--bg)',
actions: [{
const headerActions = $computed(() => antenna ? [{
icon: 'fas fa-calendar-alt',
text: i18n.ts.jumpToSpecifiedDate,
handler: timetravel,
@ -84,7 +79,13 @@ definePageMetadata(computed(() => antenna ? {
icon: 'fas fa-cog',
text: i18n.ts.settings,
handler: settings,
}],
}] : []);
const headerTabs = $computed(() => []);
definePageMetadata(computed(() => antenna ? {
title: antenna.name,
icon: 'fas fa-satellite',
} : null));
</script>

View File

@ -111,11 +111,9 @@ const headerTabs = $computed(() => []);
definePageMetadata(computed(() => props.channelId ? {
title: i18n.ts._channel.edit,
icon: 'fas fa-satellite-dish',
bg: 'var(--bg)',
} : {
title: i18n.ts._channel.create,
icon: 'fas fa-satellite-dish',
bg: 'var(--bg)',
}));
</script>

View File

@ -80,7 +80,6 @@ const headerTabs = $computed(() => []);
definePageMetadata(computed(() => channel ? {
title: channel.name,
icon: 'fas fa-satellite-dish',
bg: 'var(--bg)',
} : null));
</script>

View File

@ -75,6 +75,5 @@ const headerTabs = $computed(() => [{
definePageMetadata(computed(() => ({
title: i18n.ts.channel,
icon: 'fas fa-satellite-dish',
bg: 'var(--bg)',
})));
</script>

View File

@ -102,7 +102,6 @@ const headerActions = $computed(() => clip && isOwned ? [{
definePageMetadata(computed(() => clip ? {
title: clip.name,
icon: 'fas fa-paperclip',
bg: 'var(--bg)',
} : null));
</script>

View File

@ -20,7 +20,6 @@ const headerTabs = $computed(() => []);
definePageMetadata(computed(() => ({
title: folder ? folder.name : i18n.ts.drive,
icon: 'fas fa-cloud',
bg: 'var(--bg)',
hideHeader: true,
})));
</script>

View File

@ -87,6 +87,5 @@ const headerTabs = $computed(() => [{
definePageMetadata(computed(() => ({
title: i18n.ts.explore,
icon: 'fas fa-hashtag',
bg: 'var(--bg)',
})));
</script>

View File

@ -38,7 +38,6 @@ const pagingComponent = ref<InstanceType<typeof MkPagination>>();
definePageMetadata({
title: i18n.ts.favorites,
icon: 'fas fa-star',
bg: 'var(--bg)',
});
</script>

View File

@ -65,7 +65,6 @@ const headerTabs = $computed(() => []);
definePageMetadata(computed(() => ({
title: i18n.ts.followRequests,
icon: 'fas fa-user-clock',
bg: 'var(--bg)',
})));
</script>

View File

@ -116,11 +116,9 @@ const headerTabs = $computed(() => []);
definePageMetadata(computed(() => props.postId ? {
title: i18n.ts.edit,
icon: 'fas fa-pencil-alt',
bg: 'var(--bg)',
} : {
title: i18n.ts.postToGallery,
icon: 'fas fa-pencil-alt',
bg: 'var(--bg)',
}));
</script>

View File

@ -122,7 +122,6 @@ const headerTabs = $computed(() => [{
definePageMetadata({
title: i18n.ts.gallery,
icon: 'fas fa-icons',
bg: 'var(--bg)',
});
</script>

View File

@ -149,7 +149,6 @@ const headerTabs = $computed(() => []);
definePageMetadata(computed(() => post ? {
title: post.title,
avatar: post.user,
bg: 'var(--bg)',
} : null));
</script>

View File

@ -215,7 +215,6 @@ const headerTabs = $computed(() => [{
definePageMetadata({
title: props.host,
icon: 'fas fa-server',
bg: 'var(--bg)',
});
</script>

View File

@ -159,7 +159,6 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.messaging,
icon: 'fas fa-comments',
bg: 'var(--bg)',
});
</script>

View File

@ -38,7 +38,6 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.manageAntennas,
icon: 'fas fa-satellite',
bg: 'var(--bg)',
});
</script>

View File

@ -34,7 +34,6 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.manageAntennas,
icon: 'fas fa-satellite',
bg: 'var(--bg)',
});
</script>

View File

@ -69,7 +69,6 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.clip,
icon: 'fas fa-paperclip',
bg: 'var(--bg)',
action: {
icon: 'fas fa-plus',
handler: create,

View File

@ -46,7 +46,6 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.manageLists,
icon: 'fas fa-list-ul',
bg: 'var(--bg)',
action: {
icon: 'fas fa-plus',
handler: create,

View File

@ -120,7 +120,6 @@ const headerTabs = $computed(() => []);
definePageMetadata(computed(() => list ? {
title: list.name,
icon: 'fas fa-list-ul',
bg: 'var(--bg)',
} : null));
</script>

View File

@ -18,6 +18,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.notFound,
icon: 'fas fa-exclamation-triangle',
bg: 'var(--bg)',
});
</script>

View File

@ -132,7 +132,6 @@ definePageMetadata(computed(() => note ? {
title: i18n.t('noteOf', { user: note.user.name }),
text: note.text,
},
bg: 'var(--bg)',
} : null));
</script>

View File

@ -91,6 +91,5 @@ const headerTabs = $computed(() => [{
definePageMetadata(computed(() => ({
title: i18n.ts.notifications,
icon: 'fas fa-bell',
bg: 'var(--bg)',
})));
</script>

View File

@ -439,7 +439,6 @@ definePageMetadata(computed(() => {
return {
title: title,
icon: 'fas fa-pencil-alt',
bg: 'var(--bg)',
};
}));
</script>

View File

@ -77,7 +77,6 @@ const headerTabs = $computed(() => [{
definePageMetadata(computed(() => ({
title: i18n.ts.pages,
icon: 'fas fa-sticky-note',
bg: 'var(--bg)',
})));
</script>

View File

@ -17,7 +17,6 @@ const headerTabs = $computed(() => []);
definePageMetadata(computed(() => ({
title: i18n.ts.preview,
icon: 'fas fa-eye',
bg: 'var(--bg)',
})));
</script>

View File

@ -51,7 +51,6 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.resetPassword,
icon: 'fas fa-lock',
bg: 'var(--bg)',
});
</script>

View File

@ -34,6 +34,5 @@ const headerTabs = $computed(() => []);
definePageMetadata(computed(() => ({
title: i18n.t('searchWith', { q: props.query }),
icon: 'fas fa-search',
bg: 'var(--bg)',
})));
</script>

View File

@ -109,7 +109,6 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.accounts,
icon: 'fas fa-users',
bg: 'var(--bg)',
});
</script>

View File

@ -42,6 +42,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: 'API',
icon: 'fas fa-key',
bg: 'var(--bg)',
});
</script>

View File

@ -67,7 +67,6 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.installedApps,
icon: 'fas fa-plug',
bg: 'var(--bg)',
});
</script>

View File

@ -42,6 +42,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.customCss,
icon: 'fas fa-code',
bg: 'var(--bg)',
});
</script>

View File

@ -73,6 +73,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.deck,
icon: 'fas fa-columns',
bg: 'var(--bg)',
});
</script>

View File

@ -48,6 +48,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts._accountDelete.accountDelete,
icon: 'fas fa-exclamation-triangle',
bg: 'var(--bg)',
});
</script>

View File

@ -101,7 +101,6 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.drive,
icon: 'fas fa-cloud',
bg: 'var(--bg)',
});
</script>

View File

@ -107,6 +107,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.email,
icon: 'fas fa-envelope',
bg: 'var(--bg)',
});
</script>

View File

@ -186,6 +186,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.general,
icon: 'fas fa-cogs',
bg: 'var(--bg)',
});
</script>

View File

@ -155,7 +155,6 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.importAndExport,
icon: 'fas fa-boxes',
bg: 'var(--bg)',
});
</script>

View File

@ -42,7 +42,6 @@ const props = withDefaults(defineProps<{
const indexInfo = {
title: i18n.ts.settings,
icon: 'fas fa-cog',
bg: 'var(--bg)',
hideHeader: true,
};
const INFO = ref(indexInfo);

View File

@ -95,6 +95,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.integration,
icon: 'fas fa-share-alt',
bg: 'var(--bg)',
});
</script>

View File

@ -83,6 +83,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.menu,
icon: 'fas fa-list-ul',
bg: 'var(--bg)',
});
</script>

View File

@ -57,6 +57,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.muteAndBlock,
icon: 'fas fa-ban',
bg: 'var(--bg)',
});
</script>

View File

@ -56,6 +56,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.notifications,
icon: 'fas fa-bell',
bg: 'var(--bg)',
});
</script>

View File

@ -41,6 +41,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.other,
icon: 'fas fa-ellipsis-h',
bg: 'var(--bg)',
});
</script>

View File

@ -120,6 +120,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts._plugin.install,
icon: 'fas fa-download',
bg: 'var(--bg)',
});
</script>

View File

@ -90,7 +90,6 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.plugins,
icon: 'fas fa-plug',
bg: 'var(--bg)',
});
</script>

View File

@ -96,6 +96,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.privacy,
icon: 'fas fa-lock-open',
bg: 'var(--bg)',
});
</script>

View File

@ -183,7 +183,6 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.profile,
icon: 'fas fa-user',
bg: 'var(--bg)',
});
</script>

View File

@ -131,7 +131,6 @@ definePageMetadata({
icon: 'fas fa-eye',
handler: preview,
},
bg: 'var(--bg)',
});
</script>

View File

@ -104,7 +104,6 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.security,
icon: 'fas fa-lock',
bg: 'var(--bg)',
});
</script>

View File

@ -131,6 +131,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.sounds,
icon: 'fas fa-music',
bg: 'var(--bg)',
});
</script>

View File

@ -76,6 +76,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts._theme.install,
icon: 'fas fa-download',
bg: 'var(--bg)',
});
</script>

View File

@ -74,6 +74,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts._theme.manage,
icon: 'fas fa-folder-open',
bg: 'var(--bg)',
});
</script>

View File

@ -152,7 +152,6 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.theme,
icon: 'fas fa-palette',
bg: 'var(--bg)',
});
</script>

View File

@ -86,6 +86,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: 'Edit webhook',
icon: 'fas fa-bolt',
bg: 'var(--bg)',
});
</script>

View File

@ -78,6 +78,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: 'Create new webhook',
icon: 'fas fa-bolt',
bg: 'var(--bg)',
});
</script>

View File

@ -49,6 +49,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: 'Webhook',
icon: 'fas fa-bolt',
bg: 'var(--bg)',
});
</script>

View File

@ -124,6 +124,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.wordMute,
icon: 'fas fa-comment-slash',
bg: 'var(--bg)',
});
</script>

View File

@ -28,6 +28,5 @@ const headerTabs = $computed(() => []);
definePageMetadata(computed(() => ({
title: props.tag,
icon: 'fas fa-hashtag',
bg: 'var(--bg)',
})));
</script>

View File

@ -224,7 +224,6 @@ const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.themeEditor,
icon: 'fas fa-palette',
bg: 'var(--bg)',
});
</script>

View File

@ -151,7 +151,6 @@ const headerTabs = $computed(() => [{
definePageMetadata(computed(() => ({
title: i18n.ts.timeline,
icon: src === 'local' ? 'fas fa-comments' : src === 'social' ? 'fas fa-share-alt' : src === 'global' ? 'fas fa-globe' : 'fas fa-home',
bg: 'var(--bg)',
})));
</script>

View File

@ -309,7 +309,6 @@ const headerTabs = $computed(() => [{
definePageMetadata(computed(() => ({
title: user ? acct(user) : i18n.ts.userInfo,
icon: 'fas fa-info-circle',
bg: 'var(--bg)',
})));
</script>

View File

@ -79,7 +79,6 @@ const headerTabs = $computed(() => []);
definePageMetadata(computed(() => list ? {
title: list.name,
icon: 'fas fa-list-ul',
bg: 'var(--bg)',
} : null));
</script>

View File

@ -54,7 +54,6 @@ definePageMetadata(computed(() => user ? {
subtitle: i18n.ts.followers,
userName: user,
avatar: user,
bg: 'var(--bg)',
} : null));
</script>

View File

@ -54,7 +54,6 @@ definePageMetadata(computed(() => user ? {
subtitle: i18n.ts.following,
userName: user,
avatar: user,
bg: 'var(--bg)',
} : null));
</script>

View File

@ -103,7 +103,6 @@ definePageMetadata(computed(() => user ? {
share: {
title: user.name,
},
bg: 'var(--bg)',
} : null));
</script>

View File

@ -234,7 +234,7 @@ const wallpaper = localStorage.getItem('wallpaper') != null;
> .contents {
width: 100%;
min-width: 0;
background: var(--panel);
background: var(--bg);
> main {
min-width: 0;