dashboard-nanobot/frontend/src/modules/dashboard/components/BotListPanel.css

460 lines
9.6 KiB
CSS

.ops-bot-list {
min-width: 0;
min-height: 0;
display: grid;
grid-template-rows: auto auto minmax(0, 1fr) auto;
gap: 8px;
padding-top: 8px;
}
.ops-bot-list .list-scroll {
min-height: 0;
overflow: auto;
padding-top: 4px;
padding-right: 2px;
max-height: 72vh;
}
.app-shell-compact .ops-bot-list {
height: 100%;
min-height: 0;
}
.app-shell-compact .ops-bot-list .list-scroll {
max-height: none;
}
.ops-list-actions {
position: relative;
display: inline-flex;
align-items: center;
gap: 8px;
}
.ops-bot-list-toolbar {
margin-top: 8px;
}
.ops-searchbar {
position: relative;
display: block;
}
.ops-searchbar-form {
margin: 0;
}
.ops-autofill-trap {
position: absolute;
top: 0;
left: 0;
width: 1px;
height: 1px;
padding: 0;
border: 0;
opacity: 0;
pointer-events: none;
}
.ops-search-input {
min-width: 0;
}
.ops-search-input-with-icon {
padding-right: 38px;
}
.ops-search-inline-btn {
position: absolute;
right: 8px;
top: 50%;
transform: translateY(-50%);
width: 24px;
height: 24px;
border-radius: 999px;
border: 1px solid transparent;
background: transparent;
color: var(--icon);
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
.ops-search-inline-btn:hover {
border-color: color-mix(in oklab, var(--brand) 56%, var(--line) 44%);
background: color-mix(in oklab, var(--brand-soft) 42%, var(--panel-soft) 58%);
}
.ops-bot-list-empty {
border: 1px dashed var(--line);
border-radius: 10px;
background: var(--panel-soft);
color: var(--subtitle);
text-align: center;
padding: 14px 10px;
font-size: 12px;
font-weight: 700;
}
.ops-bot-list-pagination {
margin-top: 0;
display: grid;
grid-template-columns: auto 1fr auto;
align-items: center;
gap: 8px;
position: sticky;
bottom: 0;
z-index: 6;
padding-top: 8px;
border-top: 1px solid color-mix(in oklab, var(--line) 78%, transparent);
background: color-mix(in oklab, var(--panel) 88%, transparent);
backdrop-filter: blur(4px);
}
.ops-bot-list-page-indicator {
text-align: center;
font-size: 12px;
color: var(--subtitle);
font-weight: 700;
}
.ops-bot-card {
position: relative;
border: 1px solid var(--line);
border-radius: 12px;
background: linear-gradient(145deg, color-mix(in oklab, var(--panel-soft) 86%, var(--panel) 14%), color-mix(in oklab, var(--panel-soft) 94%, transparent 6%));
padding: 8px 9px 8px 12px;
margin-bottom: 8px;
cursor: pointer;
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
overflow: hidden;
}
.ops-bot-card:hover {
border-color: color-mix(in oklab, var(--brand) 58%, var(--line) 42%);
box-shadow: 0 8px 24px color-mix(in oklab, var(--brand) 12%, transparent);
transform: translateY(-1px);
}
.ops-bot-card.is-active {
border-color: var(--brand);
background: color-mix(in oklab, var(--brand) 4%, var(--panel-soft));
box-shadow:
0 0 0 2px color-mix(in oklab, var(--brand) 30%, transparent),
0 12px 28px color-mix(in oklab, var(--brand) 18%, transparent);
z-index: 2;
}
.ops-bot-card.is-active::after {
content: '';
position: absolute;
inset: 0;
border-radius: 12px;
border: 2px solid var(--brand);
pointer-events: none;
opacity: 0.8;
}
.ops-bot-card.state-running {
background: linear-gradient(145deg, color-mix(in oklab, var(--ok) 8%, var(--panel-soft) 92%), color-mix(in oklab, var(--ok) 4%, var(--panel) 96%));
}
.ops-bot-card.state-running.is-active {
background: linear-gradient(145deg, color-mix(in oklab, var(--ok) 12%, var(--brand) 4%), color-mix(in oklab, var(--ok) 6%, var(--panel) 94%));
}
.ops-bot-card.state-stopped {
background: linear-gradient(145deg, color-mix(in oklab, var(--err) 8%, var(--panel-soft) 92%), color-mix(in oklab, var(--err) 4%, var(--panel) 96%));
}
.ops-bot-card.state-disabled {
opacity: 0.72;
filter: grayscale(0.2);
background: var(--panel-soft);
}
.ops-bot-top {
align-items: flex-start;
}
.ops-bot-name {
font-size: 15px;
font-weight: 800;
color: var(--title);
line-height: 1.15;
}
.ops-bot-id,
.ops-bot-meta {
margin-top: 1px;
color: var(--subtitle);
font-size: 11px;
font-weight: 600;
line-height: 1.25;
}
.ops-bot-actions {
margin-top: 7px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 5px;
}
.ops-bot-actions-main {
display: inline-flex;
align-items: center;
gap: 5px;
}
.ops-bot-enable-switch {
position: relative;
display: inline-flex;
align-items: center;
user-select: none;
cursor: pointer;
}
.ops-bot-enable-switch input {
position: absolute;
opacity: 0;
width: 0;
height: 0;
}
.ops-bot-enable-switch-track {
position: relative;
width: 36px;
height: 20px;
border-radius: 999px;
border: 1px solid color-mix(in oklab, var(--line) 82%, transparent);
background: color-mix(in oklab, #9ca3b5 42%, var(--panel-soft) 58%);
transition: all 0.2s ease;
}
.ops-bot-enable-switch-track::after {
content: '';
position: absolute;
left: 2px;
top: 2px;
width: 14px;
height: 14px;
border-radius: 999px;
background: color-mix(in oklab, var(--text) 75%, #fff 25%);
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.ops-bot-enable-switch input:checked + .ops-bot-enable-switch-track {
border-color: color-mix(in oklab, var(--ok) 66%, var(--line) 34%);
background: color-mix(in oklab, var(--ok) 46%, var(--panel-soft) 54%);
}
.ops-bot-enable-switch input:checked + .ops-bot-enable-switch-track::after {
transform: translateX(16px);
background: #fff;
}
.ops-bot-enable-switch input:disabled + .ops-bot-enable-switch-track {
opacity: 0.58;
cursor: not-allowed;
}
.ops-bot-strip {
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 4px;
background: color-mix(in oklab, var(--line) 80%, transparent);
opacity: 0.8;
transition: all 0.25s ease;
}
.ops-bot-strip.is-running {
background: var(--ok);
box-shadow: 2px 0 8px color-mix(in oklab, var(--ok) 40%, transparent);
}
.ops-bot-strip.is-stopped {
background: var(--err);
opacity: 0.6;
}
.ops-bot-strip.is-disabled {
background: #9ca3b5;
opacity: 0.4;
}
.ops-bot-icon-btn {
width: 32px;
height: 32px;
padding: 0;
border-radius: 9px;
display: inline-flex;
align-items: center;
justify-content: center;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.ops-bot-icon-btn svg {
width: 15px;
height: 15px;
stroke-width: 2.1;
}
.ops-bot-top-actions {
display: inline-flex;
align-items: center;
gap: 6px;
}
.ops-bot-name-row {
display: inline-flex;
align-items: center;
gap: 5px;
}
.ops-bot-lock {
width: 16px;
height: 16px;
min-width: 16px;
display: inline-flex;
align-items: center;
justify-content: center;
color: color-mix(in oklab, #f0b14a 72%, var(--text) 28%);
}
.ops-bot-lock svg {
width: 12px;
height: 12px;
stroke-width: 2.2;
}
.ops-bot-open-inline {
width: 16px;
height: 16px;
min-width: 16px;
padding: 0;
border: 0;
background: transparent;
color: var(--text-soft);
display: inline-flex;
align-items: center;
justify-content: center;
opacity: 0.72;
}
.ops-bot-open-inline:hover {
color: var(--brand);
opacity: 1;
}
.ops-bot-open-inline svg {
width: 11px;
height: 11px;
stroke-width: 2.25;
}
.ops-bot-actions .ops-bot-action-monitor {
background: color-mix(in oklab, var(--panel-soft) 75%, var(--brand-soft) 25%);
border-color: color-mix(in oklab, var(--brand) 44%, var(--line) 56%);
color: color-mix(in oklab, var(--text) 76%, white 24%);
}
.ops-bot-actions .ops-bot-action-start {
background: color-mix(in oklab, var(--ok) 24%, var(--panel-soft) 76%);
border-color: color-mix(in oklab, var(--ok) 52%, var(--line) 48%);
color: color-mix(in oklab, var(--text) 76%, white 24%);
}
.ops-bot-actions .ops-bot-action-stop {
background: color-mix(in oklab, #f5af48 30%, var(--panel-soft) 70%);
border-color: color-mix(in oklab, #f5af48 58%, var(--line) 42%);
color: #5e3b00;
}
.ops-bot-actions .ops-bot-action-stop:hover {
background: color-mix(in oklab, #f5af48 38%, var(--panel-soft) 62%);
border-color: color-mix(in oklab, #f5af48 70%, var(--line) 30%);
}
.ops-bot-actions .ops-bot-action-delete {
background: color-mix(in oklab, var(--err) 20%, var(--panel-soft) 80%);
border-color: color-mix(in oklab, var(--err) 48%, var(--line) 52%);
color: color-mix(in oklab, var(--text) 72%, white 28%);
}
.ops-bot-actions .ops-bot-icon-btn:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.ops-control-pending {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
}
.ops-control-dots {
display: flex;
align-items: center;
justify-content: center;
gap: 3px;
}
.ops-control-dots i {
width: 5px;
height: 5px;
border-radius: 50%;
display: block;
background: white;
opacity: 1;
animation: ops-control-dot 1s infinite ease-in-out;
}
.ops-control-dots i:nth-child(2) {
animation-delay: 0.15s;
}
.ops-control-dots i:nth-child(3) {
animation-delay: 0.3s;
}
@keyframes ops-control-dot {
0%, 100% {
transform: scale(0.8);
opacity: 0.4;
}
50% {
transform: scale(1.2);
opacity: 1;
}
}
.app-shell[data-theme='light'] .ops-bot-card {
background: #f7fbff;
}
.app-shell[data-theme='light'] .ops-bot-card.state-running {
background: linear-gradient(145deg, #edfdf6, #f7fffb);
}
.app-shell[data-theme='light'] .ops-bot-card.state-stopped {
background: linear-gradient(145deg, #fdf0f2, #fff7f8);
}
.app-shell[data-theme='light'] .ops-bot-card.state-disabled {
background: linear-gradient(145deg, #eff2f6, #f8fafc);
}
.app-shell[data-theme='light'] .ops-bot-card.is-active {
border-color: #3f74df;
box-shadow:
0 0 0 2px rgba(63, 116, 223, 0.45),
0 16px 32px rgba(63, 116, 223, 0.26),
inset 0 0 0 1px rgba(63, 116, 223, 0.78);
}