2023-04-01 07:09:57 +00:00
|
|
|
// 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
|
2026-03-07 03:08:07 +00:00
|
|
|
import org.kde.kirigami as Kirigami
|
2023-09-23 23:27:13 +00:00
|
|
|
import org.kde.plasma.networkmanagement as PlasmaNM
|
2023-04-01 07:09:57 +00:00
|
|
|
|
|
|
|
|
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}$/
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|