|
| 1 | +<template> |
| 2 | + <div class="flex flex-col w-full overflow-hidden rounded-lg border-base-content/20 rounded-2xl grow"> |
| 3 | + <div class="flex flex-col overflow-x-auto whitespace-nowrap"> |
| 4 | + <table class="text-center table-auto bg-base-200 "> |
| 5 | + <thead> |
| 6 | + <tr class="text-sm text-base-content/75"> |
| 7 | + <th class="py-2 pl-6"> |
| 8 | + Username |
| 9 | + </th> |
| 10 | + <th class="py-2 pl-6"> |
| 11 | + Email |
| 12 | + </th> |
| 13 | + </tr> |
| 14 | + </thead> |
| 15 | + <tbody> |
| 16 | + <tr v-for="userProfile in userProfiles" class="text-sm bg-base-100"> |
| 17 | + <td class="py-2 pl-6 "> |
| 18 | + {{ userProfile.username }} |
| 19 | + </td> |
| 20 | + <td class="py-2 pl-6 "> |
| 21 | + {{ userProfile.email }} |
| 22 | + </td> |
| 23 | + </tr> |
| 24 | + </tbody> |
| 25 | + </table> |
| 26 | + </div> |
| 27 | + </div> |
| 28 | +</template> |
| 29 | + |
| 30 | +<!-- <template> |
| 31 | + <div class="flex flex-col max-w-md gap-2 mx-auto"> |
| 32 | + <div class="flex flex-col gap-2"> |
| 33 | + <template v-for="userProfile in userProfiles"> |
| 34 | + <div class="flex justify-between p-2 rounded bg-base-100"> |
| 35 | + <span class="text-base-content">{{ userProfile.username }} ({{ userProfile.email }})</span> |
| 36 | + </div> |
| 37 | + </template> |
| 38 | + </div> |
| 39 | + </div> |
| 40 | +</template> --> |
| 41 | + |
| 42 | +<script setup lang="ts"> |
| 43 | +import type { TorrentListing, UserProfile } from "torrust-index-types-lib"; |
| 44 | +
|
| 45 | +/* import { ArrowDownTrayIcon, LinkIcon, EyeIcon } from "@heroicons/vue/24/outline"; |
| 46 | +import { type PropType, watch } from "vue"; |
| 47 | +import type { TorrentListing } from "torrust-index-types-lib"; |
| 48 | +import { fileSizeDecimal, fileSizeBinary, timeSince, ref, downloadTorrent } from "#imports"; |
| 49 | +
|
| 50 | +const isOpenList = ref([]); |
| 51 | +
|
| 52 | +watch( |
| 53 | + () => props.torrents, |
| 54 | + (torrents) => { |
| 55 | + isOpenList.value = new Array(torrents.length).fill(false); |
| 56 | + }, |
| 57 | + { immediate: true } |
| 58 | +); |
| 59 | +
|
| 60 | +function toggleOpen (index: number) { |
| 61 | + isOpenList.value[index] = !isOpenList.value[index]; |
| 62 | +} */ |
| 63 | +
|
| 64 | +const props = defineProps({ |
| 65 | + userProfiles: Array as PropType<Array<UserProfile>> |
| 66 | +}); |
| 67 | +</script> |
0 commit comments