Don't show workflow name if it's only one (#1319)

Regression of #1304.

If there's only one workflow, don't make it collapsible and don't show the name of it.
This commit is contained in:
qwerty287 2022-10-22 17:57:14 +02:00 committed by GitHub
parent a6f3746c52
commit 27585d42b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,6 +62,7 @@
</div> </div>
</div> </div>
<button <button
v-if="pipeline.procs && pipeline.procs.length > 1"
type="button" type="button"
class="flex items-center py-2 pl-1 hover:bg-black hover:bg-opacity-10 dark:hover:bg-white dark:hover:bg-opacity-5 rounded-md" class="flex items-center py-2 pl-1 hover:bg-black hover:bg-opacity-10 dark:hover:bg-white dark:hover:bg-opacity-5 rounded-md"
@click="procsCollapsed[proc.id] = !!!procsCollapsed[proc.id]" @click="procsCollapsed[proc.id] = !!!procsCollapsed[proc.id]"
@ -75,16 +76,22 @@
</button> </button>
</div> </div>
<div <div
class="transition-height duration-150 overflow-hidden ml-6" class="transition-height duration-150 overflow-hidden"
:class="{ 'max-h-screen': !procsCollapsed[proc.id], 'max-h-0': procsCollapsed[proc.id] }" :class="{
'max-h-screen': !procsCollapsed[proc.id],
'max-h-0': procsCollapsed[proc.id],
'ml-6': pipeline.procs && pipeline.procs.length > 1,
}"
> >
<button <button
v-for="job in proc.children" v-for="job in proc.children"
:key="job.pid" :key="job.pid"
type="button" type="button"
class="flex mt-1 p-2 border-2 border-transparent rounded-md items-center hover:bg-black hover:bg-opacity-10 dark:hover:bg-white dark:hover:bg-opacity-5 w-full" class="flex p-2 border-2 border-transparent rounded-md items-center hover:bg-black hover:bg-opacity-10 dark:hover:bg-white dark:hover:bg-opacity-5 w-full"
:class="{ :class="{
'bg-black bg-opacity-10 dark:bg-white dark:bg-opacity-5': selectedProcId && selectedProcId === job.pid, 'bg-black bg-opacity-10 dark:bg-white dark:bg-opacity-5': selectedProcId && selectedProcId === job.pid,
'mt-1':
(pipeline.procs && pipeline.procs.length > 1) || (proc.children && job.pid !== proc.children[0].pid),
}" }"
@click="$emit('update:selected-proc-id', job.pid)" @click="$emit('update:selected-proc-id', job.pid)"
> >