Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: revert link removed in torrent list to torrent details #554

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion components/torrent/TorrentList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@
</div>
<template v-if="isOpenList[index]">
<div class="flex flex-row items-start justify-start w-full px-4 pt-2 pb-4 duration-1000 flex-nowrap">
<TorrentListTorrentDetails :description="torrent.description" />
<TorrentListTorrentDetails
:info-hash="torrent.info_hash"
:title="torrent.title"
:description="torrent.description"
/>
</div>
</template>
</a>
Expand Down
12 changes: 12 additions & 0 deletions components/torrent/TorrentListTorrentDetails.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<div
class="flex flex-col items-center w-full group/details rounded-2xl"
@click.stop="$router.push(`/torrent/${props.infoHash}/${slug}`)"
>
<div class="flex justify-center w-full p-4 overflow-y-auto duration-500 border-2 max-h-96 border-base-content/20 hover:border-primary text-base-content/75 rounded-2xl">
<template v-if="description !== null">
Expand All @@ -14,14 +15,25 @@
</template>

<script setup lang="ts">
import { generateSlug } from "~/src/domain/services/slug";

const props = defineProps({
infoHash: {
type: String,
required: true
},
title: {
type: String,
required: true
},
description: {
type: String,
required: true
}
});

const slug = computed(() => generateSlug(props.title));

</script>

<style scoped>
Expand Down