fix: RenderFlex overflow, circular import, remove timer spinner

This commit is contained in:
esefxdz committed 2026-08-06 22:09:14 +03:00
1 parent 143f5f4eff
commit 56ea53e73b
2 files changed
+13 -42

No files matched your search

+10
View File
@@ -23,6 +23,11 @@ Versions follow [semver](https://semver.org/): MAJOR.MINOR.PATCH
no `flow` field. Path-hidden behind `/revolt`. no `flow` field. Path-hidden behind `/revolt`.
### Fixed ### 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: - Client hot-reload was silently broken — `xray api adi` no-op. Fixed:
`adu`/`rmu` commands per Xray HandlerService spec. `adu`/`rmu` commands per Xray HandlerService spec.
- Missing XHTTP `path` param in VLESS URL — now reads `xhttp_path` from - 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` - Reality keypair generated (was placeholder). Throttle `uplinkOnly`/`downlinkOnly`
corrected (seconds, not bytes/sec). Fallback rate limits removed (fingerprint). 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 ### Server
- `api` outbound + 3 routing rules in `xray_config_reality.json` (bootstrap - `api` outbound + 3 routing rules in `xray_config_reality.json` (bootstrap
isolation + API routing). Permanent bootstrap client. Hivemind unchanged. isolation + API routing). Permanent bootstrap client. Hivemind unchanged.
+3 -42
View File
@@ -2,19 +2,14 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:revoltvpn/logic/app_colors.dart'; import 'package:revoltvpn/logic/app_colors.dart';
import 'package:revoltvpn/logic/session_timer.dart'; import 'package:revoltvpn/logic/session_timer.dart';
import 'package:revoltvpn/logic/vpn_connection.dart';
class TimerBox extends StatelessWidget { class TimerBox extends StatelessWidget {
const TimerBox({super.key}); const TimerBox({super.key});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Consumer2<SessionTimer, VpnConnection>( return Consumer<SessionTimer>(
builder: (context, timer, vpn, _) { builder: (context, timer, _) {
final isConnecting = vpn.status == VpnStatus.connecting;
final isSyncing = vpn.status == VpnStatus.connected && !timer.hasSyncedOnce;
final showIndicator = isConnecting || isSyncing;
return Container( return Container(
padding: const EdgeInsets.symmetric(horizontal: 28, vertical: 14), padding: const EdgeInsets.symmetric(horizontal: 28, vertical: 14),
decoration: BoxDecoration( decoration: BoxDecoration(
@@ -22,11 +17,7 @@ class TimerBox extends StatelessWidget {
borderRadius: BorderRadius.circular(16), borderRadius: BorderRadius.circular(16),
border: Border.all(color: AppColors.slate15), border: Border.all(color: AppColors.slate15),
), ),
child: Column( child: Text(
mainAxisSize: MainAxisSize.min,
children: [
// Countdown
Text(
timer.hasSyncedOnce ? timer.formatted : '00:00:00', timer.hasSyncedOnce ? timer.formatted : '00:00:00',
style: TextStyle( style: TextStyle(
fontSize: 32, fontSize: 32,
@@ -45,36 +36,6 @@ class TimerBox extends StatelessWidget {
: [], : [],
), ),
), ),
// 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,
),
),
const SizedBox(width: 8),
Text(
isConnecting ? 'Connecting…' : 'Syncing…',
style: const TextStyle(
fontSize: 12,
color: AppColors.accent60,
fontWeight: FontWeight.w600,
letterSpacing: 1,
),
),
],
),
],
],
),
); );
}, },
); );