fix: v1.1.0 - 修复5个问题
1. 首页移除后台链接,后台需密码登录 2. 参数输入不再丢失焦点(停止oninput重建DOM) 3. 每个参数单行布局 + 搜索功能 4. 复制命令使用execCommand兼容非HTTPS 5. 模型选择器替代手动输入,26个预设模型,后台可增删改 - 新增 models 数据表 - 新增 /api/models 公开读取接口 - 新增 /api/admin/models CRUD 接口 - 新增 admin 登录/登出/检查接口 - admin 页面加登录界面 - admin 新增模型管理标签页 - CORS 支持 credentials
This commit is contained in:
+199
-609
@@ -14,11 +14,7 @@
|
||||
--radius: 8px;
|
||||
}
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
|
||||
body {
|
||||
font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
|
||||
@@ -52,10 +48,7 @@ header h1 {
|
||||
background-clip: text;
|
||||
}
|
||||
|
||||
.header-right {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
}
|
||||
.header-right { display: flex; gap: 12px; align-items: center; }
|
||||
|
||||
.admin-link {
|
||||
color: var(--accent2);
|
||||
@@ -66,57 +59,75 @@ header h1 {
|
||||
transition: all 0.2s;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.admin-link:hover { background: var(--accent2); color: var(--bg); }
|
||||
|
||||
.admin-link:hover {
|
||||
background: var(--accent2);
|
||||
color: var(--bg);
|
||||
.btn-logout {
|
||||
padding: 8px 16px;
|
||||
background: var(--accent);
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: var(--radius);
|
||||
cursor: pointer;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.btn-logout:hover { background: var(--accent-hover); }
|
||||
|
||||
/* ===== Login Screen ===== */
|
||||
.login-screen {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 60vh;
|
||||
}
|
||||
|
||||
/* ===== Top Controls ===== */
|
||||
.top-controls {
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
flex-wrap: wrap;
|
||||
.login-box {
|
||||
background: var(--bg-panel);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
padding: 40px;
|
||||
text-align: center;
|
||||
min-width: 320px;
|
||||
}
|
||||
|
||||
.login-box h2 {
|
||||
color: var(--accent2);
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.control-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
flex: 1;
|
||||
min-width: 200px;
|
||||
.login-box input {
|
||||
width: 100%;
|
||||
padding: 10px 14px;
|
||||
background: var(--bg-input);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--text);
|
||||
border-radius: var(--radius);
|
||||
font-size: 1em;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.control-group label {
|
||||
font-size: 0.85em;
|
||||
color: var(--text-dim);
|
||||
font-weight: 500;
|
||||
}
|
||||
.login-box .btn-primary { width: 100%; }
|
||||
|
||||
.control-group input,
|
||||
.control-group select {
|
||||
.login-error { color: var(--accent); margin-top: 8px; font-size: 0.9em; }
|
||||
|
||||
/* ===== Top Controls ===== */
|
||||
.top-controls { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
|
||||
|
||||
.control-group { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 200px; }
|
||||
|
||||
.control-group label { font-size: 0.85em; color: var(--text-dim); font-weight: 500; }
|
||||
|
||||
.control-group input, .control-group select {
|
||||
background: var(--bg-input);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--text);
|
||||
padding: 8px 12px;
|
||||
border-radius: var(--radius);
|
||||
font-size: 0.95em;
|
||||
transition: border-color 0.2s;
|
||||
}
|
||||
|
||||
.control-group input:focus,
|
||||
.control-group select:focus {
|
||||
outline: none;
|
||||
border-color: var(--accent);
|
||||
}
|
||||
.control-group input:focus, .control-group select:focus { outline: none; border-color: var(--accent); }
|
||||
|
||||
/* ===== Mode Switch ===== */
|
||||
.mode-switch {
|
||||
display: flex;
|
||||
gap: 0;
|
||||
flex: 1;
|
||||
}
|
||||
.mode-switch { display: flex; gap: 0; flex: 1; }
|
||||
|
||||
.mode-btn {
|
||||
flex: 1;
|
||||
@@ -125,24 +136,11 @@ header h1 {
|
||||
background: var(--bg-input);
|
||||
color: var(--text-dim);
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.mode-btn:first-child {
|
||||
border-radius: var(--radius) 0 0 var(--radius);
|
||||
}
|
||||
|
||||
.mode-btn:last-child {
|
||||
border-radius: 0 var(--radius) var(--radius) 0;
|
||||
border-left: none;
|
||||
}
|
||||
|
||||
.mode-btn.active {
|
||||
background: var(--accent);
|
||||
color: white;
|
||||
border-color: var(--accent);
|
||||
}
|
||||
.mode-btn:first-child { border-radius: var(--radius) 0 0 var(--radius); }
|
||||
.mode-btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; border-left: none; }
|
||||
.mode-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
|
||||
|
||||
/* ===== Panels ===== */
|
||||
.panel {
|
||||
@@ -154,210 +152,35 @@ header h1 {
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
.panel h2 {
|
||||
font-size: 1.2em;
|
||||
margin-bottom: 16px;
|
||||
color: var(--accent2);
|
||||
border-bottom: 1px solid var(--border);
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
.panel h2 { font-size: 1.2em; margin-bottom: 16px; color: var(--accent2); border-bottom: 1px solid var(--border); padding-bottom: 8px; }
|
||||
|
||||
.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
.hidden { display: none !important; }
|
||||
|
||||
/* ===== GPU Slots ===== */
|
||||
.gpu-slot {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
padding: 10px;
|
||||
background: var(--bg-input);
|
||||
border-radius: var(--radius);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
.gpu-slot { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; padding: 10px; background: var(--bg-input); border-radius: var(--radius); border: 1px solid var(--border); }
|
||||
.gpu-slot .gpu-index { font-weight: bold; color: var(--accent); min-width: 30px; }
|
||||
.gpu-slot select { flex: 1; background: var(--bg); border: 1px solid var(--border); color: var(--text); padding: 6px 10px; border-radius: 4px; }
|
||||
.gpu-slot .vram-info { color: var(--accent2); font-size: 0.9em; min-width: 120px; }
|
||||
.gpu-slot .btn-remove { background: var(--accent); color: white; border: none; width: 28px; height: 28px; border-radius: 4px; cursor: pointer; font-size: 1.1em; display: flex; align-items: center; justify-content: center; }
|
||||
|
||||
.gpu-slot .gpu-index {
|
||||
font-weight: bold;
|
||||
color: var(--accent);
|
||||
min-width: 30px;
|
||||
}
|
||||
|
||||
.gpu-slot select {
|
||||
flex: 1;
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--text);
|
||||
padding: 6px 10px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.gpu-slot .vram-info {
|
||||
color: var(--accent2);
|
||||
font-size: 0.9em;
|
||||
min-width: 120px;
|
||||
}
|
||||
|
||||
.gpu-slot .btn-remove {
|
||||
background: var(--accent);
|
||||
color: white;
|
||||
border: none;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 1.1em;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: background 0.2s;
|
||||
}
|
||||
|
||||
.gpu-slot .btn-remove:hover {
|
||||
background: var(--accent-hover);
|
||||
}
|
||||
|
||||
.btn-add {
|
||||
background: transparent;
|
||||
border: 1px dashed var(--border);
|
||||
color: var(--text-dim);
|
||||
padding: 8px 16px;
|
||||
border-radius: var(--radius);
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
width: 100%;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.btn-add:hover {
|
||||
border-color: var(--accent2);
|
||||
color: var(--accent2);
|
||||
}
|
||||
.btn-add { background: transparent; border: 1px dashed var(--border); color: var(--text-dim); padding: 8px 16px; border-radius: var(--radius); cursor: pointer; width: 100%; margin-top: 8px; }
|
||||
.btn-add:hover { border-color: var(--accent2); color: var(--accent2); }
|
||||
|
||||
/* ===== VRAM Display ===== */
|
||||
.vram-display {
|
||||
margin-top: 16px;
|
||||
padding: 12px;
|
||||
background: var(--bg-input);
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
.vram-display { margin-top: 16px; padding: 12px; background: var(--bg-input); border-radius: var(--radius); }
|
||||
.vram-bar-container { position: relative; height: 30px; background: var(--bg); border-radius: 4px; overflow: hidden; border: 1px solid var(--border); }
|
||||
.vram-bar { height: 100%; background: linear-gradient(90deg, #4ecca3, #e9c46a); border-radius: 3px; transition: width 0.3s; width: 0%; }
|
||||
.vram-bar.warning { background: linear-gradient(90deg, #e9c46a, #f4a261); }
|
||||
.vram-bar.danger { background: linear-gradient(90deg, #f4a261, #e94560); }
|
||||
.ram-bar { background: linear-gradient(90deg, #4e9cca, #4ecca3); }
|
||||
.vram-label { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 0.85em; font-weight: 600; color: white; text-shadow: 1px 1px 2px rgba(0,0,0,0.8); white-space: nowrap; }
|
||||
.vram-breakdown { margin-top: 10px; font-size: 0.85em; color: var(--text-dim); display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
|
||||
.vram-breakdown .breakdown-item { display: flex; justify-content: space-between; padding: 4px 8px; background: var(--bg); border-radius: 4px; }
|
||||
|
||||
.vram-bar-container {
|
||||
position: relative;
|
||||
height: 30px;
|
||||
background: var(--bg);
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.vram-bar {
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, #4ecca3, #e9c46a);
|
||||
border-radius: 3px;
|
||||
transition: width 0.3s;
|
||||
width: 0%;
|
||||
}
|
||||
|
||||
.vram-bar.warning {
|
||||
background: linear-gradient(90deg, #e9c46a, #f4a261);
|
||||
}
|
||||
|
||||
.vram-bar.danger {
|
||||
background: linear-gradient(90deg, #f4a261, #e94560);
|
||||
}
|
||||
|
||||
.ram-bar {
|
||||
background: linear-gradient(90deg, #4e9cca, #4ecca3);
|
||||
}
|
||||
|
||||
.vram-label {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
font-size: 0.85em;
|
||||
font-weight: 600;
|
||||
color: white;
|
||||
text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.vram-breakdown {
|
||||
margin-top: 10px;
|
||||
font-size: 0.85em;
|
||||
color: var(--text-dim);
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.vram-breakdown .breakdown-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 4px 8px;
|
||||
background: var(--bg);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.vram-breakdown .breakdown-item .label {
|
||||
color: var(--text-dim);
|
||||
}
|
||||
|
||||
.vram-breakdown .breakdown-item .value {
|
||||
color: var(--text);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.vram-breakdown .breakdown-item.warning .value {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
/* ===== Model Info ===== */
|
||||
.model-info-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.model-presets {
|
||||
margin-top: 12px;
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.preset-label {
|
||||
font-size: 0.85em;
|
||||
color: var(--text-dim);
|
||||
}
|
||||
|
||||
.preset-btn {
|
||||
padding: 4px 12px;
|
||||
background: var(--bg-input);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--text);
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 0.85em;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.preset-btn:hover {
|
||||
border-color: var(--accent2);
|
||||
color: var(--accent2);
|
||||
}
|
||||
|
||||
/* ===== Natural Language ===== */
|
||||
.nl-input-container {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.nl-input-container input {
|
||||
flex: 1;
|
||||
/* ===== Model Selection ===== */
|
||||
.model-select-container { position: relative; }
|
||||
.model-select-container input {
|
||||
width: 100%;
|
||||
background: var(--bg-input);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--text);
|
||||
@@ -365,410 +188,177 @@ header h1 {
|
||||
border-radius: var(--radius);
|
||||
font-size: 0.95em;
|
||||
}
|
||||
.model-select-container input:focus { outline: none; border-color: var(--accent); }
|
||||
|
||||
.nl-input-container button {
|
||||
padding: 10px 24px;
|
||||
background: var(--accent2);
|
||||
color: var(--bg);
|
||||
border: none;
|
||||
border-radius: var(--radius);
|
||||
cursor: pointer;
|
||||
font-weight: 600;
|
||||
transition: background 0.2s;
|
||||
}
|
||||
|
||||
.nl-input-container button:hover {
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.nl-result {
|
||||
margin-top: 10px;
|
||||
font-size: 0.9em;
|
||||
color: var(--text-dim);
|
||||
}
|
||||
|
||||
.nl-result .parsed-param {
|
||||
display: inline-block;
|
||||
margin: 2px 4px;
|
||||
padding: 2px 8px;
|
||||
.model-dropdown {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0; right: 0;
|
||||
max-height: 300px;
|
||||
overflow-y: auto;
|
||||
background: var(--bg-input);
|
||||
border-radius: 4px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 0 0 var(--radius) var(--radius);
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.nl-result .parsed-param .key {
|
||||
color: var(--accent2);
|
||||
.model-option {
|
||||
padding: 10px 14px;
|
||||
cursor: pointer;
|
||||
border-bottom: 1px solid var(--border);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.model-option:hover { background: var(--bg-hover); }
|
||||
.model-name { font-size: 0.9em; }
|
||||
.model-meta { font-size: 0.8em; color: var(--text-dim); }
|
||||
|
||||
.nl-result .parsed-param .value {
|
||||
color: var(--accent);
|
||||
}
|
||||
.model-selected-info { margin-top: 12px; }
|
||||
.model-detail { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.85em; }
|
||||
.detail-item { background: var(--bg-input); padding: 4px 10px; border-radius: 4px; }
|
||||
.detail-item b { color: var(--accent2); }
|
||||
|
||||
/* ===== Natural Language ===== */
|
||||
.nl-input-container { display: flex; gap: 8px; }
|
||||
.nl-input-container input { flex: 1; background: var(--bg-input); border: 1px solid var(--border); color: var(--text); padding: 10px 14px; border-radius: var(--radius); }
|
||||
.nl-input-container button { padding: 10px 24px; background: var(--accent2); color: var(--bg); border: none; border-radius: var(--radius); cursor: pointer; font-weight: 600; }
|
||||
.nl-result { margin-top: 10px; font-size: 0.9em; color: var(--text-dim); }
|
||||
.parsed-param { display: inline-block; margin: 2px 4px; padding: 2px 8px; background: var(--bg-input); border-radius: 4px; border: 1px solid var(--border); }
|
||||
.parsed-param .key { color: var(--accent2); }
|
||||
.parsed-param .value { color: var(--accent); }
|
||||
|
||||
/* ===== Parameter Tabs ===== */
|
||||
.param-tabs {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
margin-bottom: 16px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.param-tabs { display: flex; gap: 4px; margin-bottom: 12px; flex-wrap: wrap; }
|
||||
.tab-btn { padding: 6px 14px; background: var(--bg-input); border: 1px solid var(--border); color: var(--text-dim); border-radius: var(--radius); cursor: pointer; font-size: 0.85em; }
|
||||
.tab-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
|
||||
|
||||
.tab-btn {
|
||||
padding: 6px 14px;
|
||||
/* ===== Param Search ===== */
|
||||
.param-search-container { margin-bottom: 12px; }
|
||||
.param-search-container input {
|
||||
width: 100%;
|
||||
background: var(--bg-input);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--text-dim);
|
||||
color: var(--text);
|
||||
padding: 8px 12px;
|
||||
border-radius: var(--radius);
|
||||
cursor: pointer;
|
||||
font-size: 0.85em;
|
||||
transition: all 0.2s;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.param-search-container input:focus { outline: none; border-color: var(--accent); }
|
||||
|
||||
.tab-btn.active {
|
||||
background: var(--accent);
|
||||
color: white;
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
/* ===== Parameter Items ===== */
|
||||
#param-container {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||
gap: 12px;
|
||||
}
|
||||
/* ===== Parameter Items (one per line) ===== */
|
||||
#param-container { display: flex; flex-direction: column; gap: 6px; }
|
||||
|
||||
.param-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
padding: 10px;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 8px 12px;
|
||||
background: var(--bg-input);
|
||||
border-radius: var(--radius);
|
||||
border: 1px solid var(--border);
|
||||
transition: border-color 0.2s;
|
||||
}
|
||||
|
||||
.param-item:hover {
|
||||
border-color: var(--accent2);
|
||||
}
|
||||
|
||||
.param-item.modified {
|
||||
border-color: var(--accent);
|
||||
background: rgba(233, 69, 96, 0.05);
|
||||
}
|
||||
|
||||
.param-item.hidden-param {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.param-item .param-label {
|
||||
font-size: 0.85em;
|
||||
color: var(--text);
|
||||
font-weight: 500;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
transition: border-color 0.15s;
|
||||
}
|
||||
.param-item:hover { border-color: var(--accent2); }
|
||||
.param-item.modified { border-color: var(--accent); background: rgba(233, 69, 96, 0.05); }
|
||||
|
||||
.param-item .param-flag {
|
||||
font-family: monospace;
|
||||
font-size: 0.8em;
|
||||
color: var(--accent2);
|
||||
background: var(--bg);
|
||||
padding: 1px 4px;
|
||||
padding: 2px 6px;
|
||||
border-radius: 3px;
|
||||
min-width: 80px;
|
||||
text-align: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.param-item .param-desc {
|
||||
font-size: 0.75em;
|
||||
.param-item .vram-badge {
|
||||
color: var(--accent);
|
||||
font-size: 0.7em;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.param-item .param-desc-text {
|
||||
font-size: 0.85em;
|
||||
color: var(--text-dim);
|
||||
margin-bottom: 4px;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.param-item input,
|
||||
.param-item input[type="text"],
|
||||
.param-item input[type="number"],
|
||||
.param-item select {
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--text);
|
||||
padding: 6px 8px;
|
||||
padding: 5px 8px;
|
||||
border-radius: 4px;
|
||||
font-size: 0.9em;
|
||||
width: 100%;
|
||||
font-size: 0.85em;
|
||||
width: 200px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.param-item input:focus, .param-item select:focus { outline: none; border-color: var(--accent); }
|
||||
|
||||
.param-item input:focus,
|
||||
.param-item select:focus {
|
||||
outline: none;
|
||||
border-color: var(--accent);
|
||||
}
|
||||
.param-item input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; flex-shrink: 0; }
|
||||
|
||||
.param-item .param-checkbox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.param-item .param-checkbox input {
|
||||
width: auto;
|
||||
cursor: pointer;
|
||||
.param-item .param-unit {
|
||||
font-size: 0.8em;
|
||||
color: var(--text-dim);
|
||||
flex-shrink: 0;
|
||||
min-width: 40px;
|
||||
}
|
||||
|
||||
/* ===== Toggle Advanced ===== */
|
||||
.btn-toggle-advanced {
|
||||
margin-top: 12px;
|
||||
padding: 8px 16px;
|
||||
background: transparent;
|
||||
border: 1px solid var(--border);
|
||||
color: var(--text-dim);
|
||||
border-radius: var(--radius);
|
||||
cursor: pointer;
|
||||
font-size: 0.85em;
|
||||
transition: all 0.2s;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.btn-toggle-advanced:hover {
|
||||
border-color: var(--accent);
|
||||
color: var(--accent);
|
||||
}
|
||||
.btn-toggle-advanced { margin-top: 8px; padding: 8px 16px; background: transparent; border: 1px solid var(--border); color: var(--text-dim); border-radius: var(--radius); cursor: pointer; font-size: 0.85em; width: 100%; }
|
||||
.btn-toggle-advanced:hover { border-color: var(--accent); color: var(--accent); }
|
||||
|
||||
/* ===== Command Output ===== */
|
||||
.command-panel {
|
||||
position: sticky;
|
||||
bottom: 20px;
|
||||
}
|
||||
|
||||
.command-output {
|
||||
background: #0d1117;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
padding: 16px;
|
||||
font-family: 'Cascadia Code', 'Fira Code', monospace;
|
||||
font-size: 0.9em;
|
||||
color: #4ecca3;
|
||||
word-break: break-all;
|
||||
min-height: 60px;
|
||||
white-space: pre-wrap;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.command-actions {
|
||||
margin-top: 12px;
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.btn-copy, .btn-gen {
|
||||
padding: 8px 20px;
|
||||
border: none;
|
||||
border-radius: var(--radius);
|
||||
cursor: pointer;
|
||||
font-size: 0.9em;
|
||||
font-weight: 500;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.btn-copy {
|
||||
background: var(--accent2);
|
||||
color: var(--bg);
|
||||
}
|
||||
|
||||
.btn-copy:hover {
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.btn-gen {
|
||||
background: var(--bg-input);
|
||||
color: var(--text);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.btn-gen:hover {
|
||||
border-color: var(--accent);
|
||||
}
|
||||
.command-panel { position: sticky; bottom: 20px; }
|
||||
.command-output { background: #0d1117; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; font-family: 'Cascadia Code', 'Fira Code', monospace; font-size: 0.9em; color: #4ecca3; word-break: break-all; min-height: 60px; white-space: pre-wrap; }
|
||||
.command-actions { margin-top: 12px; display: flex; gap: 8px; }
|
||||
.btn-copy, .btn-gen { padding: 8px 20px; border: none; border-radius: var(--radius); cursor: pointer; font-size: 0.9em; font-weight: 500; }
|
||||
.btn-copy { background: var(--accent2); color: var(--bg); }
|
||||
.btn-copy:hover { opacity: 0.85; }
|
||||
.btn-gen { background: var(--bg-input); color: var(--text); border: 1px solid var(--border); }
|
||||
|
||||
/* ===== Admin ===== */
|
||||
.admin-tabs {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
margin-bottom: 20px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.admin-tab {
|
||||
padding: 8px 20px;
|
||||
background: var(--bg-input);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--text-dim);
|
||||
border-radius: var(--radius);
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.admin-tab.active {
|
||||
background: var(--accent);
|
||||
color: white;
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
.admin-section {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.admin-section.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.admin-add-form {
|
||||
background: var(--bg-input);
|
||||
border-radius: var(--radius);
|
||||
padding: 16px;
|
||||
margin-bottom: 20px;
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.admin-add-form h3 {
|
||||
margin-bottom: 12px;
|
||||
color: var(--accent2);
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.form-row {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.form-row input {
|
||||
flex: 1;
|
||||
min-width: 120px;
|
||||
padding: 6px 10px;
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--text);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.form-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.form-grid input,
|
||||
.form-grid select {
|
||||
padding: 6px 10px;
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--text);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
padding: 8px 20px;
|
||||
background: var(--accent);
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: var(--radius);
|
||||
cursor: pointer;
|
||||
font-weight: 500;
|
||||
transition: all 0.2s;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background: var(--accent-hover);
|
||||
}
|
||||
|
||||
.admin-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 0.85em;
|
||||
}
|
||||
|
||||
.admin-table th,
|
||||
.admin-table td {
|
||||
padding: 8px 10px;
|
||||
text-align: left;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.admin-table th {
|
||||
color: var(--accent2);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.admin-table tr:hover {
|
||||
background: var(--bg-input);
|
||||
}
|
||||
|
||||
.admin-table .btn-action {
|
||||
padding: 4px 10px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 0.85em;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.btn-edit {
|
||||
background: var(--accent2);
|
||||
color: var(--bg);
|
||||
}
|
||||
|
||||
.btn-delete {
|
||||
background: var(--accent);
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* Editable inputs in tables */
|
||||
.admin-table input,
|
||||
.admin-table select {
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--text);
|
||||
padding: 4px 6px;
|
||||
border-radius: 3px;
|
||||
font-size: 0.95em;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.settings-form {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
||||
gap: 12px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.settings-form .setting-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.settings-form .setting-item label {
|
||||
font-size: 0.85em;
|
||||
color: var(--text-dim);
|
||||
}
|
||||
|
||||
.settings-form .setting-item input {
|
||||
background: var(--bg-input);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--text);
|
||||
padding: 8px 12px;
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
.admin-tabs { display: flex; gap: 4px; margin-bottom: 20px; flex-wrap: wrap; }
|
||||
.admin-tab { padding: 8px 20px; background: var(--bg-input); border: 1px solid var(--border); color: var(--text-dim); border-radius: var(--radius); cursor: pointer; }
|
||||
.admin-tab.active { background: var(--accent); color: white; border-color: var(--accent); }
|
||||
.admin-section { display: none; }
|
||||
.admin-section.active { display: block; }
|
||||
.admin-add-form { background: var(--bg-input); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; border: 1px solid var(--border); }
|
||||
.admin-add-form h3 { margin-bottom: 12px; color: var(--accent2); font-size: 1em; }
|
||||
.form-row { display: flex; gap: 8px; flex-wrap: wrap; }
|
||||
.form-row input { flex: 1; min-width: 120px; padding: 6px 10px; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 4px; }
|
||||
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
|
||||
.form-grid input, .form-grid select { padding: 6px 10px; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 4px; }
|
||||
.btn-primary { padding: 8px 20px; background: var(--accent); color: white; border: none; border-radius: var(--radius); cursor: pointer; font-weight: 500; margin-top: 8px; }
|
||||
.btn-primary:hover { background: var(--accent-hover); }
|
||||
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.85em; }
|
||||
.admin-table th, .admin-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); }
|
||||
.admin-table th { color: var(--accent2); font-weight: 600; }
|
||||
.admin-table tr:hover { background: var(--bg-input); }
|
||||
.admin-table .btn-action { padding: 4px 10px; border: none; border-radius: 4px; cursor: pointer; font-size: 0.85em; margin-right: 4px; }
|
||||
.btn-edit { background: var(--accent2); color: var(--bg); }
|
||||
.btn-delete { background: var(--accent); color: white; }
|
||||
.admin-table input, .admin-table select { background: var(--bg); border: 1px solid var(--border); color: var(--text); padding: 4px 6px; border-radius: 3px; width: 100%; }
|
||||
.settings-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 16px; }
|
||||
.settings-form .setting-item { display: flex; flex-direction: column; gap: 4px; }
|
||||
.settings-form label { font-size: 0.85em; color: var(--text-dim); }
|
||||
.settings-form input { background: var(--bg-input); border: 1px solid var(--border); color: var(--text); padding: 8px 12px; border-radius: var(--radius); }
|
||||
|
||||
/* ===== Responsive ===== */
|
||||
@media (max-width: 768px) {
|
||||
.top-controls {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
#param-container {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.form-row {
|
||||
flex-direction: column;
|
||||
}
|
||||
.top-controls { flex-direction: column; }
|
||||
.param-item { flex-wrap: wrap; }
|
||||
.param-item .param-desc-text { white-space: normal; }
|
||||
.param-item input[type="text"], .param-item input[type="number"], .param-item select { width: 150px; }
|
||||
.form-row { flex-direction: column; }
|
||||
}
|
||||
Reference in New Issue
Block a user