@@ -27,7 +27,7 @@ class AccountDialogWidget(QDialog):
2727
2828 def __init__ (self , parent : QWidget | None = None , account : Account | None = None ):
2929 super ().__init__ (parent )
30- self .setFixedHeight (200 )
30+ self .setFixedHeight (230 )
3131 self .setFixedWidth (700 )
3232 main_layout = QVBoxLayout ()
3333 options_group_box = QGroupBox ("Options" )
@@ -39,16 +39,13 @@ def __init__(self, parent: QWidget | None = None, account: Account | None = None
3939 left_layout = QFormLayout ()
4040 right_layout = QFormLayout ()
4141
42- username_label : Final = QLabel ("Account :" , self )
43- self .username : Final = QLineEdit ()
44- left_layout .addRow (username_label , self .username )
42+ profile_name_label : Final = QLabel ("Profile Name :" , self )
43+ self .profile_name : Final = QLineEdit ()
44+ left_layout .addRow (profile_name_label , self .profile_name )
4545
46- region_label : Final = QLabel ("Region:" , self )
47- self .region_combobox : Final = QComboBox ()
48- self .region_combobox .addItem (Region .Europe .name , Region .Europe )
49- self .region_combobox .addItem (Region .Americas .name , Region .Americas )
50- self .region_combobox .addItem (Region .Asia .name , Region .Asia )
51- right_layout .addRow (region_label , self .region_combobox )
46+ email_label : Final = QLabel ("Account:" , self )
47+ self .email : Final = QLineEdit ()
48+ left_layout .addRow (email_label , self .email )
5249
5350 auth_label : Final = QLabel ("Auth Method:" , self )
5451 self .auth_combobox : Final = QComboBox ()
@@ -57,11 +54,22 @@ def __init__(self, parent: QWidget | None = None, account: Account | None = None
5754 self .auth_combobox .currentTextChanged .connect (self .change_password_token_widget )
5855 left_layout .addRow (auth_label , self .auth_combobox )
5956
57+ region_label : Final = QLabel ("Region:" , self )
58+ self .region_combobox : Final = QComboBox ()
59+ self .region_combobox .addItem (Region .Europe .name , Region .Europe )
60+ self .region_combobox .addItem (Region .Americas .name , Region .Americas )
61+ self .region_combobox .addItem (Region .Asia .name , Region .Asia )
62+ right_layout .addRow (region_label , self .region_combobox )
63+
6064 self .password_label : Final = QLabel ("Password:" , self )
6165 # self.password: Final = QLineEdit()
6266 # right_layout.addRow(self.password_label, self.password)
6367 self .password : PasswordWidget = PasswordWidget ("" )
64- right_layout .addRow (self .password_label , self .password )
68+ left_layout .addRow (self .password_label , self .password )
69+
70+ params_label : Final = QLabel ("Start Parameters:" , self )
71+ self .params : Final = QLineEdit ()
72+ right_layout .addRow (params_label , self .params )
6573
6674 self .token_label : Final = QLabel ("Token:" , self )
6775 self .token : Final = QTextEdit ()
@@ -70,12 +78,9 @@ def __init__(self, parent: QWidget | None = None, account: Account | None = None
7078 )
7179 right_layout .addRow (self .token_label , self .token )
7280
73- params_label : Final = QLabel ("Start Parameters:" , self )
74- self .params : Final = QLineEdit ()
75- left_layout .addRow (params_label , self .params )
76-
7781 if account is not None :
78- self .username .setText (account .username )
82+ self .profile_name .setText (account .profile_name or "" )
83+ self .email .setText (account .email )
7984 account_idx = self .auth_combobox .findData (account .auth_method )
8085 self .auth_combobox .setCurrentIndex (account_idx )
8186 region_idx = self .region_combobox .findData (account .region )
@@ -104,7 +109,7 @@ def __init__(self, parent: QWidget | None = None, account: Account | None = None
104109 if account is None :
105110 self .setWindowTitle ("Add a new Account" )
106111 else :
107- self .setWindowTitle (f"Edit Account - Username : { account .username } " )
112+ self .setWindowTitle (f"Edit Account - email : { account .email } " )
108113
109114 button_box .accepted .connect (self .accept )
110115 button_box .rejected .connect (self .reject )
@@ -115,7 +120,8 @@ def __init__(self, parent: QWidget | None = None, account: Account | None = None
115120 @property
116121 def data (self ):
117122 return Account (
118- username = self .username .text (),
123+ profile_name = self .profile_name .text (),
124+ email = self .email .text (),
119125 auth_method = cast (
120126 AuthMethod ,
121127 self .auth_combobox .itemData (self .auth_combobox .currentIndex ()),
0 commit comments