Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delay activation of manual device select button #2611

Merged
merged 1 commit into from May 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/ui/views/WaitForDevice.svelte
Expand Up @@ -8,13 +8,15 @@
showSelectDeviceModal
} from "../../stores.mjs";

let initialized = false;
ipcRenderer.on("device:wait:device-selects-ready", (event, deviceSelects) => {
footerData.set({
topText: "Waiting for device",
underText: "Please connect your device with a USB cable",
waitingDots: true
});
deviceSelectOptions.set(deviceSelects);
initialized = true;
});
</script>

Expand Down Expand Up @@ -49,10 +51,15 @@
</p>
<button
id="btn-modal-select-device"
disabled={!initialized}
class="btn btn-outline-dark"
on:click={() => showSelectDeviceModal.set(true)}
>
Select device manually
{#if initialized}
Select device manually
{:else}
Loading device list...
{/if}
</button>
</div>
</div>
Expand Down