Merge branch 'develop' into feat-frontend-expand-profile-links

This commit is contained in:
Souma 2025-09-06 17:38:21 +09:00 committed by GitHub
commit 3c4a03a789
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 63 additions and 8 deletions

View File

@ -7,10 +7,12 @@
- Enhance: AiScriptAppウィジェットで構文エラーを検知してもダイアログではなくウィジェット内にエラーを表示するように - Enhance: AiScriptAppウィジェットで構文エラーを検知してもダイアログではなくウィジェット内にエラーを表示するように
- Enhance: /flushページでサイトキャッシュをクリアできるようになりました - Enhance: /flushページでサイトキャッシュをクリアできるようになりました
- Enhance: クリップ/リスト/アンテナ/ロール追加系メニュー項目において、表示件数を拡張 - Enhance: クリップ/リスト/アンテナ/ロール追加系メニュー項目において、表示件数を拡張
- Enhance: 「キャッシュを削除」ボタンでブラウザの内部キャッシュの削除も行えるように
- Enhance: プロフィールへのリンクをユーザーポップアップのアバターに追加 - Enhance: プロフィールへのリンクをユーザーポップアップのアバターに追加
- Enhance: ユーザーのノート、フォロー、フォロワーページへのリンクをユーザーポップアップに追加 - Enhance: ユーザーのノート、フォロー、フォロワーページへのリンクをユーザーポップアップに追加
- Fix: プッシュ通知を有効にできない問題を修正 - Fix: プッシュ通知を有効にできない問題を修正
- Fix: RSSティッカーウィジェットが正しく動作しない問題を修正 - Fix: RSSティッカーウィジェットが正しく動作しない問題を修正
- Fix: プロファイルを復元後アカウントの切り替えができない問題を修正
- Fix: エラー画像が横に引き伸ばされてしまう問題に対応 - Fix: エラー画像が横に引き伸ばされてしまう問題に対応
### Server ### Server

View File

@ -1,6 +1,6 @@
{ {
"name": "misskey", "name": "misskey",
"version": "2025.9.0-alpha.0", "version": "2025.9.0-alpha.1",
"codename": "nasubi", "codename": "nasubi",
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -176,6 +176,17 @@ export class ApiServerService {
} }
}); });
fastify.all('/clear-browser-cache', (request, reply) => {
if (['GET', 'POST'].includes(request.method)) {
reply.header('Clear-Site-Data', '"cache", "prefetchCache", "prerenderCache", "executionContexts"');
reply.code(204);
reply.send();
} else {
reply.code(405);
reply.send();
}
});
// Make sure any unknown path under /api returns HTTP 404 Not Found, // Make sure any unknown path under /api returns HTTP 404 Not Found,
// because otherwise ClientServerService will return the base client HTML // because otherwise ClientServerService will return the base client HTML
// page with HTTP 200. // page with HTTP 200.

View File

@ -251,13 +251,30 @@ export async function openAccountMenu(opts: {
} }
}, },
}; };
} else { } else { // プロファイルを復元した場合などはアカウントのトークンや詳細情報はstoreにキャッシュされていない
return { return {
type: 'button' as const, type: 'button' as const,
text: username, text: username,
active: opts.active != null ? opts.active === id : false, active: opts.active != null ? opts.active === id : false,
action: async () => { action: async () => {
// TODO const { dispose } = popup(defineAsyncComponent(() => import('@/components/MkSigninDialog.vue')), {
initialUsername: username,
}, {
done: async (res: Misskey.entities.SigninFlowResponse & { finished: true }) => {
store.set('accountTokens', { ...store.s.accountTokens, [host + '/' + res.id]: res.i });
if (callback) {
fetchAccount(res.i, id).then(account => {
callback(account);
});
} else {
switchAccount(host, id);
}
},
closed: () => {
dispose();
},
});
}, },
}; };
} }

View File

@ -69,9 +69,11 @@ import MkInfo from '@/components/MkInfo.vue';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
message?: string, message?: string,
openOnRemote?: OpenOnRemoteOptions, openOnRemote?: OpenOnRemoteOptions,
initialUsername?: string;
}>(), { }>(), {
message: '', message: '',
openOnRemote: undefined, openOnRemote: undefined,
initialUsername: undefined,
}); });
const emit = defineEmits<{ const emit = defineEmits<{
@ -81,7 +83,7 @@ const emit = defineEmits<{
const host = toUnicode(configHost); const host = toUnicode(configHost);
const username = ref(''); const username = ref(props.initialUsername ?? '');
//#region Open on remote //#region Open on remote
function openRemote(options: OpenOnRemoteOptions, targetHost?: string): void { function openRemote(options: OpenOnRemoteOptions, targetHost?: string): void {

View File

@ -20,6 +20,7 @@ SPDX-License-Identifier: AGPL-3.0-only
key="input" key="input"
:message="message" :message="message"
:openOnRemote="openOnRemote" :openOnRemote="openOnRemote"
:initialUsername="initialUsername"
@usernameSubmitted="onUsernameSubmitted" @usernameSubmitted="onUsernameSubmitted"
@passkeyClick="onPasskeyLogin" @passkeyClick="onPasskeyLogin"
@ -89,10 +90,12 @@ const props = withDefaults(defineProps<{
autoSet?: boolean; autoSet?: boolean;
message?: string, message?: string,
openOnRemote?: OpenOnRemoteOptions, openOnRemote?: OpenOnRemoteOptions,
initialUsername?: string;
}>(), { }>(), {
autoSet: false, autoSet: false,
message: '', message: '',
openOnRemote: undefined, openOnRemote: undefined,
initialUsername: undefined,
}); });
const page = ref<'input' | 'password' | 'totp' | 'passkey'>('input'); const page = ref<'input' | 'password' | 'totp' | 'passkey'>('input');

View File

@ -16,7 +16,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<button :class="$style.closeButton" class="_button" @click="onClose"><i class="ti ti-x"></i></button> <button :class="$style.closeButton" class="_button" @click="onClose"><i class="ti ti-x"></i></button>
</div> </div>
<div :class="$style.content"> <div :class="$style.content">
<MkSignin :autoSet="autoSet" :message="message" :openOnRemote="openOnRemote" @login="onLogin"/> <MkSignin :autoSet="autoSet" :message="message" :openOnRemote="openOnRemote" :initialUsername="initialUsername" @login="onLogin"/>
</div> </div>
</div> </div>
</MkModal> </MkModal>
@ -34,10 +34,12 @@ withDefaults(defineProps<{
autoSet?: boolean; autoSet?: boolean;
message?: string, message?: string,
openOnRemote?: OpenOnRemoteOptions, openOnRemote?: OpenOnRemoteOptions,
initialUsername?: string;
}>(), { }>(), {
autoSet: false, autoSet: false,
message: '', message: '',
openOnRemote: undefined, openOnRemote: undefined,
initialUsername: undefined,
}); });
const emit = defineEmits<{ const emit = defineEmits<{

View File

@ -4,6 +4,7 @@
*/ */
import { unisonReload } from '@/utility/unison-reload.js'; import { unisonReload } from '@/utility/unison-reload.js';
import { misskeyApiGet } from '@/utility/misskey-api.js';
import * as os from '@/os.js'; import * as os from '@/os.js';
import { miLocalStorage } from '@/local-storage.js'; import { miLocalStorage } from '@/local-storage.js';
import { fetchCustomEmojis } from '@/custom-emojis.js'; import { fetchCustomEmojis } from '@/custom-emojis.js';
@ -16,6 +17,9 @@ export async function clearCache() {
miLocalStorage.removeItem('theme'); miLocalStorage.removeItem('theme');
miLocalStorage.removeItem('emojis'); miLocalStorage.removeItem('emojis');
miLocalStorage.removeItem('lastEmojisFetchedAt'); miLocalStorage.removeItem('lastEmojisFetchedAt');
await misskeyApiGet('clear-browser-cache', {}).catch(() => {
// ignore
});
await fetchInstance(true); await fetchInstance(true);
await fetchCustomEmojis(true); await fetchCustomEmojis(true);
unisonReload(); unisonReload();

View File

@ -1449,6 +1449,10 @@ export type Endpoints = Overwrite<Endpoints_2, {
}>; }>;
res: AdminRolesCreateResponse; res: AdminRolesCreateResponse;
}; };
'clear-browser-cache': {
req: EmptyRequest;
res: EmptyResponse;
};
}>; }>;
// @public (undocumented) // @public (undocumented)

View File

@ -1,7 +1,7 @@
{ {
"type": "module", "type": "module",
"name": "misskey-js", "name": "misskey-js",
"version": "2025.9.0-alpha.0", "version": "2025.9.0-alpha.1",
"description": "Misskey SDK for JavaScript", "description": "Misskey SDK for JavaScript",
"license": "MIT", "license": "MIT",
"main": "./built/index.js", "main": "./built/index.js",

View File

@ -1,6 +1,12 @@
import { Endpoints as Gen } from './autogen/endpoint.js'; import { Endpoints as Gen } from './autogen/endpoint.js';
import { UserDetailed } from './autogen/models.js'; import { UserDetailed } from './autogen/models.js';
import { AdminRolesCreateRequest, AdminRolesCreateResponse, UsersShowRequest } from './autogen/entities.js'; import {
AdminRolesCreateRequest,
AdminRolesCreateResponse,
EmptyRequest,
EmptyResponse,
UsersShowRequest,
} from './autogen/entities.js';
import { import {
PartialRolePolicyOverride, PartialRolePolicyOverride,
SigninFlowRequest, SigninFlowRequest,
@ -106,6 +112,10 @@ export type Endpoints = Overwrite<
'admin/roles/create': { 'admin/roles/create': {
req: Overwrite<AdminRolesCreateRequest, { policies: PartialRolePolicyOverride }>; req: Overwrite<AdminRolesCreateRequest, { policies: PartialRolePolicyOverride }>;
res: AdminRolesCreateResponse; res: AdminRolesCreateResponse;
} },
'clear-browser-cache': {
req: EmptyRequest;
res: EmptyResponse;
},
} }
>; >;