aboutsummaryrefslogtreecommitdiff
path: root/main/data
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2024-09-16 22:47:49 +0200
committerfiaxh <git@lightrise.org>2024-09-21 17:06:20 +0100
commitf8c004630f56914438fa1b114530f639748e41c1 (patch)
tree4a9d2ae1de436c00e9d1ac75e05426291be52c4b /main/data
parentb09556f03349b51d95c14d1046add355a4754e01 (diff)
downloaddino-f8c004630f56914438fa1b114530f639748e41c1.tar.gz
dino-f8c004630f56914438fa1b114530f639748e41c1.zip
Add change password functionality
Co-authored-by: Stanislav Malishevskiy <stanislav.malishevskiy@gmail.com>
Diffstat (limited to 'main/data')
-rw-r--r--main/data/gresource.xml1
-rw-r--r--main/data/preferences_window/account_preferences_subpage.ui22
-rw-r--r--main/data/preferences_window/change_password_dialog.ui85
-rw-r--r--main/data/preferences_window/preferences_window.ui4
4 files changed, 110 insertions, 2 deletions
diff --git a/main/data/gresource.xml b/main/data/gresource.xml
index 304fa7a4..edceea3e 100644
--- a/main/data/gresource.xml
+++ b/main/data/gresource.xml
@@ -57,6 +57,7 @@
<file>preferences_window/account_preferences_subpage.ui</file>
<file>preferences_window/add_account_dialog.ui</file>
+ <file>preferences_window/change_password_dialog.ui</file>
<file>preferences_window/general_preferences_page.ui</file>
<file>preferences_window/preferences_window.ui</file>
diff --git a/main/data/preferences_window/account_preferences_subpage.ui b/main/data/preferences_window/account_preferences_subpage.ui
index fa273053..a4e0b300 100644
--- a/main/data/preferences_window/account_preferences_subpage.ui
+++ b/main/data/preferences_window/account_preferences_subpage.ui
@@ -80,6 +80,28 @@
</object>
</child>
<child>
+ <object class="AdwActionRow" id="password_change">
+ <property name="title" translatable="yes">Password</property>
+ <child type="suffix">
+ <object class="GtkBox">
+ <property name="opacity">0.7</property>
+ <property name="spacing">6</property>
+ <property name="orientation">horizontal</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">•••••</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImage">
+ <property name="icon-name">go-next-symbolic</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
<object class="AdwActionRow" id="connection_status">
<property name="title" translatable="yes">Connection status</property>
<style>
diff --git a/main/data/preferences_window/change_password_dialog.ui b/main/data/preferences_window/change_password_dialog.ui
new file mode 100644
index 00000000..350d2a2d
--- /dev/null
+++ b/main/data/preferences_window/change_password_dialog.ui
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk" version="4.0"/>
+ <template class="DinoUiChangePasswordDialog">
+ <property name="title" translatable="1">Change password</property>
+ <property name="default-width">430</property>
+ <property name="default-height">270</property>
+ <property name="modal">True</property>
+ <child type="titlebar">
+ <object class="GtkHeaderBar">
+ <property name="show-title-buttons">False</property>
+ <child>
+ <object class="GtkButton" id="cancel_button">
+ <property name="label" translatable="yes">Cancel</property>
+ </object>
+ </child>
+ <child type="end">
+ <object class="GtkButton" id="change_password_button">
+ <property name="sensitive">0</property>
+ <style>
+ <class name="suggested-action"/>
+ </style>
+ <child>
+ <object class="GtkStack" id="change_password_stack">
+ <child>
+ <object class="GtkStackPage">
+ <property name="name">label</property>
+ <property name="child">
+ <object class="GtkLabel" >
+ <property name="label" translatable="1">Change</property>
+ </object>
+ </property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkStackPage">
+ <property name="name">spinner</property>
+ <property name="child">
+ <object class="GtkSpinner">
+ <property name="spinning">True</property>
+ </object>
+ </property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="AdwPreferencesPage">
+ <child>
+ <object class="AdwPreferencesGroup">
+ <child>
+ <object class="AdwPasswordEntryRow" id="current_password_entry">
+ <property name="title" translatable="yes">Current password</property>
+ </object>
+ </child>
+ <child>
+ <object class="AdwPasswordEntryRow" id="new_password_entry">
+ <property name="title" translatable="yes">New password</property>
+ </object>
+ </child>
+ <child>
+ <object class="AdwPasswordEntryRow" id="confirm_new_password_entry">
+ <property name="title" translatable="yes">Confirm password</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="change_password_error_label">
+ <property name="halign">center</property>
+ <property name="hexpand">True</property>
+ <property name="margin-top">7</property>
+ <attributes>
+ <attribute name="scale" value="0.9"></attribute>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </template>
+</interface> \ No newline at end of file
diff --git a/main/data/preferences_window/preferences_window.ui b/main/data/preferences_window/preferences_window.ui
index d262dd76..3cf08f77 100644
--- a/main/data/preferences_window/preferences_window.ui
+++ b/main/data/preferences_window/preferences_window.ui
@@ -3,8 +3,8 @@
<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="default-width">700</property>
+ <property name="default-height">550</property>
<property name="modal">True</property>
<child>
<object class="DinoUiPreferencesWindowAccounts" id="accounts_page">