fix build errors

This commit is contained in:
padreug 2025-09-17 02:29:15 +02:00
parent 8c39ca3599
commit 2a9915a727
7 changed files with 18 additions and 20 deletions

View file

@ -10,7 +10,7 @@ import { useReactions } from '../composables/useReactions'
import appConfig from '@/app.config'
import type { ContentFilter } from '../services/FeedService'
import MarketProduct from './MarketProduct.vue'
import { parseMarketProduct, isMarketEvent, getMarketEventType } from '../utils/marketParser'
import { parseMarketProduct } from '../utils/marketParser'
interface Emits {
(e: 'reply-to-note', note: { id: string; content: string; pubkey: string }): void
@ -140,7 +140,8 @@ function getMarketProductData(note: any) {
content: note.content,
created_at: note.created_at,
kind: note.kind,
tags: note.tags
tags: note.tags,
sig: '' // Required by Event interface
}
return parseMarketProduct(mockEvent)
}
@ -313,11 +314,11 @@ async function onToggleLike(note: any) {
Reply
</Badge>
<Badge
v-if="isMarketEvent({ kind: note.kind })"
v-if="note.kind === 30018"
variant="outline"
class="text-xs px-1.5 py-0.5"
>
{{ getMarketEventType({ kind: note.kind }) }}
Market Product
</Badge>
<Badge
v-if="isRidesharePost(note)"

View file

@ -164,8 +164,8 @@ const props = defineProps<Props>()
const emit = defineEmits<Emits>()
// Services
const relayHub = injectService(SERVICE_TOKENS.RELAY_HUB)
const authService = injectService(SERVICE_TOKENS.AUTH_SERVICE)
const relayHub = injectService(SERVICE_TOKENS.RELAY_HUB) as any
const authService = injectService(SERVICE_TOKENS.AUTH_SERVICE) as any
const toast = useToast()
// Form state
@ -193,7 +193,7 @@ const form = useForm({
const { values, meta, resetForm, setFieldValue } = form
// Computed properties
const isFormValid = computed(() => meta.value.valid && values.content.trim().length > 0)
const isFormValid = computed(() => meta.value.valid && (values.content?.trim().length || 0) > 0)
const characterCount = computed(() => values.content?.length || 0)
// Watch mentions array and sync with form
@ -294,7 +294,7 @@ const onSubmit = form.handleSubmit(async (values) => {
// Create note event template
const eventTemplate: EventTemplate = {
kind: 1,
content: values.content.trim(),
content: values.content?.trim() || '',
tags,
created_at: Math.floor(Date.now() / 1000)
}

View file

@ -223,7 +223,7 @@
</template>
<script setup lang="ts">
import { ref, computed, watch } from 'vue'
import { ref, computed } from 'vue'
import { useForm } from 'vee-validate'
import { toTypedSchema } from '@vee-validate/zod'
import * as z from 'zod'
@ -254,8 +254,8 @@ interface Emits {
const emit = defineEmits<Emits>()
// Services
const authService = injectService(SERVICE_TOKENS.AUTH_SERVICE)
const relayHub = injectService(SERVICE_TOKENS.RELAY_HUB)
const authService = injectService(SERVICE_TOKENS.AUTH_SERVICE) as any
const relayHub = injectService(SERVICE_TOKENS.RELAY_HUB) as any
const toast = useToast()
// Form schema
@ -280,7 +280,7 @@ const rideshareSchema = toTypedSchema(z.object({
const form = useForm({
validationSchema: rideshareSchema,
initialValues: {
type: '',
type: undefined as 'offering' | 'seeking' | undefined,
fromLocation: '',
toLocation: '',
date: '',
@ -292,7 +292,7 @@ const form = useForm({
}
})
const { values, meta, setFieldValue, resetForm } = form
const { values, meta, resetForm } = form
const isFormValid = computed(() => meta.value.valid)
// State

View file

@ -1,4 +1,4 @@
import { ref, computed, watch, onMounted } from 'vue'
import { ref, computed } from 'vue'
import { injectService, SERVICE_TOKENS } from '@/core/di-container'
import type { ProfileService } from '../services/ProfileService'

View file

@ -1,4 +1,4 @@
import { ref, reactive } from 'vue'
import { reactive } from 'vue'
import { BaseService } from '@/core/base/BaseService'
import { injectService, SERVICE_TOKENS } from '@/core/di-container'
import type { Event as NostrEvent, Filter } from 'nostr-tools'
@ -24,7 +24,6 @@ export class ProfileService extends BaseService {
// Profile cache - reactive for UI updates
private _profiles = reactive(new Map<string, UserProfile>())
private _isLoading = ref(false)
private currentSubscription: string | null = null
private currentUnsubscribe: (() => void) | null = null

View file

@ -42,7 +42,6 @@ export class ReactionService extends BaseService {
private currentUnsubscribe: (() => void) | null = null
// Track deletion subscription separately
private deletionSubscription: string | null = null
private deletionUnsubscribe: (() => void) | null = null
// Track which events we're monitoring
@ -99,7 +98,7 @@ export class ReactionService extends BaseService {
}
})
this.deletionSubscription = subscriptionId
// Store subscription ID if needed for tracking
this.deletionUnsubscribe = unsubscribe
} catch (error) {

View file

@ -134,7 +134,6 @@
// TODO: Re-enable when push notifications are properly implemented
// 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, MessageSquare, Car } from 'lucide-vue-next'
import PWAInstallPrompt from '@/components/pwa/PWAInstallPrompt.vue'
import FeedFilters from '@/modules/nostr-feed/components/FeedFilters.vue'
@ -187,7 +186,7 @@ const feedType = computed(() => {
if (selectedFilters.value.length === 0) return 'all'
// Check if it matches a preset
for (const [presetName, presetFilters] of Object.entries(FILTER_PRESETS)) {
for (const [, presetFilters] of Object.entries(FILTER_PRESETS)) {
if (presetFilters.length === selectedFilters.value.length &&
presetFilters.every(pf => selectedFilters.value.some(sf => sf.id === pf.id))) {
return 'custom' // Always use custom for proper filtering