From ce1373653aa715bdc73f77aec24457bc669bc38a Mon Sep 17 00:00:00 2001 From: miruka Date: Fri, 26 Jun 2020 02:32:25 -0400 Subject: [PATCH] Improve device list footer - Always visible - Add a refresh button - Will no longer make the list slowly grow --- TODO.md | 7 ++++--- src/gui/Pages/AccountSettings/Sessions.qml | 15 +++++++++------ src/icons/thin/device-refresh-list.svg | 3 +++ 3 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 src/icons/thin/device-refresh-list.svg diff --git a/TODO.md b/TODO.md index 034b9a6b..5212fea9 100644 --- a/TODO.md +++ b/TODO.md @@ -1,22 +1,23 @@ # TODO - handle `{}` bad `DevicesResponse` -- verify & delete devices +- delete devices (do that in key verification popup instead of blacklisting) - sessions page size - flickshortcuts - avatar upload/change component -- show scrollbars for a few secs if there's content to scroll on beginning - +- device IP geolocation - field/area focus line in popups weird - clear listview checked on message clear - unregister popup/menu when destroyed without being closed - menu click-through padding to close it easily +- show scrollbars for a few secs if there's content to scroll on beginning - can leave room with a reason? - use new nio `restore_login()` - verify all popups and boxes work: enter/esc, tab focus, operations +- update nio fork, requirements.txt and flatpak nio version ## Refactoring diff --git a/src/gui/Pages/AccountSettings/Sessions.qml b/src/gui/Pages/AccountSettings/Sessions.qml index 99198d57..9ab7e013 100644 --- a/src/gui/Pages/AccountSettings/Sessions.qml +++ b/src/gui/Pages/AccountSettings/Sessions.qml @@ -53,16 +53,19 @@ HColumnPage { footer: ButtonLayout { - visible: height >= 0 - height: deviceList.selectedCount ? implicitHeight : 0 - - Behavior on height { HNumberAnimation {} } + OtherButton { + text: qsTr("Refresh") + icon.name: "device-refresh-list" + onClicked: loadDevices() + } OtherButton { text: + deviceList.selectedCount === 0 ? + qsTr("Sign out all") : deviceList.selectedCount === 1 ? - qsTr("Sign out checked session") : - qsTr("Sign out %1 sessions").arg(deviceList.selectedCount) + qsTr("Sign out checked") : + qsTr("Sign out checked (%1)").arg(deviceList.selectedCount) icon.name: "device-delete-checked" icon.color: theme.colors.negativeBackground diff --git a/src/icons/thin/device-refresh-list.svg b/src/icons/thin/device-refresh-list.svg new file mode 100644 index 00000000..4c325830 --- /dev/null +++ b/src/icons/thin/device-refresh-list.svg @@ -0,0 +1,3 @@ + + +