shift-shell/kcms/wifi/package/contents/ui/PasswordField.qml
Devin Lin 1e2847ef96 kcms: Import mobile network kcms
plasma-nm currently has the mobile network KCMs, but requires having a build flag in order to have them installed. This then requires distros to have multiple versions of the plasma-nm package. I think it makes sense to move them here so that packaging and development is easier.
2023-03-14 14:31:27 +00:00

21 lines
745 B
QML

/*
SPDX-FileCopyrightText: 2013-2017 Jan Grulich <jgrulich@redhat.com>
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
import QtQuick 2.15
import org.kde.kirigami 2.10 as Kirigami
import org.kde.plasma.networkmanagement 0.2 as PlasmaNM
Kirigami.PasswordField {
property int securityType
placeholderText: i18n("Password…")
validator: RegularExpressionValidator {
regularExpression: if (securityType == PlasmaNM.Enums.StaticWep) {
/^(?:.{5}|[0-9a-fA-F]{10}|.{13}|[0-9a-fA-F]{26}){1}$/
} else {
/^(?:.{8,64}){1}$/
}
}
}