hide summit log photos col if no photos

This commit is contained in:
Christian Beutel
2024-12-02 18:49:32 +01:00
parent abe7ffbed7
commit dbc21cc742
2 changed files with 3 additions and 3 deletions

View File

@@ -54,7 +54,7 @@
<table class="w-full"> <table class="w-full">
<thead class="text-left text-gray-500"> <thead class="text-left text-gray-500">
<tr class="text-sm"> <tr class="text-sm">
{#if showPhotos} {#if showPhotos && summitLogs.some(l => l.photos.length)}
<th class="w-24"></th> <th class="w-24"></th>
{/if} {/if}
<th>{$_("date")}</th> <th>{$_("date")}</th>
@@ -96,7 +96,7 @@
{showCategory} {showCategory}
{showTrail} {showTrail}
{showAuthor} {showAuthor}
{showPhotos} showPhotos={showPhotos && summitLogs.some(l => l.photos.length)}
showDescription={summitLogs.some(l => l.text?.length)} showDescription={summitLogs.some(l => l.text?.length)}
showRoute={showRoute && summitLogs.some((l) => l.gpx)} showRoute={showRoute && summitLogs.some((l) => l.gpx)}
></SummitLogTableRow> ></SummitLogTableRow>

View File

@@ -164,6 +164,6 @@
<style> <style>
td { td {
padding: 0rem 0.5rem; padding: 0.3rem 0.5rem;
} }
</style> </style>