- Normalize OpenAI array-format content to string to fix connection reset - Add error.log with rotating handler for proxy and stream errors - Add global unhandled exception handler returning JSON 500 - Write OLLAMA_URL/DEFAULT_MODEL env vars to DB on startup (reset on restart) - Add extra_hosts to docker-compose.yml for host.docker.internal on Linux - Show warning in admin UI when Ollama URL is unreachable - Return reachable: true/false from /api/ollama-models endpoint
455 lines
6.5 KiB
CSS
455 lines
6.5 KiB
CSS
.container {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
padding: 20px;
|
|
}
|
|
|
|
h1 {
|
|
text-align: center;
|
|
margin-bottom: 40px;
|
|
color: #2c3e50;
|
|
}
|
|
|
|
h2 {
|
|
margin-bottom: 20px;
|
|
color: #34495e;
|
|
}
|
|
|
|
section {
|
|
background: white;
|
|
border-radius: 8px;
|
|
padding: 20px;
|
|
margin-bottom: 30px;
|
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
}
|
|
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
th, td {
|
|
padding: 12px 15px;
|
|
text-align: left;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
th {
|
|
background: #ecf0f1;
|
|
font-weight: 600;
|
|
color: #2c3e50;
|
|
}
|
|
|
|
tr:hover {
|
|
background: #f8f9fa;
|
|
}
|
|
|
|
|
|
.header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 40px;
|
|
}
|
|
|
|
.header h1 {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.login-form {
|
|
max-width: 360px;
|
|
margin: 80px auto;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
}
|
|
|
|
.login-form input {
|
|
padding: 10px;
|
|
border: 1px solid #ccc;
|
|
border-radius: 4px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.login-form button, .header button {
|
|
padding: 10px 20px;
|
|
background: #2c3e50;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.login-form button:hover, .header button:hover {
|
|
background: #34495e;
|
|
}
|
|
|
|
.error {
|
|
color: #e74c3c;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.create-form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
}
|
|
|
|
.create-form .edit-form {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.create-name {
|
|
flex: 0 0 auto !important;
|
|
}
|
|
|
|
.create-name input {
|
|
width: 200px;
|
|
}
|
|
|
|
.create-date {
|
|
flex: 0 0 auto !important;
|
|
}
|
|
|
|
.create-date input[type="date"] {
|
|
width: 150px;
|
|
}
|
|
|
|
.create-btn-wrap {
|
|
flex: 0 0 auto;
|
|
display: flex;
|
|
align-items: flex-end;
|
|
}
|
|
|
|
.create-form .btn-save:disabled {
|
|
opacity: 0.6;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.new-key-box {
|
|
margin-top: 16px;
|
|
padding: 12px 16px;
|
|
background: #eafaf1;
|
|
border: 1px solid #27ae60;
|
|
border-radius: 4px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
}
|
|
|
|
.new-key-box code {
|
|
flex: 1;
|
|
font-size: 13px;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.new-key-box button {
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
font-size: 16px;
|
|
color: #555;
|
|
}
|
|
|
|
.btn-danger {
|
|
padding: 4px 10px;
|
|
background: #e74c3c;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.btn-danger:hover {
|
|
background: #c0392b;
|
|
}
|
|
|
|
.settings-form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 14px;
|
|
max-width: 500px;
|
|
}
|
|
|
|
.settings-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
}
|
|
|
|
.settings-row label {
|
|
width: 160px;
|
|
flex-shrink: 0;
|
|
font-weight: 500;
|
|
color: #2c3e50;
|
|
}
|
|
|
|
.settings-row input, .settings-row select {
|
|
flex: 1;
|
|
padding: 8px 10px;
|
|
border: 1px solid #ccc;
|
|
border-radius: 4px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.settings-input-wrap {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
}
|
|
|
|
.settings-input-wrap input {
|
|
width: 100%;
|
|
padding: 8px 10px;
|
|
border: 1px solid #ccc;
|
|
border-radius: 4px;
|
|
font-size: 14px;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.warning {
|
|
color: #b8520a;
|
|
background: #fff3e0;
|
|
border: 1px solid #e67e22;
|
|
border-radius: 4px;
|
|
padding: 6px 10px;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.settings-form button {
|
|
align-self: flex-start;
|
|
padding: 8px 20px;
|
|
background: #2c3e50;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.settings-form button:hover {
|
|
background: #34495e;
|
|
}
|
|
|
|
.success {
|
|
color: #27ae60;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.settings-value {
|
|
flex: 1;
|
|
font-size: 14px;
|
|
color: #2c3e50;
|
|
}
|
|
|
|
.settings-value small {
|
|
margin-left: 8px;
|
|
color: #999;
|
|
font-size: 12px;
|
|
}
|
|
|
|
/* Quota progress bars */
|
|
.th-quota {
|
|
width: 90px;
|
|
}
|
|
|
|
.quota-cell {
|
|
width: 100%;
|
|
}
|
|
|
|
.quota-label {
|
|
font-size: 12px;
|
|
color: #555;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.quota-unlimited {
|
|
color: #aaa;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.quota-since {
|
|
display: block;
|
|
font-size: 10px;
|
|
color: #aaa;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.progress-bar {
|
|
height: 4px;
|
|
background: #e2e8f0;
|
|
border-radius: 2px;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
.progress-fill {
|
|
height: 100%;
|
|
border-radius: 2px;
|
|
transition: width 0.3s ease;
|
|
}
|
|
|
|
/* Edit form */
|
|
.td-status {
|
|
width: 20px;
|
|
text-align: center;
|
|
}
|
|
|
|
.status-active { color: #27ae60; font-size: 12px; }
|
|
.status-inactive { color: #bdc3c7; font-size: 12px; }
|
|
|
|
.btn-icon {
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
font-size: 16px;
|
|
padding: 2px 4px;
|
|
margin-right: 2px;
|
|
border-radius: 3px;
|
|
line-height: 1;
|
|
position: relative;
|
|
}
|
|
|
|
.btn-icon:hover {
|
|
background: rgba(0, 0, 0, 0.06);
|
|
}
|
|
|
|
.btn-icon-edit { color: #2980b9; }
|
|
.btn-icon-warn { color: #e67e22; }
|
|
.btn-icon-ok { color: #27ae60; }
|
|
.btn-icon-danger { color: #e74c3c; }
|
|
|
|
.btn-icon::after {
|
|
content: attr(data-tooltip);
|
|
position: absolute;
|
|
bottom: calc(100% + 8px);
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
background: #2c3e50;
|
|
color: white;
|
|
padding: 5px 10px;
|
|
border-radius: 5px;
|
|
font-size: 12px;
|
|
font-weight: 400;
|
|
white-space: nowrap;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: opacity 0.15s;
|
|
z-index: 1000;
|
|
}
|
|
|
|
.btn-icon::before {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: calc(100% + 2px);
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
border: 5px solid transparent;
|
|
border-top-color: #2c3e50;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: opacity 0.15s;
|
|
z-index: 1000;
|
|
}
|
|
|
|
.btn-icon:hover::after,
|
|
.btn-icon:hover::before {
|
|
opacity: 1;
|
|
}
|
|
|
|
.action-cell {
|
|
white-space: nowrap;
|
|
position: relative;
|
|
overflow: visible;
|
|
}
|
|
|
|
.row-editing {
|
|
background: #eaf4fb !important;
|
|
}
|
|
|
|
.edit-section {
|
|
margin-top: 20px;
|
|
padding: 16px 20px;
|
|
background: #f0f7ff;
|
|
border: 1px solid #3498db;
|
|
border-radius: 6px;
|
|
}
|
|
|
|
.edit-section h3 {
|
|
margin: 0 0 14px;
|
|
font-size: 15px;
|
|
color: #2c3e50;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.edit-section h3 em {
|
|
font-style: normal;
|
|
color: #2980b9;
|
|
}
|
|
|
|
.edit-form {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 14px;
|
|
align-items: flex-end;
|
|
}
|
|
|
|
.edit-form label {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 3px;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
color: #34495e;
|
|
}
|
|
|
|
.edit-form label small {
|
|
font-weight: 400;
|
|
color: #999;
|
|
font-size: 11px;
|
|
}
|
|
|
|
.edit-form input {
|
|
padding: 6px 8px;
|
|
border: 1px solid #bdc3c7;
|
|
border-radius: 4px;
|
|
font-size: 14px;
|
|
width: 130px;
|
|
}
|
|
|
|
.edit-actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
padding-bottom: 2px;
|
|
}
|
|
|
|
.btn-save {
|
|
padding: 6px 18px;
|
|
background: #27ae60;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.btn-save:hover {
|
|
background: #219a52;
|
|
}
|
|
|
|
.btn-cancel {
|
|
padding: 6px 18px;
|
|
background: #95a5a6;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.btn-cancel:hover {
|
|
background: #7f8c8d;
|
|
}
|