yuanjing/src/assets/less/apiKey/apikey.less
2026-04-17 17:41:38 +08:00

423 lines
7.2 KiB
Plaintext

.apikey-page {
height: 100%;
padding-bottom: 40px;
box-sizing: border-box;
}
.apikey-card {
height: 100%;
background: #1e2024;
border: 1px solid #2a2d32;
border-radius: 16px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
:deep(.el-card__body) {
padding: 28px 32px;
height: 100%;
display: flex;
flex-direction: column;
overflow: hidden;
}
}
.page-header {
display: flex;
justify-content: space-between;
gap: 24px;
margin-bottom: 24px;
flex-wrap: wrap;
.header-main {
.title-row {
display: flex;
align-items: center;
gap: 12px;
font-size: 24px;
font-weight: 700;
color: #fff;
.iconfont {
font-size: 26px;
color: #00c4b3;
}
}
.header-desc {
margin: 10px 0 0;
color: rgba(255, 255, 255, 0.65);
font-size: 14px;
line-height: 1.6;
}
}
.header-actions {
display: flex;
align-items: center;
gap: 12px;
.refresh-btn {
background: #25282e;
border-color: #3a3e45;
color: rgba(255, 255, 255, 0.88);
}
}
}
.guide-card {
margin-bottom: 24px;
padding: 24px 28px;
border-radius: 14px;
background: #25282e;
border: 1px solid #32363d;
}
.guide-section+.guide-section {
margin-top: 24px;
}
.guide-title {
margin-bottom: 14px;
font-size: 18px;
font-weight: 700;
color: #ffffff;
}
.guide-list {
margin: 0;
padding-left: 24px;
color: rgba(255, 255, 255, 0.86);
line-height: 1.9;
font-size: 15px;
li+li {
margin-top: 4px;
}
}
.login-require,
.empty-state {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
}
.login-require-content,
.empty-state {
flex-direction: column;
text-align: center;
img {
width: 220px;
height: 220px;
object-fit: contain;
opacity: 0.55;
}
}
.login-require-content {
display: flex;
gap: 12px;
}
.login-title,
.empty-title {
font-size: 20px;
color: #fff;
font-weight: 600;
}
.login-desc,
.empty-desc {
font-size: 14px;
color: rgba(255, 255, 255, 0.6);
line-height: 1.7;
}
.stats-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 16px;
margin-bottom: 24px;
}
.stat-card {
padding: 20px;
border-radius: 14px;
background: linear-gradient(135deg, rgba(44, 255, 248, 0.08), rgba(44, 104, 255, 0.08));
border: 1px solid rgba(255, 255, 255, 0.08);
.stat-label {
font-size: 13px;
color: rgba(255, 255, 255, 0.6);
margin-bottom: 12px;
}
.stat-value {
font-size: 28px;
color: #fff;
font-weight: 700;
&.success {
color: #3fe0b5;
}
&.warning {
color: #f5b04c;
}
}
}
.toolbar {
display: flex;
justify-content: space-between;
gap: 16px;
margin-bottom: 20px;
flex-wrap: wrap;
.toolbar-left {
display: flex;
gap: 12px;
flex-wrap: wrap;
}
.toolbar-right {
display: flex;
align-items: center;
}
.toolbar-tip {
font-size: 13px;
color: rgba(255, 255, 255, 0.45);
}
}
.search-input {
width: 320px;
}
.table-wrapper {
flex: 1;
overflow: auto;
border-radius: 12px;
}
.apikey-table {
width: 100%;
background: transparent;
:deep(.el-table) {
--el-table-bg-color: #1e2024;
--el-table-tr-bg-color: #1e2024;
--el-table-row-hover-bg-color: #25282e;
--el-table-current-row-bg-color: #25282e;
--el-table-header-bg-color: #1e2024;
--el-table-fixed-box-shadow: none;
--el-table-border-color: #2a2d32;
--el-table-text-color: rgba(255, 255, 255, 0.88);
--el-table-header-text-color: rgba(255, 255, 255, 0.75);
--el-bg-color: #1e2024;
--el-fill-color-lighter: #1a1c20;
background: transparent;
// Hide Element Plus default bottom divider on dark backgrounds.
&::before {
background-color: transparent;
}
}
:deep(.el-table__inner-wrapper),
:deep(.el-table__header-wrapper),
:deep(.el-table__body-wrapper),
:deep(.el-table__fixed),
:deep(.el-table__fixed-right),
:deep(.el-table__fixed-right-patch) {
background: #1e2024 !important;
}
:deep(.el-table__header-wrapper) {
.el-table__header th {
background-color: #1e2024;
color: rgba(255, 255, 255, 0.75);
border-bottom: 1px solid #2a2d32;
font-weight: 600;
}
}
:deep(.el-table__body-wrapper) {
.el-table__body tr {
background-color: #1e2024;
transition: background 0.2s;
&:hover td {
background-color: #25282e !important;
}
td {
border-bottom: 1px solid #2a2d32;
color: rgba(255, 255, 255, 0.88);
background-color: #1e2024;
}
}
}
:deep(.el-table__row--striped) {
td {
background-color: #1a1c20 !important;
}
}
:deep(.el-table__cell) {
background-color: transparent;
}
:deep(.el-table__fixed-right::before),
:deep(.el-table__fixed::before) {
background-color: #2a2d32 !important;
}
.key-mask {
font-family: Consolas, 'Courier New', monospace;
font-size: 13px;
color: #87f5eb;
background: #14161a;
padding: 4px 8px;
border-radius: 6px;
letter-spacing: 0.3px;
}
}
.view-key-content {
.view-key-name,
.view-key-value {
margin-bottom: 20px;
.label {
font-weight: 600;
color: rgba(255, 255, 255, 0.75);
display: inline-block;
width: 90px;
}
.value {
color: #fff;
}
}
.key-box {
margin-top: 8px;
padding: 14px;
background: #14161a;
border-radius: 12px;
border: 1px solid #2a2d32;
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
flex-wrap: wrap;
code {
font-family: Consolas, 'Courier New', monospace;
color: #87f5eb;
font-size: 14px;
word-break: break-all;
flex: 1;
}
}
.view-key-tip {
margin-top: 16px;
padding: 10px 12px;
background: rgba(245, 176, 76, 0.12);
border-radius: 8px;
color: #f5b04c;
font-size: 13px;
display: flex;
align-items: center;
gap: 8px;
i {
font-size: 16px;
}
}
}
.dialog-footer {
display: flex;
justify-content: flex-end;
gap: 12px;
}
.full-width {
width: 100%;
}
:deep(.el-input__wrapper),
:deep(.el-textarea__inner),
:deep(.el-select__wrapper) {
background-color: #25282e !important;
border: 1px solid #3a3e45 !important;
box-shadow: none !important;
}
:deep(.el-input__inner),
:deep(.el-textarea__inner) {
color: rgba(255, 255, 255, 0.92) !important;
}
:deep(.el-radio) {
margin-right: 20px;
color: rgba(255, 255, 255, 0.85);
}
:deep(.el-dialog) {
background: #1e2024;
border: 1px solid #2a2d32;
border-radius: 16px;
}
:deep(.el-dialog__title),
:deep(.el-form-item__label) {
color: #fff !important;
}
:deep(.el-button--primary.is-link) {
color: #3fe0b5 !important;
}
:deep(.el-button--danger.is-link) {
color: #f56c6c !important;
}
:deep(.el-table__inner-wrapper) {
border: 0;
}
@media (max-width: 1200px) {
.stats-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (max-width: 768px) {
.apikey-card :deep(.el-card__body) {
padding: 20px;
}
.stats-grid {
grid-template-columns: 1fr;
}
.toolbar {
flex-direction: column;
}
.search-input {
width: 100%;
}
.table-wrapper {
overflow-x: auto;
}
}