优化测试信息修改项

This commit is contained in:
冯佳
2025-07-31 17:19:34 +08:00
parent 54bf9f6d94
commit 3025eec915
2 changed files with 216 additions and 211 deletions

View File

@ -1,3 +1,3 @@
User,User_pass,Wifi_SSID,Modbus_IP,Modbus_Port,NFC_ID,Reserve 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 正式用户,0000,USR-DR404_3EB0,10.10.100.254,8899,0000,0000

1 User User_pass Wifi_SSID Modbus_IP Modbus_Port NFC_ID Reserve
2 正式测试 0000 zhizhan-2 10.10.100.254 8899 0000 1111 9999
3 正式用户 0000 USR-DR404_3EB0 10.10.100.254 8899 0000 0000

425
kv/app.kv
View File

@ -691,224 +691,229 @@ ScreenManager:
root.manager.current= "profile" root.manager.current= "profile"
app.on_press_back_arrow() app.on_press_back_arrow()
app.secure_profile() 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: MDLabel:
text: "User" text: "User"
color: rgba(0, 0, 0, 255) color: rgba(0, 0, 0, 255)
font_name: "BPoppins" font_name: "BPoppins"
font_size: '15sp' font_size: '15sp'
pos_hint: {'center_x': 0.5, 'center_y': 0.90} pos_hint: {'center_x': 0.5, 'center_y': 0.90}
size_hint_x: None size_hint_x: None
width: dp(335) width: dp(335)
MDLabel: MDLabel:
text: "User_pass" text: "User_pass"
color: rgba(0, 0, 0, 255) color: rgba(0, 0, 0, 255)
font_name: "BPoppins" font_name: "BPoppins"
font_size: '15sp' font_size: '15sp'
pos_hint: {'center_x': 0.5, 'center_y': 0.78} pos_hint: {'center_x': 0.5, 'center_y': 0.78}
size_hint_x: None size_hint_x: None
width: dp(335) width: dp(335)
MDLabel: MDLabel:
text: "Wifi_SSID" text: "Wifi_SSID"
color: rgba(0, 0, 0, 255) color: rgba(0, 0, 0, 255)
font_name: "BPoppins" font_name: "BPoppins"
font_size: '15sp' font_size: '15sp'
pos_hint: {'center_x': 0.5, 'center_y': 0.66} pos_hint: {'center_x': 0.5, 'center_y': 0.66}
size_hint_x: None size_hint_x: None
width: dp(335) width: dp(335)
MDLabel: MDLabel:
text: "Modbus_IP" text: "Modbus_IP"
color: rgba(0, 0, 0, 255) color: rgba(0, 0, 0, 255)
font_name: "BPoppins" font_name: "BPoppins"
font_size: '15sp' font_size: '15sp'
pos_hint: {'center_x': 0.5, 'center_y': 0.54} pos_hint: {'center_x': 0.5, 'center_y': 0.54}
size_hint_x: None size_hint_x: None
width: dp(335) width: dp(335)
MDLabel: MDLabel:
text: "Modbus_Port" text: "Modbus_Port"
color: rgba(0, 0, 0, 255) color: rgba(0, 0, 0, 255)
font_name: "BPoppins" font_name: "BPoppins"
font_size: '15sp' font_size: '15sp'
pos_hint: {'center_x': 0.5, 'center_y': 0.42} pos_hint: {'center_x': 0.5, 'center_y': 0.42}
size_hint_x: None size_hint_x: None
width: dp(335) width: dp(335)
MDLabel: MDLabel:
text: "Reserve" text: "Reserve"
color: rgba(0, 0, 0, 255) color: rgba(0, 0, 0, 255)
font_name: "BPoppins" font_name: "BPoppins"
font_size: '15sp' font_size: '15sp'
pos_hint: {'center_x': 0.5, 'center_y': 0.30} pos_hint: {'center_x': 0.5, 'center_y': 0.30}
size_hint_x: None size_hint_x: None
width: dp(335) width: dp(335)
MDTextField: MDTextField:
id: edit_user_name id: edit_user_name
text: "" text: ""
hint_text: "Enter Name*" hint_text: "Enter Name*"
font_name: "MPoppins" font_name: "MPoppins"
font_size: "15sp" font_size: "15sp"
helper_text: "Provide your fullname" helper_text: "Provide your fullname"
helper_text_mode: "on_focus" helper_text_mode: "on_focus"
icon_right: "alphabetical" icon_right: "alphabetical"
icon_color: app.theme_cls.primary_color icon_color: app.theme_cls.primary_color
pos_hint: {"center_x": 0.5, "center_y": 0.8425} pos_hint: {"center_x": 0.5, "center_y": 0.8425}
size_hint_x: None size_hint_x: None
width: dp(335) width: dp(335)
on_touch_down: app.change_cursor(True) on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False) on_touch_up: app.change_cursor(False)
canvas.before: canvas.before:
Color: Color:
rgb: rgba(127, 127, 127, 255) rgb: rgba(127, 127, 127, 255)
Line: Line:
width: dp(0.5) width: dp(0.5)
rounded_rectangle: self.x-5, self.y+20, self.width+10, self.height-25, 10,10,10,10,100 rounded_rectangle: self.x-5, self.y+20, self.width+10, self.height-25, 10,10,10,10,100
MDTextField: MDTextField:
id: edit_user_pass id: edit_user_pass
text: "" text: ""
hint_text: "User_pass*" hint_text: "User_pass*"
font_name: "MPoppins" font_name: "MPoppins"
font_size: "15sp" font_size: "15sp"
helper_text: "Provide your password" helper_text: "Provide your password"
helper_text_mode: "on_focus" helper_text_mode: "on_focus"
readonly: True readonly: True
icon_right: "dialpad" icon_right: "dialpad"
input_filter: 'int' input_filter: 'int'
max_text_length: 8 max_text_length: 8
icon_color: app.theme_cls.primary_color icon_color: app.theme_cls.primary_color
pos_hint: {"center_x": 0.5, "center_y": 0.7225} pos_hint: {"center_x": 0.5, "center_y": 0.7225}
size_hint_x: None size_hint_x: None
width: dp(335) width: dp(335)
on_touch_down: app.change_cursor(True) on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False) on_touch_up: app.change_cursor(False)
canvas.before: canvas.before:
Color: Color:
rgb: rgba(127, 127, 127, 255) rgb: rgba(127, 127, 127, 255)
Line: Line:
width: dp(0.5) width: dp(0.5)
rounded_rectangle: self.x-5, self.y+20, self.width+10, self.height-25, 10,10,10,10,100 rounded_rectangle: self.x-5, self.y+20, self.width+10, self.height-25, 10,10,10,10,100
MDTextField: MDTextField:
id: edit_modbus_ip id: edit_modbus_ip
text: "" text: ""
hint_text: "Modbus_IP*" hint_text: "Modbus_IP*"
font_name: "MPoppins" font_name: "MPoppins"
font_size: "15sp" font_size: "15sp"
readonly: True readonly: True
helper_text: "Provide your Modbus_IP" helper_text: "Provide your Modbus_IP"
helper_text_mode: "on_focus" helper_text_mode: "on_focus"
icon_right: "network" icon_right: "network"
min_text_length: 11 min_text_length: 11
icon_color: app.theme_cls.primary_color icon_color: app.theme_cls.primary_color
pos_hint: {"center_x": 0.5, "center_y": 0.6025} pos_hint: {"center_x": 0.5, "center_y": 0.6025}
size_hint_x: None size_hint_x: None
width: dp(335) width: dp(335)
on_touch_down: app.change_cursor(True) on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False) on_touch_up: app.change_cursor(False)
canvas.before: canvas.before:
Color: Color:
rgb: rgba(127, 127, 127, 255) rgb: rgba(127, 127, 127, 255)
Line: Line:
width: 0.5 width: 0.5
rounded_rectangle: self.x-5, self.y+20, self.width+10, self.height-25, 10,10,10,10,100 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_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: Button:
text: "保存配置" text: "保存配置"