Skip to content

Commit

Permalink
Reinstate device refresh #312
Browse files Browse the repository at this point in the history
  • Loading branch information
sbs20 committed Jul 4, 2021
1 parent 0262ddc commit c427078
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions packages/client/src/components/Scan.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
<v-spacer/>

<v-col cols="12" md="3" class="mb-10 mb-md-0">
<v-select v-if="context.devices.length > 0"
:label="$t('scan.device')" v-model="device"
:items="context.devices" return-object item-text="name" @change="clear"></v-select>
<div class="d-flex">
<v-select style="min-width: 0px;"
v-if="context.devices.length > 0"
:label="$t('scan.device')" v-model="device"
:items="context.devices" return-object item-text="name" @change="clear"></v-select>
<v-btn class="ml-2 mt-4 pl-1 pr-1" min-width="32" @click="deviceRefresh"><v-icon>mdi-refresh</v-icon></v-btn>
</div>

<v-select v-if="'--source' in device.features"
:label="$t('scan.source')" v-model="request.params.source"
Expand Down Expand Up @@ -443,6 +447,14 @@ export default {
});
},
deviceRefresh() {
this._fetch('context', {
method: 'DELETE'
}).then(() => {
this.readContext();
});
},
readPreview() {
// Gets the preview image as a base64 encoded jpg and updates the UI
this._fetch('preview', {
Expand Down

0 comments on commit c427078

Please sign in to comment.