mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: open in browser
Closes #140 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -224,11 +224,7 @@ class _HtmlRenderPageState extends State<HtmlRenderPage>
|
||||
IconButton(
|
||||
tooltip: '用内置浏览器打开',
|
||||
onPressed: () {
|
||||
Get.toNamed('/webview', parameters: {
|
||||
'url': url.startsWith('http') ? url : 'https:$url',
|
||||
'type': 'url',
|
||||
'pageTitle': title,
|
||||
});
|
||||
Utils.handleWebview(url.startsWith('http') ? url : 'https:$url');
|
||||
},
|
||||
icon: const Icon(Icons.open_in_browser_outlined, size: 19),
|
||||
),
|
||||
@@ -250,18 +246,15 @@ class _HtmlRenderPageState extends State<HtmlRenderPage>
|
||||
),
|
||||
PopupMenuItem(
|
||||
onTap: () => {
|
||||
Get.toNamed('/webview', parameters: {
|
||||
'url': url.startsWith('http') ? url : 'https:$url',
|
||||
'type': 'url',
|
||||
'pageTitle': title,
|
||||
}),
|
||||
Utils.handleWebview(
|
||||
url.startsWith('http') ? url : 'https:$url')
|
||||
},
|
||||
child: const Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(Icons.open_in_new, size: 19),
|
||||
SizedBox(width: 10),
|
||||
Text('内置浏览器打开'),
|
||||
Text('浏览器打开'),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user