diff --git a/src/modules/nostr-feed/components/NostrFeed.vue b/src/modules/nostr-feed/components/NostrFeed.vue
index d453ef1..40f4781 100644
--- a/src/modules/nostr-feed/components/NostrFeed.vue
+++ b/src/modules/nostr-feed/components/NostrFeed.vue
@@ -92,6 +92,44 @@ function isAdminPost(pubkey: string): boolean {
return adminPubkeys.includes(pubkey)
}
+// Check if a post is a rideshare post
+function isRidesharePost(note: any): boolean {
+ // Check for rideshare tags
+ const hasTags = note.tags?.some((tag: string[]) =>
+ tag[0] === 't' && ['rideshare', 'carpool'].includes(tag[1])
+ ) || false
+
+ // Check for rideshare-specific custom tags
+ const hasRideshareTypeTags = note.tags?.some((tag: string[]) =>
+ tag[0] === 'rideshare_type' && ['offering', 'seeking'].includes(tag[1])
+ ) || false
+
+ // Check content for rideshare keywords (fallback)
+ const hasRideshareContent = note.content && (
+ note.content.includes('š OFFERING RIDE') ||
+ note.content.includes('š¶ SEEKING RIDE') ||
+ note.content.includes('#rideshare') ||
+ note.content.includes('#carpool')
+ )
+
+ return hasTags || hasRideshareTypeTags || hasRideshareContent
+}
+
+// Get rideshare type from post
+function getRideshareType(note: any): string | null {
+ // Check custom tags first
+ const typeTag = note.tags?.find((tag: string[]) => tag[0] === 'rideshare_type')
+ if (typeTag) {
+ return typeTag[1] === 'offering' ? 'Offering Ride' : 'Seeking Ride'
+ }
+
+ // Fallback to content analysis
+ if (note.content?.includes('š OFFERING RIDE')) return 'Offering Ride'
+ if (note.content?.includes('š¶ SEEKING RIDE')) return 'Seeking Ride'
+
+ return 'Rideshare'
+}
+
// Get market product data for market events
function getMarketProductData(note: any) {
if (note.kind === 30018) {
@@ -281,6 +319,13 @@ async function onToggleLike(note: any) {
>
{{ getMarketEventType({ kind: note.kind }) }}
+
+ š {{ getRideshareType(note) }}
+ {{ getDisplayName(note.pubkey) }}
diff --git a/src/modules/nostr-feed/components/RideshareComposer.vue b/src/modules/nostr-feed/components/RideshareComposer.vue
new file mode 100644
index 0000000..9d6ed4a
--- /dev/null
+++ b/src/modules/nostr-feed/components/RideshareComposer.vue
@@ -0,0 +1,447 @@
+
+
+
+
+
+
+ Create Rideshare Post
+
+
+
+
+ Share or find rides with the community
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/Home.vue b/src/pages/Home.vue
index f394312..5053749 100644
--- a/src/pages/Home.vue
+++ b/src/pages/Home.vue
@@ -36,15 +36,24 @@
-
+
+
+
+
+
@@ -61,15 +70,44 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
+
@@ -97,10 +135,11 @@
// import NotificationPermission from '@/components/notifications/NotificationPermission.vue'
import { ref, computed, watch } from 'vue'
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
-import { Filter, Plus } from 'lucide-vue-next'
+import { Filter, Plus, MessageSquare, Car } from 'lucide-vue-next'
import PWAInstallPrompt from '@/components/pwa/PWAInstallPrompt.vue'
import FeedFilters from '@/modules/nostr-feed/components/FeedFilters.vue'
import NoteComposer from '@/modules/nostr-feed/components/NoteComposer.vue'
+import RideshareComposer from '@/modules/nostr-feed/components/RideshareComposer.vue'
import NostrFeed from '@/modules/nostr-feed/components/NostrFeed.vue'
import { FILTER_PRESETS } from '@/modules/nostr-feed/config/content-filters'
import appConfig from '@/app.config'
@@ -113,6 +152,8 @@ const adminPubkeys = appConfig.modules['nostr-feed']?.config?.adminPubkeys || []
// UI state
const showFilters = ref(false)
const showComposer = ref(false)
+const showComposerOptions = ref(false)
+const composerType = ref<'note' | 'rideshare'>('note')
// Feed configuration
const selectedFilters = ref(FILTER_PRESETS.all)
@@ -191,6 +232,27 @@ const onReplyToNote = (note: ReplyToNote) => {
const onCloseComposer = () => {
showComposer.value = false
+ showComposerOptions.value = false
replyTo.value = undefined
}
+
+// New composer methods
+const toggleComposerOptions = () => {
+ showComposerOptions.value = !showComposerOptions.value
+}
+
+const openComposer = (type: 'note' | 'rideshare') => {
+ composerType.value = type
+ showComposer.value = true
+ showComposerOptions.value = false
+}
+
+const onRidesharePublished = (noteId: string) => {
+ console.log('Rideshare post published:', noteId)
+ // Refresh the feed to show the new rideshare post
+ feedKey.value++
+ // Hide composer
+ showComposer.value = false
+ showComposerOptions.value = false
+}