fix pwa modular

This commit is contained in:
2026-02-01 21:53:26 +03:30
parent 5ae1b4c40a
commit f5928601fa
277 changed files with 2054 additions and 1853 deletions
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
import { mergeProps, withCtx, createTextVNode, toDisplayString, defineComponent, shallowRef, h, resolveComponent, computed, useSSRContext } from 'vue';
import { p as parseQuery, h as hasProtocol, j as joinURL, w as withTrailingSlash, c as withoutTrailingSlash } from '../nitro/nitro.mjs';
import { p as parseQuery, h as hasProtocol, j as joinURL, w as withTrailingSlash, f as withoutTrailingSlash } from '../nitro/nitro.mjs';
import { a_ as useHead, u as useRouter$1, b2 as resolveRouteObject, b3 as navigateTo, as as useNuxtApp, b4 as useRuntimeConfig, b5 as nuxtLinkDefaults } from './server.mjs';
import { ssrRenderAttrs, ssrInterpolate, ssrRenderComponent } from 'vue/server-renderer';
import { _ as _export_sfc } from './_plugin-vue_export-helper-1tPrXgE0.mjs';
@@ -2,7 +2,7 @@ import { ref, computed, nextTick, watch, mergeProps, unref, withCtx, createVNode
import { ssrRenderAttrs, ssrRenderComponent, ssrRenderClass, ssrRenderSlot, ssrInterpolate, ssrRenderStyle } from 'vue/server-renderer';
import { useDrag } from '@vueuse/gesture';
import { TransitionRoot } from '@headlessui/vue';
import { b as defu } from '../nitro/nitro.mjs';
import { e as defu } from '../nitro/nitro.mjs';
import { a as useConfigStore, t as unrefElement, w as tryOnUnmounted, x as isObject$2, m as useIntersectionObserver, y as useEventListener } from './server.mjs';
import sync, { getFrameData } from 'framesync';
import { inertia, animate, velocityPerSecond, cubicBezier, bounceOut, bounceInOut, bounceIn, anticipate, backOut, backInOut, backIn, circOut, circInOut, circIn, easeOut, easeInOut, easeIn, linear } from 'popmotion';
+11 -17
View File
@@ -1,5 +1,5 @@
import process from 'node:process';globalThis._importMeta_=globalThis._importMeta_||{url:"file:///_entry.js",env:process.env};import { inject, ref, h, getCurrentInstance, nextTick, reactive, defineComponent, createVNode, isRef, toValue, hasInjectionContext, watchEffect, onBeforeUnmount, onDeactivated, onActivated, computed, shallowRef, watch, provide, unref, cloneVNode, createElementBlock, Fragment, isVNode, Comment, Text, getCurrentScope, onScopeDispose, Transition, toRef as toRef$1, readonly, customRef, TransitionGroup, render, Teleport, withDirectives, vShow, defineAsyncComponent, shallowReactive, Suspense, useSSRContext, createApp, triggerRef, mergeProps, withCtx, onErrorCaptured, onServerPrefetch, resolveDynamicComponent, effectScope, isReadonly, toRaw, isShallow, isReactive } from 'vue';
import { q as createError$1, h as hasProtocol, x as isScriptProtocol, j as joinURL, y as withQuery, z as sanitizeStatusCode, A as getContext, $ as $fetch, B as baseURL, C as createHooks, b as defu, D as getRequestHeaders, E as executeAsync } from '../nitro/nitro.mjs';
import { t as createError$1, h as hasProtocol, z as isScriptProtocol, j as joinURL, A as withQuery, B as sanitizeStatusCode, C as getContext, $ as $fetch, D as baseURL, E as createHooks, e as defu, F as executeAsync, G as getRequestHeaders } from '../nitro/nitro.mjs';
import { defineStore, setActivePinia, createPinia, shouldHydrate } from 'pinia';
import { createClient } from '@supabase/supabase-js';
import axios from 'axios';
@@ -17397,23 +17397,8 @@ const LayoutProvider = defineComponent({
};
}
});
const pwaInfo = { "webManifest": { "href": "/manifest.webmanifest" } };
const __nuxt_component_2 = defineComponent({
async setup() {
if (pwaInfo) {
const meta = ref({ link: [] });
useHead(meta);
const { webManifest } = pwaInfo;
if (webManifest) {
const { href } = webManifest;
{
meta.value.link.push({
rel: "manifest",
href
});
}
}
}
return () => null;
}
});
@@ -17565,8 +17550,17 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
__ssrInlineRender: true,
setup(__props) {
const config = useConfigStore();
useRequestHeaders(["host"]);
const configStore = useConfigStore();
const getPopup = (trigger) => trigger?.parentNode || void 0;
useHead({
title: computed(() => {
return configStore.appName.en || "Loading...";
}),
meta: [
{ name: "description", content: computed(() => configStore.TEXT_HEADER) }
],
link: []
});
return (_ctx, _push, _parent, _attrs) => {
const _component_AConfigProvider = ConfigProvider;
const _component_NuxtLayout = __nuxt_component_1;
File diff suppressed because it is too large Load Diff
@@ -1,4 +1,4 @@
import { e as defineSitemapEventHandler } from '../../../nitro/nitro.mjs';
import { i as defineSitemapEventHandler } from '../../../nitro/nitro.mjs';
import { createClient } from '@supabase/supabase-js';
import 'node:http';
import 'node:https';
@@ -1,4 +1,4 @@
import { d as defineEventHandler } from '../nitro/nitro.mjs';
import { d as defineEventHandler, b as getRequestHost, a as getCachedConfig, c as setResponseHeader } from '../nitro/nitro.mjs';
import 'node:http';
import 'node:https';
import 'node:events';
@@ -12,25 +12,41 @@ import 'consola';
import 'fast-xml-parser';
import 'ipx';
const manifest_webmanifest_get = defineEventHandler((event) => {
const name = useState("app-name").value.fa || "App";
return {
const manifest_webmanifest_get = defineEventHandler(async (event) => {
const host = getRequestHost(event);
const config = await getCachedConfig(host);
const name = (config == null ? void 0 : config.appNameEn) || "App Name";
const shortName = (config == null ? void 0 : config.appNameEn) || "App";
const description = (config == null ? void 0 : config.description) || "Best Shopping App";
const iconSrc = (config == null ? void 0 : config.storageLogo) ? `${config.storageLogo}/pwa-icon-192.png` : "/pwa-icon-192.png";
const manifest = {
name,
short_name: name,
short_name: shortName,
description,
id: "/",
start_url: "/",
display: "standalone",
orientation: "portrait",
scope: "/",
orientation: "portrait-primary",
background_color: "#ffffff",
theme_color: "#ffffff",
description: name,
icons: [
{ src: "/pwa-icon-192.png", sizes: "192x192", type: "image/png", purpose: "any maskable" },
{ src: "/pwa-icon-512.png", sizes: "512x512", type: "image/png", purpose: "any maskable" }
],
categories: ["business", "shopping"]
{
src: iconSrc,
sizes: "192x192",
type: "image/png",
purpose: "any maskable"
},
{
// اینجا فرض میکنیم فایل 512 هم کنار 192 هست
src: iconSrc.replace("192", "512"),
sizes: "512x512",
type: "image/png",
purpose: "any maskable"
}
]
};
setResponseHeader(event, "Content-Type", "application/manifest+json");
return manifest;
});
export { manifest_webmanifest_get as default };
+2 -2
View File
@@ -1,5 +1,5 @@
import { createRenderer, getRequestDependencies, getPreloadLinks, getPrefetchLinks } from 'vue-bundle-renderer/runtime';
import { f as buildAssetsURL, u as useRuntimeConfig, i as getResponseStatusText, k as getResponseStatus, l as decodePath, m as defineRenderHandler, n as publicAssetsURL, o as getQuery, q as createError, r as destr, t as getRouteRules, j as joinURL, v as useNitroApp } from '../nitro/nitro.mjs';
import { k as buildAssetsURL, u as useRuntimeConfig, l as getResponseStatusText, m as getResponseStatus, n as decodePath, o as defineRenderHandler, q as publicAssetsURL, r as getQuery, t as createError, v as destr, x as getRouteRules, j as joinURL, y as useNitroApp } from '../nitro/nitro.mjs';
import { renderToString } from 'vue/server-renderer';
import { createHead as createHead$1, propsToString, renderSSRHead } from 'unhead/server';
import { stringify, uneval } from 'devalue';
@@ -45,7 +45,7 @@ function createHead(options = {}) {
const NUXT_RUNTIME_PAYLOAD_EXTRACTION = false;
const appHead = {"meta":[{"name":"viewport","content":"width=device-width, initial-scale=1"},{"charset":"utf-8"},{"name":"screen-orientation","content":"portrait"}],"link":[{"rel":"manifest","href":"/manifest.webmanifest"}],"style":[],"script":[],"noscript":[],"title":"loading"};
const appHead = {"meta":[{"name":"viewport","content":"width=device-width, initial-scale=1"},{"charset":"utf-8"},{"name":"screen-orientation","content":"portrait"}],"link":[{"rel":"manifest","href":"/manifest.webmanifest"}],"style":[],"script":[],"noscript":[],"title":"Loading..."};
const appRootTag = "div";
@@ -2,6 +2,198 @@ const sources = [
{
"sourceType": "user",
"fetch": "/api/__sitemap__/urls"
},
{
"context": {
"name": "nuxt:pages",
"description": "Generated from your static page files.",
"tips": [
"Can be disabled with `{ excludeAppSources: ['nuxt:pages'] }`."
]
},
"urls": [
{
"loc": "/auth",
"lastmod": "2025-10-27T17:00:59.355Z"
},
{
"loc": "/auth/login",
"lastmod": "2025-10-27T17:00:59.356Z"
},
{
"loc": "/auth/forget",
"lastmod": "2025-10-27T17:00:59.356Z"
},
{
"loc": "/auth/register",
"lastmod": "2025-10-27T17:00:59.356Z"
},
{
"loc": "/",
"lastmod": "2025-10-27T17:00:59.358Z"
},
{
"loc": "/posts",
"lastmod": "2025-10-27T17:00:59.358Z"
},
{
"loc": "/user/add",
"lastmod": "2025-10-27T17:00:59.359Z"
},
{
"loc": "/add",
"lastmod": "2025-10-27T17:00:59.354Z"
},
{
"loc": "/fav",
"lastmod": "2025-10-27T17:00:59.357Z"
},
{
"loc": "/cart",
"lastmod": "2025-10-27T17:00:59.356Z"
},
{
"loc": "/edit",
"lastmod": "2025-10-27T17:00:59.356Z"
},
{
"loc": "/home",
"lastmod": "2025-10-27T17:00:59.358Z"
},
{
"loc": "/user",
"lastmod": "2025-10-27T17:00:59.360Z"
},
{
"loc": "/saved/posts",
"lastmod": "2025-10-27T17:00:59.359Z"
},
{
"loc": "/user/brands",
"lastmod": "2025-10-27T17:00:59.359Z"
},
{
"loc": "/message/list",
"lastmod": "2025-10-27T17:00:59.358Z"
},
{
"loc": "/search",
"lastmod": "2025-10-27T17:00:59.359Z"
},
{
"loc": "/user/address",
"lastmod": "2025-10-27T17:00:59.359Z"
},
{
"loc": "/user/message",
"lastmod": "2025-10-27T17:00:59.360Z"
},
{
"loc": "/user/profile",
"lastmod": "2025-10-27T17:00:59.360Z"
},
{
"loc": "/user/setting",
"lastmod": "2025-10-27T17:00:59.360Z"
},
{
"loc": "/message",
"lastmod": "2025-10-27T17:00:59.358Z"
},
{
"loc": "/user/discount",
"lastmod": "2025-11-24T14:19:07.849Z"
},
{
"loc": "/user/managers",
"lastmod": "2025-10-27T17:00:59.360Z"
},
{
"loc": "/add/story",
"lastmod": "2025-10-27T17:00:59.355Z"
},
{
"loc": "/user/attributes",
"lastmod": "2025-10-27T17:00:59.359Z"
},
{
"loc": "/user/categories",
"lastmod": "2025-10-27T17:00:59.359Z"
},
{
"loc": "/user/edit",
"lastmod": "2025-10-27T17:00:59.360Z"
},
{
"loc": "/highlight/create",
"lastmod": "2025-10-27T17:00:59.358Z"
},
{
"loc": "/add/product",
"lastmod": "2025-10-27T17:00:59.355Z"
},
{
"loc": "/search/main",
"lastmod": "2025-10-27T17:00:59.359Z"
},
{
"loc": "/add/story/infStory",
"lastmod": "2025-10-27T17:00:59.355Z"
},
{
"loc": "/user/store_request",
"lastmod": "2025-10-27T17:00:59.361Z"
},
{
"loc": "/add/story/inputStory",
"lastmod": "2025-10-27T17:00:59.355Z"
},
{
"loc": "/user/statistics_list",
"lastmod": "2025-10-27T17:00:59.360Z"
},
{
"loc": "/user/statistics_list/saved",
"lastmod": "2025-10-27T17:00:59.361Z"
},
{
"loc": "/user/statistics_list/orders",
"lastmod": "2025-10-27T17:00:59.360Z"
},
{
"loc": "/user/statistics_list/customers",
"lastmod": "2025-10-27T17:00:59.360Z"
},
{
"loc": "/user/statistics_list/storeOrders",
"lastmod": "2025-10-27T17:00:59.361Z"
},
{
"loc": "/add/product/infProduct",
"lastmod": "2025-10-27T17:00:59.355Z"
},
{
"loc": "/message/detail_message",
"lastmod": "2025-10-27T17:00:59.358Z"
},
{
"loc": "/add/product/excel",
"lastmod": "2025-10-27T17:00:59.354Z"
},
{
"loc": "/add/product/inputProduct",
"lastmod": "2025-10-27T17:00:59.355Z"
},
{
"loc": "/add/product/excel/infProductExcel",
"lastmod": "2025-10-27T17:00:59.354Z"
},
{
"loc": "/add/product/excel/inputProductExcel",
"lastmod": "2025-10-27T17:00:59.355Z"
}
],
"sourceType": "app"
}
];