Sync desktop daily logs and fix emulator ADB upstream connections
This commit is contained in:
1 parent
87e1fff59b
commit
0d269f3ded
15 files changed
+139
-12
No files matched your search
@@ -35,6 +35,17 @@ class ManagerModel extends ChangeNotifier {
|
||||
List<Map<String, dynamic>> nodes = [];
|
||||
final List<String> logs = [];
|
||||
late final DailyLog diskLog;
|
||||
Future<void> openLogDirectory() => action(() async {
|
||||
await diskLog.directory.create(recursive: true);
|
||||
final command = Platform.isWindows
|
||||
? 'explorer.exe'
|
||||
: Platform.isMacOS
|
||||
? 'open'
|
||||
: 'xdg-open';
|
||||
await Process.start(command, [
|
||||
logDirectory,
|
||||
], mode: ProcessStartMode.detached);
|
||||
});
|
||||
String get logDirectory => diskLog.directory.path;
|
||||
final Set<String> pending = {};
|
||||
String notice = '正在初始化', adbListing = '';
|
||||
|
||||
@@ -562,6 +562,10 @@ class _ManagerViewState extends State<ManagerView> {
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
TextButton(
|
||||
onPressed: m.openLogDirectory,
|
||||
child: const Text('打开日志文件夹'),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () =>
|
||||
Clipboard.setData(ClipboardData(text: m.logs.join('\n'))),
|
||||
|
||||
Reference in new issue
Block a user