Документация
ОС Аврора 5.0.1
Пример файла CustomPasswordManagerPopup.qml
custompopups/CustomPasswordManagerPopup.qml
/****************************************************************************
**
** Copyright (c) 2021 Open Mobile Platform LLC
**
****************************************************************************/
import QtQuick 2.0
import Sailfish.Silica 1.0
import Sailfish.WebView.Popups 1.0
PasswordManagerPopupInterface {
id: popup
width: (parent.width/5)*4
height: (parent.height/5)*4
anchors.centerIn: parent
property string displayUser: popup.formData["displayUser"]
property string displayHost: popup.formData["displayHost"]
property string text: popup.notificationType == "password-save"
? (displayUser.length ? ("Сохранить пароль для пользователя " + displayUser + " для " + displayHost + "?")
: ("Сохранить пароль для " + displayHost + "?"))
: popup.notificationType == "password-change"
? (displayUser.length ? ("Обновить пароль для пользователя " + displayUser + "?")
: ("Обновить пароль?"))
: "Неизвестный запрос менеджера паролей!"
Rectangle {
anchors.fill: parent
color: "lightgrey"
clip: flickable.contentHeight > height
SilicaFlickable {
id: flickable
anchors.fill: parent
contentHeight: content.height + Theme.paddingLarge
Column {
id: content
width: parent.width - 2 * Theme.horizontalPageMargin
anchors.centerIn: parent
spacing: Theme.paddingLarge
Text {
width: parent.width
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter
text: popup.text
}
Button {
anchors.horizontalCenter: parent.horizontalCenter
text: "Сохранить пароль"
onClicked: { popup.accepted(); popup.visible = false }
}
Button {
anchors.horizontalCenter: parent.horizontalCenter
text: "Cancel"
onClicked: { popup.rejected(); popup.visible = false }
}
}
}
}
}