diff --git a/app/assets/css/main.css b/app/assets/css/main.css index 5cf8137..e68ba94 100644 --- a/app/assets/css/main.css +++ b/app/assets/css/main.css @@ -5813,3 +5813,101 @@ button.tile:hover { .node .pixel-rgb.dark { fill: rgb(0 0 0 / 0.55); } + +/* Converter */ +.modal.convert { + width: min(860px, 100%); +} + +.convert-opts { + display: flex; + flex-wrap: wrap; + gap: 10px 18px; + margin: 10px 0 12px; +} + +.convert-opts label > span { + display: block; + margin-bottom: 4px; + font-size: 12px; + color: var(--muted); +} + +.convert-in .seg { + margin-bottom: 6px; +} + +.convert-text { + font-family: var(--font-mono); + font-size: 13px; + resize: vertical; +} + +.convert-error { + margin-top: 4px; + font-size: 12px; + color: var(--danger); +} + +.convert-outs { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); + gap: 8px; + margin-top: 10px; +} + +.convert-out { + min-width: 0; + padding: 6px 8px 8px; + background: var(--panel-2); + border: 1px solid var(--border); + border-radius: 8px; +} + +.convert-out-head { + display: flex; + align-items: center; + gap: 6px; + font-size: 12px; + font-weight: 600; +} + +.convert-out-head .hint { + margin: 0; + font-weight: 400; +} + +.convert-value { + max-height: 120px; + overflow: auto; + margin-top: 4px; + font-family: var(--font-mono); + font-size: 12px; + white-space: pre-wrap; + overflow-wrap: anywhere; +} + +.convert-table-wrap { + max-height: 280px; + overflow: auto; +} + +.convert-table { + width: 100%; + font-family: var(--font-mono); + font-size: 12px; +} + +.convert-table th { + position: sticky; + top: 0; + background: var(--panel); + color: var(--muted); + font-weight: 600; + text-align: left; +} + +.convert-table th, +.convert-table td { + padding: 2px 10px 2px 0; +} diff --git a/app/components/editor/App.vue b/app/components/editor/App.vue index bd6e6d3..54f12b7 100644 --- a/app/components/editor/App.vue +++ b/app/components/editor/App.vue @@ -84,5 +84,6 @@ watch( + diff --git a/app/components/editor/ConvertDialog.vue b/app/components/editor/ConvertDialog.vue new file mode 100644 index 0000000..a8c1d18 --- /dev/null +++ b/app/components/editor/ConvertDialog.vue @@ -0,0 +1,144 @@ + + +