mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-02 13:55:13 +03:00
94edf799b6
- New design based on Material Style - Light mode and Dark mode - Add support for custom CCID readers - New tray functionality - Support for favorite credentials Co-authored-by: Rikard <rikard@yubico.com>
46 lines
1.1 KiB
QML
46 lines
1.1 KiB
QML
import QtQuick 2.9
|
|
import Qt.labs.platform 1.1
|
|
import QtQml 2.12
|
|
|
|
SystemTrayIcon {
|
|
visible: settings.closeToTray
|
|
icon.source: "../images/windowicon.png"
|
|
onActivated: sysTrayInstantiator.model = getFavoriteEntries()
|
|
|
|
|
|
menu: Menu {
|
|
id: sysTrayMenu
|
|
|
|
Instantiator {
|
|
id: sysTrayInstantiator
|
|
model: getFavoriteEntries()
|
|
onObjectAdded: sysTrayMenu.insertItem(index, object)
|
|
onObjectRemoved: sysTrayMenu.removeItem(object)
|
|
delegate: MenuItem {
|
|
text: credential.issuer ? credential.issuer + " (" + credential.name + ")" : credential.name
|
|
onTriggered: calculateFavorite(credential, text)
|
|
}
|
|
}
|
|
|
|
MenuSeparator {
|
|
}
|
|
|
|
MenuItem {
|
|
text: qsTr("Show credentials")
|
|
onTriggered: {
|
|
app.show()
|
|
raise()
|
|
requestActivate()
|
|
}
|
|
}
|
|
|
|
MenuSeparator {
|
|
}
|
|
|
|
MenuItem {
|
|
text: qsTr("Quit")
|
|
onTriggered: Qt.quit()
|
|
}
|
|
}
|
|
}
|