refactor: improve auth dialog implementation

This commit is contained in:
talksik
2026-01-27 11:55:51 -08:00
parent 88b10a4380
commit 707e4455ac
3 changed files with 212 additions and 206 deletions
+129 -91
View File
@@ -13,102 +13,140 @@
<property name="windowTitle">
<string>Dialog</string>
</property>
<widget class="QGroupBox" name="groupBox">
<widget class="QStackedWidget" name="stackedWidget">
<property name="geometry">
<rect>
<x>80</x>
<y>30</y>
<width>231</width>
<height>183</height>
<x>40</x>
<y>20</y>
<width>321</width>
<height>241</height>
</rect>
</property>
<property name="title">
<string>Sign in</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="emailLabel">
<property name="text">
<string>Email</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="emailLineEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="codeLabel">
<property name="text">
<string>Code</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="codeLineEdit"/>
</item>
<item>
<widget class="QLabel" name="errorMessage">
<property name="text">
<string>Error</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QPushButton" name="sendCodeButton">
<property name="geometry">
<rect>
<x>230</x>
<y>250</y>
<width>101</width>
<height>32</height>
</rect>
</property>
<property name="text">
<string>Send code</string>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
<widget class="QPushButton" name="signInButton">
<property name="geometry">
<rect>
<x>230</x>
<y>250</y>
<width>101</width>
<height>32</height>
</rect>
</property>
<property name="text">
<string>Sign in</string>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
<widget class="QLabel" name="successLabel">
<property name="geometry">
<rect>
<x>120</x>
<y>120</y>
<width>121</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Successful</string>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="enterEmailPage">
<widget class="QGroupBox" name="groupBox">
<property name="geometry">
<rect>
<x>50</x>
<y>20</y>
<width>231</width>
<height>183</height>
</rect>
</property>
<property name="title">
<string>Sign in</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="emailLabel">
<property name="text">
<string>Email</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="emailLineEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="errorMessage">
<property name="text">
<string>Error</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="sendCodeButton">
<property name="text">
<string>Send code</string>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<widget class="QWidget" name="enterCodePage">
<widget class="QGroupBox" name="groupBox_2">
<property name="geometry">
<rect>
<x>50</x>
<y>20</y>
<width>231</width>
<height>201</height>
</rect>
</property>
<property name="title">
<string>Verify code</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="codeLabel">
<property name="text">
<string>Enter the code we sent to your email</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="codeLineEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="codeErrorMessage">
<property name="text">
<string>Error</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="goBackButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="signInButton">
<property name="text">
<string>Sign In</string>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</widget>
</widget>
<resources/>