From 56ea53e73b9b6873ac904f51fa12436568a67b96 Mon Sep 17 00:00:00 2001 From: esefxdz Date: Thu, 6 Aug 2026 22:09:14 +0300 Subject: [PATCH] fix: RenderFlex overflow, circular import, remove timer spinner --- CHANGELOG.md | 10 +++++ lib/components/timer_box.dart | 77 +++++++++-------------------------- 2 files changed, 29 insertions(+), 58 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 483ea47..a88de5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,11 @@ Versions follow [semver](https://semver.org/): MAJOR.MINOR.PATCH no `flow` field. Path-hidden behind `/revolt`. ### Fixed +- **RenderFlex overflow** — status bar text wrapped in `Flexible` with + `TextOverflow.ellipsis` to prevent overflow on narrow screens (≤360dp). +- **Circular import** — removed `import 'package:revoltvpn/main.dart'` from + `sidebar_drawer.dart`. `SidebarDrawer` converted to `StatefulWidget`; + version footer loaded via `PackageInfo.fromPlatform()`. - Client hot-reload was silently broken — `xray api adi` no-op. Fixed: `adu`/`rmu` commands per Xray HandlerService spec. - Missing XHTTP `path` param in VLESS URL — now reads `xhttp_path` from @@ -32,6 +37,11 @@ Versions follow [semver](https://semver.org/): MAJOR.MINOR.PATCH - Reality keypair generated (was placeholder). Throttle `uplinkOnly`/`downlinkOnly` corrected (seconds, not bytes/sec). Fallback rate limits removed (fingerprint). +### Changed +- **Timer box spinner removed** — the "Connecting…"/"Syncing…" spinner under + the countdown was redundant with the connect button's spinner. Timer card + is now a clean countdown only (gray '00:00:00' when idle). + ### Server - `api` outbound + 3 routing rules in `xray_config_reality.json` (bootstrap isolation + API routing). Permanent bootstrap client. Hivemind unchanged. diff --git a/lib/components/timer_box.dart b/lib/components/timer_box.dart index 9f028d7..d4d1c34 100644 --- a/lib/components/timer_box.dart +++ b/lib/components/timer_box.dart @@ -2,19 +2,14 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:revoltvpn/logic/app_colors.dart'; import 'package:revoltvpn/logic/session_timer.dart'; -import 'package:revoltvpn/logic/vpn_connection.dart'; class TimerBox extends StatelessWidget { const TimerBox({super.key}); @override Widget build(BuildContext context) { - return Consumer2( - builder: (context, timer, vpn, _) { - final isConnecting = vpn.status == VpnStatus.connecting; - final isSyncing = vpn.status == VpnStatus.connected && !timer.hasSyncedOnce; - final showIndicator = isConnecting || isSyncing; - + return Consumer( + builder: (context, timer, _) { return Container( padding: const EdgeInsets.symmetric(horizontal: 28, vertical: 14), decoration: BoxDecoration( @@ -22,58 +17,24 @@ class TimerBox extends StatelessWidget { borderRadius: BorderRadius.circular(16), border: Border.all(color: AppColors.slate15), ), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - // Countdown - Text( - timer.hasSyncedOnce ? timer.formatted : '00:00:00', - style: TextStyle( - fontSize: 32, - fontWeight: FontWeight.w700, - color: timer.hasSyncedOnce - ? AppColors.textWhite - : AppColors.slate70, - letterSpacing: 2, - shadows: timer.hasSyncedOnce - ? const [ - Shadow( - color: AppColors.accent50, - blurRadius: 16, - ), - ] - : [], - ), - ), - - // Syncing indicator - if (showIndicator) ...[ - const SizedBox(height: 8), - Row( - mainAxisSize: MainAxisSize.min, - children: [ - const SizedBox( - width: 14, - height: 14, - child: CircularProgressIndicator( - strokeWidth: 2, - color: AppColors.accent60, + child: Text( + timer.hasSyncedOnce ? timer.formatted : '00:00:00', + style: TextStyle( + fontSize: 32, + fontWeight: FontWeight.w700, + color: timer.hasSyncedOnce + ? AppColors.textWhite + : AppColors.slate70, + letterSpacing: 2, + shadows: timer.hasSyncedOnce + ? const [ + Shadow( + color: AppColors.accent50, + blurRadius: 16, ), - ), - const SizedBox(width: 8), - Text( - isConnecting ? 'Connecting…' : 'Syncing…', - style: const TextStyle( - fontSize: 12, - color: AppColors.accent60, - fontWeight: FontWeight.w600, - letterSpacing: 1, - ), - ), - ], - ), - ], - ], + ] + : [], + ), ), ); },