Skip to content

Commit 029df9d

Browse files
committed
添加移动端复制服务器地址
1 parent 4e62cb5 commit 029df9d

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

lib/mobile/pages/settings_m.dart

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import 'package:bit_flow/getx/store_get.dart';
66
import 'package:bit_flow/getx/theme_get.dart';
77
import 'package:bit_flow/service/funcs.dart';
88
import 'package:bit_flow/types/store_item.dart';
9+
import 'package:clipboard/clipboard.dart';
910
import 'package:dropdown_button2/dropdown_button2.dart';
1011
import 'package:flutter/material.dart';
1112
import 'package:get/get.dart';
@@ -308,16 +309,27 @@ class _SettingsMState extends State<SettingsM> {
308309
subtitle: Text("配置${ storeGet.servers.isEmpty ? "" : storeGet.servers[statusGet.sevrerIndex.value].type==StoreType.aria?'Aria':'qBittorrent'}"),
309310
onTap: ()=>settingComponents.downloaderConfig(context),
310311
),
312+
ListTile(
313+
title: const Text('下载器地址'),
314+
subtitle: Text(
315+
storeGet.servers.isEmpty ? "" : storeGet.servers[statusGet.sevrerIndex.value].url,
316+
overflow: TextOverflow.ellipsis,
317+
),
318+
onTap: () async {
319+
await FlutterClipboard.copy(storeGet.servers[statusGet.sevrerIndex.value].url);
320+
321+
},
322+
),
311323
ListTile(
312324
title: const Text('深色模式'),
313325
subtitle: Text(themeGet.autoDark.value ? "自动" : themeGet.darkMode.value ? "深色" : "浅色"),
314326
onTap: ()=>themeGet.showDarkModeDialog(context),
315327
),
316328
ListTile(
317329
title: const Text('清除所有配置文件'),
318-
subtitle: const Text('开发使用'),
330+
subtitle: const Text('初始化BitFlow'),
319331
onTap: () async {
320-
final ok=await showConfirmDialog(context, "确定要清除所有用户配置文件吗", "这是一个开发用的功能!");
332+
final ok=await showConfirmDialog(context, "清除所有配置文件", "这会清除所有BitFlow数据\n此操作不可撤销");
321333
if(ok){
322334
final prefs=await SharedPreferences.getInstance();
323335
prefs.clear();

0 commit comments

Comments
 (0)