Skip to content

fix: Adaptation control center interface adjustment #272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dcc-network/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -68,3 +68,5 @@ target_link_libraries(${DccNetwork_Name} PRIVATE
)

dcc_install_plugin(NAME ${DccNetwork_Name} TARGET ${DccNetwork_Name})

dcc_handle_plugin_translation(NAME ${DccNetwork_Name} )
2 changes: 1 addition & 1 deletion dcc-network/qml/NetFileChooseEdit.qml
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ RowLayout {
alertDuration: 2000
onShowAlertChanged: {
if (showAlert) {
dccObj.trigger()
DccApp.showPage(dccObj)
forceActiveFocus()
}
}
2 changes: 1 addition & 1 deletion dcc-network/qml/NetPasswordEdit.qml
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ D.PasswordEdit {
alertDuration: 2000
onShowAlertChanged: {
if (showAlert) {
dccObj.trigger()
DccApp.showPage(dccObj)
forceActiveFocus()
}
}
4 changes: 2 additions & 2 deletions dcc-network/qml/PageAirplane.qml
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ DccObject {
description: qsTr("Turn off wireless communication")
icon: "dcc_airplane_mode"
visible: item && item.enabledable
hasBackground: true
backgroundType: DccObject.Normal
pageType: DccObject.MenuEditor
page: devCheck
Component {
@@ -44,7 +44,7 @@ DccObject {
displayName: root.displayName
icon: "dcc_airplane_mode"
weight: 10
hasBackground: true
backgroundType: DccObject.Normal
pageType: DccObject.Editor
page: devCheck
}
8 changes: 4 additions & 4 deletions dcc-network/qml/PageAppProxy.qml
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@ DccObject {
displayName: root.displayName
icon: "dcc_app_agent"
weight: 10
hasBackground: true
backgroundType: DccObject.Normal
pageType: DccObject.Editor
page: D.Switch {
checked: proxyEnable
@@ -80,7 +80,7 @@ DccObject {
name: "config"
parentName: root.name + "/body"
weight: 20
hasBackground: true
backgroundType: DccObject.Normal
visible: proxyEnable
pageType: DccObject.Item
page: DccGroupView {}
@@ -135,7 +135,7 @@ DccObject {
alertText: qsTr("Invalid IP address")
onShowAlertChanged: {
if (showAlert) {
dccObj.trigger()
DccApp.showPage(dccObj)
forceActiveFocus()
}
}
@@ -166,7 +166,7 @@ DccObject {
alertText: qsTr("Invalid port")
onShowAlertChanged: {
if (showAlert) {
dccObj.trigger()
DccApp.showPage(dccObj)
forceActiveFocus()
}
}
8 changes: 3 additions & 5 deletions dcc-network/qml/PageDSL.qml
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ DccObject {
parentName: root.name + "/body"
weight: 20
pageType: DccObject.Item
hasBackground: true
backgroundType: DccObject.Normal
page: ColumnLayout {
clip: true
spacing: 0
@@ -83,7 +83,6 @@ DccObject {
}
background: DccItemBackground {
separatorVisible: true
highlightEnable: false
}
}
}
@@ -93,7 +92,7 @@ DccObject {
id: dslSettings
name: "dslSettings"
parentName: root.name + "/body/networkList"
onFinished: root.trigger()
onFinished: DccApp.showPage(root)
type: NetType.WiredItem
Connections {
target: dccData
@@ -113,7 +112,7 @@ DccObject {
dslSettings.item = tmpItem
dslSettings.config = param

dslSettings.trigger()
DccApp.showPage(dslSettings)
break
}
for (let i in tmpItem.children) {
@@ -133,7 +132,6 @@ DccObject {
DccObject {
name: "addDSL"
parentName: root.name + "/footer"
hasBackground: false
weight: 40
pageType: DccObject.Item
page: NetButton {
5 changes: 2 additions & 3 deletions dcc-network/qml/PageDSLSettings.qml
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ DccObject {
name: "mainTitle"
parentName: root.parentUrl + "/body"
weight: 10
displayName: sectionGeneric.settingsID + qsTr("网络属性")
displayName: sectionGeneric.settingsID + qsTr(" Network Properties")
}
SectionGeneric {
id: sectionGeneric
@@ -97,7 +97,7 @@ DccObject {
visible: config && config.connection.uuid !== "{00000000-0000-0000-0000-000000000000}"
page: NetButton {
contentItem: IconLabel {
text: qsTr("Delete Network")
text: qsTr("Delete")
color: "red"
}
onClicked: {
@@ -159,7 +159,6 @@ DccObject {
DccObject {
name: "spacer"
parentName: root.parentUrl + "/footer"
hasBackground: false
weight: 20
pageType: DccObject.Item
page: Item {
6 changes: 2 additions & 4 deletions dcc-network/qml/PageDetails.qml
Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@ DccObject {
text.push(infoItem.details[i][0] + "\t" + infoItem.details[i][1])
}
dccData.setClipboard(text.join("\n"))
tip.show(qsTr("信息已复制"), 2000)
tip.show(qsTr("Details has been copied"), 2000)
}
}
}
@@ -72,7 +72,6 @@ DccObject {
name: "details"
parentName: root.name + "/body/" + infoItem.name
weight: 20
// hasBackground: true
pageType: DccObject.Item
onParentItemChanged: {
if (parentItem) {
@@ -137,7 +136,7 @@ DccObject {
}
background: DccItemBackground {
separatorVisible: true
highlightEnable: false
backgroundType: DccObject.Normal
}
}
}
@@ -158,7 +157,6 @@ DccObject {
DccObject {
name: "checkNetwork"
parentName: root.name + "/footer"
hasBackground: false
weight: 40
pageType: DccObject.Item
page: NetButton {
16 changes: 8 additions & 8 deletions dcc-network/qml/PageHotspot.qml
Original file line number Diff line number Diff line change
@@ -81,7 +81,7 @@ DccObject {
visible: item && item.enabledable
displayName: qsTr("Personal Hotspot")
icon: "dcc_hotspot"
hasBackground: true
backgroundType: DccObject.Normal
pageType: DccObject.MenuEditor
page: devCheck
Component {
@@ -123,7 +123,7 @@ DccObject {
displayName: root.displayName
icon: "dcc_hotspot"
weight: 10
hasBackground: true
backgroundType: DccObject.Normal
pageType: DccObject.Editor
page: devCheck
}
@@ -328,7 +328,7 @@ DccObject {
parentName: hotspotConfig.parentName + "/" + hotspotConfig.name
displayName: qsTr("Name (SSID)")
weight: 10
hasBackground: true
backgroundType: DccObject.Normal
pageType: DccObject.Editor
page: DccLabel {
text: root.config["802-11-wireless"].ssid
@@ -339,7 +339,7 @@ DccObject {
parentName: hotspotConfig.parentName + "/" + hotspotConfig.name
displayName: qsTr("Security")
weight: 20
hasBackground: true
backgroundType: DccObject.Normal
pageType: DccObject.Editor
page: DccLabel {
text: securityName(root.config.hasOwnProperty("802-11-wireless-security") ? root.config["802-11-wireless-security"]["key-mgmt"] : "")
@@ -350,7 +350,7 @@ DccObject {
parentName: hotspotConfig.parentName + "/" + hotspotConfig.name
displayName: qsTr("Password")
weight: 30
hasBackground: true
backgroundType: DccObject.Normal
pageType: DccObject.Editor
visible: root.config.hasOwnProperty("802-11-wireless-security")
page: Rectangle {
@@ -382,7 +382,7 @@ DccObject {
parentName: hotspotConfig.parentName + "/" + hotspotConfig.name
displayName: qsTr("Band")
weight: 40
hasBackground: true
backgroundType: DccObject.Normal
pageType: DccObject.Editor
page: DccLabel {
text: bandName(root.config["802-11-wireless"].band)
@@ -408,7 +408,7 @@ DccObject {
// parentName: shareConfig.parentName + "/" + shareConfig.name
// displayName: qsTr("Priority Shared Network")
// weight: 10
// hasBackground: true
// backgroundType: DccObject.Normal
// pageType: DccObject.Editor
// page: D.ComboBox {
// textRole: "text"
@@ -421,7 +421,7 @@ DccObject {
parentName: shareConfig.parentName + "/" + shareConfig.name
displayName: qsTr("Hotspot Sharing Device")
weight: 20
hasBackground: true
backgroundType: DccObject.Normal
pageType: DccObject.Editor
page: D.ComboBox {
function updateCurrentIndex() {
5 changes: 2 additions & 3 deletions dcc-network/qml/PageSettings.qml
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ DccObject {
name: "mainTitle"
parentName: root.parentUrl + "/body"
weight: 10
displayName: sectionGeneric.settingsID + qsTr("网络属性")
displayName: sectionGeneric.settingsID + qsTr(" Network Properties")
}
SectionGeneric {
id: sectionGeneric
@@ -100,7 +100,7 @@ DccObject {
visible: config && config.connection.uuid !== "{00000000-0000-0000-0000-000000000000}"
page: NetButton {
contentItem: IconLabel {
text: qsTr("Delete Network")
text: qsTr("Delete")
color: "red"
}
onClicked: {
@@ -162,7 +162,6 @@ DccObject {
DccObject {
name: "spacer"
parentName: root.parentUrl + "/footer"
hasBackground: false
weight: 20
pageType: DccObject.Item
page: Item {
42 changes: 39 additions & 3 deletions dcc-network/qml/PageSystemProxy.qml
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@ DccObject {
property var item: null
property int method: NetType.None
property bool autoUrlAlert: false
property int inputItem: 0

function setItem(netItem) {
item = netItem
@@ -39,7 +40,7 @@ DccObject {
displayName: root.displayName
icon: "dcc_system_agent"
weight: 10
hasBackground: true
backgroundType: DccObject.Normal
pageType: DccObject.Editor
page: D.Switch {
checked: item.isEnabled
@@ -70,7 +71,7 @@ DccObject {
parentName: root.name + "/body"
displayName: qsTr("Proxy Type")
weight: 20
hasBackground: true
backgroundType: DccObject.Normal
visible: method !== NetType.None
pageType: DccObject.Editor
page: ComboBox {
@@ -105,7 +106,7 @@ DccObject {
parentName: root.name + "/body"
displayName: qsTr("Configuration URL")
weight: 30
hasBackground: true
backgroundType: DccObject.Normal
pageType: DccObject.Editor
visible: method === NetType.Auto
page: D.LineEdit {
@@ -116,6 +117,12 @@ DccObject {
showAlert: autoUrlAlert
onTextChanged: {
autoUrlAlert = false
if (text.length === 0) {
inputItem &= 0x0f
} else {
inputItem |= 0x10
}

if (dccObj.config !== text) {
dccObj.config = text
}
@@ -135,6 +142,13 @@ DccObject {
visible: method === NetType.Manual
weight: 40
config: root.item.manualProxy.http
onHasUrlChanged: {
if (hasUrl) {
inputItem |= 0x01
} else {
inputItem &= ~0x01
}
}
}
SystemProxyConfigItem {
id: https
@@ -144,6 +158,13 @@ DccObject {
visible: method === NetType.Manual
weight: 50
config: root.item.manualProxy.https
onHasUrlChanged: {
if (hasUrl) {
inputItem |= 0x02
} else {
inputItem &= ~0x02
}
}
}
SystemProxyConfigItem {
id: ftp
@@ -153,6 +174,13 @@ DccObject {
visible: method === NetType.Manual
weight: 60
config: root.item.manualProxy.ftp
onHasUrlChanged: {
if (hasUrl) {
inputItem |= 0x04
} else {
inputItem &= ~0x04
}
}
}
SystemProxyConfigItem {
id: socks
@@ -162,6 +190,13 @@ DccObject {
visible: method === NetType.Manual
weight: 70
config: root.item.manualProxy.socks
onHasUrlChanged: {
if (hasUrl) {
inputItem |= 0x08
} else {
inputItem &= ~0x08
}
}
}
DccObject {
id: ignoreHosts
@@ -252,6 +287,7 @@ DccObject {
leftPadding: 0
rightPadding: 0
spacing: 0
enabled: (method === NetType.Auto && (inputItem & 0xf0)) || (method === NetType.Manual && (inputItem & 0x0f))
text: dccObj.displayName
Layout.alignment: Qt.AlignRight
function printfObj(obj) {
Loading
Loading