19 changed files with 717 additions and 777 deletions
@ -0,0 +1,20 @@
|
||||
using Gtk 4.0; |
||||
using Adw 1; |
||||
|
||||
template $LoginAdvancedDialog: Adw.PreferencesDialog { |
||||
title: _("Homeserver Discovery"); |
||||
content-width: 500; |
||||
content-height: 300; |
||||
|
||||
Adw.PreferencesPage { |
||||
Adw.PreferencesGroup { |
||||
description: _("Auto-discovery, also known as “well-known lookup”, allows to discover the URL of a Matrix homeserver from a domain name. This should only be disabled if your homeserver doesn’t support auto-discovery or if you want to provide the URL yourself."); |
||||
|
||||
Adw.SwitchRow { |
||||
title: _("_Auto-Discovery"); |
||||
use-underline: true; |
||||
active: bind template.autodiscovery bidirectional; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="LoginAdvancedDialog" parent="AdwPreferencesDialog"> |
||||
<property name="title" translatable="yes">Homeserver Discovery</property> |
||||
<property name="content-width">500</property> |
||||
<property name="content-height">300</property> |
||||
<child> |
||||
<object class="AdwPreferencesPage"> |
||||
<child> |
||||
<object class="AdwPreferencesGroup"> |
||||
<property name="description" translatable="yes">Auto-discovery, also known as “well-known lookup”, allows to discover the URL of a Matrix homeserver from a domain name. This should only be disabled if your homeserver doesn’t support auto-discovery or if you want to provide the URL yourself.</property> |
||||
<child> |
||||
<object class="AdwSwitchRow"> |
||||
<property name="title" translatable="yes">_Auto-Discovery</property> |
||||
<property name="use-underline">true</property> |
||||
<property name="active" bind-source="LoginAdvancedDialog" bind-property="autodiscovery" bind-flags="sync-create|bidirectional"/> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,138 @@
|
||||
using Gtk 4.0; |
||||
using Adw 1; |
||||
|
||||
template $Greeter: Adw.NavigationPage { |
||||
tag: "greeter"; |
||||
title: _("Welcome to Fractal"); |
||||
|
||||
child: Adw.ToolbarView { |
||||
[top] |
||||
Adw.HeaderBar { |
||||
[start] |
||||
Gtk.Button back_button { |
||||
action-name: "win.show-session"; |
||||
visible: bind back_button.sensitive; |
||||
icon-name: "go-previous-symbolic"; |
||||
tooltip-text: _("Back"); |
||||
|
||||
accessibility { |
||||
label: _("Back"); |
||||
} |
||||
} |
||||
|
||||
[start] |
||||
Gtk.Button { |
||||
visible: bind back_button.visible inverted; |
||||
action-name: "app.about"; |
||||
tooltip-text: _("About Fractal"); |
||||
icon-name: "about-symbolic"; |
||||
|
||||
accessibility { |
||||
label: _("About Fractal"); |
||||
} |
||||
} |
||||
|
||||
[end] |
||||
Gtk.Button { |
||||
visible: bind back_button.visible; |
||||
action-name: "app.about"; |
||||
tooltip-text: _("About Fractal"); |
||||
icon-name: "about-symbolic"; |
||||
|
||||
accessibility { |
||||
label: _("About Fractal"); |
||||
} |
||||
} |
||||
} |
||||
|
||||
content: Gtk.ScrolledWindow { |
||||
hscrollbar-policy: never; |
||||
propagate-natural-height: true; |
||||
vexpand: true; |
||||
|
||||
child: Gtk.Box { |
||||
orientation: vertical; |
||||
|
||||
$OfflineBanner {} |
||||
|
||||
Adw.Clamp { |
||||
maximum-size: 440; |
||||
tightening-threshold: 340; |
||||
margin-top: 0; |
||||
margin-bottom: 24; |
||||
margin-start: 24; |
||||
margin-end: 24; |
||||
vexpand: true; |
||||
|
||||
child: Gtk.Box { |
||||
orientation: vertical; |
||||
valign: center; |
||||
spacing: 24; |
||||
|
||||
Adw.Clamp { |
||||
maximum-size: 360; |
||||
|
||||
child: Gtk.Box { |
||||
orientation: vertical; |
||||
valign: center; |
||||
spacing: 24; |
||||
|
||||
Gtk.Picture { |
||||
file: "resource:///org/gnome/Fractal/assets/welcome.svg"; |
||||
height-request: 120; |
||||
} |
||||
|
||||
Gtk.Label title { |
||||
wrap: true; |
||||
wrap-mode: word_char; |
||||
justify: center; |
||||
label: _("Welcome to Fractal"); |
||||
|
||||
styles [ |
||||
"title-1", |
||||
] |
||||
} |
||||
}; |
||||
} |
||||
|
||||
Adw.Clamp { |
||||
maximum-size: 260; |
||||
margin-top: 10; |
||||
|
||||
child: Gtk.Box { |
||||
orientation: vertical; |
||||
valign: center; |
||||
spacing: 16; |
||||
|
||||
Gtk.Button login_button { |
||||
styles [ |
||||
"pill", |
||||
"suggested-action", |
||||
] |
||||
|
||||
can-shrink: true; |
||||
label: _("_Log In"); |
||||
use-underline: true; |
||||
action-name: "navigation.push"; |
||||
action-target: "'homeserver'"; |
||||
} |
||||
|
||||
Gtk.Button { |
||||
styles [ |
||||
"pill", |
||||
] |
||||
|
||||
visible: false; |
||||
can-shrink: true; |
||||
label: _("_Create Account"); |
||||
use-underline: true; |
||||
action-name: "app.create-account"; |
||||
} |
||||
}; |
||||
} |
||||
}; |
||||
} |
||||
}; |
||||
}; |
||||
}; |
||||
} |
||||
@ -1,150 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="Greeter" parent="AdwNavigationPage"> |
||||
<property name="tag">greeter</property> |
||||
<!-- Translators: Fractal is the application name. --> |
||||
<property name="title" translatable="yes">Welcome to Fractal</property> |
||||
<property name="child"> |
||||
<object class="AdwToolbarView"> |
||||
<child type="top"> |
||||
<object class="AdwHeaderBar"> |
||||
<child type="start"> |
||||
<object class="GtkButton" id="back_button"> |
||||
<property name="action-name">win.show-session</property> |
||||
<property name="visible" bind-source="back_button" bind-property="sensitive" bind-flags="sync-create"/> |
||||
<property name="icon-name">go-previous-symbolic</property> |
||||
<property name="tooltip-text" translatable="yes">Back</property> |
||||
<accessibility> |
||||
<property name="label" translatable="yes">Back</property> |
||||
</accessibility> |
||||
</object> |
||||
</child> |
||||
<child type="start"> |
||||
<object class="GtkButton"> |
||||
<property name="visible" bind-source="back_button" bind-property="visible" bind-flags="sync-create | invert-boolean"/> |
||||
<property name="action-name">app.about</property> |
||||
<property name="tooltip-text" translatable="yes">About Fractal</property> |
||||
<property name="icon-name">about-symbolic</property> |
||||
<accessibility> |
||||
<property name="label" translatable="yes">About Fractal</property> |
||||
</accessibility> |
||||
</object> |
||||
</child> |
||||
<child type="end"> |
||||
<object class="GtkButton"> |
||||
<property name="visible" bind-source="back_button" bind-property="visible" bind-flags="sync-create"/> |
||||
<property name="action-name">app.about</property> |
||||
<property name="tooltip-text" translatable="yes">About Fractal</property> |
||||
<property name="icon-name">about-symbolic</property> |
||||
<accessibility> |
||||
<property name="label" translatable="yes">About Fractal</property> |
||||
</accessibility> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<property name="content"> |
||||
<object class="GtkScrolledWindow"> |
||||
<property name="hscrollbar-policy">never</property> |
||||
<property name="propagate-natural-height">True</property> |
||||
<property name="vexpand">True</property> |
||||
<property name="child"> |
||||
<object class="GtkBox"> |
||||
<property name="orientation">vertical</property> |
||||
<child> |
||||
<object class="OfflineBanner" /> |
||||
</child> |
||||
<child> |
||||
<object class="AdwClamp"> |
||||
<property name="maximum-size">440</property> |
||||
<property name="tightening-threshold">340</property> |
||||
<property name="margin-top">0</property> |
||||
<property name="margin-bottom">24</property> |
||||
<property name="margin-start">24</property> |
||||
<property name="margin-end">24</property> |
||||
<property name="vexpand">true</property> |
||||
<property name="child"> |
||||
<object class="GtkBox"> |
||||
<property name="orientation">vertical</property> |
||||
<property name="valign">center</property> |
||||
<property name="spacing">24</property> |
||||
<child> |
||||
<object class="AdwClamp"> |
||||
<property name="maximum-size">360</property> |
||||
<property name="child"> |
||||
<object class="GtkBox"> |
||||
<property name="orientation">vertical</property> |
||||
<property name="valign">center</property> |
||||
<property name="spacing">24</property> |
||||
<child> |
||||
<object class="GtkPicture"> |
||||
<property name="file">resource:///org/gnome/Fractal/assets/welcome.svg</property> |
||||
<property name="height-request">120</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkLabel" id="title"> |
||||
<property name="wrap">True</property> |
||||
<property name="wrap-mode">word-char</property> |
||||
<property name="justify">center</property> |
||||
<!-- Translators: Fractal is the application name. --> |
||||
<property name="label" translatable="yes">Welcome to Fractal</property> |
||||
<style> |
||||
<class name="title-1"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="AdwClamp"> |
||||
<property name="maximum-size">260</property> |
||||
<property name="margin-top">10</property> |
||||
<property name="child"> |
||||
<object class="GtkBox"> |
||||
<property name="orientation">vertical</property> |
||||
<property name="valign">center</property> |
||||
<property name="spacing">16</property> |
||||
<child> |
||||
<object class="GtkButton" id="login_button"> |
||||
<style> |
||||
<class name="pill"/> |
||||
<class name="suggested-action"/> |
||||
</style> |
||||
<property name="can-shrink">true</property> |
||||
<property name="label" translatable="yes">_Log In</property> |
||||
<property name="use-underline">true</property> |
||||
<property name="action-name">navigation.push</property> |
||||
<property name="action-target">'homeserver'</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkButton"> |
||||
<style> |
||||
<class name="pill"/> |
||||
</style> |
||||
<property name="visible">false</property> |
||||
<property name="can-shrink">true</property> |
||||
<property name="label" translatable="yes">_Create Account</property> |
||||
<property name="use-underline">true</property> |
||||
<property name="action-name">app.create-account</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,125 @@
|
||||
using Gtk 4.0; |
||||
using Adw 1; |
||||
|
||||
template $LoginHomeserverPage: Adw.NavigationPage { |
||||
tag: "homeserver"; |
||||
title: _("Homeserver"); |
||||
|
||||
child: Adw.ToolbarView { |
||||
[top] |
||||
Adw.HeaderBar { |
||||
show-title: false; |
||||
} |
||||
|
||||
content: Gtk.Box { |
||||
orientation: vertical; |
||||
|
||||
$OfflineBanner {} |
||||
|
||||
Gtk.ScrolledWindow scrolled_window { |
||||
hscrollbar-policy: never; |
||||
propagate-natural-height: true; |
||||
vexpand: true; |
||||
|
||||
child: Adw.Clamp { |
||||
maximum-size: 360; |
||||
margin-top: 24; |
||||
margin-bottom: 24; |
||||
margin-start: 12; |
||||
margin-end: 12; |
||||
|
||||
child: Gtk.Box { |
||||
orientation: vertical; |
||||
valign: center; |
||||
spacing: 24; |
||||
accessible-role: form; |
||||
|
||||
accessibility { |
||||
labelled-by: [ |
||||
title, |
||||
]; |
||||
} |
||||
|
||||
Gtk.Label title { |
||||
label: _("Homeserver"); |
||||
wrap: true; |
||||
justify: center; |
||||
accessible-role: heading; |
||||
|
||||
accessibility { |
||||
level: 1; |
||||
} |
||||
|
||||
styles [ |
||||
"title-1", |
||||
] |
||||
} |
||||
|
||||
Gtk.Picture { |
||||
file: "resource:///org/gnome/Fractal/assets/homeserver.svg"; |
||||
accessible-role: presentation; |
||||
} |
||||
|
||||
Gtk.Box { |
||||
orientation: vertical; |
||||
spacing: 6; |
||||
|
||||
Gtk.ListBox { |
||||
accessible-role: group; |
||||
|
||||
styles [ |
||||
"boxed-list", |
||||
] |
||||
|
||||
Adw.EntryRow homeserver_entry { |
||||
selectable: false; |
||||
changed => $update_next_state() swapped; |
||||
entry-activated => $check_homeserver() swapped; |
||||
|
||||
accessibility { |
||||
described-by: [ |
||||
homeserver_help, |
||||
]; |
||||
} |
||||
} |
||||
} |
||||
|
||||
Gtk.Label homeserver_help { |
||||
styles [ |
||||
"caption", |
||||
"dimmed", |
||||
] |
||||
|
||||
justify: left; |
||||
xalign: 0.0; |
||||
margin-start: 6; |
||||
margin-end: 6; |
||||
wrap: true; |
||||
use-markup: true; |
||||
} |
||||
} |
||||
|
||||
$LoadingButton next_button { |
||||
content-label: _("Next"); |
||||
halign: center; |
||||
clicked => $check_homeserver() swapped; |
||||
|
||||
styles [ |
||||
"suggested-action", |
||||
"standalone-button", |
||||
"pill", |
||||
] |
||||
} |
||||
|
||||
Gtk.Button { |
||||
can-shrink: true; |
||||
halign: center; |
||||
label: _("Advanced…"); |
||||
action-name: "login.open-advanced"; |
||||
} |
||||
}; |
||||
}; |
||||
} |
||||
}; |
||||
}; |
||||
} |
||||
@ -1,130 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="LoginHomeserverPage" parent="AdwNavigationPage"> |
||||
<property name="tag">homeserver</property> |
||||
<property name="title" translatable="yes">Homeserver</property> |
||||
<property name="child"> |
||||
<object class="AdwToolbarView"> |
||||
<child type="top"> |
||||
<object class="AdwHeaderBar"> |
||||
<property name="show-title">False</property> |
||||
</object> |
||||
</child> |
||||
<property name="content"> |
||||
<object class="GtkBox"> |
||||
<property name="orientation">vertical</property> |
||||
<child> |
||||
<object class="OfflineBanner" /> |
||||
</child> |
||||
<child> |
||||
<object class="GtkScrolledWindow" id="scrolled_window"> |
||||
<property name="hscrollbar-policy">never</property> |
||||
<property name="propagate-natural-height">True</property> |
||||
<property name="vexpand">True</property> |
||||
<property name="child"> |
||||
<object class="AdwClamp"> |
||||
<property name="maximum-size">360</property> |
||||
<property name="margin-top">24</property> |
||||
<property name="margin-bottom">24</property> |
||||
<property name="margin-start">12</property> |
||||
<property name="margin-end">12</property> |
||||
<property name="child"> |
||||
<object class="GtkBox"> |
||||
<property name="orientation">vertical</property> |
||||
<property name="valign">center</property> |
||||
<property name="spacing">24</property> |
||||
<property name="accessible-role">form</property> |
||||
<accessibility> |
||||
<relation name="labelled-by">title</relation> |
||||
</accessibility> |
||||
<child> |
||||
<object class="GtkLabel" id="title"> |
||||
<property name="label" translatable="yes">Homeserver</property> |
||||
<property name="wrap">true</property> |
||||
<property name="justify">center</property> |
||||
<property name="accessible-role">heading</property> |
||||
<accessibility> |
||||
<property name="level">1</property> |
||||
</accessibility> |
||||
<style> |
||||
<class name="title-1"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkPicture"> |
||||
<property name="file">resource:///org/gnome/Fractal/assets/homeserver.svg</property> |
||||
<property name="accessible-role">presentation</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkBox"> |
||||
<property name="orientation">vertical</property> |
||||
<property name="spacing">6</property> |
||||
<child> |
||||
<object class="GtkListBox"> |
||||
<property name="accessible-role">group</property> |
||||
<style> |
||||
<class name="boxed-list"/> |
||||
</style> |
||||
<child> |
||||
<object class="AdwEntryRow" id="homeserver_entry"> |
||||
<property name="selectable">false</property> |
||||
<signal name="changed" handler="update_next_state" swapped="yes"/> |
||||
<signal name="entry-activated" handler="check_homeserver" swapped="yes"/> |
||||
<accessibility> |
||||
<relation name="described-by">homeserver_help</relation> |
||||
</accessibility> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkLabel" id="homeserver_help"> |
||||
<style> |
||||
<class name="caption"/> |
||||
<class name="dimmed"/> |
||||
</style> |
||||
<property name="justify">left</property> |
||||
<property name="xalign">0.0</property> |
||||
<property name="margin-start">6</property> |
||||
<property name="margin-end">6</property> |
||||
<property name="wrap">true</property> |
||||
<property name="use-markup">true</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="LoadingButton" id="next_button"> |
||||
<property name="content-label" translatable="yes">Next</property> |
||||
<property name="halign">center</property> |
||||
<signal name="clicked" handler="check_homeserver" swapped="yes"/> |
||||
<style> |
||||
<class name="suggested-action"/> |
||||
<class name="standalone-button"/> |
||||
<class name="pill"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkButton"> |
||||
<property name="can-shrink">true</property> |
||||
<property name="halign">center</property> |
||||
<!-- Translators: As in 'Advanced Settings'. --> |
||||
<property name="label" translatable="yes">Advanced…</property> |
||||
<property name="action-name">login.open-advanced</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,95 @@
|
||||
using Gtk 4.0; |
||||
using Adw 1; |
||||
|
||||
template $LoginInBrowserPage: Adw.NavigationPage { |
||||
tag: "in-browser"; |
||||
title: _("Authentication"); |
||||
|
||||
child: Adw.ToolbarView { |
||||
[top] |
||||
Adw.HeaderBar { |
||||
show-title: false; |
||||
} |
||||
|
||||
content: Gtk.Box { |
||||
orientation: vertical; |
||||
|
||||
$OfflineBanner {} |
||||
|
||||
Gtk.ScrolledWindow scrolled_window { |
||||
hscrollbar-policy: never; |
||||
propagate-natural-height: true; |
||||
vexpand: true; |
||||
|
||||
child: Adw.Clamp { |
||||
margin-top: 24; |
||||
margin-bottom: 24; |
||||
margin-start: 12; |
||||
margin-end: 12; |
||||
|
||||
child: Gtk.Box { |
||||
orientation: vertical; |
||||
spacing: 36; |
||||
valign: center; |
||||
|
||||
Gtk.Label title { |
||||
wrap: true; |
||||
wrap-mode: word_char; |
||||
justify: center; |
||||
label: _("Authentication"); |
||||
accessible-role: heading; |
||||
|
||||
accessibility { |
||||
level: 1; |
||||
} |
||||
|
||||
styles [ |
||||
"title-1", |
||||
] |
||||
} |
||||
|
||||
Gtk.Label instructions { |
||||
wrap: true; |
||||
wrap-mode: word_char; |
||||
justify: center; |
||||
label: _("Click on the button below and follow the steps in the browser"); |
||||
|
||||
styles [ |
||||
"body", |
||||
] |
||||
} |
||||
|
||||
Gtk.Button continue_btn { |
||||
styles [ |
||||
"suggested-action", |
||||
"standalone-button", |
||||
"image-text-button", |
||||
"pill", |
||||
] |
||||
|
||||
child: Gtk.Box { |
||||
halign: center; |
||||
|
||||
Gtk.Label { |
||||
label: _("Contin_ue"); |
||||
use-underline: true; |
||||
ellipsize: end; |
||||
mnemonic-widget: continue_btn; |
||||
} |
||||
|
||||
Gtk.Image { |
||||
icon-name: "external-link-symbolic"; |
||||
accessible-role: presentation; |
||||
valign: center; |
||||
} |
||||
}; |
||||
|
||||
halign: center; |
||||
clicked => $launch_url() swapped; |
||||
} |
||||
}; |
||||
}; |
||||
} |
||||
}; |
||||
}; |
||||
} |
||||
@ -1,104 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="LoginInBrowserPage" parent="AdwNavigationPage"> |
||||
<property name="tag">in-browser</property> |
||||
<property name="title" translatable="yes">Authentication</property> |
||||
<property name="child"> |
||||
<object class="AdwToolbarView"> |
||||
<child type="top"> |
||||
<object class="AdwHeaderBar"> |
||||
<property name="show-title">False</property> |
||||
</object> |
||||
</child> |
||||
<property name="content"> |
||||
<object class="GtkBox"> |
||||
<property name="orientation">vertical</property> |
||||
<child> |
||||
<object class="OfflineBanner" /> |
||||
</child> |
||||
<child> |
||||
<object class="GtkScrolledWindow" id="scrolled_window"> |
||||
<property name="hscrollbar-policy">never</property> |
||||
<property name="propagate-natural-height">True</property> |
||||
<property name="vexpand">True</property> |
||||
<property name="child"> |
||||
<object class="AdwClamp"> |
||||
<property name="margin-top">24</property> |
||||
<property name="margin-bottom">24</property> |
||||
<property name="margin-start">12</property> |
||||
<property name="margin-end">12</property> |
||||
<property name="child"> |
||||
<object class="GtkBox"> |
||||
<property name="orientation">vertical</property> |
||||
<property name="spacing">36</property> |
||||
<property name="valign">center</property> |
||||
<child> |
||||
<object class="GtkLabel" id="title"> |
||||
<property name="wrap">True</property> |
||||
<property name="wrap-mode">word-char</property> |
||||
<property name="justify">center</property> |
||||
<property name="label" translatable="yes">Authentication</property> |
||||
<property name="accessible-role">heading</property> |
||||
<accessibility> |
||||
<property name="level">1</property> |
||||
</accessibility> |
||||
<style> |
||||
<class name="title-1"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkLabel" id="instructions"> |
||||
<property name="wrap">True</property> |
||||
<property name="wrap-mode">word-char</property> |
||||
<property name="justify">center</property> |
||||
<property name="label" translatable="yes">Click on the button below and follow the steps in the browser</property> |
||||
<style> |
||||
<class name="body"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkButton" id="continue_btn"> |
||||
<style> |
||||
<class name="suggested-action"/> |
||||
<class name="standalone-button"/> |
||||
<class name="image-text-button"/> |
||||
<class name="pill"/> |
||||
</style> |
||||
<property name="child"> |
||||
<object class="GtkBox"> |
||||
<property name="halign">center</property> |
||||
<child> |
||||
<object class="GtkLabel"> |
||||
<property name="label" translatable="yes">Contin_ue</property> |
||||
<property name="use-underline">True</property> |
||||
<property name="ellipsize">end</property> |
||||
<property name="mnemonic-widget">continue_btn</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkImage"> |
||||
<property name="icon-name">external-link-symbolic</property> |
||||
<property name="accessible-role">presentation</property> |
||||
<property name="valign">center</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
<property name="halign">center</property> |
||||
<signal name="clicked" handler="launch_url" swapped="yes" /> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,156 @@
|
||||
using Gtk 4.0; |
||||
using Adw 1; |
||||
|
||||
template $LoginMethodPage: Adw.NavigationPage { |
||||
tag: "method"; |
||||
title: _("Log In"); |
||||
|
||||
child: Adw.ToolbarView { |
||||
[top] |
||||
Adw.HeaderBar { |
||||
show-title: false; |
||||
} |
||||
|
||||
content: Gtk.Box { |
||||
orientation: vertical; |
||||
|
||||
$OfflineBanner {} |
||||
|
||||
Gtk.ScrolledWindow scrolled_window { |
||||
hscrollbar-policy: never; |
||||
propagate-natural-height: true; |
||||
vexpand: true; |
||||
|
||||
child: Adw.Clamp { |
||||
maximum-size: 360; |
||||
margin-top: 24; |
||||
margin-bottom: 24; |
||||
margin-start: 12; |
||||
margin-end: 12; |
||||
|
||||
child: Gtk.Box { |
||||
orientation: vertical; |
||||
valign: center; |
||||
spacing: 30; |
||||
accessible-role: form; |
||||
|
||||
accessibility { |
||||
labelled-by: [ |
||||
title, |
||||
]; |
||||
|
||||
described-by: [ |
||||
homeserver_url, |
||||
]; |
||||
} |
||||
|
||||
Gtk.Box { |
||||
orientation: vertical; |
||||
spacing: 12; |
||||
halign: center; |
||||
|
||||
Gtk.Label title { |
||||
styles [ |
||||
"title-1", |
||||
] |
||||
|
||||
wrap: true; |
||||
justify: center; |
||||
accessible-role: heading; |
||||
|
||||
accessibility { |
||||
level: 1; |
||||
} |
||||
} |
||||
|
||||
Gtk.Box { |
||||
spacing: 6; |
||||
halign: center; |
||||
tooltip-text: _("Homeserver URL"); |
||||
|
||||
Gtk.Image { |
||||
icon-name: "home-symbolic"; |
||||
accessible-role: presentation; |
||||
} |
||||
|
||||
Gtk.Label homeserver_url { |
||||
styles [ |
||||
"body", |
||||
] |
||||
|
||||
ellipsize: end; |
||||
} |
||||
} |
||||
} |
||||
|
||||
Gtk.ListBox { |
||||
accessible-role: group; |
||||
|
||||
styles [ |
||||
"boxed-list", |
||||
] |
||||
|
||||
Adw.EntryRow username_entry { |
||||
title: _("Matrix Username"); |
||||
selectable: false; |
||||
changed => $update_next_state() swapped; |
||||
entry-activated => $login_with_password() swapped; |
||||
} |
||||
} |
||||
|
||||
Gtk.ListBox { |
||||
accessible-role: group; |
||||
|
||||
styles [ |
||||
"boxed-list", |
||||
] |
||||
|
||||
Adw.PasswordEntryRow password_entry { |
||||
title: _("Password"); |
||||
selectable: false; |
||||
changed => $update_next_state() swapped; |
||||
entry-activated => $login_with_password() swapped; |
||||
} |
||||
} |
||||
|
||||
Gtk.Box sso_idp_box { |
||||
visible: false; |
||||
spacing: 12; |
||||
homogeneous: true; |
||||
hexpand: true; |
||||
vexpand: true; |
||||
|
||||
accessibility { |
||||
label: _("Single Sign-On Providers"); |
||||
} |
||||
} |
||||
|
||||
Gtk.Button more_sso_btn { |
||||
styles [ |
||||
"standalone-button", |
||||
"pill", |
||||
] |
||||
|
||||
can-shrink: true; |
||||
halign: center; |
||||
action-name: "login.sso"; |
||||
action-target: "@ms nothing"; |
||||
} |
||||
|
||||
$LoadingButton next_button { |
||||
content-label: _("Next"); |
||||
halign: center; |
||||
clicked => $login_with_password() swapped; |
||||
|
||||
styles [ |
||||
"suggested-action", |
||||
"standalone-button", |
||||
"pill", |
||||
] |
||||
} |
||||
}; |
||||
}; |
||||
} |
||||
}; |
||||
}; |
||||
} |
||||
@ -1,161 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="LoginMethodPage" parent="AdwNavigationPage"> |
||||
<property name="tag">method</property> |
||||
<property name="title" translatable="yes">Log In</property> |
||||
<property name="child"> |
||||
<object class="AdwToolbarView"> |
||||
<child type="top"> |
||||
<object class="AdwHeaderBar"> |
||||
<property name="show-title">False</property> |
||||
</object> |
||||
</child> |
||||
<property name="content"> |
||||
<object class="GtkBox"> |
||||
<property name="orientation">vertical</property> |
||||
<child> |
||||
<object class="OfflineBanner" /> |
||||
</child> |
||||
<child> |
||||
<object class="GtkScrolledWindow" id="scrolled_window"> |
||||
<property name="hscrollbar-policy">never</property> |
||||
<property name="propagate-natural-height">True</property> |
||||
<property name="vexpand">True</property> |
||||
<property name="child"> |
||||
<object class="AdwClamp"> |
||||
<property name="maximum-size">360</property> |
||||
<property name="margin-top">24</property> |
||||
<property name="margin-bottom">24</property> |
||||
<property name="margin-start">12</property> |
||||
<property name="margin-end">12</property> |
||||
<property name="child"> |
||||
<object class="GtkBox"> |
||||
<property name="orientation">vertical</property> |
||||
<property name="valign">center</property> |
||||
<property name="spacing">30</property> |
||||
<property name="accessible-role">form</property> |
||||
<accessibility> |
||||
<relation name="labelled-by">title</relation> |
||||
<relation name="described-by">homeserver_url</relation> |
||||
</accessibility> |
||||
<child> |
||||
<object class="GtkBox"> |
||||
<property name="orientation">vertical</property> |
||||
<property name="spacing">12</property> |
||||
<property name="halign">center</property> |
||||
<child> |
||||
<object class="GtkLabel" id="title"> |
||||
<style> |
||||
<class name="title-1"/> |
||||
</style> |
||||
<property name="wrap">true</property> |
||||
<property name="justify">center</property> |
||||
<property name="accessible-role">heading</property> |
||||
<accessibility> |
||||
<property name="level">1</property> |
||||
</accessibility> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkBox"> |
||||
<property name="spacing">6</property> |
||||
<property name="halign">center</property> |
||||
<property name="tooltip-text" translatable="yes">Homeserver URL</property> |
||||
<child> |
||||
<object class="GtkImage"> |
||||
<property name="icon-name">home-symbolic</property> |
||||
<property name="accessible-role">presentation</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkLabel" id="homeserver_url"> |
||||
<style> |
||||
<class name="body"/> |
||||
</style> |
||||
<property name="ellipsize">end</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkListBox"> |
||||
<property name="accessible-role">group</property> |
||||
<style> |
||||
<class name="boxed-list"/> |
||||
</style> |
||||
<child> |
||||
<object class="AdwEntryRow" id="username_entry"> |
||||
<property name="title" translatable="yes">Matrix Username</property> |
||||
<property name="selectable">false</property> |
||||
<signal name="changed" handler="update_next_state" swapped="yes"/> |
||||
<signal name="entry-activated" handler="login_with_password" swapped="yes"/> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkListBox"> |
||||
<property name="accessible-role">group</property> |
||||
<style> |
||||
<class name="boxed-list"/> |
||||
</style> |
||||
<child> |
||||
<object class="AdwPasswordEntryRow" id="password_entry"> |
||||
<property name="title" translatable="yes">Password</property> |
||||
<property name="selectable">false</property> |
||||
<signal name="changed" handler="update_next_state" swapped="yes"/> |
||||
<signal name="entry-activated" handler="login_with_password" swapped="yes"/> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkBox" id="sso_idp_box"> |
||||
<property name="visible">false</property> |
||||
<property name="spacing">12</property> |
||||
<property name="homogeneous">true</property> |
||||
<property name="hexpand">true</property> |
||||
<property name="vexpand">true</property> |
||||
<accessibility> |
||||
<property name="label" translatable="yes">Single Sign-On Providers</property> |
||||
</accessibility> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkButton" id="more_sso_btn"> |
||||
<style> |
||||
<class name="standalone-button"/> |
||||
<class name="pill"/> |
||||
</style> |
||||
<property name="can-shrink">true</property> |
||||
<property name="halign">center</property> |
||||
<property name="action-name">login.sso</property> |
||||
<property name="action-target">@ms nothing</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="LoadingButton" id="next_button"> |
||||
<property name="content-label" translatable="yes">Next</property> |
||||
<property name="halign">center</property> |
||||
<signal name="clicked" handler="login_with_password" swapped="yes"/> |
||||
<style> |
||||
<class name="suggested-action"/> |
||||
<class name="standalone-button"/> |
||||
<class name="pill"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,100 @@
|
||||
using Gtk 4.0; |
||||
using Adw 1; |
||||
|
||||
template $Login: Adw.Bin { |
||||
child: Adw.NavigationView navigation { |
||||
$Greeter greeter {} |
||||
|
||||
$LoginHomeserverPage homeserver_page { |
||||
login: template; |
||||
} |
||||
|
||||
$LoginMethodPage method_page { |
||||
login: template; |
||||
} |
||||
|
||||
$LoginInBrowserPage in_browser_page { |
||||
login: template; |
||||
} |
||||
|
||||
Adw.NavigationPage { |
||||
tag: "completed"; |
||||
title: _("Login Complete"); |
||||
can-pop: false; |
||||
|
||||
child: Adw.ToolbarView { |
||||
[top] |
||||
Adw.HeaderBar { |
||||
show-title: false; |
||||
} |
||||
|
||||
content: Gtk.Box { |
||||
orientation: vertical; |
||||
|
||||
$OfflineBanner {} |
||||
|
||||
Gtk.ScrolledWindow { |
||||
hscrollbar-policy: never; |
||||
propagate-natural-height: true; |
||||
vexpand: true; |
||||
|
||||
child: Adw.Clamp { |
||||
maximum-size: 400; |
||||
tightening-threshold: 300; |
||||
|
||||
child: Gtk.Box { |
||||
orientation: vertical; |
||||
spacing: 18; |
||||
valign: center; |
||||
|
||||
Gtk.Label { |
||||
wrap: true; |
||||
wrap-mode: word_char; |
||||
justify: center; |
||||
label: _("Login Complete"); |
||||
accessible-role: heading; |
||||
|
||||
accessibility { |
||||
level: 1; |
||||
} |
||||
|
||||
styles [ |
||||
"title-1", |
||||
] |
||||
} |
||||
|
||||
Gtk.Picture { |
||||
file: "resource:///org/gnome/Fractal/assets/setup-complete.svg"; |
||||
accessible-role: presentation; |
||||
} |
||||
|
||||
Gtk.Label { |
||||
wrap: true; |
||||
wrap-mode: word_char; |
||||
justify: center; |
||||
label: _("This session is ready to send and receive secure messages"); |
||||
|
||||
styles [ |
||||
"body", |
||||
] |
||||
} |
||||
|
||||
Gtk.Button done_button { |
||||
can-shrink: true; |
||||
label: _("Start Chatting"); |
||||
halign: center; |
||||
clicked => $finish_login() swapped; |
||||
|
||||
styles [ |
||||
"suggested-action", |
||||
"pill", |
||||
] |
||||
} |
||||
}; |
||||
}; |
||||
} |
||||
}; |
||||
}; |
||||
} |
||||
}; |
||||
} |
||||
@ -1,115 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="Login" parent="AdwBin"> |
||||
<property name="child"> |
||||
<object class="AdwNavigationView" id="navigation"> |
||||
<child> |
||||
<object class="Greeter" id="greeter" /> |
||||
</child> |
||||
<child> |
||||
<object class="LoginHomeserverPage" id="homeserver_page"> |
||||
<property name="login">Login</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="LoginMethodPage" id="method_page"> |
||||
<property name="login">Login</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="LoginInBrowserPage" id="in_browser_page"> |
||||
<property name="login">Login</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="AdwNavigationPage"> |
||||
<property name="tag">completed</property> |
||||
<property name="title" translatable="yes">Login Complete</property> |
||||
<property name="can-pop">false</property> |
||||
<property name="child"> |
||||
<object class="AdwToolbarView"> |
||||
<child type="top"> |
||||
<object class="AdwHeaderBar"> |
||||
<property name="show-title">False</property> |
||||
</object> |
||||
</child> |
||||
<property name="content"> |
||||
<object class="GtkBox"> |
||||
<property name="orientation">vertical</property> |
||||
<child> |
||||
<object class="OfflineBanner" /> |
||||
</child> |
||||
<child> |
||||
<object class="GtkScrolledWindow"> |
||||
<property name="hscrollbar-policy">never</property> |
||||
<property name="propagate-natural-height">True</property> |
||||
<property name="vexpand">True</property> |
||||
<property name="child"> |
||||
<object class="AdwClamp"> |
||||
<property name="maximum-size">400</property> |
||||
<property name="tightening-threshold">300</property> |
||||
<property name="child"> |
||||
<object class="GtkBox"> |
||||
<property name="orientation">vertical</property> |
||||
<property name="spacing">18</property> |
||||
<property name="valign">center</property> |
||||
<child> |
||||
<object class="GtkLabel"> |
||||
<property name="wrap">True</property> |
||||
<property name="wrap-mode">word-char</property> |
||||
<property name="justify">center</property> |
||||
<property name="label" translatable="yes">Login Complete</property> |
||||
<property name="accessible-role">heading</property> |
||||
<accessibility> |
||||
<property name="level">1</property> |
||||
</accessibility> |
||||
<style> |
||||
<class name="title-1"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkPicture"> |
||||
<property name="file">resource:///org/gnome/Fractal/assets/setup-complete.svg</property> |
||||
<property name="accessible-role">presentation</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkLabel"> |
||||
<property name="wrap">True</property> |
||||
<property name="wrap-mode">word-char</property> |
||||
<property name="justify">center</property> |
||||
<property name="label" translatable="yes">This session is ready to send and receive secure messages</property> |
||||
<style> |
||||
<class name="body"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkButton" id="done_button"> |
||||
<property name="can-shrink">true</property> |
||||
<property name="label" translatable="yes">Start Chatting</property> |
||||
<property name="halign">center</property> |
||||
<signal name="clicked" handler="finish_login" swapped="yes"/> |
||||
<style> |
||||
<class name="suggested-action"/> |
||||
<class name="pill"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,58 @@
|
||||
using Gtk 4.0; |
||||
using Adw 1; |
||||
|
||||
template $SessionSetupView: Adw.NavigationPage { |
||||
tag: "session-setup"; |
||||
title: _("Session Setup"); |
||||
shown => $focus_default_widget() swapped; |
||||
|
||||
child: Gtk.Stack stack { |
||||
transition-type: slide_left; |
||||
vexpand: true; |
||||
notify::transition-running => $focus_default_widget() swapped; |
||||
|
||||
Gtk.StackPage { |
||||
name: "loading"; |
||||
title: _("Loading"); |
||||
|
||||
child: Adw.ToolbarView { |
||||
[top] |
||||
Adw.HeaderBar { |
||||
title-widget: Adw.WindowTitle { |
||||
title: _("Fractal"); |
||||
}; |
||||
} |
||||
|
||||
content: Gtk.Box { |
||||
orientation: vertical; |
||||
|
||||
$OfflineBanner {} |
||||
|
||||
Gtk.Box { |
||||
orientation: vertical; |
||||
valign: center; |
||||
vexpand: true; |
||||
spacing: 24; |
||||
|
||||
Adw.Spinner { |
||||
height-request: 64; |
||||
width-request: 64; |
||||
} |
||||
|
||||
Gtk.Label { |
||||
halign: center; |
||||
justify: center; |
||||
wrap: true; |
||||
wrap-mode: word_char; |
||||
label: _("Fetching Account Data…"); |
||||
|
||||
styles [ |
||||
"title-2", |
||||
] |
||||
} |
||||
} |
||||
}; |
||||
}; |
||||
} |
||||
}; |
||||
} |
||||
@ -1,68 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="SessionSetupView" parent="AdwNavigationPage"> |
||||
<property name="tag">session-setup</property> |
||||
<property name="title" translatable="yes">Session Setup</property> |
||||
<signal name="shown" handler="focus_default_widget" swapped="yes" /> |
||||
<property name="child"> |
||||
<object class="GtkStack" id="stack"> |
||||
<property name="transition-type">slide-left</property> |
||||
<property name="vexpand">True</property> |
||||
<signal name="notify::transition-running" handler="focus_default_widget" swapped="yes" /> |
||||
<child> |
||||
<object class="GtkStackPage"> |
||||
<property name="name">loading</property> |
||||
<property name="title" translatable="yes">Loading</property> |
||||
<property name="child"> |
||||
<object class="AdwToolbarView"> |
||||
<child type="top"> |
||||
<object class="AdwHeaderBar"> |
||||
<property name="title-widget"> |
||||
<object class="AdwWindowTitle"> |
||||
<property name="title" translatable="yes">Fractal</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
<property name="content"> |
||||
<object class="GtkBox"> |
||||
<property name="orientation">vertical</property> |
||||
<child> |
||||
<object class="OfflineBanner"/> |
||||
</child> |
||||
<child> |
||||
<object class="GtkBox"> |
||||
<property name="orientation">vertical</property> |
||||
<property name="valign">center</property> |
||||
<property name="vexpand">True</property> |
||||
<property name="spacing">24</property> |
||||
<child> |
||||
<object class="AdwSpinner"> |
||||
<property name="height-request">64</property> |
||||
<property name="width-request">64</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkLabel"> |
||||
<property name="halign">center</property> |
||||
<property name="justify">center</property> |
||||
<property name="wrap">True</property> |
||||
<property name="wrap-mode">word-char</property> |
||||
<property name="label" translatable="yes">Fetching Account Data…</property> |
||||
<style> |
||||
<class name="title-2"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,10 @@
|
||||
using Gtk 4.0; |
||||
|
||||
template $SsoIdpButton: Gtk.Button { |
||||
styles [ |
||||
"card", |
||||
"sso-button", |
||||
] |
||||
|
||||
action-name: "login.sso"; |
||||
} |
||||
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="SsoIdpButton" parent="GtkButton"> |
||||
<style> |
||||
<class name="card"/> |
||||
<class name="sso-button"/> |
||||
</style> |
||||
<property name="action-name">login.sso</property> |
||||
</template> |
||||
</interface> |
||||
Loading…
Reference in new issue