mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-30 02:23: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:
@@ -23,8 +23,6 @@ import {
|
||||
RemnawaveIcon,
|
||||
} from '../components/icons';
|
||||
|
||||
// ============ Icons ============
|
||||
|
||||
const BackIcon = () => (
|
||||
<svg
|
||||
className="h-5 w-5 text-dark-400"
|
||||
@@ -37,8 +35,6 @@ const BackIcon = () => (
|
||||
</svg>
|
||||
);
|
||||
|
||||
// ============ Helpers ============
|
||||
|
||||
const formatBytes = (bytes: number): string => {
|
||||
if (bytes === 0) return '0 B';
|
||||
const k = 1024;
|
||||
@@ -100,8 +96,6 @@ const getCountryFlag = (code: string | null | undefined): string => {
|
||||
return codeMap[code.toUpperCase()] || code;
|
||||
};
|
||||
|
||||
// ============ Sub-Components ============
|
||||
|
||||
interface StatCardProps {
|
||||
label: string;
|
||||
value: string | number;
|
||||
@@ -333,8 +327,6 @@ function SyncCard({ title, description, onAction, isLoading, lastResult }: SyncC
|
||||
);
|
||||
}
|
||||
|
||||
// ============ Tab Components ============
|
||||
|
||||
interface OverviewTabProps {
|
||||
stats: SystemStatsResponse | undefined;
|
||||
isLoading: boolean;
|
||||
@@ -873,8 +865,6 @@ function SyncTab({
|
||||
);
|
||||
}
|
||||
|
||||
// ============ Main Component ============
|
||||
|
||||
type TabType = 'overview' | 'nodes' | 'squads' | 'sync';
|
||||
|
||||
export default function AdminRemnawave() {
|
||||
|
||||
Reference in New Issue
Block a user