Removed LINT warnings

This commit is contained in:
Fabio Manganiello 2020-07-01 17:41:00 +02:00
parent 33ad318bd3
commit ca9ec58244
3 changed files with 11 additions and 4 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@
/dist
/dist-zip
Session.vim
.idea/

View File

@ -37,7 +37,7 @@ const menu = {
this.hosts = await utils.methods.getHosts();
this.actions = await utils.methods.getActions();
this.scripts = await utils.methods.getScripts();
browser.contextMenus.removeAll();
await browser.contextMenus.removeAll();
for (const [host] of Object.entries(this.hosts)) {
const hostId = this.separator + host;
@ -71,9 +71,9 @@ const menu = {
const target = await utils.methods.getTargetElement();
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 {
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 = () => {
// noinspection JSIgnoredPromiseFromCall
menu.create();
};

View File

@ -1,3 +1,4 @@
<!--suppress HtmlFormInputWithoutLabel -->
<template>
<div class="page run">
<h2>Run a command on {{ host.name }}</h2>
@ -109,7 +110,7 @@
:disabled="loading"
:separators="[',', ';']"
:tags="selectedCategories.map(cat => (typeof cat === 'object' ? cat : { text: cat }))"
@tags-changed="tags => (selectedCategories = tags)"
@tags-changed="onCategoriesChanged"
placeholder="Categories"
/>
</div>
@ -442,6 +443,10 @@ export default {
}
},
onCategoriesChanged(tags) {
this.selectedCategories = tags;
},
initAction() {
const action = this.selectedAction || this.selectedScript;
if (!action) {