Removed LINT warnings
This commit is contained in:
parent
33ad318bd3
commit
ca9ec58244
3 changed files with 11 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -3,3 +3,4 @@
|
||||||
/dist
|
/dist
|
||||||
/dist-zip
|
/dist-zip
|
||||||
Session.vim
|
Session.vim
|
||||||
|
.idea/
|
||||||
|
|
|
@ -37,7 +37,7 @@ const menu = {
|
||||||
this.hosts = await utils.methods.getHosts();
|
this.hosts = await utils.methods.getHosts();
|
||||||
this.actions = await utils.methods.getActions();
|
this.actions = await utils.methods.getActions();
|
||||||
this.scripts = await utils.methods.getScripts();
|
this.scripts = await utils.methods.getScripts();
|
||||||
browser.contextMenus.removeAll();
|
await browser.contextMenus.removeAll();
|
||||||
|
|
||||||
for (const [host] of Object.entries(this.hosts)) {
|
for (const [host] of Object.entries(this.hosts)) {
|
||||||
const hostId = this.separator + host;
|
const hostId = this.separator + host;
|
||||||
|
@ -71,9 +71,9 @@ const menu = {
|
||||||
const target = await utils.methods.getTargetElement();
|
const target = await utils.methods.getTargetElement();
|
||||||
|
|
||||||
if (action in this.actions) {
|
if (action in this.actions) {
|
||||||
utils.methods.run(this.actions[action], this.hosts[host]);
|
await utils.methods.run(this.actions[action], this.hosts[host]);
|
||||||
} else {
|
} else {
|
||||||
utils.methods.runScript(this.scripts[action].script, this.hosts[host], tab, target);
|
await utils.methods.runScript(this.scripts[action].script, this.hosts[host], tab, target);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -84,6 +84,7 @@ const menu = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const onCreate = () => {
|
const onCreate = () => {
|
||||||
|
// noinspection JSIgnoredPromiseFromCall
|
||||||
menu.create();
|
menu.create();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<!--suppress HtmlFormInputWithoutLabel -->
|
||||||
<template>
|
<template>
|
||||||
<div class="page run">
|
<div class="page run">
|
||||||
<h2>Run a command on {{ host.name }}</h2>
|
<h2>Run a command on {{ host.name }}</h2>
|
||||||
|
@ -109,7 +110,7 @@
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
:separators="[',', ';']"
|
:separators="[',', ';']"
|
||||||
:tags="selectedCategories.map(cat => (typeof cat === 'object' ? cat : { text: cat }))"
|
:tags="selectedCategories.map(cat => (typeof cat === 'object' ? cat : { text: cat }))"
|
||||||
@tags-changed="tags => (selectedCategories = tags)"
|
@tags-changed="onCategoriesChanged"
|
||||||
placeholder="Categories"
|
placeholder="Categories"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -442,6 +443,10 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onCategoriesChanged(tags) {
|
||||||
|
this.selectedCategories = tags;
|
||||||
|
},
|
||||||
|
|
||||||
initAction() {
|
initAction() {
|
||||||
const action = this.selectedAction || this.selectedScript;
|
const action = this.selectedAction || this.selectedScript;
|
||||||
if (!action) {
|
if (!action) {
|
||||||
|
|
Loading…
Reference in a new issue