fix(user): referral register links and iPhone login scroll

Use register=true in invite URLs and adjust mobile login layout so the signup button stays reachable on iOS.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-04 12:28:46 +03:30
co-authored by Cursor
parent 5596fc75d0
commit ae01f6c8d6
4 changed files with 43 additions and 20 deletions
@@ -69,3 +69,5 @@
- 2026-11-03 | چهار قیمت هیرو خانه | `home/desktop/components/DesktopLivePrice.vue` + سرور `ZaarboxPriceService::copperDollarReferences` | مس جهانی=کلید `basemetal_london_copper`، دلار آزاد=`tgju_usd`؛ تن=ضرب، کیلو=تقسیم بر ۱۰۰۰ - 2026-11-03 | چهار قیمت هیرو خانه | `home/desktop/components/DesktopLivePrice.vue` + سرور `ZaarboxPriceService::copperDollarReferences` | مس جهانی=کلید `basemetal_london_copper`، دلار آزاد=`tgju_usd`؛ تن=ضرب، کیلو=تقسیم بر ۱۰۰۰
- 2026-11-03 | چهار قیمت موبایل خانه | `home/components/CurrentPrice.vue` + `composables/useHomeQuoteRows.ts` | همان چهار ردیف دسکتاپ؛ منطق مشترک در useHomeQuoteRows - 2026-11-03 | چهار قیمت موبایل خانه | `home/components/CurrentPrice.vue` + `composables/useHomeQuoteRows.ts` | همان چهار ردیف دسکتاپ؛ منطق مشترک در useHomeQuoteRows
- 2026-11-03 | هاور نمودار دارایی | `assets/index.vue` + `useAssetsPortfolioChart.ts` + `chartAreaPaths.ts` | نزدیک‌ترین نقطهٔ رسم‌شده؛ مقدار همان نمونهٔ دارایی، نه قیمت مس - 2026-11-03 | هاور نمودار دارایی | `assets/index.vue` + `useAssetsPortfolioChart.ts` + `chartAreaPaths.ts` | نزدیک‌ترین نقطهٔ رسم‌شده؛ مقدار همان نمونهٔ دارایی، نه قیمت مس
- 2026-11-04 | لینک دعوتنامه | `utils/referralShare.ts` + لندینگ `pages/login.vue` | `%لینک` = `/login?register=true&id=`؛ لندینگ با `id` به ثبت‌نام اپ ریدایرکت می‌کند
- 2026-11-04 | دکمه ثبت‌نام آیفون | `login/desktop/styles/desktop-auth.less` + `login/index.vue` | موبایل height:auto و اسکرول؛ بنر نصب پایین تا روی دکمه ننشیند
+7 -5
View File
@@ -39,10 +39,12 @@ export function renderInviteLinkText(
.replace(/[%٪]\s*نام/gu, userName) .replace(/[%٪]\s*نام/gu, userName)
} }
function resolveReferralLoginLink(referralId?: string | number | null): string { function resolveReferralRegisterLink(referralId?: string | number | null): string {
const id = String(referralId ?? '').trim() const id = String(referralId ?? '').trim()
if (!id) return '' if (!id) return ''
const query = `register=true&id=${encodeURIComponent(id)}`
let base = '' let base = ''
try { try {
base = String(useSettingsStore().getSettingByKey('app_url') ?? '').trim() base = String(useSettingsStore().getSettingByKey('app_url') ?? '').trim()
@@ -51,14 +53,14 @@ function resolveReferralLoginLink(referralId?: string | number | null): string {
} }
if (base) { if (base) {
return `${base.replace(/\/+$/, '')}/login?id=${encodeURIComponent(id)}` return `${base.replace(/\/+$/, '')}/login?${query}`
} }
if (typeof window !== 'undefined' && window.location?.origin) { if (typeof window !== 'undefined' && window.location?.origin) {
return `${window.location.origin}/login?id=${encodeURIComponent(id)}` return `${window.location.origin}/login?${query}`
} }
return `/login?id=${encodeURIComponent(id)}` return `/login?${query}`
} }
export function getReferralShareText(options: { export function getReferralShareText(options: {
@@ -67,7 +69,7 @@ export function getReferralShareText(options: {
referralId?: string | number | null referralId?: string | number | null
}) { }) {
const userName = options.userName ?? '' const userName = options.userName ?? ''
const link = resolveReferralLoginLink(options.referralId) const link = resolveReferralRegisterLink(options.referralId)
return renderInviteLinkText(getInviteLinkTemplate(), { userName, link }) return renderInviteLinkText(getInviteLinkTemplate(), { userName, link })
} }
@@ -1190,12 +1190,19 @@
/* ─── موبایل (<768): لوگو + کارت + پشتیبانی، وسط‌چین عمودی ─── */ /* ─── موبایل (<768): لوگو + کارت + پشتیبانی، وسط‌چین عمودی ─── */
@media (max-width: 767px) { @media (max-width: 767px) {
.dauth--boursecu { .dauth.dauth--boursecu {
min-height: 100dvh; /* 100vh آیفون پشت نوار سافاری است؛ اسکرول داخل 100dvh تا دکمهٔ ثبت‌نام برسد */
height: 100dvh;
max-height: 100dvh;
min-height: 0;
overflow-x: hidden;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: flex-start;
padding: 12px 0; justify-content: safe center;
padding: 12px 0 calc(24px + env(safe-area-inset-bottom, 0px));
.dauth-page-logo { .dauth-page-logo {
position: relative; position: relative;
@@ -1218,10 +1225,10 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
direction: rtl; direction: rtl;
flex: 0 1 auto; flex: 0 0 auto;
gap: 12px; gap: 12px;
padding: 0 16px; padding: 0 16px;
min-height: 0; min-height: auto;
width: 100%; width: 100%;
} }
@@ -1359,6 +1366,16 @@
margin-top: 12px; margin-top: 12px;
font-size: 11px; font-size: 11px;
} }
/* شناور پایین روی دکمهٔ ثبت‌نام می‌نشیند؛ زیر کارت بیاید */
.dauth-form-support--fab {
position: static !important;
top: auto !important;
left: auto !important;
width: auto !important;
align-self: center;
margin: 4px 0 0;
}
} }
} }
+11 -9
View File
@@ -88,24 +88,26 @@ onUnmounted(() => {
.desktopConfig, .desktopConfig,
.app-main, .app-main,
.login-page-root { .login-page-root,
min-height: 100dvh !important; .dauth.dauth--boursecu {
height: auto !important; min-height: 0 !important;
max-height: none !important; height: 100dvh !important;
max-height: 100dvh !important;
overflow-x: hidden !important; overflow-x: hidden !important;
overflow-y: auto !important; overflow-y: auto !important;
-webkit-overflow-scrolling: touch;
background: #0b192e !important; background: #0b192e !important;
} }
.dauth--boursecu {
flex: 1 1 auto;
min-height: 100dvh !important;
}
.app-credit-footer--mobile, .app-credit-footer--mobile,
.app-credit-footer--login { .app-credit-footer--login {
display: none !important; display: none !important;
} }
/* بنر نصب روی لاگین منوی پایین ندارد؛ وگرنه روی فیلد و دکمهٔ ثبت‌نام می‌نشیند */
.pwa-install-banner {
bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
}
} }
} }
</style> </style>