diff --git a/frontend/src/views/apps/CityMarktApp.vue b/frontend/src/views/apps/CityMarktApp.vue index 6eb346d..f91414e 100644 --- a/frontend/src/views/apps/CityMarktApp.vue +++ b/frontend/src/views/apps/CityMarktApp.vue @@ -30,6 +30,7 @@ import { X, } from 'lucide-vue-next' import { computed, onMounted, ref } from 'vue' +import { useRoute } from 'vue-router' import CityMarktSelect from '@/components/citymarkt/CityMarktSelect.vue' import CityMarktGallery from '@/components/citymarkt/CityMarktGallery.vue' @@ -58,6 +59,7 @@ type ChatTimelineItem = | { createdAt: string; isCounter: boolean; key: string; kind: 'offer'; value: MarketplaceOffer } const phone = usePhoneStore() +const route = useRoute() const account = useAccountStore() const marketplace = useMarketplaceStore() const media = useMediaStore() @@ -328,7 +330,7 @@ async function selectTab(next: Tab): Promise { } } -async function openListing(item: MarketplaceListingSummary): Promise { +async function openListing(item: Pick): Promise { const response = await marketplace.get(item.id) if (!response.success || !response.data) { setFeedback('Apps.citymarkt.errors.listing_not_found') @@ -565,6 +567,9 @@ async function blockSeller(): Promise { onMounted(async () => { await loadFeed() if (isAuthenticated.value) await marketplace.loadCounts() + if (typeof route.query.listingId === 'string') { + await openListing({ id: route.query.listingId }) + } }) diff --git a/frontend/src/views/apps/LocalPagesApp.vue b/frontend/src/views/apps/LocalPagesApp.vue index ef82d8c..e41f42a 100644 --- a/frontend/src/views/apps/LocalPagesApp.vue +++ b/frontend/src/views/apps/LocalPagesApp.vue @@ -185,6 +185,14 @@ function moveGallery(direction: number): void { galleryIndex.value = (galleryIndex.value + direction + selected.value.images.length) % selected.value.images.length } +function openCityMarktListing(): void { + if (!selected.value?.citymarkt_listing_id) return + void router.push({ + path: '/apps/citymarkt', + query: { listingId: selected.value.citymarkt_listing_id }, + }) +} + onMounted(() => void loadFeed()) @@ -231,7 +239,7 @@ onMounted(() => void loadFeed())
{{ phone.t('Apps.localPages.post') }}
-
{{ selected.author_name.charAt(0).toUpperCase() }}
@{{ selected.author_name }}{{ relativeDate(selected.created_at) }}
{{ label('categories', selected.category) }}

{{ selected.title }}

{{ selected.body }}

{{ phone.t('Apps.localPages.location') }}{{ selected.district ? phone.t(`Apps.citymarkt.districts.${selected.district}`) : phone.t('Apps.localPages.allLosSantos') }}
+
{{ selected.author_name.charAt(0).toUpperCase() }}
@{{ selected.author_name }}{{ relativeDate(selected.created_at) }}
{{ label('categories', selected.category) }}

{{ selected.title }}

{{ selected.body }}

{{ phone.t('Apps.localPages.location') }}{{ selected.district ? phone.t(`Apps.citymarkt.districts.${selected.district}`) : phone.t('Apps.localPages.allLosSantos') }}
diff --git a/frontend/testserver/index.cjs b/frontend/testserver/index.cjs index ebba06b..b97fe5d 100644 --- a/frontend/testserver/index.cjs +++ b/frontend/testserver/index.cjs @@ -259,6 +259,14 @@ const marketplaceOffers = [ }, ] const pagesPosts = [ + { + id: 'pages-citymarkt-1', account_id: 2, author_name: 'morgan', source_type: 'citymarkt', + citymarkt_listing_id: '81bc9d37-20e1-4d8a-82f8-f4b85f77cf01', + title: 'Sultan RS in excellent condition', + body: 'Clean Sultan RS with fresh service, tidy interior and no known damage. Viewing and test drive available in Vinewood.', + category: 'citymarkt', district: 'vinewood', created_at: '2026-08-06 12:50:00', like_count: 24, + images: [{ media_id: 'capture-car', gradient: 'linear-gradient(145deg, #ff6b6b, #845ec2 52%, #0f2027)', sort_order: 1 }], + }, { id: 'pages-1', account_id: 2, author_name: 'morgan', source_type: 'personal', citymarkt_listing_id: null, title: 'Best sunset view above Vinewood', body: 'Take the small trail behind the observatory shortly before sunset. The view across Los Santos is incredible and there is enough space to park two cars.', diff --git a/sky_phone/source/html/index.html b/sky_phone/source/html/index.html index be5dceb..30558ea 100644 --- a/sky_phone/source/html/index.html +++ b/sky_phone/source/html/index.html @@ -4,7 +4,7 @@ Sky Phone - +