Enhance content management and user interaction features

- Introduced a new content source toggle in the profile and app header to switch between IndeeHub and TopDoc films.
- Updated the content fetching logic to dynamically load content based on the selected source.
- Enhanced the seeding process to include a combined catalog of IndeeHub and TopDoc films, ensuring diverse content availability.
- Improved user interaction by preventing duplicate reactions and ensuring a smoother voting experience across comments and content.
- Added support for Amber login (NIP-55) for Android users, integrating it into the existing authentication flow.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Dorian
2026-02-12 14:24:52 +00:00
parent ab0560de00
commit 35bc78b890
38 changed files with 1107 additions and 185 deletions

View File

@@ -2,8 +2,10 @@ import { defineStore } from 'pinia'
import { ref } from 'vue'
import type { Content } from '../types/content'
import { indeeHubFilms, bitcoinFilms, documentaries, dramas } from '../data/indeeHubFilms'
import { topDocFilms, topDocBitcoin, topDocCrypto, topDocMoney, topDocEconomics } from '../data/topDocFilms'
import { contentService } from '../services/content.service'
import { mapApiProjectsToContents } from '../utils/mappers'
import { useContentSourceStore } from './contentSource'
const USE_MOCK_DATA = import.meta.env.VITE_USE_MOCK_DATA === 'true' || import.meta.env.DEV
@@ -67,10 +69,9 @@ export const useContentStore = defineStore('content', () => {
}
/**
* Fetch content from mock data
* Fetch IndeeHub mock content (original catalog)
*/
function fetchContentFromMock() {
// Set featured content immediately - God Bless Bitcoin
function fetchIndeeHubMock() {
const godBlessBitcoin = bitcoinFilms.find(f => f.title === 'God Bless Bitcoin') || bitcoinFilms[0]
if (godBlessBitcoin) {
featuredContent.value = {
@@ -81,7 +82,6 @@ export const useContentStore = defineStore('content', () => {
featuredContent.value = indeeHubFilms[0]
}
// Organize content into rows
contentRows.value = {
featured: indeeHubFilms.slice(0, 10),
newReleases: indeeHubFilms.slice(0, 8).reverse(),
@@ -94,6 +94,34 @@ export const useContentStore = defineStore('content', () => {
}
}
/**
* Fetch TopDocumentaryFilms mock content
*/
function fetchTopDocMock() {
featuredContent.value = topDocFilms[0]
contentRows.value = {
featured: topDocFilms.slice(0, 10),
newReleases: [...topDocFilms].sort((a, b) => (b.releaseYear ?? 0) - (a.releaseYear ?? 0)).slice(0, 8),
bitcoin: topDocBitcoin,
documentaries: topDocEconomics.slice(0, 10),
dramas: topDocMoney,
independent: topDocCrypto.slice(0, 10)
}
}
/**
* Route to the correct mock loader based on the active content source
*/
function fetchContentFromMock() {
const sourceStore = useContentSourceStore()
if (sourceStore.activeSource === 'topdocfilms') {
fetchTopDocMock()
} else {
fetchIndeeHubMock()
}
}
/**
* Main fetch content method
*/