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.
24 lines
616 B
Vue
24 lines
616 B
Vue
<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>
|