mirror of
https://github.com/FoggedLens/deflock.git
synced 2026-08-15 23:20:26 +02:00
fix store
This commit is contained in:
+1
-2
@@ -37,12 +37,11 @@ const items = [
|
|||||||
{ title: 'Home', icon: 'mdi-home', to: '/' },
|
{ title: 'Home', icon: 'mdi-home', to: '/' },
|
||||||
{ title: 'Map', icon: 'mdi-map', href: 'https://maps.deflock.org' },
|
{ title: 'Map', icon: 'mdi-map', href: 'https://maps.deflock.org' },
|
||||||
{ title: 'Learn', icon: 'mdi-school', to: '/what-is-an-alpr' },
|
{ title: 'Learn', icon: 'mdi-school', to: '/what-is-an-alpr' },
|
||||||
{ title: 'News', icon: 'mdi-newspaper', href: 'https://footnote4a.org/', target: '_blank' },
|
{ title: 'Store', icon: 'mdi-shopping', to: '/store' },
|
||||||
]
|
]
|
||||||
|
|
||||||
const contributeItems = [
|
const contributeItems = [
|
||||||
{ title: 'Submit Cameras', icon: 'mdi-map-marker-plus', to: '/report' },
|
{ title: 'Submit Cameras', icon: 'mdi-map-marker-plus', to: '/report' },
|
||||||
{ title: 'Store', icon: 'mdi-shopping', to: '/store' },
|
|
||||||
{ title: 'Public Records', icon: 'mdi-file-document', to: '/foia' },
|
{ title: 'Public Records', icon: 'mdi-file-document', to: '/foia' },
|
||||||
{ title: 'City Council', icon: 'mdi-account-voice', to: '/council' },
|
{ title: 'City Council', icon: 'mdi-account-voice', to: '/council' },
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -46,21 +46,7 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
<!-- Skeleton while Shopify SDK initialises -->
|
<div class="d-flex justify-center mb-8">
|
||||||
<v-row v-if="!shopifyReady" class="mt-2">
|
|
||||||
<v-col
|
|
||||||
v-for="n in 4"
|
|
||||||
:key="n"
|
|
||||||
cols="12"
|
|
||||||
sm="6"
|
|
||||||
md="3"
|
|
||||||
>
|
|
||||||
<v-skeleton-loader type="image, list-item-two-line, actions" elevation="2" />
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
|
|
||||||
<!-- Shopify Buy Button mount — always in DOM, hidden until ready -->
|
|
||||||
<div v-show="shopifyReady" class="d-flex justify-center mb-8">
|
|
||||||
<div ref="shopifyContainer" style="width: 100%" />
|
<div ref="shopifyContainer" style="width: 100%" />
|
||||||
</div>
|
</div>
|
||||||
</v-window-item>
|
</v-window-item>
|
||||||
@@ -434,7 +420,6 @@ const collectionSelectItems = computed<CollectionSelectItem[]>(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const collectionId = ref((route.query.category as string) || ALL_COLLECTION_ID);
|
const collectionId = ref((route.query.category as string) || ALL_COLLECTION_ID);
|
||||||
const shopifyReady = ref(false);
|
|
||||||
const shopifyContainer = ref<HTMLElement | null>(null);
|
const shopifyContainer = ref<HTMLElement | null>(null);
|
||||||
|
|
||||||
// Sync tab + category to URL so back/forward/refresh restores state
|
// Sync tab + category to URL so back/forward/refresh restores state
|
||||||
@@ -458,8 +443,9 @@ declare global {
|
|||||||
function initShopify(id: string) {
|
function initShopify(id: string) {
|
||||||
const container = shopifyContainer.value;
|
const container = shopifyContainer.value;
|
||||||
if (!container) return;
|
if (!container) return;
|
||||||
shopifyReady.value = false;
|
|
||||||
container.innerHTML = '';
|
container.innerHTML = '';
|
||||||
|
|
||||||
const client = window.ShopifyBuy.buildClient({
|
const client = window.ShopifyBuy.buildClient({
|
||||||
domain: 'ccf325.myshopify.com',
|
domain: 'ccf325.myshopify.com',
|
||||||
storefrontAccessToken: '78991208f7fea14aa4ac02a58f8025dd',
|
storefrontAccessToken: '78991208f7fea14aa4ac02a58f8025dd',
|
||||||
@@ -471,8 +457,8 @@ function initShopify(id: string) {
|
|||||||
moneyFormat: '%24%7B%7Bamount%7D%7D',
|
moneyFormat: '%24%7B%7Bamount%7D%7D',
|
||||||
options: SHOPIFY_OPTIONS,
|
options: SHOPIFY_OPTIONS,
|
||||||
});
|
});
|
||||||
shopifyReady.value = true;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadShopifySDK() {
|
function loadShopifySDK() {
|
||||||
|
|||||||
Reference in New Issue
Block a user