-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #497: Show Canonical Infohash Group info in the details page
28c0db8 feat: [#279] show canonical infohash group in details page (Jose Celano) eb88095 refactor: [#279] use the canonical infohash instead (Jose Celano) e743c75 refactor: [#279] rename field in TorrentActionCard (Jose Celano) 75712ad chore(deps): update depencencies (Jose Celano) Pull request description: Changes in the UI to make it clear when the infohash of an uploaded torrent changes. ACKs for top commit: josecelano: ACK 28c0db8 Tree-SHA512: b51be07f44a16509a4ea07aa40661e122e088ebcf6dcc5872edbd08349ec3e814f3473af8597a824ccb1871171bc302cd5c24f3f313ad90a5025736f08834fb1
- Loading branch information
Showing
5 changed files
with
243 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<template> | ||
<div id="torrent-description" class="flex flex-col gap-6"> | ||
<div class="flex flex-row items-center justify-between"> | ||
<h2 class="mr-1 text-2xl font-medium text-left text-neutral-content/50"> | ||
Canonical InfoHash Group ({{ torrent.canonical_info_hash_group.length }}) | ||
</h2> | ||
<button | ||
class="flex flex-col items-center justify-center w-10 h-10 duration-200 bg-transparent text-base-content/50 hover:text-base-content rounded-xl" | ||
@click="collapsed = !collapsed" | ||
> | ||
<ChevronDownIcon class="w-6" :class="{ 'rotate-90': collapsed }" /> | ||
</button> | ||
</div> | ||
<template v-if="!collapsed"> | ||
<div class="overflow-x-auto"> | ||
<table class="table w-full table-zebra"> | ||
<!-- head --> | ||
<thead> | ||
<tr> | ||
<th /> | ||
<th>original infohash</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<template v-for="(infohash, index) in torrent.canonical_info_hash_group"> | ||
<tr> | ||
<th>{{ index + 1 }}</th> | ||
<td>{{ infohash }}</td> | ||
<td /> | ||
</tr> | ||
</template> | ||
</tbody> | ||
</table> | ||
</div> | ||
</template> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ChevronDownIcon } from "@heroicons/vue/24/solid"; | ||
import type { PropType } from "vue"; | ||
import type { TorrentResponse } from "torrust-index-types-lib"; | ||
import { ref } from "#imports"; | ||
const collapsed = ref(false); | ||
const props = defineProps({ | ||
torrent: { | ||
type: Object as PropType<TorrentResponse>, | ||
required: true | ||
} | ||
}); | ||
</script> | ||
|
||
<style scoped> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.