1
0
Fork 0
mirror of synced 2024-07-04 22:11:23 +12: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
}
async function confirm() {
export async function confirm() {
loading = true
if (!onConfirm || (await onConfirm()) !== keepOpen) {
hide()

View file

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