aboutsummaryrefslogtreecommitdiff
path: root/main/data/preferences_window
diff options
context:
space:
mode:
Diffstat (limited to 'main/data/preferences_window')
-rw-r--r--main/data/preferences_window/account_preferences_subpage.ui136
-rw-r--r--main/data/preferences_window/add_account_dialog.ui405
-rw-r--r--main/data/preferences_window/general_preferences_page.ui68
-rw-r--r--main/data/preferences_window/preferences_window.ui32
4 files changed, 641 insertions, 0 deletions
diff --git a/main/data/preferences_window/account_preferences_subpage.ui b/main/data/preferences_window/account_preferences_subpage.ui
new file mode 100644
index 00000000..e0fa4f76
--- /dev/null
+++ b/main/data/preferences_window/account_preferences_subpage.ui
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk" version="4.0"/>
+ <template class="DinoUiAccountPreferencesSubpage">
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="AdwHeaderBar" id="headerbar">
+ <style>
+ <class name="flat"/>
+ </style>
+ <child>
+ <object class="GtkButton" id="back_button">
+ <property name="icon-name">go-previous-symbolic</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow">
+ <property name="vexpand">True</property>
+ <property name="hexpand">True</property>
+ <child>
+ <object class="AdwClamp">
+ <child>
+ <object class="GtkBox">
+ <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="spacing">24</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkOverlay">
+ <property name="halign">center</property>
+ <property name="child">
+ <object class="DinoUiAvatarPicture" id="avatar">
+ <property name="height-request">144</property>
+ <property name="width-request">144</property>
+ </object>
+ </property>
+ <child type="overlay">
+ <object class="GtkBox" id="avatar_menu_box">
+ <property name="opacity">0.9</property>
+ <property name="margin-end">6</property>
+ <property name="margin-bottom">6</property>
+ <property name="halign">end</property>
+ <property name="valign">end</property>
+ <style>
+ <class name="card"/>
+ <class name="toolbar"/>
+ <class name="overlay-toolbar"/>
+ </style>
+ <child>
+ <object class="GtkButton" id="edit_avatar_button">
+ <property name="icon-name">document-edit-symbolic</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="remove_avatar_button">
+ <property name="icon-name">user-trash-symbolic</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="AdwPreferencesGroup">
+ <child>
+ <object class="AdwActionRow" id="xmpp_address">
+ <property name="title" translatable="yes">XMPP Address</property>
+ <style>
+ <class name="property"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="AdwActionRow" id="local_alias">
+ <property name="title" translatable="yes">Local alias</property>
+ <child type="suffix">
+ <object class="GtkEntry" id="local_alias_entry">
+ <property name="valign">center</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="AdwActionRow" id="connection_status">
+ <property name="title" translatable="yes">Connection status</property>
+ <style>
+ <class name="property"/>
+ </style>
+ <child type="suffix">
+ <object class="GtkButton" id="enter_password_button">
+ <property name="label">Enter password</property>
+ <property name="valign">center</property>
+ <property name="visible">False</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox" id="button_container">
+ <property name="halign">center</property>
+ <property name="spacing">24</property>
+ <child>
+ <object class="GtkButton" id="disable_account_button">
+ <property name="label" translatable="1">Disable account</property>
+ <property name="halign">center</property>
+ <style>
+ <class name="pill"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="remove_account_button">
+ <property name="label" translatable="1">Remove account</property>
+ <property name="halign">center</property>
+ <style>
+ <class name="pill"/>
+ <class name="destructive-action"/>
+ </style>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </template>
+</interface> \ No newline at end of file
diff --git a/main/data/preferences_window/add_account_dialog.ui b/main/data/preferences_window/add_account_dialog.ui
new file mode 100644
index 00000000..243004d6
--- /dev/null
+++ b/main/data/preferences_window/add_account_dialog.ui
@@ -0,0 +1,405 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk" version="4.0"/>
+ <template class="DinoUiManageAccountsAddAccountDialog">
+ <property name="default_width">450</property>
+ <property name="default_height">260</property>
+ <property name="modal">True</property>
+ <child>
+ <object class="GtkBox">
+ <property name="orientation">vertical</property>
+ <property name="spacing">20</property>
+ <child>
+ <object class="AdwHeaderBar">
+ <style>
+ <class name="flat"/>
+ </style>
+ <child>
+ <object class="GtkButton" id="back_button">
+ <property name="icon-name">go-previous-symbolic</property>
+ <property name="visible">False</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="AdwClamp">
+ <property name="maximum-size">400</property>
+ <property name="tightening-threshold">200</property>
+ <property name="margin-bottom">24</property>
+ <child>
+ <object class="GtkOverlay">
+ <property name="child">
+ <object class="GtkStack" id="stack">
+ <property name="transition_type">slide-left</property>
+ <property name="hexpand">1</property>
+ <property name="vexpand">1</property>
+ <child>
+ <object class="GtkStackPage">
+ <property name="name">login_jid</property>
+ <property name="child">
+ <object class="GtkBox" id="sign_in_box">
+ <property name="orientation">vertical</property>
+ <property name="spacing">20</property>
+ <child>
+ <object class="AdwPreferencesGroup">
+ <child>
+ <object class="AdwEntryRow" id="jid_entry">
+ <property name="title">XMPP Address</property>
+ <property name="activates_default">1</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="AdwPreferencesGroup" id="password_group">
+ <property name="visible">False</property>
+ <child>
+ <object class="AdwPasswordEntryRow" id="password_entry">
+ <property name="title">Password</property>
+ <property name="activates_default">1</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="sign_in_error_label">
+ <property name="visible">False</property>
+ <style>
+ <class name="error"/>
+ </style>
+ <attributes>
+ <attribute name="scale" value="0.9"></attribute>
+ </attributes>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="halign">center</property>
+ <property name="spacing">8</property>
+ <property name="orientation">vertical</property>
+ <property name="margin-top">16</property>
+ <child>
+ <object class="GtkButton" id="sign_in_continue_button">
+ <property name="sensitive">False</property>
+ <child>
+ <object class="GtkBox">
+ <property name="spacing">4</property>
+ <property name="halign">center</property>
+ <property name="orientation">horizontal</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="1">Login</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSpinner" id="sign_in_continue_spinner">
+ <property name="visible">false</property>
+ <property name="spinning">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <style>
+ <class name="pill"/>
+ <class name="suggested-action"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="sign_in_serverlist_button">
+ <property name="label" translatable="1">Create account</property>
+ <style>
+ <class name="pill"/>
+ <class name="flat"/>
+ </style>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkStackPage">
+ <property name="name">tls_error</property>
+ <property name="child">
+ <object class="GtkBox" id="sign_in_tls_box">
+ <property name="orientation">vertical</property>
+ <property name="margin-top">30</property>
+ <property name="margin-bottom">20</property>
+ <property name="margin-start">50</property>
+ <property name="margin-end">50</property>
+ <property name="spacing">20</property>
+ <child>
+ <object class="GtkImage">
+ <property name="icon-name">channel-insecure-symbolic</property>
+ <property name="pixel-size">72</property>
+ <property name="margin-top">10</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="1">Could not establish a secure connection</property>
+ <attributes>
+ <attribute name="scale" value="1.1"></attribute>
+ </attributes>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="sign_in_tls_label">
+ <property name="justify">fill</property>
+ <property name="wrap">1</property>
+ <property name="use-markup">1</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <child>
+ <object class="GtkButton" id="sign_in_tls_back_button">
+ <property name="label" translatable="1">Back</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkStackPage">
+ <property name="name">server</property>
+ <property name="child">
+ <object class="GtkBox" id="create_account_box">
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="xalign">0</property>
+ <property name="label" translatable="1">Choose a public server</property>
+ <attributes>
+ <attribute name="weight" value="PANGO_WEIGHT_BOLD"></attribute>
+ </attributes>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFrame">
+ <property name="child">
+ <object class="GtkScrolledWindow">
+ <property name="max_content_height">300</property>
+ <property name="propagate_natural_height">1</property>
+ <property name="hscrollbar_policy">never</property>
+ <property name="child">
+ <object class="GtkListBox" id="server_list_box"/>
+ </property>
+ </object>
+ </property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="xalign">0</property>
+ <property name="margin-top">20</property>
+ <property name="label" translatable="1">Or specify a server address</property>
+ <attributes>
+ <attribute name="weight" value="PANGO_WEIGHT_BOLD"></attribute>
+ </attributes>
+ </object>
+ </child>
+ <child>
+ <object class="GtkEntry" id="server_entry">
+ <property name="activates_default">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="halign">center</property>
+ <property name="spacing">8</property>
+ <property name="margin-top">30</property>
+ <child>
+ <object class="GtkButton" id="login_button">
+ <property name="label" translatable="1">Sign in instead</property>
+ <style>
+ <class name="pill"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="select_server_continue">
+ <property name="hexpand">True</property>
+ <property name="halign">center</property>
+ <property name="sensitive">0</property>
+ <style>
+ <class name="pill"/>
+ <class name="suggested-action"/>
+ </style>
+ <child>
+ <object class="GtkBox">
+ <property name="spacing">4</property>
+ <property name="orientation">horizontal</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="1">Next</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSpinner" id="select_server_continue_spinner">
+ <property name="spinning">True</property>
+ <property name="visible">False</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkStackPage">
+ <property name="name">form</property>
+ <property name="child">
+ <object class="GtkBox" id="register_box">
+ <property name="spacing">30</property>
+ <property name="orientation">vertical</property>
+ <property name="valign">center</property>
+ <child>
+ <object class="GtkBox" id="form_box">
+ <property name="spacing">12</property>
+ <property name="orientation">vertical</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="register_form_continue">
+ <property name="halign">center</property>
+ <property name="hexpand">True</property>
+ <style>
+ <class name="pill"/>
+ <class name="suggested-action"/>
+ </style>
+ <child>
+ <object class="GtkBox">
+ <property name="spacing">4</property>
+ <property name="halign">center</property>
+ <property name="orientation">horizontal</property>
+ <child>
+ <object class="GtkLabel" id="register_form_continue_label">
+ <property name="label" translatable="1">Register</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSpinner" id="register_form_continue_spinner">
+ <property name="spinning">True</property>
+ <property name="visible">False</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkStackPage">
+ <property name="name">success</property>
+ <property name="child">
+ <object class="GtkBox" id="success_box">
+ <property name="orientation">vertical</property>
+ <property name="valign">center</property>
+ <child>
+ <object class="GtkImage">
+ <property name="icon-name">dino-party-popper-symbolic</property>
+ <property name="pixel-size">72</property>
+ <property name="margin-bottom">10</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="1">All set up!</property>
+ <attributes>
+ <attribute name="weight" value="PANGO_WEIGHT_BOLD"></attribute>
+ <attribute name="scale" value="1.3"></attribute>
+ </attributes>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="success_description">
+ <property name="wrap">1</property>
+ <property name="margin-top">5</property>
+ <property name="margin-bottom">5</property>
+ <property name="use-markup">1</property>
+ <property name="justify">center</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="halign">center</property>
+ <property name="margin-top">20</property>
+ <property name="margin-bottom">10</property>
+ <child>
+ <object class="GtkButton" id="success_continue_button">
+ <property name="label" translatable="1">Finish</property>
+ <style>
+ <class name="pill"/>
+ <class name="suggested-action"/>
+ </style>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </property>
+ </object>
+ </child>
+ </object>
+ </property>
+ <child type="overlay">
+ <object class="GtkRevealer" id="notification_revealer">
+ <property name="halign">center</property>
+ <property name="valign">start</property>
+ <property name="child">
+ <object class="GtkFrame" id="frame2">
+ <style>
+ <class name="app-notification"/>
+ </style>
+ <property name="child">
+ <object class="GtkBox" id="box2">
+ <property name="spacing">20</property>
+ <child>
+ <object class="GtkLabel" id="notification_label"/>
+ </child>
+ </object>
+ </property>
+ <child type="label_item">
+ <placeholder/>
+ </child>
+ </object>
+ </property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </template>
+</interface> \ No newline at end of file
diff --git a/main/data/preferences_window/general_preferences_page.ui b/main/data/preferences_window/general_preferences_page.ui
new file mode 100644
index 00000000..33d1a2c9
--- /dev/null
+++ b/main/data/preferences_window/general_preferences_page.ui
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk" version="4.0"/>
+ <template class="DinoUiGeneralPreferencesPage" parent="AdwPreferencesPage">
+ <child>
+ <object class="AdwPreferencesGroup">
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Send _Typing Notifications</property>
+ <property name="use-underline">True</property>
+ <property name="activatable-widget">typing_switch</property>
+ <child type="suffix">
+ <object class="GtkSwitch" id="typing_switch">
+<!-- <property name="active" bind-source="DinoUiGeneralPreferencesPage" bind-property="send-typing" bind-flags="sync-create|bidirectional" />-->
+ <property name="valign">center</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Send _Read Receipts</property>
+ <property name="use-underline">True</property>
+ <property name="activatable-widget">marker_switch</property>
+ <child type="suffix">
+ <object class="GtkSwitch" id="marker_switch">
+ <property name="valign">center</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="AdwPreferencesGroup">
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">_Notifications</property>
+ <property name="subtitle" translatable="yes">Notify when a new message arrives</property>
+ <property name="use-underline">True</property>
+ <property name="activatable-widget">notification_switch</property>
+ <child type="suffix">
+ <object class="GtkSwitch" id="notification_switch">
+ <property name="valign">center</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="AdwPreferencesGroup">
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">_Convert Smileys to Emoji</property>
+ <property name="use-underline">True</property>
+ <property name="activatable-widget">emoji_switch</property>
+ <child type="suffix">
+ <object class="GtkSwitch" id="emoji_switch">
+ <property name="valign">center</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </template>
+</interface>
diff --git a/main/data/preferences_window/preferences_window.ui b/main/data/preferences_window/preferences_window.ui
new file mode 100644
index 00000000..d262dd76
--- /dev/null
+++ b/main/data/preferences_window/preferences_window.ui
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk" version="4.0"/>
+ <object class="DinoUiViewModelPreferencesWindow" id="model" />
+ <template class="DinoUiPreferencesWindow">
+ <property name="default-width">500</property>
+ <property name="default-height">600</property>
+ <property name="modal">True</property>
+ <child>
+ <object class="DinoUiPreferencesWindowAccounts" id="accounts_page">
+ <property name="title">Accounts</property>
+ <property name="name">accounts</property>
+ <property name="icon-name">system-users-symbolic</property>
+ </object>
+ </child>
+ <child>
+ <object class="DinoUiPreferencesWindowEncryption" id="encryption_page">
+ <property name="title">Encryption</property>
+ <property name="name">encryption</property>
+ <property name="icon-name">changes-prevent-symbolic</property>
+ </object>
+ </child>
+ <child>
+ <object class="DinoUiGeneralPreferencesPage" id="general_page">
+ <property name="title">General</property>
+ <property name="name">general</property>
+ <property name="icon-name">preferences-system-symbolic</property>
+ <property name="model" bind-source="model" bind-property="general-page" bind-flags="sync-create" />
+ </object>
+ </child>
+ </template>
+</interface> \ No newline at end of file