Update interface name

test
reionwong 4 years ago
parent 947502cbea
commit ec72a93d30

@ -44,7 +44,7 @@ Authenticator::Authenticator(AuthenticationMode mode, QObject *parent)
, m_checkPass(nullptr) , m_checkPass(nullptr)
{ {
m_graceLockTimer->setSingleShot(true); m_graceLockTimer->setSingleShot(true);
m_graceLockTimer->setInterval(3000); m_graceLockTimer->setInterval(1500);
connect(m_graceLockTimer, &QTimer::timeout, this, &Authenticator::graceLockedChanged); connect(m_graceLockTimer, &QTimer::timeout, this, &Authenticator::graceLockedChanged);
if (mode == AuthenticationMode::Delayed) { if (mode == AuthenticationMode::Delayed) {

@ -26,7 +26,7 @@ int main(int argc, char *argv[])
{ {
Application app(argc, argv); Application app(argc, argv);
if (!QDBusConnection::sessionBus().registerService("org.cutefish.ScreenLocker")) { if (!QDBusConnection::sessionBus().registerService("com.cutefish.ScreenLocker")) {
return -1; return -1;
} }

@ -218,6 +218,7 @@ Item {
placeholderText: qsTr("Password") placeholderText: qsTr("Password")
leftPadding: FishUI.Units.largeSpacing leftPadding: FishUI.Units.largeSpacing
rightPadding: FishUI.Units.largeSpacing rightPadding: FishUI.Units.largeSpacing
enabled: !authenticator.graceLocked
focus: true focus: true
echoMode: TextInput.Password echoMode: TextInput.Password
@ -242,6 +243,7 @@ Item {
Layout.preferredWidth: 260 Layout.preferredWidth: 260
text: qsTr("Unlock") text: qsTr("Unlock")
onClicked: root.tryUnlock() onClicked: root.tryUnlock()
enabled: !authenticator.graceLocked
scale: unlockBtn.pressed ? 0.95 : 1.0 scale: unlockBtn.pressed ? 0.95 : 1.0
@ -319,18 +321,19 @@ Item {
Connections { Connections {
target: authenticator target: authenticator
function onFailed() { function onFailed() {
notificationResetTimer.start() notificationResetTimer.start()
root.notification = qsTr("Unlocking failed") root.notification = qsTr("Unlocking failed")
} }
// function onGraceLockedChanged() { function onGraceLockedChanged() {
// if (!authenticator.graceLocked) { if (!authenticator.graceLocked) {
// root.notification = "" root.notification = ""
// password.selectAll() password.selectAll()
// password.focus = true password.focus = true
// } }
// } }
function onMessage(text) { function onMessage(text) {
notificationResetTimer.start() notificationResetTimer.start()

Loading…
Cancel
Save