From 71edc08d5e1f5540695edba2289ae898d83fa960 Mon Sep 17 00:00:00 2001 From: Michal Vrba Date: Fri, 30 Jan 2026 17:17:45 +0100 Subject: [PATCH] Add manual save button, improve save logic and feedback - Added a manual "Save" button to the editor, enabled only when there are unsaved changes. - Enhanced save status feedback with new states ("Modified", "Saving...", "Saved", "Error", "Timeout") and distinct styling. - Improved auto-save: increased debounce to 2s, only show "Saving..." when actually saving, and unified manual/auto save logic. - SaveContent now uses a 30s timeout and retries on error/timeout. - SessionService now streams large content to disk in chunks and ensures the save directory exists. - Updated CSS for save button and status indicators, including mobile tweaks. - Removed unused exception variables in SharedEditor.razor and SharedPreview.razor. - Updated markdown spec file to reflect new methods and build errors. --- .gitignore | 1 + Notemark/Components/Pages/Editor.razor | 73 +++++++++++++++---- Notemark/Components/Pages/Editor.razor.css | 47 +++++++++++- Notemark/Components/Pages/SharedEditor.razor | 2 +- Notemark/Components/Pages/SharedPreview.razor | 2 +- Notemark/Services/SessionService.cs | 46 +++++++++++- .../b5acffbe-706e-405e-b006-3415508a59a7.md | 22 ------ 7 files changed, 151 insertions(+), 42 deletions(-) delete mode 100644 Notemark/data/sessions/b5acffbe-706e-405e-b006-3415508a59a7.md diff --git a/.gitignore b/.gitignore index 4da40ba..6f4ad01 100644 --- a/.gitignore +++ b/.gitignore @@ -362,3 +362,4 @@ MigrationBackup/ # Fody - auto-generated XML schema FodyWeavers.xsd /Notemark/data/shares +/Notemark/data/sessions/b5acffbe-706e-405e-b006-3415508a59a7.md diff --git a/Notemark/Components/Pages/Editor.razor b/Notemark/Components/Pages/Editor.razor index eb46d67..6aa804d 100644 --- a/Notemark/Components/Pages/Editor.razor +++ b/Notemark/Components/Pages/Editor.razor @@ -24,6 +24,9 @@
+