Prettier on slideScanContent

This commit is contained in:
Joe Knapper 2026-02-09 17:09:38 +00:00 committed by jaknapper
parent 1a0dd71f30
commit fb7a8b4959

View file

@ -2,24 +2,20 @@
<div uk-grid class="uk-height-1-1 uk-margin-remove uk-padding-remove"> <div uk-grid class="uk-height-1-1 uk-margin-remove uk-padding-remove">
<div class="control-component uk-padding-small"> <div class="control-component uk-padding-small">
<div v-show="!scanning" v-observe-visibility="visibilityChanged" class="uk-padding-small"> <div v-show="!scanning" v-observe-visibility="visibilityChanged" class="uk-padding-small">
<!-- Workflow Selection Dropdown --> <!-- Workflow Selection Dropdown -->
<div class="uk-margin"> <div class="uk-margin">
<label class="uk-form-label">Workflow</label> <label class="uk-form-label">Workflow</label>
<select <select
class="uk-select uk-form-small" class="uk-select uk-form-small"
:value="workflowName" :value="workflowName"
@change="setWorkflow($event.target.value)" @change="setWorkflow($event.target.value)"
> >
<option <option v-for="(label, name) in workflowOptions" :key="name" :value="name">
v-for="(label, name) in workflowOptions" {{ label }}
:key="name" </option>
:value="name" </select>
> </div>
{{ label }}
</option>
</select>
</div>
<h4 v-if="workflowDisplayName" class="workflow-name"> <h4 v-if="workflowDisplayName" class="workflow-name">
{{ workflowDisplayName }} {{ workflowDisplayName }}
</h4> </h4>
@ -178,10 +174,7 @@ export default {
async created() { async created() {
this.readSettings(); this.readSettings();
this.workflowOptions = await this.readThingProperty( this.workflowOptions = await this.readThingProperty("smart_scan", "workflow_display_names");
"smart_scan",
"workflow_display_names",
);
}, },
methods: { methods: {
@ -240,25 +233,18 @@ export default {
} }
}, },
async setWorkflow(name) { async setWorkflow(name) {
try { try {
this.workflowName = name; this.workflowName = name;
await this.writeThingProperty( await this.writeThingProperty("smart_scan", "workflow_name", name);
"smart_scan",
"workflow_name",
name
);
// refresh UI // refresh UI
await this.readSettings(); await this.readSettings();
} catch (err) { } catch (err) {
this.modalError(err); this.modalError(err);
// revert if server rejected // revert if server rejected
this.workflowName = await this.readThingProperty( this.workflowName = await this.readThingProperty("smart_scan", "workflow_name");
"smart_scan",
"workflow_name"
);
} }
}, },
async downloadZipFile(response) { async downloadZipFile(response) {