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.

3.8 KB
Raw Blame
// ============================================
// PR PREVIEW ENVIRONMENTS
// ============================================

.preview-list {
    display: flex;
    flex-direction: column;
    gap: $space-5;
}

.preview-settings {
    background: $bg-card;
    border: 1px solid $border-subtle;
    border-radius: $radius-control;
    padding: $space-5;

    &__header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: $space-4;
        flex-wrap: wrap;
    }

    &__title {
        display: flex;
        align-items: flex-start;
        gap: $space-3;

        svg {
            color: $accent-primary;
            flex-shrink: 0;
            margin-top: $space-hair;
        }

        h3 {
            margin: 0 0 $space-1;
            font-size: $text-lg;
            font-weight: $font-weight-medium;
            color: $text-primary;
        }
    }

    &__hint {
        margin: 0;
        color: $text-secondary;
        font-size: $text-xs;
        line-height: 1.5;

        code {
            font-family: $font-mono;
            font-size: $text-xs;
            background: $bg-tertiary;
            padding: 1px $space-tight;
            border-radius: $radius-badge;
            color: $text-primary;
        }
    }

    &__toggle {
        display: flex;
        align-items: center;
        gap: $space-2;
        flex-shrink: 0;
    }

    &__template {
        margin-top: $space-4;
        padding-top: $space-4;
        border-top: 1px solid $border-subtle;
        display: flex;
        flex-direction: column;
        gap: $space-2;
    }

    &__template-row {
        display: flex;
        gap: $space-2;
        align-items: center;

        input {
            flex: 1;
            font-family: $font-mono;
            font-size: $text-xs;
        }
    }
}

.preview-list__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: $space-3;

    h4 {
        margin: 0;
        font-size: $text-md;
        font-weight: $font-weight-medium;
        color: $text-primary;
    }

    .spin {
        animation: preview-spin 0.9s linear infinite;
    }
}

.preview-list__items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: $space-3;
}

.preview-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: $space-4;
    background: $bg-card;
    border: 1px solid $border-subtle;
    border-radius: $radius-control;
    padding: $space-4;
    flex-wrap: wrap;

    &__main {
        display: flex;
        flex-direction: column;
        gap: $space-2;
        min-width: 0;
        flex: 1;
    }

    &__title {
        display: flex;
        align-items: center;
        gap: $space-2;
        flex-wrap: wrap;
    }

    &__pr {
        font-family: $font-mono;
        font-size: $text-xs;
        font-weight: $font-weight-semibold;
        color: $text-primary;
    }

    &__name {
        color: $text-secondary;
        font-size: $text-xs;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 360px;
    }

    &__meta {
        display: flex;
        align-items: center;
        gap: $space-3;
        flex-wrap: wrap;
        font-size: $text-xs;
    }

    &__branch,
    &__sha {
        color: $text-tertiary;
        background: $bg-tertiary;
        padding: 1px $space-tight;
        border-radius: $radius-badge;
    }

    &__url {
        color: $accent-primary;
        text-decoration: none;
        word-break: break-all;

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

    &__actions {
        display: flex;
        align-items: center;
        gap: $space-1;
        flex-shrink: 0;
    }
}

@keyframes preview-spin {
    to { transform: rotate(360deg); }
}