|
@@ -43,6 +43,7 @@ class HomeController extends GetxController {
|
|
var userMode = User().obs;
|
|
var userMode = User().obs;
|
|
var UsersysConfig = SysConfig().obs;
|
|
var UsersysConfig = SysConfig().obs;
|
|
var serviceStuatus = false.obs;
|
|
var serviceStuatus = false.obs;
|
|
|
|
+ var coreStuatus = false.obs;
|
|
var connectStatus = Rx<ConnectionStatus>(ConnectionStatus.disconnected);
|
|
var connectStatus = Rx<ConnectionStatus>(ConnectionStatus.disconnected);
|
|
var nodeModes = <NodeMode>[];
|
|
var nodeModes = <NodeMode>[];
|
|
bool get isRunning => connectStatus.value == ConnectionStatus.stopped && controllers.global.allowStatusUpdate;
|
|
bool get isRunning => connectStatus.value == ConnectionStatus.stopped && controllers.global.allowStatusUpdate;
|
|
@@ -300,7 +301,7 @@ class HomeController extends GetxController {
|
|
|
|
|
|
Future<void> installService() async{
|
|
Future<void> installService() async{
|
|
if(serviceStuatus.value == false){
|
|
if(serviceStuatus.value == false){
|
|
- controllers.service.serviceModeSwitch(true);
|
|
|
|
|
|
+ await controllers.service.serviceModeSwitch(true);
|
|
serviceStuatus.value = true;
|
|
serviceStuatus.value = true;
|
|
controllers.global.updateMsg("正在安装服务");
|
|
controllers.global.updateMsg("正在安装服务");
|
|
}
|
|
}
|
|
@@ -308,12 +309,16 @@ class HomeController extends GetxController {
|
|
|
|
|
|
Future<void> UninstallService() async{
|
|
Future<void> UninstallService() async{
|
|
if(serviceStuatus.value){
|
|
if(serviceStuatus.value){
|
|
- controllers.service.serviceModeSwitch(false);
|
|
|
|
|
|
+ await controllers.service.serviceModeSwitch(false);
|
|
serviceStuatus.value = false;
|
|
serviceStuatus.value = false;
|
|
controllers.global.updateMsg("正在卸载服务");
|
|
controllers.global.updateMsg("正在卸载服务");
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+ Future<void> coreRestart() async{
|
|
|
|
+ await controllers.service.reloadClashCore();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
final count = 0.obs;
|
|
final count = 0.obs;
|
|
@override
|
|
@override
|