mirror of
https://github.com/pezkuwichain/pezkuwi-telegram-miniapp.git
synced 2026-04-21 23:37:55 +00:00
fix: preserve query params in i18n URL, make seed phrase copyable in bot
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pezkuwi-telegram-miniapp",
|
||||
"version": "1.0.192",
|
||||
"version": "1.0.193",
|
||||
"type": "module",
|
||||
"description": "Pezkuwichain Telegram Mini App - Forum, Announcements, Rewards",
|
||||
"author": "Pezkuwichain Team",
|
||||
|
||||
+3
-3
@@ -139,10 +139,10 @@ export function LanguageProvider({ children }: LanguageProviderProps) {
|
||||
document.documentElement.lang = lang === 'krd' ? 'ku' : lang;
|
||||
document.documentElement.dir = isRTL ? 'rtl' : 'ltr';
|
||||
|
||||
// Ensure URL has language prefix
|
||||
// Ensure URL has language prefix (preserve query params like ?page=citizen)
|
||||
const firstSegment = window.location.pathname.split('/').filter(Boolean)[0];
|
||||
if (!firstSegment || !VALID_LANGS.includes(firstSegment as LanguageCode)) {
|
||||
window.history.replaceState(null, '', `/${lang}`);
|
||||
window.history.replaceState(null, '', `/${lang}${window.location.search}`);
|
||||
}
|
||||
}, [lang, isRTL]);
|
||||
|
||||
@@ -156,7 +156,7 @@ export function LanguageProvider({ children }: LanguageProviderProps) {
|
||||
segments.shift();
|
||||
}
|
||||
const newPath = `/${newLang}${segments.length > 0 ? '/' + segments.join('/') : ''}`;
|
||||
window.history.replaceState(null, '', newPath);
|
||||
window.history.replaceState(null, '', `${newPath}${window.location.search}`);
|
||||
}, []);
|
||||
|
||||
const t = useCallback(
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.0.192",
|
||||
"buildTime": "2026-02-14T17:44:17.743Z",
|
||||
"buildNumber": 1771091057743
|
||||
"version": "1.0.193",
|
||||
"buildTime": "2026-02-14T18:08:28.138Z",
|
||||
"buildNumber": 1771092508139
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ async function handleCreateWallet(token: string, chatId: number) {
|
||||
<code>${address}</code>
|
||||
|
||||
🔑 <b>Seed Phrase (12 words):</b>
|
||||
<tg-spoiler>${mnemonic}</tg-spoiler>
|
||||
<code>${mnemonic}</code>
|
||||
|
||||
⚠️ <b>GIRÎNG / IMPORTANT:</b>
|
||||
<i>Ev 12 peyvan binivîsin û li cihekî ewle bihêlin.
|
||||
|
||||
Reference in New Issue
Block a user