deskkit 1.2.3__tar.gz → 1.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {deskkit-1.2.3 → deskkit-1.2.4}/PKG-INFO +1 -1
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit/__init__.py +1 -1
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit/ui/login_window.py +60 -16
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit/ui/styles.py +28 -7
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit.egg-info/PKG-INFO +1 -1
- {deskkit-1.2.3 → deskkit-1.2.4}/pyproject.toml +1 -1
- {deskkit-1.2.3 → deskkit-1.2.4}/LICENSE +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/README.md +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit/app.py +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit/auth.py +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit/builder.py +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit/catalog.py +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit/config.py +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit/database.py +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit/exceptions.py +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit/features.py +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit/flowchart.py +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit/generator/__init__.py +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit/generator/export.py +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit/generator/templates/auth.py +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit/generator/templates/database.py +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit/generator/templates/images_utils.py +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit/generator/templates/main.py +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit/generator/templates/qt_loader.py +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit/images.py +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit/presets.py +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit/qt_backend.py +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit/roles.py +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit/tips.py +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit/ui/__init__.py +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit/ui/main_window.py +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit/ui/product_form.py +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit.egg-info/SOURCES.txt +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit.egg-info/dependency_links.txt +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit.egg-info/requires.txt +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/deskkit.egg-info/top_level.txt +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/setup.cfg +0 -0
- {deskkit-1.2.3 → deskkit-1.2.4}/tests/test_catalog.py +0 -0
|
@@ -31,69 +31,113 @@ class LoginWindow(QtWidgets.QDialog):
|
|
|
31
31
|
self.on_success = on_success
|
|
32
32
|
|
|
33
33
|
self.setWindowTitle(f"{config.title} — Вход")
|
|
34
|
-
self.setFixedSize(
|
|
34
|
+
self.setFixedSize(420, 480)
|
|
35
35
|
self.setStyleSheet(APP_STYLE)
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
root = QtWidgets.QVBoxLayout(self)
|
|
38
|
+
root.setContentsMargins(0, 0, 0, 0)
|
|
39
|
+
root.setSpacing(0)
|
|
39
40
|
|
|
40
41
|
header = QtWidgets.QFrame()
|
|
41
|
-
header.
|
|
42
|
+
header.setObjectName("loginHeader")
|
|
43
|
+
header.setStyleSheet(
|
|
44
|
+
f"#loginHeader {{ background-color: {PRIMARY}; border: none; }}"
|
|
45
|
+
)
|
|
42
46
|
header_layout = QtWidgets.QVBoxLayout(header)
|
|
47
|
+
header_layout.setContentsMargins(20, 28, 20, 24)
|
|
48
|
+
header_layout.setSpacing(6)
|
|
49
|
+
|
|
43
50
|
title = QtWidgets.QLabel(config.title)
|
|
44
51
|
title.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
|
|
45
|
-
title.setStyleSheet(
|
|
52
|
+
title.setStyleSheet(
|
|
53
|
+
"color: white; font-size: 22px; font-weight: bold; background: transparent;"
|
|
54
|
+
)
|
|
46
55
|
subtitle = QtWidgets.QLabel("Система управления каталогом")
|
|
47
56
|
subtitle.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
|
|
48
|
-
subtitle.setStyleSheet(
|
|
57
|
+
subtitle.setStyleSheet(
|
|
58
|
+
"color: #E8F5E9; font-size: 13px; background: transparent;"
|
|
59
|
+
)
|
|
49
60
|
header_layout.addWidget(title)
|
|
50
61
|
header_layout.addWidget(subtitle)
|
|
51
|
-
|
|
62
|
+
root.addWidget(header)
|
|
63
|
+
|
|
64
|
+
body = QtWidgets.QWidget()
|
|
65
|
+
body_layout = QtWidgets.QVBoxLayout(body)
|
|
66
|
+
body_layout.setContentsMargins(28, 24, 28, 16)
|
|
67
|
+
body_layout.setSpacing(12)
|
|
52
68
|
|
|
53
69
|
form_frame = QtWidgets.QFrame()
|
|
54
|
-
form_frame.
|
|
70
|
+
form_frame.setObjectName("loginCard")
|
|
71
|
+
form_frame.setStyleSheet(
|
|
72
|
+
f"#loginCard {{"
|
|
73
|
+
f" background-color: {WHITE};"
|
|
74
|
+
f" border: 1px solid #E0E0E0;"
|
|
75
|
+
f" border-radius: 8px;"
|
|
76
|
+
f"}}"
|
|
77
|
+
)
|
|
55
78
|
form_layout = QtWidgets.QVBoxLayout(form_frame)
|
|
56
|
-
form_layout.setContentsMargins(
|
|
79
|
+
form_layout.setContentsMargins(24, 20, 24, 20)
|
|
80
|
+
form_layout.setSpacing(8)
|
|
81
|
+
|
|
82
|
+
lbl_login = QtWidgets.QLabel("Логин")
|
|
83
|
+
lbl_login.setStyleSheet("color: #333; font-weight: 600; background: transparent;")
|
|
84
|
+
form_layout.addWidget(lbl_login)
|
|
57
85
|
|
|
58
|
-
form_layout.addWidget(QtWidgets.QLabel("Логин:"))
|
|
59
86
|
self.login_edit = QtWidgets.QLineEdit()
|
|
60
87
|
self.login_edit.setPlaceholderText("Введите логин (email)")
|
|
88
|
+
self.login_edit.setMinimumHeight(36)
|
|
61
89
|
form_layout.addWidget(self.login_edit)
|
|
62
90
|
|
|
63
|
-
form_layout.
|
|
91
|
+
form_layout.addSpacing(6)
|
|
92
|
+
|
|
93
|
+
lbl_password = QtWidgets.QLabel("Пароль")
|
|
94
|
+
lbl_password.setStyleSheet("color: #333; font-weight: 600; background: transparent;")
|
|
95
|
+
form_layout.addWidget(lbl_password)
|
|
96
|
+
|
|
64
97
|
self.password_edit = QtWidgets.QLineEdit()
|
|
65
98
|
self.password_edit.setEchoMode(QtWidgets.QLineEdit.EchoMode.Password)
|
|
66
99
|
self.password_edit.setPlaceholderText("Введите пароль")
|
|
100
|
+
self.password_edit.setMinimumHeight(36)
|
|
67
101
|
form_layout.addWidget(self.password_edit)
|
|
68
102
|
|
|
69
103
|
self.error_label = QtWidgets.QLabel("")
|
|
70
|
-
self.error_label.setStyleSheet("color: #E74C3C;")
|
|
104
|
+
self.error_label.setStyleSheet("color: #E74C3C; background: transparent;")
|
|
71
105
|
self.error_label.setWordWrap(True)
|
|
72
106
|
self.error_label.hide()
|
|
73
107
|
form_layout.addWidget(self.error_label)
|
|
74
108
|
|
|
109
|
+
form_layout.addSpacing(10)
|
|
110
|
+
|
|
75
111
|
btn_login = QtWidgets.QPushButton("Войти")
|
|
76
112
|
btn_login.setObjectName("primary")
|
|
113
|
+
btn_login.setCursor(QtCore.Qt.CursorShape.PointingHandCursor)
|
|
114
|
+
btn_login.setMinimumHeight(40)
|
|
77
115
|
qt_backend.signal_connect(btn_login, "clicked", self._do_login)
|
|
78
116
|
form_layout.addWidget(btn_login)
|
|
79
117
|
|
|
80
118
|
if self.features.guest_login:
|
|
81
119
|
btn_guest = QtWidgets.QPushButton("Продолжить без авторизации")
|
|
82
120
|
btn_guest.setObjectName("secondary")
|
|
121
|
+
btn_guest.setCursor(QtCore.Qt.CursorShape.PointingHandCursor)
|
|
122
|
+
btn_guest.setMinimumHeight(40)
|
|
83
123
|
qt_backend.signal_connect(btn_guest, "clicked", self._do_guest)
|
|
84
124
|
form_layout.addWidget(btn_guest)
|
|
85
125
|
|
|
86
|
-
|
|
87
|
-
|
|
126
|
+
body_layout.addWidget(form_frame)
|
|
127
|
+
body_layout.addStretch(1)
|
|
88
128
|
|
|
89
129
|
hint = QtWidgets.QLabel(
|
|
90
130
|
"Для входа используйте учётную запись из таблицы users."
|
|
91
131
|
)
|
|
92
132
|
hint.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
|
|
93
|
-
hint.
|
|
94
|
-
|
|
133
|
+
hint.setWordWrap(True)
|
|
134
|
+
hint.setStyleSheet("color: #666; font-size: 11px; background: transparent;")
|
|
135
|
+
body_layout.addWidget(hint)
|
|
136
|
+
|
|
137
|
+
root.addWidget(body, 1)
|
|
95
138
|
|
|
96
139
|
self.password_edit.returnPressed.connect(self._do_login)
|
|
140
|
+
self.login_edit.setFocus()
|
|
97
141
|
|
|
98
142
|
def _show_error(self, message: str) -> None:
|
|
99
143
|
self.error_label.setText(message)
|
|
@@ -9,26 +9,41 @@ WHITE = "#FFFFFF"
|
|
|
9
9
|
ERROR = "#E74C3C"
|
|
10
10
|
|
|
11
11
|
APP_STYLE = f"""
|
|
12
|
-
QMainWindow, QDialog {{
|
|
12
|
+
QMainWindow, QDialog, QWidget {{
|
|
13
13
|
background-color: {BG};
|
|
14
14
|
font-family: "Segoe UI", Arial, sans-serif;
|
|
15
15
|
font-size: 13px;
|
|
16
|
+
color: #222222;
|
|
17
|
+
}}
|
|
18
|
+
QLabel {{
|
|
19
|
+
background: transparent;
|
|
20
|
+
color: #222222;
|
|
16
21
|
}}
|
|
17
22
|
QPushButton {{
|
|
18
23
|
padding: 8px 16px;
|
|
19
|
-
border-radius:
|
|
24
|
+
border-radius: 6px;
|
|
20
25
|
border: none;
|
|
21
|
-
min-height:
|
|
26
|
+
min-height: 36px;
|
|
27
|
+
font-size: 13px;
|
|
22
28
|
}}
|
|
23
29
|
QPushButton#primary {{
|
|
24
30
|
background-color: {ACCENT};
|
|
25
31
|
color: white;
|
|
26
32
|
font-weight: bold;
|
|
27
33
|
}}
|
|
34
|
+
QPushButton#primary:hover {{
|
|
35
|
+
background-color: #2980B9;
|
|
36
|
+
}}
|
|
37
|
+
QPushButton#primary:pressed {{
|
|
38
|
+
background-color: #1F6AA5;
|
|
39
|
+
}}
|
|
28
40
|
QPushButton#secondary {{
|
|
29
41
|
background-color: {GRAY};
|
|
30
42
|
color: white;
|
|
31
43
|
}}
|
|
44
|
+
QPushButton#secondary:hover {{
|
|
45
|
+
background-color: #7F8C8D;
|
|
46
|
+
}}
|
|
32
47
|
QPushButton#success {{
|
|
33
48
|
background-color: {PRIMARY};
|
|
34
49
|
color: white;
|
|
@@ -38,14 +53,20 @@ QPushButton#danger {{
|
|
|
38
53
|
color: white;
|
|
39
54
|
}}
|
|
40
55
|
QLineEdit, QComboBox, QSpinBox, QDoubleSpinBox, QTextEdit {{
|
|
41
|
-
padding:
|
|
42
|
-
border: 1px solid #
|
|
43
|
-
border-radius:
|
|
56
|
+
padding: 8px 10px;
|
|
57
|
+
border: 1px solid #CCCCCC;
|
|
58
|
+
border-radius: 6px;
|
|
44
59
|
background: white;
|
|
60
|
+
color: #222222;
|
|
61
|
+
min-height: 20px;
|
|
62
|
+
selection-background-color: {PRIMARY_LIGHT};
|
|
63
|
+
}}
|
|
64
|
+
QLineEdit:focus, QComboBox:focus, QSpinBox:focus, QDoubleSpinBox:focus, QTextEdit:focus {{
|
|
65
|
+
border: 1px solid {ACCENT};
|
|
45
66
|
}}
|
|
46
67
|
QTableWidget {{
|
|
47
68
|
background: white;
|
|
48
|
-
gridline-color: #
|
|
69
|
+
gridline-color: #DDDDDD;
|
|
49
70
|
selection-background-color: {PRIMARY_LIGHT};
|
|
50
71
|
}}
|
|
51
72
|
QHeaderView::section {{
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|