Made Jarvis more mobile friendly
This commit is contained in:
@@ -669,6 +669,25 @@ tr:hover td { background: var(--bg2); }
|
||||
.http-put { color: var(--yellow); font-weight: 700; font-family: var(--mono); font-size: 11px; }
|
||||
.http-del { color: var(--red); font-weight: 700; font-family: var(--mono); font-size: 11px; }
|
||||
|
||||
/* ── Help TOC collapse toggle (mobile) ───────────────────────────────────── */
|
||||
.toc-toggle {
|
||||
display: none;
|
||||
width: 100%;
|
||||
background: var(--bg3);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
color: var(--text);
|
||||
font-family: var(--font);
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
padding: 10px 14px;
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.toc-toggle { display: block; }
|
||||
}
|
||||
|
||||
/* ── Prompt mode toggle ───────────────────────────────────────────────────── */
|
||||
.prompt-mode-toggle { display: flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
|
||||
.pm-btn { flex: 1; padding: 6px 8px; font-size: 12px; border: none; border-right: 1px solid var(--border); background: var(--bg2); color: var(--text-dim); cursor: pointer; transition: background 0.15s, color 0.15s; }
|
||||
@@ -680,3 +699,213 @@ tr:hover td { background: var(--bg2); }
|
||||
.stat-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; }
|
||||
.stat-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-dim); margin-bottom: 6px; }
|
||||
.stat-value { font-size: 22px; font-weight: 700; color: var(--text); font-family: var(--mono); }
|
||||
|
||||
/* ── Responsive layout ────────────────────────────────────────────────────── */
|
||||
.app-body {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.sidebar-overlay {
|
||||
display: none;
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
z-index: 150;
|
||||
}
|
||||
|
||||
.mobile-header {
|
||||
display: none;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 10px 16px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
background: var(--bg2);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.hamburger-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--text);
|
||||
cursor: pointer;
|
||||
padding: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-radius: 4px;
|
||||
transition: background 0.15s;
|
||||
}
|
||||
.hamburger-btn:hover { background: var(--bg3); }
|
||||
.hamburger-btn svg { width: 20px; height: 20px; }
|
||||
|
||||
.mobile-title {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: var(--text);
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.mobile-install-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--text-dim);
|
||||
cursor: pointer;
|
||||
padding: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-radius: 4px;
|
||||
transition: background 0.15s, color 0.15s;
|
||||
margin-left: auto;
|
||||
}
|
||||
.mobile-install-btn:hover { background: var(--bg3); color: var(--accent); }
|
||||
|
||||
/* ── Mobile tab select (replaces tab bar on small screens) ───────────────── */
|
||||
.tab-select-wrap {
|
||||
display: none;
|
||||
position: relative;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.tab-select {
|
||||
width: 100%;
|
||||
appearance: none;
|
||||
-webkit-appearance: none;
|
||||
background: var(--bg2);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
color: var(--text);
|
||||
font-family: var(--font);
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
padding: 10px 36px 10px 14px;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
}
|
||||
.tab-select:focus { border-color: var(--accent-dim); }
|
||||
|
||||
.tab-select-arrow {
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: var(--text-dim);
|
||||
pointer-events: none;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.tab-select-wrap { display: block; }
|
||||
}
|
||||
|
||||
/* ── Tab bar (settings + others) ─────────────────────────────────────────── */
|
||||
.tab-bar {
|
||||
display: flex;
|
||||
gap: 0;
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
.tab-bar::-webkit-scrollbar { display: none; }
|
||||
.tab-bar .tab-btn { flex-shrink: 0; }
|
||||
|
||||
/* ── Usage page header ────────────────────────────────────────────────────── */
|
||||
.usage-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 24px;
|
||||
gap: 12px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.usage-header-actions {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
html, body { overflow: hidden; }
|
||||
|
||||
.sidebar {
|
||||
position: fixed;
|
||||
left: -220px;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
z-index: 200;
|
||||
transition: left 0.25s ease;
|
||||
overflow-y: auto;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.sidebar.open { left: 0; }
|
||||
|
||||
.sidebar-overlay.visible { display: block; }
|
||||
|
||||
.mobile-header { display: flex; }
|
||||
|
||||
.app-body { width: 100%; }
|
||||
|
||||
/* Page padding */
|
||||
.page { padding: 16px; }
|
||||
.page h1 { margin-bottom: 16px; }
|
||||
|
||||
/* Chat */
|
||||
.chat-messages { padding: 12px 16px; }
|
||||
.status-bar { padding: 6px 12px; flex-wrap: wrap; gap: 6px; font-size: 10px; }
|
||||
|
||||
/* Prevent iOS auto-zoom on input focus (triggered when font-size < 16px) */
|
||||
input, textarea, select, .form-input, .chat-input, .tab-select {
|
||||
font-size: 16px !important;
|
||||
}
|
||||
|
||||
/* Chat input — textarea full-width row, buttons on second row */
|
||||
.chat-input-wrap {
|
||||
flex-wrap: wrap;
|
||||
padding: 8px 12px;
|
||||
gap: 6px;
|
||||
}
|
||||
.chat-input-wrap .chat-input {
|
||||
flex: 1 1 100%;
|
||||
min-height: 80px;
|
||||
max-height: 160px;
|
||||
order: 1;
|
||||
}
|
||||
#attach-btn { order: 2; }
|
||||
#clear-btn { order: 3; }
|
||||
#send-btn { order: 4; margin-left: auto; }
|
||||
|
||||
/* Modals slide up from bottom */
|
||||
.modal-overlay { align-items: flex-end; }
|
||||
.modal {
|
||||
width: 100% !important;
|
||||
max-width: 100% !important;
|
||||
border-radius: var(--radius) var(--radius) 0 0 !important;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Help page stacks with collapsible TOC */
|
||||
.help-layout { flex-direction: column; overflow: auto; }
|
||||
.help-toc {
|
||||
width: 100%; min-width: unset;
|
||||
border-right: none; border-bottom: 1px solid var(--border);
|
||||
overflow: hidden;
|
||||
padding: 12px 16px;
|
||||
}
|
||||
.help-toc .toc-list, .help-toc .form-input { display: none; }
|
||||
.help-toc.toc-collapsed .toc-list,
|
||||
.help-toc.toc-collapsed .form-input { display: none; }
|
||||
.help-toc:not(.toc-collapsed) .toc-list,
|
||||
.help-toc:not(.toc-collapsed) .form-input { display: block; margin-top: 10px; }
|
||||
.help-content { padding: 20px 16px; }
|
||||
|
||||
/* Tab bar scrollable */
|
||||
.tabs { overflow-x: auto; flex-wrap: nowrap; }
|
||||
|
||||
/* Filter bar */
|
||||
.filter-bar { gap: 6px; }
|
||||
.filter-bar .form-input { min-width: 0; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user