diff --git a/src/options/controls-settings/add-edit-action-popup.vue b/src/options/controls-settings/add-edit-action-popup.vue
index 59b10c1..45e1fbd 100644
--- a/src/options/controls-settings/add-edit-action-popup.vue
+++ b/src/options/controls-settings/add-edit-action-popup.vue
@@ -58,49 +58,27 @@
- Scopes:
+ Show this action in the following tabs:
-
- Global:
-
+
+
+
-
-
-
- Show in popup
-
-
-
-
-
-
-
-
-
- Label (leave empty for default):
-
-
-
-
-
-
-
-
-
- Shortcut:
-
-
-
- TODO: insert shortcut changing component
-
-
+
+
@@ -110,11 +88,17 @@ import Stretch from '../../common/enums/stretch.enum';
import KeyboardShortcutParser from '../../common/js/KeyboardShortcutParser';
import CommandChain from './command-builder/command-chain';
import CommandAddEdit from './command-builder/command-add-edit';
+import ScopeSettings from './scope-settings-component/scope-settings';
export default {
+ props: {
+ settings: Object,
+ actionIndex: Number,
+ },
components: {
CommandChain: CommandChain,
CommandAddEdit: CommandAddEdit,
+ ScopeSettings,
},
data () {
return {
@@ -123,6 +107,9 @@ export default {
name: 'New action',
label: 'New action',
cmd: [],
+ scopes: {
+
+ }
},
addEditCommand: false,
currentCmdIndex: -1,
@@ -130,9 +117,28 @@ export default {
},
created () {
},
- props: {
- settings: Object,
- actionIndex: Number,
+ computed: {
+ globalScopeOptions: function() {
+ return {
+ show: this.action.scopes.global && this.action.scopes.global.show || false,
+ label: (this.action.scopes.global && this.action.scopes.global.label) ? this.action.scopes.global.label : '',
+ shortcut: this.action.scopes.global && this.action.scopes.global.shortcut
+ }
+ },
+ siteScopeOptions: function() {
+ return {
+ show: this.action.scopes.site && this.action.scopes.site.show || false,
+ label: (this.action.scopes.site && this.action.scopes.site.label) ? this.action.scopes.site.label : '',
+ shortcut: this.action.scopes.site && this.action.scopes.site.shortcut
+ }
+ },
+ pageScopeOptions: function() {
+ return {
+ show: this.action.scopes.page && this.action.scopes.page.show || false,
+ label: (this.action.scopes.page && this.action.scopes.page.label) ? this.action.scopes.page.label : '',
+ shortcut: this.action.scopes.page && this.action.scopes.page.shortcut
+ }
+ }
},
methods: {
parseActionShortcut(action) {
diff --git a/src/options/controls-settings/scope-settings-component/scope-settings.vue b/src/options/controls-settings/scope-settings-component/scope-settings.vue
new file mode 100644
index 0000000..36e15b3
--- /dev/null
+++ b/src/options/controls-settings/scope-settings-component/scope-settings.vue
@@ -0,0 +1,65 @@
+
+
+
+
+ Show in popup:
+
+
+
+
+
+
+
+ Custom label (optional):
+
+
+
+
+
+
+
+
+ Shortcut:
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/options/controls-settings/scope-settings-component/set-shortcut-button.vue b/src/options/controls-settings/scope-settings-component/set-shortcut-button.vue
new file mode 100644
index 0000000..d14db81
--- /dev/null
+++ b/src/options/controls-settings/scope-settings-component/set-shortcut-button.vue
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+