Improve text inputs

This commit is contained in:
Melon 2023-10-27 11:26:48 +01:00
parent 8e27eea6b0
commit 899cf20408
Signed by: melon
GPG Key ID: 6C9D970C50D26A25
4 changed files with 8 additions and 8 deletions

View File

@ -8,8 +8,8 @@
</script>
<tr class="created">
<td><input type="text" class="code-font" bind:value={redirect.src} size={redirect.src.length + 2} /></td>
<td><input type="text" class="code-font" bind:value={redirect.dst} size={redirect.dst.length + 2} /></td>
<td><input type="text" class="code-font" bind:value={redirect.src} size={Math.max(20, redirect.src.length + 2)} /></td>
<td><input type="text" class="code-font" bind:value={redirect.dst} size={Math.max(20, redirect.dst.length + 2)} /></td>
<td><Flags value={redirect.flags} editable keys={redirectKeys} /></td>
<td><input type="checkbox" bind:checked={redirect.active} /></td>
<td>

View File

@ -13,7 +13,7 @@
{#if noCPair(redirect)}
<tr class="deleted">
<td class="code-font"><a href="https://{redirect.server.src}" target="_blank">{redirect.server.src}</a></td>
<td><input type="text" class="code-font" disabled bind:value={redirect.server.dst} size={redirect.server.dst.length + 2} /></td>
<td><input type="text" class="code-font" disabled bind:value={redirect.server.dst} size={Math.max(20, redirect.server.dst.length + 2)} /></td>
<td><Flags value={redirect.server.flags} keys={redirectKeys} /></td>
<td><input type="checkbox" disabled checked={false} /></td>
<td><button on:click={() => resetRedirect()}>Restore</button></td>
@ -21,7 +21,7 @@
{:else}
<tr class:created={noSPair(redirect)} class:modified={!noSPair(redirect) && !redirectEqual(redirect.client, redirect.server)}>
<td class="code-font"><a href="https://{redirect.client.src}" target="_blank">{redirect.client.src}</a></td>
<td><input type="text" class="code-font" bind:value={redirect.client.dst} size={redirect.client.dst.length + 2} /></td>
<td><input type="text" class="code-font" bind:value={redirect.client.dst} size={Math.max(20, redirect.client.dst.length + 2)} /></td>
<td><Flags bind:value={redirect.client.flags} editable keys={redirectKeys} /></td>
<td><input type="checkbox" bind:checked={redirect.client.active} /></td>
<td>

View File

@ -8,8 +8,8 @@
</script>
<tr class="created">
<td><input type="text" class="code-font" bind:value={route.src} size={route.src.length + 2} /></td>
<td><input type="text" class="code-font" bind:value={route.dst} size={route.dst.length + 2} /></td>
<td><input type="text" class="code-font" bind:value={route.src} size={Math.max(20, route.src.length + 2)} /></td>
<td><input type="text" class="code-font" bind:value={route.dst} size={Math.max(20, route.dst.length + 2)} /></td>
<td><Flags value={route.flags} editable keys={routeKeys} /></td>
<td><input type="checkbox" bind:checked={route.active} /></td>
<td>

View File

@ -13,7 +13,7 @@
{#if noCPair(route)}
<tr class="deleted">
<td class="code-font"><a href="https://{route.server.src}" target="_blank">{route.server.src}</a></td>
<td><input type="text" class="code-font" disabled bind:value={route.server.dst} size={route.server.dst.length + 2} /></td>
<td><input type="text" class="code-font" disabled bind:value={route.server.dst} size={Math.max(20, route.server.dst.length + 2)} /></td>
<td><Flags value={route.server.flags} keys={routeKeys} /></td>
<td><input type="checkbox" disabled checked={false} /></td>
<td><button on:click={() => resetRoute()}>Restore</button></td>
@ -21,7 +21,7 @@
{:else}
<tr class:created={noSPair(route)} class:modified={!noSPair(route) && !routeEqual(route.client, route.server)}>
<td class="code-font"><a href="https://{route.client.src}" target="_blank">{route.client.src}</a></td>
<td><input type="text" class="code-font" bind:value={route.client.dst} size={route.client.dst.length + 2} /></td>
<td><input type="text" class="code-font" bind:value={route.client.dst} size={Math.max(20, route.client.dst.length + 2)} /></td>
<td><Flags bind:value={route.client.flags} editable keys={routeKeys} /></td>
<td><input type="checkbox" bind:checked={route.client.active} /></td>
<td>