Skip to content

Commit 1d99c2a

Browse files
committed
fix: download torrent button is always shown
even when it has to be hidden. For example, when the tracker is private and the user is not logged in.
1 parent f91d257 commit 1d99c2a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/torrent/TorrentActionCard.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
<div />
100100

101101
<div class="flex flex-row gap-3">
102-
<template v-if="showDownloadButtons">
102+
<template v-if="showDownloadButtons()">
103103
<button class="btn btn-primary grow" data-cy="torrent-action-download" @click="downloadTorrent(torrent.info_hash, torrent.name)">
104104
download torrent
105105
</button>
@@ -178,7 +178,7 @@ function hasEditRights (): boolean {
178178
return canEditThisTorrent(props.torrent);
179179
}
180180
181-
function showDownloadButtons () {
181+
function showDownloadButtons (): boolean {
182182
return isUserLoggedIn() || isTrackerPublic();
183183
}
184184

0 commit comments

Comments
 (0)