edit some in landing page and fix manifest.json
This commit is contained in:
Generated
+2
@@ -2,7 +2,9 @@
|
|||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ProjectModuleManager">
|
<component name="ProjectModuleManager">
|
||||||
<modules>
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/../../hamkar/admin/.idea/admin.iml" filepath="$PROJECT_DIR$/../../hamkar/admin/.idea/admin.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/khanegi_boursecu_landing.iml" filepath="$PROJECT_DIR$/.idea/khanegi_boursecu_landing.iml" />
|
<module fileurl="file://$PROJECT_DIR$/.idea/khanegi_boursecu_landing.iml" filepath="$PROJECT_DIR$/.idea/khanegi_boursecu_landing.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/../../hamkar/user/.idea/user.iml" filepath="$PROJECT_DIR$/../../hamkar/user/.idea/user.iml" />
|
||||||
</modules>
|
</modules>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
import type { AppConfig } from '@/config/types'
|
import type { AppConfig } from '@/config/types'
|
||||||
import { getConfig, getRawAppConfig } from '@/config/app-config'
|
import { getRawAppConfig } from '@/config/app-config'
|
||||||
import { getConfigUrls, sortConfigUrls } from '@/config/load-config'
|
|
||||||
import {
|
import {
|
||||||
clearCachedPwaManifest,
|
clearCachedPwaManifest,
|
||||||
readCachedPwaManifest,
|
readCachedPwaManifest,
|
||||||
@@ -39,16 +38,10 @@ export function getConfigBaseFromStorage() {
|
|||||||
return normalizeBaseUrl(lastSuccess)
|
return normalizeBaseUrl(lastSuccess)
|
||||||
}
|
}
|
||||||
|
|
||||||
function configUrlToManifestUrl(configUrl: string) {
|
const PWA_MANIFEST_URL = 'https://nerkh.gold/manifest.json'
|
||||||
return `${configUrl.replace(/\/+$/, '')}/manifest.json`
|
|
||||||
}
|
|
||||||
|
|
||||||
/** همان ۵ URL پایهٔ get_user — اولویت با CONFIG_Success_URL */
|
export function resolveManifestUrls(_config?: AppConfig | null): string[] {
|
||||||
export function resolveManifestUrls(config?: AppConfig | null): string[] {
|
return [PWA_MANIFEST_URL]
|
||||||
const explicit = getConfig<string>('manifest_url')
|
|
||||||
if (explicit) return [explicit]
|
|
||||||
|
|
||||||
return sortConfigUrls(getConfigUrls()).map(configUrlToManifestUrl)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** اولین کاندید — برای سازگاری */
|
/** اولین کاندید — برای سازگاری */
|
||||||
@@ -518,7 +511,7 @@ async function applyCachedManifestEntry(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* بعد از loadAppConfig / setAppConfig صدا بزن.
|
* بعد از loadAppConfig / setAppConfig صدا بزن.
|
||||||
* get_user دوباره fetch نمیشود — manifest از همان ۵ URL پایهٔ get_user امتحان میشود.
|
* get_user دوباره fetch نمیشود — manifest فقط از nerkh.gold گرفته میشود.
|
||||||
*/
|
*/
|
||||||
export async function setupPwaManifest(config?: AppConfig | null): Promise<boolean> {
|
export async function setupPwaManifest(config?: AppConfig | null): Promise<boolean> {
|
||||||
const raw = config ?? getRawAppConfig()
|
const raw = config ?? getRawAppConfig()
|
||||||
|
|||||||
@@ -3,9 +3,14 @@
|
|||||||
<div class="dlanding__stage">
|
<div class="dlanding__stage">
|
||||||
<header class="dlanding-nav" :class="{ 'is-menu-open': isMobileMenuOpen }">
|
<header class="dlanding-nav" :class="{ 'is-menu-open': isMobileMenuOpen }">
|
||||||
<div class="dlanding-nav__inner">
|
<div class="dlanding-nav__inner">
|
||||||
<div class="dlanding-nav__brand">
|
<NuxtLink
|
||||||
|
to="/"
|
||||||
|
class="dlanding-nav__brand"
|
||||||
|
:aria-label="`بازگشت به صفحه اصلی ${projectName}`"
|
||||||
|
@click="goToLandingHome"
|
||||||
|
>
|
||||||
<img :src="brandLogo" :alt="projectName" class="dlanding-nav__logo" />
|
<img :src="brandLogo" :alt="projectName" class="dlanding-nav__logo" />
|
||||||
</div>
|
</NuxtLink>
|
||||||
|
|
||||||
<nav class="dlanding-nav__links" aria-label="ناوبری اصلی">
|
<nav class="dlanding-nav__links" aria-label="ناوبری اصلی">
|
||||||
<a href="#" class="dlanding-nav__link">صفحه اصلی</a>
|
<a href="#" class="dlanding-nav__link">صفحه اصلی</a>
|
||||||
@@ -1440,6 +1445,16 @@ function closeMobileMenu() {
|
|||||||
isMobileMenuOpen.value = false
|
isMobileMenuOpen.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function goToLandingHome() {
|
||||||
|
closeMobileMenu()
|
||||||
|
if (!import.meta.client) return
|
||||||
|
if (window.location.hash) {
|
||||||
|
history.replaceState(null, '', `${window.location.pathname}${window.location.search}`)
|
||||||
|
}
|
||||||
|
window.scrollTo({ top: 0, behavior: 'smooth' })
|
||||||
|
document.querySelector<HTMLElement>('.about-us-page-root')?.scrollTo({ top: 0, behavior: 'smooth' })
|
||||||
|
}
|
||||||
|
|
||||||
function goToLoginApp() {
|
function goToLoginApp() {
|
||||||
if (!import.meta.client) return
|
if (!import.meta.client) return
|
||||||
const url = getLoginAppUrl()
|
const url = getLoginAppUrl()
|
||||||
|
|||||||
@@ -147,6 +147,9 @@ body.dlanding-menu-open {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__logo {
|
&__logo {
|
||||||
|
|||||||
Reference in New Issue
Block a user