basic-password-manager 0.4.1__tar.gz → 0.4.2__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.
- {basic_password_manager-0.4.1 → basic_password_manager-0.4.2}/PKG-INFO +1 -1
- {basic_password_manager-0.4.1 → basic_password_manager-0.4.2}/basic_password_manager.egg-info/PKG-INFO +1 -1
- {basic_password_manager-0.4.1 → basic_password_manager-0.4.2}/pw_manager/tui.py +23 -8
- {basic_password_manager-0.4.1 → basic_password_manager-0.4.2}/pyproject.toml +1 -1
- {basic_password_manager-0.4.1 → basic_password_manager-0.4.2}/LICENSE +0 -0
- {basic_password_manager-0.4.1 → basic_password_manager-0.4.2}/README.md +0 -0
- {basic_password_manager-0.4.1 → basic_password_manager-0.4.2}/basic_password_manager.egg-info/SOURCES.txt +0 -0
- {basic_password_manager-0.4.1 → basic_password_manager-0.4.2}/basic_password_manager.egg-info/dependency_links.txt +0 -0
- {basic_password_manager-0.4.1 → basic_password_manager-0.4.2}/basic_password_manager.egg-info/entry_points.txt +0 -0
- {basic_password_manager-0.4.1 → basic_password_manager-0.4.2}/basic_password_manager.egg-info/requires.txt +0 -0
- {basic_password_manager-0.4.1 → basic_password_manager-0.4.2}/basic_password_manager.egg-info/top_level.txt +0 -0
- {basic_password_manager-0.4.1 → basic_password_manager-0.4.2}/pw_manager/__init__.py +0 -0
- {basic_password_manager-0.4.1 → basic_password_manager-0.4.2}/pw_manager/cli.py +0 -0
- {basic_password_manager-0.4.1 → basic_password_manager-0.4.2}/pw_manager/crypto.py +0 -0
- {basic_password_manager-0.4.1 → basic_password_manager-0.4.2}/pw_manager/logo.py +0 -0
- {basic_password_manager-0.4.1 → basic_password_manager-0.4.2}/pw_manager/mobile.py +0 -0
- {basic_password_manager-0.4.1 → basic_password_manager-0.4.2}/pw_manager/vault.py +0 -0
- {basic_password_manager-0.4.1 → basic_password_manager-0.4.2}/pw_manager/web/argon2.umd.min.js +0 -0
- {basic_password_manager-0.4.1 → basic_password_manager-0.4.2}/pw_manager/web/page.html +0 -0
- {basic_password_manager-0.4.1 → basic_password_manager-0.4.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: basic-password-manager
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: The Paladin — a local encrypted password manager that lives in your terminal
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Project-URL: Repository, https://github.com/Daisentaur/password-manager
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: basic-password-manager
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: The Paladin — a local encrypted password manager that lives in your terminal
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Project-URL: Repository, https://github.com/Daisentaur/password-manager
|
|
@@ -160,9 +160,10 @@ class ImportModal(ModalScreen):
|
|
|
160
160
|
self.dismiss(os.path.expanduser(event.value.strip()))
|
|
161
161
|
|
|
162
162
|
|
|
163
|
-
def _qr_text(url: str, primary: str) -> Text:
|
|
163
|
+
def _qr_text(url: str, primary: str) -> tuple[Text, int]:
|
|
164
164
|
"""The QR as half-block art: theme-colored modules on white, darkened
|
|
165
|
-
until cameras can read it (
|
|
165
|
+
until cameras can read it. Returns (text, width_in_cells) — the caller
|
|
166
|
+
must give the widget exactly that width: a wrapped QR is a dead QR."""
|
|
166
167
|
import qrcode
|
|
167
168
|
|
|
168
169
|
r, g, b = logo._hex_rgb(primary)
|
|
@@ -176,12 +177,12 @@ def _qr_text(url: str, primary: str) -> Text:
|
|
|
176
177
|
matrix = qr.get_matrix()
|
|
177
178
|
if len(matrix) % 2:
|
|
178
179
|
matrix.append([False] * len(matrix[0]))
|
|
179
|
-
text = Text()
|
|
180
|
+
text = Text(no_wrap=True)
|
|
180
181
|
for top, bottom in zip(matrix[::2], matrix[1::2]):
|
|
181
182
|
for t, btm in zip(top, bottom):
|
|
182
183
|
text.append("▀", Style(color=dark if t else light, bgcolor=dark if btm else light))
|
|
183
184
|
text.append("\n")
|
|
184
|
-
return text
|
|
185
|
+
return text, len(matrix[0])
|
|
185
186
|
|
|
186
187
|
|
|
187
188
|
class MobileModal(ModalScreen):
|
|
@@ -199,6 +200,7 @@ class MobileModal(ModalScreen):
|
|
|
199
200
|
with Vertical(classes="modal-box", id="mobile-box"):
|
|
200
201
|
yield Label("open on phone", classes="modal-title")
|
|
201
202
|
yield Static("creating your secure link…", id="qr")
|
|
203
|
+
yield Static("", id="mobile-url")
|
|
202
204
|
yield Static("", id="mobile-status")
|
|
203
205
|
yield Static("esc ends the session", classes="modal-hint")
|
|
204
206
|
|
|
@@ -217,9 +219,19 @@ class MobileModal(ModalScreen):
|
|
|
217
219
|
self.query_one("#qr", Static).update, f"couldn't start: {e}"
|
|
218
220
|
)
|
|
219
221
|
return
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
222
|
+
self.app.call_from_thread(self._show_qr, url)
|
|
223
|
+
|
|
224
|
+
def _show_qr(self, url: str) -> None:
|
|
225
|
+
qr, width = _qr_text(url, self.app.current_theme.primary)
|
|
226
|
+
widget = self.query_one("#qr", Static)
|
|
227
|
+
widget.update(qr)
|
|
228
|
+
# pin every width to the QR's real size — auto-layout wrapping a QR
|
|
229
|
+
# scrambles the modules and kills scannability
|
|
230
|
+
widget.styles.width = width
|
|
231
|
+
for wid in ("#mobile-url", "#mobile-status"):
|
|
232
|
+
self.query_one(wid, Static).styles.width = width
|
|
233
|
+
self.query_one("#mobile-box").styles.width = width + 6 # padding + border
|
|
234
|
+
self.query_one("#mobile-url", Static).update(url)
|
|
223
235
|
|
|
224
236
|
def _on_fetch(self) -> None:
|
|
225
237
|
self.app.call_from_thread(
|
|
@@ -514,7 +526,10 @@ class PwApp(App):
|
|
|
514
526
|
}
|
|
515
527
|
#mobile-box {
|
|
516
528
|
width: auto;
|
|
517
|
-
|
|
529
|
+
}
|
|
530
|
+
#mobile-url {
|
|
531
|
+
color: $text-muted;
|
|
532
|
+
margin-top: 1;
|
|
518
533
|
}
|
|
519
534
|
.modal-title {
|
|
520
535
|
color: $primary;
|
|
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
|
{basic_password_manager-0.4.1 → basic_password_manager-0.4.2}/pw_manager/web/argon2.umd.min.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|