-
-
+
+
@@ -167,7 +171,6 @@
Powered by CLARA, your friendly desktop assistant.
diff --git a/core/http_share.py b/core/http_share.py index f51e1e8..266f8e3 100644 --- a/core/http_share.py +++ b/core/http_share.py @@ -41,8 +41,47 @@ class FileShareHandler(BaseHTTPRequestHandler): raise RuntimeError(f"HTML template not found at {template_path}") return cls.html_template + def _generate_shared_text_html(self, text: str) -> str: + if not text: + return "" + + escaped_text = html.escape(text) + return f'''
Select the text below and copy it to your clipboard.
+''' + + def _generate_shared_files_html(self, files: List[str]) -> str: + """Generate HTML for shared files section.""" + if not files: + return "" + + rows = "" + for i, filepath in enumerate(files): + try: + path = Path(filepath) + if path.exists() and path.is_file(): + name = html.escape(path.name) + size = format_size(path.stat().st_size) + rows += f'''Click a button to download the corresponding file.
+| Filename | Size | Action |
|---|
Powered by CLARA, your friendly desktop assistant.