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.8 KB
Raw Blame
// Shared legacy detail-tab layouts.

.events-tab {
    .failed-login-summary {
        display: flex;
        align-items: baseline;
        gap: $space-3;

        .count {
            font-size: $text-xl;
            font-weight: $font-weight-semibold;
            letter-spacing: -0.02em;

            &.danger {
                color: var(--red);
            }
        }

        .label {
            font-size: $text-xs;
            color: var(--text-faint);
        }
    }

    .recent-failures {
        margin-top: $space-4;

        summary {
            cursor: pointer;
            font-size: $text-sm;
            color: var(--accent-bright);

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

        pre {
            margin-top: $space-2;
            padding: $space-4;
            max-height: 200px;
            overflow: auto;
            background: var(--bg-code);
            border: 1px solid var(--border-soft);
            border-radius: var(--radius-sm);
            font-family: var(--mono);
            font-size: $text-xs;
            line-height: 1.6;
            color: var(--text-code);
        }
    }

    // The Event cell stacks the message over its meta line, so the ellipsis on
    // the message needs a min-width:0 flex parent to bite against.
    &__cell {
        display: flex;
        flex-direction: column;
        min-width: 0;
    }

    // Config and audit rows carry everything they have in the row itself —
    // only a deploy opens a drawer, so only a deploy gets a pointer.
    .sk-dtable .is-static {
        cursor: default;
    }

    // A cell with genuinely nothing behind it (an audit entry has no outcome).
    &__none {
        color: var(--text-faint);
    }

    &__event-sha {
        font-family: var(--mono);
        font-size: $text-xs;
        @include status-variant(var(--accent-bright), var(--accent-bg));
        padding: 1px $space-2;
        border-radius: $radius-badge;
        flex-shrink: 0;
    }

    &__event-message {
        font-size: $text-sm;
        color: $text-primary;
        font-weight: $font-weight-medium;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    // The build log, now shown in the deploy drawer rather than in an expanded
    // row. Flat BEM, so it styles the same block wherever it is portalled to.
    &__event-logs {
        padding: $space-3;
        background: var(--bg-code);
        border: 1px solid var(--border-soft);
        border-radius: $radius-control;
        max-height: 60vh;
        overflow-y: auto;

        pre {
            margin: 0;
            font-family: var(--mono);
            font-size: $text-xs;
            color: var(--text-code);
            white-space: pre-wrap;
            word-break: break-all;
        }
    }
}

.settings-tab {
    max-width: none;

    .card { max-width: 860px; }

    .form-group {
        margin: 0;
        padding: $space-hair 0;

        & + .form-group {
            border-top: 1px solid var(--border-soft);
        }

        // Eyebrow-style field labels (text inputs)
        > label {
            display: block;
            margin: $space-3 0 $space-tight;
            font-size: $text-xs;
            font-weight: $font-weight-semibold;
            color: var(--text-faint);
        }
    }

    .toggle-switch-label {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: $space-4;
        padding: $space-2 0;

        label {
            margin: 0;
            font-size: $text-sm;
            font-weight: $font-weight-medium;
            color: var(--text);
            cursor: pointer;
        }
    }

    .form-actions {
        display: flex;
        justify-content: flex-start;
    }

}

.metrics-tab {
    padding: 0;

    &__grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: $space-4;
    }

    &__card {
        background: var(--surface);
        border: 1px solid var(--border-soft);
        border-radius: var(--radius);
        padding: $space-4 $space-5;
        transition: border-color 0.15s;

        &:hover {
            border-color: var(--border-strong);
        }

        .sk-gauge {
            margin-top: $space-3;
        }
    }

    &__card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: $space-3;

        h4 {
            margin: 0;
            font-size: $text-xs;
            font-weight: $font-weight-semibold;
            color: var(--text-faint);
        }

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

    &__info {
        margin-top: $space-2;
        font-size: $text-xs;
        color: var(--text-dim);
    }
}