Implement select in order to select devices
This commit is contained in:
parent
085623e107
commit
04c9fc8412
1 changed files with 14 additions and 2 deletions
|
@ -7,7 +7,8 @@
|
|||
|
||||
let version: string = '';
|
||||
|
||||
let devices: string[];
|
||||
let devices: string[] = [];
|
||||
let selectedDevice;
|
||||
|
||||
let revancedCliReleases: Map<string, Release> | undefined;
|
||||
let revancedVersions: Array<Array<string>> | undefined;
|
||||
|
@ -31,7 +32,9 @@
|
|||
const getDevices = () => {
|
||||
invoke('get_devices')
|
||||
.then((response: string[]) => {
|
||||
devices = response;
|
||||
devices = response
|
||||
.filter((s) => s.length <= 0)
|
||||
.map((s) => s.split('\t')[0]);
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -133,6 +136,15 @@
|
|||
options={integrationsVersions}
|
||||
bind:selected={selectedIntegrationsVersion}
|
||||
/>
|
||||
|
||||
{#if devices.length > 0}
|
||||
<Select
|
||||
id="devices"
|
||||
defaultText={'Select the target device'}
|
||||
options={devices.map((d) => [d, d])}
|
||||
bind:selected={selectedDevice}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
</main>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue