diff --git a/web/app/assets/css/main.css b/web/app/assets/css/main.css index 69c1cd7..0ce7d8b 100644 --- a/web/app/assets/css/main.css +++ b/web/app/assets/css/main.css @@ -1537,17 +1537,60 @@ body.pane-resizing * { flex: 1; min-height: 0; display: grid; - grid-template-columns: minmax(140px, 34%) 1fr; + grid-template-columns: clamp(140px, var(--files-browser-width, 34%), 55%) var(--sp-2) minmax(0, 1fr); + grid-template-rows: minmax(0, 1fr); } .files-browser { min-width: 0; min-height: 0; - border-right: 1px solid var(--border); display: flex; flex-direction: column; } +.files-resizer { + position: relative; + cursor: col-resize; + touch-action: none; + background: transparent; +} + +.files-resizer::before { + content: ""; + position: absolute; + top: 0; + bottom: 0; + left: calc(50% - 0.5px); + width: 1px; + background: var(--border); + transition: background-color 120ms ease, width 120ms ease, left 120ms ease, height 120ms ease, top 120ms ease; +} + +.files-resizer:hover::before, +.files-resizer:focus-visible::before, +body.files-resizing-x .files-resizer::before { + left: calc(50% - 1px); + width: 2px; + background: var(--accent); +} + +.files-resizer:focus-visible { + outline: 2px solid var(--accent); + outline-offset: -2px; +} + +body.files-resizing-x, +body.files-resizing-x * { + cursor: col-resize !important; + user-select: none !important; +} + +body.files-resizing-y, +body.files-resizing-y * { + cursor: row-resize !important; + user-select: none !important; +} + .crumbs { flex: 0 0 auto; padding: var(--sp-2); @@ -2001,13 +2044,37 @@ body.pane-resizing * { @container (max-width: 430px) { .files { - grid-template-columns: 1fr; - grid-template-rows: minmax(120px, 38%) 1fr; + grid-template-columns: minmax(0, 1fr); + grid-template-rows: clamp(120px, var(--files-browser-height, 38%), 60%) var(--sp-2) minmax(0, 1fr); } .files-browser { border-right: 0; - border-bottom: 1px solid var(--border); + border-bottom: 0; + } + + .files-resizer { + cursor: row-resize; + } + + .files-resizer::before { + top: calc(50% - 0.5px); + bottom: auto; + left: 0; + right: 0; + width: auto; + height: 1px; + } + + .files-resizer:hover::before, + .files-resizer:focus-visible::before, + body.files-resizing-y .files-resizer::before { + top: calc(50% - 1px); + left: 0; + right: 0; + width: auto; + height: 2px; + background: var(--accent); } } diff --git a/web/app/components/FilesPane.vue b/web/app/components/FilesPane.vue index 69d927a..70d5b03 100644 --- a/web/app/components/FilesPane.vue +++ b/web/app/components/FilesPane.vue @@ -1,5 +1,5 @@ - - + + @@ -152,6 +322,25 @@ onMounted(() => { + +