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/components/CurrentPrice.vue` + `composables/useHomeQuoteRows.ts` | همان چهار ردیف دسکتاپ؛ منطق مشترک در useHomeQuoteRows
- 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)
}
function resolveReferralLoginLink(referralId?: string | number | null): string {
function resolveReferralRegisterLink(referralId?: string | number | null): string {
const id = String(referralId ?? '').trim()
if (!id) return ''
const query = `register=true&id=${encodeURIComponent(id)}`
let base = ''
try {
base = String(useSettingsStore().getSettingByKey('app_url') ?? '').trim()
@@ -51,14 +53,14 @@ function resolveReferralLoginLink(referralId?: string | number | null): string {
}
if (base) {
return `${base.replace(/\/+$/, '')}/login?id=${encodeURIComponent(id)}`
return `${base.replace(/\/+$/, '')}/login?${query}`
}
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: {
@@ -67,7 +69,7 @@ export function getReferralShareText(options: {
referralId?: string | number | null
}) {
const userName = options.userName ?? ''
const link = resolveReferralLoginLink(options.referralId)
const link = resolveReferralRegisterLink(options.referralId)
return renderInviteLinkText(getInviteLinkTemplate(), { userName, link })
}
@@ -1190,12 +1190,19 @@
/* ─── موبایل (<768): لوگو + کارت + پشتیبانی، وسط‌چین عمودی ─── */
@media (max-width: 767px) {
.dauth--boursecu {
min-height: 100dvh;
.dauth.dauth--boursecu {
/* 100vh آیفون پشت نوار سافاری است؛ اسکرول داخل 100dvh تا دکمهٔ ثبت‌نام برسد */
height: 100dvh;
max-height: 100dvh;
min-height: 0;
overflow-x: hidden;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
display: flex;
flex-direction: column;
justify-content: center;
padding: 12px 0;
justify-content: flex-start;
justify-content: safe center;
padding: 12px 0 calc(24px + env(safe-area-inset-bottom, 0px));
.dauth-page-logo {
position: relative;
@@ -1218,10 +1225,10 @@
display: flex;
flex-direction: column;
direction: rtl;
flex: 0 1 auto;
flex: 0 0 auto;
gap: 12px;
padding: 0 16px;
min-height: 0;
min-height: auto;
width: 100%;
}
@@ -1359,6 +1366,16 @@
margin-top: 12px;
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,
.app-main,
.login-page-root {
min-height: 100dvh !important;
height: auto !important;
max-height: none !important;
.login-page-root,
.dauth.dauth--boursecu {
min-height: 0 !important;
height: 100dvh !important;
max-height: 100dvh !important;
overflow-x: hidden !important;
overflow-y: auto !important;
-webkit-overflow-scrolling: touch;
background: #0b192e !important;
}
.dauth--boursecu {
flex: 1 1 auto;
min-height: 100dvh !important;
}
.app-credit-footer--mobile,
.app-credit-footer--login {
display: none !important;
}
/* بنر نصب روی لاگین منوی پایین ندارد؛ وگرنه روی فیلد و دکمهٔ ثبت‌نام می‌نشیند */
.pwa-install-banner {
bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
}
}
}
</style>