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:
@@ -7458,3 +7458,44 @@ body.popup-mode .content-area {
|
||||
font-size: 0.7rem;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
/* ── Side-by-side diff view ── */
|
||||
.backup-diff-sidebyside .sidebyside {
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
.backup-diff-sidebyside td.sidebyside-left {
|
||||
border-right: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.backup-diff-sidebyside td.sidebyside-right {
|
||||
border-left: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.backup-diff-sidebyside td.diff-empty-cell {
|
||||
background: var(--bg-tertiary);
|
||||
}
|
||||
|
||||
.backup-diff-mode-btn {
|
||||
padding: 6px 10px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
background: transparent;
|
||||
color: var(--text-secondary);
|
||||
cursor: pointer;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
font-size: 0.8rem;
|
||||
transition: all 150ms ease;
|
||||
}
|
||||
|
||||
.backup-diff-mode-btn:hover {
|
||||
color: var(--accent);
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
.backup-diff-mode-btn .icon-sm {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user