Hide share links table header when no share links are available yet

This commit is contained in:
kolaente 2021-01-08 22:56:19 +01:00
parent fe6d975134
commit 98feedfcd3
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -21,21 +21,22 @@
</div>
</div>
<div class="control">
<button class="button is-success" type="submit">
<button class="button is-primary" type="submit">
Share
</button>
</div>
</div>
</form>
<table class="table is-striped is-hoverable is-fullwidth link-share-list">
<tbody>
<table class="table is-striped is-hoverable is-fullwidth link-share-list" v-if="linkShares.length > 0">
<thead>
<tr>
<th>Link</th>
<th>Shared by</th>
<th>Right</th>
<th>Delete</th>
</tr>
<template v-if="linkShares.length > 0">
</thead>
<tbody>
<tr :key="s.id" v-for="s in linkShares">
<td>
<div class="field has-addons no-input-mobile">
@ -43,7 +44,7 @@
<input :value="getShareLink(s.hash)" class="input" readonly type="text"/>
</div>
<div class="control">
<a @click="copy(getShareLink(s.hash))" class="button is-success noshadow" v-tooltip="'Copy to clipboard'">
<a @click="copy(getShareLink(s.hash))" class="button is-primary noshadow" v-tooltip="'Copy to clipboard'">
<span class="icon">
<icon icon="paste"/>
</span>
@ -75,15 +76,13 @@
</template>
</td>
<td class="actions">
<button @click="() => {linkIdToDelete = s.id; showDeleteModal = true}"
class="button is-danger icon-only">
<button @click="() => {linkIdToDelete = s.id; showDeleteModal = true}" class="button is-danger icon-only">
<span class="icon">
<icon icon="trash-alt"/>
</span>
</button>
</td>
</tr>
</template>
</tbody>
</table>
</div>