basic-password-manager 0.4.3__tar.gz → 0.4.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.
Files changed (20) hide show
  1. {basic_password_manager-0.4.3 → basic_password_manager-0.4.4}/PKG-INFO +5 -3
  2. {basic_password_manager-0.4.3 → basic_password_manager-0.4.4}/README.md +4 -2
  3. {basic_password_manager-0.4.3 → basic_password_manager-0.4.4}/basic_password_manager.egg-info/PKG-INFO +5 -3
  4. {basic_password_manager-0.4.3 → basic_password_manager-0.4.4}/pw_manager/tui.py +45 -2
  5. {basic_password_manager-0.4.3 → basic_password_manager-0.4.4}/pyproject.toml +1 -1
  6. {basic_password_manager-0.4.3 → basic_password_manager-0.4.4}/LICENSE +0 -0
  7. {basic_password_manager-0.4.3 → basic_password_manager-0.4.4}/basic_password_manager.egg-info/SOURCES.txt +0 -0
  8. {basic_password_manager-0.4.3 → basic_password_manager-0.4.4}/basic_password_manager.egg-info/dependency_links.txt +0 -0
  9. {basic_password_manager-0.4.3 → basic_password_manager-0.4.4}/basic_password_manager.egg-info/entry_points.txt +0 -0
  10. {basic_password_manager-0.4.3 → basic_password_manager-0.4.4}/basic_password_manager.egg-info/requires.txt +0 -0
  11. {basic_password_manager-0.4.3 → basic_password_manager-0.4.4}/basic_password_manager.egg-info/top_level.txt +0 -0
  12. {basic_password_manager-0.4.3 → basic_password_manager-0.4.4}/pw_manager/__init__.py +0 -0
  13. {basic_password_manager-0.4.3 → basic_password_manager-0.4.4}/pw_manager/cli.py +0 -0
  14. {basic_password_manager-0.4.3 → basic_password_manager-0.4.4}/pw_manager/crypto.py +0 -0
  15. {basic_password_manager-0.4.3 → basic_password_manager-0.4.4}/pw_manager/logo.py +0 -0
  16. {basic_password_manager-0.4.3 → basic_password_manager-0.4.4}/pw_manager/mobile.py +0 -0
  17. {basic_password_manager-0.4.3 → basic_password_manager-0.4.4}/pw_manager/vault.py +0 -0
  18. {basic_password_manager-0.4.3 → basic_password_manager-0.4.4}/pw_manager/web/argon2.umd.min.js +0 -0
  19. {basic_password_manager-0.4.3 → basic_password_manager-0.4.4}/pw_manager/web/page.html +0 -0
  20. {basic_password_manager-0.4.3 → basic_password_manager-0.4.4}/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
3
+ Version: 0.4.4
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
@@ -74,8 +74,10 @@ changing the master password all live there, along with others.
74
74
 
75
75
  ![the command palette](assets/palette.gif)
76
76
 
77
- And themes. `t` opens the theme picker; the bundled ones — muted-slate (default),
78
- dawn, matrix — are lifted with love from
77
+ And themes. `t` opens the theme picker — your current one is marked and
78
+ preselected, and arrowing through them previews each live before you commit
79
+ (Enter keeps it, Esc puts back what you had). The bundled ones — muted-slate
80
+ (default), dawn, matrix — are lifted with love from
79
81
  [tuxedo](https://github.com/webstonehq/tuxedo)'s palettes, and all of
80
82
  Textual's built-ins are in there too. Your pick sticks across runs. Even the
81
83
  knight on the unlock screen dresses to match your theme, try it ;)
@@ -58,8 +58,10 @@ changing the master password all live there, along with others.
58
58
 
59
59
  ![the command palette](assets/palette.gif)
60
60
 
61
- And themes. `t` opens the theme picker; the bundled ones — muted-slate (default),
62
- dawn, matrix — are lifted with love from
61
+ And themes. `t` opens the theme picker — your current one is marked and
62
+ preselected, and arrowing through them previews each live before you commit
63
+ (Enter keeps it, Esc puts back what you had). The bundled ones — muted-slate
64
+ (default), dawn, matrix — are lifted with love from
63
65
  [tuxedo](https://github.com/webstonehq/tuxedo)'s palettes, and all of
64
66
  Textual's built-ins are in there too. Your pick sticks across runs. Even the
65
67
  knight on the unlock screen dresses to match your theme, try it ;)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: basic-password-manager
3
- Version: 0.4.3
3
+ Version: 0.4.4
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
@@ -74,8 +74,10 @@ changing the master password all live there, along with others.
74
74
 
75
75
  ![the command palette](assets/palette.gif)
76
76
 
77
- And themes. `t` opens the theme picker; the bundled ones — muted-slate (default),
78
- dawn, matrix — are lifted with love from
77
+ And themes. `t` opens the theme picker — your current one is marked and
78
+ preselected, and arrowing through them previews each live before you commit
79
+ (Enter keeps it, Esc puts back what you had). The bundled ones — muted-slate
80
+ (default), dawn, matrix — are lifted with love from
79
81
  [tuxedo](https://github.com/webstonehq/tuxedo)'s palettes, and all of
80
82
  Textual's built-ins are in there too. Your pick sticks across runs. Even the
81
83
  knight on the unlock screen dresses to match your theme, try it ;)
@@ -17,7 +17,8 @@ from textual.command import DiscoveryHit, Hit, Hits, Provider
17
17
  from textual.containers import Vertical
18
18
  from textual.screen import ModalScreen, Screen
19
19
  from textual.theme import Theme
20
- from textual.widgets import DataTable, Footer, Input, Label, Static
20
+ from textual.widgets import DataTable, Footer, Input, Label, OptionList, Static
21
+ from textual.widgets.option_list import Option
21
22
 
22
23
  from . import logo, vault
23
24
  from .cli import VAULT_PATH, generate, import_csv, to_clipboard
@@ -277,6 +278,45 @@ class PasswdModal(ModalScreen):
277
278
  self.dismiss(new)
278
279
 
279
280
 
281
+ class ThemeModal(ModalScreen):
282
+ """Theme picker: cursor starts on the current theme, moving it previews
283
+ the theme live, Enter keeps it, Esc reverts to what you had."""
284
+
285
+ BINDINGS = [Binding("escape", "cancel", "cancel")]
286
+
287
+ def __init__(self) -> None:
288
+ super().__init__()
289
+ self.original = None
290
+
291
+ def compose(self) -> ComposeResult:
292
+ with Vertical(classes="modal-box", id="theme-box"):
293
+ yield Label("theme", classes="modal-title")
294
+ yield OptionList(id="theme-list")
295
+ yield Static("↑↓ preview · enter keeps · esc cancels", classes="modal-hint")
296
+
297
+ def on_mount(self) -> None:
298
+ self.original = self.app.theme
299
+ names = sorted(self.app.available_themes)
300
+ option_list = self.query_one(OptionList)
301
+ for name in names:
302
+ label = f"{name} ✓" if name == self.original else name
303
+ option_list.add_option(Option(label, id=name))
304
+ option_list.highlighted = names.index(self.original) # start on current
305
+
306
+ def on_option_list_option_highlighted(self, event: OptionList.OptionHighlighted) -> None:
307
+ if event.option.id:
308
+ self.app.theme = event.option.id # live preview
309
+
310
+ def on_option_list_option_selected(self, event: OptionList.OptionSelected) -> None:
311
+ if event.option.id:
312
+ self.app.theme = event.option.id # commit (persists via theme signal)
313
+ self.dismiss()
314
+
315
+ def action_cancel(self) -> None:
316
+ self.app.theme = self.original # revert the preview
317
+ self.dismiss()
318
+
319
+
280
320
  class ConfirmModal(ModalScreen):
281
321
  """y/n confirmation."""
282
322
 
@@ -308,7 +348,7 @@ class MainScreen(Screen):
308
348
  Binding("e", "edit", "edit"),
309
349
  Binding("d", "delete", "delete"),
310
350
  Binding("slash", "search", "search"),
311
- Binding("t", "app.change_theme", "theme"),
351
+ Binding("t", "theme", "theme"),
312
352
  Binding("escape", "clear_search", show=False),
313
353
  Binding("q", "quit", "quit"),
314
354
  ]
@@ -432,6 +472,9 @@ class MainScreen(Screen):
432
472
 
433
473
  self.app.push_screen(ConfirmModal(f"delete '{name}'?"), done)
434
474
 
475
+ def action_theme(self) -> None:
476
+ self.app.push_screen(ThemeModal())
477
+
435
478
  def action_search(self) -> None:
436
479
  self.query_one("#search", Input).focus()
437
480
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "basic-password-manager"
7
- version = "0.4.3"
7
+ version = "0.4.4"
8
8
  description = "The Paladin — a local encrypted password manager that lives in your terminal"
9
9
  readme = "README.md"
10
10
  license = "MIT"