Skip to content
Open
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions dcc-network/qml/NetButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import QtQuick 2.15
import QtQuick.Controls 2.15

import org.deepin.dtk 1.0 as D
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


Button {
implicitHeight: implicitContentHeight + 6
implicitWidth: implicitContentWidth + 10
Expand All @@ -11,4 +13,5 @@ Button {
leftPadding: 0
rightPadding: 0
spacing: 0
D.ColorSelector.inactived: false
}
1 change: 1 addition & 0 deletions dcc-network/qml/NetFileChooseEdit.qml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ RowLayout {
}
D.LineEdit {
id: edit
D.ColorSelector.inactived: false
onTextChanged: {
if (!initialized) {
return
Expand Down
1 change: 1 addition & 0 deletions dcc-network/qml/NetItemEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ D.ItemDelegate {
Layout.fillWidth: true
backgroundVisible: false
checkable: false
D.ColorSelector.inactived: false
background: DccItemBackground {
separatorVisible: true
}
Expand Down
1 change: 1 addition & 0 deletions dcc-network/qml/NetPasswordEdit.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ D.PasswordEdit {
property bool initialized: false
signal textUpdated

D.ColorSelector.inactived: false
placeholderText: qsTr("Required")
echoButtonVisible: newInput
showAlert: dataItem.errorKey === dccObj.name
Expand Down
5 changes: 5 additions & 0 deletions dcc-network/qml/PageAppProxy.qml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ DccObject {
weight: 20
pageType: DccObject.Editor
page: D.LineEdit {
D.ColorSelector.inactived: false
topInset: 4
bottomInset: 4
validator: RegularExpressionValidator {
Expand Down Expand Up @@ -155,6 +156,7 @@ DccObject {
weight: 30
pageType: DccObject.Editor
page: D.LineEdit {
D.ColorSelector.inactived: false
topInset: 4
bottomInset: 4
validator: IntValidator {
Expand Down Expand Up @@ -186,6 +188,7 @@ DccObject {
weight: 40
pageType: DccObject.Editor
page: D.LineEdit {
D.ColorSelector.inactived: false
topInset: 4
bottomInset: 4
text: root.config.user
Expand Down Expand Up @@ -257,6 +260,7 @@ DccObject {
leftPadding: 0
rightPadding: 0
spacing: 0
D.ColorSelector.inactived: false
text: qsTr("Cancel")
Layout.alignment: Qt.AlignRight
onClicked: {
Expand All @@ -279,6 +283,7 @@ DccObject {
leftPadding: 0
rightPadding: 0
spacing: 0
D.ColorSelector.inactived: false
text: qsTr("Save")
Layout.alignment: Qt.AlignRight
onClicked: {
Expand Down
2 changes: 2 additions & 0 deletions dcc-network/qml/PageDSLSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ DccObject {
Button {
Layout.fillWidth: true
text: qsTr("Cancel")
D.ColorSelector.inactived: false
onClicked: close()
}
Rectangle {
Expand All @@ -148,6 +149,7 @@ DccObject {

D.Button {
Layout.fillWidth: true
D.ColorSelector.inactived: false
contentItem: D.IconLabel {
text: qsTr("Delete")
color: "red"
Expand Down
3 changes: 3 additions & 0 deletions dcc-network/qml/PageHotspot.qml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ DccObject {
text: qsTr("Name (SSID)")
corners: getCornersForBackground(0, colLayout.children.length)
content: D.LineEdit {
D.ColorSelector.inactived: false
showAlert: ssidAlert
alertDuration: 2000
placeholderText: qsTr("Required")
Expand Down Expand Up @@ -327,6 +328,7 @@ DccObject {
Button {
Layout.fillWidth: true
text: qsTr("Cancel")
D.ColorSelector.inactived: false
onClicked: close()
}
Rectangle {
Expand All @@ -337,6 +339,7 @@ DccObject {

D.Button {
Layout.fillWidth: true
D.ColorSelector.inactived: false
// contentItem: D.IconLabel {
text: qsTr("Save")
// color: "red"
Expand Down
2 changes: 2 additions & 0 deletions dcc-network/qml/PageSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ DccObject {
Button {
Layout.fillWidth: true
text: qsTr("Cancel")
D.ColorSelector.inactived: false
onClicked: close()
}
Rectangle {
Expand All @@ -151,6 +152,7 @@ DccObject {

D.Button {
Layout.fillWidth: true
D.ColorSelector.inactived: false
contentItem: D.IconLabel {
text: qsTr("Delete")
color: "red"
Expand Down
4 changes: 4 additions & 0 deletions dcc-network/qml/PageSystemProxy.qml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ DccObject {
pageType: DccObject.Editor
visible: method === NetType.Auto
page: D.LineEdit {
D.ColorSelector.inactived: false
topInset: 4
bottomInset: 4
placeholderText: qsTr("Required")
Expand Down Expand Up @@ -236,6 +237,7 @@ DccObject {
pageType: DccObject.Item
page: TextArea {
wrapMode: TextEdit.WordWrap
D.ColorSelector.inactived: false
text: dccObj.config
onTextChanged: {
if (dccObj.config !== text) {
Expand Down Expand Up @@ -286,6 +288,7 @@ DccObject {
leftPadding: 0
rightPadding: 0
spacing: 0
D.ColorSelector.inactived: false
text: dccObj.displayName
Layout.alignment: Qt.AlignRight
onClicked: root.resetData()
Expand All @@ -306,6 +309,7 @@ DccObject {
leftPadding: 0
rightPadding: 0
spacing: 0
D.ColorSelector.inactived: false
enabled: (method === NetType.Auto && (inputItem & 0xf0)) || (method === NetType.Manual && (inputItem & 0x0f))
text: dccObj.displayName
Layout.alignment: Qt.AlignRight
Expand Down
2 changes: 2 additions & 0 deletions dcc-network/qml/PageVPN.qml
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ DccObject {
Button {
Layout.fillWidth: true
Layout.margins: 10
D.ColorSelector.inactived: false
text: qsTr("OK")
onClicked: close()
}
Expand All @@ -246,6 +247,7 @@ DccObject {
page: NetButton {
text: qsTr("Add VPN")
Layout.alignment: Qt.AlignRight
D.ColorSelector.inactived: false
onClicked: {
dccData.exec(NetManager.ConnectInfo, netItem.id, {})
}
Expand Down
2 changes: 2 additions & 0 deletions dcc-network/qml/PageVPNSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ DccObject {
Button {
Layout.fillWidth: true
text: qsTr("Cancel")
D.ColorSelector.inactived: false
onClicked: close()
}
Rectangle {
Expand All @@ -205,6 +206,7 @@ DccObject {

D.Button {
Layout.fillWidth: true
D.ColorSelector.inactived: false
contentItem: D.IconLabel {
text: qsTr("Delete")
color: "red"
Expand Down
6 changes: 1 addition & 5 deletions dcc-network/qml/SectionDNS.qml
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,10 @@ DccObject {
pageType: DccObject.Item
page: RowLayout {
DccLabel {
property D.Palette textColor: D.Palette {
normal: Qt.rgba(0, 0, 0, 0.9)
normalDark: Qt.rgba(1, 1, 1, 0.9)
}
font: DccUtils.copyFont(D.DTK.fontManager.t5, {
"weight": 500
})
text: dccObj.displayName
color: D.ColorSelector.textColor
}
Item {
Layout.fillWidth: true
Expand Down Expand Up @@ -165,6 +160,7 @@ DccObject {
pageType: DccObject.Editor
page: RowLayout {
D.LineEdit {
D.ColorSelector.inactived: false
text: root.config[index]
// 移除正则验证器,改用手动验证以支持IPv6
// 显式允许所有字符输入,包括冒号
Expand Down
1 change: 1 addition & 0 deletions dcc-network/qml/SectionDevice.qml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ DccTitleObject {
pageType: DccObject.Editor
page: D.LineEdit {
text: root.config.hasOwnProperty("cloned-mac-address") ? root.config["cloned-mac-address"] : ""
D.ColorSelector.inactived: false
validator: RegularExpressionValidator {
regularExpression: NetUtils.macRegExp
}
Expand Down
1 change: 1 addition & 0 deletions dcc-network/qml/SectionGeneric.qml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ DccTitleObject {
enabled: root.config.type !== "802-11-wireless" || !root.config.hasOwnProperty("id") || root.config.id.length === 0
pageType: DccObject.Editor
page: D.LineEdit {
D.ColorSelector.inactived: false
text: settingsID
placeholderText: qsTr("Required")
onTextChanged: {
Expand Down
9 changes: 4 additions & 5 deletions dcc-network/qml/SectionIPv4.qml
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,11 @@ DccObject {
pageType: DccObject.Item
page: RowLayout {
DccLabel {
property D.Palette textColor: D.Palette {
normal: Qt.rgba(0, 0, 0, 0.9)
normalDark: Qt.rgba(1, 1, 1, 0.9)
}
font: DccUtils.copyFont(D.DTK.fontManager.t5, {
"weight": 500
})
text: dccObj.displayName
color: D.ColorSelector.textColor
D.ColorSelector.inactived: false
}
Item {
Layout.fillWidth: true
Expand Down Expand Up @@ -331,6 +327,7 @@ DccObject {
canSearch: false
pageType: DccObject.Editor
page: D.LineEdit {
D.ColorSelector.inactived: false
text: addressData.length > index ? addressData[index][0] : "0.0.0.0"
validator: RegularExpressionValidator {
regularExpression: NetUtils.ipRegExp
Expand Down Expand Up @@ -363,6 +360,7 @@ DccObject {
canSearch: false
pageType: DccObject.Editor
page: D.LineEdit {
D.ColorSelector.inactived: false
text: addressData.length > index ? addressData[index][1] : "255.255.255.0"
validator: RegularExpressionValidator {
regularExpression: NetUtils.maskRegExp
Expand Down Expand Up @@ -395,6 +393,7 @@ DccObject {
pageType: DccObject.Editor
page: D.LineEdit {
enabled: index === 0
D.ColorSelector.inactived: false
text: index === 0 && addressData.length > index ? addressData[index][2] : ""
validator: RegularExpressionValidator {
regularExpression: NetUtils.ipRegExp
Expand Down
4 changes: 3 additions & 1 deletion dcc-network/qml/SectionIPv6.qml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ DccObject {
"weight": 500
})
text: dccObj.displayName
color: D.ColorSelector.textColor
D.ColorSelector.inactived: falsegit
}
Item {
Layout.fillWidth: true
Expand Down Expand Up @@ -336,6 +336,7 @@ DccObject {
canSearch: false
pageType: DccObject.Editor
page: D.LineEdit {
D.ColorSelector.inactived: false
text: root.addressData.length > index ? root.addressData[index].address : ""
validator: RegularExpressionValidator {
regularExpression: NetUtils.ipv6RegExp
Expand Down Expand Up @@ -405,6 +406,7 @@ DccObject {
pageType: DccObject.Editor
page: D.LineEdit {
enabled: index === 0
D.ColorSelector.inactived: false
text: index === 0 ? gateway[index] : ""
validator: RegularExpressionValidator {
regularExpression: NetUtils.ipv6RegExp
Expand Down
2 changes: 2 additions & 0 deletions dcc-network/qml/SectionPPPOE.qml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ DccTitleObject {
weight: 10
pageType: DccObject.Editor
page: D.LineEdit {
D.ColorSelector.inactived: false
placeholderText: qsTr("Required")
text: root.config.hasOwnProperty("username") ? root.config.username : ""
showAlert: errorKey === dccObj.name
Expand Down Expand Up @@ -80,6 +81,7 @@ DccTitleObject {
weight: 20
pageType: DccObject.Editor
page: D.LineEdit {
D.ColorSelector.inactived: false
text: root.config.hasOwnProperty("service") ? root.config.service : ""
onTextChanged: {
if (root.config.service !== text) {
Expand Down
2 changes: 2 additions & 0 deletions dcc-network/qml/SectionSecret.qml
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ DccTitleObject {
visible: root.keyMgmt === "wpa-eap"
pageType: DccObject.Editor
page: D.LineEdit {
D.ColorSelector.inactived: false
placeholderText: qsTr("Required")
text: root.config802_1x && root.config802_1x.hasOwnProperty("identity") ? root.config802_1x.identity : ""
onTextChanged: {
Expand Down Expand Up @@ -536,6 +537,7 @@ DccTitleObject {
visible: root.keyMgmt === "wpa-eap" && (root.eapType === "fast" || root.eapType === "ttls" || root.eapType === "peap")
pageType: DccObject.Editor
page: D.LineEdit {
D.ColorSelector.inactived: false
text: root.config802_1x && root.config802_1x.hasOwnProperty("anonymous-identity") ? root.config802_1x["anonymous-identity"] : ""
onTextChanged: {
if (root.config802_1x["anonymous-identity"] !== text) {
Expand Down
7 changes: 7 additions & 0 deletions dcc-network/qml/SectionVPN.qml
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ DccTitleObject {
RowLayout {
D.LineEdit {
id: fileEdit
D.ColorSelector.inactived: false
text: root.dataMap.hasOwnProperty(dccObj.name) ? NetUtils.removeTrailingNull(root.dataMap[dccObj.name]) : ""
onTextChanged: {
if (showAlert) {
Expand Down Expand Up @@ -389,6 +390,7 @@ DccTitleObject {
RowLayout {
D.LineEdit {
id: fileEdit
D.ColorSelector.inactived: false
placeholderText: qsTr("Required")
text: root.dataMap.hasOwnProperty(dccObj.name) ? NetUtils.removeTrailingNull(root.dataMap[dccObj.name]) : ""
onTextChanged: {
Expand Down Expand Up @@ -422,6 +424,7 @@ DccTitleObject {
Component {
id: gatewayLineEdit
D.LineEdit {
D.ColorSelector.inactived: false
placeholderText: qsTr("Required")
text: root.dataMap.hasOwnProperty(dccObj.name) ? root.dataMap[dccObj.name] : ""
onTextChanged: {
Expand All @@ -447,6 +450,7 @@ DccTitleObject {
Component {
id: requiredLineEdit
D.LineEdit {
D.ColorSelector.inactived: false
placeholderText: qsTr("Required")
text: root.dataMap.hasOwnProperty(dccObj.name) ? root.dataMap[dccObj.name] : ""
onTextChanged: {
Expand All @@ -471,6 +475,7 @@ DccTitleObject {
Component {
id: lineEdit
D.LineEdit {
D.ColorSelector.inactived: false
text: root.dataMap.hasOwnProperty(dccObj.name) ? root.dataMap[dccObj.name] : ""
onTextChanged: {
if (showAlert) {
Expand Down Expand Up @@ -633,6 +638,7 @@ DccTitleObject {
page: RowLayout {
D.LineEdit {
id: usercertEdit
D.ColorSelector.inactived: false
placeholderText: root.vpnType === NetUtils.VpnTypeEnum["strongswan"] ? "" : qsTr("Required")
text: root.dataMap.hasOwnProperty(dccObj.name) ? NetUtils.removeTrailingNull(root.dataMap[dccObj.name]) : ""
onTextChanged: {
Expand Down Expand Up @@ -674,6 +680,7 @@ DccTitleObject {
page: RowLayout {
D.LineEdit {
id: userkeyEdit
D.ColorSelector.inactived: false
placeholderText: root.vpnType === NetUtils.VpnTypeEnum["strongswan"] ? "" : qsTr("Required")
text: root.dataMap.hasOwnProperty(dccObj.name) ? NetUtils.removeTrailingNull(root.dataMap[dccObj.name]) : ""
onTextChanged: {
Expand Down
Loading
Loading