mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-29 18:13:47 +00:00
fix: resolve telegram auth token expiration and clean up codebase
- Fix stale initData comparison in clearStaleSessionIfNeeded that destroyed valid refresh tokens on mobile WebView reopens - Restrict X-Telegram-Init-Data header to auth endpoints only - Close Mini App on auth retry to force fresh initData from Telegram - Merge Connection page error/not-configured states for better UX - Remove unnecessary comments across 40+ files (section dividers, restating comments, noise catch block comments) - Configure ESLint allowEmptyCatch to properly handle intentional empty catch blocks (62 warnings resolved)
This commit is contained in:
@@ -98,7 +98,6 @@ export default function Connection() {
|
||||
);
|
||||
}, [appConfig?.platforms]);
|
||||
|
||||
// Loading
|
||||
if (isLoading) {
|
||||
return (
|
||||
<div className="flex flex-1 items-center justify-center py-20">
|
||||
@@ -107,20 +106,7 @@ export default function Connection() {
|
||||
);
|
||||
}
|
||||
|
||||
// Error
|
||||
if (error || !appConfig) {
|
||||
return (
|
||||
<div className="flex flex-1 flex-col items-center justify-center p-8 text-center">
|
||||
<p className="mb-4 text-lg text-dark-300">{t('common.error')}</p>
|
||||
<button onClick={handleGoBack} className="btn-primary px-6 py-2">
|
||||
{t('common.close')}
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
// No apps configured — check before subscription since empty config also has no subscription
|
||||
if (!hasApps) {
|
||||
if (error || !appConfig || !hasApps) {
|
||||
return (
|
||||
<div className="flex flex-1 flex-col items-center justify-center p-8 text-center">
|
||||
<div className="mb-4 flex h-16 w-16 items-center justify-center rounded-2xl bg-dark-800">
|
||||
|
||||
Reference in New Issue
Block a user