-
{{ session.app.isAuthorized ? i18n.t('already-authorized') : i18n.ts.allowed }}
+
{{ session.app.isAuthorized ? i18n.ts['already-authorized'] : i18n.ts.allowed }}
{{ i18n.ts._auth.callback }}
diff --git a/packages/frontend/src/pages/avatar-decorations.vue b/packages/frontend/src/pages/avatar-decorations.vue
index 376679fd17..f71a7685bd 100644
--- a/packages/frontend/src/pages/avatar-decorations.vue
+++ b/packages/frontend/src/pages/avatar-decorations.vue
@@ -60,7 +60,7 @@ function add() {
function del(avatarDecoration) {
os.confirm({
type: 'warning',
- text: i18n.t('deleteAreYouSure', { x: avatarDecoration.name }),
+ text: i18n.tsx.deleteAreYouSure({ x: avatarDecoration.name }),
}).then(({ canceled }) => {
if (canceled) return;
avatarDecorations.value = avatarDecorations.value.filter(x => x !== avatarDecoration);
diff --git a/packages/frontend/src/pages/channel-editor.vue b/packages/frontend/src/pages/channel-editor.vue
index 99b93444db..bbe5dc0a4e 100644
--- a/packages/frontend/src/pages/channel-editor.vue
+++ b/packages/frontend/src/pages/channel-editor.vue
@@ -174,7 +174,7 @@ function save() {
async function archive() {
const { canceled } = await os.confirm({
type: 'warning',
- title: i18n.t('channelArchiveConfirmTitle', { name: name.value }),
+ title: i18n.tsx.channelArchiveConfirmTitle({ name: name.value }),
text: i18n.ts.channelArchiveConfirmDescription,
});
diff --git a/packages/frontend/src/pages/clip.vue b/packages/frontend/src/pages/clip.vue
index e55e99a6fa..8640561583 100644
--- a/packages/frontend/src/pages/clip.vue
+++ b/packages/frontend/src/pages/clip.vue
@@ -145,7 +145,7 @@ const headerActions = computed(() => clip.value && isOwned.value ? [{
handler: async (): Promise => {
const { canceled } = await os.confirm({
type: 'warning',
- text: i18n.t('deleteAreYouSure', { x: clip.value.name }),
+ text: i18n.tsx.deleteAreYouSure({ x: clip.value.name }),
});
if (canceled) return;
diff --git a/packages/frontend/src/pages/drive.file.info.vue b/packages/frontend/src/pages/drive.file.info.vue
index 64c3ad70ba..3e45f5e88c 100644
--- a/packages/frontend/src/pages/drive.file.info.vue
+++ b/packages/frontend/src/pages/drive.file.info.vue
@@ -180,7 +180,7 @@ async function deleteFile() {
const { canceled } = await os.confirm({
type: 'warning',
- text: i18n.t('driveFileDeleteConfirm', { name: file.value.name }),
+ text: i18n.tsx.driveFileDeleteConfirm({ name: file.value.name }),
});
if (canceled) return;
diff --git a/packages/frontend/src/pages/drop-and-fusion.vue b/packages/frontend/src/pages/drop-and-fusion.vue
index beb2e714e0..b995521dfb 100644
--- a/packages/frontend/src/pages/drop-and-fusion.vue
+++ b/packages/frontend/src/pages/drop-and-fusion.vue
@@ -45,7 +45,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-
{{ i18n.t('lastNDays', { n: 7 }) }} {{ i18n.ts.ranking }} ({{ gameMode }})
+
{{ i18n.tsx.lastNDays({ n: 7 }) }} {{ i18n.ts.ranking }} ({{ gameMode }})
diff --git a/packages/frontend/src/pages/emoji-edit-dialog.vue b/packages/frontend/src/pages/emoji-edit-dialog.vue
index 1ef150bc2d..9dcc7bc035 100644
--- a/packages/frontend/src/pages/emoji-edit-dialog.vue
+++ b/packages/frontend/src/pages/emoji-edit-dialog.vue
@@ -185,7 +185,7 @@ async function done() {
async function del() {
const { canceled } = await os.confirm({
type: 'warning',
- text: i18n.t('removeAreYouSure', { x: name.value }),
+ text: i18n.tsx.removeAreYouSure({ x: name.value }),
});
if (canceled) return;
diff --git a/packages/frontend/src/pages/flash/flash-edit.vue b/packages/frontend/src/pages/flash/flash-edit.vue
index ba350f1c0a..8f60b83a6c 100644
--- a/packages/frontend/src/pages/flash/flash-edit.vue
+++ b/packages/frontend/src/pages/flash/flash-edit.vue
@@ -438,7 +438,7 @@ function show() {
async function del() {
const { canceled } = await os.confirm({
type: 'warning',
- text: i18n.t('deleteAreYouSure', { x: flash.value.title }),
+ text: i18n.tsx.deleteAreYouSure({ x: flash.value.title }),
});
if (canceled) return;
diff --git a/packages/frontend/src/pages/follow.vue b/packages/frontend/src/pages/follow.vue
index eefef828bd..44364bb0f2 100644
--- a/packages/frontend/src/pages/follow.vue
+++ b/packages/frontend/src/pages/follow.vue
@@ -20,7 +20,7 @@ import { mainRouter } from '@/global/router/main.js';
async function follow(user): Promise {
const { canceled } = await os.confirm({
type: 'question',
- text: i18n.t('followConfirm', { name: user.name || user.username }),
+ text: i18n.tsx.followConfirm({ name: user.name || user.username }),
});
if (canceled) {
diff --git a/packages/frontend/src/pages/instance-info.vue b/packages/frontend/src/pages/instance-info.vue
index 4211dc0d87..9519a8a3f4 100644
--- a/packages/frontend/src/pages/instance-info.vue
+++ b/packages/frontend/src/pages/instance-info.vue
@@ -95,9 +95,9 @@ SPDX-License-Identifier: AGPL-3.0-only
-
{{ i18n.t('recentNHours', { n: 90 }) }}
+
{{ i18n.tsx.recentNHours({ n: 90 }) }}
-
{{ i18n.t('recentNDays', { n: 90 }) }}
+
{{ i18n.tsx.recentNDays({ n: 90 }) }}
diff --git a/packages/frontend/src/pages/invite.vue b/packages/frontend/src/pages/invite.vue
index 61030741fa..d8613a67d3 100644
--- a/packages/frontend/src/pages/invite.vue
+++ b/packages/frontend/src/pages/invite.vue
@@ -19,9 +19,9 @@ SPDX-License-Identifier: AGPL-3.0-only
-
{{ i18n.t('inviteLimitResetCycle', { time: resetCycle, limit: inviteLimit }) }}
+
{{ i18n.tsx.inviteLimitResetCycle({ time: resetCycle, limit: inviteLimit }) }}
{{ i18n.ts.createInviteCode }}
-
{{ i18n.t('createLimitRemaining', { limit: currentInviteLimit }) }}
+
{{ i18n.tsx.createLimitRemaining({ limit: currentInviteLimit }) }}
diff --git a/packages/frontend/src/pages/miauth.vue b/packages/frontend/src/pages/miauth.vue
index 539cb462ad..27ae1bdbc8 100644
--- a/packages/frontend/src/pages/miauth.vue
+++ b/packages/frontend/src/pages/miauth.vue
@@ -20,13 +20,13 @@ SPDX-License-Identifier: AGPL-3.0-only
-
{{ i18n.t('_auth.permission', { name }) }}
+
{{ i18n.tsx._auth.permission({ name }) }}
{{ i18n.ts._auth.permissionAsk }}
- - {{ i18n.t(`_permissions.${p}`) }}
+ - {{ i18n.ts._permissions[p] }}
-
{{ i18n.t('_auth.shareAccess', { name }) }}
+
{{ i18n.tsx._auth.shareAccess({ name }) }}
{{ i18n.ts._auth.shareAccessAsk }}
{{ i18n.ts.cancel }}
diff --git a/packages/frontend/src/pages/my-antennas/editor.vue b/packages/frontend/src/pages/my-antennas/editor.vue
index 45acbb2158..a4c6ca6f52 100644
--- a/packages/frontend/src/pages/my-antennas/editor.vue
+++ b/packages/frontend/src/pages/my-antennas/editor.vue
@@ -116,7 +116,7 @@ async function saveAntenna() {
async function deleteAntenna() {
const { canceled } = await os.confirm({
type: 'warning',
- text: i18n.t('removeAreYouSure', { x: props.antenna.name }),
+ text: i18n.tsx.removeAreYouSure({ x: props.antenna.name }),
});
if (canceled) return;
diff --git a/packages/frontend/src/pages/my-lists/index.vue b/packages/frontend/src/pages/my-lists/index.vue
index 14e2315843..295112b0ba 100644
--- a/packages/frontend/src/pages/my-lists/index.vue
+++ b/packages/frontend/src/pages/my-lists/index.vue
@@ -19,7 +19,7 @@ SPDX-License-Identifier: AGPL-3.0-only
- {{ list.name }} ({{ i18n.t('nUsers', { n: `${list.userIds.length}/${$i.policies['userEachUserListsLimit']}` }) }})
+ {{ list.name }} ({{ i18n.tsx.nUsers({ n: `${list.userIds.length}/${$i.policies['userEachUserListsLimit']}` }) }})
diff --git a/packages/frontend/src/pages/my-lists/list.vue b/packages/frontend/src/pages/my-lists/list.vue
index 85775a2fdd..7207e956db 100644
--- a/packages/frontend/src/pages/my-lists/list.vue
+++ b/packages/frontend/src/pages/my-lists/list.vue
@@ -25,7 +25,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.members }}
- {{ i18n.t('nUsers', { n: `${list.userIds.length}/${$i.policies['userEachUserListsLimit']}` }) }}
+ {{ i18n.tsx.nUsers({ n: `${list.userIds.length}/${$i.policies['userEachUserListsLimit']}` }) }}
{{ i18n.ts.addUser }}
@@ -155,7 +155,7 @@ async function deleteList() {
if (!list.value) return;
const { canceled } = await os.confirm({
type: 'warning',
- text: i18n.t('removeAreYouSure', { x: list.value.name }),
+ text: i18n.tsx.removeAreYouSure({ x: list.value.name }),
});
if (canceled) return;
diff --git a/packages/frontend/src/pages/note.vue b/packages/frontend/src/pages/note.vue
index 4c0e9bbb98..9b72f9b2ac 100644
--- a/packages/frontend/src/pages/note.vue
+++ b/packages/frontend/src/pages/note.vue
@@ -147,7 +147,7 @@ definePageMetadata(computed(() => note.value ? {
avatar: note.value.user,
path: `/notes/${note.value.id}`,
share: {
- title: i18n.t('noteOf', { user: note.value.user.name }),
+ title: i18n.tsx.noteOf({ user: note.value.user.name }),
text: note.value.text,
},
} : null));
diff --git a/packages/frontend/src/pages/notifications.vue b/packages/frontend/src/pages/notifications.vue
index 8913a89adb..e6098c90b3 100644
--- a/packages/frontend/src/pages/notifications.vue
+++ b/packages/frontend/src/pages/notifications.vue
@@ -51,7 +51,7 @@ const directNotesPagination = {
function setFilter(ev) {
const typeItems = notificationTypes.map(t => ({
- text: i18n.t(`_notification._types.${t}`),
+ text: i18n.ts._notification._types[t],
active: includeTypes.value && includeTypes.value.includes(t),
action: () => {
includeTypes.value = [t];
diff --git a/packages/frontend/src/pages/oauth.vue b/packages/frontend/src/pages/oauth.vue
index 878fa6be4e..38b9dd60c4 100644
--- a/packages/frontend/src/pages/oauth.vue
+++ b/packages/frontend/src/pages/oauth.vue
@@ -9,13 +9,13 @@ SPDX-License-Identifier: AGPL-3.0-only
-
{{ i18n.t('_auth.permission', { name }) }}
+
{{ i18n.tsx._auth.permission({ name }) }}
{{ i18n.ts._auth.permissionAsk }}
- - {{ i18n.t(`_permissions.${p}`) }}
+ - {{ i18n.ts._permissions[p] }}
-
{{ i18n.t('_auth.shareAccess', { name }) }}
+
{{ i18n.tsx._auth.shareAccess({ name }) }}
{{ i18n.ts._auth.shareAccessAsk }}
@@ -138,6 +138,7 @@ function show() {
active: computed(() => v.value === option.props?.value),
action: () => {
v.value = option.props?.value;
+ changed.value = true;
emit('changeByUser', v.value);
},
});
@@ -288,6 +289,10 @@ function show() {
padding-left: 6px;
}
+.save {
+ margin: 8px 0 0 0;
+}
+
.chevron {
transition: transform 0.1s ease-out;
}
diff --git a/packages/frontend/src/pages/settings/theme.vue b/packages/frontend/src/pages/settings/theme.vue
index dedac10270..1d6fec5290 100644
--- a/packages/frontend/src/pages/settings/theme.vue
+++ b/packages/frontend/src/pages/settings/theme.vue
@@ -88,6 +88,18 @@ import { uniqueBy } from '@/scripts/array.js';
import { fetchThemes, getThemes } from '@/theme-store.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import { miLocalStorage } from '@/local-storage.js';
+import { unisonReload } from '@/scripts/unison-reload.js';
+import * as os from '@/os.js';
+
+async function reloadAsk() {
+ const { canceled } = await os.confirm({
+ type: 'info',
+ text: i18n.ts.reloadToApplySetting,
+ });
+ if (canceled) return;
+
+ unisonReload();
+}
const installedThemes = ref(getThemes());
const builtinThemes = getBuiltinThemesRef();
@@ -124,6 +136,7 @@ const lightThemeId = computed({
}
},
});
+
const darkMode = computed(defaultStore.makeGetterSetter('darkMode'));
const syncDeviceDarkMode = computed(ColdDeviceStorage.makeGetterSetter('syncDeviceDarkMode'));
const wallpaper = ref(miLocalStorage.getItem('wallpaper'));
@@ -141,7 +154,7 @@ watch(wallpaper, () => {
} else {
miLocalStorage.setItem('wallpaper', wallpaper.value);
}
- location.reload();
+ reloadAsk();
});
onActivated(() => {
diff --git a/packages/frontend/src/pizzax.ts b/packages/frontend/src/pizzax.ts
index 68c36ca1b4..043b6efd73 100644
--- a/packages/frontend/src/pizzax.ts
+++ b/packages/frontend/src/pizzax.ts
@@ -13,6 +13,7 @@ import { get, set } from '@/scripts/idb-proxy.js';
import { defaultStore } from '@/store.js';
import { useStream } from '@/stream.js';
import { deepClone } from '@/scripts/clone.js';
+import { deepMerge } from '@/scripts/merge.js';
type StateDef = Record {
return typeof value === 'object' && value !== null && !Array.isArray(value);
}
- /**
- * valueにないキーをdefからもらう(再帰的)\
- * nullはそのまま、undefinedはdefの値
- **/
- private mergeObject(value: X, def: X): X {
- if (this.isPureObject(value) && this.isPureObject(def)) {
- const result = structuredClone(value) as X;
- for (const [k, v] of Object.entries(def) as [keyof X, X[keyof X]][]) {
- if (!Object.prototype.hasOwnProperty.call(value, k) || value[k] === undefined) {
- result[k] = v;
- } else if (this.isPureObject(v) && this.isPureObject(result[k])) {
- const child = structuredClone(result[k]) as X[keyof X] & Record;
- result[k] = this.mergeObject(child, v);
- }
- }
- return result;
- }
- return value;
- }
-
private mergeState(value: X, def: X): X {
if (this.isPureObject(value) && this.isPureObject(def)) {
- const merged = this.mergeObject(value, def);
+ const merged = deepMerge(value, def);
if (_DEV_) console.log('Merging state. Incoming: ', value, ' Default: ', def, ' Result: ', merged);
diff --git a/packages/frontend/src/router/main.ts b/packages/frontend/src/router/main.ts
index 5adb3f606f..c6a520e913 100644
--- a/packages/frontend/src/router/main.ts
+++ b/packages/frontend/src/router/main.ts
@@ -80,6 +80,10 @@ class MainRouterProxy implements IRouter {
return this.supplier().resolve(path);
}
+ init(): void {
+ this.supplier().init();
+ }
+
eventNames(): Array> {
return this.supplier().eventNames();
}
diff --git a/packages/frontend/src/scripts/clone.ts b/packages/frontend/src/scripts/clone.ts
index ac38faefaa..6d3a1c8c79 100644
--- a/packages/frontend/src/scripts/clone.ts
+++ b/packages/frontend/src/scripts/clone.ts
@@ -8,13 +8,13 @@
// あと、Vue RefをIndexedDBに保存しようとしてstructredCloneを使ったらエラーになった
// https://github.com/misskey-dev/misskey/pull/8098#issuecomment-1114144045
-type Cloneable = string | number | boolean | null | undefined | { [key: string]: Cloneable } | Cloneable[];
+export type Cloneable = string | number | boolean | null | undefined | { [key: string]: Cloneable } | { [key: number]: Cloneable } | { [key: symbol]: Cloneable } | Cloneable[];
export function deepClone(x: T): T {
if (typeof x === 'object') {
if (x === null) return x;
if (Array.isArray(x)) return x.map(deepClone) as T;
- const obj = {} as Record;
+ const obj = {} as Record;
for (const [k, v] of Object.entries(x)) {
obj[k] = v === undefined ? undefined : deepClone(v);
}
diff --git a/packages/frontend/src/scripts/code-highlighter.ts b/packages/frontend/src/scripts/code-highlighter.ts
index bc05ec94d5..b11dfed41a 100644
--- a/packages/frontend/src/scripts/code-highlighter.ts
+++ b/packages/frontend/src/scripts/code-highlighter.ts
@@ -1,9 +1,51 @@
+import { bundledThemesInfo } from 'shiki';
import { getHighlighterCore, loadWasm } from 'shiki/core';
import darkPlus from 'shiki/themes/dark-plus.mjs';
-import type { Highlighter, LanguageRegistration } from 'shiki';
+import { unique } from './array.js';
+import { deepClone } from './clone.js';
+import { deepMerge } from './merge.js';
+import type { Highlighter, LanguageRegistration, ThemeRegistration, ThemeRegistrationRaw } from 'shiki';
+import { ColdDeviceStorage } from '@/store.js';
+import lightTheme from '@/themes/_light.json5';
+import darkTheme from '@/themes/_dark.json5';
let _highlighter: Highlighter | null = null;
+export async function getTheme(mode: 'light' | 'dark', getName: true): Promise;
+export async function getTheme(mode: 'light' | 'dark', getName?: false): Promise;
+export async function getTheme(mode: 'light' | 'dark', getName = false): Promise {
+ const theme = deepClone(ColdDeviceStorage.get(mode === 'light' ? 'lightTheme' : 'darkTheme'));
+
+ if (theme.base) {
+ const base = [lightTheme, darkTheme].find(x => x.id === theme.base);
+ if (base && base.codeHighlighter) theme.codeHighlighter = Object.assign({}, base.codeHighlighter, theme.codeHighlighter);
+ }
+
+ if (theme.codeHighlighter) {
+ let _res: ThemeRegistration = {};
+ if (theme.codeHighlighter.base === '_none_') {
+ _res = deepClone(theme.codeHighlighter.overrides);
+ } else {
+ const base = await bundledThemesInfo.find(t => t.id === theme.codeHighlighter!.base)?.import() ?? darkPlus;
+ _res = deepMerge(theme.codeHighlighter.overrides ?? {}, 'default' in base ? base.default : base);
+ }
+ if (_res.name == null) {
+ _res.name = theme.id;
+ }
+ _res.type = mode;
+
+ if (getName) {
+ return _res.name;
+ }
+ return _res;
+ }
+
+ if (getName) {
+ return 'dark-plus';
+ }
+ return darkPlus;
+}
+
export async function getHighlighter(): Promise {
if (!_highlighter) {
return await initHighlighter();
@@ -13,11 +55,17 @@ export async function getHighlighter(): Promise {
export async function initHighlighter() {
const aiScriptGrammar = await import('aiscript-vscode/aiscript/syntaxes/aiscript.tmLanguage.json');
-
+
await loadWasm(import('shiki/onig.wasm?init'));
+ // テーマの重複を消す
+ const themes = unique([
+ darkPlus,
+ ...(await Promise.all([getTheme('light'), getTheme('dark')])),
+ ]);
+
const highlighter = await getHighlighterCore({
- themes: [darkPlus],
+ themes,
langs: [
import('shiki/langs/javascript.mjs'),
{
@@ -27,6 +75,20 @@ export async function initHighlighter() {
],
});
+ ColdDeviceStorage.watch('lightTheme', async () => {
+ const newTheme = await getTheme('light');
+ if (newTheme.name && !highlighter.getLoadedThemes().includes(newTheme.name)) {
+ highlighter.loadTheme(newTheme);
+ }
+ });
+
+ ColdDeviceStorage.watch('darkTheme', async () => {
+ const newTheme = await getTheme('dark');
+ if (newTheme.name && !highlighter.getLoadedThemes().includes(newTheme.name)) {
+ highlighter.loadTheme(newTheme);
+ }
+ });
+
_highlighter = highlighter;
return highlighter;
diff --git a/packages/frontend/src/scripts/merge.ts b/packages/frontend/src/scripts/merge.ts
new file mode 100644
index 0000000000..60097051fa
--- /dev/null
+++ b/packages/frontend/src/scripts/merge.ts
@@ -0,0 +1,31 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+import { deepClone } from './clone.js';
+import type { Cloneable } from './clone.js';
+
+function isPureObject(value: unknown): value is Record {
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
+}
+
+/**
+ * valueにないキーをdefからもらう(再帰的)\
+ * nullはそのまま、undefinedはdefの値
+ **/
+export function deepMerge>(value: X, def: X): X {
+ if (isPureObject(value) && isPureObject(def)) {
+ const result = deepClone(value as Cloneable) as X;
+ for (const [k, v] of Object.entries(def) as [keyof X, X[keyof X]][]) {
+ if (!Object.prototype.hasOwnProperty.call(value, k) || value[k] === undefined) {
+ result[k] = v;
+ } else if (isPureObject(v) && isPureObject(result[k])) {
+ const child = deepClone(result[k] as Cloneable) as X[keyof X] & Record;
+ result[k] = deepMerge(child, v);
+ }
+ }
+ return result;
+ }
+ return value;
+}
diff --git a/packages/frontend/src/scripts/theme.ts b/packages/frontend/src/scripts/theme.ts
index 21ef85fe7a..d3bd9ba4bc 100644
--- a/packages/frontend/src/scripts/theme.ts
+++ b/packages/frontend/src/scripts/theme.ts
@@ -6,6 +6,7 @@
import { ref } from 'vue';
import tinycolor from 'tinycolor2';
import { deepClone } from './clone.js';
+import type { BuiltinTheme } from 'shiki';
import { globalEvents } from '@/events.js';
import lightTheme from '@/themes/_light.json5';
import darkTheme from '@/themes/_dark.json5';
@@ -18,6 +19,13 @@ export type Theme = {
desc?: string;
base?: 'dark' | 'light';
props: Record;
+ codeHighlighter?: {
+ base: BuiltinTheme;
+ overrides?: Record;
+ } | {
+ base: '_none_';
+ overrides: Record;
+ };
};
export const themeProps = Object.keys(lightTheme.props).filter(key => !key.startsWith('X'));
@@ -53,7 +61,7 @@ export const getBuiltinThemesRef = () => {
return builtinThemes;
};
-let timeout = null;
+let timeout: number | null = null;
export function applyTheme(theme: Theme, persist = true) {
if (timeout) window.clearTimeout(timeout);
diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts
index afc35bb825..641a506679 100644
--- a/packages/frontend/src/store.ts
+++ b/packages/frontend/src/store.ts
@@ -7,6 +7,7 @@ import { markRaw, ref } from 'vue';
import * as Misskey from 'misskey-js';
import { miLocalStorage } from './local-storage.js';
import type { SoundType } from '@/scripts/sound.js';
+import type { BuiltinTheme as ShikiBuiltinTheme } from 'shiki';
import { Storage } from '@/pizzax.js';
import { hemisphere } from '@/scripts/intl-const.js';
diff --git a/packages/frontend/src/themes/_dark.json5 b/packages/frontend/src/themes/_dark.json5
index 3f5822977a..c82a956868 100644
--- a/packages/frontend/src/themes/_dark.json5
+++ b/packages/frontend/src/themes/_dark.json5
@@ -94,4 +94,8 @@
X16: ':alpha<0.7<@panel',
X17: ':alpha<0.8<@bg',
},
+
+ codeHighlighter: {
+ base: 'one-dark-pro',
+ },
}
diff --git a/packages/frontend/src/themes/_light.json5 b/packages/frontend/src/themes/_light.json5
index 6ebfcaafeb..63bc030916 100644
--- a/packages/frontend/src/themes/_light.json5
+++ b/packages/frontend/src/themes/_light.json5
@@ -94,4 +94,8 @@
X16: ':alpha<0.7<@panel',
X17: ':alpha<0.8<@bg',
},
+
+ codeHighlighter: {
+ base: 'catppuccin-latte',
+ },
}
--
cgit v1.2.3-freya
From edb39a089d6652eb5b0212069f3050823c4c07e7 Mon Sep 17 00:00:00 2001
From: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>
Date: Tue, 6 Feb 2024 16:26:03 +0900
Subject: enhance(frontend): KeepAliveのページキャッシュを削除できるように
(#13180)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* enhance(frontend): 内部のページキャッシュを削除できるように
* Update Changelog
---
CHANGELOG.md | 1 +
.../frontend/src/components/global/RouterView.vue | 42 +++++++++++++++++++---
packages/frontend/src/events.ts | 8 +++--
packages/frontend/src/pages/settings/profile.vue | 5 +++
4 files changed, 49 insertions(+), 7 deletions(-)
(limited to 'packages/frontend/src/components')
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c39a447c59..0fc99cf5b8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -66,6 +66,7 @@
- Fix: 画像をクロップするとクロップ後の解像度が異様に低くなる問題の修正
- Fix: 画像をクロップ時、正常に完了できない問題の修正
- Fix: キャプションが空の画像をクロップするとキャプションにnullという文字列が入ってしまう問題の修正
+- Fix: プロフィールを編集してもリロードするまで反映されない問題を修正
### Server
- Enhance: 連合先のレートリミットに引っかかった際にリトライするようになりました
diff --git a/packages/frontend/src/components/global/RouterView.vue b/packages/frontend/src/components/global/RouterView.vue
index dc7474835d..aeb87e659b 100644
--- a/packages/frontend/src/components/global/RouterView.vue
+++ b/packages/frontend/src/components/global/RouterView.vue
@@ -4,7 +4,10 @@ SPDX-License-Identifier: AGPL-3.0-only
-->
-
+
@@ -16,9 +19,11 @@ SPDX-License-Identifier: AGPL-3.0-only
diff --git a/packages/frontend/src/local-storage.ts b/packages/frontend/src/local-storage.ts
index 355715bcc6..3de81c9bb9 100644
--- a/packages/frontend/src/local-storage.ts
+++ b/packages/frontend/src/local-storage.ts
@@ -12,6 +12,7 @@ type Keys =
'latestDonationInfoShownAt' |
'neverShowDonationInfo' |
'neverShowLocalOnlyInfo' |
+ 'modifiedVersionMustProminentlyOfferInAgplV3Section13Read' |
'lastUsed' |
'lang' |
'drafts' |
diff --git a/packages/frontend/src/pages/about-misskey.vue b/packages/frontend/src/pages/about-misskey.vue
index a2ecae3b80..fd97ab97b9 100644
--- a/packages/frontend/src/pages/about-misskey.vue
+++ b/packages/frontend/src/pages/about-misskey.vue
@@ -31,7 +31,7 @@ SPDX-License-Identifier: AGPL-3.0-only
- {{ i18n.ts._aboutMisskey.source }}
+ {{ i18n.ts._aboutMisskey.source }} ({{ i18n.ts._aboutMisskey.original }})
GitHub
@@ -46,6 +46,25 @@ SPDX-License-Identifier: AGPL-3.0-only
+
+
+
+ {{ i18n.tsx._aboutMisskey.thisIsModifiedVersion({ name: instance.name }) }}
+
+
+
+ {{ i18n.ts._aboutMisskey.source }}
+
+
+
+ {{ i18n.ts._aboutMisskey.source }}
+ Tarball
+
+
+ {{ i18n.ts.sourceCodeIsNotYetProvided }}
+
+
+
{{ i18n.ts._aboutMisskey.projectMembers }}
@@ -118,9 +137,10 @@ import { version } from '@/config.js';
import FormLink from '@/components/form/link.vue';
import FormSection from '@/components/form/section.vue';
import MkButton from '@/components/MkButton.vue';
-import MkLink from '@/components/MkLink.vue';
+import MkInfo from '@/components/MkInfo.vue';
import { physics } from '@/scripts/physics.js';
import { i18n } from '@/i18n.js';
+import { instance } from '@/instance.js';
import { defaultStore } from '@/store.js';
import * as os from '@/os.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
diff --git a/packages/frontend/src/pages/about.vue b/packages/frontend/src/pages/about.vue
index f99eb9c577..324d1c11de 100644
--- a/packages/frontend/src/pages/about.vue
+++ b/packages/frontend/src/pages/about.vue
@@ -31,7 +31,17 @@ SPDX-License-Identifier: AGPL-3.0-only
-
{{ i18n.ts.aboutMisskey }}
+
+
+ {{ i18n.ts.aboutMisskey }}
+
+
+
+ {{ i18n.ts.sourceCode }}
+
+
+ {{ i18n.ts.sourceCodeIsNotYetProvided }}
+
@@ -47,17 +57,33 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ instance.maintainerEmail }}
- {{ i18n.ts.impressum }}
+
+
+ {{ i18n.ts.impressum }}
+
- {{ i18n.ts.serverRules }}
+
+
+ {{ i18n.ts.serverRules }}
+
-
+
-
{{ i18n.ts.termsOfService }}
-
{{ i18n.ts.privacyPolicy }}
+
+
+ {{ i18n.ts.termsOfService }}
+
+
+
+ {{ i18n.ts.privacyPolicy }}
+
+
+
+ {{ i18n.ts.feedback }}
+
@@ -86,7 +112,6 @@ SPDX-License-Identifier: AGPL-3.0-only
nodeinfo
robots.txt
manifest.json
- source code
@@ -116,6 +141,7 @@ import FormSuspense from '@/components/form/suspense.vue';
import FormSplit from '@/components/form/split.vue';
import MkFolder from '@/components/MkFolder.vue';
import MkKeyValue from '@/components/MkKeyValue.vue';
+import MkInfo from '@/components/MkInfo.vue';
import MkInstanceStats from '@/components/MkInstanceStats.vue';
import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue';
import { misskeyApi } from '@/scripts/misskey-api.js';
diff --git a/packages/frontend/src/pages/admin/branding.vue b/packages/frontend/src/pages/admin/branding.vue
index 4ac2011aaf..2b559f92c9 100644
--- a/packages/frontend/src/pages/admin/branding.vue
+++ b/packages/frontend/src/pages/admin/branding.vue
@@ -76,6 +76,16 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.instanceDefaultThemeDescription }}
+
+
+ {{ i18n.ts.repositoryUrl }}
+
+
+
+
+ {{ i18n.ts.feedbackUrl }}
+
+
{{ i18n.ts._serverSettings.manifestJsonOverride }}
@@ -120,6 +130,8 @@ const defaultDarkTheme = ref(null);
const serverErrorImageUrl = ref(null);
const infoImageUrl = ref(null);
const notFoundImageUrl = ref(null);
+const repositoryUrl = ref(null);
+const feedbackUrl = ref(null);
const manifestJsonOverride = ref('{}');
async function init() {
@@ -135,6 +147,8 @@ async function init() {
serverErrorImageUrl.value = meta.serverErrorImageUrl;
infoImageUrl.value = meta.infoImageUrl;
notFoundImageUrl.value = meta.notFoundImageUrl;
+ repositoryUrl.value = meta.repositoryUrl;
+ feedbackUrl.value = meta.feedbackUrl;
manifestJsonOverride.value = meta.manifestJsonOverride === '' ? '{}' : JSON.stringify(JSON.parse(meta.manifestJsonOverride), null, '\t');
}
@@ -151,6 +165,8 @@ function save() {
infoImageUrl: infoImageUrl.value === '' ? null : infoImageUrl.value,
notFoundImageUrl: notFoundImageUrl.value === '' ? null : notFoundImageUrl.value,
serverErrorImageUrl: serverErrorImageUrl.value === '' ? null : serverErrorImageUrl.value,
+ repositoryUrl: repositoryUrl.value === '' ? null : repositoryUrl.value,
+ feedbackUrl: feedbackUrl.value === '' ? null : feedbackUrl.value,
manifestJsonOverride: manifestJsonOverride.value === '' ? '{}' : JSON.stringify(JSON5.parse(manifestJsonOverride.value)),
}).then(() => {
fetchInstance();
diff --git a/packages/frontend/src/pages/admin/settings.vue b/packages/frontend/src/pages/admin/settings.vue
index 8af9deae62..c505d70aa9 100644
--- a/packages/frontend/src/pages/admin/settings.vue
+++ b/packages/frontend/src/pages/admin/settings.vue
@@ -34,6 +34,16 @@ SPDX-License-Identifier: AGPL-3.0-only
+
+ {{ i18n.ts.repositoryUrl }}
+
+ {{ i18n.ts.repositoryUrlDescription }}
+
+
+
+ {{ i18n.ts.repositoryUrlOrTarballRequired }}
+
+
{{ i18n.ts.impressumUrl }}
@@ -159,7 +169,7 @@ import FormSplit from '@/components/form/split.vue';
import FormSuspense from '@/components/form/suspense.vue';
import * as os from '@/os.js';
import { misskeyApi } from '@/scripts/misskey-api.js';
-import { fetchInstance } from '@/instance.js';
+import { fetchInstance, instance } from '@/instance.js';
import { i18n } from '@/i18n.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import MkButton from '@/components/MkButton.vue';
@@ -169,6 +179,7 @@ const shortName = ref(null);
const description = ref(null);
const maintainerName = ref(null);
const maintainerEmail = ref(null);
+const repositoryUrl = ref(null);
const impressumUrl = ref(null);
const pinnedUsers = ref('');
const cacheRemoteFiles = ref(false);
@@ -191,6 +202,7 @@ async function init(): Promise {
description.value = meta.description;
maintainerName.value = meta.maintainerName;
maintainerEmail.value = meta.maintainerEmail;
+ repositoryUrl.value = meta.repositoryUrl;
impressumUrl.value = meta.impressumUrl;
pinnedUsers.value = meta.pinnedUsers.join('\n');
cacheRemoteFiles.value = meta.cacheRemoteFiles;
@@ -214,6 +226,7 @@ async function save(): void {
description: description.value,
maintainerName: maintainerName.value,
maintainerEmail: maintainerEmail.value,
+ repositoryUrl: repositoryUrl.value,
impressumUrl: impressumUrl.value,
pinnedUsers: pinnedUsers.value.split('\n'),
cacheRemoteFiles: cacheRemoteFiles.value,
diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts
index ad3a9a7c66..d0d8573b40 100644
--- a/packages/misskey-js/src/autogen/types.ts
+++ b/packages/misskey-js/src/autogen/types.ts
@@ -4845,7 +4845,7 @@ export type operations = {
shortName: string | null;
objectStorageS3ForcePathStyle: boolean;
privacyPolicyUrl: string | null;
- repositoryUrl: string;
+ repositoryUrl: string | null;
summalyProxy: string | null;
themeColor: string | null;
tosUrl: string | null;
@@ -8757,8 +8757,8 @@ export type operations = {
swPublicKey?: string | null;
swPrivateKey?: string | null;
tosUrl?: string | null;
- repositoryUrl?: string;
- feedbackUrl?: string;
+ repositoryUrl?: string | null;
+ feedbackUrl?: string | null;
impressumUrl?: string | null;
privacyPolicyUrl?: string | null;
useObjectStorage?: boolean;
@@ -19450,6 +19450,7 @@ export type operations = {
maintainerName: string | null;
maintainerEmail: string | null;
version: string;
+ providesTarball: boolean;
name: string;
shortName: string | null;
/**
@@ -19461,9 +19462,9 @@ export type operations = {
langs: string[];
tosUrl: string | null;
/** @default https://github.com/misskey-dev/misskey */
- repositoryUrl: string;
+ repositoryUrl: string | null;
/** @default https://github.com/misskey-dev/misskey/issues/new */
- feedbackUrl: string;
+ feedbackUrl: string | null;
defaultDarkTheme: string | null;
defaultLightTheme: string | null;
disableRegistration: boolean;
diff --git a/scripts/build-assets.mjs b/scripts/build-assets.mjs
index bafb1da5d9..e7684d7cc9 100644
--- a/scripts/build-assets.mjs
+++ b/scripts/build-assets.mjs
@@ -5,7 +5,9 @@
import * as fs from 'node:fs/promises';
import * as path from 'node:path';
+import { fileURLToPath } from 'node:url';
import cssnano from 'cssnano';
+import * as yaml from 'js-yaml';
import postcss from 'postcss';
import * as terser from 'terser';
@@ -14,8 +16,19 @@ import generateDTS from '../locales/generateDTS.js';
import meta from '../package.json' assert { type: "json" };
import buildTarball from './tarball.mjs';
+const configDir = fileURLToPath(new URL('../.config', import.meta.url));
+const configPath = process.env.MISSKEY_CONFIG_YML
+ ? path.resolve(configDir, process.env.MISSKEY_CONFIG_YML)
+ : process.env.NODE_ENV === 'test'
+ ? path.resolve(configDir, 'test.yml')
+ : path.resolve(configDir, 'default.yml');
+
let locales = buildLocales();
+async function loadConfig() {
+ return fs.readFile(configPath, 'utf-8').then(data => yaml.load(data)).catch(() => null);
+}
+
async function copyFrontendFonts() {
await fs.cp('./packages/frontend/node_modules/three/examples/fonts', './built/_frontend_dist_/fonts', { dereference: true, recursive: true });
}
@@ -78,7 +91,7 @@ async function build() {
copyBackendViews(),
buildBackendScript(),
buildBackendStyle(),
- buildTarball(),
+ loadConfig().then(config => config?.publishTarballInsteadOfProvideRepositoryUrl && buildTarball()),
]);
}
--
cgit v1.2.3-freya
From b3aa793f429df5a26b7ac537813b87e9a50b99c2 Mon Sep 17 00:00:00 2001
From: anatawa12
Date: Sat, 17 Feb 2024 14:28:34 +0900
Subject: chore:
通報ページのユーザをクリックした際にユーザをウィンドウで開くように (#13348)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* chore: 通報ページのユーザをクリックした際にユーザをウィンドウで開くように
* docs(changelog): 通報ページのユーザをクリックした際にユーザをウィンドウで開くように
---------
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
---
CHANGELOG.md | 1 +
packages/frontend/src/components/MkAbuseReport.vue | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
(limited to 'packages/frontend/src/components')
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b6c2822590..32c9bd0aec 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -61,6 +61,7 @@
- センシティブなリアクションを認めていないユーザーにセンシティブなカスタム絵文字をリアクションしようとした場合
- ロールが必要な絵文字をリアクションしようとした場合
- Enhance: ページ遷移時にPlayerを閉じるように
+- Enhance: 通報ページのユーザをクリックした際にユーザをウィンドウで開くように
- Enhance: ノートの通報時にリモートのノートであっても自インスタンスにおけるノートのリンクを含むように
- Enhance: オフライン表示のデザインを改善・多言語対応
- Fix: ネイティブモードの絵文字がモノクロにならないように
diff --git a/packages/frontend/src/components/MkAbuseReport.vue b/packages/frontend/src/components/MkAbuseReport.vue
index 733796ec21..271b94feaa 100644
--- a/packages/frontend/src/components/MkAbuseReport.vue
+++ b/packages/frontend/src/components/MkAbuseReport.vue
@@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-
+
@@ -23,7 +23,7 @@ SPDX-License-Identifier: AGPL-3.0-only
- {{ i18n.ts.reporter }}: @{{ report.reporter.username }}
+ {{ i18n.ts.reporter }}: @{{ report.reporter.username }}
{{ i18n.ts.moderator }}:
--
cgit v1.2.3-freya
From 2024030ebb4ecc683dce887a9a909db1ad9644bc Mon Sep 17 00:00:00 2001
From: KevinWh0 <45321184+KevinWh0@users.noreply.github.com>
Date: Sat, 17 Feb 2024 12:55:27 +0100
Subject: Added break so it doesnt prompt you per image
---
packages/frontend/src/components/MkPostForm.vue | 1 +
1 file changed, 1 insertion(+)
(limited to 'packages/frontend/src/components')
diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue
index dfb82e7fd3..ba27b2b469 100644
--- a/packages/frontend/src/components/MkPostForm.vue
+++ b/packages/frontend/src/components/MkPostForm.vue
@@ -765,6 +765,7 @@ async function post(ev?: MouseEvent) {
if (canceled) return;
if (result === 'cancel') return;
+ break;
}
}
}
--
cgit v1.2.3-freya
From eedd8fd69812f23a7370e984c3d8ee3a78d4a110 Mon Sep 17 00:00:00 2001
From: Moe Poi
Date: Sat, 17 Feb 2024 19:14:38 +0000
Subject: Add missing turnstile-response
---
packages/frontend/src/components/MkSignupDialog.form.vue | 1 +
1 file changed, 1 insertion(+)
(limited to 'packages/frontend/src/components')
diff --git a/packages/frontend/src/components/MkSignupDialog.form.vue b/packages/frontend/src/components/MkSignupDialog.form.vue
index 7de212f05b..2b0934d3a4 100644
--- a/packages/frontend/src/components/MkSignupDialog.form.vue
+++ b/packages/frontend/src/components/MkSignupDialog.form.vue
@@ -265,6 +265,7 @@ async function onSubmit(): Promise {
'hcaptcha-response': hCaptchaResponse.value,
'm-captcha-response': mCaptchaResponse.value,
'g-recaptcha-response': reCaptchaResponse.value,
+ 'turnstile-response': turnstileResponse.value,
});
if (instance.emailRequiredForSignup) {
os.alert({
--
cgit v1.2.3-freya
From 70f7f976fbb841c5d354bc83aee3b7fbaa8f1458 Mon Sep 17 00:00:00 2001
From: Marie
Date: Mon, 19 Feb 2024 10:51:25 +0100
Subject: fix: url in new component
---
locales/index.d.ts | 2 +-
packages/frontend/src/components/MkSourceCodeAvailablePopup.vue | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
(limited to 'packages/frontend/src/components')
diff --git a/locales/index.d.ts b/locales/index.d.ts
index bceef397e1..d9f5a1ea73 100644
--- a/locales/index.d.ts
+++ b/locales/index.d.ts
@@ -7055,7 +7055,7 @@ export interface Locale extends ILocale {
*/
"thisIsModifiedVersion": ParameterizedString<"name">;
/**
- * Misskeyを翻訳
+ * Sharkeyを翻訳
*/
"translation": string;
/**
diff --git a/packages/frontend/src/components/MkSourceCodeAvailablePopup.vue b/packages/frontend/src/components/MkSourceCodeAvailablePopup.vue
index 80f3a6709c..dcab80e758 100644
--- a/packages/frontend/src/components/MkSourceCodeAvailablePopup.vue
+++ b/packages/frontend/src/components/MkSourceCodeAvailablePopup.vue
@@ -27,7 +27,7 @@ SPDX-License-Identifier: AGPL-3.0-only
- {{ i18n.ts.aboutMisskey }}
+ {{ i18n.ts.aboutMisskey }}
--
cgit v1.2.3-freya
From d182402cfab631f301a3caff7a19b745f01434b3 Mon Sep 17 00:00:00 2001
From: Marie
Date: Mon, 19 Feb 2024 18:46:42 +0100
Subject: fix: icons and update urls
---
.gitmodules | 2 +-
package.json | 2 +-
packages/backend/src/server/web/views/base.pug | 2 +-
packages/backend/src/server/web/views/error.pug | 2 +-
packages/frontend/src/components/MkSignupDialog.rules.vue | 2 +-
packages/frontend/src/components/MkUpdated.vue | 2 +-
packages/frontend/src/pages/about-sharkey.vue | 10 +++++-----
packages/frontend/src/pages/about.vue | 4 ++--
packages/frontend/src/pages/admin/branding.vue | 4 ++--
packages/frontend/src/pages/admin/settings.vue | 2 +-
10 files changed, 16 insertions(+), 16 deletions(-)
(limited to 'packages/frontend/src/components')
diff --git a/.gitmodules b/.gitmodules
index 92d3a87532..a3ca76cc96 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -6,4 +6,4 @@
url = https://github.com/misskey-dev/emojis.git
[submodule "tossface-emojis"]
path = tossface-emojis
- url = https://git.joinsharkey.org/Sharkey/tossface-emojis.git
+ url = https://activitypub.software/TransFem-org/tossface-emojis.git
diff --git a/package.json b/package.json
index fb7f48d706..970eddd0e1 100644
--- a/package.json
+++ b/package.json
@@ -4,7 +4,7 @@
"codename": "shonk",
"repository": {
"type": "git",
- "url": "https://git.joinsharkey.org/Sharkey/Sharkey.git"
+ "url": "https://activitypub.software/TransFem-org/Sharkey.git"
},
"packageManager": "pnpm@8.15.1",
"workspaces": [
diff --git a/packages/backend/src/server/web/views/base.pug b/packages/backend/src/server/web/views/base.pug
index c15e123a15..5fda2ee9ee 100644
--- a/packages/backend/src/server/web/views/base.pug
+++ b/packages/backend/src/server/web/views/base.pug
@@ -18,7 +18,7 @@ doctype html
Thank you for using Sharkey!
If you are reading this message... how about joining the development?
- https://git.joinsharkey.org/Sharkey/Sharkey
+ https://activitypub.software/TransFem-org/Sharkey
html
diff --git a/packages/backend/src/server/web/views/error.pug b/packages/backend/src/server/web/views/error.pug
index 00a2a72d7a..39b75abc4c 100644
--- a/packages/backend/src/server/web/views/error.pug
+++ b/packages/backend/src/server/web/views/error.pug
@@ -13,7 +13,7 @@ doctype html
Thank you for using Sharkey!
If you are reading this message... how about joining the development?
- https://git.joinsharkey.org/Sharkey/Sharkey
+ https://activitypub.software/TransFem-org/Sharkey
html
diff --git a/packages/frontend/src/components/MkSignupDialog.rules.vue b/packages/frontend/src/components/MkSignupDialog.rules.vue
index 2f419a3a0e..18a9eeda23 100644
--- a/packages/frontend/src/components/MkSignupDialog.rules.vue
+++ b/packages/frontend/src/components/MkSignupDialog.rules.vue
@@ -45,7 +45,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.basicNotesBeforeCreateAccount }}
- {{ i18n.ts.basicNotesBeforeCreateAccount }}
+ {{ i18n.ts.basicNotesBeforeCreateAccount }}
{{ i18n.ts.agree }}
diff --git a/packages/frontend/src/components/MkUpdated.vue b/packages/frontend/src/components/MkUpdated.vue
index 9619bdf6dc..4fb0749931 100644
--- a/packages/frontend/src/components/MkUpdated.vue
+++ b/packages/frontend/src/components/MkUpdated.vue
@@ -27,7 +27,7 @@ const modal = shallowRef>();
const whatIsNew = () => {
modal.value?.close();
- window.open(`https://git.joinsharkey.org/Sharkey/Sharkey/releases/tag/${version}`, '_blank');
+ window.open(`https://activitypub.software/TransFem-org/Sharkey/-/releases/${version}`, '_blank');
};
onMounted(() => {
diff --git a/packages/frontend/src/pages/about-sharkey.vue b/packages/frontend/src/pages/about-sharkey.vue
index a58c5d9f99..d3efb23033 100644
--- a/packages/frontend/src/pages/about-sharkey.vue
+++ b/packages/frontend/src/pages/about-sharkey.vue
@@ -69,16 +69,16 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts._aboutMisskey.projectMembers }}
- {{ i18n.ts._aboutMisskey.allContributors }}
+ {{ i18n.ts._aboutMisskey.allContributors }}
Misskey Contributors
diff --git a/packages/frontend/src/pages/about.vue b/packages/frontend/src/pages/about.vue
index 8ad48e635d..f2aceada7d 100644
--- a/packages/frontend/src/pages/about.vue
+++ b/packages/frontend/src/pages/about.vue
@@ -58,13 +58,13 @@ SPDX-License-Identifier: AGPL-3.0-only
-
+
{{ i18n.ts.impressum }}
-
+
{{ i18n.ts.serverRules }}
diff --git a/packages/frontend/src/pages/admin/branding.vue b/packages/frontend/src/pages/admin/branding.vue
index beb11d2c9d..3b8fd3cd20 100644
--- a/packages/frontend/src/pages/admin/branding.vue
+++ b/packages/frontend/src/pages/admin/branding.vue
@@ -84,12 +84,12 @@ SPDX-License-Identifier: AGPL-3.0-only
-
+
{{ i18n.ts.repositoryUrl }}
-
+
{{ i18n.ts.feedbackUrl }}
diff --git a/packages/frontend/src/pages/admin/settings.vue b/packages/frontend/src/pages/admin/settings.vue
index 88a1e33179..bd53554319 100644
--- a/packages/frontend/src/pages/admin/settings.vue
+++ b/packages/frontend/src/pages/admin/settings.vue
@@ -36,7 +36,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.repositoryUrl }}
-
+
{{ i18n.ts.repositoryUrlDescription }}
--
cgit v1.2.3-freya
From 3c4f3cb81d1b3181b137cbafd4a90db9fa43b626 Mon Sep 17 00:00:00 2001
From: KevinWh0 <45321184+KevinWh0@users.noreply.github.com>
Date: Mon, 19 Feb 2024 20:53:13 +0100
Subject: updated to use .some
---
packages/frontend/src/components/MkPostForm.vue | 38 ++++++++++++-------------
1 file changed, 18 insertions(+), 20 deletions(-)
(limited to 'packages/frontend/src/components')
diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue
index ba27b2b469..12f469b35c 100644
--- a/packages/frontend/src/components/MkPostForm.vue
+++ b/packages/frontend/src/components/MkPostForm.vue
@@ -747,26 +747,24 @@ async function post(ev?: MouseEvent) {
if (defaultStore.state.warnMissingAltText) {
const filesData = toRaw(files.value);
- for (let i = 0; i < filesData.length; i++) {
- const file = filesData[i];
- const isMissingAltText = !file.comment;
- if (isMissingAltText) {
- const { canceled, result } = await os.actions({
- type: 'warning',
- text: i18n.ts.thisPostIsMissingAltText,
- actions: [{
- value: 'cancel',
- text: i18n.ts.thisPostIsMissingAltTextCancel,
- }, {
- value: 'ignore',
- text: i18n.ts.thisPostIsMissingAltTextIgnore,
- }],
- });
-
- if (canceled) return;
- if (result === 'cancel') return;
- break;
- }
+
+ const isMissingAltText = filesData.some(file => !file.comment);
+
+ if (isMissingAltText) {
+ const { canceled, result } = await os.actions({
+ type: 'warning',
+ text: i18n.ts.thisPostIsMissingAltText,
+ actions: [{
+ value: 'cancel',
+ text: i18n.ts.thisPostIsMissingAltTextCancel,
+ }, {
+ value: 'ignore',
+ text: i18n.ts.thisPostIsMissingAltTextIgnore,
+ }],
+ });
+
+ if (canceled) return;
+ if (result === 'cancel') return;
}
}
--
cgit v1.2.3-freya
From ddd7b26f1c17e9ce1e0ea9961381d30979e6dc22 Mon Sep 17 00:00:00 2001
From: Sayamame-beans <61457993+Sayamame-beans@users.noreply.github.com>
Date: Tue, 20 Feb 2024 11:59:49 +0900
Subject: enhance(frontend):
ノート作成画面の添付メニューのdividerの位置を"添付取り消し"の上にする
(#13409)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* enhance(frontend): change divider position for MkPostFormAttaches
* docs(changelog): update
---
CHANGELOG.md | 1 +
packages/frontend/src/components/MkPostFormAttaches.vue | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
(limited to 'packages/frontend/src/components')
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a91c3e43d4..fb4d1e7ad4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,6 +16,7 @@
### General
### Client
+- Enhance: ノート作成画面のファイル添付メニューの区切り線の位置を調整
- Fix: syuilo/misskeyの時代からあるインスタンスが改変されたバージョンであると誤認識される問題
- Fix: MFMのオートコンプリートが出るべき状況で出ないことがある問題を修正
diff --git a/packages/frontend/src/components/MkPostFormAttaches.vue b/packages/frontend/src/components/MkPostFormAttaches.vue
index 3f775bc6e2..95eb367318 100644
--- a/packages/frontend/src/components/MkPostFormAttaches.vue
+++ b/packages/frontend/src/components/MkPostFormAttaches.vue
@@ -152,11 +152,11 @@ function showFileMenu(file: Misskey.entities.DriveFile, ev: MouseEvent): void {
icon: 'ti ti-crop',
action: () : void => { crop(file); },
}] : [], {
+ type: 'divider',
+ }, {
text: i18n.ts.attachCancel,
icon: 'ti ti-circle-x',
action: () => { detachMedia(file.id); },
- }, {
- type: 'divider',
}, {
text: i18n.ts.deleteFile,
icon: 'ti ti-trash',
--
cgit v1.2.3-freya
From 39c4e3a4f550b1383d574b9823b99a228b47a475 Mon Sep 17 00:00:00 2001
From: zyoshoka <107108195+zyoshoka@users.noreply.github.com>
Date: Tue, 20 Feb 2024 14:00:57 +0900
Subject: fix(frontend): チャートのラベルが消えている問題を修正 (#13416)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* fix(frontend): チャートのラベルが消えている問題を修正
* Update CHANGELOG.md
---
CHANGELOG.md | 1 +
packages/frontend/src/components/MkChart.vue | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
(limited to 'packages/frontend/src/components')
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fb4d1e7ad4..77a03ff684 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -19,6 +19,7 @@
- Enhance: ノート作成画面のファイル添付メニューの区切り線の位置を調整
- Fix: syuilo/misskeyの時代からあるインスタンスが改変されたバージョンであると誤認識される問題
- Fix: MFMのオートコンプリートが出るべき状況で出ないことがある問題を修正
+- Fix: チャートのラベルが消えている問題を修正
### Server
- Fix: nodeinfoにenableMcaptchaとenableTurnstileが無いのを修正
diff --git a/packages/frontend/src/components/MkChart.vue b/packages/frontend/src/components/MkChart.vue
index dd745c2140..04b6d2f29c 100644
--- a/packages/frontend/src/components/MkChart.vue
+++ b/packages/frontend/src/components/MkChart.vue
@@ -240,7 +240,7 @@ const render = () => {
},
external: externalTooltipHandler,
callbacks: {
- label: (item) => chartData?.bytes ? bytes(item.parsed.y * 1000, 1) : item.parsed.y.toString(),
+ label: (item) => `${item.dataset.label}: ${chartData?.bytes ? bytes(item.parsed.y * 1000, 1) : item.parsed.y.toString()}`,
},
},
zoom: props.detailed ? {
--
cgit v1.2.3-freya
From 4a13508da0a5d930b4d73bb4208df39a578e7796 Mon Sep 17 00:00:00 2001
From: Marie
Date: Tue, 20 Feb 2024 15:10:41 +0000
Subject: Note Edited notification type
---
locales/en-US.yml | 1 +
locales/index.d.ts | 4 ++
locales/ja-JP.yml | 1 +
packages/backend/src/core/GlobalEventService.ts | 1 +
packages/backend/src/core/NoteEditService.ts | 61 ++++------------------
.../src/core/entities/NotificationEntityService.ts | 4 +-
packages/backend/src/models/Notification.ts | 6 +++
packages/backend/src/models/Webhook.ts | 2 +-
.../backend/src/models/json-schema/notification.ts | 25 +++++++++
.../api/endpoints/i/notifications-grouped.ts | 2 +-
.../src/server/api/endpoints/i/notifications.ts | 2 +-
.../frontend/src/components/MkNotification.vue | 13 ++++-
packages/misskey-js/src/autogen/types.ts | 21 ++++++--
packages/misskey-js/src/consts.ts | 2 +-
packages/misskey-js/src/streaming.types.ts | 1 +
packages/sw/src/scripts/create-notification.ts | 8 +++
packages/sw/src/sw.ts | 3 ++
17 files changed, 94 insertions(+), 63 deletions(-)
(limited to 'packages/frontend/src/components')
diff --git a/locales/en-US.yml b/locales/en-US.yml
index 5d0d4982fe..67791c98ae 100644
--- a/locales/en-US.yml
+++ b/locales/en-US.yml
@@ -2334,6 +2334,7 @@ _notification:
reactedBySomeUsers: "{n} users reacted"
renotedBySomeUsers: "Boosted by {n} users"
followedBySomeUsers: "Followed by {n} users"
+ edited: "Note got edited"
_types:
all: "All"
note: "New notes"
diff --git a/locales/index.d.ts b/locales/index.d.ts
index 11beff971d..30ead15e13 100644
--- a/locales/index.d.ts
+++ b/locales/index.d.ts
@@ -9048,6 +9048,10 @@ export interface Locale extends ILocale {
* アンケートの結果が出ました
*/
"pollEnded": string;
+ /**
+ * 注記が編集されました
+ */
+ "edited": string;
/**
* 新しい投稿
*/
diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml
index 4c433e7254..db3ea6c653 100644
--- a/locales/ja-JP.yml
+++ b/locales/ja-JP.yml
@@ -2389,6 +2389,7 @@ _notification:
youReceivedFollowRequest: "フォローリクエストが来ました"
yourFollowRequestAccepted: "フォローリクエストが承認されました"
pollEnded: "アンケートの結果が出ました"
+ edited: "投稿が編集されました"
newNote: "新しい投稿"
unreadAntennaNote: "アンテナ {name}"
roleAssigned: "ロールが付与されました"
diff --git a/packages/backend/src/core/GlobalEventService.ts b/packages/backend/src/core/GlobalEventService.ts
index ab87bf9dee..e568cbf646 100644
--- a/packages/backend/src/core/GlobalEventService.ts
+++ b/packages/backend/src/core/GlobalEventService.ts
@@ -96,6 +96,7 @@ export interface MainEventTypes {
announcementCreated: {
announcement: Packed<'Announcement'>;
};
+ edited: Packed<'Note'>;
}
export interface DriveEventTypes {
diff --git a/packages/backend/src/core/NoteEditService.ts b/packages/backend/src/core/NoteEditService.ts
index b137295b0b..6a469c9634 100644
--- a/packages/backend/src/core/NoteEditService.ts
+++ b/packages/backend/src/core/NoteEditService.ts
@@ -52,7 +52,7 @@ import { isReply } from '@/misc/is-reply.js';
import { trackPromise } from '@/misc/promise-tracker.js';
import { isUserRelated } from '@/misc/is-user-related.js';
-type NotificationType = 'reply' | 'renote' | 'quote' | 'mention';
+type NotificationType = 'reply' | 'renote' | 'quote' | 'mention' | 'edited';
class NotificationManager {
private notifier: { id: MiUser['id']; };
@@ -586,7 +586,7 @@ export class NoteEditService implements OnApplicationShutdown {
}
// Pack the note
- const noteObj = await this.noteEntityService.pack(note, null, { skipHide: true });
+ const noteObj = await this.noteEntityService.pack(note, null, { skipHide: true, withReactionAndUserPairCache: true });
if (data.poll != null) {
this.globalEventService.publishNoteStream(note.id, 'updated', {
cw: note.cw,
@@ -612,7 +612,7 @@ export class NoteEditService implements OnApplicationShutdown {
const nm = new NotificationManager(this.mutingsRepository, this.notificationService, user, note);
- await this.createMentionedEvents(mentionedUsers, note, nm);
+ //await this.createMentionedEvents(mentionedUsers, note, nm);
// If has in reply to note
if (data.reply) {
@@ -634,12 +634,12 @@ export class NoteEditService implements OnApplicationShutdown {
const muted = isUserRelated(note, userIdsWhoMeMuting);
if (!isThreadMuted && !muted) {
- nm.push(data.reply.userId, 'reply');
- this.globalEventService.publishMainStream(data.reply.userId, 'reply', noteObj);
+ nm.push(data.reply.userId, 'edited');
+ this.globalEventService.publishMainStream(data.reply.userId, 'edited', noteObj);
- const webhooks = (await this.webhookService.getActiveWebhooks()).filter(x => x.userId === data.reply!.userId && x.on.includes('reply'));
+ const webhooks = (await this.webhookService.getActiveWebhooks()).filter(x => x.userId === data.reply!.userId && x.on.includes('edited'));
for (const webhook of webhooks) {
- this.queueService.webhookDeliver(webhook, 'reply', {
+ this.queueService.webhookDeliver(webhook, 'edited', {
note: noteObj,
});
}
@@ -647,45 +647,6 @@ export class NoteEditService implements OnApplicationShutdown {
}
}
- // If it is renote
- if (data.renote) {
- const type = this.isQuote(data) ? 'quote' : 'renote';
-
- // Notify
- if (data.renote.userHost === null) {
- const isThreadMuted = await this.noteThreadMutingsRepository.exists({
- where: {
- userId: data.renote.userId,
- threadId: data.renote.threadId ?? data.renote.id,
- },
- });
-
- const [
- userIdsWhoMeMuting,
- ] = data.renote.userId ? await Promise.all([
- this.cacheService.userMutingsCache.fetch(data.renote.userId),
- ]) : [new Set()];
-
- const muted = isUserRelated(note, userIdsWhoMeMuting);
-
- if (!isThreadMuted && !muted) {
- nm.push(data.renote.userId, type);
- }
- }
-
- // Publish event
- if ((user.id !== data.renote.userId) && data.renote.userHost === null) {
- this.globalEventService.publishMainStream(data.renote.userId, 'renote', noteObj);
-
- const webhooks = (await this.webhookService.getActiveWebhooks()).filter(x => x.userId === data.renote!.userId && x.on.includes('renote'));
- for (const webhook of webhooks) {
- this.queueService.webhookDeliver(webhook, 'renote', {
- note: noteObj,
- });
- }
- }
- }
-
nm.notify();
//#region AP deliver
@@ -780,17 +741,17 @@ export class NoteEditService implements OnApplicationShutdown {
detail: true,
});
- this.globalEventService.publishMainStream(u.id, 'mention', detailPackedNote);
+ this.globalEventService.publishMainStream(u.id, 'edited', detailPackedNote);
- const webhooks = (await this.webhookService.getActiveWebhooks()).filter(x => x.userId === u.id && x.on.includes('mention'));
+ const webhooks = (await this.webhookService.getActiveWebhooks()).filter(x => x.userId === u.id && x.on.includes('edited'));
for (const webhook of webhooks) {
- this.queueService.webhookDeliver(webhook, 'mention', {
+ this.queueService.webhookDeliver(webhook, 'edited', {
note: detailPackedNote,
});
}
// Create notification
- nm.push(u.id, 'mention');
+ nm.push(u.id, 'edited');
}
}
diff --git a/packages/backend/src/core/entities/NotificationEntityService.ts b/packages/backend/src/core/entities/NotificationEntityService.ts
index a572fe320c..7664c90491 100644
--- a/packages/backend/src/core/entities/NotificationEntityService.ts
+++ b/packages/backend/src/core/entities/NotificationEntityService.ts
@@ -20,8 +20,8 @@ import type { OnModuleInit } from '@nestjs/common';
import type { UserEntityService } from './UserEntityService.js';
import type { NoteEntityService } from './NoteEntityService.js';
-const NOTE_REQUIRED_NOTIFICATION_TYPES = new Set(['note', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollEnded'] as (typeof notificationTypes[number])[]);
-const NOTE_REQUIRED_GROUPED_NOTIFICATION_TYPES = new Set(['note', 'mention', 'reply', 'renote', 'renote:grouped', 'quote', 'reaction', 'reaction:grouped', 'pollEnded']);
+const NOTE_REQUIRED_NOTIFICATION_TYPES = new Set(['note', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollEnded', 'edited'] as (typeof notificationTypes[number])[]);
+const NOTE_REQUIRED_GROUPED_NOTIFICATION_TYPES = new Set(['note', 'mention', 'reply', 'renote', 'renote:grouped', 'quote', 'reaction', 'reaction:grouped', 'pollEnded', 'edited']);
@Injectable()
export class NotificationEntityService implements OnModuleInit {
diff --git a/packages/backend/src/models/Notification.ts b/packages/backend/src/models/Notification.ts
index df88b99636..4ed71a106c 100644
--- a/packages/backend/src/models/Notification.ts
+++ b/packages/backend/src/models/Notification.ts
@@ -107,6 +107,12 @@ export type MiNotification = {
type: 'test';
id: string;
createdAt: string;
+} | {
+ type: 'edited';
+ id: string;
+ createdAt: string;
+ notifierId: MiUser['id'];
+ noteId: MiNote['id'];
};
export type MiGroupedNotification = MiNotification | {
diff --git a/packages/backend/src/models/Webhook.ts b/packages/backend/src/models/Webhook.ts
index db24c03b3d..2a727f86fd 100644
--- a/packages/backend/src/models/Webhook.ts
+++ b/packages/backend/src/models/Webhook.ts
@@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typ
import { id } from './util/id.js';
import { MiUser } from './User.js';
-export const webhookEventTypes = ['mention', 'unfollow', 'follow', 'followed', 'note', 'reply', 'renote', 'reaction'] as const;
+export const webhookEventTypes = ['mention', 'unfollow', 'follow', 'followed', 'note', 'reply', 'renote', 'reaction', 'edited'] as const;
@Entity('webhook')
export class MiWebhook {
diff --git a/packages/backend/src/models/json-schema/notification.ts b/packages/backend/src/models/json-schema/notification.ts
index b4c4442758..3f31cc47ee 100644
--- a/packages/backend/src/models/json-schema/notification.ts
+++ b/packages/backend/src/models/json-schema/notification.ts
@@ -318,6 +318,31 @@ export const packedNotificationSchema = {
optional: false, nullable: false,
},
},
+ }, {
+ type: 'object',
+ properties: {
+ ...baseSchema.properties,
+ type: {
+ type: 'string',
+ optional: false, nullable: false,
+ enum: ['edited'],
+ },
+ user: {
+ type: 'object',
+ ref: 'UserLite',
+ optional: false, nullable: false,
+ },
+ userId: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ note: {
+ type: 'object',
+ ref: 'Note',
+ optional: false, nullable: false,
+ },
+ },
}, {
type: 'object',
properties: {
diff --git a/packages/backend/src/server/api/endpoints/i/notifications-grouped.ts b/packages/backend/src/server/api/endpoints/i/notifications-grouped.ts
index 703808d279..d400cbc1c9 100644
--- a/packages/backend/src/server/api/endpoints/i/notifications-grouped.ts
+++ b/packages/backend/src/server/api/endpoints/i/notifications-grouped.ts
@@ -164,7 +164,7 @@ export default class extends Endpoint { // eslint-
groupedNotifications = groupedNotifications.slice(0, ps.limit);
const noteIds = groupedNotifications
- .filter((notification): notification is FilterUnionByProperty => ['mention', 'reply', 'quote'].includes(notification.type))
+ .filter((notification): notification is FilterUnionByProperty => ['mention', 'reply', 'quote', 'edited'].includes(notification.type))
.map(notification => notification.noteId!);
if (noteIds.length > 0) {
diff --git a/packages/backend/src/server/api/endpoints/i/notifications.ts b/packages/backend/src/server/api/endpoints/i/notifications.ts
index 52b6749e3f..d9404ea9c5 100644
--- a/packages/backend/src/server/api/endpoints/i/notifications.ts
+++ b/packages/backend/src/server/api/endpoints/i/notifications.ts
@@ -113,7 +113,7 @@ export default class extends Endpoint { // eslint-
}
const noteIds = notifications
- .filter((notification): notification is FilterUnionByProperty => ['mention', 'reply', 'quote'].includes(notification.type))
+ .filter((notification): notification is FilterUnionByProperty => ['mention', 'reply', 'quote', 'edited'].includes(notification.type))
.map(notification => notification.noteId);
if (noteIds.length > 0) {
diff --git a/packages/frontend/src/components/MkNotification.vue b/packages/frontend/src/components/MkNotification.vue
index e39b996fd9..562cc38bf3 100644
--- a/packages/frontend/src/components/MkNotification.vue
+++ b/packages/frontend/src/components/MkNotification.vue
@@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-
+
@@ -25,8 +25,9 @@ SPDX-License-Identifier: AGPL-3.0-only
[$style.t_pollEnded]: notification.type === 'pollEnded',
[$style.t_achievementEarned]: notification.type === 'achievementEarned',
[$style.t_roleAssigned]: notification.type === 'roleAssigned' && notification.role.iconUrl == null,
+ [$style.t_pollEnded]: notification.type === 'edited',
}]"
- >
+ >
@@ -40,6 +41,7 @@ SPDX-License-Identifier: AGPL-3.0-only
+
{{ i18n.tsx._notification.reactedBySomeUsers({ n: notification.reactions.length }) }}
{{ i18n.tsx._notification.renotedBySomeUsers({ n: notification.users.length }) }}
{{ notification.header }}
+ {{ i18n.ts._notification.edited }}
@@ -131,6 +134,12 @@ SPDX-License-Identifier: AGPL-3.0-only
+
+
+
+
+
+
diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts
index e53ad4b589..6c0c6d249f 100644
--- a/packages/misskey-js/src/autogen/types.ts
+++ b/packages/misskey-js/src/autogen/types.ts
@@ -4273,6 +4273,17 @@ export type components = {
body: string;
header: string;
icon: string;
+ } | {
+ /** Format: id */
+ id: string;
+ /** Format: date-time */
+ createdAt: string;
+ /** @enum {string} */
+ type: 'edited';
+ user: components['schemas']['UserLite'];
+ /** Format: id */
+ userId: string;
+ note: components['schemas']['Note'];
} | {
/** Format: id */
id: string;
@@ -19511,7 +19522,7 @@ export type operations = {
url: string;
/** @default */
secret?: string;
- on: ('mention' | 'unfollow' | 'follow' | 'followed' | 'note' | 'reply' | 'renote' | 'reaction')[];
+ on: ('mention' | 'unfollow' | 'follow' | 'followed' | 'note' | 'reply' | 'renote' | 'reaction' | 'edited')[];
};
};
};
@@ -19525,7 +19536,7 @@ export type operations = {
/** Format: misskey:id */
userId: string;
name: string;
- on: ('mention' | 'unfollow' | 'follow' | 'followed' | 'note' | 'reply' | 'renote' | 'reaction')[];
+ on: ('mention' | 'unfollow' | 'follow' | 'followed' | 'note' | 'reply' | 'renote' | 'reaction' | 'edited')[];
url: string;
secret: string;
active: boolean;
@@ -19584,7 +19595,7 @@ export type operations = {
/** Format: misskey:id */
userId: string;
name: string;
- on: ('mention' | 'unfollow' | 'follow' | 'followed' | 'note' | 'reply' | 'renote' | 'reaction')[];
+ on: ('mention' | 'unfollow' | 'follow' | 'followed' | 'note' | 'reply' | 'renote' | 'reaction' | 'edited')[];
url: string;
secret: string;
active: boolean;
@@ -19651,7 +19662,7 @@ export type operations = {
/** Format: misskey:id */
userId: string;
name: string;
- on: ('mention' | 'unfollow' | 'follow' | 'followed' | 'note' | 'reply' | 'renote' | 'reaction')[];
+ on: ('mention' | 'unfollow' | 'follow' | 'followed' | 'note' | 'reply' | 'renote' | 'reaction' | 'edited')[];
url: string;
secret: string;
active: boolean;
@@ -19709,7 +19720,7 @@ export type operations = {
url: string;
/** @default */
secret?: string;
- on: ('mention' | 'unfollow' | 'follow' | 'followed' | 'note' | 'reply' | 'renote' | 'reaction')[];
+ on: ('mention' | 'unfollow' | 'follow' | 'followed' | 'note' | 'reply' | 'renote' | 'reaction' | 'edited')[];
active: boolean;
};
};
diff --git a/packages/misskey-js/src/consts.ts b/packages/misskey-js/src/consts.ts
index 0748d9863e..57d35e0ec2 100644
--- a/packages/misskey-js/src/consts.ts
+++ b/packages/misskey-js/src/consts.ts
@@ -1,4 +1,4 @@
-export const notificationTypes = ['note', 'follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'pollEnded', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app', 'roleAssigned', 'achievementEarned'] as const;
+export const notificationTypes = ['note', 'follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'pollEnded', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app', 'roleAssigned', 'achievementEarned', 'edited'] as const;
export const noteVisibilities = ['public', 'home', 'followers', 'specified'] as const;
diff --git a/packages/misskey-js/src/streaming.types.ts b/packages/misskey-js/src/streaming.types.ts
index 9a2b814d20..1e9750d670 100644
--- a/packages/misskey-js/src/streaming.types.ts
+++ b/packages/misskey-js/src/streaming.types.ts
@@ -56,6 +56,7 @@ export type Channels = {
readAntenna: (payload: Antenna) => void;
receiveFollowRequest: (payload: User) => void;
announcementCreated: (payload: AnnouncementCreated) => void;
+ edited: (payload: Note) => void;
};
receives: null;
};
diff --git a/packages/sw/src/scripts/create-notification.ts b/packages/sw/src/scripts/create-notification.ts
index 3e2fb16ec0..32b12f4b4f 100644
--- a/packages/sw/src/scripts/create-notification.ts
+++ b/packages/sw/src/scripts/create-notification.ts
@@ -232,6 +232,14 @@ async function composeNotification(data: PushNotificationDataMap[keyof PushNotif
data,
}];
+ case 'edited':
+ return [t('_notification.edited', { name: getUserName(data.body.user) }), {
+ body: data.body.note.text ?? '',
+ icon: data.body.user.avatarUrl,
+ badge: iconUrl('messages'),
+ data,
+ }];
+
default:
return null;
}
diff --git a/packages/sw/src/sw.ts b/packages/sw/src/sw.ts
index 46fe9fc90f..c38419eadc 100644
--- a/packages/sw/src/sw.ts
+++ b/packages/sw/src/sw.ts
@@ -133,6 +133,9 @@ globalThis.addEventListener('notificationclick', (ev: ServiceWorkerGlobalScopeEv
case 'showFollowRequests':
client = await swos.openClient('push', '/my/follow-requests', loginId);
break;
+ case 'edited':
+ if ('note' in data.body) client = await swos.openPost({ reply: data.body.note }, loginId);
+ break;
default:
switch (data.body.type) {
case 'receiveFollowRequest':
--
cgit v1.2.3-freya
From c9940b7359e72a3cd806b174e4a2a651f56d0e7a Mon Sep 17 00:00:00 2001
From: dakkar
Date: Tue, 20 Feb 2024 20:01:31 +0000
Subject: Switch source code bits
---
locales/en-US.yml | 13 +++++-
locales/index.d.ts | 16 +++++--
locales/ja-JP.yml | 8 ++--
.../backend/src/server/api/openapi/gen-spec.ts | 4 +-
packages/frontend/src/boot/main-boot.ts | 2 +-
.../src/components/MkSourceCodeAvailablePopup.vue | 1 +
packages/frontend/src/pages/about-sharkey.vue | 50 +++++++++++++---------
7 files changed, 62 insertions(+), 32 deletions(-)
(limited to 'packages/frontend/src/components')
diff --git a/locales/en-US.yml b/locales/en-US.yml
index 67791c98ae..64033d6a2b 100644
--- a/locales/en-US.yml
+++ b/locales/en-US.yml
@@ -1026,6 +1026,7 @@ remindMeLater: "Maybe later"
didYouLikeMisskey: "Have you taken a liking to Sharkey?"
pleaseDonate: "{host} uses the free software, Sharkey. We would highly appreciate your donations so development of Sharkey can continue!"
pleaseDonateInstance: "You can also support {host} directly by donating to your instance administration."
+correspondingSourceIsAvailable: "The corresponding source code is available from {anchor}."
roles: "Roles"
role: "Role"
noRole: "Role not found"
@@ -1214,6 +1215,12 @@ confirmShowRepliesAll: "This operation is irreversible. Would you really like to
confirmHideRepliesAll: "This operation is irreversible. Would you really like to hide replies to others from everyone you follow in your timeline?"
externalServices: "External Services"
sourceCode: "Source code"
+sourceCodeIsNotYetProvided: "The source code is not yet available. Please contact your administrator to fix this issue."
+repositoryUrl: "Repository URL"
+repositoryUrlDescription: "If there is a repository where the source code is publicly available, enter its URL. If you are using Sharkey as-is (without any changes to the source code), enter https://activitypub.software/TransFem-org/Sharkey/."
+repositoryUrlOrTarballRequired: "If you don't have a public repository, you'll need to provide a tarball instead. See .config/example.yml for details."
+feedback: "Feedback"
+feedbackUrl: "Feedback URL"
impressum: "Impressum"
impressumUrl: "Impressum URL"
impressumDescription: "In some countries, like germany, the inclusion of operator contact information (an Impressum) is legally required for commercial websites."
@@ -1808,8 +1815,12 @@ _aboutMisskey:
contributors: "Main contributors"
allContributors: "All contributors"
source: "Source code"
+ original: "Misskey original"
+ original_sharkey: "Sharkey original"
+ thisIsModifiedVersion: "{name} uses a modified version of the original Sharkey"
translation: "Translate Sharkey"
- donate: "Donate to Sharkey"
+ donate: "Donate to Misskey"
+ donate_sharkey: "Donate to Sharkey"
morePatrons: "We also appreciate the support of many other helpers not listed here. Thank you! 🥰"
patrons: "Patrons"
projectMembers: "Project members"
diff --git a/locales/index.d.ts b/locales/index.d.ts
index 30ead15e13..f816feb108 100644
--- a/locales/index.d.ts
+++ b/locales/index.d.ts
@@ -7059,11 +7059,15 @@ export interface Locale extends ILocale {
*/
"source": string;
/**
- * オリジナル
+ * Misskey オリジナル
*/
"original": string;
/**
- * {name}はオリジナルのMisskeyを改変したバージョンを使用しています。
+ * Sharkey オリジナル
+ */
+ "original_sharkey": string;
+ /**
+ * {name}はオリジナルのSharkeyを改変したバージョンを使用しています。
*/
"thisIsModifiedVersion": ParameterizedString<"name">;
/**
@@ -7071,9 +7075,13 @@ export interface Locale extends ILocale {
*/
"translation": string;
/**
- * Sharkeyに寄付
+ * Misskeyに寄付
*/
"donate": string;
+ /**
+ * Sharkeyに寄付
+ */
+ "donate_sharkey": string;
/**
* 他にも多くの方が支援してくれています。ありがとうございます🥰
*/
@@ -9049,7 +9057,7 @@ export interface Locale extends ILocale {
*/
"pollEnded": string;
/**
- * 注記が編集されました
+ * 投稿が編集されました
*/
"edited": string;
/**
diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml
index db3ea6c653..439210f45e 100644
--- a/locales/ja-JP.yml
+++ b/locales/ja-JP.yml
@@ -1839,10 +1839,12 @@ _aboutMisskey:
contributors: "主なコントリビューター"
allContributors: "全てのコントリビューター"
source: "ソースコード"
- original: "オリジナル"
- thisIsModifiedVersion: "{name}はオリジナルのMisskeyを改変したバージョンを使用しています。"
+ original: "Misskey オリジナル"
+ original_sharkey: "Sharkey オリジナル"
+ thisIsModifiedVersion: "{name}はオリジナルのSharkeyを改変したバージョンを使用しています。"
translation: "Sharkeyを翻訳"
- donate: "Sharkeyに寄付"
+ donate: "Misskeyに寄付"
+ donate_sharkey: "Sharkeyに寄付"
morePatrons: "他にも多くの方が支援してくれています。ありがとうございます🥰"
patrons: "支援者"
projectMembers: "プロジェクトメンバー"
diff --git a/packages/backend/src/server/api/openapi/gen-spec.ts b/packages/backend/src/server/api/openapi/gen-spec.ts
index 7679a9b464..b5f91ff542 100644
--- a/packages/backend/src/server/api/openapi/gen-spec.ts
+++ b/packages/backend/src/server/api/openapi/gen-spec.ts
@@ -20,7 +20,7 @@ export function genOpenapiSpec(config: Config, includeSelfRef = false) {
externalDocs: {
description: 'Repository',
- url: 'https://github.com/misskey-dev/misskey',
+ url: 'https://activitypub.software/TransFem-org/Sharkey',
},
servers: [{
@@ -98,7 +98,7 @@ export function genOpenapiSpec(config: Config, includeSelfRef = false) {
description: desc,
externalDocs: {
description: 'Source code',
- url: `https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/${endpoint.name}.ts`,
+ url: `https://activitypub.software/TransFem-org/Sharkey/-/tree/develop/packages/backend/src/server/api/endpoints/${endpoint.name}.ts`,
},
...(endpoint.meta.tags ? {
tags: [endpoint.meta.tags[0]],
diff --git a/packages/frontend/src/boot/main-boot.ts b/packages/frontend/src/boot/main-boot.ts
index 324bc40146..66d9bf0680 100644
--- a/packages/frontend/src/boot/main-boot.ts
+++ b/packages/frontend/src/boot/main-boot.ts
@@ -235,7 +235,7 @@ export async function mainBoot() {
fetchInstance().then(() => {
const modifiedVersionMustProminentlyOfferInAgplV3Section13Read = miLocalStorage.getItem('modifiedVersionMustProminentlyOfferInAgplV3Section13Read');
- if (modifiedVersionMustProminentlyOfferInAgplV3Section13Read !== 'true' && instance.repositoryUrl !== 'https://github.com/misskey-dev/misskey') {
+ if (modifiedVersionMustProminentlyOfferInAgplV3Section13Read !== 'true' && instance.repositoryUrl !== 'https://activitypub.software/TransFem-org/Sharkey/') {
popup(defineAsyncComponent(() => import('@/components/MkSourceCodeAvailablePopup.vue')), {}, {}, 'closed');
}
});
diff --git a/packages/frontend/src/components/MkSourceCodeAvailablePopup.vue b/packages/frontend/src/components/MkSourceCodeAvailablePopup.vue
index dcab80e758..cd884f0b19 100644
--- a/packages/frontend/src/components/MkSourceCodeAvailablePopup.vue
+++ b/packages/frontend/src/components/MkSourceCodeAvailablePopup.vue
@@ -71,6 +71,7 @@ function close() {
width: calc(100% - (var(--margin) * 2));
max-width: 500px;
display: flex;
+ backdrop-filter: var(--blur, blur(15px));
}
.icon {
diff --git a/packages/frontend/src/pages/about-sharkey.vue b/packages/frontend/src/pages/about-sharkey.vue
index d3efb23033..954db9025a 100644
--- a/packages/frontend/src/pages/about-sharkey.vue
+++ b/packages/frontend/src/pages/about-sharkey.vue
@@ -27,21 +27,7 @@ SPDX-License-Identifier: AGPL-3.0-only
I #Sharkey
-
-
-
-
- {{ i18n.ts._aboutMisskey.source }} ({{ i18n.ts._aboutMisskey.original }})
- GitHub
-
-
-
- {{ i18n.ts._aboutMisskey.donate }}
- Patreon
-
-
-
-
+
{{ i18n.tsx._aboutMisskey.thisIsModifiedVersion({ name: instance.name }) }}
@@ -49,12 +35,6 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts._aboutMisskey.source }}
- GitLab
-
-
-
- {{ i18n.ts._aboutMisskey.donate }}
- Ko-Fi
@@ -66,6 +46,34 @@ SPDX-License-Identifier: AGPL-3.0-only
+
+
+
+
+ {{ i18n.ts._aboutMisskey.source }} ({{ i18n.ts._aboutMisskey.original_sharkey }})
+ GitLab
+
+
+
+ {{ i18n.ts._aboutMisskey.donate_sharkey }}
+ Ko-Fi
+
+
+
+
+
+
+
+ {{ i18n.ts._aboutMisskey.source }} ({{ i18n.ts._aboutMisskey.original }})
+ GitHub
+
+
+
+ {{ i18n.ts._aboutMisskey.donate }}
+ Patreon
+
+
+
{{ i18n.ts._aboutMisskey.projectMembers }}
--
cgit v1.2.3-freya
From bbbb16795d9d09d48ba9efe5a790b28dd4e99cd4 Mon Sep 17 00:00:00 2001
From: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>
Date: Wed, 21 Feb 2024 14:27:06 +0900
Subject: refactor(frontend): 不必要なconsole.logを除去・抑制 (#13400)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* refactor(frontend): 不必要なconsole.logを除去
* Update MkCode.core.vue
* Update game.board.vue
---
packages/frontend/src/components/MkCode.core.vue | 2 +-
packages/frontend/src/pages/admin/modlog.vue | 2 --
packages/frontend/src/pages/reversi/game.board.vue | 2 +-
3 files changed, 2 insertions(+), 4 deletions(-)
(limited to 'packages/frontend/src/components')
diff --git a/packages/frontend/src/components/MkCode.core.vue b/packages/frontend/src/components/MkCode.core.vue
index f993e983e4..872517b6aa 100644
--- a/packages/frontend/src/components/MkCode.core.vue
+++ b/packages/frontend/src/components/MkCode.core.vue
@@ -52,7 +52,7 @@ async function fetchLanguage(to: string): Promise {
return bundle.id === language || bundle.aliases?.includes(language);
});
if (bundles.length > 0) {
- console.log(`Loading language: ${language}`);
+ if (_DEV_) console.log(`Loading language: ${language}`);
await highlighter.loadLanguage(bundles[0].import);
codeLang.value = language;
} else {
diff --git a/packages/frontend/src/pages/admin/modlog.vue b/packages/frontend/src/pages/admin/modlog.vue
index 5e251b8a6f..8590ee1651 100644
--- a/packages/frontend/src/pages/admin/modlog.vue
+++ b/packages/frontend/src/pages/admin/modlog.vue
@@ -54,8 +54,6 @@ const pagination = {
})),
};
-console.log(Misskey);
-
const headerActions = computed(() => []);
const headerTabs = computed(() => []);
diff --git a/packages/frontend/src/pages/reversi/game.board.vue b/packages/frontend/src/pages/reversi/game.board.vue
index cf7cec6b5e..6f7f5b8f38 100644
--- a/packages/frontend/src/pages/reversi/game.board.vue
+++ b/packages/frontend/src/pages/reversi/game.board.vue
@@ -248,7 +248,7 @@ if (game.value.isStarted && !game.value.isEnded) {
crc32: crc32.toString(),
}).then((res) => {
if (res.desynced) {
- console.log('resynced');
+ if (_DEV_) console.log('resynced');
restoreGame(res.game!);
}
});
--
cgit v1.2.3-freya
From 897bc631f73ad1266c6b8e4b5487655e48c9fbd5 Mon Sep 17 00:00:00 2001
From: Vavency
Date: Wed, 21 Feb 2024 16:17:13 +0000
Subject: Optimized pattern drawing in MkModPlayer
---
packages/frontend/src/components/MkModPlayer.vue | 442 +++++++++++++++++------
packages/frontend/src/scripts/chiptune2.ts | 46 +++
2 files changed, 375 insertions(+), 113 deletions(-)
(limited to 'packages/frontend/src/components')
diff --git a/packages/frontend/src/components/MkModPlayer.vue b/packages/frontend/src/components/MkModPlayer.vue
index f61144cbca..75053cbc37 100644
--- a/packages/frontend/src/components/MkModPlayer.vue
+++ b/packages/frontend/src/components/MkModPlayer.vue
@@ -7,14 +7,17 @@
-
+
Pattern Hidden
{{ i18n.ts.clickToShow }}
+
+
-
+
{{ i18n.ts.loadReplies }}
@@ -183,7 +183,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-
+
{{ i18n.ts.loadReplies }}
diff --git a/packages/frontend/src/components/MkNotifications.vue b/packages/frontend/src/components/MkNotifications.vue
index bbfc14502e..68bf1bf3d8 100644
--- a/packages/frontend/src/components/MkNotifications.vue
+++ b/packages/frontend/src/components/MkNotifications.vue
@@ -40,6 +40,7 @@ import { notificationTypes } from '@/const.js';
import { infoImageUrl } from '@/instance.js';
import { defaultStore } from '@/store.js';
import MkPullToRefresh from '@/components/MkPullToRefresh.vue';
+import * as Misskey from 'misskey-js';
const props = defineProps<{
excludeTypes?: typeof notificationTypes[number][];
@@ -80,17 +81,19 @@ function reload() {
});
}
-let connection;
+let connection: Misskey.ChannelConnection
;
onMounted(() => {
connection = useStream().useChannel('main');
connection.on('notification', onNotification);
+ connection.on('notificationFlushed', reload);
});
onActivated(() => {
pagingComponent.value?.reload();
connection = useStream().useChannel('main');
connection.on('notification', onNotification);
+ connection.on('notificationFlushed', reload);
});
onUnmounted(() => {
diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue
index aad2f80871..d9e50fbb79 100644
--- a/packages/frontend/src/components/MkPostForm.vue
+++ b/packages/frontend/src/components/MkPostForm.vue
@@ -174,7 +174,7 @@ const emit = defineEmits<{
const textareaEl = shallowRef(null);
const cwInputEl = shallowRef(null);
const hashtagsInputEl = shallowRef(null);
-const visibilityButton = shallowRef(null);
+const visibilityButton = shallowRef();
const posting = ref(false);
const posted = ref(false);
@@ -467,6 +467,7 @@ function setVisibility() {
isSilenced: $i.isSilenced,
localOnly: localOnly.value,
src: visibilityButton.value,
+ ...(props.reply ? { isReplyVisibilitySpecified: props.reply.visibility === 'specified' } : {}),
}, {
changeVisibility: v => {
visibility.value = v;
diff --git a/packages/frontend/src/components/MkReactionIcon.vue b/packages/frontend/src/components/MkReactionIcon.vue
index 59ceab27dc..068a2968db 100644
--- a/packages/frontend/src/components/MkReactionIcon.vue
+++ b/packages/frontend/src/components/MkReactionIcon.vue
@@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-->
-
+
diff --git a/packages/frontend/src/components/MkReactionsViewer.details.vue b/packages/frontend/src/components/MkReactionsViewer.details.vue
index 3158ba436e..8b5e6efdf3 100644
--- a/packages/frontend/src/components/MkReactionsViewer.details.vue
+++ b/packages/frontend/src/components/MkReactionsViewer.details.vue
@@ -44,7 +44,7 @@ function getReactionName(reaction: string): string {
if (trimLocal.startsWith(':')) {
return trimLocal;
}
- return getEmojiName(reaction) ?? reaction;
+ return getEmojiName(reaction);
}
diff --git a/packages/frontend/src/components/MkReactionsViewer.reaction.vue b/packages/frontend/src/components/MkReactionsViewer.reaction.vue
index e9b73fb77a..2464d21b6a 100644
--- a/packages/frontend/src/components/MkReactionsViewer.reaction.vue
+++ b/packages/frontend/src/components/MkReactionsViewer.reaction.vue
@@ -33,7 +33,8 @@ import { defaultStore } from '@/store.js';
import { i18n } from '@/i18n.js';
import * as sound from '@/scripts/sound.js';
import { checkReactionPermissions } from '@/scripts/check-reaction-permissions.js';
-import { customEmojis } from '@/custom-emojis.js';
+import { customEmojisMap } from '@/custom-emojis.js';
+import { getUnicodeEmoji } from '@/scripts/emojilist.js';
const props = defineProps<{
reaction: string;
@@ -50,13 +51,11 @@ const emit = defineEmits<{
const buttonEl = shallowRef();
-const isCustomEmoji = computed(() => props.reaction.includes(':'));
-const emoji = computed(() => isCustomEmoji.value ? customEmojis.value.find(emoji => emoji.name === props.reaction.replace(/:/g, '').replace(/@\./, '')) : null);
+const emojiName = computed(() => props.reaction.replace(/:/g, '').replace(/@\./, ''));
+const emoji = computed(() => customEmojisMap.get(emojiName.value) ?? getUnicodeEmoji(props.reaction));
const canToggle = computed(() => {
- return !props.reaction.match(/@\w/) && $i
- && (emoji.value && checkReactionPermissions($i, props.note, emoji.value))
- || !isCustomEmoji.value;
+ return !props.reaction.match(/@\w/) && $i && emoji.value && checkReactionPermissions($i, props.note, emoji.value);
});
const canGetInfo = computed(() => !props.reaction.match(/@\w/) && props.reaction.includes(':'));
diff --git a/packages/frontend/src/components/MkUserPopup.vue b/packages/frontend/src/components/MkUserPopup.vue
index 6d2531a8ea..6550fc4ec1 100644
--- a/packages/frontend/src/components/MkUserPopup.vue
+++ b/packages/frontend/src/components/MkUserPopup.vue
@@ -38,7 +38,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-
+
diff --git a/packages/frontend/src/components/MkVisibilityPicker.vue b/packages/frontend/src/components/MkVisibilityPicker.vue
index c4a3e4dc4a..bd6edad663 100644
--- a/packages/frontend/src/components/MkVisibilityPicker.vue
+++ b/packages/frontend/src/components/MkVisibilityPicker.vue
@@ -9,21 +9,21 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.visibility }}
-
-
+
@@ -174,7 +174,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.reactions }}
-
+
{{ i18n.ts.loadReplies }}
@@ -191,7 +191,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-
+
{{ i18n.ts.loadReplies }}
@@ -798,10 +798,6 @@ onUnmounted(() => {
padding-bottom: 0;
}
-.replyToMore {
-
-}
-
.renote {
display: flex;
align-items: center;
diff --git a/packages/frontend/src/components/global/MkA.stories.impl.ts b/packages/frontend/src/components/global/MkA.stories.impl.ts
index 9d57841f04..c1d8cf0ca6 100644
--- a/packages/frontend/src/components/global/MkA.stories.impl.ts
+++ b/packages/frontend/src/components/global/MkA.stories.impl.ts
@@ -32,7 +32,8 @@ export const Default = {
async play({ canvasElement }) {
const canvas = within(canvasElement);
const a = canvas.getByRole
('link');
- await expect(a.href).toMatch(/^https?:\/\/.*#test$/);
+ // FIXME: 通るけどその後落ちるのでコメントアウト
+ // await expect(a.href).toMatch(/^https?:\/\/.*#test$/);
await userEvent.pointer({ keys: '[MouseRight]', target: a });
await tick();
const menu = canvas.getByRole('menu');
@@ -44,6 +45,7 @@ export const Default = {
},
args: {
to: '#test',
+ behavior: 'browser',
},
parameters: {
layout: 'centered',
diff --git a/packages/frontend/src/components/global/MkCustomEmoji.stories.impl.ts b/packages/frontend/src/components/global/MkCustomEmoji.stories.impl.ts
index e0da6a4a13..9e6177045d 100644
--- a/packages/frontend/src/components/global/MkCustomEmoji.stories.impl.ts
+++ b/packages/frontend/src/components/global/MkCustomEmoji.stories.impl.ts
@@ -48,3 +48,18 @@ export const Missing = {
name: Default.args.name,
},
} satisfies StoryObj;
+export const ErrorToText = {
+ ...Default,
+ args: {
+ url: 'https://example.com/404',
+ name: Default.args.name,
+ },
+} satisfies StoryObj;
+export const ErrorToImage = {
+ ...Default,
+ args: {
+ url: 'https://example.com/404',
+ name: Default.args.name,
+ fallbackToImage: true,
+ },
+} satisfies StoryObj;
diff --git a/packages/frontend/src/components/global/MkCustomEmoji.vue b/packages/frontend/src/components/global/MkCustomEmoji.vue
index 2c65920957..b57a311c0c 100644
--- a/packages/frontend/src/components/global/MkCustomEmoji.vue
+++ b/packages/frontend/src/components/global/MkCustomEmoji.vue
@@ -4,7 +4,13 @@ SPDX-License-Identifier: AGPL-3.0-only
-->
-:{{ customEmojiName }}:
+
+:{{ customEmojiName }}:
();
const react = inject<((name: string) => void) | null>('react', null);
diff --git a/packages/frontend/src/components/global/MkEmoji.vue b/packages/frontend/src/components/global/MkEmoji.vue
index 19c9ee9980..2e7a0c5bb7 100644
--- a/packages/frontend/src/components/global/MkEmoji.vue
+++ b/packages/frontend/src/components/global/MkEmoji.vue
@@ -10,7 +10,7 @@ SPDX-License-Identifier: AGPL-3.0-only