fix: RenderFlex overflow, circular import, remove timer spinner
This commit is contained in:
1 parent
143f5f4eff
commit
56ea53e73b
2 files changed
+29
-58
No files matched your search
@@ -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.
|
||||||
|
|||||||
@@ -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,58 +17,24 @@ 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,
|
timer.hasSyncedOnce ? timer.formatted : '00:00:00',
|
||||||
children: [
|
style: TextStyle(
|
||||||
// Countdown
|
fontSize: 32,
|
||||||
Text(
|
fontWeight: FontWeight.w700,
|
||||||
timer.hasSyncedOnce ? timer.formatted : '00:00:00',
|
color: timer.hasSyncedOnce
|
||||||
style: TextStyle(
|
? AppColors.textWhite
|
||||||
fontSize: 32,
|
: AppColors.slate70,
|
||||||
fontWeight: FontWeight.w700,
|
letterSpacing: 2,
|
||||||
color: timer.hasSyncedOnce
|
shadows: timer.hasSyncedOnce
|
||||||
? AppColors.textWhite
|
? const [
|
||||||
: AppColors.slate70,
|
Shadow(
|
||||||
letterSpacing: 2,
|
color: AppColors.accent50,
|
||||||
shadows: timer.hasSyncedOnce
|
blurRadius: 16,
|
||||||
? 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,
|
|
||||||
),
|
),
|
||||||
),
|
]
|
||||||
const SizedBox(width: 8),
|
: [],
|
||||||
Text(
|
),
|
||||||
isConnecting ? 'Connecting…' : 'Syncing…',
|
|
||||||
style: const TextStyle(
|
|
||||||
fontSize: 12,
|
|
||||||
color: AppColors.accent60,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
letterSpacing: 1,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user