enhance: プラグイン削除時にアクセストークンも削除する (#12167)

* (enhance) プラグイン削除時にトークンも削除

* update changelog
This commit is contained in:
かっこかり
2023-10-28 07:54:06 +09:00
committed by GitHub
parent 8a2309ba7d
commit e5ff8d8445
3 changed files with 27 additions and 9 deletions

View File

@@ -77,9 +77,11 @@ import { definePageMetadata } from '@/scripts/page-metadata.js';
const plugins = ref(ColdDeviceStorage.get('plugins'));
function uninstall(plugin) {
async function uninstall(plugin) {
ColdDeviceStorage.set('plugins', plugins.value.filter(x => x.id !== plugin.id));
os.success();
await os.apiWithDialog('i/revoke-token', {
token: plugin.token,
});
nextTick(() => {
unisonReload();
});