Merge branch 'develop' into perf-fe-lowres-time
This commit is contained in:
commit
241d98b04f
|
@ -7,6 +7,7 @@
|
|||
- Enhance: AiScriptAppウィジェットで構文エラーを検知してもダイアログではなくウィジェット内にエラーを表示するように
|
||||
- Enhance: /flushページでサイトキャッシュをクリアできるようになりました
|
||||
- Enhance: クリップ/リスト/アンテナ/ロール追加系メニュー項目において、表示件数を拡張
|
||||
- Enhance: 「キャッシュを削除」ボタンでブラウザの内部キャッシュの削除も行えるように
|
||||
- Enhance: 時刻計算のための基準値を一か所で管理するようにし、パフォーマンスを向上
|
||||
- Fix: プッシュ通知を有効にできない問題を修正
|
||||
- Fix: RSSティッカーウィジェットが正しく動作しない問題を修正
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -1449,6 +1449,10 @@ export type Endpoints = Overwrite<Endpoints_2, {
|
|||
}>;
|
||||
res: AdminRolesCreateResponse;
|
||||
};
|
||||
'clear-browser-cache': {
|
||||
req: EmptyRequest;
|
||||
res: EmptyResponse;
|
||||
};
|
||||
}>;
|
||||
|
||||
// @public (undocumented)
|
||||
|
|
|
@ -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;
|
||||
},
|
||||
}
|
||||
>;
|
||||
|
|
Loading…
Reference in New Issue