feat: side-by-side diff view + auto-save skips backup
- Side-by-side diff: toggle button (columns-2/align-justify icon) in toolbar switches between unified and side-by-side view - Backend: diff endpoint returns left_content + right_content for side-by-side - Frontend: SequenceMatcher-based LCS diff for two-column rendering - CSS: .backup-diff-sidebyside with left/right borders, empty cell styling - Auto-save: PUT /save?backup=false skips backup creation (auto-save=no backup) - Footer text updated to reflect backup-on-manual-save behavior
This commit is contained in:
@@ -437,7 +437,8 @@ async function saveFile(silent = false) {
|
||||
safeCreateIcons();
|
||||
}
|
||||
|
||||
const response = await fetch(`/api/file/${encodeURIComponent(state.editorVault)}/save?path=${encodeURIComponent(state.editorPath)}`, {
|
||||
const backupParam = silent ? '&backup=false' : '';
|
||||
const response = await fetch(`/api/file/${encodeURIComponent(state.editorVault)}/save?path=${encodeURIComponent(state.editorPath)}${backupParam}`, {
|
||||
method: "PUT",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ content }),
|
||||
|
||||
Reference in New Issue
Block a user