mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2026-10-30 01:12:17 +00:00
fix(tui-v3): fix SyntaxError in multiline string literals
This commit is contained in:
1 parent
18a637d3a2
commit
abb60845f4
2 files changed
+10
-19
No files matched your search
@@ -77,10 +77,8 @@ class MaximizedInspectorScreen(Screen):
|
||||
kind = entry.get('kind', 'Unknown')
|
||||
|
||||
# Build a large detail view
|
||||
header = f"[b]ENTRY #{eid} - {label.upper()} ({kind})[/b]
|
||||
"
|
||||
divider = "=" * 60 + "
|
||||
"
|
||||
header = f"[b]ENTRY #{eid} - {label.upper()} ({kind})[/b]\n"
|
||||
divider = "=" * 60 + "\n"
|
||||
|
||||
# Meta info
|
||||
meta_lines = [
|
||||
@@ -92,13 +90,9 @@ class MaximizedInspectorScreen(Screen):
|
||||
|
||||
# Content (if note/doc)
|
||||
content = entry.get('content', '')
|
||||
content_block = f"
|
||||
[b]CONTENT / NOTES:[/b]
|
||||
{divider}{content}
|
||||
" if content else ""
|
||||
content_block = f"\n[b]CONTENT / NOTES:[/b]\n{divider}{content}\n" if content else ""
|
||||
|
||||
final_text = header + divider + "
|
||||
".join(meta_lines) + content_block
|
||||
final_text = header + divider + "\n".join(meta_lines) + content_block
|
||||
self.query_one("#max-inspector-content", Static).update(final_text)
|
||||
|
||||
def action_reveal(self) -> None:
|
||||
|
||||
@@ -18,19 +18,18 @@ class BaseBoard(Static):
|
||||
for row in rows:
|
||||
lines.append(f"│ {row:<{width-4}} │")
|
||||
lines.append(bottom)
|
||||
return "
|
||||
".join(lines)
|
||||
return "\n".join(lines)
|
||||
|
||||
class IdleBoard(Static):
|
||||
"""Shown when no entry is selected."""
|
||||
def render(self) -> str:
|
||||
return "
|
||||
return """
|
||||
|
||||
|
||||
[b]Inspector Idle[/b]
|
||||
|
||||
Select an entry from the grid
|
||||
to view details."
|
||||
to view details."""
|
||||
|
||||
class PasswordBoard(BaseBoard):
|
||||
"""Matches 'Password Board.png' mockup."""
|
||||
@@ -47,8 +46,7 @@ class PasswordBoard(BaseBoard):
|
||||
"▣ Edit (e) ▣ Archive (a)",
|
||||
]
|
||||
|
||||
return "
|
||||
".join([
|
||||
return "\n".join([
|
||||
self._render_card("Credentials", cred_rows),
|
||||
"",
|
||||
self._render_card("Quick Actions", action_rows)
|
||||
@@ -58,7 +56,7 @@ class NoteBoard(BaseBoard):
|
||||
"""Matches 'Note Board.png' mockup."""
|
||||
def render(self) -> str:
|
||||
d = self.entry_data
|
||||
content = d.get('content', '')
|
||||
content = str(d.get('content', ''))
|
||||
# Truncate for preview
|
||||
preview = (content[:200] + '...') if len(content) > 200 else content
|
||||
|
||||
@@ -68,8 +66,7 @@ class NoteBoard(BaseBoard):
|
||||
"▣ Archive (a)",
|
||||
]
|
||||
|
||||
return "
|
||||
".join([
|
||||
return "\n".join([
|
||||
self._render_card("Content", content_rows),
|
||||
"",
|
||||
self._render_card("Quick Actions", action_rows)
|
||||
|
||||
Reference in new issue
Block a user