周睿 1 anno fa
parent
commit
42f91bfbaa

+ 1 - 0
app_business/android/app/src/main/AndroidManifest.xml

@@ -1,4 +1,5 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android">
+    <uses-permission android:name="android.permission.INTERNET"/>
     <application
         android:label="彩图奔跑场控"
         android:name="${applicationName}"

+ 1 - 1
app_business/android/gradle/wrapper/gradle-wrapper.properties

@@ -2,5 +2,5 @@ distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip
 

+ 3 - 1
app_business/justfile

@@ -1,4 +1,6 @@
 #!/usr/bin/env just --justfile
-
+proto:
+    protoc -I ../protos/app_api track_offical.proto --dart_out=grpc:lib/generated google/protobuf/timestamp.proto google/protobuf/duration.proto google/protobuf/any.proto
+    protoc -I ../protos/app_api base.proto --dart_out=grpc:lib/generated google/protobuf/timestamp.proto google/protobuf/duration.proto google/protobuf/any.proto
 apk:
     flutter build apk --split-per-abi

+ 15 - 1
app_business/lib/view/home/event_manage/event_manage.dart

@@ -201,7 +201,21 @@ class EventManage extends GetView<EventManagerController> {
                 color: Colors.blue,
                 onPressed: () => routeSelect(one),
                 text: '分发')
-            : Text(one.routeName, maxLines: 1),
+            : Row(mainAxisSize: MainAxisSize.min, children: [
+                Expanded(
+                    child: Text(
+                  one.routeName,
+                  maxLines: 1,
+                  style: const TextStyle(overflow: TextOverflow.ellipsis),
+                )),
+                SizedBox(
+                    width: 32,
+                    child: one.state == UserState.hasRoute
+                        ? GestureDetector(
+                            onTap: () => routeSelect(one),
+                            child: const Icon(Icons.mode_edit_outline))
+                        : const SizedBox())
+              ]),
         one.state == UserState.hasRoute
             ? button(
                 color: Colors.green,

+ 31 - 5
app_business/lib/view/home/field_control.dart

@@ -43,8 +43,8 @@ class FieldControlPageImpl extends FieldControlPage {
         ..regName = r.name
         ..startAt = r.startAt.toPb()
         ..stopAt = r.stopAt.toPb()
-        ..isQueryPwd = r.password != null
-        ..queryPasswd = r.password ?? '');
+        ..isQueryPwd = r.passwordQuery != null
+        ..queryPasswd = r.passwordQuery ?? '');
     }
   }
 }
@@ -60,6 +60,7 @@ class RegisterInfo {
   var startAt = DateTime.now();
   var stopAt = DateTime.now();
   String? password;
+  String? passwordQuery;
 }
 
 class FieldControlControllerImpl extends FieldControlController {
@@ -84,7 +85,9 @@ class RegisterDialogController extends GetxController {
   final selected = Rx<EventInfo?>(null);
   final eventList = <EventInfo>[].obs;
   final hasPassword = false.obs;
+  final hasPasswordQuery = false.obs;
   var password = '';
+  var passwordQuery = '';
   late final int mapId;
   final api = Get.find<ApiService>();
 
@@ -188,6 +191,27 @@ class RegisterDialog extends GetView<RegisterDialogController> {
                               }))),
                     ]),
                     const SizedBox(height: 21.34),
+                    Row(
+                      mainAxisSize: MainAxisSize.min,
+                      children: [
+                        Obx(() => Switch(
+                            value: c.hasPasswordQuery.value,
+                            onChanged: (v) {
+                              c.hasPasswordQuery.value = v;
+                            })),
+                        const Text('查询密码'),
+                        const SizedBox(width: 12),
+                        Obx(() => Expanded(
+                            child: Visibility(
+                                visible: c.hasPasswordQuery.value,
+                                child: _TextField(
+                                    hint: '请输入密码',
+                                    onChanged: (v) {
+                                      c.passwordQuery = v;
+                                    })))),
+                      ],
+                    ),
+                    const SizedBox(height: 6),
                     Row(
                       mainAxisSize: MainAxisSize.min,
                       children: [
@@ -196,7 +220,7 @@ class RegisterDialog extends GetView<RegisterDialogController> {
                             onChanged: (v) {
                               c.hasPassword.value = v;
                             })),
-                        const Text('查询密码'),
+                        const Text('赛事密码'),
                         const SizedBox(width: 12),
                         Obx(() => Expanded(
                             child: Visibility(
@@ -265,8 +289,10 @@ class RegisterDialog extends GetView<RegisterDialogController> {
           ..name = controller.registerName
           ..startAt = startAt
           ..stopAt = stopAt
-          ..password =
-              controller.hasPassword.value ? controller.password : null);
+          ..password = controller.hasPassword.value ? controller.password : null
+          ..passwordQuery = controller.hasPasswordQuery.value
+              ? controller.passwordQuery
+              : null);
   }
 
   Future<TimeOfDay?> _showTimePicker(

+ 1 - 1
protos/app_api

@@ -1 +1 @@
-Subproject commit f798ccba34d38e4bb8059ebcf762b9a6d673b6a7
+Subproject commit 829752d471dc1fd10a59110483db3932f3ff8b81