diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2020-07-30 00:41:17 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2020-07-30 00:41:17 +0900 |
| commit | 57203de4cbf3947825f422dd746a076d79e353c7 (patch) | |
| tree | c938e3fd3d1df540c3c7288d602caa167f983291 /src | |
| parent | Merge branch 'develop' of https://github.com/syuilo/misskey into develop (diff) | |
| download | misskey-57203de4cbf3947825f422dd746a076d79e353c7.tar.gz misskey-57203de4cbf3947825f422dd746a076d79e353c7.tar.bz2 misskey-57203de4cbf3947825f422dd746a076d79e353c7.zip | |
feat(client): プラグインのIDを不要に
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/pages/preferences/plugins.vue | 8 | ||||
| -rw-r--r-- | src/client/store.ts | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/client/pages/preferences/plugins.vue b/src/client/pages/preferences/plugins.vue index b61b2c8daf..10f86de1e4 100644 --- a/src/client/pages/preferences/plugins.vue +++ b/src/client/pages/preferences/plugins.vue @@ -47,6 +47,7 @@ import Vue from 'vue'; import { AiScript, parse } from '@syuilo/aiscript'; import { serialize } from '@syuilo/aiscript/built/serializer'; +import { v4 as uuid } from 'uuid'; import { faPlug, faSave, faTrashAlt, faFolderOpen, faDownload, faCog } from '@fortawesome/free-solid-svg-icons'; import MkButton from '../../components/ui/button.vue'; import MkTextarea from '../../components/ui/textarea.vue'; @@ -106,8 +107,8 @@ export default Vue.extend({ }); return; } - const { id, name, version, author, description, permissions, config } = data; - if (id == null || name == null || version == null || author == null) { + const { name, version, author, description, permissions, config } = data; + if (name == null || version == null || author == null) { this.$root.dialog({ type: 'error', text: 'Required property not found :(' @@ -133,8 +134,9 @@ export default Vue.extend({ }); this.$store.commit('deviceUser/installPlugin', { + id: uuid(), meta: { - id, name, version, author, description, permissions, config + name, version, author, description, permissions, config }, token, ast: serialize(ast) diff --git a/src/client/store.ts b/src/client/store.ts index 0e16115903..0bf4520487 100644 --- a/src/client/store.ts +++ b/src/client/store.ts @@ -613,9 +613,10 @@ export default () => new Vuex.Store({ }, //#endregion - installPlugin(state, { meta, ast, token }) { + installPlugin(state, { id, meta, ast, token }) { state.plugins.push({ ...meta, + id, active: true, configData: {}, token: token, |