This commit is contained in:
jarek committed 2026-01-14 08:18:20 +01:00
1 parent 027aee434c
commit 62636426bf
15 files changed
+317 -65

No files matched your search

+1 -4
View File
@@ -1724,7 +1724,7 @@
<!-- Clickable ports (dedupe by publicPort for IPv4/IPv6) -->
{#if container.ports.length > 0}
{@const uniquePorts = container.ports.filter((p, i, arr) => p.publicPort && arr.findIndex(x => x.publicPort === p.publicPort) === i)}
{#each uniquePorts.slice(0, 2) as port}
{#each uniquePorts as port}
{@const url = getPortUrl(port.publicPort)}
{#if url}
<a
@@ -1744,9 +1744,6 @@
</span>
{/if}
{/each}
{#if uniquePorts.length > 2}
<span class="text-muted-foreground">+{uniquePorts.length - 2}</span>
{/if}
{/if}
<!-- Network with IP -->
{#if container.networks.length > 0}
+8 -1
View File
@@ -88,6 +88,9 @@
let formError = $state('');
let formSaving = $state(false);
let errors = $state<{ stackName?: string; repository?: string; repoName?: string; repoUrl?: string }>({});
// Stack name validation: must start with alphanumeric, can contain alphanumeric, hyphens, underscores
const STACK_NAME_REGEX = /^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;
let copiedWebhookUrl = $state(false);
let copiedWebhookSecret = $state(false);
@@ -309,9 +312,13 @@
errors = {};
let hasErrors = false;
if (!formStackName.trim()) {
const trimmedStackName = formStackName.trim();
if (!trimmedStackName) {
errors.stackName = 'Stack name is required';
hasErrors = true;
} else if (!STACK_NAME_REGEX.test(trimmedStackName)) {
errors.stackName = 'Stack name must start with a letter or number, and contain only letters, numbers, hyphens, and underscores';
hasErrors = true;
}
if (formRepoMode === 'existing' && !formRepositoryId) {