branding fixes
This commit is contained in:
@@ -23,6 +23,7 @@ import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
import 'package:weblibre/core/branding/proxy_brands.dart';
|
||||
import 'package:weblibre/features/proxy/data/models/proxy_log_message.dart';
|
||||
import 'package:weblibre/features/proxy/domain/repositories/singbox_proxy_logs.dart';
|
||||
import 'package:weblibre/utils/ui_helper.dart';
|
||||
@@ -202,7 +203,7 @@ class _EmptyLogs extends StatelessWidget {
|
||||
child: Text(
|
||||
hasFilter
|
||||
? 'No log lines match the current filter.'
|
||||
: 'No log lines yet. Start a proxy or Tor to see output here.',
|
||||
: 'No log lines yet. Start a proxy or $torBrand to see output here.',
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
|
||||
+26
@@ -22,6 +22,8 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:flutter_singbox_proxy/flutter_singbox_proxy.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
|
||||
import 'package:weblibre/core/branding/proxy_brands.dart';
|
||||
import 'package:weblibre/features/proxy/data/forms/singbox_form_specs.dart';
|
||||
import 'package:weblibre/features/proxy/data/models/proxy_profile_seed.dart';
|
||||
import 'package:weblibre/features/proxy/domain/extensions/singbox_proxy_profile_type_x.dart';
|
||||
@@ -161,6 +163,10 @@ class _Editor extends ConsumerWidget {
|
||||
?.copyWith(color: scheme.onSurfaceVariant),
|
||||
),
|
||||
),
|
||||
if (draft.type == SingboxProxyProfileType.wireguard) ...[
|
||||
const SizedBox(height: 12),
|
||||
const _WireGuardDisclaimer(),
|
||||
],
|
||||
]),
|
||||
),
|
||||
),
|
||||
@@ -173,6 +179,26 @@ class _Editor extends ConsumerWidget {
|
||||
}
|
||||
}
|
||||
|
||||
class _WireGuardDisclaimer extends StatelessWidget {
|
||||
const _WireGuardDisclaimer();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final scheme = Theme.of(context).colorScheme;
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 4),
|
||||
child: Text(
|
||||
'$wireGuardBrand is a registered trademark of Jason A. Donenfeld; all '
|
||||
'rights reserved. WebLibre is not endorsed or sponsored by, or '
|
||||
'affiliated with, Jason A. Donenfeld.',
|
||||
style: Theme.of(
|
||||
context,
|
||||
).textTheme.bodySmall?.copyWith(color: scheme.onSurfaceVariant),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _GeneralSection extends HookConsumerWidget {
|
||||
final ProxyProfileDraftProvider draftProvider;
|
||||
final ProxyProfileDraftState draft;
|
||||
|
||||
@@ -22,6 +22,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:qr_code_scanner_plus/qr_code_scanner_plus.dart';
|
||||
import 'package:weblibre/core/branding/proxy_brands.dart';
|
||||
import 'package:weblibre/features/proxy/data/models/proxy_profile_seed.dart';
|
||||
import 'package:weblibre/features/proxy/domain/services/proxy_input_consumer.dart';
|
||||
import 'package:weblibre/features/qr_scanner/presentation/dialogs/qr_scanner_dialog.dart';
|
||||
@@ -274,7 +275,7 @@ class _FileKindPicker extends StatelessWidget {
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.vpn_lock),
|
||||
title: const Text('WireGuard config'),
|
||||
title: const Text(wireGuardConfigLabel),
|
||||
subtitle: const Text('.conf file with [Interface]/[Peer]'),
|
||||
onTap: () =>
|
||||
Navigator.of(context).pop(ProxyFileImportKind.wireguardConf),
|
||||
|
||||
+2
-1
@@ -22,6 +22,7 @@ import 'dart:convert';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:weblibre/core/branding/proxy_brands.dart';
|
||||
import 'package:weblibre/features/proxy/presentation/controllers/proxy_profile_draft_controller.dart';
|
||||
import 'package:weblibre/features/user/data/models/proxy_dns_override.dart';
|
||||
|
||||
@@ -87,7 +88,7 @@ class ProfileDnsOverrideSection extends HookConsumerWidget {
|
||||
children: [
|
||||
Text(
|
||||
'Resolve names through a server reachable inside this profile '
|
||||
'(e.g. an internal DoH server behind a corporate WireGuard). '
|
||||
'(e.g. an internal DoH server behind a corporate $wireGuardBrand tunnel). '
|
||||
'Leave off to use automatic DNS handling.',
|
||||
style: Theme.of(context).textTheme.bodySmall,
|
||||
),
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
*/
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:weblibre/core/branding/proxy_brands.dart';
|
||||
import 'package:weblibre/core/logger.dart';
|
||||
import 'package:weblibre/core/routing/routes.dart';
|
||||
import 'package:weblibre/features/proxy/data/proxy_connection.dart';
|
||||
@@ -72,7 +73,7 @@ class TorProfileTile extends ConsumerWidget {
|
||||
child: Icon(TorIcons.onionAlt, color: foreground, size: 24),
|
||||
),
|
||||
title: Text(
|
||||
'Tor',
|
||||
torBrand,
|
||||
style: TextStyle(
|
||||
fontWeight: isRunning ? FontWeight.w600 : FontWeight.w500,
|
||||
),
|
||||
@@ -145,8 +146,8 @@ class TorProfileTile extends ConsumerWidget {
|
||||
showErrorMessage(
|
||||
context,
|
||||
isRunning
|
||||
? 'Failed to stop Tor: $error'
|
||||
: 'Failed to start Tor: $error',
|
||||
? 'Failed to stop $torBrand: $error'
|
||||
: 'Failed to start $torBrand: $error',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user