smaller fixes

This commit is contained in:
Andras Bacsai
2022-07-25 20:12:29 +00:00
parent adb60ad8d7
commit 26122bf985
5 changed files with 40 additions and 39 deletions

View File

@@ -153,7 +153,8 @@
> >
<input <input
value={database.version} value={database.version}
disabled={$status.database.isRunning || $status.service.initialLoading} readonly
disabled={$status.database.isRunning || $status.database.initialLoading}
class:cursor-pointer={!$status.database.isRunning} class:cursor-pointer={!$status.database.isRunning}
/></a /></a
> >

View File

@@ -239,7 +239,6 @@
><input ><input
value={destination.sshKey.name} value={destination.sshKey.name}
id="sshKey" id="sshKey"
disabled
class="cursor-pointer hover:bg-coolgray-500" class="cursor-pointer hover:bg-coolgray-500"
/></a /></a
> >

View File

@@ -198,6 +198,7 @@
<input <input
value={service.version} value={service.version}
id="service" id="service"
readonly
disabled={$status.service.isRunning || $status.service.initialLoading} disabled={$status.service.isRunning || $status.service.initialLoading}
class:cursor-pointer={!$status.service.isRunning} class:cursor-pointer={!$status.service.isRunning}
/></a /></a

View File

@@ -66,11 +66,7 @@
}); });
const { organization, htmlUrl } = source; const { organization, htmlUrl } = source;
const { fqdn } = settings; const { fqdn } = settings;
const host = dev const host = dev ? getAPIUrl() : fqdn ? fqdn : `http://${window.location.host}` || '';
? getAPIUrl()
: fqdn
? fqdn
: `http://${window.location.host}` || '';
const domain = getDomain(fqdn); const domain = getDomain(fqdn);
let url = 'settings/apps/new'; let url = 'settings/apps/new';
@@ -80,9 +76,7 @@
name: `coolify-${name}`, name: `coolify-${name}`,
url: host, url: host,
hook_attributes: { hook_attributes: {
url: dev url: dev ? getWebhookUrl('github') : `${host}/webhooks/github/events`
? getWebhookUrl('github')
: `${host}/webhooks/github/events`
}, },
redirect_url: `${host}/webhooks/github`, redirect_url: `${host}/webhooks/github`,
callback_urls: [`${host}/login/github/app`], callback_urls: [`${host}/login/github/app`],
@@ -218,8 +212,11 @@
bind:value={source.apiUrl} bind:value={source.apiUrl}
/> />
</div> </div>
{#if selfHosted}
<div class="grid grid-cols-2 items-center"> <div class="grid grid-cols-2 items-center">
<label for="customPort" class="text-base font-bold text-stone-100">Custom SSH Port</label> <label for="customPort" class="text-base font-bold text-stone-100"
>Custom SSH Port</label
>
<input <input
name="customPort" name="customPort"
id="customPort" id="customPort"
@@ -232,6 +229,7 @@
text="If you use a self-hosted version of Git, you can provide custom port for all the Git related actions." text="If you use a self-hosted version of Git, you can provide custom port for all the Git related actions."
/> />
</div> </div>
{/if}
<div class="grid grid-cols-2"> <div class="grid grid-cols-2">
<div class="flex flex-col"> <div class="flex flex-col">
<label for="organization" class="pt-2 text-base font-bold text-stone-100" <label for="organization" class="pt-2 text-base font-bold text-stone-100"

View File

@@ -31,7 +31,7 @@
appSecret: null appSecret: null
}; };
} }
$: selfHosted = source.htmlUrl !== 'https://gitlab.com' ; $: selfHosted = source.htmlUrl !== 'https://gitlab.com';
onMount(() => { onMount(() => {
oauthIdEl && oauthIdEl.focus(); oauthIdEl && oauthIdEl.focus();
@@ -228,6 +228,7 @@
bind:value={source.apiUrl} bind:value={source.apiUrl}
/> />
</div> </div>
{#if selfHosted}
<div class="grid grid-cols-2 items-center"> <div class="grid grid-cols-2 items-center">
<label for="customPort" class="text-base font-bold text-stone-100">Custom SSH Port</label> <label for="customPort" class="text-base font-bold text-stone-100">Custom SSH Port</label>
<input <input
@@ -242,6 +243,7 @@
text="If you use a self-hosted version of Git, you can provide custom port for all the Git related actions." text="If you use a self-hosted version of Git, you can provide custom port for all the Git related actions."
/> />
</div> </div>
{/if}
<div class="grid grid-cols-2 items-start"> <div class="grid grid-cols-2 items-start">
<div class="flex-col"> <div class="flex-col">
<label for="oauthId" class="pt-2 text-base font-bold text-stone-100" <label for="oauthId" class="pt-2 text-base font-bold text-stone-100"