Files
Bjorn/web/css/pages/plugins.css
infinition b541ec1f61 feat: enhance scheduler functionality and UI improvements
- Updated scheduler.js to improve tab switching and content display.
- Refactored script fetching logic to handle new data structure.
- Enhanced schedule creation and editing with updated payload structure.
- Improved trigger testing and creation with consistent naming conventions.
- Added new CSS styles for actions and plugins pages to enhance UI/UX.
- Introduced responsive design adjustments for better mobile experience.
2026-03-19 16:59:55 +01:00

278 lines
6.7 KiB
CSS

/* ==========================================================================
PLUGINS PAGE
========================================================================== */
.plugins-page {
padding: 1rem;
max-width: 900px;
margin: 0 auto;
}
.plugins-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: .5rem;
}
.plugins-header h1 {
font-size: 1.4rem;
font-weight: 800;
margin: 0;
color: var(--ink);
}
.plugins-actions {
display: flex;
gap: 6px;
}
.plugins-actions .btn {
padding: 5px 14px;
border: 1px solid var(--c-border);
border-radius: 6px;
background: var(--c-panel);
color: var(--ink);
font-size: 12px;
font-weight: 600;
cursor: pointer;
}
.plugins-actions .btn:hover { border-color: var(--acid); color: var(--acid); }
.plugins-actions .btn-primary {
background: color-mix(in oklab, var(--acid) 15%, transparent);
border-color: var(--acid);
color: var(--acid);
}
.plugins-actions .btn-primary:hover { background: color-mix(in oklab, var(--acid) 25%, transparent); }
.plugins-count {
color: var(--muted);
font-size: 12px;
margin: 0 0 12px;
}
.plugins-empty {
text-align: center;
color: var(--muted);
padding: 2rem;
font-size: 13px;
}
.plugins-grid {
display: flex;
flex-direction: column;
gap: 8px;
}
/* ===== Plugin card ===== */
.plugin-card {
border: 1px solid var(--c-border);
border-radius: 10px;
background: var(--c-panel);
padding: 12px 14px;
display: flex;
flex-direction: column;
gap: 6px;
transition: border-color .15s;
}
.plugin-card:hover { border-color: var(--c-border-strong); }
.plugin-card.plugin-disabled { opacity: .55; }
.plugin-card-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.plugin-card-title {
display: flex;
align-items: center;
gap: 6px;
flex-wrap: wrap;
}
.plugin-card-title strong {
font-size: 13px;
color: var(--ink);
}
.plugin-type-badge {
display: inline-block;
padding: 1px 6px;
border-radius: 3px;
font-size: 10px;
font-weight: 600;
text-transform: uppercase;
background: color-mix(in oklab, var(--acid) 15%, transparent);
color: var(--acid);
}
.badge-action { background: color-mix(in oklab, #3b82f6 15%, transparent); color: #3b82f6; }
.badge-notifier { background: color-mix(in oklab, #f59e0b 15%, transparent); color: #f59e0b; }
.badge-enricher { background: color-mix(in oklab, #8b5cf6 15%, transparent); color: #8b5cf6; }
.badge-exporter { background: color-mix(in oklab, #06b6d4 15%, transparent); color: #06b6d4; }
.badge-widget { background: color-mix(in oklab, #ec4899 15%, transparent); color: #ec4899; }
.plugin-status {
font-size: 10px;
font-weight: 600;
padding: 1px 6px;
border-radius: 3px;
}
.plugin-status.status-loaded { background: color-mix(in oklab, #22c55e 18%, transparent); color: #22c55e; }
.plugin-status.status-disabled { background: color-mix(in oklab, var(--muted) 15%, transparent); color: var(--muted); }
.plugin-status.status-error { background: color-mix(in oklab, #ef4444 18%, transparent); color: #ef4444; }
.plugin-status.status-missing { background: color-mix(in oklab, #f59e0b 18%, transparent); color: #f59e0b; }
.plugin-card-info { font-size: 12px; }
.plugin-desc { color: var(--ink); margin: 0 0 4px; line-height: 1.4; }
.plugin-meta { color: var(--muted); font-size: 11px; display: flex; gap: 8px; }
.plugin-hooks {
display: flex;
flex-wrap: wrap;
gap: 4px;
}
.hook-badge {
padding: 1px 6px;
border: 1px solid var(--c-border);
border-radius: 3px;
font-size: 10px;
color: var(--muted);
font-family: monospace;
}
.plugin-error {
padding: 6px 8px;
background: color-mix(in oklab, #ef4444 10%, transparent);
border: 1px solid color-mix(in oklab, #ef4444 30%, transparent);
border-radius: 5px;
color: #fca5a5;
font-size: 11px;
}
.plugin-deps-warn {
padding: 4px 8px;
background: color-mix(in oklab, #f59e0b 10%, transparent);
border: 1px solid color-mix(in oklab, #f59e0b 30%, transparent);
border-radius: 5px;
color: #fcd34d;
font-size: 11px;
}
.plugin-card-actions {
display: flex;
gap: 4px;
margin-top: 2px;
}
.plugin-card-actions button {
padding: 4px 10px;
border: 1px solid var(--c-border);
border-radius: 5px;
background: transparent;
color: var(--muted);
font-size: 11px;
cursor: pointer;
}
.plugin-card-actions button:hover { color: var(--ink); border-color: var(--c-border-strong); }
.plugin-card-actions .btn-danger { color: #ef4444; border-color: color-mix(in oklab, #ef4444 40%, transparent); }
.plugin-card-actions .btn-danger:hover { background: color-mix(in oklab, #ef4444 12%, transparent); }
/* ===== Plugin toggle ===== */
.plugin-toggle {
position: relative;
display: inline-block;
width: 36px;
height: 20px;
cursor: pointer;
flex-shrink: 0;
}
.plugin-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.plugin-toggle-track {
position: absolute;
inset: 0;
border-radius: 10px;
background: var(--c-border);
transition: background .2s;
}
.plugin-toggle-track::before {
content: '';
position: absolute;
width: 16px;
height: 16px;
left: 2px;
bottom: 2px;
border-radius: 50%;
background: var(--ink);
transition: transform .2s;
}
.plugin-toggle input:checked + .plugin-toggle-track { background: var(--acid); }
.plugin-toggle input:checked + .plugin-toggle-track::before { transform: translateX(16px); }
/* ===== Config modal ===== */
.plugin-config-overlay {
position: fixed;
inset: 0;
background: rgba(0,0,0,.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
}
.plugin-config-modal {
width: min(600px, 90vw);
max-height: 80vh;
background: var(--panel);
border: 1px solid var(--c-border-strong);
border-radius: 12px;
box-shadow: 0 20px 56px rgba(0,0,0,.6);
display: flex;
flex-direction: column;
overflow: hidden;
}
.plugin-config-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 14px;
border-bottom: 1px solid var(--c-border);
font-weight: 700;
}
.plugin-config-body {
padding: 14px;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 8px;
}
.plugin-config-field label {
display: flex;
flex-direction: column;
gap: 3px;
font-size: 11px;
color: var(--muted);
font-weight: 600;
}
.plugin-config-field input,
.plugin-config-field select,
.plugin-config-field textarea {
padding: 5px 8px;
border: 1px solid var(--c-border);
border-radius: 5px;
background: var(--bg);
color: var(--ink);
font-size: 12px;
width: 100%;
}
.plugin-config-footer {
display: flex;
justify-content: flex-end;
gap: 6px;
padding: 10px 14px;
border-top: 1px solid var(--c-border);
}
/* Hidden file input for plugin install */
.plugins-page input[type="file"] { display: none; }