diff --git a/internal/server/web/static/app.css b/internal/server/web/static/app.css index 73ff463..9d4ebea 100644 --- a/internal/server/web/static/app.css +++ b/internal/server/web/static/app.css @@ -96,7 +96,31 @@ pre { padding: 12px; overflow-x: auto; font-size: 13px; white-space: pre-wrap; w .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .spacer { flex: 1; } #terminal { width: 100%; height: calc(100vh - 150px); } -@media (max-width: 600px) { - header.topbar { padding: 12px 16px; } - header.topbar nav a { margin-left: 12px; } +/* Phones. A table marked .stack turns each row into a block of + "label: value" lines, the labels coming from data-l on the cells; a cell + marked .lead goes first, as the row's title. */ +@media (max-width: 640px) { + header.topbar { flex-wrap: wrap; gap: 6px 12px; padding: 10px 12px; } + header.topbar .brand { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; } + header.topbar nav { display: flex; align-items: center; gap: 16px; max-width: 100%; + overflow-x: auto; white-space: nowrap; scrollbar-width: none; } + header.topbar nav::-webkit-scrollbar { display: none; } + header.topbar nav > * { margin-left: 0 !important; flex: none; } + .wrap { padding: 16px 12px; } + .card { padding: 16px; border-radius: 8px; } + h1 { font-size: 20px; } + code { word-break: break-all; } + /* 16px and up, or iOS zooms the page into a field on focus. */ + input[type=text], input[type=password], input[type=number], select, textarea { font-size: 16px; } + table.stack thead { display: none; } + table.stack, table.stack tbody { display: block; } + table.stack tr { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--border); } + table.stack tr:first-child { padding-top: 0; } + table.stack tr:last-child { border-bottom: 0; padding-bottom: 0; } + table.stack td { display: flex; justify-content: flex-start; align-items: center; gap: 0; + width: auto; padding: 2px 0; border: 0; text-align: right !important; overflow-wrap: anywhere; } + table.stack td[data-l]::before { content: attr(data-l); flex: none; margin-right: auto; padding-right: 12px; color: var(--muted); font-size: 13px; text-align: left; } + table.stack td.lead { order: -1; justify-content: flex-start; text-align: left !important; font-size: 16px; font-weight: 600; } + table.stack td.actions { width: auto; padding-top: 8px; justify-content: flex-start; } + table.stack td:empty { display: none; } } diff --git a/internal/server/web/templates/dashboard.html b/internal/server/web/templates/dashboard.html index bbdf1d9..3bd9b9c 100644 --- a/internal/server/web/templates/dashboard.html +++ b/internal/server/web/templates/dashboard.html @@ -21,16 +21,16 @@
| Статус | Имя | Hostname | ОС / Арх | Активность | Действия | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{if .Online}}online{{else}}offline{{end}} | -{{.Name}} | -{{.Hostname}} | -{{.OS}}/{{.Arch}} | -{{.Seen}} | +{{if .Online}}online{{else}}offline{{end}} | +{{.Name}} | +{{.Hostname}} | +{{.OS}}/{{.Arch}} | +{{.Seen}} |
diff --git a/internal/server/web/templates/files.html b/internal/server/web/templates/files.html
index 7d03690..e26e74a 100644
--- a/internal/server/web/templates/files.html
+++ b/internal/server/web/templates/files.html
@@ -27,6 +27,20 @@
.ic { display:inline-block; width:18px; text-align:center; margin-right:6px; }
.sz { color:var(--muted); font-variant-numeric:tabular-nums; }
.act { display:flex; gap:6px; justify-content:flex-end; }
+ table.fm .c-sz { width:120px; }
+ table.fm .c-mt { width:160px; }
+ table.fm .c-act { width:160px; }
+ .fm .nm { overflow-wrap:anywhere; }
+ /* Phones: no date column, and the row buttons only as wide as they are. */
+ @media (max-width: 640px) {
+ table.fm .c-mt, table.fm td.mt { display:none; }
+ table.fm .c-sz { width:auto; white-space:nowrap; }
+ table.fm .c-act { width:1%; }
+ table.fm td, table.fm th { padding:7px 4px; }
+ .ic { margin-right:4px; }
+ .fm-bar input.fm-path { flex:1 1 100%; order:-1; }
+ textarea#edit { font-size:13px; }
+ }
dialog { background:var(--panel); color:var(--text); border:1px solid var(--border);
border-radius:12px; padding:0; max-width:900px; width:92vw; }
dialog::backdrop { background:rgba(0,0,0,.6); }
@@ -74,8 +88,8 @@
' +
' | '+(e.is_dir?'📁':'📄')+''+esc(e.name)+' | ' +
- ''+(e.is_dir?'':fmtSize(e.size))+' | ' +
- ''+fmtTime(e.mtime)+' | ' +
+ ''+(e.is_dir?'':fmtSize(e.size))+' | ' +
+ ''+fmtTime(e.mtime)+' | ' +
'' +
(isZip?'':'') +
(e.is_dir?'':''+ICON_DL+'') +
diff --git a/internal/server/web/templates/forwards.html b/internal/server/web/templates/forwards.html
index 358cbc9..4bafcb2 100644
--- a/internal/server/web/templates/forwards.html
+++ b/internal/server/web/templates/forwards.html
@@ -24,6 +24,15 @@
color:var(--text); font-size:14px; cursor:pointer;
}
.under { min-height:20px; margin:12px 110px 0 0; font-size:13px; line-height:20px; }
+ /* Phones: two fields a line, the label and the button each a line of their own. */
+ @media (max-width: 640px) {
+ .frow .fld, .frow .fld.addr { width:calc(50% - 6px); }
+ .frow .fld.grow { flex:1 1 100%; }
+ .frow .act { display:flex; align-items:center; gap:16px; width:100%; }
+ .frow .act button { flex:1; }
+ .frow .act label.check { position:static; transform:none; margin:0; }
+ .under { margin-right:0; }
+ }
@@ -46,17 +55,17 @@
Правила{{if .Rules}} -
|