From 5bf98dc37ab40ffb89fc9e157eaefff023461ae2 Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Thu, 27 Aug 2020 04:13:51 +0000 Subject: [PATCH] load community uploaded scripts into the database during install/upgrade --- src/components/ScriptManager.vue | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/src/components/ScriptManager.vue b/src/components/ScriptManager.vue index 1d99654..c0b2320 100644 --- a/src/components/ScriptManager.vue +++ b/src/components/ScriptManager.vue @@ -1,7 +1,7 @@ @@ -126,6 +139,7 @@ export default { showScriptModal: false, filename: null, code: null, + showBuiltIn: true, pagination: { rowsPerPage: 0, sortBy: "script_type", @@ -248,6 +262,9 @@ export default { toggleScriptManager: state => state.toggleScriptManager, scripts: state => state.scripts, }), + visibleScripts() { + return this.showBuiltIn ? this.scripts : this.scripts.filter(i => i.script_type !== "builtin"); + }, }, mounted() { this.getScripts();