Compare commits
15 Commits
2025.3.2-a
...
2025.3.2-a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eda768a08c | ||
|
|
1f345eb839 | ||
|
|
1f2801af02 | ||
|
|
a4ba096e2a | ||
|
|
6841cdfa76 | ||
|
|
794f360bc2 | ||
|
|
f797765b1d | ||
|
|
9dce512fbb | ||
|
|
9e91f85370 | ||
|
|
9998cb84e8 | ||
|
|
5ed1101bbd | ||
|
|
6c9153300d | ||
|
|
7957ee5191 | ||
|
|
b200743845 | ||
|
|
08f7e7d9b3 |
@@ -7,6 +7,9 @@
|
|||||||
- Feat: 設定の管理が強化されました
|
- Feat: 設定の管理が強化されました
|
||||||
- 自動でバックアップされるように
|
- 自動でバックアップされるように
|
||||||
- Enhance: プラグインの管理が強化されました
|
- Enhance: プラグインの管理が強化されました
|
||||||
|
- Enhance: CWの注釈テキストが入力されていない場合, Postボタンを非アクティブに
|
||||||
|
- Enhance: CWを無効にした場合, 注釈テキストが最大入力文字数を超えていても投稿できるように
|
||||||
|
- Enhance: テーマ設定画面のデザインを改善
|
||||||
- Fix: テーマ切り替え時に一部の色が変わらない問題を修正
|
- Fix: テーマ切り替え時に一部の色が変わらない問題を修正
|
||||||
|
|
||||||
### Server
|
### Server
|
||||||
|
|||||||
8
locales/index.d.ts
vendored
8
locales/index.d.ts
vendored
@@ -5395,6 +5395,10 @@ export interface Locale extends ILocale {
|
|||||||
* リモートサーバーに連合されたノートには効果が及ばない場合があります。
|
* リモートサーバーに連合されたノートには効果が及ばない場合があります。
|
||||||
*/
|
*/
|
||||||
"mayNotEffectForFederatedNotes": string;
|
"mayNotEffectForFederatedNotes": string;
|
||||||
|
/**
|
||||||
|
* これらの制限は簡易的なものです。リモートサーバーでの閲覧やモデレーション時など、一部のシチュエーションでは適用されない場合があります。
|
||||||
|
*/
|
||||||
|
"mayNotEffectSomeSituations": string;
|
||||||
/**
|
/**
|
||||||
* 指定した時間を経過しているノート
|
* 指定した時間を経過しているノート
|
||||||
*/
|
*/
|
||||||
@@ -7742,6 +7746,10 @@ export interface Locale extends ILocale {
|
|||||||
* 標準のテーマ
|
* 標準のテーマ
|
||||||
*/
|
*/
|
||||||
"builtinThemes": string;
|
"builtinThemes": string;
|
||||||
|
/**
|
||||||
|
* サーバーのテーマ
|
||||||
|
*/
|
||||||
|
"instanceTheme": string;
|
||||||
/**
|
/**
|
||||||
* そのテーマは既にインストールされています
|
* そのテーマは既にインストールされています
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1349,6 +1349,7 @@ _accountSettings:
|
|||||||
makeNotesHiddenBefore: "過去のノートを非公開化する"
|
makeNotesHiddenBefore: "過去のノートを非公開化する"
|
||||||
makeNotesHiddenBeforeDescription: "この機能が有効になっている間、設定された日時より過去、または設定された時間を経過しているノートが自分のみ表示可能(非公開化)になります。無効に戻すと、ノートの公開状態も元に戻ります。"
|
makeNotesHiddenBeforeDescription: "この機能が有効になっている間、設定された日時より過去、または設定された時間を経過しているノートが自分のみ表示可能(非公開化)になります。無効に戻すと、ノートの公開状態も元に戻ります。"
|
||||||
mayNotEffectForFederatedNotes: "リモートサーバーに連合されたノートには効果が及ばない場合があります。"
|
mayNotEffectForFederatedNotes: "リモートサーバーに連合されたノートには効果が及ばない場合があります。"
|
||||||
|
mayNotEffectSomeSituations: "これらの制限は簡易的なものです。リモートサーバーでの閲覧やモデレーション時など、一部のシチュエーションでは適用されない場合があります。"
|
||||||
notesHavePassedSpecifiedPeriod: "指定した時間を経過しているノート"
|
notesHavePassedSpecifiedPeriod: "指定した時間を経過しているノート"
|
||||||
notesOlderThanSpecifiedDateAndTime: "指定した日時より前のノート"
|
notesOlderThanSpecifiedDateAndTime: "指定した日時より前のノート"
|
||||||
|
|
||||||
@@ -2030,6 +2031,7 @@ _theme:
|
|||||||
installed: "{name}をインストールしました"
|
installed: "{name}をインストールしました"
|
||||||
installedThemes: "インストールされたテーマ"
|
installedThemes: "インストールされたテーマ"
|
||||||
builtinThemes: "標準のテーマ"
|
builtinThemes: "標準のテーマ"
|
||||||
|
instanceTheme: "サーバーのテーマ"
|
||||||
alreadyInstalled: "そのテーマは既にインストールされています"
|
alreadyInstalled: "そのテーマは既にインストールされています"
|
||||||
invalid: "テーマの形式が間違っています"
|
invalid: "テーマの形式が間違っています"
|
||||||
make: "テーマを作る"
|
make: "テーマを作る"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "misskey",
|
"name": "misskey",
|
||||||
"version": "2025.3.2-alpha.4",
|
"version": "2025.3.2-alpha.6",
|
||||||
"codename": "nasubi",
|
"codename": "nasubi",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -65,12 +65,12 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@misskey-dev/eslint-plugin": "2.1.0",
|
"@misskey-dev/eslint-plugin": "2.1.0",
|
||||||
"@types/node": "22.13.9",
|
"@types/node": "22.13.10",
|
||||||
"@typescript-eslint/eslint-plugin": "8.26.0",
|
"@typescript-eslint/eslint-plugin": "8.26.0",
|
||||||
"@typescript-eslint/parser": "8.26.0",
|
"@typescript-eslint/parser": "8.26.0",
|
||||||
"cross-env": "7.0.3",
|
"cross-env": "7.0.3",
|
||||||
"cypress": "14.1.0",
|
"cypress": "14.1.0",
|
||||||
"eslint": "9.21.0",
|
"eslint": "9.22.0",
|
||||||
"globals": "16.0.0",
|
"globals": "16.0.0",
|
||||||
"ncp": "2.0.0",
|
"ncp": "2.0.0",
|
||||||
"pnpm": "10.6.1",
|
"pnpm": "10.6.1",
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|||||||
let fetching = ref(true);
|
let fetching = ref(true);
|
||||||
let images = ref([]);
|
let images = ref([]);
|
||||||
function thumbnail(image) {
|
function thumbnail(image) {
|
||||||
return store.state.disableShowingAnimatedImages ? getStaticImageUrl(image.url) : image.thumbnailUrl;
|
return store.s.disableShowingAnimatedImages ? getStaticImageUrl(image.url) : image.thumbnailUrl;
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const image = [
|
const image = [
|
||||||
@@ -190,7 +190,7 @@ const index_photos = defineComponent({
|
|||||||
let fetching = ref(true);
|
let fetching = ref(true);
|
||||||
let images = ref([]);
|
let images = ref([]);
|
||||||
function thumbnail(image) {
|
function thumbnail(image) {
|
||||||
return store.state.disableShowingAnimatedImages ? getStaticImageUrl(image.url) : image.thumbnailUrl;
|
return store.s.disableShowingAnimatedImages ? getStaticImageUrl(image.url) : image.thumbnailUrl;
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const image = ["image/jpeg", "image/webp", "image/avif", "image/png", "image/gif", "image/apng", "image/vnd.mozilla.apng"];
|
const image = ["image/jpeg", "image/webp", "image/avif", "image/png", "image/gif", "image/apng", "image/vnd.mozilla.apng"];
|
||||||
|
|||||||
@@ -154,26 +154,26 @@ export async function common(createVue: () => App<Element>) {
|
|||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
// NOTE: この処理は必ずクライアント更新チェック処理より後に来ること(テーマ再構築のため)
|
// NOTE: この処理は必ずクライアント更新チェック処理より後に来ること(テーマ再構築のため)
|
||||||
watch(store.reactiveState.darkMode, (darkMode) => {
|
watch(store.r.darkMode, (darkMode) => {
|
||||||
applyTheme(darkMode
|
applyTheme(darkMode
|
||||||
? (prefer.s.darkTheme ?? defaultDarkTheme)
|
? (prefer.s.darkTheme ?? defaultDarkTheme)
|
||||||
: (prefer.s.lightTheme ?? defaultLightTheme),
|
: (prefer.s.lightTheme ?? defaultLightTheme),
|
||||||
);
|
);
|
||||||
}, { immediate: miLocalStorage.getItem('theme') == null });
|
}, { immediate: miLocalStorage.getItem('theme') == null });
|
||||||
|
|
||||||
document.documentElement.dataset.colorScheme = store.state.darkMode ? 'dark' : 'light';
|
document.documentElement.dataset.colorScheme = store.s.darkMode ? 'dark' : 'light';
|
||||||
|
|
||||||
const darkTheme = prefer.model('darkTheme');
|
const darkTheme = prefer.model('darkTheme');
|
||||||
const lightTheme = prefer.model('lightTheme');
|
const lightTheme = prefer.model('lightTheme');
|
||||||
|
|
||||||
watch(darkTheme, (theme) => {
|
watch(darkTheme, (theme) => {
|
||||||
if (store.state.darkMode) {
|
if (store.s.darkMode) {
|
||||||
applyTheme(theme ?? defaultDarkTheme);
|
applyTheme(theme ?? defaultDarkTheme);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(lightTheme, (theme) => {
|
watch(lightTheme, (theme) => {
|
||||||
if (!store.state.darkMode) {
|
if (!store.s.darkMode) {
|
||||||
applyTheme(theme ?? defaultLightTheme);
|
applyTheme(theme ?? defaultLightTheme);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -190,16 +190,16 @@ export async function common(createVue: () => App<Element>) {
|
|||||||
});
|
});
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
if (prefer.s.darkTheme && store.state.darkMode) {
|
if (prefer.s.darkTheme && store.s.darkMode) {
|
||||||
if (miLocalStorage.getItem('themeId') !== prefer.s.darkTheme.id) applyTheme(prefer.s.darkTheme);
|
if (miLocalStorage.getItem('themeId') !== prefer.s.darkTheme.id) applyTheme(prefer.s.darkTheme);
|
||||||
} else if (prefer.s.lightTheme && !store.state.darkMode) {
|
} else if (prefer.s.lightTheme && !store.s.darkMode) {
|
||||||
if (miLocalStorage.getItem('themeId') !== prefer.s.lightTheme.id) applyTheme(prefer.s.lightTheme);
|
if (miLocalStorage.getItem('themeId') !== prefer.s.lightTheme.id) applyTheme(prefer.s.lightTheme);
|
||||||
}
|
}
|
||||||
|
|
||||||
fetchInstanceMetaPromise.then(() => {
|
fetchInstanceMetaPromise.then(() => {
|
||||||
// TODO: instance.defaultLightTheme/instance.defaultDarkThemeが不正な形式だった場合のケア
|
// TODO: instance.defaultLightTheme/instance.defaultDarkThemeが不正な形式だった場合のケア
|
||||||
if (prefer.s.lightTheme == null && instance.defaultLightTheme != null) prefer.set('lightTheme', JSON.parse(instance.defaultLightTheme));
|
if (prefer.s.lightTheme == null && instance.defaultLightTheme != null) prefer.commit('lightTheme', JSON.parse(instance.defaultLightTheme));
|
||||||
if (prefer.s.darkTheme == null && instance.defaultDarkTheme != null) prefer.set('darkTheme', JSON.parse(instance.defaultDarkTheme));
|
if (prefer.s.darkTheme == null && instance.defaultDarkTheme != null) prefer.commit('darkTheme', JSON.parse(instance.defaultDarkTheme));
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(prefer.r.overridedDeviceKind, (kind) => {
|
watch(prefer.r.overridedDeviceKind, (kind) => {
|
||||||
|
|||||||
@@ -6,9 +6,11 @@
|
|||||||
import { createApp, defineAsyncComponent, markRaw } from 'vue';
|
import { createApp, defineAsyncComponent, markRaw } from 'vue';
|
||||||
import { ui } from '@@/js/config.js';
|
import { ui } from '@@/js/config.js';
|
||||||
import * as Misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
|
import { v4 as uuid } from 'uuid';
|
||||||
import { common } from './common.js';
|
import { common } from './common.js';
|
||||||
import type { Component } from 'vue';
|
import type { Component } from 'vue';
|
||||||
import type { Keymap } from '@/utility/hotkey.js';
|
import type { Keymap } from '@/utility/hotkey.js';
|
||||||
|
import type { DeckProfile } from '@/deck.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { alert, confirm, popup, post, toast } from '@/os.js';
|
import { alert, confirm, popup, post, toast } from '@/os.js';
|
||||||
import { useStream } from '@/stream.js';
|
import { useStream } from '@/stream.js';
|
||||||
@@ -138,98 +140,117 @@ export async function mainBoot() {
|
|||||||
store.loaded.then(async () => {
|
store.loaded.then(async () => {
|
||||||
// prefereces migration
|
// prefereces migration
|
||||||
// TODO: そのうち消す
|
// TODO: そのうち消す
|
||||||
if (store.state.menu.length > 0) {
|
if (store.s.menu.length > 0) {
|
||||||
const themes = await misskeyApi('i/registry/get', { scope: ['client'], key: 'themes' }).catch(() => []);
|
const themes = await misskeyApi('i/registry/get', { scope: ['client'], key: 'themes' }).catch(() => []);
|
||||||
if (themes.length > 0) {
|
if (themes.length > 0) {
|
||||||
prefer.set('themes', themes);
|
prefer.commit('themes', themes);
|
||||||
}
|
}
|
||||||
|
|
||||||
const plugins = ColdDeviceStorage.get('plugins');
|
const plugins = ColdDeviceStorage.get('plugins');
|
||||||
prefer.set('plugins', plugins.map(p => ({
|
prefer.commit('plugins', plugins.map(p => ({
|
||||||
...p,
|
...p,
|
||||||
installId: (p as any).id,
|
installId: (p as any).id,
|
||||||
id: undefined,
|
id: undefined,
|
||||||
})));
|
})));
|
||||||
prefer.set('lightTheme', ColdDeviceStorage.get('lightTheme'));
|
|
||||||
prefer.set('darkTheme', ColdDeviceStorage.get('darkTheme'));
|
prefer.commit('deck.profile', deckStore.s.profile);
|
||||||
prefer.set('syncDeviceDarkMode', ColdDeviceStorage.get('syncDeviceDarkMode'));
|
misskeyApi('i/registry/keys', {
|
||||||
prefer.set('overridedDeviceKind', store.state.overridedDeviceKind);
|
scope: ['client', 'deck', 'profiles'],
|
||||||
prefer.set('widgets', store.state.widgets);
|
}).then(async keys => {
|
||||||
prefer.set('keepCw', store.state.keepCw);
|
const profiles: DeckProfile[] = [];
|
||||||
prefer.set('collapseRenotes', store.state.collapseRenotes);
|
for (const key of keys) {
|
||||||
prefer.set('rememberNoteVisibility', store.state.rememberNoteVisibility);
|
const deck = await misskeyApi('i/registry/get', {
|
||||||
prefer.set('uploadFolder', store.state.uploadFolder);
|
scope: ['client', 'deck', 'profiles'],
|
||||||
prefer.set('keepOriginalUploading', store.state.keepOriginalUploading);
|
key: key,
|
||||||
prefer.set('menu', store.state.menu);
|
});
|
||||||
prefer.set('statusbars', store.state.statusbars);
|
profiles.push({
|
||||||
prefer.set('pinnedUserLists', store.state.pinnedUserLists);
|
id: uuid(),
|
||||||
prefer.set('serverDisconnectedBehavior', store.state.serverDisconnectedBehavior);
|
name: key,
|
||||||
prefer.set('nsfw', store.state.nsfw);
|
columns: deck.columns,
|
||||||
prefer.set('highlightSensitiveMedia', store.state.highlightSensitiveMedia);
|
layout: deck.layout,
|
||||||
prefer.set('animation', store.state.animation);
|
});
|
||||||
prefer.set('animatedMfm', store.state.animatedMfm);
|
}
|
||||||
prefer.set('advancedMfm', store.state.advancedMfm);
|
prefer.commit('deck.profiles', profiles);
|
||||||
prefer.set('showReactionsCount', store.state.showReactionsCount);
|
});
|
||||||
prefer.set('enableQuickAddMfmFunction', store.state.enableQuickAddMfmFunction);
|
|
||||||
prefer.set('loadRawImages', store.state.loadRawImages);
|
prefer.commit('lightTheme', ColdDeviceStorage.get('lightTheme'));
|
||||||
prefer.set('imageNewTab', store.state.imageNewTab);
|
prefer.commit('darkTheme', ColdDeviceStorage.get('darkTheme'));
|
||||||
prefer.set('disableShowingAnimatedImages', store.state.disableShowingAnimatedImages);
|
prefer.commit('syncDeviceDarkMode', ColdDeviceStorage.get('syncDeviceDarkMode'));
|
||||||
prefer.set('emojiStyle', store.state.emojiStyle);
|
prefer.commit('overridedDeviceKind', store.s.overridedDeviceKind);
|
||||||
prefer.set('menuStyle', store.state.menuStyle);
|
prefer.commit('widgets', store.s.widgets);
|
||||||
prefer.set('useBlurEffectForModal', store.state.useBlurEffectForModal);
|
prefer.commit('keepCw', store.s.keepCw);
|
||||||
prefer.set('useBlurEffect', store.state.useBlurEffect);
|
prefer.commit('collapseRenotes', store.s.collapseRenotes);
|
||||||
prefer.set('showFixedPostForm', store.state.showFixedPostForm);
|
prefer.commit('rememberNoteVisibility', store.s.rememberNoteVisibility);
|
||||||
prefer.set('showFixedPostFormInChannel', store.state.showFixedPostFormInChannel);
|
prefer.commit('uploadFolder', store.s.uploadFolder);
|
||||||
prefer.set('enableInfiniteScroll', store.state.enableInfiniteScroll);
|
prefer.commit('keepOriginalUploading', store.s.keepOriginalUploading);
|
||||||
prefer.set('useReactionPickerForContextMenu', store.state.useReactionPickerForContextMenu);
|
prefer.commit('menu', store.s.menu);
|
||||||
prefer.set('showGapBetweenNotesInTimeline', store.state.showGapBetweenNotesInTimeline);
|
prefer.commit('statusbars', store.s.statusbars);
|
||||||
prefer.set('instanceTicker', store.state.instanceTicker);
|
prefer.commit('pinnedUserLists', store.s.pinnedUserLists);
|
||||||
prefer.set('emojiPickerScale', store.state.emojiPickerScale);
|
prefer.commit('serverDisconnectedBehavior', store.s.serverDisconnectedBehavior);
|
||||||
prefer.set('emojiPickerWidth', store.state.emojiPickerWidth);
|
prefer.commit('nsfw', store.s.nsfw);
|
||||||
prefer.set('emojiPickerHeight', store.state.emojiPickerHeight);
|
prefer.commit('highlightSensitiveMedia', store.s.highlightSensitiveMedia);
|
||||||
prefer.set('emojiPickerStyle', store.state.emojiPickerStyle);
|
prefer.commit('animation', store.s.animation);
|
||||||
prefer.set('reportError', store.state.reportError);
|
prefer.commit('animatedMfm', store.s.animatedMfm);
|
||||||
prefer.set('squareAvatars', store.state.squareAvatars);
|
prefer.commit('advancedMfm', store.s.advancedMfm);
|
||||||
prefer.set('showAvatarDecorations', store.state.showAvatarDecorations);
|
prefer.commit('showReactionsCount', store.s.showReactionsCount);
|
||||||
prefer.set('numberOfPageCache', store.state.numberOfPageCache);
|
prefer.commit('enableQuickAddMfmFunction', store.s.enableQuickAddMfmFunction);
|
||||||
prefer.set('showNoteActionsOnlyHover', store.state.showNoteActionsOnlyHover);
|
prefer.commit('loadRawImages', store.s.loadRawImages);
|
||||||
prefer.set('showClipButtonInNoteFooter', store.state.showClipButtonInNoteFooter);
|
prefer.commit('imageNewTab', store.s.imageNewTab);
|
||||||
prefer.set('reactionsDisplaySize', store.state.reactionsDisplaySize);
|
prefer.commit('disableShowingAnimatedImages', store.s.disableShowingAnimatedImages);
|
||||||
prefer.set('limitWidthOfReaction', store.state.limitWidthOfReaction);
|
prefer.commit('emojiStyle', store.s.emojiStyle);
|
||||||
prefer.set('forceShowAds', store.state.forceShowAds);
|
prefer.commit('menuStyle', store.s.menuStyle);
|
||||||
prefer.set('aiChanMode', store.state.aiChanMode);
|
prefer.commit('useBlurEffectForModal', store.s.useBlurEffectForModal);
|
||||||
prefer.set('devMode', store.state.devMode);
|
prefer.commit('useBlurEffect', store.s.useBlurEffect);
|
||||||
prefer.set('mediaListWithOneImageAppearance', store.state.mediaListWithOneImageAppearance);
|
prefer.commit('showFixedPostForm', store.s.showFixedPostForm);
|
||||||
prefer.set('notificationPosition', store.state.notificationPosition);
|
prefer.commit('showFixedPostFormInChannel', store.s.showFixedPostFormInChannel);
|
||||||
prefer.set('notificationStackAxis', store.state.notificationStackAxis);
|
prefer.commit('enableInfiniteScroll', store.s.enableInfiniteScroll);
|
||||||
prefer.set('enableCondensedLine', store.state.enableCondensedLine);
|
prefer.commit('useReactionPickerForContextMenu', store.s.useReactionPickerForContextMenu);
|
||||||
prefer.set('keepScreenOn', store.state.keepScreenOn);
|
prefer.commit('showGapBetweenNotesInTimeline', store.s.showGapBetweenNotesInTimeline);
|
||||||
prefer.set('disableStreamingTimeline', store.state.disableStreamingTimeline);
|
prefer.commit('instanceTicker', store.s.instanceTicker);
|
||||||
prefer.set('useGroupedNotifications', store.state.useGroupedNotifications);
|
prefer.commit('emojiPickerScale', store.s.emojiPickerScale);
|
||||||
prefer.set('dataSaver', store.state.dataSaver);
|
prefer.commit('emojiPickerWidth', store.s.emojiPickerWidth);
|
||||||
prefer.set('enableSeasonalScreenEffect', store.state.enableSeasonalScreenEffect);
|
prefer.commit('emojiPickerHeight', store.s.emojiPickerHeight);
|
||||||
prefer.set('enableHorizontalSwipe', store.state.enableHorizontalSwipe);
|
prefer.commit('emojiPickerStyle', store.s.emojiPickerStyle);
|
||||||
prefer.set('useNativeUiForVideoAudioPlayer', store.state.useNativeUIForVideoAudioPlayer);
|
prefer.commit('reportError', store.s.reportError);
|
||||||
prefer.set('keepOriginalFilename', store.state.keepOriginalFilename);
|
prefer.commit('squareAvatars', store.s.squareAvatars);
|
||||||
prefer.set('alwaysConfirmFollow', store.state.alwaysConfirmFollow);
|
prefer.commit('showAvatarDecorations', store.s.showAvatarDecorations);
|
||||||
prefer.set('confirmWhenRevealingSensitiveMedia', store.state.confirmWhenRevealingSensitiveMedia);
|
prefer.commit('numberOfPageCache', store.s.numberOfPageCache);
|
||||||
prefer.set('contextMenu', store.state.contextMenu);
|
prefer.commit('showNoteActionsOnlyHover', store.s.showNoteActionsOnlyHover);
|
||||||
prefer.set('skipNoteRender', store.state.skipNoteRender);
|
prefer.commit('showClipButtonInNoteFooter', store.s.showClipButtonInNoteFooter);
|
||||||
prefer.set('showSoftWordMutedWord', store.state.showSoftWordMutedWord);
|
prefer.commit('reactionsDisplaySize', store.s.reactionsDisplaySize);
|
||||||
prefer.set('confirmOnReact', store.state.confirmOnReact);
|
prefer.commit('limitWidthOfReaction', store.s.limitWidthOfReaction);
|
||||||
prefer.set('sound.masterVolume', store.state.sound_masterVolume);
|
prefer.commit('forceShowAds', store.s.forceShowAds);
|
||||||
prefer.set('sound.notUseSound', store.state.sound_notUseSound);
|
prefer.commit('aiChanMode', store.s.aiChanMode);
|
||||||
prefer.set('sound.useSoundOnlyWhenActive', store.state.sound_useSoundOnlyWhenActive);
|
prefer.commit('devMode', store.s.devMode);
|
||||||
prefer.set('sound.on.note', store.state.sound_note as any);
|
prefer.commit('mediaListWithOneImageAppearance', store.s.mediaListWithOneImageAppearance);
|
||||||
prefer.set('sound.on.noteMy', store.state.sound_noteMy as any);
|
prefer.commit('notificationPosition', store.s.notificationPosition);
|
||||||
prefer.set('sound.on.notification', store.state.sound_notification as any);
|
prefer.commit('notificationStackAxis', store.s.notificationStackAxis);
|
||||||
prefer.set('sound.on.reaction', store.state.sound_reaction as any);
|
prefer.commit('enableCondensedLine', store.s.enableCondensedLine);
|
||||||
store.set('deck.profile', deckStore.state.profile);
|
prefer.commit('keepScreenOn', store.s.keepScreenOn);
|
||||||
store.set('deck.columns', deckStore.state.columns);
|
prefer.commit('disableStreamingTimeline', store.s.disableStreamingTimeline);
|
||||||
store.set('deck.layout', deckStore.state.layout);
|
prefer.commit('useGroupedNotifications', store.s.useGroupedNotifications);
|
||||||
|
prefer.commit('dataSaver', store.s.dataSaver);
|
||||||
|
prefer.commit('enableSeasonalScreenEffect', store.s.enableSeasonalScreenEffect);
|
||||||
|
prefer.commit('enableHorizontalSwipe', store.s.enableHorizontalSwipe);
|
||||||
|
prefer.commit('useNativeUiForVideoAudioPlayer', store.s.useNativeUIForVideoAudioPlayer);
|
||||||
|
prefer.commit('keepOriginalFilename', store.s.keepOriginalFilename);
|
||||||
|
prefer.commit('alwaysConfirmFollow', store.s.alwaysConfirmFollow);
|
||||||
|
prefer.commit('confirmWhenRevealingSensitiveMedia', store.s.confirmWhenRevealingSensitiveMedia);
|
||||||
|
prefer.commit('contextMenu', store.s.contextMenu);
|
||||||
|
prefer.commit('skipNoteRender', store.s.skipNoteRender);
|
||||||
|
prefer.commit('showSoftWordMutedWord', store.s.showSoftWordMutedWord);
|
||||||
|
prefer.commit('confirmOnReact', store.s.confirmOnReact);
|
||||||
|
prefer.commit('sound.masterVolume', store.s.sound_masterVolume);
|
||||||
|
prefer.commit('sound.notUseSound', store.s.sound_notUseSound);
|
||||||
|
prefer.commit('sound.useSoundOnlyWhenActive', store.s.sound_useSoundOnlyWhenActive);
|
||||||
|
prefer.commit('sound.on.note', store.s.sound_note as any);
|
||||||
|
prefer.commit('sound.on.noteMy', store.s.sound_noteMy as any);
|
||||||
|
prefer.commit('sound.on.notification', store.s.sound_notification as any);
|
||||||
|
prefer.commit('sound.on.reaction', store.s.sound_reaction as any);
|
||||||
store.set('menu', []);
|
store.set('menu', []);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (store.state.accountSetupWizard !== -1) {
|
if (store.s.accountSetupWizard !== -1) {
|
||||||
const { dispose } = popup(defineAsyncComponent(() => import('@/components/MkUserSetupDialog.vue')), {}, {
|
const { dispose } = popup(defineAsyncComponent(() => import('@/components/MkUserSetupDialog.vue')), {}, {
|
||||||
closed: () => dispose(),
|
closed: () => dispose(),
|
||||||
});
|
});
|
||||||
@@ -502,7 +523,7 @@ export async function mainBoot() {
|
|||||||
post();
|
post();
|
||||||
},
|
},
|
||||||
'd': () => {
|
'd': () => {
|
||||||
store.set('darkMode', !store.state.darkMode);
|
store.set('darkMode', !store.s.darkMode);
|
||||||
},
|
},
|
||||||
's': () => {
|
's': () => {
|
||||||
mainRouter.push('/search');
|
mainRouter.push('/search');
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ const emojiDb = computed(() => {
|
|||||||
url: char2path(x.char),
|
url: char2path(x.char),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
for (const index of Object.values(store.state.additionalUnicodeEmojiIndexes)) {
|
for (const index of Object.values(store.s.additionalUnicodeEmojiIndexes)) {
|
||||||
for (const [emoji, keywords] of Object.entries(index)) {
|
for (const [emoji, keywords] of Object.entries(index)) {
|
||||||
for (const k of keywords) {
|
for (const k of keywords) {
|
||||||
unicodeEmojiDB.push({
|
unicodeEmojiDB.push({
|
||||||
@@ -155,7 +155,7 @@ function complete(type: string, value: any) {
|
|||||||
emit('done', { type, value });
|
emit('done', { type, value });
|
||||||
emit('closed');
|
emit('closed');
|
||||||
if (type === 'emoji') {
|
if (type === 'emoji') {
|
||||||
let recents = store.state.recentlyUsedEmojis;
|
let recents = store.s.recentlyUsedEmojis;
|
||||||
recents = recents.filter((emoji: any) => emoji !== value);
|
recents = recents.filter((emoji: any) => emoji !== value);
|
||||||
recents.unshift(value);
|
recents.unshift(value);
|
||||||
store.set('recentlyUsedEmojis', recents.splice(0, 32));
|
store.set('recentlyUsedEmojis', recents.splice(0, 32));
|
||||||
@@ -238,7 +238,7 @@ function exec() {
|
|||||||
} else if (props.type === 'emoji') {
|
} else if (props.type === 'emoji') {
|
||||||
if (!props.q || props.q === '') {
|
if (!props.q || props.q === '') {
|
||||||
// 最近使った絵文字をサジェスト
|
// 最近使った絵文字をサジェスト
|
||||||
emojis.value = store.state.recentlyUsedEmojis.map(emoji => emojiDb.value.find(dbEmoji => dbEmoji.emoji === emoji)).filter(x => x) as EmojiDef[];
|
emojis.value = store.s.recentlyUsedEmojis.map(emoji => emojiDb.value.find(dbEmoji => dbEmoji.emoji === emoji)).filter(x => x) as EmojiDef[];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ async function requestRender() {
|
|||||||
|
|
||||||
captchaWidgetId.value = captcha.value.render(elem, {
|
captchaWidgetId.value = captcha.value.render(elem, {
|
||||||
sitekey: props.sitekey,
|
sitekey: props.sitekey,
|
||||||
theme: store.state.darkMode ? 'dark' : 'light',
|
theme: store.s.darkMode ? 'dark' : 'light',
|
||||||
callback: callback,
|
callback: callback,
|
||||||
'expired-callback': () => callback(undefined),
|
'expired-callback': () => callback(undefined),
|
||||||
'error-callback': () => callback(undefined),
|
'error-callback': () => callback(undefined),
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ const render = () => {
|
|||||||
chartInstance.destroy();
|
chartInstance.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
const vLineColor = store.state.darkMode ? 'rgba(255, 255, 255, 0.2)' : 'rgba(0, 0, 0, 0.2)';
|
const vLineColor = store.s.darkMode ? 'rgba(255, 255, 255, 0.2)' : 'rgba(0, 0, 0, 0.2)';
|
||||||
|
|
||||||
const maxes = chartData.series.map((x, i) => Math.max(...x.data.map(d => d.y)));
|
const maxes = chartData.series.map((x, i) => Math.max(...x.data.map(d => d.y)));
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ const props = defineProps<{
|
|||||||
}>();
|
}>();
|
||||||
|
|
||||||
const highlighter = await getHighlighter();
|
const highlighter = await getHighlighter();
|
||||||
const darkMode = store.reactiveState.darkMode;
|
const darkMode = store.r.darkMode;
|
||||||
const codeLang = ref<BundledLanguage | 'aiscript'>('js');
|
const codeLang = ref<BundledLanguage | 'aiscript'>('js');
|
||||||
|
|
||||||
const [lightThemeName, darkThemeName] = await Promise.all([
|
const [lightThemeName, darkThemeName] = await Promise.all([
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ function deleteFolder() {
|
|||||||
folderId: props.folder.id,
|
folderId: props.folder.id,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
if (prefer.s.uploadFolder === props.folder.id) {
|
if (prefer.s.uploadFolder === props.folder.id) {
|
||||||
prefer.set('uploadFolder', null);
|
prefer.commit('uploadFolder', null);
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
switch (err.id) {
|
switch (err.id) {
|
||||||
@@ -266,7 +266,7 @@ function deleteFolder() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setAsUploadFolder() {
|
function setAsUploadFolder() {
|
||||||
prefer.set('uploadFolder', props.folder.id);
|
prefer.commit('uploadFolder', props.folder.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onContextmenu(ev: MouseEvent) {
|
function onContextmenu(ev: MouseEvent) {
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ const {
|
|||||||
emojiPickerHeight,
|
emojiPickerHeight,
|
||||||
} = prefer.r;
|
} = prefer.r;
|
||||||
|
|
||||||
const recentlyUsedEmojis = store.reactiveState.recentlyUsedEmojis;
|
const recentlyUsedEmojis = store.r.recentlyUsedEmojis;
|
||||||
|
|
||||||
const recentlyUsedEmojisDef = computed(() => {
|
const recentlyUsedEmojisDef = computed(() => {
|
||||||
return recentlyUsedEmojis.value.map(getDef);
|
return recentlyUsedEmojis.value.map(getDef);
|
||||||
@@ -319,7 +319,7 @@ watch(q, () => {
|
|||||||
}
|
}
|
||||||
if (matches.size >= max) return matches;
|
if (matches.size >= max) return matches;
|
||||||
|
|
||||||
for (const index of Object.values(store.state.additionalUnicodeEmojiIndexes)) {
|
for (const index of Object.values(store.s.additionalUnicodeEmojiIndexes)) {
|
||||||
for (const emoji of emojis) {
|
for (const emoji of emojis) {
|
||||||
if (keywords.every(keyword => index[emoji.char].some(k => k.includes(keyword)))) {
|
if (keywords.every(keyword => index[emoji.char].some(k => k.includes(keyword)))) {
|
||||||
matches.add(emoji);
|
matches.add(emoji);
|
||||||
@@ -336,7 +336,7 @@ watch(q, () => {
|
|||||||
}
|
}
|
||||||
if (matches.size >= max) return matches;
|
if (matches.size >= max) return matches;
|
||||||
|
|
||||||
for (const index of Object.values(store.state.additionalUnicodeEmojiIndexes)) {
|
for (const index of Object.values(store.s.additionalUnicodeEmojiIndexes)) {
|
||||||
for (const emoji of emojis) {
|
for (const emoji of emojis) {
|
||||||
if (index[emoji.char].some(k => k.startsWith(newQ))) {
|
if (index[emoji.char].some(k => k.startsWith(newQ))) {
|
||||||
matches.add(emoji);
|
matches.add(emoji);
|
||||||
@@ -353,7 +353,7 @@ watch(q, () => {
|
|||||||
}
|
}
|
||||||
if (matches.size >= max) return matches;
|
if (matches.size >= max) return matches;
|
||||||
|
|
||||||
for (const index of Object.values(store.state.additionalUnicodeEmojiIndexes)) {
|
for (const index of Object.values(store.s.additionalUnicodeEmojiIndexes)) {
|
||||||
for (const emoji of emojis) {
|
for (const emoji of emojis) {
|
||||||
if (index[emoji.char].some(k => k.includes(newQ))) {
|
if (index[emoji.char].some(k => k.includes(newQ))) {
|
||||||
matches.add(emoji);
|
matches.add(emoji);
|
||||||
@@ -429,7 +429,7 @@ function chosen(emoji: string | Misskey.entities.EmojiSimple | UnicodeEmojiDef,
|
|||||||
|
|
||||||
// 最近使った絵文字更新
|
// 最近使った絵文字更新
|
||||||
if (!pinned.value?.includes(key)) {
|
if (!pinned.value?.includes(key)) {
|
||||||
let recents = store.state.recentlyUsedEmojis;
|
let recents = store.s.recentlyUsedEmojis;
|
||||||
recents = recents.filter((emoji) => emoji !== key);
|
recents = recents.filter((emoji) => emoji !== key);
|
||||||
recents.unshift(key);
|
recents.unshift(key);
|
||||||
store.set('recentlyUsedEmojis', recents.splice(0, 32));
|
store.set('recentlyUsedEmojis', recents.splice(0, 32));
|
||||||
|
|||||||
@@ -121,11 +121,11 @@ async function onClick() {
|
|||||||
} else {
|
} else {
|
||||||
await misskeyApi('following/create', {
|
await misskeyApi('following/create', {
|
||||||
userId: props.user.id,
|
userId: props.user.id,
|
||||||
withReplies: store.state.defaultWithReplies,
|
withReplies: store.s.defaultWithReplies,
|
||||||
});
|
});
|
||||||
emit('update:user', {
|
emit('update:user', {
|
||||||
...props.user,
|
...props.user,
|
||||||
withReplies: store.state.defaultWithReplies,
|
withReplies: store.s.defaultWithReplies,
|
||||||
});
|
});
|
||||||
hasPendingFollowRequestFromYou.value = true;
|
hasPendingFollowRequestFromYou.value = true;
|
||||||
|
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ async function renderChart() {
|
|||||||
|
|
||||||
await nextTick();
|
await nextTick();
|
||||||
|
|
||||||
const color = store.state.darkMode ? '#b4e900' : '#86b300';
|
const color = store.s.darkMode ? '#b4e900' : '#86b300';
|
||||||
|
|
||||||
// 視覚上の分かりやすさのため上から最も大きい3つの値の平均を最大値とする
|
// 視覚上の分かりやすさのため上から最も大きい3つの値の平均を最大値とする
|
||||||
const max = values.slice().sort((a, b) => b - a).slice(0, 3).reduce((a, b) => a + b, 0) / 3;
|
const max = values.slice().sort((a, b) => b - a).slice(0, 3).reduce((a, b) => a + b, 0) / 3;
|
||||||
|
|||||||
@@ -32,19 +32,20 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
import { computed, onMounted, onUnmounted, provide, ref, shallowRef } from 'vue';
|
import { computed, onMounted, onUnmounted, provide, ref, shallowRef } from 'vue';
|
||||||
import { url } from '@@/js/config.js';
|
import { url } from '@@/js/config.js';
|
||||||
import { getScrollContainer } from '@@/js/scroll.js';
|
import { getScrollContainer } from '@@/js/scroll.js';
|
||||||
import type { PageMetadata } from '@/utility/page-metadata.js';
|
import type { PageMetadata } from '@/page.js';
|
||||||
import RouterView from '@/components/global/RouterView.vue';
|
import RouterView from '@/components/global/RouterView.vue';
|
||||||
import MkWindow from '@/components/MkWindow.vue';
|
import MkWindow from '@/components/MkWindow.vue';
|
||||||
import { popout as _popout } from '@/utility/popout.js';
|
import { popout as _popout } from '@/utility/popout.js';
|
||||||
import { copyToClipboard } from '@/utility/copy-to-clipboard.js';
|
import { copyToClipboard } from '@/utility/copy-to-clipboard.js';
|
||||||
import { useScrollPositionManager } from '@/nirax.js';
|
import { useScrollPositionManager } from '@/nirax.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { provideMetadataReceiver, provideReactiveMetadata } from '@/utility/page-metadata.js';
|
import { provideMetadataReceiver, provideReactiveMetadata } from '@/page.js';
|
||||||
import { openingWindowsCount } from '@/os.js';
|
import { openingWindowsCount } from '@/os.js';
|
||||||
import { claimAchievement } from '@/utility/achievements.js';
|
import { claimAchievement } from '@/utility/achievements.js';
|
||||||
import { useRouterFactory } from '@/router/supplier.js';
|
import { useRouterFactory } from '@/router/supplier.js';
|
||||||
import { mainRouter } from '@/router/main.js';
|
import { mainRouter } from '@/router/main.js';
|
||||||
import { analytics } from '@/analytics.js';
|
import { analytics } from '@/analytics.js';
|
||||||
|
import { DI } from '@/di.js';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
initialPath: string;
|
initialPath: string;
|
||||||
@@ -119,7 +120,7 @@ windowRouter.addListener('change', ctx => {
|
|||||||
|
|
||||||
windowRouter.init();
|
windowRouter.init();
|
||||||
|
|
||||||
provide('router', windowRouter);
|
provide(DI.router, windowRouter);
|
||||||
provide('inAppSearchMarkerId', searchMarkerId);
|
provide('inAppSearchMarkerId', searchMarkerId);
|
||||||
provideMetadataReceiver((metadataGetter) => {
|
provideMetadataReceiver((metadataGetter) => {
|
||||||
const info = metadataGetter();
|
const info = metadataGetter();
|
||||||
|
|||||||
@@ -176,18 +176,18 @@ const text = ref(props.initialText ?? '');
|
|||||||
const files = ref(props.initialFiles ?? []);
|
const files = ref(props.initialFiles ?? []);
|
||||||
const poll = ref<PollEditorModelValue | null>(null);
|
const poll = ref<PollEditorModelValue | null>(null);
|
||||||
const useCw = ref<boolean>(!!props.initialCw);
|
const useCw = ref<boolean>(!!props.initialCw);
|
||||||
const showPreview = ref(store.state.showPreview);
|
const showPreview = ref(store.s.showPreview);
|
||||||
watch(showPreview, () => store.set('showPreview', showPreview.value));
|
watch(showPreview, () => store.set('showPreview', showPreview.value));
|
||||||
const showAddMfmFunction = ref(prefer.s.enableQuickAddMfmFunction);
|
const showAddMfmFunction = ref(prefer.s.enableQuickAddMfmFunction);
|
||||||
watch(showAddMfmFunction, () => prefer.set('enableQuickAddMfmFunction', showAddMfmFunction.value));
|
watch(showAddMfmFunction, () => prefer.commit('enableQuickAddMfmFunction', showAddMfmFunction.value));
|
||||||
const cw = ref<string | null>(props.initialCw ?? null);
|
const cw = ref<string | null>(props.initialCw ?? null);
|
||||||
const localOnly = ref(props.initialLocalOnly ?? (prefer.s.rememberNoteVisibility ? store.state.localOnly : prefer.s.defaultNoteLocalOnly));
|
const localOnly = ref(props.initialLocalOnly ?? (prefer.s.rememberNoteVisibility ? store.s.localOnly : prefer.s.defaultNoteLocalOnly));
|
||||||
const visibility = ref(props.initialVisibility ?? (prefer.s.rememberNoteVisibility ? store.state.visibility : prefer.s.defaultNoteVisibility));
|
const visibility = ref(props.initialVisibility ?? (prefer.s.rememberNoteVisibility ? store.s.visibility : prefer.s.defaultNoteVisibility));
|
||||||
const visibleUsers = ref<Misskey.entities.UserDetailed[]>([]);
|
const visibleUsers = ref<Misskey.entities.UserDetailed[]>([]);
|
||||||
if (props.initialVisibleUsers) {
|
if (props.initialVisibleUsers) {
|
||||||
props.initialVisibleUsers.forEach(u => pushVisibleUser(u));
|
props.initialVisibleUsers.forEach(u => pushVisibleUser(u));
|
||||||
}
|
}
|
||||||
const reactionAcceptance = ref(store.state.reactionAcceptance);
|
const reactionAcceptance = ref(store.s.reactionAcceptance);
|
||||||
const draghover = ref(false);
|
const draghover = ref(false);
|
||||||
const quoteId = ref<string | null>(null);
|
const quoteId = ref<string | null>(null);
|
||||||
const hasNotSpecifiedMentions = ref(false);
|
const hasNotSpecifiedMentions = ref(false);
|
||||||
@@ -265,7 +265,13 @@ const canPost = computed((): boolean => {
|
|||||||
quoteId.value != null
|
quoteId.value != null
|
||||||
) &&
|
) &&
|
||||||
(textLength.value <= maxTextLength.value) &&
|
(textLength.value <= maxTextLength.value) &&
|
||||||
(cwTextLength.value <= maxCwTextLength) &&
|
(
|
||||||
|
useCw.value ?
|
||||||
|
(
|
||||||
|
cw.value != null && cw.value.trim() !== '' &&
|
||||||
|
cwTextLength.value <= maxCwTextLength
|
||||||
|
) : true
|
||||||
|
) &&
|
||||||
(files.value.length <= 16) &&
|
(files.value.length <= 16) &&
|
||||||
(!poll.value || poll.value.choices.length >= 2);
|
(!poll.value || poll.value.choices.length >= 2);
|
||||||
});
|
});
|
||||||
@@ -744,14 +750,6 @@ function isAnnoying(text: string): boolean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function post(ev?: MouseEvent) {
|
async function post(ev?: MouseEvent) {
|
||||||
if (useCw.value && (cw.value == null || cw.value.trim() === '')) {
|
|
||||||
os.alert({
|
|
||||||
type: 'error',
|
|
||||||
text: i18n.ts.cwNotationRequired,
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ev) {
|
if (ev) {
|
||||||
const el = (ev.currentTarget ?? ev.target) as HTMLElement | null;
|
const el = (ev.currentTarget ?? ev.target) as HTMLElement | null;
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ async function renderChart() {
|
|||||||
|
|
||||||
await nextTick();
|
await nextTick();
|
||||||
|
|
||||||
const color = store.state.darkMode ? '#b4e900' : '#86b300';
|
const color = store.s.darkMode ? '#b4e900' : '#86b300';
|
||||||
|
|
||||||
const getYYYYMMDD = (date: Date) => {
|
const getYYYYMMDD = (date: Date) => {
|
||||||
const y = date.getFullYear().toString().padStart(2, '0');
|
const y = date.getFullYear().toString().padStart(2, '0');
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ const getDate = (ymd: string) => {
|
|||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
let raw = await misskeyApi('retention', { });
|
let raw = await misskeyApi('retention', { });
|
||||||
|
|
||||||
const vLineColor = store.state.darkMode ? 'rgba(255, 255, 255, 0.2)' : 'rgba(0, 0, 0, 0.2)';
|
const vLineColor = store.s.darkMode ? 'rgba(255, 255, 255, 0.2)' : 'rgba(0, 0, 0, 0.2)';
|
||||||
|
|
||||||
const accent = tinycolor(getComputedStyle(document.documentElement).getPropertyValue('--MI_THEME-accent'));
|
const accent = tinycolor(getComputedStyle(document.documentElement).getPropertyValue('--MI_THEME-accent'));
|
||||||
const color = accent.toHex();
|
const color = accent.toHex();
|
||||||
|
|||||||
96
packages/frontend/src/components/MkThemePreview.vue
Normal file
96
packages/frontend/src/components/MkThemePreview.vue
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
<!--
|
||||||
|
SPDX-FileCopyrightText: syuilo and misskey-project
|
||||||
|
SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<svg
|
||||||
|
version="1.1"
|
||||||
|
viewBox="0 0 203.2 152.4"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
>
|
||||||
|
<g fill-rule="evenodd">
|
||||||
|
<rect width="203.2" height="152.4" :fill="themeVariables.bg" stroke-width=".26458" />
|
||||||
|
<rect width="65.498" height="152.4" :fill="themeVariables.panel" stroke-width=".26458" />
|
||||||
|
<rect x="65.498" width="137.7" height="40.892" :fill="themeVariables.acrylicBg" stroke-width=".265" />
|
||||||
|
<path transform="scale(.26458)" d="m439.77 247.19c-43.673 0-78.832 35.157-78.832 78.83v249.98h407.06v-328.81z" :fill="themeVariables.panel" />
|
||||||
|
</g>
|
||||||
|
<circle cx="32.749" cy="83.054" r="21.132" :fill="themeVariables.accentedBg" stroke-dasharray="0.319256, 0.319256" stroke-width=".15963" style="paint-order:stroke fill markers" />
|
||||||
|
<circle cx="136.67" cy="106.76" r="23.876" :fill="themeVariables.fg" fill-opacity="0.5" stroke-dasharray="0.352425, 0.352425" stroke-width=".17621" style="paint-order:stroke fill markers" />
|
||||||
|
<g :fill="themeVariables.fg" fill-rule="evenodd" stroke-width=".26458">
|
||||||
|
<rect x="171.27" y="87.815" width="48.576" height="6.8747" ry="3.4373"/>
|
||||||
|
<rect x="171.27" y="105.09" width="48.576" height="6.875" ry="3.4375"/>
|
||||||
|
<rect x="171.27" y="121.28" width="48.576" height="6.875" ry="3.4375"/>
|
||||||
|
<rect x="171.27" y="137.47" width="48.576" height="6.875" ry="3.4375"/>
|
||||||
|
</g>
|
||||||
|
<path d="m65.498 40.892h137.7" :stroke="themeVariables.divider" stroke-width="0.75" />
|
||||||
|
<g transform="matrix(.60823 0 0 .60823 25.45 75.755)" fill="none" :stroke="themeVariables.accent" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
|
||||||
|
<path d="m0 0h24v24h-24z" fill="none" stroke="none" />
|
||||||
|
<path d="m5 12h-2l9-9 9 9h-2" />
|
||||||
|
<path d="m5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-7" />
|
||||||
|
<path d="m9 21v-6a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v6" />
|
||||||
|
</g>
|
||||||
|
<g transform="matrix(.61621 0 0 .61621 25.354 117.92)" fill="none" :stroke="themeVariables.fg" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
|
||||||
|
<path d="m0 0h24v24h-24z" fill="none" stroke="none" />
|
||||||
|
<path d="m10 5a2 2 0 1 1 4 0 7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2-3v-3a7 7 0 0 1 4-6" />
|
||||||
|
<path d="m9 17v1a3 3 0 0 0 6 0v-1" />
|
||||||
|
</g>
|
||||||
|
<image x="20.948" y="18.388" width="23.602" height="23.602" image-rendering="optimizeSpeed" preserveAspectRatio="xMidYMid meet" v-bind="{ 'xlink:href': instance.iconUrl || '/favicon.ico' }" />
|
||||||
|
</svg>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, watch } from 'vue';
|
||||||
|
import { instance } from '@/instance.js';
|
||||||
|
import { compile } from '@/theme.js';
|
||||||
|
import type { Theme } from '@/theme.js';
|
||||||
|
import { deepClone } from '@/utility/clone.js';
|
||||||
|
import lightTheme from '@@/themes/_light.json5';
|
||||||
|
import darkTheme from '@@/themes/_dark.json5';
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
theme: Theme;
|
||||||
|
}>();
|
||||||
|
|
||||||
|
const themeVariables = ref<{
|
||||||
|
bg: string;
|
||||||
|
acrylicBg: string;
|
||||||
|
panel: string;
|
||||||
|
fg: string;
|
||||||
|
divider: string;
|
||||||
|
accent: string;
|
||||||
|
accentedBg: string;
|
||||||
|
}>({
|
||||||
|
bg: 'var(--MI_THEME-bg)',
|
||||||
|
acrylicBg: 'var(--MI_THEME-acrylicBg)',
|
||||||
|
panel: 'var(--MI_THEME-panel)',
|
||||||
|
fg: 'var(--MI_THEME-fg)',
|
||||||
|
divider: 'var(--MI_THEME-divider)',
|
||||||
|
accent: 'var(--MI_THEME-accent)',
|
||||||
|
accentedBg: 'var(--MI_THEME-accentedBg)',
|
||||||
|
});
|
||||||
|
|
||||||
|
watch(() => props.theme, (theme) => {
|
||||||
|
if (theme == null) return;
|
||||||
|
|
||||||
|
const _theme = deepClone(theme);
|
||||||
|
|
||||||
|
if (_theme?.base != null) {
|
||||||
|
const base = [lightTheme, darkTheme].find(x => x.id === _theme.base);
|
||||||
|
if (base) _theme.props = Object.assign({}, base.props, _theme.props);
|
||||||
|
}
|
||||||
|
|
||||||
|
const compiled = compile(_theme);
|
||||||
|
|
||||||
|
themeVariables.value = {
|
||||||
|
bg: compiled.bg ?? 'var(--MI_THEME-bg)',
|
||||||
|
acrylicBg: compiled.acrylicBg ?? 'var(--MI_THEME-acrylicBg)',
|
||||||
|
panel: compiled.panel ?? 'var(--MI_THEME-panel)',
|
||||||
|
fg: compiled.fg ?? 'var(--MI_THEME-fg)',
|
||||||
|
divider: compiled.divider ?? 'var(--MI_THEME-divider)',
|
||||||
|
accent: compiled.accent ?? 'var(--MI_THEME-accent)',
|
||||||
|
accentedBg: compiled.accentedBg ?? 'var(--MI_THEME-accentedBg)',
|
||||||
|
};
|
||||||
|
}, { immediate: true });
|
||||||
|
</script>
|
||||||
@@ -34,7 +34,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
sandbox="allow-popups allow-popups-to-escape-sandbox allow-scripts allow-same-origin"
|
sandbox="allow-popups allow-popups-to-escape-sandbox allow-scripts allow-same-origin"
|
||||||
scrolling="no"
|
scrolling="no"
|
||||||
:style="{ position: 'relative', width: '100%', height: `${tweetHeight}px`, border: 0 }"
|
:style="{ position: 'relative', width: '100%', height: `${tweetHeight}px`, border: 0 }"
|
||||||
:src="`https://platform.twitter.com/embed/index.html?embedId=${embedId}&hideCard=false&hideThread=false&lang=en&theme=${store.state.darkMode ? 'dark' : 'light'}&id=${tweetId}`"
|
:src="`https://platform.twitter.com/embed/index.html?embedId=${embedId}&hideCard=false&hideThread=false&lang=en&theme=${store.s.darkMode ? 'dark' : 'light'}&id=${tweetId}`"
|
||||||
></iframe>
|
></iframe>
|
||||||
</div>
|
</div>
|
||||||
<div :class="$style.action">
|
<div :class="$style.action">
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ async function ok() {
|
|||||||
dialogEl.value?.close();
|
dialogEl.value?.close();
|
||||||
|
|
||||||
// 最近使ったユーザー更新
|
// 最近使ったユーザー更新
|
||||||
let recents = store.state.recentlyUsedUsers;
|
let recents = store.s.recentlyUsedUsers;
|
||||||
recents = recents.filter(x => x !== selected.value?.id);
|
recents = recents.filter(x => x !== selected.value?.id);
|
||||||
recents.unshift(selected.value.id);
|
recents.unshift(selected.value.id);
|
||||||
store.set('recentlyUsedUsers', recents.splice(0, 16));
|
store.set('recentlyUsedUsers', recents.splice(0, 16));
|
||||||
@@ -141,7 +141,7 @@ function cancel() {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
misskeyApi('users/show', {
|
misskeyApi('users/show', {
|
||||||
userIds: store.state.recentlyUsedUsers,
|
userIds: store.s.recentlyUsedUsers,
|
||||||
}).then(foundUsers => {
|
}).then(foundUsers => {
|
||||||
let _users = foundUsers;
|
let _users = foundUsers;
|
||||||
_users = _users.filter((u) => {
|
_users = _users.filter((u) => {
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ const emit = defineEmits<{
|
|||||||
const dialog = shallowRef<InstanceType<typeof MkModalWindow>>();
|
const dialog = shallowRef<InstanceType<typeof MkModalWindow>>();
|
||||||
|
|
||||||
// eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
// eslint-disable-next-line vue/no-setup-props-reactivity-loss
|
||||||
const page = ref(store.state.accountSetupWizard);
|
const page = ref(store.s.accountSetupWizard);
|
||||||
|
|
||||||
watch(page, () => {
|
watch(page, () => {
|
||||||
store.set('accountSetupWizard', page.value);
|
store.set('accountSetupWizard', page.value);
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ async function renderChart() {
|
|||||||
|
|
||||||
await nextTick();
|
await nextTick();
|
||||||
|
|
||||||
const vLineColor = store.state.darkMode ? 'rgba(255, 255, 255, 0.2)' : 'rgba(0, 0, 0, 0.2)';
|
const vLineColor = store.s.darkMode ? 'rgba(255, 255, 255, 0.2)' : 'rgba(0, 0, 0, 0.2)';
|
||||||
|
|
||||||
const computedStyle = getComputedStyle(document.documentElement);
|
const computedStyle = getComputedStyle(document.documentElement);
|
||||||
const accent = tinycolor(computedStyle.getPropertyValue('--MI_THEME-accent')).toHexString();
|
const accent = tinycolor(computedStyle.getPropertyValue('--MI_THEME-accent')).toHexString();
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ const choseAd = (): Ad | null => {
|
|||||||
return props.specify;
|
return props.specify;
|
||||||
}
|
}
|
||||||
|
|
||||||
const allAds = instance.ads.map(ad => store.state.mutedAds.includes(ad.id) ? {
|
const allAds = instance.ads.map(ad => store.s.mutedAds.includes(ad.id) ? {
|
||||||
...ad,
|
...ad,
|
||||||
ratio: 0,
|
ratio: 0,
|
||||||
} : ad);
|
} : ad);
|
||||||
@@ -112,7 +112,7 @@ const shouldHide = ref(!prefer.s.forceShowAds && $i && $i.policies.canHideAds &&
|
|||||||
|
|
||||||
function reduceFrequency(): void {
|
function reduceFrequency(): void {
|
||||||
if (chosen.value == null) return;
|
if (chosen.value == null) return;
|
||||||
if (store.state.mutedAds.includes(chosen.value.id)) return;
|
if (store.s.mutedAds.includes(chosen.value.id)) return;
|
||||||
store.push('mutedAds', chosen.value.id);
|
store.push('mutedAds', chosen.value.id);
|
||||||
os.success();
|
os.success();
|
||||||
chosen.value = choseAd();
|
chosen.value = choseAd();
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div :class="[$style.spacer, store.reactiveState.darkMode.value ? $style.dark : $style.light]"></div>
|
<div :class="[$style.spacer, store.r.darkMode.value ? $style.dark : $style.light]"></div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
|||||||
@@ -47,9 +47,9 @@ import { scrollToTop } from '@@/js/scroll.js';
|
|||||||
import XTabs from './MkPageHeader.tabs.vue';
|
import XTabs from './MkPageHeader.tabs.vue';
|
||||||
import type { Tab } from './MkPageHeader.tabs.vue';
|
import type { Tab } from './MkPageHeader.tabs.vue';
|
||||||
import type { PageHeaderItem } from '@/types/page-header.js';
|
import type { PageHeaderItem } from '@/types/page-header.js';
|
||||||
import type { PageMetadata } from '@/utility/page-metadata.js';
|
import type { PageMetadata } from '@/page.js';
|
||||||
import { globalEvents } from '@/events.js';
|
import { globalEvents } from '@/events.js';
|
||||||
import { injectReactiveMetadata } from '@/utility/page-metadata.js';
|
import { injectReactiveMetadata } from '@/page.js';
|
||||||
import { $i, openAccountMenu as openAccountMenu_ } from '@/account.js';
|
import { $i, openAccountMenu as openAccountMenu_ } from '@/account.js';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
|
|||||||
@@ -24,20 +24,21 @@ import type { IRouter, Resolved, RouteDef } from '@/nirax.js';
|
|||||||
import { prefer } from '@/preferences.js';
|
import { prefer } from '@/preferences.js';
|
||||||
import { globalEvents } from '@/events.js';
|
import { globalEvents } from '@/events.js';
|
||||||
import MkLoadingPage from '@/pages/_loading_.vue';
|
import MkLoadingPage from '@/pages/_loading_.vue';
|
||||||
|
import { DI } from '@/di.js';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
router?: IRouter;
|
router?: IRouter;
|
||||||
nested?: boolean;
|
nested?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const router = props.router ?? inject('router');
|
const router = props.router ?? inject(DI.router);
|
||||||
|
|
||||||
if (router == null) {
|
if (router == null) {
|
||||||
throw new Error('no router provided');
|
throw new Error('no router provided');
|
||||||
}
|
}
|
||||||
|
|
||||||
const currentDepth = inject('routerCurrentDepth', 0);
|
const currentDepth = inject(DI.routerCurrentDepth, 0);
|
||||||
provide('routerCurrentDepth', currentDepth + 1);
|
provide(DI.routerCurrentDepth, currentDepth + 1);
|
||||||
|
|
||||||
function resolveNested(current: Resolved, d = 0): Resolved | null {
|
function resolveNested(current: Resolved, d = 0): Resolved | null {
|
||||||
if (!props.nested) return current;
|
if (!props.nested) return current;
|
||||||
|
|||||||
@@ -3,13 +3,23 @@
|
|||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { throttle } from 'throttle-debounce';
|
|
||||||
import { notificationTypes } from 'misskey-js';
|
import { notificationTypes } from 'misskey-js';
|
||||||
|
import { ref } from 'vue';
|
||||||
|
import { v4 as uuid } from 'uuid';
|
||||||
|
import { i18n } from './i18n.js';
|
||||||
import type { BasicTimelineType } from '@/timelines.js';
|
import type { BasicTimelineType } from '@/timelines.js';
|
||||||
import type { SoundStore } from '@/preferences/def.js';
|
import type { SoundStore } from '@/preferences/def.js';
|
||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import type { MenuItem } from '@/types/menu.js';
|
||||||
import { deepClone } from '@/utility/clone.js';
|
import { deepClone } from '@/utility/clone.js';
|
||||||
import { store } from '@/store.js';
|
import { prefer } from '@/preferences.js';
|
||||||
|
import * as os from '@/os.js';
|
||||||
|
|
||||||
|
export type DeckProfile = {
|
||||||
|
name: string;
|
||||||
|
id: string;
|
||||||
|
columns: Column[];
|
||||||
|
layout: Column['id'][][];
|
||||||
|
};
|
||||||
|
|
||||||
type ColumnWidget = {
|
type ColumnWidget = {
|
||||||
name: string;
|
name: string;
|
||||||
@@ -53,127 +63,132 @@ export type Column = {
|
|||||||
soundSetting?: SoundStore;
|
soundSetting?: SoundStore;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const loadDeck = async () => {
|
const _currentProfile = prefer.s['deck.profiles'].find(p => p.name === prefer.s['deck.profile']);
|
||||||
let deck;
|
const __currentProfile = _currentProfile ? deepClone(_currentProfile) : null;
|
||||||
|
export const columns = ref(__currentProfile ? __currentProfile.columns : []);
|
||||||
|
export const layout = ref(__currentProfile ? __currentProfile.layout : []);
|
||||||
|
|
||||||
try {
|
if (prefer.s['deck.profile'] == null) {
|
||||||
deck = await misskeyApi('i/registry/get', {
|
addProfile('Main');
|
||||||
scope: ['client', 'deck', 'profiles'],
|
|
||||||
key: store.state['deck.profile'],
|
|
||||||
});
|
|
||||||
} catch (err) {
|
|
||||||
if (typeof err === 'object' && err != null && 'code' in err && err.code === 'NO_SUCH_KEY') {
|
|
||||||
// 後方互換性のため
|
|
||||||
if (store.state['deck.profile'] === 'default') {
|
|
||||||
saveDeck();
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
store.set('deck.columns', []);
|
export function forceSaveCurrentDeckProfile() {
|
||||||
store.set('deck.layout', []);
|
const currentProfile = prefer.s['deck.profiles'].find(p => p.name === prefer.s['deck.profile']);
|
||||||
return;
|
if (currentProfile == null) return;
|
||||||
}
|
|
||||||
throw err;
|
const newProfile = deepClone(currentProfile);
|
||||||
|
newProfile.columns = columns.value;
|
||||||
|
newProfile.layout = layout.value;
|
||||||
|
|
||||||
|
const newProfiles = prefer.s['deck.profiles'].filter(p => p.name !== prefer.s['deck.profile']);
|
||||||
|
newProfiles.push(newProfile);
|
||||||
|
prefer.commit('deck.profiles', newProfiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
store.set('deck.columns', deck.columns);
|
export const saveCurrentDeckProfile = () => {
|
||||||
store.set('deck.layout', deck.layout);
|
forceSaveCurrentDeckProfile();
|
||||||
};
|
};
|
||||||
|
|
||||||
export async function forceSaveDeck() {
|
function switchProfile(profile: DeckProfile) {
|
||||||
await misskeyApi('i/registry/set', {
|
prefer.commit('deck.profile', profile.name);
|
||||||
scope: ['client', 'deck', 'profiles'],
|
const currentProfile = deepClone(profile);
|
||||||
key: store.state['deck.profile'],
|
columns.value = currentProfile.columns;
|
||||||
value: {
|
layout.value = currentProfile.layout;
|
||||||
columns: store.reactiveState['deck.columns'].value,
|
forceSaveCurrentDeckProfile();
|
||||||
layout: store.reactiveState['deck.layout'].value,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: deckがloadされていない状態でsaveすると意図せず上書きが発生するので対策する
|
function addProfile(name: string) {
|
||||||
export const saveDeck = throttle(1000, () => {
|
if (name.trim() === '') return;
|
||||||
forceSaveDeck();
|
if (prefer.s['deck.profiles'].find(p => p.name === name)) return;
|
||||||
});
|
|
||||||
|
|
||||||
export async function getProfiles(): Promise<string[]> {
|
const newProfile: DeckProfile = {
|
||||||
return await misskeyApi('i/registry/keys', {
|
id: uuid(),
|
||||||
scope: ['client', 'deck', 'profiles'],
|
name,
|
||||||
});
|
columns: [],
|
||||||
|
layout: [],
|
||||||
|
};
|
||||||
|
prefer.commit('deck.profiles', [...prefer.s['deck.profiles'], newProfile]);
|
||||||
|
switchProfile(newProfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function deleteProfile(key: string): Promise<void> {
|
function createFirstProfile() {
|
||||||
return await misskeyApi('i/registry/remove', {
|
addProfile('Main');
|
||||||
scope: ['client', 'deck', 'profiles'],
|
}
|
||||||
key: key,
|
|
||||||
});
|
export function deleteProfile(name: string): void {
|
||||||
|
const newProfiles = prefer.s['deck.profiles'].filter(p => p.name !== name);
|
||||||
|
prefer.commit('deck.profiles', newProfiles);
|
||||||
|
|
||||||
|
if (prefer.s['deck.profiles'].length === 0) {
|
||||||
|
createFirstProfile();
|
||||||
|
} else {
|
||||||
|
switchProfile(prefer.s['deck.profiles'][0]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function addColumn(column: Column) {
|
export function addColumn(column: Column) {
|
||||||
if (column.name === undefined) column.name = null;
|
if (column.name === undefined) column.name = null;
|
||||||
store.push('deck.columns', column);
|
columns.value.push(column);
|
||||||
store.push('deck.layout', [column.id]);
|
layout.value.push([column.id]);
|
||||||
saveDeck();
|
saveCurrentDeckProfile();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function removeColumn(id: Column['id']) {
|
export function removeColumn(id: Column['id']) {
|
||||||
store.set('deck.columns', store.state['deck.columns'].filter(c => c.id !== id));
|
columns.value = columns.value.filter(c => c.id !== id);
|
||||||
store.set('deck.layout', store.state['deck.layout']
|
layout.value = layout.value.map(ids => ids.filter(_id => _id !== id)).filter(ids => ids.length > 0);
|
||||||
.map(ids => ids.filter(_id => _id !== id))
|
saveCurrentDeckProfile();
|
||||||
.filter(ids => ids.length > 0));
|
|
||||||
saveDeck();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function swapColumn(a: Column['id'], b: Column['id']) {
|
export function swapColumn(a: Column['id'], b: Column['id']) {
|
||||||
const aX = store.state['deck.layout'].findIndex(ids => ids.indexOf(a) !== -1);
|
const aX = layout.value.findIndex(ids => ids.indexOf(a) !== -1);
|
||||||
const aY = store.state['deck.layout'][aX].findIndex(id => id === a);
|
const aY = layout.value[aX].findIndex(id => id === a);
|
||||||
const bX = store.state['deck.layout'].findIndex(ids => ids.indexOf(b) !== -1);
|
const bX = layout.value.findIndex(ids => ids.indexOf(b) !== -1);
|
||||||
const bY = store.state['deck.layout'][bX].findIndex(id => id === b);
|
const bY = layout.value[bX].findIndex(id => id === b);
|
||||||
const layout = deepClone(store.state['deck.layout']);
|
const newLayout = deepClone(layout.value);
|
||||||
layout[aX][aY] = b;
|
newLayout[aX][aY] = b;
|
||||||
layout[bX][bY] = a;
|
newLayout[bX][bY] = a;
|
||||||
store.set('deck.layout', layout);
|
layout.value = newLayout;
|
||||||
saveDeck();
|
saveCurrentDeckProfile();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function swapLeftColumn(id: Column['id']) {
|
export function swapLeftColumn(id: Column['id']) {
|
||||||
const layout = deepClone(store.state['deck.layout']);
|
const newLayout = deepClone(layout.value);
|
||||||
store.state['deck.layout'].some((ids, i) => {
|
layout.value.some((ids, i) => {
|
||||||
if (ids.includes(id)) {
|
if (ids.includes(id)) {
|
||||||
const left = store.state['deck.layout'][i - 1];
|
const left = layout.value[i - 1];
|
||||||
if (left) {
|
if (left) {
|
||||||
layout[i - 1] = store.state['deck.layout'][i];
|
newLayout[i - 1] = layout.value[i];
|
||||||
layout[i] = left;
|
newLayout[i] = left;
|
||||||
store.set('deck.layout', layout);
|
layout.value = newLayout;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
saveDeck();
|
saveCurrentDeckProfile();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function swapRightColumn(id: Column['id']) {
|
export function swapRightColumn(id: Column['id']) {
|
||||||
const layout = deepClone(store.state['deck.layout']);
|
const newLayout = deepClone(layout.value);
|
||||||
store.state['deck.layout'].some((ids, i) => {
|
layout.value.some((ids, i) => {
|
||||||
if (ids.includes(id)) {
|
if (ids.includes(id)) {
|
||||||
const right = store.state['deck.layout'][i + 1];
|
const right = layout.value[i + 1];
|
||||||
if (right) {
|
if (right) {
|
||||||
layout[i + 1] = store.state['deck.layout'][i];
|
newLayout[i + 1] = layout.value[i];
|
||||||
layout[i] = right;
|
newLayout[i] = right;
|
||||||
store.set('deck.layout', layout);
|
layout.value = newLayout;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
saveDeck();
|
saveCurrentDeckProfile();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function swapUpColumn(id: Column['id']) {
|
export function swapUpColumn(id: Column['id']) {
|
||||||
const layout = deepClone(store.state['deck.layout']);
|
const newLayout = deepClone(layout.value);
|
||||||
const idsIndex = store.state['deck.layout'].findIndex(ids => ids.includes(id));
|
const idsIndex = layout.value.findIndex(ids => ids.includes(id));
|
||||||
const ids = deepClone(store.state['deck.layout'][idsIndex]);
|
const ids = deepClone(layout.value[idsIndex]);
|
||||||
ids.some((x, i) => {
|
ids.some((x, i) => {
|
||||||
if (x === id) {
|
if (x === id) {
|
||||||
const up = ids[i - 1];
|
const up = ids[i - 1];
|
||||||
@@ -181,20 +196,20 @@ export function swapUpColumn(id: Column['id']) {
|
|||||||
ids[i - 1] = id;
|
ids[i - 1] = id;
|
||||||
ids[i] = up;
|
ids[i] = up;
|
||||||
|
|
||||||
layout[idsIndex] = ids;
|
newLayout[idsIndex] = ids;
|
||||||
store.set('deck.layout', layout);
|
layout.value = newLayout;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
saveDeck();
|
saveCurrentDeckProfile();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function swapDownColumn(id: Column['id']) {
|
export function swapDownColumn(id: Column['id']) {
|
||||||
const layout = deepClone(store.state['deck.layout']);
|
const newLayout = deepClone(layout.value);
|
||||||
const idsIndex = store.state['deck.layout'].findIndex(ids => ids.includes(id));
|
const idsIndex = layout.value.findIndex(ids => ids.includes(id));
|
||||||
const ids = deepClone(store.state['deck.layout'][idsIndex]);
|
const ids = deepClone(layout.value[idsIndex]);
|
||||||
ids.some((x, i) => {
|
ids.some((x, i) => {
|
||||||
if (x === id) {
|
if (x === id) {
|
||||||
const down = ids[i + 1];
|
const down = ids[i + 1];
|
||||||
@@ -202,105 +217,137 @@ export function swapDownColumn(id: Column['id']) {
|
|||||||
ids[i + 1] = id;
|
ids[i + 1] = id;
|
||||||
ids[i] = down;
|
ids[i] = down;
|
||||||
|
|
||||||
layout[idsIndex] = ids;
|
newLayout[idsIndex] = ids;
|
||||||
store.set('deck.layout', layout);
|
layout.value = newLayout;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
saveDeck();
|
saveCurrentDeckProfile();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function stackLeftColumn(id: Column['id']) {
|
export function stackLeftColumn(id: Column['id']) {
|
||||||
let layout = deepClone(store.state['deck.layout']);
|
let newLayout = deepClone(layout.value);
|
||||||
const i = store.state['deck.layout'].findIndex(ids => ids.includes(id));
|
const i = layout.value.findIndex(ids => ids.includes(id));
|
||||||
layout = layout.map(ids => ids.filter(_id => _id !== id));
|
newLayout = newLayout.map(ids => ids.filter(_id => _id !== id));
|
||||||
layout[i - 1].push(id);
|
newLayout[i - 1].push(id);
|
||||||
layout = layout.filter(ids => ids.length > 0);
|
newLayout = newLayout.filter(ids => ids.length > 0);
|
||||||
store.set('deck.layout', layout);
|
layout.value = newLayout;
|
||||||
saveDeck();
|
saveCurrentDeckProfile();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function popRightColumn(id: Column['id']) {
|
export function popRightColumn(id: Column['id']) {
|
||||||
let layout = deepClone(store.state['deck.layout']);
|
let newLayout = deepClone(layout.value);
|
||||||
const i = store.state['deck.layout'].findIndex(ids => ids.includes(id));
|
const i = layout.value.findIndex(ids => ids.includes(id));
|
||||||
const affected = layout[i];
|
const affected = newLayout[i];
|
||||||
layout = layout.map(ids => ids.filter(_id => _id !== id));
|
newLayout = newLayout.map(ids => ids.filter(_id => _id !== id));
|
||||||
layout.splice(i + 1, 0, [id]);
|
newLayout.splice(i + 1, 0, [id]);
|
||||||
layout = layout.filter(ids => ids.length > 0);
|
newLayout = newLayout.filter(ids => ids.length > 0);
|
||||||
store.set('deck.layout', layout);
|
layout.value = newLayout;
|
||||||
|
|
||||||
const columns = deepClone(store.state['deck.columns']);
|
const newColumns = deepClone(columns.value);
|
||||||
for (const column of columns) {
|
for (const column of newColumns) {
|
||||||
if (affected.includes(column.id)) {
|
if (affected.includes(column.id)) {
|
||||||
column.active = true;
|
column.active = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
store.set('deck.columns', columns);
|
columns.value = newColumns;
|
||||||
|
|
||||||
saveDeck();
|
saveCurrentDeckProfile();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function addColumnWidget(id: Column['id'], widget: ColumnWidget) {
|
export function addColumnWidget(id: Column['id'], widget: ColumnWidget) {
|
||||||
const columns = deepClone(store.state['deck.columns']);
|
const newColumns = deepClone(columns.value);
|
||||||
const columnIndex = store.state['deck.columns'].findIndex(c => c.id === id);
|
const columnIndex = columns.value.findIndex(c => c.id === id);
|
||||||
const column = deepClone(store.state['deck.columns'][columnIndex]);
|
const column = deepClone(columns.value[columnIndex]);
|
||||||
if (column == null) return;
|
if (column == null) return;
|
||||||
if (column.widgets == null) column.widgets = [];
|
if (column.widgets == null) column.widgets = [];
|
||||||
column.widgets.unshift(widget);
|
column.widgets.unshift(widget);
|
||||||
columns[columnIndex] = column;
|
newColumns[columnIndex] = column;
|
||||||
store.set('deck.columns', columns);
|
columns.value = newColumns;
|
||||||
saveDeck();
|
saveCurrentDeckProfile();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function removeColumnWidget(id: Column['id'], widget: ColumnWidget) {
|
export function removeColumnWidget(id: Column['id'], widget: ColumnWidget) {
|
||||||
const columns = deepClone(store.state['deck.columns']);
|
const newColumns = deepClone(columns.value);
|
||||||
const columnIndex = store.state['deck.columns'].findIndex(c => c.id === id);
|
const columnIndex = columns.value.findIndex(c => c.id === id);
|
||||||
const column = deepClone(store.state['deck.columns'][columnIndex]);
|
const column = deepClone(columns.value[columnIndex]);
|
||||||
if (column == null) return;
|
if (column == null) return;
|
||||||
if (column.widgets == null) column.widgets = [];
|
if (column.widgets == null) column.widgets = [];
|
||||||
column.widgets = column.widgets.filter(w => w.id !== widget.id);
|
column.widgets = column.widgets.filter(w => w.id !== widget.id);
|
||||||
columns[columnIndex] = column;
|
newColumns[columnIndex] = column;
|
||||||
store.set('deck.columns', columns);
|
columns.value = newColumns;
|
||||||
saveDeck();
|
saveCurrentDeckProfile();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function setColumnWidgets(id: Column['id'], widgets: ColumnWidget[]) {
|
export function setColumnWidgets(id: Column['id'], widgets: ColumnWidget[]) {
|
||||||
const columns = deepClone(store.state['deck.columns']);
|
const newColumns = deepClone(columns.value);
|
||||||
const columnIndex = store.state['deck.columns'].findIndex(c => c.id === id);
|
const columnIndex = columns.value.findIndex(c => c.id === id);
|
||||||
const column = deepClone(store.state['deck.columns'][columnIndex]);
|
const column = deepClone(columns.value[columnIndex]);
|
||||||
if (column == null) return;
|
if (column == null) return;
|
||||||
column.widgets = widgets;
|
column.widgets = widgets;
|
||||||
columns[columnIndex] = column;
|
newColumns[columnIndex] = column;
|
||||||
store.set('deck.columns', columns);
|
columns.value = newColumns;
|
||||||
saveDeck();
|
saveCurrentDeckProfile();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function updateColumnWidget(id: Column['id'], widgetId: string, widgetData: any) {
|
export function updateColumnWidget(id: Column['id'], widgetId: string, widgetData: any) {
|
||||||
const columns = deepClone(store.state['deck.columns']);
|
const newColumns = deepClone(columns.value);
|
||||||
const columnIndex = store.state['deck.columns'].findIndex(c => c.id === id);
|
const columnIndex = columns.value.findIndex(c => c.id === id);
|
||||||
const column = deepClone(store.state['deck.columns'][columnIndex]);
|
const column = deepClone(columns.value[columnIndex]);
|
||||||
if (column == null) return;
|
if (column == null) return;
|
||||||
if (column.widgets == null) column.widgets = [];
|
if (column.widgets == null) column.widgets = [];
|
||||||
column.widgets = column.widgets.map(w => w.id === widgetId ? {
|
column.widgets = column.widgets.map(w => w.id === widgetId ? {
|
||||||
...w,
|
...w,
|
||||||
data: widgetData,
|
data: widgetData,
|
||||||
} : w);
|
} : w);
|
||||||
columns[columnIndex] = column;
|
newColumns[columnIndex] = column;
|
||||||
store.set('deck.columns', columns);
|
columns.value = newColumns;
|
||||||
saveDeck();
|
saveCurrentDeckProfile();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function updateColumn(id: Column['id'], column: Partial<Column>) {
|
export function updateColumn(id: Column['id'], column: Partial<Column>) {
|
||||||
const columns = deepClone(store.state['deck.columns']);
|
const newColumns = deepClone(columns.value);
|
||||||
const columnIndex = store.state['deck.columns'].findIndex(c => c.id === id);
|
const columnIndex = columns.value.findIndex(c => c.id === id);
|
||||||
const currentColumn = deepClone(store.state['deck.columns'][columnIndex]);
|
const currentColumn = deepClone(columns.value[columnIndex]);
|
||||||
if (currentColumn == null) return;
|
if (currentColumn == null) return;
|
||||||
for (const [k, v] of Object.entries(column)) {
|
for (const [k, v] of Object.entries(column)) {
|
||||||
currentColumn[k] = v;
|
currentColumn[k] = v;
|
||||||
}
|
}
|
||||||
columns[columnIndex] = currentColumn;
|
newColumns[columnIndex] = currentColumn;
|
||||||
store.set('deck.columns', columns);
|
columns.value = newColumns;
|
||||||
saveDeck();
|
saveCurrentDeckProfile();
|
||||||
|
}
|
||||||
|
|
||||||
|
export function switchProfileMenu(ev: MouseEvent) {
|
||||||
|
const items: MenuItem[] = prefer.s['deck.profile'] ? [{
|
||||||
|
text: prefer.s['deck.profile'],
|
||||||
|
active: true,
|
||||||
|
action: () => {},
|
||||||
|
}] : [];
|
||||||
|
|
||||||
|
const profiles = prefer.s['deck.profiles'];
|
||||||
|
|
||||||
|
items.push(...(profiles.filter(p => p.name !== prefer.s['deck.profile']).map(p => ({
|
||||||
|
text: p.name,
|
||||||
|
action: () => {
|
||||||
|
switchProfile(p);
|
||||||
|
},
|
||||||
|
}))), { type: 'divider' as const }, {
|
||||||
|
text: i18n.ts._deck.newProfile,
|
||||||
|
icon: 'ti ti-plus',
|
||||||
|
action: async () => {
|
||||||
|
const { canceled, result: name } = await os.inputText({
|
||||||
|
title: i18n.ts._deck.profile,
|
||||||
|
minLength: 1,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (canceled || name == null || name.trim() === '') return;
|
||||||
|
|
||||||
|
addProfile(name);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
os.popupMenu(items, ev.currentTarget ?? ev.target);
|
||||||
}
|
}
|
||||||
|
|||||||
12
packages/frontend/src/di.ts
Normal file
12
packages/frontend/src/di.ts
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
import type { InjectionKey, Ref } from 'vue';
|
||||||
|
import type { IRouter } from '@/nirax.js';
|
||||||
|
|
||||||
|
export const DI = {
|
||||||
|
routerCurrentDepth: Symbol() as InjectionKey<number>,
|
||||||
|
router: Symbol() as InjectionKey<IRouter>,
|
||||||
|
};
|
||||||
@@ -35,7 +35,7 @@ const getMetadata = (): Ref<PageMetadata | null> | undefined => {
|
|||||||
return inject<Ref<PageMetadata | null>>(METADATA_KEY);
|
return inject<Ref<PageMetadata | null>>(METADATA_KEY);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const definePageMetadata = (maybeRefOrGetterMetadata: MaybeRefOrGetter<PageMetadata>): void => {
|
export const definePage = (maybeRefOrGetterMetadata: MaybeRefOrGetter<PageMetadata>): void => {
|
||||||
const metadataRef = ref(toValue(maybeRefOrGetterMetadata));
|
const metadataRef = ref(toValue(maybeRefOrGetterMetadata));
|
||||||
const metadataGetter = () => metadataRef.value;
|
const metadataGetter = () => metadataRef.value;
|
||||||
const receiver = getReceiver();
|
const receiver = getReceiver();
|
||||||
@@ -33,7 +33,7 @@ import MkLink from '@/components/MkLink.vue';
|
|||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { unisonReload } from '@/utility/unison-reload.js';
|
import { unisonReload } from '@/utility/unison-reload.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import { miLocalStorage } from '@/local-storage.js';
|
import { miLocalStorage } from '@/local-storage.js';
|
||||||
import { prefer } from '@/preferences.js';
|
import { prefer } from '@/preferences.js';
|
||||||
import { serverErrorImageUrl } from '@/instance.js';
|
import { serverErrorImageUrl } from '@/instance.js';
|
||||||
@@ -67,7 +67,7 @@ const headerActions = computed(() => []);
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.error,
|
title: i18n.ts.error,
|
||||||
icon: 'ti ti-alert-triangle',
|
icon: 'ti ti-alert-triangle',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ import { i18n } from '@/i18n.js';
|
|||||||
import { instance } from '@/instance.js';
|
import { instance } from '@/instance.js';
|
||||||
import { store } from '@/store.js';
|
import { store } from '@/store.js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import { claimAchievement, claimedAchievements } from '@/utility/achievements.js';
|
import { claimAchievement, claimedAchievements } from '@/utility/achievements.js';
|
||||||
import { $i } from '@/account.js';
|
import { $i } from '@/account.js';
|
||||||
|
|
||||||
@@ -406,7 +406,7 @@ const easterEggEngine = ref<{ stop: () => void } | null>(null);
|
|||||||
const containerEl = shallowRef<HTMLElement>();
|
const containerEl = shallowRef<HTMLElement>();
|
||||||
|
|
||||||
function iconLoaded() {
|
function iconLoaded() {
|
||||||
const emojis = store.state.reactions;
|
const emojis = store.s.reactions;
|
||||||
const containerWidth = containerEl.value.offsetWidth;
|
const containerWidth = containerEl.value.offsetWidth;
|
||||||
for (let i = 0; i < 32; i++) {
|
for (let i = 0; i < 32; i++) {
|
||||||
easterEggEmojis.value.push({
|
easterEggEmojis.value.push({
|
||||||
@@ -450,7 +450,7 @@ const headerActions = computed(() => []);
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.aboutMisskey,
|
title: i18n.ts.aboutMisskey,
|
||||||
icon: null,
|
icon: null,
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import { computed, defineAsyncComponent, ref, watch } from 'vue';
|
|||||||
import { instance } from '@/instance.js';
|
import { instance } from '@/instance.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { claimAchievement } from '@/utility/achievements.js';
|
import { claimAchievement } from '@/utility/achievements.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue';
|
import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue';
|
||||||
|
|
||||||
const XOverview = defineAsyncComponent(() => import('@/pages/about.overview.vue'));
|
const XOverview = defineAsyncComponent(() => import('@/pages/about.overview.vue'));
|
||||||
@@ -81,7 +81,7 @@ const headerTabs = computed(() => {
|
|||||||
return items;
|
return items;
|
||||||
});
|
});
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.instanceInfo,
|
title: i18n.ts.instanceInfo,
|
||||||
icon: 'ti ti-info-circle',
|
icon: 'ti ti-info-circle',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
import { onActivated, onDeactivated, onMounted, onUnmounted } from 'vue';
|
import { onActivated, onDeactivated, onMounted, onUnmounted } from 'vue';
|
||||||
import MkAchievements from '@/components/MkAchievements.vue';
|
import MkAchievements from '@/components/MkAchievements.vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import { $i } from '@/account.js';
|
import { $i } from '@/account.js';
|
||||||
import { claimAchievement } from '@/utility/achievements.js';
|
import { claimAchievement } from '@/utility/achievements.js';
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ onDeactivated(() => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.achievements,
|
title: i18n.ts.achievements,
|
||||||
icon: 'ti ti-medal',
|
icon: 'ti ti-medal',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ import bytes from '@/filters/bytes.js';
|
|||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import { iAmAdmin, iAmModerator } from '@/account.js';
|
import { iAmAdmin, iAmModerator } from '@/account.js';
|
||||||
|
|
||||||
const tab = ref('overview');
|
const tab = ref('overview');
|
||||||
@@ -161,7 +161,7 @@ const headerTabs = computed(() => [{
|
|||||||
icon: 'ti ti-code',
|
icon: 'ti ti-code',
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: file.value ? `${i18n.ts.file}: ${file.value.name}` : i18n.ts.file,
|
title: file.value ? `${i18n.ts.file}: ${file.value.name}` : i18n.ts.file,
|
||||||
icon: 'ti ti-file',
|
icon: 'ti ti-file',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ import MkInfo from '@/components/MkInfo.vue';
|
|||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { acct } from '@/filters/user.js';
|
import { acct } from '@/filters/user.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { iAmAdmin, $i, iAmModerator } from '@/account.js';
|
import { iAmAdmin, $i, iAmModerator } from '@/account.js';
|
||||||
import MkRolePreview from '@/components/MkRolePreview.vue';
|
import MkRolePreview from '@/components/MkRolePreview.vue';
|
||||||
@@ -545,7 +545,7 @@ const headerTabs = computed(() => isSystem.value ? [{
|
|||||||
icon: 'ti ti-code',
|
icon: 'ti ti-code',
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: user.value ? acct(user.value) : i18n.ts.userInfo,
|
title: user.value ? acct(user.value) : i18n.ts.userInfo,
|
||||||
icon: 'ti ti-user-exclamation',
|
icon: 'ti ti-user-exclamation',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ import { scrollToTop } from '@@/js/scroll.js';
|
|||||||
import { popupMenu } from '@/os.js';
|
import { popupMenu } from '@/os.js';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import { globalEvents } from '@/events.js';
|
import { globalEvents } from '@/events.js';
|
||||||
import { injectReactiveMetadata } from '@/utility/page-metadata.js';
|
import { injectReactiveMetadata } from '@/page.js';
|
||||||
|
|
||||||
type Tab = {
|
type Tab = {
|
||||||
key?: string | null;
|
key?: string | null;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
<MkButton link to="/admin/abuse-report-notification-recipient" primary>{{ i18n.ts.notificationSetting }}</MkButton>
|
<MkButton link to="/admin/abuse-report-notification-recipient" primary>{{ i18n.ts.notificationSetting }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<MkInfo v-if="!store.reactiveState.abusesTutorial.value" closable @close="closeTutorial()">
|
<MkInfo v-if="!store.r.abusesTutorial.value" closable @close="closeTutorial()">
|
||||||
{{ i18n.ts._abuseUserReport.resolveTutorial }}
|
{{ i18n.ts._abuseUserReport.resolveTutorial }}
|
||||||
</MkInfo>
|
</MkInfo>
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ import MkSelect from '@/components/MkSelect.vue';
|
|||||||
import MkPagination from '@/components/MkPagination.vue';
|
import MkPagination from '@/components/MkPagination.vue';
|
||||||
import XAbuseReport from '@/components/MkAbuseReport.vue';
|
import XAbuseReport from '@/components/MkAbuseReport.vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import MkInfo from '@/components/MkInfo.vue';
|
import MkInfo from '@/components/MkInfo.vue';
|
||||||
import { store } from '@/store.js';
|
import { store } from '@/store.js';
|
||||||
@@ -100,7 +100,7 @@ const headerActions = computed(() => []);
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.abuseReports,
|
title: i18n.ts.abuseReports,
|
||||||
icon: 'ti ti-exclamation-circle',
|
icon: 'ti ti-exclamation-circle',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ import FormSplit from '@/components/form/split.vue';
|
|||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
|
|
||||||
const ads = ref<Misskey.entities.Ad[]>([]);
|
const ads = ref<Misskey.entities.Ad[]>([]);
|
||||||
|
|
||||||
@@ -255,7 +255,7 @@ const headerActions = computed(() => [{
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.ads,
|
title: i18n.ts.ads,
|
||||||
icon: 'ti ti-ad',
|
icon: 'ti ti-ad',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ import MkInfo from '@/components/MkInfo.vue';
|
|||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import MkFolder from '@/components/MkFolder.vue';
|
import MkFolder from '@/components/MkFolder.vue';
|
||||||
import MkTextarea from '@/components/MkTextarea.vue';
|
import MkTextarea from '@/components/MkTextarea.vue';
|
||||||
|
|
||||||
@@ -199,7 +199,7 @@ const headerActions = computed(() => [{
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.announcements,
|
title: i18n.ts.announcements,
|
||||||
icon: 'ti ti-speakerphone',
|
icon: 'ti ti-speakerphone',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ import * as os from '@/os.js';
|
|||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { instance, fetchInstance } from '@/instance.js';
|
import { instance, fetchInstance } from '@/instance.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import MkColorInput from '@/components/MkColorInput.vue';
|
import MkColorInput from '@/components/MkColorInput.vue';
|
||||||
import { host } from '@@/js/config.js';
|
import { host } from '@@/js/config.js';
|
||||||
@@ -175,7 +175,7 @@ function save() {
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.branding,
|
title: i18n.ts.branding,
|
||||||
icon: 'ti ti-paint',
|
icon: 'ti ti-paint',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import XGridLocalComponent from '@/pages/admin/custom-emojis-manager.local.vue';
|
import XGridLocalComponent from '@/pages/admin/custom-emojis-manager.local.vue';
|
||||||
import XGridRemoteComponent from '@/pages/admin/custom-emojis-manager.remote.vue';
|
import XGridRemoteComponent from '@/pages/admin/custom-emojis-manager.remote.vue';
|
||||||
import MkPageHeader from '@/components/global/MkPageHeader.vue';
|
import MkPageHeader from '@/components/global/MkPageHeader.vue';
|
||||||
@@ -36,7 +36,7 @@ const headerTabs = computed(() => [{
|
|||||||
title: i18n.ts.remote,
|
title: i18n.ts.remote,
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
definePageMetadata(computed(() => ({
|
definePage(computed(() => ({
|
||||||
title: i18n.ts.customEmojis,
|
title: i18n.ts.customEmojis,
|
||||||
icon: 'ti ti-icons',
|
icon: 'ti ti-icons',
|
||||||
needWideArea: true,
|
needWideArea: true,
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import { misskeyApi } from '@/utility/misskey-api.js';
|
|||||||
import bytes from '@/filters/bytes.js';
|
import bytes from '@/filters/bytes.js';
|
||||||
import number from '@/filters/number.js';
|
import number from '@/filters/number.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
|
|
||||||
const databasePromiseFactory = () => misskeyApi('admin/get-table-stats').then(res => Object.entries(res).sort((a, b) => b[1].size - a[1].size));
|
const databasePromiseFactory = () => misskeyApi('admin/get-table-stats').then(res => Object.entries(res).sort((a, b) => b[1].size - a[1].size));
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ const headerActions = computed(() => []);
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.database,
|
title: i18n.ts.database,
|
||||||
icon: 'ti ti-database',
|
icon: 'ti ti-database',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ import * as os from '@/os.js';
|
|||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { fetchInstance, instance } from '@/instance.js';
|
import { fetchInstance, instance } from '@/instance.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
|
|
||||||
const enableEmail = ref<boolean>(false);
|
const enableEmail = ref<boolean>(false);
|
||||||
@@ -130,7 +130,7 @@ function save() {
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.emailServer,
|
title: i18n.ts.emailServer,
|
||||||
icon: 'ti ti-mail',
|
icon: 'ti ti-mail',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ import * as os from '@/os.js';
|
|||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { fetchInstance } from '@/instance.js';
|
import { fetchInstance } from '@/instance.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import MkFolder from '@/components/MkFolder.vue';
|
import MkFolder from '@/components/MkFolder.vue';
|
||||||
|
|
||||||
const deeplAuthKey = ref<string>('');
|
const deeplAuthKey = ref<string>('');
|
||||||
@@ -88,7 +88,7 @@ const headerActions = computed(() => []);
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.externalServices,
|
title: i18n.ts.externalServices,
|
||||||
icon: 'ti ti-link',
|
icon: 'ti ti-link',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ import MkPagination from '@/components/MkPagination.vue';
|
|||||||
import MkInstanceCardMini from '@/components/MkInstanceCardMini.vue';
|
import MkInstanceCardMini from '@/components/MkInstanceCardMini.vue';
|
||||||
import FormSplit from '@/components/form/split.vue';
|
import FormSplit from '@/components/form/split.vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
|
|
||||||
const host = ref('');
|
const host = ref('');
|
||||||
const state = ref('federating');
|
const state = ref('federating');
|
||||||
@@ -112,7 +112,7 @@ const headerActions = computed(() => []);
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.federation,
|
title: i18n.ts.federation,
|
||||||
icon: 'ti ti-whirl',
|
icon: 'ti ti-whirl',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ import MkFileListForAdmin from '@/components/MkFileListForAdmin.vue';
|
|||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { lookupFile } from '@/utility/admin-lookup.js';
|
import { lookupFile } from '@/utility/admin-lookup.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
|
|
||||||
const origin = ref('local');
|
const origin = ref('local');
|
||||||
const type = ref<string | null>(null);
|
const type = ref<string | null>(null);
|
||||||
@@ -85,7 +85,7 @@ const headerActions = computed(() => [{
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.files,
|
title: i18n.ts.files,
|
||||||
icon: 'ti ti-cloud',
|
icon: 'ti ti-cloud',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ import { lookup } from '@/utility/lookup.js';
|
|||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { lookupUser, lookupUserByEmail, lookupFile } from '@/utility/admin-lookup.js';
|
import { lookupUser, lookupUserByEmail, lookupFile } from '@/utility/admin-lookup.js';
|
||||||
import { definePageMetadata, provideMetadataReceiver, provideReactiveMetadata } from '@/utility/page-metadata.js';
|
import { definePage, provideMetadataReceiver, provideReactiveMetadata } from '@/page.js';
|
||||||
import type { PageMetadata } from '@/utility/page-metadata.js';
|
import type { PageMetadata } from '@/page.js';
|
||||||
import { useRouter } from '@/router/supplier.js';
|
import { useRouter } from '@/router/supplier.js';
|
||||||
|
|
||||||
const isEmpty = (x: string | null) => x == null || x === '';
|
const isEmpty = (x: string | null) => x == null || x === '';
|
||||||
@@ -318,7 +318,7 @@ const headerActions = computed(() => []);
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => INFO.value);
|
definePage(() => INFO.value);
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
header: {
|
header: {
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ import MkSwitch from '@/components/MkSwitch.vue';
|
|||||||
import MkPagination from '@/components/MkPagination.vue';
|
import MkPagination from '@/components/MkPagination.vue';
|
||||||
import type { Paging } from '@/components/MkPagination.vue';
|
import type { Paging } from '@/components/MkPagination.vue';
|
||||||
import MkInviteCode from '@/components/MkInviteCode.vue';
|
import MkInviteCode from '@/components/MkInviteCode.vue';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
|
|
||||||
const pagingComponent = shallowRef<InstanceType<typeof MkPagination>>();
|
const pagingComponent = shallowRef<InstanceType<typeof MkPagination>>();
|
||||||
|
|
||||||
@@ -114,7 +114,7 @@ function deleted(id: string) {
|
|||||||
const headerActions = computed(() => []);
|
const headerActions = computed(() => []);
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.invite,
|
title: i18n.ts.invite,
|
||||||
icon: 'ti ti-user-plus',
|
icon: 'ti ti-user-plus',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ import * as os from '@/os.js';
|
|||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { fetchInstance } from '@/instance.js';
|
import { fetchInstance } from '@/instance.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import FormLink from '@/components/form/link.vue';
|
import FormLink from '@/components/form/link.vue';
|
||||||
import MkFolder from '@/components/MkFolder.vue';
|
import MkFolder from '@/components/MkFolder.vue';
|
||||||
@@ -259,7 +259,7 @@ function save_mediaSilencedHosts() {
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.moderation,
|
title: i18n.ts.moderation,
|
||||||
icon: 'ti ti-shield',
|
icon: 'ti ti-shield',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ import MkSelect from '@/components/MkSelect.vue';
|
|||||||
import MkInput from '@/components/MkInput.vue';
|
import MkInput from '@/components/MkInput.vue';
|
||||||
import MkPagination from '@/components/MkPagination.vue';
|
import MkPagination from '@/components/MkPagination.vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import MkDateSeparatedList from '@/components/MkDateSeparatedList.vue';
|
import MkDateSeparatedList from '@/components/MkDateSeparatedList.vue';
|
||||||
|
|
||||||
const logs = shallowRef<InstanceType<typeof MkPagination>>();
|
const logs = shallowRef<InstanceType<typeof MkPagination>>();
|
||||||
@@ -59,7 +59,7 @@ const headerActions = computed(() => []);
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.moderationLogs,
|
title: i18n.ts.moderationLogs,
|
||||||
icon: 'ti ti-list-search',
|
icon: 'ti ti-list-search',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ import * as os from '@/os.js';
|
|||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { fetchInstance } from '@/instance.js';
|
import { fetchInstance } from '@/instance.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
|
|
||||||
const useObjectStorage = ref<boolean>(false);
|
const useObjectStorage = ref<boolean>(false);
|
||||||
@@ -149,7 +149,7 @@ function save() {
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.objectStorage,
|
title: i18n.ts.objectStorage,
|
||||||
icon: 'ti ti-cloud',
|
icon: 'ti ti-cloud',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ async function renderChart() {
|
|||||||
|
|
||||||
const raw = await misskeyApi('charts/active-users', { limit: chartLimit, span: 'day' });
|
const raw = await misskeyApi('charts/active-users', { limit: chartLimit, span: 'day' });
|
||||||
|
|
||||||
const vLineColor = store.state.darkMode ? 'rgba(255, 255, 255, 0.2)' : 'rgba(0, 0, 0, 0.2)';
|
const vLineColor = store.s.darkMode ? 'rgba(255, 255, 255, 0.2)' : 'rgba(0, 0, 0, 0.2)';
|
||||||
|
|
||||||
const colorRead = '#3498db';
|
const colorRead = '#3498db';
|
||||||
const colorWrite = '#2ecc71';
|
const colorWrite = '#2ecc71';
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ onMounted(async () => {
|
|||||||
|
|
||||||
const raw = await misskeyApi('charts/ap-request', { limit: chartLimit, span: 'day' });
|
const raw = await misskeyApi('charts/ap-request', { limit: chartLimit, span: 'day' });
|
||||||
|
|
||||||
const vLineColor = store.state.darkMode ? 'rgba(255, 255, 255, 0.2)' : 'rgba(0, 0, 0, 0.2)';
|
const vLineColor = store.s.darkMode ? 'rgba(255, 255, 255, 0.2)' : 'rgba(0, 0, 0, 0.2)';
|
||||||
const succColor = '#87e000';
|
const succColor = '#87e000';
|
||||||
const failColor = '#ff4400';
|
const failColor = '#ff4400';
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ const color =
|
|||||||
'?' as never;
|
'?' as never;
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const vLineColor = store.state.darkMode ? 'rgba(255, 255, 255, 0.2)' : 'rgba(0, 0, 0, 0.2)';
|
const vLineColor = store.s.darkMode ? 'rgba(255, 255, 255, 0.2)' : 'rgba(0, 0, 0, 0.2)';
|
||||||
|
|
||||||
chartInstance = new Chart(chartEl.value, {
|
chartInstance = new Chart(chartEl.value, {
|
||||||
type: 'line',
|
type: 'line',
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ import * as os from '@/os.js';
|
|||||||
import { misskeyApi, misskeyApiGet } from '@/utility/misskey-api.js';
|
import { misskeyApi, misskeyApiGet } from '@/utility/misskey-api.js';
|
||||||
import { useStream } from '@/stream.js';
|
import { useStream } from '@/stream.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import MkFoldableSection from '@/components/MkFoldableSection.vue';
|
import MkFoldableSection from '@/components/MkFoldableSection.vue';
|
||||||
|
|
||||||
const rootEl = shallowRef<HTMLElement>();
|
const rootEl = shallowRef<HTMLElement>();
|
||||||
@@ -184,7 +184,7 @@ const headerActions = computed(() => []);
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.dashboard,
|
title: i18n.ts.dashboard,
|
||||||
icon: 'ti ti-dashboard',
|
icon: 'ti ti-dashboard',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ import * as os from '@/os.js';
|
|||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { fetchInstance } from '@/instance.js';
|
import { fetchInstance } from '@/instance.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import MkSwitch from '@/components/MkSwitch.vue';
|
import MkSwitch from '@/components/MkSwitch.vue';
|
||||||
import MkFolder from '@/components/MkFolder.vue';
|
import MkFolder from '@/components/MkFolder.vue';
|
||||||
import MkInput from '@/components/MkInput.vue';
|
import MkInput from '@/components/MkInput.vue';
|
||||||
@@ -202,7 +202,7 @@ const headerActions = computed(() => []);
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.other,
|
title: i18n.ts.other,
|
||||||
icon: 'ti ti-adjustments',
|
icon: 'ti ti-adjustments',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ const color =
|
|||||||
'?' as never;
|
'?' as never;
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const vLineColor = store.state.darkMode ? 'rgba(255, 255, 255, 0.2)' : 'rgba(0, 0, 0, 0.2)';
|
const vLineColor = store.s.darkMode ? 'rgba(255, 255, 255, 0.2)' : 'rgba(0, 0, 0, 0.2)';
|
||||||
|
|
||||||
chartInstance = new Chart(chartEl.value, {
|
chartInstance = new Chart(chartEl.value, {
|
||||||
type: 'line',
|
type: 'line',
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import XHeader from './_header_.vue';
|
|||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import * as config from '@@/js/config.js';
|
import * as config from '@@/js/config.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
|
|
||||||
export type ApQueueDomain = 'deliver' | 'inbox';
|
export type ApQueueDomain = 'deliver' | 'inbox';
|
||||||
@@ -71,7 +71,7 @@ const headerTabs = computed(() => [{
|
|||||||
title: 'Inbox',
|
title: 'Inbox',
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.jobQueue,
|
title: i18n.ts.jobQueue,
|
||||||
icon: 'ti ti-clock-play',
|
icon: 'ti ti-clock-play',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import MkButton from '@/components/MkButton.vue';
|
|||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
|
|
||||||
const relays = ref<Misskey.entities.AdminRelaysListResponse>([]);
|
const relays = ref<Misskey.entities.AdminRelaysListResponse>([]);
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ const headerActions = computed(() => [{
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.relays,
|
title: i18n.ts.relays,
|
||||||
icon: 'ti ti-planet',
|
icon: 'ti ti-planet',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import XEditor from './roles.editor.vue';
|
|||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import { rolesCache } from '@/cache.js';
|
import { rolesCache } from '@/cache.js';
|
||||||
import { useRouter } from '@/router/supplier.js';
|
import { useRouter } from '@/router/supplier.js';
|
||||||
@@ -87,7 +87,7 @@ async function save() {
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: role.value ? `${i18n.ts._role.edit}: ${role.value.name}` : i18n.ts._role.new,
|
title: role.value ? `${i18n.ts._role.edit}: ${role.value.name}` : i18n.ts._role.new,
|
||||||
icon: 'ti ti-badge',
|
icon: 'ti ti-badge',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ import MkFolder from '@/components/MkFolder.vue';
|
|||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import MkUserCardMini from '@/components/MkUserCardMini.vue';
|
import MkUserCardMini from '@/components/MkUserCardMini.vue';
|
||||||
import MkInfo from '@/components/MkInfo.vue';
|
import MkInfo from '@/components/MkInfo.vue';
|
||||||
@@ -170,7 +170,7 @@ const headerActions = computed(() => []);
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: `${i18n.ts.role}: ${role.name}`,
|
title: `${i18n.ts.role}: ${role.name}`,
|
||||||
icon: 'ti ti-badge',
|
icon: 'ti ti-badge',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -292,7 +292,7 @@ import MkRolePreview from '@/components/MkRolePreview.vue';
|
|||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import { instance, fetchInstance } from '@/instance.js';
|
import { instance, fetchInstance } from '@/instance.js';
|
||||||
import MkFoldableSection from '@/components/MkFoldableSection.vue';
|
import MkFoldableSection from '@/components/MkFoldableSection.vue';
|
||||||
import { useRouter } from '@/router/supplier.js';
|
import { useRouter } from '@/router/supplier.js';
|
||||||
@@ -338,7 +338,7 @@ const headerActions = computed(() => []);
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.roles,
|
title: i18n.ts.roles,
|
||||||
icon: 'ti ti-badges',
|
icon: 'ti ti-badges',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ import * as os from '@/os.js';
|
|||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { fetchInstance } from '@/instance.js';
|
import { fetchInstance } from '@/instance.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import { useForm } from '@/utility/use-form.js';
|
import { useForm } from '@/utility/use-form.js';
|
||||||
import MkFormFooter from '@/components/MkFormFooter.vue';
|
import MkFormFooter from '@/components/MkFormFooter.vue';
|
||||||
|
|
||||||
@@ -206,7 +206,7 @@ const headerActions = computed(() => []);
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.security,
|
title: i18n.ts.security,
|
||||||
icon: 'ti ti-lock',
|
icon: 'ti ti-lock',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ import XHeader from './_header_.vue';
|
|||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { fetchInstance, instance } from '@/instance.js';
|
import { fetchInstance, instance } from '@/instance.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import MkInput from '@/components/MkInput.vue';
|
import MkInput from '@/components/MkInput.vue';
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ const remove = (index: number): void => {
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.serverRules,
|
title: i18n.ts.serverRules,
|
||||||
icon: 'ti ti-checkbox',
|
icon: 'ti ti-checkbox',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -269,7 +269,7 @@ import * as os from '@/os.js';
|
|||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { fetchInstance, instance } from '@/instance.js';
|
import { fetchInstance, instance } from '@/instance.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import MkFolder from '@/components/MkFolder.vue';
|
import MkFolder from '@/components/MkFolder.vue';
|
||||||
import MkKeyValue from '@/components/MkKeyValue.vue';
|
import MkKeyValue from '@/components/MkKeyValue.vue';
|
||||||
@@ -391,7 +391,7 @@ const proxyAccountForm = useForm({
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.general,
|
title: i18n.ts.general,
|
||||||
icon: 'ti ti-settings',
|
icon: 'ti ti-settings',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import { computed, onMounted, ref } from 'vue';
|
|||||||
import { entities } from 'misskey-js';
|
import { entities } from 'misskey-js';
|
||||||
import XItem from './system-webhook.item.vue';
|
import XItem from './system-webhook.item.vue';
|
||||||
import FormSection from '@/components/form/section.vue';
|
import FormSection from '@/components/form/section.vue';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import XHeader from '@/pages/admin/_header_.vue';
|
import XHeader from '@/pages/admin/_header_.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
@@ -82,7 +82,7 @@ onMounted(async () => {
|
|||||||
await fetchWebhooks();
|
await fetchWebhooks();
|
||||||
});
|
});
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: 'SystemWebhook',
|
title: 'SystemWebhook',
|
||||||
icon: 'ti ti-webhook',
|
icon: 'ti ti-webhook',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ import MkPagination from '@/components/MkPagination.vue';
|
|||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { lookupUser } from '@/utility/admin-lookup.js';
|
import { lookupUser } from '@/utility/admin-lookup.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import MkUserCardMini from '@/components/MkUserCardMini.vue';
|
import MkUserCardMini from '@/components/MkUserCardMini.vue';
|
||||||
import { dateString } from '@/filters/date.js';
|
import { dateString } from '@/filters/date.js';
|
||||||
|
|
||||||
@@ -169,7 +169,7 @@ watchEffect(() => {
|
|||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.users,
|
title: i18n.ts.users,
|
||||||
icon: 'ti ti-users',
|
icon: 'ti ti-users',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { instance } from '@/instance.js';
|
import { instance } from '@/instance.js';
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.ads,
|
title: i18n.ts.ads,
|
||||||
icon: 'ti ti-ad',
|
icon: 'ti ti-ad',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ import MkButton from '@/components/MkButton.vue';
|
|||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import { $i, updateAccountPartial } from '@/account.js';
|
import { $i, updateAccountPartial } from '@/account.js';
|
||||||
import { prefer } from '@/preferences.js';
|
import { prefer } from '@/preferences.js';
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ const headerActions = computed(() => []);
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: announcement.value ? announcement.value.title : i18n.ts.announcements,
|
title: announcement.value ? announcement.value.title : i18n.ts.announcements,
|
||||||
icon: 'ti ti-speakerphone',
|
icon: 'ti ti-speakerphone',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue';
|
|||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import { $i, updateAccountPartial } from '@/account.js';
|
import { $i, updateAccountPartial } from '@/account.js';
|
||||||
|
|
||||||
const paginationCurrent = {
|
const paginationCurrent = {
|
||||||
@@ -111,7 +111,7 @@ const headerTabs = computed(() => [{
|
|||||||
icon: 'ti ti-point',
|
icon: 'ti ti-point',
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.announcements,
|
title: i18n.ts.announcements,
|
||||||
icon: 'ti ti-speakerphone',
|
icon: 'ti ti-speakerphone',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import MkTimeline from '@/components/MkTimeline.vue';
|
|||||||
import { scroll } from '@@/js/scroll.js';
|
import { scroll } from '@@/js/scroll.js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { useRouter } from '@/router/supplier.js';
|
import { useRouter } from '@/router/supplier.js';
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ const headerActions = computed(() => antenna.value ? [{
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: antenna.value ? antenna.value.name : i18n.ts.antennas,
|
title: antenna.value ? antenna.value.name : i18n.ts.antennas,
|
||||||
icon: 'ti ti-antenna',
|
icon: 'ti ti-antenna',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ import MkInput from '@/components/MkInput.vue';
|
|||||||
import MkTextarea from '@/components/MkTextarea.vue';
|
import MkTextarea from '@/components/MkTextarea.vue';
|
||||||
import MkSwitch from '@/components/MkSwitch.vue';
|
import MkSwitch from '@/components/MkSwitch.vue';
|
||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
|
|
||||||
const body = ref('{}');
|
const body = ref('{}');
|
||||||
const endpoint = ref('');
|
const endpoint = ref('');
|
||||||
@@ -87,7 +87,7 @@ const headerActions = computed(() => []);
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: 'API console',
|
title: 'API console',
|
||||||
icon: 'ti ti-terminal-2',
|
icon: 'ti ti-terminal-2',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ import XForm from './auth.form.vue';
|
|||||||
import MkSignin from '@/components/MkSignin.vue';
|
import MkSignin from '@/components/MkSignin.vue';
|
||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { $i, login } from '@/account.js';
|
import { $i, login } from '@/account.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
@@ -97,7 +97,7 @@ const headerActions = computed(() => []);
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts._auth.shareAccessTitle,
|
title: i18n.ts._auth.shareAccessTitle,
|
||||||
icon: 'ti ti-apps',
|
icon: 'ti ti-apps',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import { signinRequired } from '@/account.js';
|
|||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
|
|
||||||
const $i = signinRequired();
|
const $i = signinRequired();
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ const headerActions = computed(() => [{
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.avatarDecorations,
|
title: i18n.ts.avatarDecorations,
|
||||||
icon: 'ti ti-sparkles',
|
icon: 'ti ti-sparkles',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ import MkColorInput from '@/components/MkColorInput.vue';
|
|||||||
import { selectFile } from '@/utility/select-file.js';
|
import { selectFile } from '@/utility/select-file.js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import MkFolder from '@/components/MkFolder.vue';
|
import MkFolder from '@/components/MkFolder.vue';
|
||||||
import MkSwitch from '@/components/MkSwitch.vue';
|
import MkSwitch from '@/components/MkSwitch.vue';
|
||||||
@@ -202,7 +202,7 @@ const headerActions = computed(() => []);
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: props.channelId ? i18n.ts._channel.edit : i18n.ts._channel.create,
|
title: props.channelId ? i18n.ts._channel.edit : i18n.ts._channel.create,
|
||||||
icon: 'ti ti-device-tv',
|
icon: 'ti ti-device-tv',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ import * as os from '@/os.js';
|
|||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { $i, iAmModerator } from '@/account.js';
|
import { $i, iAmModerator } from '@/account.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import { deviceKind } from '@/utility/device-kind.js';
|
import { deviceKind } from '@/utility/device-kind.js';
|
||||||
import MkNotes from '@/components/MkNotes.vue';
|
import MkNotes from '@/components/MkNotes.vue';
|
||||||
import { favoritedChannelsCache } from '@/cache.js';
|
import { favoritedChannelsCache } from '@/cache.js';
|
||||||
@@ -265,7 +265,7 @@ const headerTabs = computed(() => [{
|
|||||||
icon: 'ti ti-search',
|
icon: 'ti ti-search',
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: channel.value ? channel.value.name : i18n.ts.channel,
|
title: channel.value ? channel.value.name : i18n.ts.channel,
|
||||||
icon: 'ti ti-device-tv',
|
icon: 'ti ti-device-tv',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ import MkRadios from '@/components/MkRadios.vue';
|
|||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import MkFoldableSection from '@/components/MkFoldableSection.vue';
|
import MkFoldableSection from '@/components/MkFoldableSection.vue';
|
||||||
import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue';
|
import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { useRouter } from '@/router/supplier.js';
|
import { useRouter } from '@/router/supplier.js';
|
||||||
|
|
||||||
@@ -161,7 +161,7 @@ const headerTabs = computed(() => [{
|
|||||||
icon: 'ti ti-edit',
|
icon: 'ti ti-edit',
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.channel,
|
title: i18n.ts.channel,
|
||||||
icon: 'ti ti-device-tv',
|
icon: 'ti ti-device-tv',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import MkClickerGame from '@/components/MkClickerGame.vue';
|
import MkClickerGame from '@/components/MkClickerGame.vue';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: '🍪👈',
|
title: '🍪👈',
|
||||||
icon: 'ti ti-cookie',
|
icon: 'ti ti-cookie',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ import { $i } from '@/account.js';
|
|||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import { clipsCache } from '@/cache.js';
|
import { clipsCache } from '@/cache.js';
|
||||||
import { isSupportShare } from '@/utility/navigator.js';
|
import { isSupportShare } from '@/utility/navigator.js';
|
||||||
@@ -193,7 +193,7 @@ const headerActions = computed(() => clip.value && isOwned.value ? [{
|
|||||||
},
|
},
|
||||||
}] : null);
|
}] : null);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: clip.value ? clip.value.name : i18n.ts.clip,
|
title: clip.value ? clip.value.name : i18n.ts.clip,
|
||||||
icon: 'ti ti-paperclip',
|
icon: 'ti ti-paperclip',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -37,11 +37,11 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { instance } from '@/instance.js';
|
import { instance } from '@/instance.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import MkKeyValue from '@/components/MkKeyValue.vue';
|
import MkKeyValue from '@/components/MkKeyValue.vue';
|
||||||
import MkLink from '@/components/MkLink.vue';
|
import MkLink from '@/components/MkLink.vue';
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.inquiry,
|
title: i18n.ts.inquiry,
|
||||||
icon: 'ti ti-help-circle',
|
icon: 'ti ti-help-circle',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ import * as os from '@/os.js';
|
|||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { getProxiedImageUrl } from '@/utility/media-proxy.js';
|
import { getProxiedImageUrl } from '@/utility/media-proxy.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
|
|
||||||
const emojisPaginationComponent = shallowRef<InstanceType<typeof MkPagination>>();
|
const emojisPaginationComponent = shallowRef<InstanceType<typeof MkPagination>>();
|
||||||
|
|
||||||
@@ -326,7 +326,7 @@ const headerTabs = computed(() => [{
|
|||||||
title: i18n.ts.remote,
|
title: i18n.ts.remote,
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.customEmojis,
|
title: i18n.ts.customEmojis,
|
||||||
icon: 'ti ti-icons',
|
icon: 'ti ti-icons',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref, defineAsyncComponent } from 'vue';
|
import { computed, ref, defineAsyncComponent } from 'vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue';
|
import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
@@ -48,7 +48,7 @@ const headerTabs = computed(() => [{
|
|||||||
icon: 'ti ti-pencil',
|
icon: 'ti ti-pencil',
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts._fileViewer.title,
|
title: i18n.ts._fileViewer.title,
|
||||||
icon: 'ti ti-file',
|
icon: 'ti ti-file',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import { computed, ref } from 'vue';
|
|||||||
import * as Misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import XDrive from '@/components/MkDrive.vue';
|
import XDrive from '@/components/MkDrive.vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
|
|
||||||
const folder = ref<Misskey.entities.DriveFolder | null>(null);
|
const folder = ref<Misskey.entities.DriveFolder | null>(null);
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ const headerActions = computed(() => []);
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: folder.value ? folder.value.name : i18n.ts.drive,
|
title: folder.value ? folder.value.name : i18n.ts.drive,
|
||||||
icon: 'ti ti-cloud',
|
icon: 'ti ti-cloud',
|
||||||
hideHeader: true,
|
hideHeader: true,
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ref="containerEl" :class="[$style.gameContainer, { [$style.gameOver]: isGameOver && !replaying }]" @contextmenu.stop.prevent @click.stop.prevent="onClick" @touchmove.stop.prevent="onTouchmove" @touchend="onTouchend" @mousemove="onMousemove">
|
<div ref="containerEl" :class="[$style.gameContainer, { [$style.gameOver]: isGameOver && !replaying }]" @contextmenu.stop.prevent @click.stop.prevent="onClick" @touchmove.stop.prevent="onTouchmove" @touchend="onTouchend" @mousemove="onMousemove">
|
||||||
<img v-if="store.state.darkMode" src="/client-assets/drop-and-fusion/frame-dark.svg" :class="$style.mainFrameImg"/>
|
<img v-if="store.s.darkMode" src="/client-assets/drop-and-fusion/frame-dark.svg" :class="$style.mainFrameImg"/>
|
||||||
<img v-else src="/client-assets/drop-and-fusion/frame-light.svg" :class="$style.mainFrameImg"/>
|
<img v-else src="/client-assets/drop-and-fusion/frame-light.svg" :class="$style.mainFrameImg"/>
|
||||||
<canvas ref="canvasEl" :class="$style.canvas"/>
|
<canvas ref="canvasEl" :class="$style.canvas"/>
|
||||||
<Transition
|
<Transition
|
||||||
@@ -198,7 +198,7 @@ import { DropAndFusionGame } from 'misskey-bubble-game';
|
|||||||
import { useInterval } from '@@/js/use-interval.js';
|
import { useInterval } from '@@/js/use-interval.js';
|
||||||
import { apiUrl } from '@@/js/config.js';
|
import { apiUrl } from '@@/js/config.js';
|
||||||
import type { Mono } from 'misskey-bubble-game';
|
import type { Mono } from 'misskey-bubble-game';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import MkRippleEffect from '@/components/MkRippleEffect.vue';
|
import MkRippleEffect from '@/components/MkRippleEffect.vue';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import MkNumber from '@/components/MkNumber.vue';
|
import MkNumber from '@/components/MkNumber.vue';
|
||||||
@@ -858,7 +858,7 @@ function updateSettings<
|
|||||||
>(key: K, value: V) {
|
>(key: K, value: V) {
|
||||||
const changes: { [P in K]?: V } = {};
|
const changes: { [P in K]?: V } = {};
|
||||||
changes[key] = value;
|
changes[key] = value;
|
||||||
prefer.set('game.dropAndFusion', {
|
prefer.commit('game.dropAndFusion', {
|
||||||
...prefer.s['game.dropAndFusion'],
|
...prefer.s['game.dropAndFusion'],
|
||||||
...changes,
|
...changes,
|
||||||
});
|
});
|
||||||
@@ -1229,7 +1229,7 @@ onDeactivated(() => {
|
|||||||
bgmNodes?.soundSource.stop();
|
bgmNodes?.soundSource.stop();
|
||||||
});
|
});
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.bubbleGame,
|
title: i18n.ts.bubbleGame,
|
||||||
icon: 'ti ti-apple',
|
icon: 'ti ti-apple',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref, watch } from 'vue';
|
import { computed, ref, watch } from 'vue';
|
||||||
import XGame from './drop-and-fusion.game.vue';
|
import XGame from './drop-and-fusion.game.vue';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import MkSelect from '@/components/MkSelect.vue';
|
import MkSelect from '@/components/MkSelect.vue';
|
||||||
@@ -121,7 +121,7 @@ function onGameEnd() {
|
|||||||
gameStarted.value = false;
|
gameStarted.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.bubbleGame,
|
title: i18n.ts.bubbleGame,
|
||||||
icon: 'ti ti-device-gamepad',
|
icon: 'ti ti-device-gamepad',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import XUsers from './explore.users.vue';
|
|||||||
import XRoles from './explore.roles.vue';
|
import XRoles from './explore.roles.vue';
|
||||||
import MkFoldableSection from '@/components/MkFoldableSection.vue';
|
import MkFoldableSection from '@/components/MkFoldableSection.vue';
|
||||||
import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue';
|
import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
@@ -60,7 +60,7 @@ const headerTabs = computed(() => [{
|
|||||||
title: i18n.ts.roles,
|
title: i18n.ts.roles,
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.explore,
|
title: i18n.ts.explore,
|
||||||
icon: 'ti ti-hash',
|
icon: 'ti ti-hash',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import MkPagination from '@/components/MkPagination.vue';
|
|||||||
import MkNote from '@/components/MkNote.vue';
|
import MkNote from '@/components/MkNote.vue';
|
||||||
import MkDateSeparatedList from '@/components/MkDateSeparatedList.vue';
|
import MkDateSeparatedList from '@/components/MkDateSeparatedList.vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import { infoImageUrl } from '@/instance.js';
|
import { infoImageUrl } from '@/instance.js';
|
||||||
|
|
||||||
const pagination = {
|
const pagination = {
|
||||||
@@ -38,7 +38,7 @@ const pagination = {
|
|||||||
limit: 10,
|
limit: 10,
|
||||||
};
|
};
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.favorites,
|
title: i18n.ts.favorites,
|
||||||
icon: 'ti ti-star',
|
icon: 'ti ti-star',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ import MkButton from '@/components/MkButton.vue';
|
|||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import MkTextarea from '@/components/MkTextarea.vue';
|
import MkTextarea from '@/components/MkTextarea.vue';
|
||||||
import MkCodeEditor from '@/components/MkCodeEditor.vue';
|
import MkCodeEditor from '@/components/MkCodeEditor.vue';
|
||||||
import MkInput from '@/components/MkInput.vue';
|
import MkInput from '@/components/MkInput.vue';
|
||||||
@@ -461,7 +461,7 @@ const headerActions = computed(() => []);
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: flash.value ? `${i18n.ts._play.edit}: ${flash.value.title}` : i18n.ts._play.new,
|
title: flash.value ? `${i18n.ts._play.edit}: ${flash.value.title}` : i18n.ts._play.new,
|
||||||
}));
|
}));
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ import MkPagination from '@/components/MkPagination.vue';
|
|||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue';
|
import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import { useRouter } from '@/router/supplier.js';
|
import { useRouter } from '@/router/supplier.js';
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -91,7 +91,7 @@ const headerTabs = computed(() => [{
|
|||||||
icon: 'ti ti-heart',
|
icon: 'ti ti-heart',
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: 'Play',
|
title: 'Play',
|
||||||
icon: 'ti ti-player-play',
|
icon: 'ti ti-player-play',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ import MkButton from '@/components/MkButton.vue';
|
|||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import MkAsUi from '@/components/MkAsUi.vue';
|
import MkAsUi from '@/components/MkAsUi.vue';
|
||||||
import { registerAsUiLib } from '@/aiscript/ui.js';
|
import { registerAsUiLib } from '@/aiscript/ui.js';
|
||||||
import { aiScriptReadline, createAiScriptEnv } from '@/aiscript/api.js';
|
import { aiScriptReadline, createAiScriptEnv } from '@/aiscript/api.js';
|
||||||
@@ -304,7 +304,7 @@ const headerActions = computed(() => []);
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: flash.value ? flash.value.title : 'Play',
|
title: flash.value ? flash.value.title : 'Play',
|
||||||
...flash.value ? {
|
...flash.value ? {
|
||||||
avatar: flash.value.user,
|
avatar: flash.value.user,
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ import MkButton from '@/components/MkButton.vue';
|
|||||||
import { userPage, acct } from '@/filters/user.js';
|
import { userPage, acct } from '@/filters/user.js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import { infoImageUrl } from '@/instance.js';
|
import { infoImageUrl } from '@/instance.js';
|
||||||
import { $i } from '@/account.js';
|
import { $i } from '@/account.js';
|
||||||
import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue';
|
import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue';
|
||||||
@@ -105,7 +105,7 @@ const headerTabs = computed(() => [
|
|||||||
|
|
||||||
const tab = ref($i?.isLocked ? 'list' : 'sent');
|
const tab = ref($i?.isLocked ? 'list' : 'sent');
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.followRequests,
|
title: i18n.ts.followRequests,
|
||||||
icon: 'ti ti-user-plus',
|
icon: 'ti ti-user-plus',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ import FormSuspense from '@/components/form/suspense.vue';
|
|||||||
import { selectFiles } from '@/utility/select-file.js';
|
import { selectFiles } from '@/utility/select-file.js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { useRouter } from '@/router/supplier.js';
|
import { useRouter } from '@/router/supplier.js';
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ const headerActions = computed(() => []);
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: props.postId ? i18n.ts.edit : i18n.ts.postToGallery,
|
title: props.postId ? i18n.ts.edit : i18n.ts.postToGallery,
|
||||||
icon: 'ti ti-pencil',
|
icon: 'ti ti-pencil',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ import MkFoldableSection from '@/components/MkFoldableSection.vue';
|
|||||||
import MkPagination from '@/components/MkPagination.vue';
|
import MkPagination from '@/components/MkPagination.vue';
|
||||||
import MkGalleryPostPreview from '@/components/MkGalleryPostPreview.vue';
|
import MkGalleryPostPreview from '@/components/MkGalleryPostPreview.vue';
|
||||||
import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue';
|
import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { useRouter } from '@/router/supplier.js';
|
import { useRouter } from '@/router/supplier.js';
|
||||||
|
|
||||||
@@ -119,7 +119,7 @@ const headerTabs = computed(() => [{
|
|||||||
icon: 'ti ti-edit',
|
icon: 'ti ti-edit',
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.gallery,
|
title: i18n.ts.gallery,
|
||||||
icon: 'ti ti-icons',
|
icon: 'ti ti-icons',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ import MkPagination from '@/components/MkPagination.vue';
|
|||||||
import MkGalleryPostPreview from '@/components/MkGalleryPostPreview.vue';
|
import MkGalleryPostPreview from '@/components/MkGalleryPostPreview.vue';
|
||||||
import MkFollowButton from '@/components/MkFollowButton.vue';
|
import MkFollowButton from '@/components/MkFollowButton.vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import { prefer } from '@/preferences.js';
|
import { prefer } from '@/preferences.js';
|
||||||
import { $i } from '@/account.js';
|
import { $i } from '@/account.js';
|
||||||
import { isSupportShare } from '@/utility/navigator.js';
|
import { isSupportShare } from '@/utility/navigator.js';
|
||||||
@@ -208,7 +208,7 @@ const headerActions = computed(() => []);
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: post.value ? post.value.title : i18n.ts.gallery,
|
title: post.value ? post.value.title : i18n.ts.gallery,
|
||||||
...post.value ? {
|
...post.value ? {
|
||||||
avatar: post.value.user,
|
avatar: post.value.user,
|
||||||
|
|||||||
@@ -25,9 +25,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: 'Misskey Games',
|
title: 'Misskey Games',
|
||||||
icon: 'ti ti-device-gamepad',
|
icon: 'ti ti-device-gamepad',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ import { parsePluginMeta, installPlugin } from '@/plugin.js';
|
|||||||
import { parseThemeCode, installTheme } from '@/theme.js';
|
import { parseThemeCode, installTheme } from '@/theme.js';
|
||||||
import { unisonReload } from '@/utility/unison-reload.js';
|
import { unisonReload } from '@/utility/unison-reload.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
|
|
||||||
const uiPhase = ref<'fetching' | 'confirm' | 'error'>('fetching');
|
const uiPhase = ref<'fetching' | 'confirm' | 'error'>('fetching');
|
||||||
const errorKV = ref<{
|
const errorKV = ref<{
|
||||||
@@ -244,7 +244,7 @@ const headerActions = computed(() => []);
|
|||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts._externalResourceInstaller.title,
|
title: i18n.ts._externalResourceInstaller.title,
|
||||||
icon: 'ti ti-download',
|
icon: 'ti ti-download',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ import * as os from '@/os.js';
|
|||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import number from '@/filters/number.js';
|
import number from '@/filters/number.js';
|
||||||
import { iAmModerator, iAmAdmin } from '@/account.js';
|
import { iAmModerator, iAmAdmin } from '@/account.js';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import MkUserCardMini from '@/components/MkUserCardMini.vue';
|
import MkUserCardMini from '@/components/MkUserCardMini.vue';
|
||||||
import MkPagination from '@/components/MkPagination.vue';
|
import MkPagination from '@/components/MkPagination.vue';
|
||||||
@@ -299,7 +299,7 @@ const headerTabs = computed(() => [{
|
|||||||
icon: 'ti ti-code',
|
icon: 'ti ti-code',
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: props.host,
|
title: props.host,
|
||||||
icon: 'ti ti-server',
|
icon: 'ti ti-server',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ import MkButton from '@/components/MkButton.vue';
|
|||||||
import MkPagination from '@/components/MkPagination.vue';
|
import MkPagination from '@/components/MkPagination.vue';
|
||||||
import type { Paging } from '@/components/MkPagination.vue';
|
import type { Paging } from '@/components/MkPagination.vue';
|
||||||
import MkInviteCode from '@/components/MkInviteCode.vue';
|
import MkInviteCode from '@/components/MkInviteCode.vue';
|
||||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
import { definePage } from '@/page.js';
|
||||||
import { serverErrorImageUrl, instance } from '@/instance.js';
|
import { serverErrorImageUrl, instance } from '@/instance.js';
|
||||||
import { $i } from '@/account.js';
|
import { $i } from '@/account.js';
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ async function update() {
|
|||||||
|
|
||||||
update();
|
update();
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePage(() => ({
|
||||||
title: i18n.ts.invite,
|
title: i18n.ts.invite,
|
||||||
icon: 'ti ti-user-plus',
|
icon: 'ti ti-user-plus',
|
||||||
}));
|
}));
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user