Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

11.6 KB
Raw Blame
.queue-page {
    padding: 0;
    min-height: 100%;
}

.queue-page--loading {
    min-height: 58vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.queue-loading-card {
    display: inline-flex;
    align-items: center;
    gap: $space-3;
    padding: $space-5 $space-6;
    border: 1px solid $border-subtle;
    border-radius: $radius-overlay;
    background:
        linear-gradient(135deg, $accent-glow, transparent 55%),
        $bg-card;
    color: $text-secondary;
    box-shadow: none;

    svg {
        color: $accent-primary;
        animation: queue-pulse 1.5s ease-in-out infinite;
    }
}

@keyframes queue-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.queue-ops-workspace {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: $space-5;
    padding: $space-5;

    @media (max-width: $breakpoint-lg) {
        grid-template-columns: 1fr;
    }
}

.queue-fleet-rail {
    display: flex;
    flex-direction: column;
    gap: $space-4;
    height: fit-content;
}

.queue-rail-section {
    padding: $space-4;
    border: 1px solid $border-subtle;
    border-radius: $radius-overlay;
    background: $bg-card;
    box-shadow: none;
}

.queue-rail-section-header {
    display: flex;
    align-items: center;
    gap: $space-2;
    margin-bottom: $space-4;
    color: $text-secondary;
    font-size: $text-xs;
    font-weight: $font-weight-semibold;

    svg {
        color: $accent-primary;
    }

    &--split {
        justify-content: space-between;

        button {
            padding: 0;
            border: none;
            background: transparent;
            color: $accent-primary;
            font-size: $text-xs;
            font-weight: $font-weight-semibold;
            cursor: pointer;

            &:hover {
                text-decoration: underline;
            }
        }
    }
}

.queue-rail-overview {
    display: grid;
    // minmax(0, 1fr) lets a wide value shrink/truncate within the narrow rail
    // instead of forcing the column (and the whole tile) to overflow.
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: $space-3;
}

.queue-group-nav,
.queue-status-nav {
    display: flex;
    flex-direction: column;
    gap: $space-1;
}

.queue-group-nav-item,
.queue-status-nav-item {
    display: flex;
    align-items: center;
    gap: $space-2;
    width: 100%;
    padding: $space-2 $space-3;
    border: 1px solid transparent;
    border-radius: $radius-overlay;
    background: transparent;
    color: $text-secondary;
    font-size: $text-xs;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;

    svg {
        flex-shrink: 0;
        color: $text-tertiary;
    }

    span {
        flex: 1;
        display: flex;
        align-items: center;
        gap: $space-2;
        overflow: hidden;
    }

    b {
        margin-left: auto;
        padding: $space-hair $space-2;
        border-radius: $radius-full;
        background: $bg-secondary;
        color: $text-secondary;
        font-size: $text-xs;
        font-weight: $font-weight-semibold;
    }

    &:hover {
        background: $bg-hover;
        color: $text-primary;
    }

    &.active {
        background: $accent-glow;
        border-color: $accent-primary;
        color: $text-primary;

        svg {
            color: $accent-primary;
        }
    }
}

.queue-status-nav-item {
    span {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    strong {
        color: $text-primary;
        font-weight: $font-weight-medium;
    }

    small {
        color: $text-tertiary;
        font-size: $text-xs;
        text-transform: lowercase;
    }

    &--failed.active,
    &--dead_letter.active {
        background: $danger-bg;
        border-color: $danger;
    }
}

.queue-group-badge {
    height: 20px; // geometry: badge height (20px badge spec)
    display: inline-flex;
    align-items: center;
    padding: 0 $space-tight;
    border-radius: $radius-badge;
    background: $bg-elevated;
    border: 1px solid $border-subtle;
    font-size: $text-xs;
    color: $text-tertiary;
}

.queue-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.queue-workbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: $space-4;
    margin-bottom: $space-5;

    @media (max-width: $breakpoint-md) {
        flex-direction: column;
    }
}

.queue-workbar-title {
    display: flex;
    flex-direction: column;
    gap: $space-1;

    span {
        color: $accent-primary;
        font-size: $text-xs;
        font-weight: $font-weight-semibold;
    }

    h1 {
        margin: 0;
        color: $text-primary;
        font-size: $text-xl;
        font-weight: $font-weight-semibold;
        letter-spacing: -0.02em;
    }

    em {
        color: $text-tertiary;
        font-size: $text-xs;
        font-style: normal;
    }
}

.queue-workbar-actions {
    display: flex;
    align-items: center;
    gap: $space-2;
    flex-wrap: wrap;

    .btn {
        gap: $space-2;
    }
}

.queue-command-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: $space-3;
    margin-bottom: $space-6;
    padding: $space-3;
    border: 1px solid $border-subtle;
    border-radius: $radius-overlay;
    background: $bg-card;
    box-shadow: none;

    @media (max-width: $breakpoint-lg) {
        flex-direction: column;
        align-items: stretch;
    }
}

.queue-toolbar {
    display: flex;
    gap: $space-3;
    flex: 1;

    @media (max-width: $breakpoint-sm) {
        flex-direction: column;
    }
}

.queue-results-summary {
    display: flex;
    align-items: center;
    gap: $space-2;
    color: $text-secondary;
    font-size: $text-xs;

    strong {
        color: $text-primary;
        font-size: $text-lg;
        font-weight: $font-weight-semibold;
    }
}

.queue-clear-filters {
    padding: 0;
    border: none;
    background: transparent;
    color: $accent-primary;
    font-size: $text-xs;
    cursor: pointer;

    &:hover {
        text-decoration: underline;
    }
}

// The table is .sk-dtable; the actions column width lives on the column
// definition (width: '1%').
.queue-table .col-actions {
    white-space: nowrap;
    text-align: right;
}

.queue-row-name {
    display: flex;
    flex-direction: column;
    gap: $space-hair;
}

.queue-row-title {
    color: $text-primary;
    font-weight: $font-weight-semibold;
}

.queue-row-sub {
    color: $text-tertiary;
    font-size: $text-xs;
}

.queue-row-group {
    display: inline-flex;
    align-items: center;
    gap: $space-1;
    color: $text-secondary;
    font-size: $text-xs;

    svg {
        color: $text-tertiary;
    }
}

.queue-row-counts {
    display: flex;
    flex-wrap: wrap;
    gap: $space-2;
}

.queue-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: $space-1;
}

// Toolbar filter triggers size to their content instead of the field default.
.queue-select {
    width: auto;
    min-width: 160px;
}

.queue-messages-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: $space-3;
    margin-bottom: $space-4;
    flex-wrap: wrap;
}

.queue-messages-selects,
.queue-messages-actions {
    display: flex;
    align-items: center;
    gap: $space-3;
    flex-wrap: wrap;
}

.queue-payload-preview {
    display: inline-block;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: $text-xs;
}

.queue-send-destination {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: $space-4;
    margin-bottom: $space-4;

    .queue-send-readonly {
        padding: $space-2 $space-3;
        border: 1px solid $border-subtle;
        border-radius: $radius-card;
        background: $bg-secondary;
        color: $text-primary;
        font-family: $font-mono;
        font-size: $text-xs;
    }
}

.queue-message-detail {
    display: flex;
    flex-direction: column;
    gap: $space-3;

    pre {
        background: $bg-elevated;
        border: 1px solid $border-subtle;
        border-radius: $radius-card;
        padding: $space-3;
        overflow: auto;
        font-size: $text-xs;
        max-height: 300px;
    }
}

.queue-message-error {
    @include status-variant($danger, $danger-bg);
    border: 1px solid $danger-border;
    border-radius: $radius-card;
    padding: $space-3;
}

.queue-message-section {
    margin-top: $space-2;
}

.modal-header-sub {
    display: block;
    color: $text-tertiary;
    font-size: $text-xs;
}

/* ------------------------------------------------------------------ */
/* Queue detail page                                                  */
/* ------------------------------------------------------------------ */

.queue-detail {
    display: flex;
    flex-direction: column;
    gap: $space-5;
    padding: $space-5;
}

.queue-back {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: $space-2;
    padding: $space-1 0;
    border: none;
    background: transparent;
    color: $text-secondary;
    font-size: $text-xs;
    font-weight: $font-weight-medium;
    cursor: pointer;

    svg {
        color: $text-tertiary;
    }

    &:hover {
        color: $accent-primary;

        svg {
            color: $accent-primary;
        }
    }
}

.queue-detail-header {
    display: flex;
    flex-direction: column;
    gap: $space-3;
}

.queue-detail-headline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: $space-4;
    flex-wrap: wrap;
}

.queue-detail-actions {
    display: flex;
    align-items: center;
    gap: $space-2;
    flex-wrap: wrap;

    .btn {
        gap: $space-2;
    }
}

.queue-readonly-badge {
    height: 20px; // geometry: badge height (20px badge spec)
    display: inline-flex;
    align-items: center;
    gap: $space-1;
    padding: 0 $space-tight;
    border-radius: $radius-badge;
    background: $bg-elevated;
    border: 1px solid $border-subtle;
    color: $text-tertiary;
    font-size: $text-xs;
    font-weight: $font-weight-medium;

    svg {
        color: $text-tertiary;
    }
}

// Was a hand-rolled copy of the KpiBand grid; the page uses the primitive now.

.queue-detail-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: $space-4;
    align-items: start;

    &.has-panel {
        grid-template-columns: minmax(0, 1fr) 380px;

        @media (max-width: $breakpoint-lg) {
            grid-template-columns: minmax(0, 1fr);
        }
    }
}

.queue-detail-main {
    min-width: 0;
}

.queue-detail-panel {
    border: 1px solid $border-subtle;
    border-radius: $radius-overlay;
    background: $bg-card;
    box-shadow: none;
    padding: $space-4;
    position: sticky;
    top: $space-4;
    max-height: calc(100vh - #{$space-6});
    overflow: auto;
}

.queue-detail-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: $space-3;

    h2 {
        margin: 0;
        font-size: $text-lg;
        font-weight: $font-weight-semibold;
        color: $text-primary;
    }
}

.queue-panel-close {
    display: inline-flex;
    padding: $space-1;
    border: none;
    border-radius: $radius-card;
    background: transparent;
    color: $text-tertiary;
    cursor: pointer;

    &:hover {
        color: $text-primary;
        background: $bg-hover;
    }
}

.queue-detail-panel-footer {
    margin-top: $space-4;
    padding-top: $space-3;
    border-top: 1px solid $border-subtle;
}

// Semantic layouts and controls; declarations preserved from the legacy compatibility layer.
.queue-action-icon { margin-inline-end: 0.5rem; }