From 3025eec915dfbf2baf0812ca2c51dee3b0485602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=AF=E4=BD=B3?= <13101321+jfen5577@user.noreply.gitee.com> Date: Thu, 31 Jul 2025 17:19:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B5=8B=E8=AF=95=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E4=BF=AE=E6=94=B9=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/Users.csv | 2 +- kv/app.kv | 425 +++++++++++++++++++++++++------------------------ 2 files changed, 216 insertions(+), 211 deletions(-) diff --git a/data/Users.csv b/data/Users.csv index 8bb8c66..de5b514 100644 --- a/data/Users.csv +++ b/data/Users.csv @@ -1,3 +1,3 @@ User,User_pass,Wifi_SSID,Modbus_IP,Modbus_Port,NFC_ID,Reserve -正式测试,0000,zhizhan-2,10.10.100.254,8899,0000,1111 +正式测试,0000,zhizhan-2,10.10.100.254,8899,0000,9999 正式用户,0000,USR-DR404_3EB0,10.10.100.254,8899,0000,0000 diff --git a/kv/app.kv b/kv/app.kv index 7f7b90c..a293ccd 100644 --- a/kv/app.kv +++ b/kv/app.kv @@ -691,224 +691,229 @@ ScreenManager: root.manager.current= "profile" app.on_press_back_arrow() app.secure_profile() + ScrollView: + size_hint: 1, None + height: self.parent.height - dp(150) + pos_hint: {'top':0.895} + MDList: + id : image_label_grid + padding: "20dp", "40dp", "12dp", "17dp" + spacing: "50dp" - MDLabel: - text: "User" - color: rgba(0, 0, 0, 255) - font_name: "BPoppins" - font_size: '15sp' - pos_hint: {'center_x': 0.5, 'center_y': 0.90} - size_hint_x: None - width: dp(335) - MDLabel: - text: "User_pass" - color: rgba(0, 0, 0, 255) - font_name: "BPoppins" - font_size: '15sp' - pos_hint: {'center_x': 0.5, 'center_y': 0.78} - size_hint_x: None - width: dp(335) - MDLabel: - text: "Wifi_SSID" - color: rgba(0, 0, 0, 255) - font_name: "BPoppins" - font_size: '15sp' - pos_hint: {'center_x': 0.5, 'center_y': 0.66} - size_hint_x: None - width: dp(335) - MDLabel: - text: "Modbus_IP" - color: rgba(0, 0, 0, 255) - font_name: "BPoppins" - font_size: '15sp' - pos_hint: {'center_x': 0.5, 'center_y': 0.54} - size_hint_x: None - width: dp(335) - MDLabel: - text: "Modbus_Port" - color: rgba(0, 0, 0, 255) - font_name: "BPoppins" - font_size: '15sp' - pos_hint: {'center_x': 0.5, 'center_y': 0.42} - size_hint_x: None - width: dp(335) - MDLabel: - text: "Reserve" - color: rgba(0, 0, 0, 255) - font_name: "BPoppins" - font_size: '15sp' - pos_hint: {'center_x': 0.5, 'center_y': 0.30} - size_hint_x: None - width: dp(335) + MDLabel: + text: "User" + color: rgba(0, 0, 0, 255) + font_name: "BPoppins" + font_size: '15sp' + pos_hint: {'center_x': 0.5, 'center_y': 0.90} + size_hint_x: None + width: dp(335) + MDLabel: + text: "User_pass" + color: rgba(0, 0, 0, 255) + font_name: "BPoppins" + font_size: '15sp' + pos_hint: {'center_x': 0.5, 'center_y': 0.78} + size_hint_x: None + width: dp(335) + MDLabel: + text: "Wifi_SSID" + color: rgba(0, 0, 0, 255) + font_name: "BPoppins" + font_size: '15sp' + pos_hint: {'center_x': 0.5, 'center_y': 0.66} + size_hint_x: None + width: dp(335) + MDLabel: + text: "Modbus_IP" + color: rgba(0, 0, 0, 255) + font_name: "BPoppins" + font_size: '15sp' + pos_hint: {'center_x': 0.5, 'center_y': 0.54} + size_hint_x: None + width: dp(335) + MDLabel: + text: "Modbus_Port" + color: rgba(0, 0, 0, 255) + font_name: "BPoppins" + font_size: '15sp' + pos_hint: {'center_x': 0.5, 'center_y': 0.42} + size_hint_x: None + width: dp(335) + MDLabel: + text: "Reserve" + color: rgba(0, 0, 0, 255) + font_name: "BPoppins" + font_size: '15sp' + pos_hint: {'center_x': 0.5, 'center_y': 0.30} + size_hint_x: None + width: dp(335) - MDTextField: - id: edit_user_name - text: "" - hint_text: "Enter Name*" - font_name: "MPoppins" - font_size: "15sp" - helper_text: "Provide your fullname" - helper_text_mode: "on_focus" - icon_right: "alphabetical" - icon_color: app.theme_cls.primary_color - pos_hint: {"center_x": 0.5, "center_y": 0.8425} - size_hint_x: None - width: dp(335) - on_touch_down: app.change_cursor(True) - on_touch_up: app.change_cursor(False) - canvas.before: - Color: - rgb: rgba(127, 127, 127, 255) - Line: - width: dp(0.5) - rounded_rectangle: self.x-5, self.y+20, self.width+10, self.height-25, 10,10,10,10,100 + MDTextField: + id: edit_user_name + text: "" + hint_text: "Enter Name*" + font_name: "MPoppins" + font_size: "15sp" + helper_text: "Provide your fullname" + helper_text_mode: "on_focus" + icon_right: "alphabetical" + icon_color: app.theme_cls.primary_color + pos_hint: {"center_x": 0.5, "center_y": 0.8425} + size_hint_x: None + width: dp(335) + on_touch_down: app.change_cursor(True) + on_touch_up: app.change_cursor(False) + canvas.before: + Color: + rgb: rgba(127, 127, 127, 255) + Line: + width: dp(0.5) + rounded_rectangle: self.x-5, self.y+20, self.width+10, self.height-25, 10,10,10,10,100 - MDTextField: - id: edit_user_pass - text: "" - hint_text: "User_pass*" - font_name: "MPoppins" - font_size: "15sp" - helper_text: "Provide your password" - helper_text_mode: "on_focus" - readonly: True - icon_right: "dialpad" - input_filter: 'int' - max_text_length: 8 - icon_color: app.theme_cls.primary_color - pos_hint: {"center_x": 0.5, "center_y": 0.7225} - size_hint_x: None - width: dp(335) - on_touch_down: app.change_cursor(True) - on_touch_up: app.change_cursor(False) - canvas.before: - Color: - rgb: rgba(127, 127, 127, 255) - Line: - width: dp(0.5) - rounded_rectangle: self.x-5, self.y+20, self.width+10, self.height-25, 10,10,10,10,100 - MDTextField: - id: edit_modbus_ip - text: "" - hint_text: "Modbus_IP*" - font_name: "MPoppins" - font_size: "15sp" - readonly: True - helper_text: "Provide your Modbus_IP" - helper_text_mode: "on_focus" - icon_right: "network" - min_text_length: 11 - icon_color: app.theme_cls.primary_color - pos_hint: {"center_x": 0.5, "center_y": 0.6025} - size_hint_x: None - width: dp(335) - on_touch_down: app.change_cursor(True) - on_touch_up: app.change_cursor(False) - canvas.before: - Color: - rgb: rgba(127, 127, 127, 255) - Line: - width: 0.5 - rounded_rectangle: self.x-5, self.y+20, self.width+10, self.height-25, 10,10,10,10,100 - - MDTextField: - id:edit_modbus_port - text: "" - hint_text: "Modbus_Port*" - font_name: "MPoppins" - font_size: "15sp" - readonly: True - helper_text: "unable to change number directly" - helper_text_mode: "on_focus" - icon_right: "dialpad" - icon_color: app.theme_cls.primary_color - input_filter: 'int' - max_text_length: 10 - pos_hint: {"center_x": 0.5, "center_y": 0.4825} - size_hint_x: None - width: dp(335) - on_touch_down: app.change_cursor(True) - on_touch_up: app.change_cursor(False) - canvas.before: - Color: - rgb: rgba(127, 127, 127, 255) - Line: - width: dp(0.5) - rounded_rectangle: self.x-5, self.y+20, self.width+10, self.height-25, 10,10,10,10,100 - - MDTextField: - id: edit_nfc_id - text: "" - hint_text: "NFC_ID*" - font_name: "MPoppins" - font_size: "15sp" - helper_text: "Provide your NFC_ID" - helper_text_mode: "on_focus" - icon_right: "nfc" - min_text_length: 11 - icon_color: app.theme_cls.primary_color - pos_hint: {"center_x": 0.5, "center_y": 0.3625} - size_hint_x: None - width: dp(335) - on_touch_down: app.change_cursor(True) - on_touch_up: app.change_cursor(False) - canvas.before: - Color: - rgb: rgba(127, 127, 127, 255) - Line: - width: 0.5 - rounded_rectangle: self.x-5, self.y+20, self.width+10, self.height-25, 10,10,10,10,100 - - MDTextField: - id: edit_wifi_ssid - text: "" - hint_text: "wifi ssid*" - font_name: "MPoppins" - font_size: "15sp" - helper_text: "Provide your wifi ssid" - helper_text_mode: "on_focus" - icon_right: "roman-numeral-2" - min_text_length: 11 - icon_color: app.theme_cls.primary_color - pos_hint: {"center_x": 0.5, "center_y": 0.2425} - size_hint_x: None - width: dp(335) - on_touch_down: app.change_cursor(True) - on_touch_up: app.change_cursor(False) - canvas.before: - Color: - rgb: rgba(127, 127, 127, 255) - Line: - width: dp(0.5) - rounded_rectangle: self.x-5, self.y+20, self.width+10, self.height-25, 10,10,10,10,100 - - MDTextField: - id: edit_reserve - text: "" - hint_text: "Reserve*" - font_name: "MPoppins" - font_size: "15sp" - helper_text: "Provide your Reserve" - helper_text_mode: "on_focus" - icon_right: "nfc" - min_text_length: 11 - icon_color: app.theme_cls.primary_color - pos_hint: {"center_x": 0.5, "center_y": 0.1225} - size_hint_x: None - width: dp(335) - on_touch_down: app.change_cursor(True) - on_touch_up: app.change_cursor(False) - canvas.before: - Color: - rgb: rgba(127, 127, 127, 255) - Line: - width: dp(0.5) - rounded_rectangle: self.x-5, self.y+20, self.width+10, self.height-25, 10,10,10,10,100 + MDTextField: + id: edit_user_pass + text: "" + hint_text: "User_pass*" + font_name: "MPoppins" + font_size: "15sp" + helper_text: "Provide your password" + helper_text_mode: "on_focus" + readonly: True + icon_right: "dialpad" + input_filter: 'int' + max_text_length: 8 + icon_color: app.theme_cls.primary_color + pos_hint: {"center_x": 0.5, "center_y": 0.7225} + size_hint_x: None + width: dp(335) + on_touch_down: app.change_cursor(True) + on_touch_up: app.change_cursor(False) + canvas.before: + Color: + rgb: rgba(127, 127, 127, 255) + Line: + width: dp(0.5) + rounded_rectangle: self.x-5, self.y+20, self.width+10, self.height-25, 10,10,10,10,100 + MDTextField: + id: edit_modbus_ip + text: "" + hint_text: "Modbus_IP*" + font_name: "MPoppins" + font_size: "15sp" + readonly: True + helper_text: "Provide your Modbus_IP" + helper_text_mode: "on_focus" + icon_right: "network" + min_text_length: 11 + icon_color: app.theme_cls.primary_color + pos_hint: {"center_x": 0.5, "center_y": 0.6025} + size_hint_x: None + width: dp(335) + on_touch_down: app.change_cursor(True) + on_touch_up: app.change_cursor(False) + canvas.before: + Color: + rgb: rgba(127, 127, 127, 255) + Line: + width: 0.5 + rounded_rectangle: self.x-5, self.y+20, self.width+10, self.height-25, 10,10,10,10,100 + MDTextField: + id:edit_modbus_port + text: "" + hint_text: "Modbus_Port*" + font_name: "MPoppins" + font_size: "15sp" + readonly: True + helper_text: "unable to change number directly" + helper_text_mode: "on_focus" + icon_right: "dialpad" + icon_color: app.theme_cls.primary_color + input_filter: 'int' + max_text_length: 10 + pos_hint: {"center_x": 0.5, "center_y": 0.4825} + size_hint_x: None + width: dp(335) + on_touch_down: app.change_cursor(True) + on_touch_up: app.change_cursor(False) + canvas.before: + Color: + rgb: rgba(127, 127, 127, 255) + Line: + width: dp(0.5) + rounded_rectangle: self.x-5, self.y+20, self.width+10, self.height-25, 10,10,10,10,100 + MDTextField: + id: edit_nfc_id + text: "" + hint_text: "NFC_ID*" + font_name: "MPoppins" + font_size: "15sp" + helper_text: "Provide your NFC_ID" + helper_text_mode: "on_focus" + icon_right: "nfc" + min_text_length: 11 + icon_color: app.theme_cls.primary_color + pos_hint: {"center_x": 0.5, "center_y": 0.3625} + size_hint_x: None + width: dp(335) + on_touch_down: app.change_cursor(True) + on_touch_up: app.change_cursor(False) + canvas.before: + Color: + rgb: rgba(127, 127, 127, 255) + Line: + width: 0.5 + rounded_rectangle: self.x-5, self.y+20, self.width+10, self.height-25, 10,10,10,10,100 + MDTextField: + id: edit_wifi_ssid + text: "" + hint_text: "wifi ssid*" + font_name: "MPoppins" + font_size: "15sp" + helper_text: "Provide your wifi ssid" + helper_text_mode: "on_focus" + icon_right: "roman-numeral-2" + min_text_length: 11 + icon_color: app.theme_cls.primary_color + pos_hint: {"center_x": 0.5, "center_y": 0.2425} + size_hint_x: None + width: dp(335) + on_touch_down: app.change_cursor(True) + on_touch_up: app.change_cursor(False) + canvas.before: + Color: + rgb: rgba(127, 127, 127, 255) + Line: + width: dp(0.5) + rounded_rectangle: self.x-5, self.y+20, self.width+10, self.height-25, 10,10,10,10,100 + + MDTextField: + id: edit_reserve + text: "" + hint_text: "Reserve*" + font_name: "MPoppins" + font_size: "15sp" + helper_text: "Provide your Reserve" + helper_text_mode: "on_focus" + icon_right: "nfc" + min_text_length: 11 + icon_color: app.theme_cls.primary_color + pos_hint: {"center_x": 0.5, "center_y": 0.1225} + size_hint_x: None + width: dp(335) + on_touch_down: app.change_cursor(True) + on_touch_up: app.change_cursor(False) + canvas.before: + Color: + rgb: rgba(127, 127, 127, 255) + Line: + width: dp(0.5) + rounded_rectangle: self.x-5, self.y+20, self.width+10, self.height-25, 10,10,10,10,100 Button: text: "保存配置"