fix: dashboard for non-root users

This commit is contained in:
Andras Bacsai 2022-08-23 10:19:57 +02:00
parent f6314cab69
commit bf5659d0e2
7 changed files with 14 additions and 9 deletions

View File

@ -64,7 +64,7 @@
</button> </button>
{/if} {/if}
</div> </div>
<div class="flex-col justify-center"> <div class="flex-col justify-center mt-10 pb-12 sm:pb-16">
{#if !applications || ownApplications.length === 0} {#if !applications || ownApplications.length === 0}
<div class="flex-col"> <div class="flex-col">
<div class="text-center text-xl font-bold">{$t('application.no_applications_found')}</div> <div class="text-center text-xl font-bold">{$t('application.no_applications_found')}</div>

View File

@ -61,7 +61,7 @@
</button> </button>
</div> </div>
<div class="flex-col justify-center"> <div class="flex-col justify-center mt-10 pb-12 sm:pb-16">
{#if !databases || ownDatabases.length === 0} {#if !databases || ownDatabases.length === 0}
<div class="flex-col"> <div class="flex-col">
<div class="text-center text-xl font-bold">{$t('database.no_databases_found')}</div> <div class="text-center text-xl font-bold">{$t('database.no_databases_found')}</div>

View File

@ -56,7 +56,7 @@
</a> </a>
{/if} {/if}
</div> </div>
<div class="flex-col justify-center"> <div class="flex-col justify-center mt-10 pb-12 sm:pb-16">
{#if !destinations || ownDestinations.length === 0} {#if !destinations || ownDestinations.length === 0}
<div class="flex-col"> <div class="flex-col">
<div class="text-center text-xl font-bold">{$t('destination.no_destination_found')}</div> <div class="text-center text-xl font-bold">{$t('destination.no_destination_found')}</div>

View File

@ -212,6 +212,7 @@
<div class="flex items-center justify-center pt-3"> <div class="flex items-center justify-center pt-3">
<button <button
on:click|preventDefault={() => switchTeam(team.id)} on:click|preventDefault={() => switchTeam(team.id)}
class="btn btn-sm"
class:bg-fuchsia-600={$appSession.teamId !== team.id} class:bg-fuchsia-600={$appSession.teamId !== team.id}
class:hover:bg-fuchsia-500={$appSession.teamId !== team.id} class:hover:bg-fuchsia-500={$appSession.teamId !== team.id}
class:bg-transparent={$appSession.teamId === team.id} class:bg-transparent={$appSession.teamId === team.id}

View File

@ -93,11 +93,13 @@
<div class="flex space-x-1 p-6 font-bold"> <div class="flex space-x-1 p-6 font-bold">
<div class="mr-4 text-2xl tracking-tight">{$t('index.dashboard')}</div> <div class="mr-4 text-2xl tracking-tight">{$t('index.dashboard')}</div>
<button on:click={manuallyCleanupStorage} class:loading={loading.cleanup} class="btn btn-sm" {#if $appSession.teamId === '0'}
>Cleanup Storage</button <button on:click={manuallyCleanupStorage} class:loading={loading.cleanup} class="btn btn-sm"
> >Cleanup Storage</button
>
{/if}
</div> </div>
<div class="mt-10 pb-12 tracking-tight sm:pb-16"> <div class="mt-10 pb-12 sm:pb-16">
<div class="mx-auto px-10"> <div class="mx-auto px-10">
<div class="flex flex-col justify-center xl:flex-row"> <div class="flex flex-col justify-center xl:flex-row">
{#if applications.length > 0} {#if applications.length > 0}
@ -341,6 +343,8 @@
</table> </table>
</div> </div>
</div> </div>
{:else}
<div class="text-center text-xl font-bold">Nothing is configured yet.</div>
{/if} {/if}
{#if $appSession.teamId === '0'} {#if $appSession.teamId === '0'}
<Usage /> <Usage />

View File

@ -62,7 +62,7 @@
</button> </button>
</div> </div>
<div class="flex-col justify-center"> <div class="flex-col justify-center mt-10 pb-12 sm:pb-16">
{#if !services || ownServices.length === 0} {#if !services || ownServices.length === 0}
<div class="flex-col"> <div class="flex-col">
<div class="text-center text-xl font-bold">{$t('service.no_service')}</div> <div class="text-center text-xl font-bold">{$t('service.no_service')}</div>

View File

@ -56,7 +56,7 @@
</a> </a>
{/if} {/if}
</div> </div>
<div class="flex-col justify-center"> <div class="flex-col justify-center mt-10 pb-12 sm:pb-16">
{#if !sources || ownSources.length === 0} {#if !sources || ownSources.length === 0}
<div class="flex-col"> <div class="flex-col">
<div class="text-center text-xl font-bold">{$t('source.no_git_sources_found')}</div> <div class="text-center text-xl font-bold">{$t('source.no_git_sources_found')}</div>