From 5c9dc36e1b8f22c44541a3c9c77c83cf86ebc063 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Sun, 8 Nov 2020 14:16:34 +0100 Subject: [PATCH] accounts: bind add dialog --- ...m.belmoussaoui.Authenticator.gresource.xml | 1 - data/resources/style.css | 23 +++- data/resources/ui/account_row.ui | 124 ++++++++---------- data/resources/ui/accounts_list.ui | 32 ----- data/resources/ui/provider_row.ui | 8 ++ data/resources/ui/providers_list.ui.in | 4 + data/resources/ui/window.ui.in | 10 ++ src/application.rs | 16 ++- src/meson.build | 2 - src/models/accounts.rs | 109 --------------- src/models/mod.rs | 2 - src/models/provider.rs | 30 +++-- src/models/providers.rs | 19 ++- src/widgets/accounts/add.rs | 23 ++-- src/widgets/accounts/list.rs | 68 ---------- src/widgets/accounts/mod.rs | 2 - src/widgets/mod.rs | 2 +- src/widgets/providers/list.rs | 40 ++++-- src/widgets/window.rs | 25 ++-- 19 files changed, 200 insertions(+), 340 deletions(-) delete mode 100644 data/resources/ui/accounts_list.ui delete mode 100644 src/models/accounts.rs delete mode 100644 src/widgets/accounts/list.rs diff --git a/data/com.belmoussaoui.Authenticator.gresource.xml b/data/com.belmoussaoui.Authenticator.gresource.xml index 24d88b2..cdfd4c6 100644 --- a/data/com.belmoussaoui.Authenticator.gresource.xml +++ b/data/com.belmoussaoui.Authenticator.gresource.xml @@ -5,7 +5,6 @@ resources/ui/add_account.ui - resources/ui/accounts_list.ui resources/ui/provider_row.ui diff --git a/data/resources/style.css b/data/resources/style.css index 84f5129..8ae2435 100644 --- a/data/resources/style.css +++ b/data/resources/style.css @@ -1,3 +1,24 @@ .providers-list { - background-color: @theme_base_bg; + background-color: @theme_base_bg; + margin-top: 20px; +} + +.provider-row { + margin-top: 12px; + margin-bottom: 12px; +} +.provider-row:hover { + background-color: @theme_base_bg; +} + +.provider-row:active { + background: @theme_base_bg; + box-shadow: none; +} +.provider-row .title-2 { + margin-bottom: 8px; +} + +.account-row { + padding: 12px; } diff --git a/data/resources/ui/account_row.ui b/data/resources/ui/account_row.ui index 8378747..224b5d7 100644 --- a/data/resources/ui/account_row.ui +++ b/data/resources/ui/account_row.ui @@ -1,33 +1,15 @@ - - - - center - vertical - - - False - 6 - 6 - 6 - 6 - Edit - - - - - False - 6 - 6 - 6 - 6 - Delete - - - - - + + + Edit + account.edit + + + Delete + account.delete + + True center @@ -35,46 +17,10 @@ - - False + + start center - more_actions_popover - - - view-more-symbolic - - - - - - - - True - Copy PIN to clipboard - center - none - - - center - center - - - edit-copy-symbolic - - - - - emblem-ok-symbolic - - - - - + end @@ -87,10 +33,46 @@ - - start - center - end + + True + end + + + True + Copy PIN to clipboard + center + + + center + center + + + edit-copy-symbolic + + + + + emblem-ok-symbolic + + + + + + + + + + False + center + account-menu + view-more-symbolic + + + diff --git a/data/resources/ui/accounts_list.ui b/data/resources/ui/accounts_list.ui deleted file mode 100644 index 0572cc8..0000000 --- a/data/resources/ui/accounts_list.ui +++ /dev/null @@ -1,32 +0,0 @@ - - - - vertical - - - - - 96 - image-missing-symbolic - - - - - Some random provider - - - - - - - - none - - - - - diff --git a/data/resources/ui/provider_row.ui b/data/resources/ui/provider_row.ui index f0a892d..89a88ac 100644 --- a/data/resources/ui/provider_row.ui +++ b/data/resources/ui/provider_row.ui @@ -16,6 +16,14 @@ + + + True + + +