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.

4.3 KB
Raw Blame
// ============================================
// SERVICES LIST PAGE
// Shares the WordPress list layout (.wp-list) for a consistent list UX.
// Only service-specific cell bits live here (source badge, row actions).
// ============================================

.services-page {
    // Source badge (repo / manual / upload) used inside the shared .sk-dtable.
    &__src-badge {
        height: 20px; // geometry: badge height (20px badge spec)
        display: inline-flex;
        align-items: center;
        gap: $space-tight;
        padding: 0 $space-tight;
        background: var(--surface-2);
        border: 1px solid var(--border-soft);
        border-radius: $radius-badge;
        font-size: $text-xs;
        color: var(--text-dim);
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;

        svg { flex-shrink: 0; color: var(--text-faint); }

        &--manual {
            background: rgba(245, 185, 69, 0.08);
            border-color: rgba(245, 185, 69, 0.2);
            color: var(--amber);
        }

        &--upload {
            background: rgba(176, 123, 245, 0.08);
            border-color: rgba(176, 123, 245, 0.2);
            color: var(--violet);
        }
    }

    // Project / environment badge in the list row. Shows which project (and
    // optional environment) an app lives in; a subtle "Unassigned" chip otherwise.
    &__project {
        display: inline-flex;
        align-items: center;
        gap: $space-2;
        flex-wrap: wrap;
    }

    &__project-name {
        display: inline-flex;
        align-items: center;
        gap: $space-1;
        max-width: 160px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: $text-xs;
        color: $text-primary;

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

    &__unassigned {
        display: inline-flex;
        align-items: center;
        padding: $space-hair $space-2;
        border: 1px dashed $border-subtle;
        border-radius: $radius-full;
        font-size: $text-xs;
        color: $text-secondary;
    }

    // Row-level action buttons (start / stop / restart).
    &__actions {
        display: flex;
        gap: $space-1;
        justify-content: flex-end;
    }
}

// "Move to project" bulk-action dialog body.
.services-move {
    display: flex;
    flex-direction: column;
    gap: $space-4;
    padding: $space-2 0;

    &__field {
        display: flex;
        flex-direction: column;
        gap: $space-2;
    }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

// ---- card view (ResourceListPage renderCard) --------------------------------
// Same rows as the table, reflowed for scanning by service rather than by
// column. Toggled from the toolbar; the choice persists per browser.
.services-card {
    &__top {
        display: flex;
        align-items: center;
        gap: $space-3;
        margin-bottom: $space-3;
    }

    &__id { flex: 1; min-width: 0; }

    &__name {
        overflow: hidden;
        color: $text-primary;
        font-size: $text-base;
        font-weight: $font-weight-semibold;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    &__domain {
        overflow: hidden;
        margin-bottom: $space-4;
        color: $text-secondary;
        font-family: var(--mono);
        font-size: $text-xs;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    &__stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: $space-hair;
        padding-top: $space-3;
        border-top: 1px solid $border-subtle;

        .l {
            display: block;
            color: $text-tertiary;
            font-size: $text-xs;
        }

        .v {
            display: block;
            overflow: hidden;
            margin-top: $space-1;
            color: $text-primary;
            font-size: $text-sm;
            font-weight: $font-weight-semibold;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
    }

    &__foot {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: $space-hair;
        margin-top: $space-4;
        padding-top: $space-3;
        border-top: 1px solid $border-subtle;
    }
}