1
0
Fork 0
mirror of synced 2024-10-04 03:54:37 +13:00

Merge branch 'master' into fix/remove-db-head-requests

This commit is contained in:
Michael Drury 2024-01-11 16:49:06 +00:00 committed by GitHub
commit 649113b622
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 10 deletions

View file

@ -40,7 +40,7 @@
loading = false loading = false
} }
async function confirm() { export async function confirm() {
loading = true loading = true
if (!onConfirm || (await onConfirm()) !== keepOpen) { if (!onConfirm || (await onConfirm()) !== keepOpen) {
hide() hide()

View file

@ -13,6 +13,7 @@
const appPrefix = "/app" const appPrefix = "/app"
let touched = false let touched = false
let error let error
let modal
$: appUrl = screenUrl $: appUrl = screenUrl
? `${window.location.origin}${appPrefix}${screenUrl}` ? `${window.location.origin}${appPrefix}${screenUrl}`
@ -50,6 +51,7 @@
</script> </script>
<ModalContent <ModalContent
bind:this={modal}
size="M" size="M"
title={"Screen details"} title={"Screen details"}
{confirmText} {confirmText}
@ -58,15 +60,17 @@
cancelText={"Back"} cancelText={"Back"}
disabled={!screenUrl || error || !touched} disabled={!screenUrl || error || !touched}
> >
<Input <form on:submit|preventDefault={() => modal.confirm()}>
label="Enter a URL for the new screen" <Input
{error} label="Enter a URL for the new screen"
bind:value={screenUrl} {error}
on:change={routeChanged} bind:value={screenUrl}
/> on:change={routeChanged}
<div class="app-server" title={appUrl}> />
{appUrl} <div class="app-server" title={appUrl}>
</div> {appUrl}
</div>
</form>
</ModalContent> </ModalContent>
<style> <style>