Various changes (mostly finish logins)

This commit is contained in:
2023-10-23 15:00:11 -07:00
parent 94801968fa
commit 67440ccca1
9 changed files with 377 additions and 115 deletions

View File

@ -1,28 +1,16 @@
using Gtk 4.0;
Popover device_entry_popover {
child: Label {
accessible-role: tooltip;
label: "This is the human readable name that will show up in the API key section of the SimpleLogin website.";
max-width-chars: 30;
wrap: true;
}
;
}
template $LoginWindow : ApplicationWindow {
title: "SimpleLogin";
Box {
orientation: vertical;
Overlay forms_overlay {
valign: center;
vexpand: true;
Overlay forms_overlay {
child: forms_wrapper;
valign: end;
vexpand: true;
child: Box forms_wrapper {
orientation: vertical;
Box forms_wrapper {
Box {
valign: end;
vexpand: true;
@ -55,6 +43,7 @@ template $LoginWindow : ApplicationWindow {
Label error_label {
label: "ERROR";
margin-top: 5;
visible: false;
styles [
"error-message-label",
@ -73,11 +62,23 @@ template $LoginWindow : ApplicationWindow {
secondary-icon-name: "dialog-question-symbolic";
truncate-multiline: true;
width-chars: 18;
icon-release => $device_help_clicked() swapped;
changed => $login_form_changed() swapped;
activate => $login_form_submit() swapped;
layout {
column: "1";
row: "3";
}
Popover device_entry_popover {
child: Label {
accessible-role: tooltip;
label: "This is the human readable name that will show up in the API key section of the SimpleLogin website.";
max-width-chars: 30;
wrap: true;
};
}
}
Label {
@ -116,6 +117,8 @@ template $LoginWindow : ApplicationWindow {
margin-start: 6;
receives-default: true;
truncate-multiline: true;
changed => $login_form_changed() swapped;
activate => $login_form_submit() swapped;
layout {
column: "1";
@ -127,6 +130,8 @@ template $LoginWindow : ApplicationWindow {
hexpand: true;
margin-start: 6;
show-peek-icon: true;
changed => $login_form_changed() swapped;
activate => $login_form_submit() swapped;
layout {
column: "1";
@ -140,6 +145,7 @@ template $LoginWindow : ApplicationWindow {
margin-top: 5;
sensitive: false;
valign: center;
clicked => $login_form_submit() swapped;
layout {
column: "0";
@ -185,6 +191,8 @@ template $LoginWindow : ApplicationWindow {
margin-start: 8;
show-peek-icon: true;
width-chars: 27;
changed => $api_key_form_changed() swapped;
activate => $api_key_form_submit() swapped;
}
Button api_key_button {
@ -192,46 +200,50 @@ template $LoginWindow : ApplicationWindow {
label: "Accept";
margin-top: 5;
sensitive: false;
clicked => $api_key_form_submit() swapped;
}
}
}
}
Label {
label: "Don\'t have an account? You can register <a href=\"https://app.simplelogin.io/auth/register\">here</a>.";
Label {
label: "Don\'t have an account? You can register <a href=\"https://app.simplelogin.io/auth/register\">here</a>.";
margin-bottom: 10;
use-markup: true;
valign: start;
vexpand: true;
yalign: 0.0;
use-markup: true;
valign: start;
vexpand: true;
yalign: 0.0;
}
};
[overlay]
Box loading_overlay {
orientation: vertical;
visible: false;
Spinner {
spinning: true;
valign: end;
vexpand: true;
styles [
"loading-label",
]
}
Label {
label: "Loading...";
valign: start;
vexpand: true;
styles [
"loading-label",
]
}
styles [
"loading-label",
]
}
}
}
Box loading_overlay {
orientation: vertical;
Spinner {
spinning: true;
valign: end;
vexpand: true;
styles [
"loading-label",
]
}
Label {
label: "Loading...";
valign: start;
vexpand: true;
styles [
"loading-label",
]
}
styles [
"loading-label",
]
}

View File

@ -5,13 +5,12 @@ template $TotpWindow : Window {
title: "TOTP Entry";
Overlay overlay {
child: form_wrapper;
halign: center;
hexpand: true;
valign: center;
vexpand: true;
Grid form_wrapper {
child: Grid form_wrapper {
column-spacing: 5;
halign: center;
hexpand: true;
@ -49,6 +48,7 @@ template $TotpWindow : Window {
Button accept_button {
label: "Accept";
clicked => $accepted() swapped;
layout {
column: "1";
@ -58,6 +58,7 @@ template $TotpWindow : Window {
Button cancel_button {
label: "Cancel";
clicked => $canceled() swapped;
layout {
column: "0";
@ -67,6 +68,7 @@ template $TotpWindow : Window {
Entry code_entry {
placeholder-text: "TOTP Code";
changed => $totp_changed() swapped;
layout {
column: "0";
@ -77,6 +79,7 @@ template $TotpWindow : Window {
Label error_label {
label: "ERROR";
visible: false;
styles [
"error-message-label",
@ -88,34 +91,37 @@ template $TotpWindow : Window {
row: "2";
}
}
};
[overlay]
Box loading_overlay {
orientation: vertical;
visible: false;
Spinner {
spinning: true;
valign: end;
vexpand: true;
styles [
"loading-label",
]
}
Label {
label: "Loading...";
valign: start;
vexpand: true;
styles [
"loading-label",
]
}
styles [
"loading-label",
]
}
}
}
Box loading_overlay {
orientation: vertical;
Spinner {
spinning: true;
valign: end;
vexpand: true;
styles [
"loading-label",
]
}
Label {
label: "Loading...";
valign: start;
vexpand: true;
styles [
"loading-label",
]
}
styles [
"loading-label",
]
}