file viewer: edit Markdown with optimistic-lock conflict detection
Nightly Build / build (push) Successful in 6m47s
Nightly Build / build (push) Successful in 6m47s
- GET /api/file returns ETag (mtime+size) + X-Writable on disk files; PUT /api/file accepts optional if_match -> 409 Conflict on stale version (last-write-wins preserved when omitted), echoes the new ETag - FileViewerBase: View | Edit tabs for .md when the caller can write; source textarea with Save/Cancel, live preview while editing - Watcher no longer clobbers the buffer mid-edit: while editing with unsaved changes it probes the server ETag and only raises a conflict when the remote actually moved on (own-save echo is ignored) - Conflict banner: Reload remote | Copy mine, then reload | Overwrite - i18n (en/it/fr) + CSS; docs/projects.md updated
This commit is contained in:
@@ -964,6 +964,19 @@ export default {
|
||||
'fv.mode_source': 'Show source',
|
||||
'fv.binary_unavailable': 'Preview not available for this file type.',
|
||||
'fv.latex_failed': 'LaTeX compilation failed — showing source instead',
|
||||
'fv.tab_view': 'View',
|
||||
'fv.tab_edit': 'Edit',
|
||||
'fv.dirty_badge': 'Unsaved changes',
|
||||
'fv.dirty_warn': 'Discard unsaved changes?',
|
||||
'fv.save': 'Save',
|
||||
'fv.saving': 'Saving…',
|
||||
'fv.cancel': 'Cancel',
|
||||
'fv.edit_placeholder': 'Write Markdown…',
|
||||
'fv.edit_hint': 'Switch to View to preview',
|
||||
'fv.conflict_title': 'The file was modified remotely while you were editing. What do you want to do?',
|
||||
'fv.conflict_reload': 'Reload remote',
|
||||
'fv.conflict_copy': 'Copy mine, then reload',
|
||||
'fv.conflict_overwrite': 'Overwrite',
|
||||
|
||||
// ── Marketplace ─────────────────────────────────────────────────────────────
|
||||
'marketplace.title': 'Marketplace',
|
||||
|
||||
@@ -954,6 +954,19 @@ export default {
|
||||
'fv.mode_source': 'Afficher la source',
|
||||
'fv.binary_unavailable': 'Aperçu non disponible pour ce type de fichier.',
|
||||
'fv.latex_failed': 'Échec de la compilation LaTeX — affichage de la source à la place',
|
||||
'fv.tab_view': 'Afficher',
|
||||
'fv.tab_edit': 'Modifier',
|
||||
'fv.dirty_badge': 'Modifications non enregistrées',
|
||||
'fv.dirty_warn': 'Abandonner les modifications non enregistrées ?',
|
||||
'fv.save': 'Enregistrer',
|
||||
'fv.saving': 'Enregistrement…',
|
||||
'fv.cancel': 'Annuler',
|
||||
'fv.edit_placeholder': 'Écrire en Markdown…',
|
||||
'fv.edit_hint': 'Basculer vers Afficher pour l\'aperçu',
|
||||
'fv.conflict_title': 'Le fichier a été modifié à distance pendant votre modification. Que voulez-vous faire ?',
|
||||
'fv.conflict_reload': 'Recharger la version distante',
|
||||
'fv.conflict_copy': 'Copier les miennes, puis recharger',
|
||||
'fv.conflict_overwrite': 'Écraser',
|
||||
|
||||
// ── Marketplace ─────────────────────────────────────────────────────────────
|
||||
'marketplace.title': 'Marketplace',
|
||||
|
||||
@@ -954,6 +954,19 @@ export default {
|
||||
'fv.mode_source': 'Mostra sorgente',
|
||||
'fv.binary_unavailable': 'Anteprima non disponibile per questo tipo di file.',
|
||||
'fv.latex_failed': 'Compilazione LaTeX fallita — mostra il sorgente',
|
||||
'fv.tab_view': 'Visualizza',
|
||||
'fv.tab_edit': 'Modifica',
|
||||
'fv.dirty_badge': 'Modifiche non salvate',
|
||||
'fv.dirty_warn': 'Scartare le modifiche non salvate?',
|
||||
'fv.save': 'Salva',
|
||||
'fv.saving': 'Salvataggio…',
|
||||
'fv.cancel': 'Annulla',
|
||||
'fv.edit_placeholder': 'Scrivi in Markdown…',
|
||||
'fv.edit_hint': 'Passa a Visualizza per l\'anteprima',
|
||||
'fv.conflict_title': 'Il file è stato modificato da remoto mentre stavi scrivendo. Cosa vuoi fare?',
|
||||
'fv.conflict_reload': 'Ricarica remoto',
|
||||
'fv.conflict_copy': 'Copia le mie, poi ricarica',
|
||||
'fv.conflict_overwrite': 'Sovrascrivi',
|
||||
|
||||
// ── Marketplace ──────────────────────────────────────────────────────────────
|
||||
'marketplace.title': 'Marketplace',
|
||||
|
||||
Reference in New Issue
Block a user