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