splash screen and status bar color polish

This commit is contained in:
esefxdz committed 2026-08-06 21:47:58 +03:00
1 parent 2d0628c5bb
commit abcb41fb06
10 files changed
+51 -16

No files matched your search

+1
View File
@@ -62,6 +62,7 @@ swarm_total.json
# ── Internal docs (not for public repo) ──────────────────────────────────── # ── Internal docs (not for public repo) ────────────────────────────────────
AGENTS.md AGENTS.md
FRONTEND_POLISH_REVIEW.md
RUNNING.md RUNNING.md
SERVER_DEPLOYMENT.md SERVER_DEPLOYMENT.md
SERVER_NOTES.md SERVER_NOTES.md
Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

After

Width:  |  Height:  |  Size: 174 KiB

+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<color name="splash_bg">#0d1017</color> <color name="splash_bg">#0D1117</color>
</resources> </resources>
+28 -3
View File
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:revoltvpn/logic/app_colors.dart'; import 'package:revoltvpn/logic/app_colors.dart';
import 'package:revoltvpn/components/sidebar_contents/gdpr_button.dart'; import 'package:revoltvpn/components/sidebar_contents/gdpr_button.dart';
import 'package:revoltvpn/components/sidebar_contents/privacy_policy_button.dart'; import 'package:revoltvpn/components/sidebar_contents/privacy_policy_button.dart';
@@ -6,11 +7,35 @@ import 'package:revoltvpn/components/sidebar_contents/info_button.dart';
import 'package:revoltvpn/components/sidebar_contents/discord_link_button.dart'; import 'package:revoltvpn/components/sidebar_contents/discord_link_button.dart';
import 'package:revoltvpn/components/sidebar_contents/website_button.dart'; import 'package:revoltvpn/components/sidebar_contents/website_button.dart';
import 'package:revoltvpn/logic/updater.dart'; import 'package:revoltvpn/logic/updater.dart';
import 'package:revoltvpn/main.dart';
class SidebarDrawer extends StatelessWidget { class SidebarDrawer extends StatefulWidget {
const SidebarDrawer({super.key}); const SidebarDrawer({super.key});
@override
State<SidebarDrawer> createState() => _SidebarDrawerState();
}
class _SidebarDrawerState extends State<SidebarDrawer> {
String _version = '';
@override
void initState() {
super.initState();
_loadVersion();
}
Future<void> _loadVersion() async {
try {
final info = await PackageInfo.fromPlatform();
debugPrint('[Sidebar] PackageInfo version: ${info.version} '
'(build: ${info.buildNumber})');
if (mounted) setState(() => _version = info.version);
} catch (e) {
debugPrint('[Sidebar] PackageInfo failed: $e');
if (mounted) setState(() => _version = '?.?.?');
}
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Drawer( return Drawer(
@@ -109,7 +134,7 @@ class SidebarDrawer extends StatelessWidget {
Padding( Padding(
padding: const EdgeInsets.all(20), padding: const EdgeInsets.all(20),
child: Text('ReVoltVPN · v${ReVoltApp.appVersion}', textAlign: TextAlign.center, child: Text('ReVoltVPN · v$_version', textAlign: TextAlign.center,
style: const TextStyle(color: AppColors.slate, fontSize: 11, letterSpacing: 1), style: const TextStyle(color: AppColors.slate, fontSize: 11, letterSpacing: 1),
), ),
), ),
+17 -10
View File
@@ -26,14 +26,18 @@ class StatusBar extends StatelessWidget {
), ),
child: Row( child: Row(
children: [ children: [
// Connection status // Connection status — wrapped in Flexible to prevent overflow
// on narrow screens (the Row must fit both the status text
// and the online dot without RenderFlex errors).
if (isConnected) ...[ if (isConnected) ...[
Image.asset('assets/finland_flag_256.png', width: 20, height: 20), Image.asset('assets/finland_flag_256.png', width: 20, height: 20),
const SizedBox(width: 8), const SizedBox(width: 8),
const Text('Helsinki, Finland', style: TextStyle( const Flexible(
color: AppColors.accent, fontWeight: FontWeight.w600, child: Text('Helsinki, Finland', style: TextStyle(
fontSize: 13, letterSpacing: 0.5, color: AppColors.accent, fontWeight: FontWeight.w600,
)), fontSize: 13, letterSpacing: 0.5,
), overflow: TextOverflow.ellipsis),
),
] else ...[ ] else ...[
Icon( Icon(
isConnecting ? Icons.sync : Icons.shield_outlined, isConnecting ? Icons.sync : Icons.shield_outlined,
@@ -41,11 +45,14 @@ class StatusBar extends StatelessWidget {
color: isConnecting ? AppColors.accent : AppColors.slate70, color: isConnecting ? AppColors.accent : AppColors.slate70,
), ),
const SizedBox(width: 8), const SizedBox(width: 8),
Text( Flexible(
vpn.statusMessage.toUpperCase(), child: Text(
style: TextStyle( vpn.statusMessage.toUpperCase(),
color: isConnecting ? AppColors.accent : AppColors.slate70, style: TextStyle(
fontWeight: FontWeight.w600, fontSize: 13, letterSpacing: 1, color: isConnecting ? AppColors.accent : AppColors.slate70,
fontWeight: FontWeight.w600, fontSize: 13, letterSpacing: 1,
),
overflow: TextOverflow.ellipsis,
), ),
), ),
], ],
+4 -2
View File
@@ -2,6 +2,7 @@ import 'dart:convert';
import 'dart:io'; import 'dart:io';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;
import 'package:package_info_plus/package_info_plus.dart'; import 'package:package_info_plus/package_info_plus.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
@@ -115,7 +116,8 @@ class Updater {
} }
static Future<void> check(BuildContext context) async { static Future<void> check(BuildContext context) async {
final localVersion = ReVoltApp.appVersion; final info = await PackageInfo.fromPlatform();
final localVersion = info.version;
if (localVersion.isEmpty) { if (localVersion.isEmpty) {
_showSnackBar(context, 'Could not determine app version', _showSnackBar(context, 'Could not determine app version',
isError: true); isError: true);
@@ -176,7 +178,7 @@ class Updater {
content: Row( content: Row(
children: [ children: [
Icon(isError ? Icons.error_outline : Icons.check_circle, Icon(isError ? Icons.error_outline : Icons.check_circle,
color: isError ? AppColors.red400 : AppColors.green400, color: isError ? AppColors.red : AppColors.green,
size: 18), size: 18),
const SizedBox(width: 8), const SizedBox(width: 8),
Text(message), Text(message),