diff --git a/src/common/mixins/ComputeActionsMixin.js b/src/common/mixins/ComputeActionsMixin.js new file mode 100644 index 0000000..11689ee --- /dev/null +++ b/src/common/mixins/ComputeActionsMixin.js @@ -0,0 +1,28 @@ +export default { + computed: { + scopeActions: function() { + return this.settings.active.actions.filter(x => x.scopes[this.scope] && x.scopes[this.scope].show) || []; + }, + extensionActions: function(){ + return this.scopeActions.filter(x => x.cmd.length === 1 && x.cmd[0].action === 'set-extension-mode') || []; + }, + aardActions: function(){ + return this.scopeActions.filter(x => x.cmd.length === 1 && x.cmd[0].action === 'set-autoar-mode') || []; + }, + aspectRatioActions: function(){ + return this.scopeActions.filter(x => x.cmd.length === 1 && x.cmd[0].action === 'set-ar') || []; + }, + stretchActions: function(){ + return this.scopeActions.filter(x => x.cmd.length === 1 && x.cmd[0].action === 'set-stretch') || []; + }, + keyboardActions: function() { + return this.scopeActions.filter(x => x.cmd.length === 1 && x.cmd[0].action === 'set-keyboard') || []; + }, + alignmentActions: function() { + return this.scopeActions.filter(x => x.cmd.length === 1 && x.cmd[0].action === 'set-alignment') || []; + }, + otherActions: function() { + return this.scopeActions.filter(x => x.cmd.length > 1) || []; + } + } +} \ No newline at end of file diff --git a/src/popup/panels/DefaultSettingsPanel.vue b/src/popup/panels/DefaultSettingsPanel.vue index 9c13602..598759a 100644 --- a/src/popup/panels/DefaultSettingsPanel.vue +++ b/src/popup/panels/DefaultSettingsPanel.vue @@ -1,108 +1,110 @@ - - + + - Enable extension {{scope === 'site' ? 'for this site' : ''}}: + + Enable extension {{scope === 'site' ? 'for this site' : ''}}: - - - - + + - Enable autodetection {{scope === 'site' ? 'for this site' : ''}}: - - - - + + Note: some sites implement restrictions that make autodetection a fair bit less reliable in Firefox and outright impossible in anything else. - + Default stretching mode: - - - - + + + + - + Video alignment: - - - - + + - - Multi-command actions: + + Other actions: - - - - - + + +