Browse Source

feat: 添加windows错误提醒

Tony 1 month ago
parent
commit
0f1a1c5cf4

+ 7 - 0
lib/app/controllers/core_controller.dart

@@ -556,6 +556,13 @@ class CoreController extends GetxService {
       case Errors.ERROR_REMAIN_TIME:
         errorMessage = Strings.remainTimeEnded.tr;
         break;
+      // 桌面版本错误
+      case Errors.ERROR_RPC_CALL_FAILED:
+        errorMessage = Strings.vpnRPCCallFailed.tr;
+        break;
+      case Errors.ERROR_RPC_RETURN_FALSE:
+        errorMessage = Strings.vpnRPCReturnFalse.tr;
+        break;
     }
     if (code == Errors.ERROR_REMAIN_TIME) {
       AllDialog.showMembershipExpired();

+ 3 - 0
lib/config/translations/strings_enum.dart

@@ -288,6 +288,9 @@ class Strings {
   static const String vpnRouterError = 'VPN router error';
   static const String vpnPermissionDeniedError = 'VPN permission denied';
 
+  static const String vpnRPCCallFailed = 'VPN service communication error';
+  static const String vpnRPCReturnFalse = 'VPN service failed to start';
+
   static const String failedCaptureScreenshot = 'Failed to capture screenshot';
   static const String imageSavedToAlbum =
       'The image has been saved to your local album';