mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-02-18 18:50:49 +08:00
572 lines
9.1 KiB
SCSS
572 lines
9.1 KiB
SCSS
@use '../styles/variables' as *;
|
|
@use '../styles/mixins' as *;
|
|
|
|
.container {
|
|
width: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: $spacing-lg;
|
|
}
|
|
|
|
.header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
gap: $spacing-md;
|
|
}
|
|
|
|
.pageTitle {
|
|
font-size: 28px;
|
|
font-weight: 700;
|
|
color: var(--text-primary);
|
|
margin: 0;
|
|
}
|
|
|
|
.errorBox {
|
|
padding: $spacing-md;
|
|
background-color: rgba(239, 68, 68, 0.1);
|
|
border: 1px solid var(--danger-color);
|
|
border-radius: $radius-md;
|
|
color: var(--danger-color);
|
|
font-size: 14px;
|
|
}
|
|
|
|
.hint {
|
|
color: var(--text-secondary);
|
|
font-size: 14px;
|
|
text-align: center;
|
|
padding: $spacing-lg;
|
|
}
|
|
|
|
// Stats Grid
|
|
.statsGrid {
|
|
display: grid;
|
|
gap: $spacing-md;
|
|
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
|
|
|
@include tablet {
|
|
grid-template-columns: repeat(3, 1fr);
|
|
}
|
|
|
|
@include mobile {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
|
|
.statCard {
|
|
padding: $spacing-lg;
|
|
background-color: var(--bg-primary);
|
|
border-radius: $radius-lg;
|
|
border: 1px solid var(--border-color);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: $spacing-sm;
|
|
min-height: 200px;
|
|
box-shadow: $shadow-sm;
|
|
transition: transform $transition-fast, box-shadow $transition-fast, border-color $transition-fast;
|
|
overflow: hidden;
|
|
|
|
&:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: $shadow-md;
|
|
border-color: rgba(37, 99, 235, 0.2);
|
|
}
|
|
}
|
|
|
|
.statCardHeader {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
gap: $spacing-sm;
|
|
}
|
|
|
|
.statLabelGroup {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
}
|
|
|
|
.statIconBadge {
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: $radius-md;
|
|
display: grid;
|
|
place-items: center;
|
|
color: #fff;
|
|
font-size: 18px;
|
|
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
|
|
}
|
|
|
|
.statHeader {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: $spacing-sm;
|
|
}
|
|
|
|
.statIcon {
|
|
font-size: 18px;
|
|
}
|
|
|
|
.statLabel {
|
|
font-size: 13px;
|
|
color: var(--text-secondary);
|
|
font-weight: 600;
|
|
letter-spacing: 0.01em;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.statValue {
|
|
font-size: 30px;
|
|
font-weight: 700;
|
|
color: var(--text-primary);
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.statValueRow {
|
|
display: flex;
|
|
gap: $spacing-lg;
|
|
}
|
|
|
|
.statValueSmall {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
}
|
|
|
|
.statValueLabel {
|
|
font-size: 12px;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.statValueNum {
|
|
font-size: 20px;
|
|
font-weight: 700;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.statMeta {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.statSuccess {
|
|
color: var(--success-color, #22c55e);
|
|
}
|
|
|
|
.statFailure {
|
|
color: var(--danger-color, #ef4444);
|
|
}
|
|
|
|
.statNeutral {
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.statMetaRow {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: $spacing-sm;
|
|
font-size: 12px;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.statMetaItem {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.statMetaDot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background-color: var(--text-secondary);
|
|
}
|
|
|
|
.statSubtle {
|
|
color: var(--text-tertiary);
|
|
}
|
|
|
|
.statTrend {
|
|
margin-top: auto;
|
|
background: var(--bg-secondary, #f6f8fb);
|
|
border-radius: $radius-md;
|
|
padding: $spacing-xs $spacing-sm;
|
|
height: 72px;
|
|
border: 1px solid var(--border-color);
|
|
}
|
|
|
|
.statTrendPlaceholder {
|
|
width: 100%;
|
|
height: 100%;
|
|
background: var(--bg-tertiary, #eef1f6);
|
|
border-radius: $radius-sm;
|
|
}
|
|
|
|
.sparkline {
|
|
width: 100%;
|
|
height: 100% !important;
|
|
}
|
|
|
|
.statHint {
|
|
color: var(--text-tertiary);
|
|
font-style: italic;
|
|
}
|
|
|
|
// API List
|
|
.apiList {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: $spacing-sm;
|
|
}
|
|
|
|
.apiItem {
|
|
background-color: var(--bg-secondary);
|
|
border-radius: $radius-md;
|
|
border: 1px solid var(--border-color);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.apiHeader {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: $spacing-md;
|
|
cursor: pointer;
|
|
transition: background-color 0.15s ease;
|
|
|
|
&:hover {
|
|
background-color: var(--bg-hover);
|
|
}
|
|
}
|
|
|
|
.apiInfo {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: $spacing-xs;
|
|
min-width: 0;
|
|
flex: 1;
|
|
}
|
|
|
|
.apiEndpoint {
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
font-size: 14px;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.apiStats {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: $spacing-xs;
|
|
}
|
|
|
|
.apiBadge {
|
|
font-size: 12px;
|
|
color: var(--text-secondary);
|
|
background-color: var(--bg-tertiary);
|
|
padding: 2px 8px;
|
|
border-radius: $radius-sm;
|
|
}
|
|
|
|
.expandIcon {
|
|
color: var(--text-secondary);
|
|
font-size: 12px;
|
|
margin-left: $spacing-sm;
|
|
}
|
|
|
|
.apiModels {
|
|
padding: $spacing-md;
|
|
padding-top: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: $spacing-xs;
|
|
border-top: 1px solid var(--border-color);
|
|
margin-top: 0;
|
|
padding-top: $spacing-md;
|
|
}
|
|
|
|
.modelRow {
|
|
display: grid;
|
|
grid-template-columns: 1fr auto auto;
|
|
gap: $spacing-md;
|
|
padding: $spacing-xs $spacing-sm;
|
|
background-color: var(--bg-primary);
|
|
border-radius: $radius-sm;
|
|
font-size: 13px;
|
|
|
|
@include mobile {
|
|
grid-template-columns: 1fr;
|
|
gap: $spacing-xs;
|
|
}
|
|
}
|
|
|
|
.modelName {
|
|
color: var(--text-primary);
|
|
font-weight: 500;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.modelStat {
|
|
color: var(--text-secondary);
|
|
text-align: right;
|
|
|
|
@include mobile {
|
|
text-align: left;
|
|
}
|
|
}
|
|
|
|
// Table
|
|
.tableWrapper {
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-size: 14px;
|
|
|
|
th, td {
|
|
padding: $spacing-sm $spacing-md;
|
|
text-align: left;
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
th {
|
|
font-weight: 600;
|
|
color: var(--text-secondary);
|
|
background-color: var(--bg-secondary);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
td {
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
tbody tr:hover {
|
|
background-color: var(--bg-hover);
|
|
}
|
|
}
|
|
|
|
.modelCell {
|
|
font-weight: 500;
|
|
max-width: 300px;
|
|
word-break: break-all;
|
|
}
|
|
|
|
// Pricing Section
|
|
.pricingSection {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: $spacing-lg;
|
|
}
|
|
|
|
.priceForm {
|
|
padding: $spacing-md;
|
|
background-color: var(--bg-secondary);
|
|
border-radius: $radius-md;
|
|
border: 1px solid var(--border-color);
|
|
}
|
|
|
|
.formRow {
|
|
display: flex;
|
|
gap: $spacing-md;
|
|
align-items: flex-end;
|
|
flex-wrap: wrap;
|
|
|
|
@include mobile {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
}
|
|
}
|
|
|
|
.formField {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: $spacing-xs;
|
|
flex: 1;
|
|
min-width: 150px;
|
|
|
|
label {
|
|
font-size: 12px;
|
|
color: var(--text-secondary);
|
|
font-weight: 500;
|
|
}
|
|
}
|
|
|
|
.select {
|
|
padding: 8px 12px;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: $radius-md;
|
|
background-color: var(--bg-primary);
|
|
color: var(--text-primary);
|
|
font-size: 14px;
|
|
cursor: pointer;
|
|
|
|
&:focus {
|
|
outline: none;
|
|
border-color: var(--primary-color);
|
|
}
|
|
}
|
|
|
|
.pricesList {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: $spacing-md;
|
|
}
|
|
|
|
.pricesTitle {
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
margin: 0;
|
|
}
|
|
|
|
.pricesGrid {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: $spacing-sm;
|
|
}
|
|
|
|
.priceItem {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: $spacing-md;
|
|
background-color: var(--bg-secondary);
|
|
border-radius: $radius-md;
|
|
border: 1px solid var(--border-color);
|
|
gap: $spacing-md;
|
|
|
|
@include mobile {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
}
|
|
}
|
|
|
|
.priceInfo {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: $spacing-xs;
|
|
min-width: 0;
|
|
flex: 1;
|
|
}
|
|
|
|
.priceModel {
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
font-size: 14px;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.priceMeta {
|
|
display: flex;
|
|
gap: $spacing-md;
|
|
font-size: 12px;
|
|
color: var(--text-secondary);
|
|
|
|
@include mobile {
|
|
flex-direction: column;
|
|
gap: $spacing-xs;
|
|
}
|
|
}
|
|
|
|
.priceActions {
|
|
display: flex;
|
|
gap: $spacing-xs;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
// Chart Section (for future use)
|
|
.chartSection {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: $spacing-md;
|
|
}
|
|
|
|
.chartControls {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
gap: $spacing-md;
|
|
|
|
@include mobile {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
}
|
|
}
|
|
|
|
.chartWrapper {
|
|
padding: $spacing-lg;
|
|
background-color: var(--bg-primary);
|
|
border-radius: $radius-lg;
|
|
border: 1px solid var(--border-color);
|
|
min-height: 300px;
|
|
height: 300px;
|
|
}
|
|
|
|
.periodButtons {
|
|
display: flex;
|
|
gap: $spacing-xs;
|
|
}
|
|
|
|
// Chart Line Controls
|
|
.chartLineControls {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
gap: $spacing-lg;
|
|
flex-wrap: wrap;
|
|
|
|
@include mobile {
|
|
flex-direction: column;
|
|
}
|
|
}
|
|
|
|
.chartLineList {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: $spacing-sm;
|
|
flex: 1;
|
|
}
|
|
|
|
.chartLineItem {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: $spacing-sm;
|
|
flex-wrap: wrap;
|
|
|
|
@include mobile {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
}
|
|
}
|
|
|
|
.chartLineLabel {
|
|
font-size: 14px;
|
|
color: var(--text-secondary);
|
|
min-width: 60px;
|
|
}
|
|
|
|
.chartLineActions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: $spacing-sm;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.chartLineCount {
|
|
font-size: 14px;
|
|
color: var(--text-secondary);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.chartLineHint {
|
|
font-size: 12px;
|
|
color: var(--text-tertiary);
|
|
margin: $spacing-sm 0 0 0;
|
|
font-style: italic;
|
|
}
|