Squash merge nostrfeed-ui into main

This commit is contained in:
padreug 2025-10-21 21:31:25 +02:00
parent 5063a3e121
commit cc5e0dbef6
10 changed files with 379 additions and 258 deletions

View file

@ -34,10 +34,10 @@
</div>
</div>
<!-- Main Feed Area - Takes remaining height -->
<div class="flex-1 overflow-hidden">
<!-- Main Feed Area - Takes remaining height with scrolling -->
<div class="flex-1 overflow-y-auto scrollbar-thin scrollbar-thumb-border scrollbar-track-transparent">
<!-- Collapsible Composer -->
<div v-if="showComposer || replyTo" class="border-b bg-background">
<div v-if="showComposer || replyTo" class="border-b bg-background sticky top-0 z-10">
<div class="max-h-[70vh] overflow-y-auto scrollbar-thin scrollbar-thumb-border scrollbar-track-transparent">
<div class="px-4 py-3 sm:px-6">
<!-- Regular Note Composer -->
@ -59,8 +59,8 @@
</div>
</div>
<!-- Feed Content - Full height scroll -->
<div class="h-full">
<!-- Feed Content - Natural flow with padding for sticky elements -->
<div>
<NostrFeed
:feed-type="feedType"
:content-filters="selectedFilters"
@ -166,9 +166,7 @@ const replyTo = ref<ReplyToNote | undefined>()
// Quick filter presets for mobile bottom bar
const quickFilterPresets = {
all: { label: 'All', filters: FILTER_PRESETS.all },
announcements: { label: 'News', filters: FILTER_PRESETS.announcements },
social: { label: 'Social', filters: FILTER_PRESETS.social },
events: { label: 'Events', filters: FILTER_PRESETS.events },
announcements: { label: 'Announcements', filters: FILTER_PRESETS.announcements },
rideshare: { label: 'Rideshare', filters: FILTER_PRESETS.rideshare }
}
@ -187,7 +185,7 @@ const isPresetActive = (presetKey: string) => {
const feedType = computed(() => {
if (selectedFilters.value.length === 0) return 'all'
// Check if it matches the 'all' preset - if so, use 'all' feed type for simple filtering
// Check if it matches the 'all' preset
if (selectedFilters.value.length === FILTER_PRESETS.all.length &&
FILTER_PRESETS.all.every(pf => selectedFilters.value.some(sf => sf.id === pf.id))) {
return 'all'
@ -199,6 +197,12 @@ const feedType = computed(() => {
return 'announcements'
}
// Check if it matches the rideshare preset
if (selectedFilters.value.length === FILTER_PRESETS.rideshare.length &&
FILTER_PRESETS.rideshare.every(pf => selectedFilters.value.some(sf => sf.id === pf.id))) {
return 'rideshare'
}
// For all other cases, use custom
return 'custom'
})