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