2023-10-21 05:12:52 -07:00

238 lines
4.5 KiB
Plaintext

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 {
child: forms_wrapper;
valign: end;
vexpand: true;
Box forms_wrapper {
valign: end;
vexpand: true;
Grid {
halign: end;
hexpand: true;
margin-bottom: 10;
margin-end: 10;
margin-start: 10;
margin-top: 10;
valign: center;
Label {
hexpand: true;
label: "Login:";
margin-bottom: 5;
vexpand: true;
styles [
"login-title-label",
]
layout {
column: "0";
column-span: "2";
row: "0";
}
}
Label error_label {
label: "ERROR";
margin-top: 5;
styles [
"error-message-label",
]
layout {
column: "0";
column-span: "2";
row: "4";
}
}
Entry device_entry {
margin-start: 6;
placeholder-text: "My Awesome Computer";
secondary-icon-name: "dialog-question-symbolic";
truncate-multiline: true;
width-chars: 18;
layout {
column: "1";
row: "3";
}
}
Label {
label: "Device:";
xalign: 0.0;
layout {
column: "0";
row: "3";
}
}
Label {
label: "Email:";
xalign: 0.0;
layout {
column: "0";
row: "1";
}
}
Label {
label: "Password:";
xalign: 0.0;
layout {
column: "0";
row: "2";
}
}
Entry email_entry {
hexpand: true;
input-purpose: email;
margin-start: 6;
receives-default: true;
truncate-multiline: true;
layout {
column: "1";
row: "1";
}
}
PasswordEntry password_entry {
hexpand: true;
margin-start: 6;
show-peek-icon: true;
layout {
column: "1";
row: "2";
}
}
Button login_button {
halign: center;
label: "Login";
margin-top: 5;
sensitive: false;
valign: center;
layout {
column: "0";
column-span: "2";
row: "5";
}
}
styles [
"login-form-warpper",
]
}
Label {
halign: center;
justify: center;
label: "- or -";
}
Box {
halign: start;
hexpand: true;
margin-bottom: 10;
margin-end: 10;
margin-start: 10;
margin-top: 10;
orientation: vertical;
valign: center;
Label {
hexpand: true;
label: "Set API Key:";
margin-bottom: 5;
styles [
"login-title-label",
]
}
PasswordEntry api_key_entry {
hexpand: true;
margin-end: 3;
margin-start: 8;
show-peek-icon: true;
width-chars: 27;
}
Button api_key_button {
halign: center;
label: "Accept";
margin-top: 5;
sensitive: false;
}
}
}
}
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;
}
}
}
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",
]
}