Linter fixes

This commit is contained in:
Richard Bowman 2024-01-03 21:53:14 +00:00
parent 5ca8070bc8
commit 40580327c6
2 changed files with 9 additions and 14 deletions

View file

@ -191,19 +191,19 @@ export default {
this.taskStarted = true; this.taskStarted = true;
this.$emit("taskStarted", this.taskId); this.$emit("taskStarted", this.taskId);
try { try {
let response = await axios.post(this.submitUrl, this.submitData) let response = await axios.post(this.submitUrl, this.submitData);
if (this.statusModal) { if (this.statusModal) {
UIkit.modal(this.$refs.statusModal).show(); UIkit.modal(this.$refs.statusModal).show();
} }
// Start the store polling TaskId for success // Start the store polling TaskId for success
response = await this.startPolling(response.data.id, response.data.href); response = await this.startPolling(
response.data.id,
response.data.href
);
this.$emit("response", response); this.$emit("response", response);
this.$emit("finished"); this.$emit("finished");
} catch (error) { } catch (error) {
if (!error) { this.$emit("error", error | Error("Unknown error"));
error = Error("Unknown error");
}
this.$emit("error", error);
this.$emit("finished"); this.$emit("finished");
} finally { } finally {
// Reset taskRunning and taskId // Reset taskRunning and taskId

View file

@ -42,11 +42,6 @@ export default {
propertyControl propertyControl
}, },
data: function() {
return {
};
},
computed: { computed: {
backgroundFractionUri() { backgroundFractionUri() {
return this.thingActionUrl("background_detect", "background_fraction"); return this.thingActionUrl("background_detect", "background_fraction");
@ -58,9 +53,9 @@ export default {
methods: { methods: {
alertBackgroundFraction(r) { alertBackgroundFraction(r) {
let fraction = r.output let fraction = r.output;
let percentage = (fraction * 100).toFixed(1) let percentage = (fraction * 100).toFixed(1);
this.modalNotify(`Current image is ${percentage}% background.`) this.modalNotify(`Current image is ${percentage}% background.`);
} }
} }
}; };