1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-03 03:15:58 +02:00

fix(frontend): プラグインのアンインストール時にローカルのセーブデータを削除するように (#16246)

* fix(frontend): プラグインのアンインストール時にローカルのセーブデータを削除するように

* Update Changelog

* remove unused import

---------

Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
かっこかり
2025-07-04 07:40:00 +09:00
committed by GitHub
parent 73e8d950df
commit b7a6301c2e
2 changed files with 8 additions and 0 deletions

View File

@@ -155,6 +155,13 @@ export async function installPlugin(code: string, meta?: AiScriptPluginMeta) {
export async function uninstallPlugin(plugin: Plugin) {
abortPlugin(plugin);
prefer.commit('plugins', prefer.s.plugins.filter(x => x.installId !== plugin.installId));
Object.keys(window.localStorage).forEach(key => {
if (key.startsWith('aiscript:plugins:' + plugin.installId)) {
window.localStorage.removeItem(key);
}
});
if (Object.hasOwn(store.s.pluginTokens, plugin.installId)) {
await os.apiWithDialog('i/revoke-token', {
token: store.s.pluginTokens[plugin.installId],