From 29fa421945c301232147b1fbb7933d3cd3197feb Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 18 Apr 2023 14:46:40 +0200 Subject: [PATCH] feat: add custom version/tag --- apps/ui/src/routes/services/[id]/index.svelte | 31 +++++++------------ 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/apps/ui/src/routes/services/[id]/index.svelte b/apps/ui/src/routes/services/[id]/index.svelte index 97dbbac2a..e08798790 100644 --- a/apps/ui/src/routes/services/[id]/index.svelte +++ b/apps/ui/src/routes/services/[id]/index.svelte @@ -43,6 +43,7 @@ return true; } }); + let customVersion: string; $: isDisabled = !$appSession.isAdmin || $status.service.overallStatus === 'degraded' || @@ -111,6 +112,7 @@ setLocation(service); forceSave = false; $isDeploymentEnabled = checkIfDeploymentEnabledServices(service); + customVersion = null; return addToast({ message: 'Configuration saved.', type: 'success' @@ -196,26 +198,12 @@ async function selectTag(event: any) { service.version = event.detail.value; } + async function setCustomVersion() { + service.version = customVersion; + } onMount(async () => { if (browser && window.location.hostname === 'demo.coolify.io' && !service.fqdn) { service.fqdn = `http://${cuid()}.demo.coolify.io`; - // if (service.type === 'wordpress') { - // service.wordpress.mysqlDatabase = 'db'; - // } - // if (service.type === 'plausibleanalytics') { - // service.plausibleAnalytics.email = 'noreply@demo.com'; - // service.plausibleAnalytics.username = 'admin'; - // } - // if (service.type === 'minio') { - // service.minio.apiFqdn = `http://${cuid()}.demo.coolify.io`; - // } - // if (service.type === 'ghost') { - // service.ghost.mariadbDatabase = 'db'; - // } - // if (service.type === 'fider') { - // service.fider.emailNoreply = 'noreply@demo.com'; - // } - // await handleSubmit(); } }); @@ -224,7 +212,7 @@
-
General
+
General
{#if $appSession.isAdmin}