mirror of
https://github.com/wanghongenpin/proxypin.git
synced 2026-03-15 04:23:17 +08:00
update mobile drawer menu
This commit is contained in:
@@ -69,25 +69,27 @@ class NewVersionDialog extends StatelessWidget {
|
||||
],
|
||||
))),
|
||||
actions: [
|
||||
if (canIgnore)
|
||||
Wrap(alignment: WrapAlignment.end, children: [
|
||||
if (canIgnore)
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
SharedPreferencesAsync().setString(Constants.ignoreReleaseVersionKey, newVersion.version);
|
||||
logger.i("ignored release [${newVersion.version}]");
|
||||
if (context.mounted) Navigator.pop(context);
|
||||
},
|
||||
child: Text(localizations.appUpdateIgnoreBtnTxt),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
child: Text(localizations.appUpdateLaterBtnTxt),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
SharedPreferencesAsync().setString(Constants.ignoreReleaseVersionKey, newVersion.version);
|
||||
logger.i("ignored release [${newVersion.version}]");
|
||||
if (context.mounted) Navigator.pop(context);
|
||||
await launchUrl(Uri.parse(newVersion.url), mode: LaunchMode.externalApplication);
|
||||
},
|
||||
child: Text(localizations.appUpdateIgnoreBtnTxt),
|
||||
child: Text(localizations.appUpdateUpdateNowBtnTxt),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
child: Text(localizations.appUpdateLaterBtnTxt),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
await launchUrl(Uri.parse(newVersion.url), mode: LaunchMode.externalApplication);
|
||||
},
|
||||
child: Text(localizations.appUpdateUpdateNowBtnTxt),
|
||||
),
|
||||
])
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -19,12 +19,14 @@ import 'package:flutter/material.dart';
|
||||
import 'package:proxypin/l10n/app_localizations.dart';
|
||||
import 'package:proxypin/network/bin/server.dart';
|
||||
import 'package:proxypin/network/components/host_filter.dart';
|
||||
import 'package:proxypin/network/components/manager/hosts_manager.dart';
|
||||
import 'package:proxypin/network/components/manager/request_block_manager.dart';
|
||||
import 'package:proxypin/network/components/manager/request_breakpoint_manager.dart';
|
||||
import 'package:proxypin/network/components/manager/request_rewrite_manager.dart';
|
||||
import 'package:proxypin/network/http/http.dart';
|
||||
import 'package:proxypin/network/util/system_proxy.dart';
|
||||
import 'package:proxypin/storage/histories.dart';
|
||||
import 'package:proxypin/ui/mobile/setting/hosts.dart';
|
||||
import 'package:proxypin/ui/mobile/setting/request_breakpoint.dart';
|
||||
import 'package:proxypin/ui/mobile/setting/request_map.dart';
|
||||
import 'package:proxypin/ui/toolbox/toolbox.dart';
|
||||
@@ -78,15 +80,19 @@ class DrawerWidget extends StatelessWidget {
|
||||
width: 52,
|
||||
))),
|
||||
const SizedBox(width: 12),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text('ProxyPin', style: Theme.of(context).textTheme.titleLarge),
|
||||
const SizedBox(height: 4),
|
||||
Text(isCN ? "全平台开源免费抓包软件" : "Full platform open source free capture HTTP(S) traffic software",
|
||||
maxLines: 2, overflow: TextOverflow.ellipsis, style: Theme.of(context).textTheme.bodySmall)
|
||||
])
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text('ProxyPin', style: Theme.of(context).textTheme.titleLarge),
|
||||
const SizedBox(height: 4),
|
||||
Text(isCN ? "全平台开源免费抓包软件" : "Full platform open source free capture HTTP(S) traffic software",
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: Theme.of(context).textTheme.bodySmall)
|
||||
]),
|
||||
)
|
||||
])),
|
||||
// Favorites & History
|
||||
ListTile(
|
||||
@@ -119,6 +125,15 @@ class DrawerWidget extends StatelessWidget {
|
||||
title: Text(localizations.filter),
|
||||
leading: const Icon(Icons.filter_alt_outlined),
|
||||
onTap: () => navigator(context, FilterMenu(proxyServer: proxyServer))),
|
||||
ListTile(
|
||||
title: Text(localizations.hosts),
|
||||
leading: Icon(Icons.domain),
|
||||
onTap: () async {
|
||||
var hostsManager = await HostsManager.instance;
|
||||
if (context.mounted) {
|
||||
navigator(context, HostsPage(hostsManager: hostsManager));
|
||||
}
|
||||
}),
|
||||
ListTile(
|
||||
title: Text(localizations.requestBlock),
|
||||
leading: const Icon(Icons.block_flipped),
|
||||
@@ -274,7 +289,8 @@ class _SettingPage extends StatelessWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 15),
|
||||
child: Row(children: [
|
||||
Column(
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(localizations.proxyIgnoreDomain, style: const TextStyle(fontSize: 14)),
|
||||
@@ -282,7 +298,7 @@ class _SettingPage extends StatelessWidget {
|
||||
Text(isEn ? "Use ';' to separate multiple entries" : "多个使用;分割",
|
||||
style: TextStyle(fontSize: 11, color: Colors.grey.shade600)),
|
||||
],
|
||||
),
|
||||
)),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 35),
|
||||
child: TextButton(
|
||||
|
||||
@@ -190,7 +190,7 @@ class RequestRowState extends State<RequestRow> {
|
||||
}
|
||||
|
||||
///菜单
|
||||
menu(details) {
|
||||
void menu(details) {
|
||||
setState(() {
|
||||
selected = true;
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
import 'package:test/test.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
test('Parsed IPv6 authority correctly', () {
|
||||
|
||||
Reference in New Issue
Block a user