Skip to content

Commit 16919d4

Browse files
authored
v1.37.2 (#146)
* refactor: AppBottomBar * fix: fail to start proxy * feat: AppHeaderBar * feat: AppBody * feat: format min bytes to KB * perf: disable traffic data when window is hidden * chore: upgrade deps * chore: update CHANGELOG * chore: update CHANGELOG * chore: bump version to 1.37.2-beat.0 * feat: hide window on startup * fix: fail to hide on startup * feat: expose exitApp method to webview * feat: notifier users for running in background * chore: update CHANGELOG * chore: v1.37.2-beat.0 * refactor: remove unused code for macOS * fix: fail to start proxy because of timeout * chore: update CHANGELOG * chore: v1.37.2
1 parent 7ef74c7 commit 16919d4

17 files changed

Lines changed: 595 additions & 391 deletions

CHANGELOG.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,17 @@
22

33
### New features
44

5-
* feat: app bottom bar in Light Client Mode
5+
* feat: hide the window on launch at startup on windows
6+
* feat: limit traffic data of bottom bar to KB
67

78
### Bug fixes 🐛
89

9-
* fix: invalid app state when window is focused
10+
* fix: fail to start because of api timeout
11+
12+
13+
### Other changes
14+
15+
* chore: upgrade dependencies
16+
* perf: improve memory usage
1017

1118

lib/const/const.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'dart:io';
2+
23
import 'package:path/path.dart' as path;
34

45
class LuxCoreName {
@@ -37,13 +38,13 @@ class Paths {
3738
static Directory get assetsBin {
3839
return Directory(path.join(assets.path, 'bin'));
3940
}
41+
4042
static String get appIcon {
41-
return path.join(assets.path, Platform.isWindows
42-
? 'app_icon.ico'
43-
: 'tray.icns');
43+
return path.join(
44+
assets.path, Platform.isWindows ? 'app_icon.ico' : 'tray.icns');
4445
}
4546
}
4647

4748
const darkBackgroundColor = 0xff292929;
4849

49-
50+
const launchFromStartupArg = 'launch_from_startup';

lib/core_manager.dart

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,27 @@ class CoreManager {
150150
}
151151

152152
Future<void> stop() async {
153-
await dio.post('$baseHttpUrl/manager/stop');
153+
await dio.post('$baseHttpUrl/manager/stop',
154+
options: Options(
155+
sendTimeout: const Duration(seconds: 10),
156+
receiveTimeout: const Duration(seconds: 10),
157+
));
154158
}
155159

156160
Future<void> start() async {
157-
await dio.post('$baseHttpUrl/manager/start');
161+
await dio.post('$baseHttpUrl/manager/start',
162+
options: Options(
163+
sendTimeout: const Duration(seconds: 10),
164+
receiveTimeout: const Duration(seconds: 10),
165+
));
158166
}
159167

160168
Future<bool> getIsStarted() async {
161-
final managerRes = await dio.get('$baseHttpUrl/manager');
169+
final managerRes = await dio.get('$baseHttpUrl/manager',
170+
options: Options(
171+
sendTimeout: const Duration(seconds: 10),
172+
receiveTimeout: const Duration(seconds: 10),
173+
));
162174
var isStarted = managerRes.data['isStarted'];
163175
if (isStarted is bool) {
164176
return isStarted;

0 commit comments

Comments
 (0)