diff --git a/.gitignore b/.gitignore index 3618abae..fb865be0 100644 --- a/.gitignore +++ b/.gitignore @@ -59,3 +59,6 @@ documentation/ # Test output coverage/ .vitest/ + +# Upload CLI, bundled at build (scripts/build-cli.mjs) +public/tools/trackarr-upload.mjs diff --git a/README.md b/README.md index 39a9052a..21c6bf24 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ Built with Nuxt 4 • Rust • PostgreSQL • Redis | Forum, comments, reports, invitations, H&R | UI in 8 languages (EN, FR, ES, DE, IT, ZH, JA, RU) | | Private messages between members, with blocks | Light & dark themes, ⌘K command palette | | Paid sign-up in Bitcoin, Monero or Solana | On-chain payment checks, no processor, no spend key | +| Upload assistant: .torrent, MediaInfo, screens, BBCode | Web or CLI, one file or folder in, published torrent out | | **Security** | **Emergency** | | -------------------------------- | -------------------------------------------- | diff --git a/app/components/EditTorrentModal.vue b/app/components/EditTorrentModal.vue index b0d8dbaa..e4ec9af9 100644 --- a/app/components/EditTorrentModal.vue +++ b/app/components/EditTorrentModal.vue @@ -267,7 +267,7 @@ const error = ref(null); const { data: categories } = await useFetch('/api/categories'); const renderedDescription = computed(() => { - return renderMarkdown(description.value); + return renderDescription(description.value); }); // Initialize form data when torrent prop changes diff --git a/app/components/StepLine.vue b/app/components/StepLine.vue new file mode 100644 index 00000000..ee5a857a --- /dev/null +++ b/app/components/StepLine.vue @@ -0,0 +1,46 @@ + + + diff --git a/app/components/UploadTorrentModal.vue b/app/components/UploadTorrentModal.vue index fd2e6861..23390c3e 100644 --- a/app/components/UploadTorrentModal.vue +++ b/app/components/UploadTorrentModal.vue @@ -20,6 +20,13 @@ {{ t('upload.title') }} + + {{ t('assistant.entry') }} + diff --git a/app/pages/torrents/[hash].vue b/app/pages/torrents/[hash].vue index 0c8390df..cc3635ef 100644 --- a/app/pages/torrents/[hash].vue +++ b/app/pages/torrents/[hash].vue @@ -307,7 +307,7 @@ const externalLinks = computed(() => { return links; }); -const renderedDescription = computed(() => renderMarkdown(torrent.value?.description)); +const renderedDescription = computed(() => renderDescription(torrent.value?.description)); async function copyHash() { await navigator.clipboard.writeText(torrent.value!.infoHash).catch(() => {}); @@ -406,4 +406,35 @@ async function deleteTorrent() { border-left: 2px solid rgb(var(--line-strong)); padding-left: 0.75rem; } +/* BBCode: screenshots side by side, spoilers, MediaInfo report */ +.description-content :deep(a > img) { + display: inline-block; + margin: 0.25rem; + vertical-align: middle; +} +.description-content :deep(details) { + margin-bottom: 0.75rem; + border: 1px solid rgb(var(--line)); + border-radius: 4px; + padding: 0.5rem 0.75rem; +} +.description-content :deep(summary) { + cursor: pointer; + font-weight: 600; + color: rgb(var(--ink)); +} +.description-content :deep(details[open] > summary) { + margin-bottom: 0.5rem; +} +.description-content :deep(pre) { + overflow-x: auto; + white-space: pre; + font-size: 0.8em; + line-height: 1.4; +} +.description-content :deep(cite) { + display: block; + font-style: normal; + font-weight: 600; +} diff --git a/app/pages/upload/assistant.vue b/app/pages/upload/assistant.vue new file mode 100644 index 00000000..fa422afe --- /dev/null +++ b/app/pages/upload/assistant.vue @@ -0,0 +1,608 @@ +