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

View File

@ -1,6 +1,6 @@
{
"name": "misskey",
"version": "2025.9.0-alpha.0",
"version": "2025.9.0-alpha.1",
"codename": "nasubi",
"repository": {
"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,
// because otherwise ClientServerService will return the base client HTML
// page with HTTP 200.

View File

@ -251,13 +251,30 @@ export async function openAccountMenu(opts: {
}
},
};
} else {
} else { // プロファイルを復元した場合などはアカウントのトークンや詳細情報はstoreにキャッシュされていない
return {
type: 'button' as const,
text: username,
active: opts.active != null ? opts.active === id : false,
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<{
message?: string,
openOnRemote?: OpenOnRemoteOptions,
initialUsername?: string;
}>(), {
message: '',
openOnRemote: undefined,
initialUsername: undefined,
});
const emit = defineEmits<{
@ -81,7 +83,7 @@ const emit = defineEmits<{
const host = toUnicode(configHost);
const username = ref('');
const username = ref(props.initialUsername ?? '');
//#region Open on remote
function openRemote(options: OpenOnRemoteOptions, targetHost?: string): void {

View File

@ -20,6 +20,7 @@ SPDX-License-Identifier: AGPL-3.0-only
key="input"
:message="message"
:openOnRemote="openOnRemote"
:initialUsername="initialUsername"
@usernameSubmitted="onUsernameSubmitted"
@passkeyClick="onPasskeyLogin"
@ -89,10 +90,12 @@ const props = withDefaults(defineProps<{
autoSet?: boolean;
message?: string,
openOnRemote?: OpenOnRemoteOptions,
initialUsername?: string;
}>(), {
autoSet: false,
message: '',
openOnRemote: undefined,
initialUsername: undefined,
});
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>
</div>
<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>
</MkModal>
@ -34,10 +34,12 @@ withDefaults(defineProps<{
autoSet?: boolean;
message?: string,
openOnRemote?: OpenOnRemoteOptions,
initialUsername?: string;
}>(), {
autoSet: false,
message: '',
openOnRemote: undefined,
initialUsername: undefined,
});
const emit = defineEmits<{

View File

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

View File

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

View File

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

View File

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