Install script on these devices
@@ -176,6 +184,12 @@ export default {
args: [],
defaultArgs: {},
},
+
+ saveParams: {
+ name: null,
+ iconClass: null,
+ color: null,
+ },
};
},
@@ -295,6 +309,14 @@ export default {
toggleSaveMode() {
this.saveMode = !this.saveMode;
+
+ if (!this.saveMode) {
+ this.saveParams = {
+ name: null,
+ iconClass: null,
+ color: null,
+ };
+ }
},
async loadPlugins() {
@@ -329,6 +351,7 @@ export default {
const saveForm = event.target;
const displayName = saveForm.displayName.value.trim();
const iconClass = saveForm.iconClass.value.trim();
+ const color = saveForm.color.value.trim();
const hosts = [...saveForm.querySelectorAll('input[data-type="host"]:checked')].map(el => el.value);
if (!displayName.length) {
@@ -345,6 +368,7 @@ export default {
type: this.actionMode,
displayName: displayName,
iconClass: iconClass,
+ color: color.length ? color : null,
hosts: hosts,
script: this.script,
categories: this.selectedCategories.map(obj => obj.text),
@@ -357,6 +381,7 @@ export default {
const saveForm = event.target;
const displayName = saveForm.displayName.value.trim();
const iconClass = saveForm.iconClass.value.trim();
+ const color = saveForm.color.value.trim();
const hosts = [...saveForm.querySelectorAll('input[data-type="host"]:checked')].map(el => el.value);
if (!displayName.length) {
@@ -373,6 +398,7 @@ export default {
type: this.actionMode,
displayName: displayName,
iconClass: iconClass,
+ color: color.length ? color : null,
hosts: hosts,
name: this.action.name,
args: this.getActionArgs(),
@@ -524,6 +550,11 @@ form {
margin-bottom: 0.75em;
}
}
+
+.icon-preview {
+ font-size: 2em;
+ margin-left: 0.2em;
+}
diff --git a/src/popup/App.vue b/src/popup/App.vue
index ce32735..d3b7030 100644
--- a/src/popup/App.vue
+++ b/src/popup/App.vue
@@ -38,7 +38,7 @@
-
+
@@ -160,10 +160,14 @@ export default {