feat: extract shop from mp/shop — initial libreshop/shop
Some checks failed
Build and publish / build (push) Failing after 19s
Some checks failed
Build and publish / build (push) Failing after 19s
Source moved verbatim from mp/shop/ on 2026-04-29; mp was the first concrete adapter consuming the libreshop toolkit. Builds and publishes git.librete.ch/libreshop/shop on every main / v* push via the standard .gitea/workflows/build.yml shared across libreshop components.
This commit is contained in:
23
app.vue
Normal file
23
app.vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<NuxtLoadingIndicator color="#dc2626" />
|
||||
<NuxtLayout>
|
||||
<NuxtPage />
|
||||
</NuxtLayout>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
// Initialize cart on app mount (client-side only)
|
||||
// Skip on checkout pages that have their own order loading logic
|
||||
const route = useRoute();
|
||||
const { initialize: initCart } = useCart();
|
||||
|
||||
// Pages that manage their own order state and shouldn't have cart auto-init
|
||||
const skipCartInitPaths = ["/checkout/3", "/checkout/result"];
|
||||
|
||||
onMounted(() => {
|
||||
const shouldSkip = skipCartInitPaths.some((path) => route.path.startsWith(path));
|
||||
if (!shouldSkip) {
|
||||
initCart();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user