Merge remote-tracking branch 'misskey-dev/develop' into io
This commit is contained in:
@@ -3,25 +3,28 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { resolve } from 'node:path';
|
||||
import { createRequire } from 'node:module';
|
||||
import { dirname, join, resolve } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import type { StorybookConfig } from '@storybook/vue3-vite';
|
||||
import { type Plugin, mergeConfig } from 'vite';
|
||||
import turbosnap from 'vite-plugin-turbosnap';
|
||||
|
||||
const dirname = fileURLToPath(new URL('.', import.meta.url));
|
||||
const require = createRequire(import.meta.url);
|
||||
const _dirname = fileURLToPath(new URL('.', import.meta.url));
|
||||
|
||||
const config = {
|
||||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
|
||||
addons: [
|
||||
'@storybook/addon-essentials',
|
||||
'@storybook/addon-interactions',
|
||||
'@storybook/addon-links',
|
||||
'@storybook/addon-storysource',
|
||||
resolve(dirname, '../node_modules/storybook-addon-misskey-theme'),
|
||||
getAbsolutePath('@storybook/addon-essentials'),
|
||||
getAbsolutePath('@storybook/addon-interactions'),
|
||||
getAbsolutePath('@storybook/addon-links'),
|
||||
getAbsolutePath('@storybook/addon-storysource'),
|
||||
getAbsolutePath('@storybook/addon-mdx-gfm'),
|
||||
resolve(_dirname, '../node_modules/storybook-addon-misskey-theme'),
|
||||
],
|
||||
framework: {
|
||||
name: '@storybook/vue3-vite',
|
||||
name: getAbsolutePath('@storybook/vue3-vite') as '@storybook/vue3-vite',
|
||||
options: {},
|
||||
},
|
||||
docs: {
|
||||
@@ -37,10 +40,13 @@ const config = {
|
||||
}
|
||||
return mergeConfig(config, {
|
||||
plugins: [
|
||||
// XXX: https://github.com/IanVS/vite-plugin-turbosnap/issues/8
|
||||
(turbosnap as any as typeof turbosnap['default'])({
|
||||
rootDir: config.root ?? process.cwd(),
|
||||
}),
|
||||
{
|
||||
// XXX: https://github.com/IanVS/vite-plugin-turbosnap/issues/8
|
||||
...(turbosnap as any as typeof turbosnap['default'])({
|
||||
rootDir: config.root ?? process.cwd(),
|
||||
}),
|
||||
name: 'fake-turbosnap',
|
||||
},
|
||||
],
|
||||
build: {
|
||||
target: [
|
||||
@@ -53,3 +59,7 @@ const config = {
|
||||
},
|
||||
} satisfies StorybookConfig;
|
||||
export default config;
|
||||
|
||||
function getAbsolutePath(value: string): string {
|
||||
return dirname(require.resolve(join(value, 'package.json')));
|
||||
}
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { addons } from '@storybook/addons';
|
||||
import { FORCE_REMOUNT } from '@storybook/core-events';
|
||||
import { addons } from '@storybook/preview-api';
|
||||
import { type Preview, setup } from '@storybook/vue3';
|
||||
import isChromatic from 'chromatic/isChromatic';
|
||||
import { initialize, mswDecorator } from 'msw-storybook-addon';
|
||||
|
@@ -8,7 +8,7 @@
|
||||
"build": "vite build",
|
||||
"storybook-dev": "nodemon --verbose --watch src --ext \"mdx,ts,vue\" --ignore \"*.stories.ts\" --exec \"pnpm build-storybook-pre && pnpm exec storybook dev -p 6006 --ci\"",
|
||||
"build-storybook-pre": "(tsc -p .storybook || echo done.) && node .storybook/generate.js && node .storybook/preload-locale.js && node .storybook/preload-theme.js",
|
||||
"build-storybook": "pnpm build-storybook-pre && storybook build",
|
||||
"build-storybook": "pnpm build-storybook-pre && storybook build --webpack-stats-json storybook-static",
|
||||
"chromatic": "chromatic",
|
||||
"test": "vitest --run --globals",
|
||||
"test-and-coverage": "vitest --run --coverage --globals",
|
||||
@@ -26,24 +26,24 @@
|
||||
"@rollup/plugin-typescript": "11.1.6",
|
||||
"@rollup/pluginutils": "5.1.0",
|
||||
"@syuilo/aiscript": "0.17.0",
|
||||
"@tabler/icons-webfont": "2.46.0",
|
||||
"@tabler/icons-webfont": "2.47.0",
|
||||
"@twemoji/parser": "15.0.0",
|
||||
"@vitejs/plugin-vue": "5.0.3",
|
||||
"@vitejs/plugin-vue": "5.0.4",
|
||||
"@vue/compiler-sfc": "3.4.15",
|
||||
"aiscript-vscode": "github:aiscript-dev/aiscript-vscode#v0.1.2",
|
||||
"astring": "1.8.6",
|
||||
"broadcast-channel": "7.0.0",
|
||||
"buraha": "0.0.1",
|
||||
"canvas-confetti": "1.6.1",
|
||||
"canvas-confetti": "1.9.2",
|
||||
"chart.js": "4.4.1",
|
||||
"chartjs-adapter-date-fns": "3.0.0",
|
||||
"chartjs-chart-matrix": "2.0.1",
|
||||
"chartjs-plugin-gradient": "0.6.1",
|
||||
"chartjs-plugin-zoom": "2.0.1",
|
||||
"chromatic": "10.9.2",
|
||||
"chromatic": "10.9.6",
|
||||
"compare-versions": "6.1.0",
|
||||
"cropperjs": "2.0.0-beta.4",
|
||||
"date-fns": "2.30.0",
|
||||
"date-fns": "3.3.1",
|
||||
"escape-regexp": "0.0.1",
|
||||
"estree-walker": "3.0.3",
|
||||
"eventemitter3": "5.0.1",
|
||||
@@ -58,10 +58,10 @@
|
||||
"misskey-reversi": "workspace:*",
|
||||
"photoswipe": "5.4.3",
|
||||
"punycode": "2.3.1",
|
||||
"rollup": "4.9.6",
|
||||
"sanitize-html": "2.11.0",
|
||||
"sass": "1.70.0",
|
||||
"shiki": "1.0.0",
|
||||
"rollup": "4.12.0",
|
||||
"sanitize-html": "2.12.0",
|
||||
"sass": "1.71.1",
|
||||
"shiki": "1.1.6",
|
||||
"strict-event-emitter-types": "2.0.0",
|
||||
"textarea-caret": "3.1.0",
|
||||
"three": "0.161.0",
|
||||
@@ -71,51 +71,51 @@
|
||||
"tsconfig-paths": "4.2.0",
|
||||
"typescript": "5.3.3",
|
||||
"uuid": "9.0.1",
|
||||
"v-code-diff": "1.7.2",
|
||||
"vite": "5.1.0",
|
||||
"v-code-diff": "1.9.0",
|
||||
"vite": "5.1.4",
|
||||
"vue": "3.4.15",
|
||||
"vuedraggable": "next"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||
"@misskey-dev/summaly": "5.0.3",
|
||||
"@storybook/addon-actions": "7.6.13",
|
||||
"@storybook/addon-essentials": "7.6.13",
|
||||
"@storybook/addon-interactions": "7.6.13",
|
||||
"@storybook/addon-links": "7.6.13",
|
||||
"@storybook/addon-storysource": "7.6.13",
|
||||
"@storybook/addons": "7.6.13",
|
||||
"@storybook/blocks": "7.6.13",
|
||||
"@storybook/core-events": "7.6.13",
|
||||
"@storybook/jest": "0.2.3",
|
||||
"@storybook/manager-api": "7.6.13",
|
||||
"@storybook/preview-api": "7.6.13",
|
||||
"@storybook/react": "7.6.13",
|
||||
"@storybook/react-vite": "7.6.13",
|
||||
"@storybook/testing-library": "0.2.2",
|
||||
"@storybook/theming": "7.6.13",
|
||||
"@storybook/types": "7.6.13",
|
||||
"@storybook/vue3": "7.6.13",
|
||||
"@storybook/vue3-vite": "7.6.13",
|
||||
"@storybook/addon-actions": "8.0.0-beta.2",
|
||||
"@storybook/addon-essentials": "8.0.0-beta.2",
|
||||
"@storybook/addon-interactions": "8.0.0-beta.2",
|
||||
"@storybook/addon-links": "8.0.0-beta.2",
|
||||
"@storybook/addon-mdx-gfm": "8.0.0-beta.2",
|
||||
"@storybook/addon-storysource": "8.0.0-beta.2",
|
||||
"@storybook/blocks": "8.0.0-beta.2",
|
||||
"@storybook/components": "8.0.0-beta.2",
|
||||
"@storybook/core-events": "8.0.0-beta.2",
|
||||
"@storybook/manager-api": "8.0.0-beta.2",
|
||||
"@storybook/preview-api": "8.0.0-beta.2",
|
||||
"@storybook/react": "8.0.0-beta.2",
|
||||
"@storybook/react-vite": "8.0.0-beta.2",
|
||||
"@storybook/test": "8.0.0-beta.2",
|
||||
"@storybook/theming": "8.0.0-beta.2",
|
||||
"@storybook/types": "8.0.0-beta.2",
|
||||
"@storybook/vue3": "8.0.0-beta.2",
|
||||
"@storybook/vue3-vite": "8.0.0-beta.2",
|
||||
"@testing-library/vue": "8.0.2",
|
||||
"@types/escape-regexp": "0.0.3",
|
||||
"@types/estree": "1.0.5",
|
||||
"@types/matter-js": "0.19.6",
|
||||
"@types/micromatch": "4.0.6",
|
||||
"@types/node": "20.11.17",
|
||||
"@types/punycode": "2.1.3",
|
||||
"@types/node": "20.11.19",
|
||||
"@types/punycode": "2.1.4",
|
||||
"@types/sanitize-html": "2.11.0",
|
||||
"@types/throttle-debounce": "5.0.2",
|
||||
"@types/tinycolor2": "1.4.6",
|
||||
"@types/uuid": "9.0.8",
|
||||
"@types/ws": "8.5.10",
|
||||
"@typescript-eslint/eslint-plugin": "6.21.0",
|
||||
"@typescript-eslint/parser": "6.21.0",
|
||||
"@typescript-eslint/eslint-plugin": "7.0.2",
|
||||
"@typescript-eslint/parser": "7.0.2",
|
||||
"@vitest/coverage-v8": "0.34.6",
|
||||
"@vue/runtime-core": "3.4.15",
|
||||
"acorn": "8.11.3",
|
||||
"cross-env": "7.0.3",
|
||||
"cypress": "13.6.4",
|
||||
"cypress": "13.6.5",
|
||||
"eslint": "8.56.0",
|
||||
"eslint-plugin-import": "2.29.1",
|
||||
"eslint-plugin-vue": "9.21.1",
|
||||
@@ -123,19 +123,19 @@
|
||||
"happy-dom": "10.0.3",
|
||||
"intersection-observer": "0.12.2",
|
||||
"micromatch": "4.0.5",
|
||||
"msw": "2.1.7",
|
||||
"msw": "2.2.1",
|
||||
"msw-storybook-addon": "2.0.0-beta.1",
|
||||
"nodemon": "3.0.3",
|
||||
"prettier": "3.2.5",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"start-server-and-test": "2.0.3",
|
||||
"storybook": "7.6.13",
|
||||
"storybook": "8.0.0-beta.2",
|
||||
"storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme",
|
||||
"vite-plugin-turbosnap": "1.0.3",
|
||||
"vitest": "0.34.6",
|
||||
"vitest-fetch-mock": "0.2.2",
|
||||
"vue-component-type-helpers": "^1.8.27",
|
||||
"vue-component-type-helpers": "1.8.27",
|
||||
"vue-eslint-parser": "9.4.2",
|
||||
"vue-tsc": "1.8.27"
|
||||
}
|
||||
|
@@ -11,6 +11,7 @@ import { alert, confirm, popup, post, toast } from '@/os.js';
|
||||
import { useStream } from '@/stream.js';
|
||||
import * as sound from '@/scripts/sound.js';
|
||||
import { $i, signout, updateAccount } from '@/account.js';
|
||||
import { fetchInstance, instance } from '@/instance.js';
|
||||
import { ColdDeviceStorage, defaultStore } from '@/store.js';
|
||||
import { makeHotkey } from '@/scripts/hotkey.js';
|
||||
import { reactionPicker } from '@/scripts/reaction-picker.js';
|
||||
@@ -225,6 +226,13 @@ export async function mainBoot() {
|
||||
}
|
||||
}
|
||||
|
||||
fetchInstance().then(() => {
|
||||
const modifiedVersionMustProminentlyOfferInAgplV3Section13Read = miLocalStorage.getItem('modifiedVersionMustProminentlyOfferInAgplV3Section13Read');
|
||||
if (modifiedVersionMustProminentlyOfferInAgplV3Section13Read !== 'true' && instance.repositoryUrl !== 'https://github.com/misskey-dev/misskey') {
|
||||
popup(defineAsyncComponent(() => import('@/components/MkSourceCodeAvailablePopup.vue')), {}, {}, 'closed');
|
||||
}
|
||||
});
|
||||
|
||||
if ('Notification' in window) {
|
||||
// 許可を得ていなかったらリクエスト
|
||||
if (Notification.permission === 'default') {
|
||||
|
@@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<template>
|
||||
<div class="bcekxzvu _margin _panel">
|
||||
<div class="target">
|
||||
<MkA v-user-preview="report.targetUserId" class="info" :to="`/admin/user/${report.targetUserId}`">
|
||||
<MkA v-user-preview="report.targetUserId" class="info" :to="`/admin/user/${report.targetUserId}`" :behavior="'window'">
|
||||
<MkAvatar class="avatar" :user="report.targetUser" indicator/>
|
||||
<div class="names">
|
||||
<MkUserName class="name" :user="report.targetUser"/>
|
||||
@@ -23,7 +23,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<Mfm :text="report.comment"/>
|
||||
</div>
|
||||
<hr/>
|
||||
<div>{{ i18n.ts.reporter }}: <MkA :to="`/admin/user/${report.reporter.id}`" class="_link">@{{ report.reporter.username }}</MkA></div>
|
||||
<div>{{ i18n.ts.reporter }}: <MkA :to="`/admin/user/${report.reporter.id}`" class="_link" :behavior="'window'">@{{ report.reporter.username }}</MkA></div>
|
||||
<div v-if="report.assignee">
|
||||
{{ i18n.ts.moderator }}:
|
||||
<MkAcct :user="report.assignee"/>
|
||||
|
@@ -5,8 +5,7 @@
|
||||
|
||||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import { expect } from '@storybook/jest';
|
||||
import { userEvent, waitFor, within } from '@storybook/testing-library';
|
||||
import { expect, userEvent, waitFor, within } from '@storybook/test';
|
||||
import { StoryObj } from '@storybook/vue3';
|
||||
import { HttpResponse, http } from 'msw';
|
||||
import { userDetailed } from '../../.storybook/fakes.js';
|
||||
|
@@ -123,7 +123,7 @@ function callback(response?: string) {
|
||||
function onReceivedMessage(message: MessageEvent) {
|
||||
if (message.data.token) {
|
||||
if (props.instanceUrl && new URL(message.origin).host === new URL(props.instanceUrl).host) {
|
||||
callback(<string>message.data.token);
|
||||
callback(message.data.token);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -240,7 +240,7 @@ const render = () => {
|
||||
},
|
||||
external: externalTooltipHandler,
|
||||
callbacks: {
|
||||
label: (item) => chartData?.bytes ? bytes(item.parsed.y * 1000, 1) : item.parsed.y.toString(),
|
||||
label: (item) => `${item.dataset.label}: ${chartData?.bytes ? bytes(item.parsed.y * 1000, 1) : item.parsed.y.toString()}`,
|
||||
},
|
||||
},
|
||||
zoom: props.detailed ? {
|
||||
|
@@ -52,6 +52,7 @@ async function fetchLanguage(to: string): Promise<void> {
|
||||
return bundle.id === language || bundle.aliases?.includes(language);
|
||||
});
|
||||
if (bundles.length > 0) {
|
||||
if (_DEV_) console.log(`Loading language: ${language}`);
|
||||
await highlighter.loadLanguage(bundles[0].import);
|
||||
codeLang.value = language;
|
||||
} else {
|
||||
|
@@ -4,8 +4,7 @@
|
||||
*/
|
||||
|
||||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
||||
import { expect } from '@storybook/jest';
|
||||
import { userEvent, waitFor, within } from '@storybook/testing-library';
|
||||
import { expect, userEvent, waitFor, within } from '@storybook/test';
|
||||
import { StoryObj } from '@storybook/vue3';
|
||||
import { galleryPost } from '../../.storybook/fakes.js';
|
||||
import MkGalleryPostPreview from './MkGalleryPostPreview.vue';
|
||||
|
@@ -28,7 +28,6 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { userName } from '@/filters/user.js';
|
||||
import MediaImage from '@/components/MkMediaImage.vue';
|
||||
|
@@ -16,9 +16,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
<template #header>
|
||||
<template v-if="pageMetadata?.value">
|
||||
<i v-if="pageMetadata.value.icon" :class="pageMetadata.value.icon" style="margin-right: 0.5em;"></i>
|
||||
<span>{{ pageMetadata.value.title }}</span>
|
||||
<template v-if="pageMetadata">
|
||||
<i v-if="pageMetadata.icon" :class="pageMetadata.icon" style="margin-right: 0.5em;"></i>
|
||||
<span>{{ pageMetadata.title }}</span>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
@@ -29,7 +29,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ComputedRef, onMounted, onUnmounted, provide, ref, shallowRef } from 'vue';
|
||||
import { computed, onMounted, onUnmounted, provide, ref, shallowRef } from 'vue';
|
||||
import RouterView from '@/components/global/RouterView.vue';
|
||||
import MkWindow from '@/components/MkWindow.vue';
|
||||
import { popout as _popout } from '@/scripts/popout.js';
|
||||
@@ -37,7 +37,7 @@ import copyToClipboard from '@/scripts/copy-to-clipboard.js';
|
||||
import { url } from '@/config.js';
|
||||
import { useScrollPositionManager } from '@/nirax.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { PageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata.js';
|
||||
import { PageMetadata, provideMetadataReceiver, provideReactiveMetadata } from '@/scripts/page-metadata.js';
|
||||
import { openingWindowsCount } from '@/os.js';
|
||||
import { claimAchievement } from '@/scripts/achievements.js';
|
||||
import { getScrollContainer } from '@/scripts/scroll.js';
|
||||
@@ -56,7 +56,7 @@ const routerFactory = useRouterFactory();
|
||||
const windowRouter = routerFactory(props.initialPath);
|
||||
|
||||
const contents = shallowRef<HTMLElement | null>(null);
|
||||
const pageMetadata = ref<null | ComputedRef<PageMetadata>>();
|
||||
const pageMetadata = ref<null | PageMetadata>(null);
|
||||
const windowEl = shallowRef<InstanceType<typeof MkWindow>>();
|
||||
const history = ref<{ path: string; key: any; }[]>([{
|
||||
path: windowRouter.getCurrentPath(),
|
||||
@@ -101,9 +101,11 @@ windowRouter.addListener('replace', ctx => {
|
||||
windowRouter.init();
|
||||
|
||||
provide('router', windowRouter);
|
||||
provideMetadataReceiver((info) => {
|
||||
provideMetadataReceiver((metadataGetter) => {
|
||||
const info = metadataGetter();
|
||||
pageMetadata.value = info;
|
||||
});
|
||||
provideReactiveMetadata(pageMetadata);
|
||||
provide('shouldOmitHeaderTitle', true);
|
||||
provide('shouldHeaderThin', true);
|
||||
provide('forceSpacerMin', true);
|
||||
|
@@ -152,11 +152,11 @@ function showFileMenu(file: Misskey.entities.DriveFile, ev: MouseEvent): void {
|
||||
icon: 'ti ti-crop',
|
||||
action: () : void => { crop(file); },
|
||||
}] : [], {
|
||||
type: 'divider',
|
||||
}, {
|
||||
text: i18n.ts.attachCancel,
|
||||
icon: 'ti ti-circle-x',
|
||||
action: () => { detachMedia(file.id); },
|
||||
}, {
|
||||
type: 'divider',
|
||||
}, {
|
||||
text: i18n.ts.deleteFile,
|
||||
icon: 'ti ti-trash',
|
||||
|
@@ -4,8 +4,7 @@
|
||||
*/
|
||||
|
||||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
||||
import { expect } from '@storybook/jest';
|
||||
import { userEvent, waitFor, within } from '@storybook/testing-library';
|
||||
import { expect, userEvent, waitFor, within } from '@storybook/test';
|
||||
import { StoryObj } from '@storybook/vue3';
|
||||
import { onBeforeUnmount } from 'vue';
|
||||
import MkSignupServerRules from './MkSignupDialog.rules.vue';
|
||||
|
112
packages/frontend/src/components/MkSourceCodeAvailablePopup.vue
Normal file
112
packages/frontend/src/components/MkSourceCodeAvailablePopup.vue
Normal file
@@ -0,0 +1,112 @@
|
||||
<!--
|
||||
SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="_panel _shadow" :class="$style.root">
|
||||
<div :class="$style.icon">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-open-source" width="40" height="40" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M12 3a9 9 0 0 1 3.618 17.243l-2.193 -5.602a3 3 0 1 0 -2.849 0l-2.193 5.603a9 9 0 0 1 3.617 -17.244z"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div :class="$style.main">
|
||||
<div :class="$style.title">
|
||||
<I18n :src="i18n.ts.aboutX" tag="span">
|
||||
<template #x>
|
||||
{{ instance.name ?? host }}
|
||||
</template>
|
||||
</I18n>
|
||||
</div>
|
||||
<div :class="$style.text">
|
||||
<I18n :src="i18n.ts._aboutMisskey.thisIsModifiedVersion" tag="span">
|
||||
<template #name>
|
||||
{{ instance.name ?? host }}
|
||||
</template>
|
||||
</I18n>
|
||||
<I18n :src="i18n.ts.correspondingSourceIsAvailable" tag="span">
|
||||
<template #anchor>
|
||||
<MkA to="/about-misskey" class="_link">{{ i18n.ts.aboutMisskey }}</MkA>
|
||||
</template>
|
||||
</I18n>
|
||||
</div>
|
||||
<div class="_buttons">
|
||||
<MkButton @click="close">{{ i18n.ts.gotIt }}</MkButton>
|
||||
</div>
|
||||
</div>
|
||||
<button class="_button" :class="$style.close" @click="close"><i class="ti ti-x"></i></button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import { host } from '@/config.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { instance } from '@/instance.js';
|
||||
import { miLocalStorage } from '@/local-storage.js';
|
||||
import * as os from '@/os.js';
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: 'closed'): void;
|
||||
}>();
|
||||
|
||||
const zIndex = os.claimZIndex('low');
|
||||
|
||||
function close() {
|
||||
miLocalStorage.setItem('modifiedVersionMustProminentlyOfferInAgplV3Section13Read', 'true');
|
||||
emit('closed');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
.root {
|
||||
position: fixed;
|
||||
z-index: v-bind(zIndex);
|
||||
bottom: var(--margin);
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
box-sizing: border-box;
|
||||
width: calc(100% - (var(--margin) * 2));
|
||||
max-width: 500px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.icon {
|
||||
text-align: center;
|
||||
padding-top: 25px;
|
||||
width: 100px;
|
||||
color: var(--accent);
|
||||
}
|
||||
@media (max-width: 500px) {
|
||||
.icon {
|
||||
width: 80px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 450px) {
|
||||
.icon {
|
||||
width: 70px;
|
||||
}
|
||||
}
|
||||
|
||||
.main {
|
||||
padding: 25px 25px 25px 0;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.close {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 8px;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.text {
|
||||
margin: 0.7em 0 1em 0;
|
||||
}
|
||||
</style>
|
@@ -4,8 +4,7 @@
|
||||
*/
|
||||
|
||||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
||||
import { expect } from '@storybook/jest';
|
||||
import { userEvent, within } from '@storybook/testing-library';
|
||||
import { expect, userEvent, within } from '@storybook/test';
|
||||
import { StoryObj } from '@storybook/vue3';
|
||||
import MkA from './MkA.vue';
|
||||
import { tick } from '@/scripts/test-utils.js';
|
||||
|
@@ -5,8 +5,7 @@
|
||||
|
||||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import { expect } from '@storybook/jest';
|
||||
import { waitFor } from '@storybook/testing-library';
|
||||
import { expect, waitFor } from '@storybook/test';
|
||||
import { StoryObj } from '@storybook/vue3';
|
||||
import MkError from './MkError.vue';
|
||||
export const Default = {
|
||||
|
@@ -5,8 +5,7 @@
|
||||
|
||||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
||||
import { StoryObj } from '@storybook/vue3';
|
||||
import { within } from '@storybook/testing-library';
|
||||
import { expect } from '@storybook/jest';
|
||||
import { expect, within } from '@storybook/test';
|
||||
import MkMisskeyFlavoredMarkdown from './MkMisskeyFlavoredMarkdown.js';
|
||||
export const Default = {
|
||||
render(args) {
|
||||
|
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
||||
import { waitFor } from '@storybook/testing-library';
|
||||
import { waitFor } from '@storybook/test';
|
||||
import { StoryObj } from '@storybook/vue3';
|
||||
import MkPageHeader from './MkPageHeader.vue';
|
||||
export const Empty = {
|
||||
|
@@ -11,18 +11,18 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</div>
|
||||
<div v-else-if="!thin_ && narrow && !hideTitle" :class="$style.buttonsLeft"/>
|
||||
|
||||
<template v-if="metadata">
|
||||
<template v-if="pageMetadata">
|
||||
<div v-if="!hideTitle" :class="$style.titleContainer" @click="top">
|
||||
<div v-if="metadata.avatar" :class="$style.titleAvatarContainer">
|
||||
<MkAvatar :class="$style.titleAvatar" :user="metadata.avatar" indicator/>
|
||||
<div v-if="pageMetadata.avatar" :class="$style.titleAvatarContainer">
|
||||
<MkAvatar :class="$style.titleAvatar" :user="pageMetadata.avatar" indicator/>
|
||||
</div>
|
||||
<i v-else-if="metadata.icon" :class="[$style.titleIcon, metadata.icon]"></i>
|
||||
<i v-else-if="pageMetadata.icon" :class="[$style.titleIcon, pageMetadata.icon]"></i>
|
||||
|
||||
<div :class="$style.title">
|
||||
<MkUserName v-if="metadata.userName" :user="metadata.userName" :nowrap="true"/>
|
||||
<div v-else-if="metadata.title">{{ metadata.title }}</div>
|
||||
<div v-if="metadata.subtitle" :class="$style.subtitle">
|
||||
{{ metadata.subtitle }}
|
||||
<MkUserName v-if="pageMetadata.userName" :user="pageMetadata.userName" :nowrap="true"/>
|
||||
<div v-else-if="pageMetadata.title">{{ pageMetadata.title }}</div>
|
||||
<div v-if="pageMetadata.subtitle" :class="$style.subtitle">
|
||||
{{ pageMetadata.subtitle }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -46,7 +46,7 @@ import tinycolor from 'tinycolor2';
|
||||
import XTabs, { Tab } from './MkPageHeader.tabs.vue';
|
||||
import { scrollToTop } from '@/scripts/scroll.js';
|
||||
import { globalEvents } from '@/events.js';
|
||||
import { injectPageMetadata } from '@/scripts/page-metadata.js';
|
||||
import { injectReactiveMetadata } from '@/scripts/page-metadata.js';
|
||||
import { $i, openAccountMenu as openAccountMenu_ } from '@/account.js';
|
||||
import { PageHeaderItem } from '@/types/page-header.js';
|
||||
|
||||
@@ -64,7 +64,7 @@ const emit = defineEmits<{
|
||||
(ev: 'update:tab', key: string);
|
||||
}>();
|
||||
|
||||
const metadata = injectPageMetadata();
|
||||
const pageMetadata = injectReactiveMetadata();
|
||||
|
||||
const hideTitle = inject('shouldOmitHeaderTitle', false);
|
||||
const thin_ = props.thin || inject('shouldHeaderThin', false);
|
||||
|
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
||||
import { expect } from '@storybook/jest';
|
||||
import { expect } from '@storybook/test';
|
||||
import { StoryObj } from '@storybook/vue3';
|
||||
import MkTime from './MkTime.vue';
|
||||
import { i18n } from '@/i18n.js';
|
||||
|
@@ -4,8 +4,7 @@
|
||||
*/
|
||||
|
||||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
||||
import { expect } from '@storybook/jest';
|
||||
import { userEvent, waitFor, within } from '@storybook/testing-library';
|
||||
import { expect, userEvent, waitFor, within } from '@storybook/test';
|
||||
import { StoryObj } from '@storybook/vue3';
|
||||
import { HttpResponse, http } from 'msw';
|
||||
import { commonHandlers } from '../../../.storybook/mocks.js';
|
||||
|
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
||||
import { expect } from '@storybook/jest';
|
||||
import { expect } from '@storybook/test';
|
||||
import { StoryObj } from '@storybook/vue3';
|
||||
import { userDetailed } from '../../../.storybook/fakes.js';
|
||||
import MkUserName from './MkUserName.vue';
|
||||
|
@@ -18,7 +18,7 @@ export const langs = _LANGS_;
|
||||
const preParseLocale = miLocalStorage.getItem('locale');
|
||||
export let locale = preParseLocale ? JSON.parse(preParseLocale) : null;
|
||||
export const version = _VERSION_;
|
||||
export const instanceName = siteName === 'Misskey' ? host : siteName;
|
||||
export const instanceName = siteName === 'Misskey' || siteName == null ? host : siteName;
|
||||
export const ui = miLocalStorage.getItem('ui');
|
||||
export const debug = miLocalStorage.getItem('debug') === 'true';
|
||||
|
||||
|
@@ -99,7 +99,6 @@ export class UserPreview {
|
||||
this.el.removeEventListener('mouseover', this.onMouseover);
|
||||
this.el.removeEventListener('mouseleave', this.onMouseleave);
|
||||
this.el.removeEventListener('click', this.onClick);
|
||||
window.clearInterval(this.checkTimer);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -12,6 +12,7 @@ type Keys =
|
||||
'latestDonationInfoShownAt' |
|
||||
'neverShowDonationInfo' |
|
||||
'neverShowLocalOnlyInfo' |
|
||||
'modifiedVersionMustProminentlyOfferInAgplV3Section13Read' |
|
||||
'lastUsed' |
|
||||
'lang' |
|
||||
'drafts' |
|
||||
|
@@ -17,7 +17,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<div>{{ i18n.ts.youShouldUpgradeClient }}</div>
|
||||
<MkButton style="margin: 8px auto;" @click="reload">{{ i18n.ts.reload }}</MkButton>
|
||||
</template>
|
||||
<div><MkA to="/docs/general/troubleshooting" class="_link">{{ i18n.ts.troubleshooting }}</MkA></div>
|
||||
<div><MkLink url="https://misskey-hub.net/docs/for-users/resources/troubleshooting/" target="_blank">{{ i18n.ts.troubleshooting }}</MkLink></div>
|
||||
<div v-if="error" style="opacity: 0.7;">ERROR: {{ error }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -28,6 +28,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
import { ref, computed } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import MkLink from '@/components/MkLink.vue';
|
||||
import { version } from '@/config.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { unisonReload } from '@/scripts/unison-reload.js';
|
||||
@@ -66,10 +67,10 @@ const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.error,
|
||||
icon: 'ti ti-alert-triangle',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -31,7 +31,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<div class="_gaps_s">
|
||||
<FormLink to="https://github.com/misskey-dev/misskey" external>
|
||||
<template #icon><i class="ti ti-code"></i></template>
|
||||
{{ i18n.ts._aboutMisskey.source }}
|
||||
{{ i18n.ts._aboutMisskey.source }} ({{ i18n.ts._aboutMisskey.original }})
|
||||
<template #suffix>GitHub</template>
|
||||
</FormLink>
|
||||
<FormLink to="https://crowdin.com/project/misskey" external>
|
||||
@@ -46,6 +46,20 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</FormLink>
|
||||
</div>
|
||||
</FormSection>
|
||||
<FormSection v-if="instance.repositoryUrl !== 'https://github.com/misskey-dev/misskey'">
|
||||
<div class="_gaps_s">
|
||||
<MkInfo>
|
||||
{{ i18n.tsx._aboutMisskey.thisIsModifiedVersion({ name: instance.name }) }}
|
||||
</MkInfo>
|
||||
<FormLink v-if="instance.repositoryUrl" :to="instance.repositoryUrl" external>
|
||||
<template #icon><i class="ti ti-code"></i></template>
|
||||
{{ i18n.ts._aboutMisskey.source }}
|
||||
</FormLink>
|
||||
<MkInfo v-if="!instance.repositoryUrl" warn>
|
||||
{{ i18n.ts.sourceCodeIsNotYetProvided }}
|
||||
</MkInfo>
|
||||
</div>
|
||||
</FormSection>
|
||||
<FormSection>
|
||||
<template #label>{{ i18n.ts._aboutMisskey.projectMembers }}</template>
|
||||
<div :class="$style.contributors">
|
||||
@@ -118,9 +132,10 @@ import { version } from '@/config.js';
|
||||
import FormLink from '@/components/form/link.vue';
|
||||
import FormSection from '@/components/form/section.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import MkLink from '@/components/MkLink.vue';
|
||||
import MkInfo from '@/components/MkInfo.vue';
|
||||
import { physics } from '@/scripts/physics.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { instance } from '@/instance.js';
|
||||
import { defaultStore } from '@/store.js';
|
||||
import * as os from '@/os.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
@@ -363,10 +378,10 @@ const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.aboutMisskey,
|
||||
icon: null,
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@@ -35,11 +35,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<template #icon><i class="ti ti-info-circle"></i></template>
|
||||
{{ i18n.ts.aboutMisskey }}
|
||||
</FormLink>
|
||||
<FormLink :to="instance.repositoryUrl" external>
|
||||
<FormLink v-if="instance.repositoryUrl" :to="instance.repositoryUrl" external>
|
||||
<template #icon><i class="ti ti-code"></i></template>
|
||||
{{ i18n.ts.sourcecode }}
|
||||
{{ i18n.ts.sourceCode }}
|
||||
<template #suffix>GitHub</template>
|
||||
</FormLink>
|
||||
<MkInfo v-else warn>
|
||||
{{ i18n.ts.sourceCodeIsNotYetProvided }}
|
||||
</MkInfo>
|
||||
</div>
|
||||
</FormSection>
|
||||
|
||||
@@ -145,6 +148,7 @@ import FormSuspense from '@/components/form/suspense.vue';
|
||||
import FormSplit from '@/components/form/split.vue';
|
||||
import MkFolder from '@/components/MkFolder.vue';
|
||||
import MkKeyValue from '@/components/MkKeyValue.vue';
|
||||
import MkInfo from '@/components/MkInfo.vue';
|
||||
import MkInstanceStats from '@/components/MkInstanceStats.vue';
|
||||
import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
@@ -193,10 +197,10 @@ const headerTabs = computed(() => [{
|
||||
icon: 'ti ti-chart-line',
|
||||
}]);
|
||||
|
||||
definePageMetadata(computed(() => ({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.instanceInfo,
|
||||
icon: 'ti ti-info-circle',
|
||||
})));
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -48,10 +48,10 @@ onDeactivated(() => {
|
||||
}
|
||||
});
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.achievements,
|
||||
icon: 'ti ti-medal',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -140,10 +140,10 @@ const headerTabs = computed(() => [{
|
||||
icon: 'ti ti-code',
|
||||
}]);
|
||||
|
||||
definePageMetadata(computed(() => ({
|
||||
title: file.value ? i18n.ts.file + ': ' + file.value.name : i18n.ts.file,
|
||||
definePageMetadata(() => ({
|
||||
title: file.value ? `${i18n.ts.file}: ${file.value.name}` : i18n.ts.file,
|
||||
icon: 'ti ti-file',
|
||||
})));
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@@ -531,10 +531,10 @@ const headerTabs = computed(() => [{
|
||||
icon: 'ti ti-code',
|
||||
}]);
|
||||
|
||||
definePageMetadata(computed(() => ({
|
||||
definePageMetadata(() => ({
|
||||
title: user.value ? acct(user.value) : i18n.ts.userInfo,
|
||||
icon: 'ti ti-user-exclamation',
|
||||
})));
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@@ -5,12 +5,12 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
<template>
|
||||
<div ref="el" class="fdidabkc" :style="{ background: bg }" @click="onClick">
|
||||
<template v-if="metadata">
|
||||
<template v-if="pageMetadata">
|
||||
<div class="titleContainer" @click="showTabsPopup">
|
||||
<i v-if="metadata.icon" class="icon" :class="metadata.icon"></i>
|
||||
<i v-if="pageMetadata.icon" class="icon" :class="pageMetadata.icon"></i>
|
||||
|
||||
<div class="title">
|
||||
<div class="title">{{ metadata.title }}</div>
|
||||
<div class="title">{{ pageMetadata.title }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
@@ -39,7 +39,7 @@ import { popupMenu } from '@/os.js';
|
||||
import { scrollToTop } from '@/scripts/scroll.js';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import { globalEvents } from '@/events.js';
|
||||
import { injectPageMetadata } from '@/scripts/page-metadata.js';
|
||||
import { injectReactiveMetadata } from '@/scripts/page-metadata.js';
|
||||
|
||||
type Tab = {
|
||||
key?: string | null;
|
||||
@@ -65,7 +65,7 @@ const emit = defineEmits<{
|
||||
(ev: 'update:tab', key: string);
|
||||
}>();
|
||||
|
||||
const metadata = injectPageMetadata();
|
||||
const pageMetadata = injectReactiveMetadata();
|
||||
|
||||
const el = shallowRef<HTMLElement>(null);
|
||||
const tabRefs = {};
|
||||
@@ -118,7 +118,7 @@ function onTabClick(tab: Tab, ev: MouseEvent): void {
|
||||
}
|
||||
|
||||
const calcBg = () => {
|
||||
const rawBg = metadata?.bg ?? 'var(--bg)';
|
||||
const rawBg = pageMetadata.value?.bg ?? 'var(--bg)';
|
||||
const tinyBg = tinycolor(rawBg.startsWith('var(') ? getComputedStyle(document.documentElement).getPropertyValue(rawBg.slice(4, -1)) : rawBg);
|
||||
tinyBg.setAlpha(0.85);
|
||||
bg.value = tinyBg.toRgbString();
|
||||
|
@@ -209,10 +209,10 @@ const headerTabs = computed(() => [{
|
||||
title: i18n.ts._abuse.resolver,
|
||||
}]);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.abuseReports,
|
||||
icon: 'ti ti-exclamation-circle',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
<style lang="scss" module>
|
||||
.input-base {
|
||||
|
@@ -256,10 +256,10 @@ const headerActions = computed(() => [{
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.ads,
|
||||
icon: 'ti ti-ad',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -214,10 +214,10 @@ const headerActions = computed(() => [{
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.announcements,
|
||||
icon: 'ti ti-speakerphone',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -175,10 +175,10 @@ function save() {
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.branding,
|
||||
icon: 'ti ti-paint',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -33,8 +33,8 @@ const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.database,
|
||||
icon: 'ti ti-database',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
@@ -130,10 +130,10 @@ function save() {
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.emailServer,
|
||||
icon: 'ti ti-mail',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -69,10 +69,10 @@ const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.externalServices,
|
||||
icon: 'ti ti-link',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -102,10 +102,10 @@ const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata(computed(() => ({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.federation,
|
||||
icon: 'ti ti-whirl',
|
||||
})));
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -108,8 +108,8 @@ const headerActions = computed(() => [{
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata(computed(() => ({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.files,
|
||||
icon: 'ti ti-cloud',
|
||||
})));
|
||||
}));
|
||||
</script>
|
||||
|
@@ -28,7 +28,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ComputedRef, Ref, onActivated, onMounted, onUnmounted, provide, watch, ref, computed } from 'vue';
|
||||
import { onActivated, onMounted, onUnmounted, provide, watch, ref, computed } from 'vue';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import MkSuperMenu from '@/components/MkSuperMenu.vue';
|
||||
import MkInfo from '@/components/MkInfo.vue';
|
||||
@@ -36,7 +36,7 @@ import { instance } from '@/instance.js';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { lookupUser, lookupUserByEmail } from '@/scripts/lookup-user.js';
|
||||
import { PageMetadata, definePageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata.js';
|
||||
import { PageMetadata, definePageMetadata, provideMetadataReceiver, provideReactiveMetadata } from '@/scripts/page-metadata.js';
|
||||
import { useRouter } from '@/router/supplier.js';
|
||||
|
||||
const isEmpty = (x: string | null) => x == null || x === '';
|
||||
@@ -52,7 +52,7 @@ const indexInfo = {
|
||||
provide('shouldOmitHeaderTitle', false);
|
||||
|
||||
const INFO = ref(indexInfo);
|
||||
const childInfo: Ref<ComputedRef<PageMetadata> | null> = ref(null);
|
||||
const childInfo = ref<null | PageMetadata>(null);
|
||||
const narrow = ref(false);
|
||||
const view = ref(null);
|
||||
const el = ref<HTMLDivElement | null>(null);
|
||||
@@ -257,14 +257,16 @@ watch(router.currentRef, (to) => {
|
||||
}
|
||||
});
|
||||
|
||||
provideMetadataReceiver((info) => {
|
||||
provideMetadataReceiver((metadataGetter) => {
|
||||
const info = metadataGetter();
|
||||
if (info == null) {
|
||||
childInfo.value = null;
|
||||
} else {
|
||||
childInfo.value = info;
|
||||
INFO.value.needWideArea = info.value.needWideArea ?? undefined;
|
||||
INFO.value.needWideArea = info.needWideArea ?? undefined;
|
||||
}
|
||||
});
|
||||
provideReactiveMetadata(INFO);
|
||||
|
||||
function invite() {
|
||||
misskeyApi('admin/invite/create').then(x => {
|
||||
@@ -318,7 +320,7 @@ const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata(INFO.value);
|
||||
definePageMetadata(() => INFO.value);
|
||||
|
||||
defineExpose({
|
||||
header: {
|
||||
|
@@ -77,8 +77,8 @@ const headerTabs = computed(() => [{
|
||||
icon: 'ti ti-photo-exclamation',
|
||||
}]);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.instanceBlocking,
|
||||
icon: 'ti ti-ban',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
@@ -113,10 +113,10 @@ function deleted(id: string) {
|
||||
const headerActions = computed(() => []);
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.invite,
|
||||
icon: 'ti ti-user-plus',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -124,10 +124,10 @@ function save() {
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.moderation,
|
||||
icon: 'ti ti-shield',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -54,14 +54,12 @@ const pagination = {
|
||||
})),
|
||||
};
|
||||
|
||||
console.log(Misskey);
|
||||
|
||||
const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.moderationLogs,
|
||||
icon: 'ti ti-list-search',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
@@ -149,10 +149,10 @@ function save() {
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.objectStorage,
|
||||
icon: 'ti ti-cloud',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -86,8 +86,8 @@ const headerActions = computed(() => [{
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.other,
|
||||
icon: 'ti ti-adjustments',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
@@ -184,10 +184,10 @@ const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.dashboard,
|
||||
icon: 'ti ti-dashboard',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -64,8 +64,8 @@ const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.proxyAccount,
|
||||
icon: 'ti ti-ghost',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
@@ -68,8 +68,8 @@ const headerTabs = computed(() => [{
|
||||
title: 'Inbox',
|
||||
}]);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.jobQueue,
|
||||
icon: 'ti ti-clock-play',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
@@ -84,10 +84,10 @@ const headerActions = computed(() => [{
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.relays,
|
||||
icon: 'ti ti-planet',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -87,11 +87,8 @@ async function save() {
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata(computed(() => role.value ? {
|
||||
title: i18n.ts._role.edit + ': ' + role.value.name,
|
||||
icon: 'ti ti-badge',
|
||||
} : {
|
||||
title: i18n.ts._role.new,
|
||||
definePageMetadata(() => ({
|
||||
title: role.value ? `${i18n.ts._role.edit}: ${role.value.name}` : i18n.ts._role.new,
|
||||
icon: 'ti ti-badge',
|
||||
}));
|
||||
</script>
|
||||
|
@@ -170,10 +170,10 @@ const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata(computed(() => ({
|
||||
title: i18n.ts.role + ': ' + role.name,
|
||||
definePageMetadata(() => ({
|
||||
title: `${i18n.ts.role}: ${role.name}`,
|
||||
icon: 'ti ti-badge',
|
||||
})));
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -318,10 +318,10 @@ const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata(computed(() => ({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.roles,
|
||||
icon: 'ti ti-badges',
|
||||
})));
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -325,10 +325,10 @@ const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.security,
|
||||
icon: 'ti ti-lock',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -67,10 +67,10 @@ const remove = (index: number): void => {
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.serverRules,
|
||||
icon: 'ti ti-checkbox',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -243,10 +243,10 @@ async function save(): void {
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.general,
|
||||
icon: 'ti ti-settings',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -137,10 +137,10 @@ const headerActions = computed(() => [{
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata(computed(() => ({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.users,
|
||||
icon: 'ti ti-users',
|
||||
})));
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -20,9 +20,9 @@ import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { instance } from '@/instance.js';
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.ads,
|
||||
icon: 'ti ti-ad',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
|
@@ -110,10 +110,10 @@ const headerTabs = computed(() => [{
|
||||
icon: 'ti ti-point',
|
||||
}]);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.announcements,
|
||||
icon: 'ti ti-speakerphone',
|
||||
});
|
||||
}));
|
||||
|
||||
const unreadCount = ref($i?.unreadAnnouncements.length ?? 0);
|
||||
watch(() => $i?.unreadAnnouncements.length ?? 0, () => {
|
||||
|
@@ -91,10 +91,10 @@ const headerActions = computed(() => antenna.value ? [{
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata(computed(() => antenna.value ? {
|
||||
title: antenna.value.name,
|
||||
definePageMetadata(() => ({
|
||||
title: antenna.value ? antenna.value.name : i18n.ts.antennas,
|
||||
icon: 'ti ti-antenna',
|
||||
} : null));
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -87,8 +87,8 @@ const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: 'API console',
|
||||
icon: 'ti ti-terminal-2',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
@@ -97,10 +97,10 @@ const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts._auth.shareAccessTitle,
|
||||
icon: 'ti ti-apps',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -94,8 +94,8 @@ const headerActions = computed(() => [{
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.avatarDecorations,
|
||||
icon: 'ti ti-sparkles',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
@@ -202,11 +202,8 @@ const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata(computed(() => props.channelId ? {
|
||||
title: i18n.ts._channel.edit,
|
||||
icon: 'ti ti-device-tv',
|
||||
} : {
|
||||
title: i18n.ts._channel.create,
|
||||
definePageMetadata(() => ({
|
||||
title: props.channelId ? i18n.ts._channel.edit : i18n.ts._channel.create,
|
||||
icon: 'ti ti-device-tv',
|
||||
}));
|
||||
</script>
|
||||
|
@@ -258,10 +258,10 @@ const headerTabs = computed(() => [{
|
||||
icon: 'ti ti-search',
|
||||
}]);
|
||||
|
||||
definePageMetadata(computed(() => channel.value ? {
|
||||
title: channel.value.name,
|
||||
definePageMetadata(() => ({
|
||||
title: channel.value ? channel.value.name : i18n.ts.channel,
|
||||
icon: 'ti ti-device-tv',
|
||||
} : null));
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -152,8 +152,8 @@ const headerTabs = computed(() => [{
|
||||
icon: 'ti ti-edit',
|
||||
}]);
|
||||
|
||||
definePageMetadata(computed(() => ({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.channel,
|
||||
icon: 'ti ti-device-tv',
|
||||
})));
|
||||
}));
|
||||
</script>
|
||||
|
@@ -16,10 +16,10 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
import MkClickerGame from '@/components/MkClickerGame.vue';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: '🍪👈',
|
||||
icon: 'ti ti-cookie',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -157,10 +157,10 @@ const headerActions = computed(() => clip.value && isOwned.value ? [{
|
||||
},
|
||||
}] : null);
|
||||
|
||||
definePageMetadata(computed(() => clip.value ? {
|
||||
title: clip.value.name,
|
||||
definePageMetadata(() => ({
|
||||
title: clip.value ? clip.value.name : i18n.ts.clip,
|
||||
icon: 'ti ti-paperclip',
|
||||
} : null));
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -312,10 +312,10 @@ const headerTabs = computed(() => [{
|
||||
title: i18n.ts.remote,
|
||||
}]);
|
||||
|
||||
definePageMetadata(computed(() => ({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.customEmojis,
|
||||
icon: 'ti ti-icons',
|
||||
})));
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@@ -48,8 +48,8 @@ const headerTabs = computed(() => [{
|
||||
icon: 'ti ti-pencil',
|
||||
}]);
|
||||
|
||||
definePageMetadata(computed(() => ({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts._fileViewer.title,
|
||||
icon: 'ti ti-file',
|
||||
})));
|
||||
}));
|
||||
</script>
|
||||
|
@@ -22,9 +22,9 @@ const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata(computed(() => ({
|
||||
definePageMetadata(() => ({
|
||||
title: folder.value ? folder.value.name : i18n.ts.drive,
|
||||
icon: 'ti ti-cloud',
|
||||
hideHeader: true,
|
||||
})));
|
||||
}));
|
||||
</script>
|
||||
|
@@ -1204,10 +1204,10 @@ onDeactivated(() => {
|
||||
bgmNodes?.soundSource.stop();
|
||||
});
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.bubbleGame,
|
||||
icon: 'ti ti-apple',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -121,10 +121,10 @@ function onGameEnd() {
|
||||
gameStarted.value = false;
|
||||
}
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.bubbleGame,
|
||||
icon: 'ti ti-device-gamepad',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -60,8 +60,8 @@ const headerTabs = computed(() => [{
|
||||
title: i18n.ts.roles,
|
||||
}]);
|
||||
|
||||
definePageMetadata(computed(() => ({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.explore,
|
||||
icon: 'ti ti-hash',
|
||||
})));
|
||||
}));
|
||||
</script>
|
||||
|
@@ -38,10 +38,10 @@ const pagination = {
|
||||
limit: 10,
|
||||
};
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.favorites,
|
||||
icon: 'ti ti-star',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -453,9 +453,7 @@ const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata(computed(() => flash.value ? {
|
||||
title: i18n.ts._play.edit + ': ' + flash.value.title,
|
||||
} : {
|
||||
title: i18n.ts._play.new,
|
||||
definePageMetadata(() => ({
|
||||
title: flash.value ? `${i18n.ts._play.edit}: ${flash.value.title}` : i18n.ts._play.new,
|
||||
}));
|
||||
</script>
|
||||
|
@@ -90,8 +90,8 @@ const headerTabs = computed(() => [{
|
||||
icon: 'ti ti-heart',
|
||||
}]);
|
||||
|
||||
definePageMetadata(computed(() => ({
|
||||
definePageMetadata(() => ({
|
||||
title: 'Play',
|
||||
icon: 'ti ti-player-play',
|
||||
})));
|
||||
}));
|
||||
</script>
|
||||
|
@@ -205,15 +205,17 @@ const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata(computed(() => flash.value ? {
|
||||
title: flash.value.title,
|
||||
avatar: flash.value.user,
|
||||
path: `/play/${flash.value.id}`,
|
||||
share: {
|
||||
title: flash.value.title,
|
||||
text: flash.value.summary,
|
||||
},
|
||||
} : null));
|
||||
definePageMetadata(() => ({
|
||||
title: flash.value ? flash.value.title : 'Play',
|
||||
...flash.value ? {
|
||||
avatar: flash.value.user,
|
||||
path: `/play/${flash.value.id}`,
|
||||
share: {
|
||||
title: flash.value.title,
|
||||
text: flash.value.summary,
|
||||
},
|
||||
} : {},
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -69,10 +69,10 @@ const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata(computed(() => ({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.followRequests,
|
||||
icon: 'ti ti-user-plus',
|
||||
})));
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@@ -122,11 +122,8 @@ const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata(computed(() => props.postId ? {
|
||||
title: i18n.ts.edit,
|
||||
icon: 'ti ti-pencil',
|
||||
} : {
|
||||
title: i18n.ts.postToGallery,
|
||||
definePageMetadata(() => ({
|
||||
title: props.postId ? i18n.ts.edit : i18n.ts.postToGallery,
|
||||
icon: 'ti ti-pencil',
|
||||
}));
|
||||
</script>
|
||||
|
@@ -119,10 +119,10 @@ const headerTabs = computed(() => [{
|
||||
icon: 'ti ti-edit',
|
||||
}]);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.gallery,
|
||||
icon: 'ti ti-icons',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -163,10 +163,12 @@ const headerActions = computed(() => [{
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata(computed(() => post.value ? {
|
||||
title: post.value.title,
|
||||
avatar: post.value.user,
|
||||
} : null));
|
||||
definePageMetadata(() => ({
|
||||
title: post.value ? post.value.title : i18n.ts.gallery,
|
||||
...post.value ? {
|
||||
avatar: post.value.user,
|
||||
} : {},
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@@ -31,10 +31,10 @@ import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import MkPagination from '@/components/MkPagination.vue';
|
||||
import MkChannelPreview from '@/components/MkChannelPreview.vue';
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: 'Misskey Games',
|
||||
icon: 'ti ti-device-gamepad',
|
||||
});
|
||||
}));
|
||||
|
||||
const featuredPagination = {
|
||||
endpoint: 'channels/featured-games' as const,
|
||||
|
@@ -312,10 +312,10 @@ const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts._externalResourceInstaller.title,
|
||||
icon: 'ti ti-download',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -258,10 +258,10 @@ const headerTabs = computed(() => [{
|
||||
icon: 'ti ti-code',
|
||||
}]);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: props.host,
|
||||
icon: 'ti ti-server',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@@ -93,10 +93,10 @@ async function update() {
|
||||
|
||||
update();
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.invite,
|
||||
icon: 'ti ti-user-plus',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -101,10 +101,10 @@ const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata(computed(() => list.value ? {
|
||||
title: list.value.name,
|
||||
definePageMetadata(() => ({
|
||||
title: list.value ? list.value.name : i18n.ts.lists,
|
||||
icon: 'ti ti-list',
|
||||
} : null));
|
||||
}));
|
||||
</script>
|
||||
<style lang="scss" module>
|
||||
.main {
|
||||
|
@@ -93,10 +93,10 @@ const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: 'MiAuth',
|
||||
icon: 'ti ti-apps',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -38,8 +38,8 @@ function onAntennaCreated() {
|
||||
router.push('/my/antennas');
|
||||
}
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.manageAntennas,
|
||||
icon: 'ti ti-antenna',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
@@ -36,8 +36,8 @@ misskeyApi('antennas/show', { antennaId: props.antennaId }).then((antennaRespons
|
||||
antenna.value = antennaResponse;
|
||||
});
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.manageAntennas,
|
||||
icon: 'ti ti-antenna',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
@@ -55,10 +55,10 @@ const headerActions = computed(() => [{
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.manageAntennas,
|
||||
icon: 'ti ti-antenna',
|
||||
});
|
||||
}));
|
||||
|
||||
onActivated(() => {
|
||||
antennasCache.fetch();
|
||||
|
@@ -104,14 +104,10 @@ const headerTabs = computed(() => [{
|
||||
icon: 'ti ti-heart',
|
||||
}]);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.clip,
|
||||
icon: 'ti ti-paperclip',
|
||||
action: {
|
||||
icon: 'ti ti-plus',
|
||||
handler: create,
|
||||
},
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -71,10 +71,10 @@ const headerActions = computed(() => [{
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.manageLists,
|
||||
icon: 'ti ti-list',
|
||||
});
|
||||
}));
|
||||
|
||||
onActivated(() => {
|
||||
fetch();
|
||||
|
@@ -186,10 +186,10 @@ const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata(computed(() => list.value ? {
|
||||
title: list.value.name,
|
||||
definePageMetadata(() => ({
|
||||
title: list.value ? list.value.name : i18n.ts.lists,
|
||||
icon: 'ti ti-list',
|
||||
} : null));
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -31,8 +31,8 @@ const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.notFound,
|
||||
icon: 'ti ti-alert-triangle',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
@@ -141,16 +141,18 @@ const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata(computed(() => note.value ? {
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.note,
|
||||
subtitle: dateString(note.value.createdAt),
|
||||
avatar: note.value.user,
|
||||
path: `/notes/${note.value.id}`,
|
||||
share: {
|
||||
title: i18n.tsx.noteOf({ user: note.value.user.name }),
|
||||
text: note.value.text,
|
||||
},
|
||||
} : null));
|
||||
...note.value ? {
|
||||
subtitle: dateString(note.value.createdAt),
|
||||
avatar: note.value.user,
|
||||
path: `/notes/${note.value.id}`,
|
||||
share: {
|
||||
title: i18n.tsx.noteOf({ user: note.value.user.name }),
|
||||
text: note.value.text,
|
||||
},
|
||||
} : {},
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -94,10 +94,10 @@ const headerTabs = computed(() => [{
|
||||
icon: 'ti ti-mail',
|
||||
}]);
|
||||
|
||||
definePageMetadata(computed(() => ({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.notifications,
|
||||
icon: 'ti ti-bell',
|
||||
})));
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style module lang="scss">
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user