Create your PlantUML diagrams directly in your browser!
+ ++ Créez vos diagrammes PlantUML + directement dans votre navigateur. +
diff --git a/src/main/webapp/components/modals/diagram-export/diagram-export.jsp b/src/main/webapp/components/modals/diagram-export/diagram-export.jsp index a6b4d2a..729649b 100644 --- a/src/main/webapp/components/modals/diagram-export/diagram-export.jsp +++ b/src/main/webapp/components/modals/diagram-export/diagram-export.jsp @@ -1,16 +1,16 @@ diff --git a/src/main/webapp/components/modals/diagram-import/diagram-import.js b/src/main/webapp/components/modals/diagram-import/diagram-import.js index 43e5540..ae14b85 100644 --- a/src/main/webapp/components/modals/diagram-import/diagram-import.js +++ b/src/main/webapp/components/modals/diagram-import/diagram-import.js @@ -54,8 +54,8 @@ function initDiagramImport() { const type = getImageFileType(file); const isCode = type === undefined ? isDiagramCode(file) : false; if (!type && !isCode) { - errorMessageElement.innerText = "File not supported. " + - "Only PNG and SVG diagram images as well as PlantUML code text files are supported." + errorMessageElement.innerText = "Fichier non pris en charge. " + + "Seuls les PNG, SVG ou fichiers texte PlantUML sont acceptés." } return { type, isDiagramCode: isCode, valid: type || isCode }; } @@ -90,8 +90,8 @@ function initDiagramImport() { resolve(); } else { // this error should already be handled. - errorMessageElement.innerText = "File not supported. " + - "Only PNG and SVG diagram images as well as PlantUML code text files are supported."; + errorMessageElement.innerText = "Fichier non pris en charge. " + + "Seuls les PNG, SVG ou fichiers texte PlantUML sont acceptés."; reject(); } }).then(() => closeDialog(), () => {}).finally(() => dialogElement.classList.remove("wait")); diff --git a/src/main/webapp/components/modals/diagram-import/diagram-import.jsp b/src/main/webapp/components/modals/diagram-import/diagram-import.jsp index e38a8d7..91194f6 100644 --- a/src/main/webapp/components/modals/diagram-import/diagram-import.jsp +++ b/src/main/webapp/components/modals/diagram-import/diagram-import.jsp @@ -1,7 +1,7 @@ diff --git a/src/main/webapp/components/modals/diagram-storage/diagram-storage.css b/src/main/webapp/components/modals/diagram-storage/diagram-storage.css new file mode 100644 index 0000000..640a322 --- /dev/null +++ b/src/main/webapp/components/modals/diagram-storage/diagram-storage.css @@ -0,0 +1,115 @@ +.saved-list { + margin-top: 1rem; + border: 1px solid var(--border-color, #ccc); + border-radius: 6px; + display: flex; + flex-direction: column; + min-height: 340px; + max-height: 70vh; + background: #f7f9fb; +} + +.saved-list-header { + display: flex; + justify-content: space-between; + padding: 0.5rem 0.75rem; + border-bottom: 1px solid var(--border-color, #ccc); + font-weight: 600; +} + +.saved-list-header .hint { + font-weight: 400; + color: #666; + font-size: 0.9rem; +} + +.saved-list-body { + overflow-y: auto; + padding: 0.5rem 0.75rem; + max-height: 70vh; +} + +.modal-storage { + max-width: 54rem; + width: 94vw; +} + +.saved-item { + padding: 0.35rem 0.5rem; + border-radius: 4px; + cursor: pointer; + display: flex; + justify-content: space-between; + align-items: center; +} + +.saved-item:hover { + background: rgba(0, 0, 0, 0.05); +} + +.saved-item .path { + font-weight: 600; +} + +.saved-item .meta { + color: #666; + font-size: 0.85rem; + margin-left: 0.75rem; +} + +.tree { + list-style: none; + padding-left: 0.25rem; + margin: 0; +} + +.tree li { + padding: 0.25rem 0.25rem 0.25rem 0.5rem; + border-radius: 4px; + cursor: pointer; + display: flex; + align-items: center; + gap: 0.35rem; + user-select: none; +} + +.tree li:hover { + background: rgba(0, 0, 0, 0.05); +} + +.tree .caret { + width: 0.9rem; + text-align: center; + font-size: 0.85rem; +} + +.tree .label { + font-weight: 600; +} + +.tree .meta { + color: #666; + font-size: 0.85rem; + margin-left: auto; +} + +.tree .icon-folder::before { + content: "📂"; +} + +.tree .icon-file::before { + content: "📄"; +} + +#diagram-storage-status { + min-height: 1.4rem; + color: #444; +} + +#diagram-storage-status.error { + color: #c0392b; +} + +#diagram-storage-status.success { + color: #1e8449; +} diff --git a/src/main/webapp/components/modals/diagram-storage/diagram-storage.jsp b/src/main/webapp/components/modals/diagram-storage/diagram-storage.jsp new file mode 100644 index 0000000..917d1a9 --- /dev/null +++ b/src/main/webapp/components/modals/diagram-storage/diagram-storage.jsp @@ -0,0 +1,36 @@ + diff --git a/src/main/webapp/components/modals/modals.css b/src/main/webapp/components/modals/modals.css index bbabe7c..cf40c5e 100644 --- a/src/main/webapp/components/modals/modals.css +++ b/src/main/webapp/components/modals/modals.css @@ -20,7 +20,7 @@ margin: auto; padding: 2rem; border: 3px solid var(--border-color); - max-width: 30rem; + max-width: 50rem; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); -webkit-animation-name: modal-animatetop; -webkit-animation-duration: 0.4s; diff --git a/src/main/webapp/components/modals/modals.js b/src/main/webapp/components/modals/modals.js index 89cfeef..26ce422 100644 --- a/src/main/webapp/components/modals/modals.js +++ b/src/main/webapp/components/modals/modals.js @@ -49,6 +49,7 @@ function initModals(view) { if (view !== "previewer") { initDiagramExport(); initDiagramImport(); + initDiagramStorage(); } } diff --git a/src/main/webapp/components/modals/settings/settings.jsp b/src/main/webapp/components/modals/settings/settings.jsp index 597e18d..3942986 100644 --- a/src/main/webapp/components/modals/settings/settings.jsp +++ b/src/main/webapp/components/modals/settings/settings.jsp @@ -1,19 +1,19 @@ diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index 6506a1b..06cda13 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -36,6 +36,7 @@ <%@ include file="/components/modals/diagram-import/diagram-import.jsp" %> <%@ include file="/components/modals/diagram-export/diagram-export.jsp" %> + <%@ include file="/components/modals/diagram-storage/diagram-storage.jsp" %>