fix: only visible with publicrepo

This commit is contained in:
Andras Bacsai 2022-11-29 13:13:04 +01:00
parent 876c81fad8
commit ffdc158d44

View File

@ -475,7 +475,7 @@
</script> </script>
<div class="w-full"> <div class="w-full">
<form on:submit|preventDefault={() => handleSubmit()}> <form id="saveForm" on:submit|preventDefault={() => handleSubmit()}>
<div class="mx-auto w-full"> <div class="mx-auto w-full">
<div class="flex flex-row border-b border-coolgray-500 mb-6 space-x-2"> <div class="flex flex-row border-b border-coolgray-500 mb-6 space-x-2">
<div class="title font-bold pb-3">General</div> <div class="title font-bold pb-3">General</div>
@ -515,31 +515,40 @@
> >
{/if} {/if}
</div> </div>
<div class="grid grid-cols-2 items-center"> {#if application.settings.isPublicRepository}
<label for="repository">Git commit</label> <div class="grid grid-cols-2 items-center">
<div class="flex gap-2"> <label for="repository">Git commit</label>
<input <div class="flex gap-2">
class="w-full" <input
disabled={isDisabled} class="w-full"
placeholder="default: latest commit" disabled={isDisabled}
bind:value={application.gitCommitHash} placeholder="default: latest commit"
/> bind:value={application.gitCommitHash}
<a href={application.gitSource.htmlUrl}/{application.repository}/commits/{application.branch} target="_blank" rel="noreferrer" class="btn btn-primary text-xs" >Commits<svg
xmlns="http://www.w3.org/2000/svg"
fill="currentColor"
viewBox="0 0 24 24"
stroke-width="3"
stroke="currentColor"
class="w-3 h-3 text-white ml-2"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"
/> />
</svg></a> <a
href="{application.gitSource
.htmlUrl}/{application.repository}/commits/{application.branch}"
target="_blank"
rel="noreferrer"
class="btn btn-primary text-xs"
>Commits<svg
xmlns="http://www.w3.org/2000/svg"
fill="currentColor"
viewBox="0 0 24 24"
stroke-width="3"
stroke="currentColor"
class="w-3 h-3 text-white ml-2"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"
/>
</svg></a
>
</div>
</div> </div>
</div> {/if}
<div class="grid grid-cols-2 items-center"> <div class="grid grid-cols-2 items-center">
<label for="repository">{$t('application.git_repository')}</label> <label for="repository">{$t('application.git_repository')}</label>
{#if isDisabled || application.settings.isPublicRepository} {#if isDisabled || application.settings.isPublicRepository}
@ -1018,6 +1027,7 @@
placeholder="default: /Dockerfile" placeholder="default: /Dockerfile"
/> />
{#if application.baseDirectory} {#if application.baseDirectory}
<!-- svelte-ignore a11y-label-has-associated-control -->
<label class="label"> <label class="label">
<span class="label-text-alt text-xs" <span class="label-text-alt text-xs"
>Path: {application.baseDirectory.replace( >Path: {application.baseDirectory.replace(