mirror of
https://github.com/snailyp/gemini-balance.git
synced 2026-05-12 19:40:03 +08:00
- 在 gemini_routes.py 中添加 verify_key 路由,用于验证 API 密钥的有效性 - 在 keys_status 页面中添加验证按钮和相关逻辑 - 优化 keys_status 页面的样式,增加密钥验证相关 CSS 类 - 在 config.py 中添加 TEST_MODEL 设置,用于密钥验证测试
462 lines
8.5 KiB
CSS
462 lines
8.5 KiB
CSS
body {
|
|
font-family: 'Roboto', sans-serif;
|
|
line-height: 1.6;
|
|
margin: 0;
|
|
padding: 20px;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
min-height: 100vh;
|
|
}
|
|
|
|
.container {
|
|
max-width: 900px;
|
|
width: 95%;
|
|
background: rgba(255, 255, 255, 0.95);
|
|
padding: 40px;
|
|
border-radius: 20px;
|
|
box-shadow: 0 15px 35px rgba(0,0,0,0.2);
|
|
backdrop-filter: blur(10px);
|
|
position: relative;
|
|
margin: 20px auto;
|
|
overflow-y: auto;
|
|
max-height: calc(100vh - 40px);
|
|
scrollbar-width: none;
|
|
-ms-overflow-style: none;
|
|
}
|
|
|
|
.container::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
h1 {
|
|
color: #2c3e50;
|
|
text-align: center;
|
|
margin-bottom: 30px;
|
|
font-weight: 700;
|
|
font-size: 32px;
|
|
position: relative;
|
|
padding-bottom: 15px;
|
|
}
|
|
|
|
h1::after {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
width: 100px;
|
|
height: 4px;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
border-radius: 2px;
|
|
}
|
|
|
|
.key-list {
|
|
margin-bottom: 30px;
|
|
background: rgba(248, 249, 250, 0.9);
|
|
padding: 25px;
|
|
border-radius: 15px;
|
|
transition: all 0.3s ease;
|
|
border: 1px solid rgba(0,0,0,0.1);
|
|
animation: fadeIn 0.5s ease forwards;
|
|
}
|
|
|
|
.key-list:hover {
|
|
transform: translateY(-5px);
|
|
box-shadow: 0 10px 20px rgba(0,0,0,0.1);
|
|
}
|
|
|
|
.key-list:nth-child(2) {
|
|
animation-delay: 0.2s;
|
|
}
|
|
|
|
.key-list h2 {
|
|
color: #2c3e50;
|
|
margin-bottom: 20px;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
font-size: 1.5em;
|
|
padding-bottom: 10px;
|
|
border-bottom: 2px solid rgba(0,0,0,0.1);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.key-list h2 .toggle-icon {
|
|
margin-right: 10px;
|
|
transition: transform 0.3s ease;
|
|
}
|
|
|
|
.key-list h2 .toggle-icon.collapsed {
|
|
transform: rotate(-90deg);
|
|
}
|
|
|
|
.key-list .key-content {
|
|
transition: all 0.3s ease-out;
|
|
overflow: hidden;
|
|
height: auto;
|
|
opacity: 1;
|
|
}
|
|
|
|
.key-list .key-content.collapsed {
|
|
height: 0;
|
|
opacity: 0;
|
|
padding-top: 0;
|
|
padding-bottom: 0;
|
|
}
|
|
|
|
ul {
|
|
list-style-type: none;
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
|
|
li {
|
|
background: white;
|
|
border: 1px solid rgba(0,0,0,0.1);
|
|
margin-bottom: 12px;
|
|
padding: 15px;
|
|
border-radius: 10px;
|
|
transition: all 0.3s ease;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
box-shadow: 0 2px 5px rgba(0,0,0,0.05);
|
|
}
|
|
|
|
li:hover {
|
|
transform: translateX(5px);
|
|
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
|
|
}
|
|
|
|
.key-info {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 15px;
|
|
flex: 1;
|
|
}
|
|
|
|
.key-text {
|
|
font-family: 'Roboto Mono', monospace;
|
|
color: #2c3e50;
|
|
}
|
|
|
|
.fail-count {
|
|
background: rgba(231, 76, 60, 0.1);
|
|
color: #e74c3c;
|
|
padding: 4px 10px;
|
|
border-radius: 15px;
|
|
font-size: 0.85em;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 5px;
|
|
}
|
|
|
|
.fail-count i {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.key-actions {
|
|
display: flex;
|
|
gap: 10px;
|
|
align-items: center;
|
|
}
|
|
|
|
.verify-btn, .copy-btn {
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
color: white;
|
|
border: none;
|
|
padding: 8px 15px;
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
font-weight: bold;
|
|
transition: all 0.3s ease;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 5px;
|
|
}
|
|
|
|
.verify-btn {
|
|
background: linear-gradient(135deg, #2ecc71, #27ae60);
|
|
}
|
|
|
|
.verify-btn:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
|
|
}
|
|
|
|
.verify-btn:disabled {
|
|
opacity: 0.7;
|
|
cursor: not-allowed;
|
|
transform: none;
|
|
box-shadow: none;
|
|
}
|
|
|
|
.verify-btn i {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.copy-btn:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 5px 15px rgba(118, 75, 162, 0.3);
|
|
}
|
|
|
|
.copy-btn:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.copy-btn i {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.total {
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
color: white;
|
|
padding: 15px 25px;
|
|
border-radius: 10px;
|
|
font-weight: bold;
|
|
text-align: center;
|
|
font-size: 1.2em;
|
|
margin-top: 30px;
|
|
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
|
|
}
|
|
|
|
#copyStatus {
|
|
position: fixed;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
padding: 15px 30px;
|
|
border-radius: 25px;
|
|
font-weight: bold;
|
|
opacity: 0;
|
|
transition: all 0.3s ease;
|
|
backdrop-filter: blur(5px);
|
|
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
|
|
z-index: 1000;
|
|
text-align: center;
|
|
min-width: 200px;
|
|
color: white;
|
|
}
|
|
|
|
#copyStatus.success {
|
|
background: rgba(39, 174, 96, 0.95);
|
|
}
|
|
|
|
#copyStatus.error {
|
|
background: rgba(231, 76, 60, 0.95);
|
|
}
|
|
|
|
.status-badge {
|
|
padding: 4px 12px;
|
|
border-radius: 15px;
|
|
font-size: 0.9em;
|
|
font-weight: bold;
|
|
margin-right: 10px;
|
|
}
|
|
|
|
.status-valid {
|
|
background: rgba(39, 174, 96, 0.1);
|
|
color: #27ae60;
|
|
}
|
|
|
|
.status-invalid {
|
|
background: rgba(231, 76, 60, 0.1);
|
|
color: #e74c3c;
|
|
}
|
|
|
|
.scroll-buttons {
|
|
position: fixed;
|
|
right: 20px;
|
|
bottom: 20px;
|
|
display: none;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
z-index: 1000;
|
|
}
|
|
|
|
.scroll-btn {
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
color: white;
|
|
width: 40px;
|
|
height: 40px;
|
|
border: none;
|
|
border-radius: 50%;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 20px;
|
|
transition: all 0.3s ease;
|
|
backdrop-filter: blur(5px);
|
|
box-shadow: 0 2px 10px rgba(0,0,0,0.2);
|
|
}
|
|
|
|
.scroll-btn:hover {
|
|
background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
|
|
transform: scale(1.1);
|
|
}
|
|
|
|
.scroll-btn:active {
|
|
transform: scale(0.95);
|
|
}
|
|
|
|
.refresh-btn {
|
|
position: fixed;
|
|
top: 20px;
|
|
right: 20px;
|
|
z-index: 1000;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
color: #fff;
|
|
border: none;
|
|
padding: 10px 20px;
|
|
border-radius: 25px;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
font-weight: bold;
|
|
transition: all 0.3s ease;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.refresh-btn:hover {
|
|
transform: scale(1.05);
|
|
box-shadow: 0 8px 20px rgba(118, 75, 162, 0.3);
|
|
background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
|
|
}
|
|
|
|
.refresh-btn:active {
|
|
transform: scale(0.95);
|
|
}
|
|
|
|
.refresh-btn i {
|
|
transition: transform 0.5s ease;
|
|
}
|
|
|
|
.refresh-btn.loading i {
|
|
animation: spin 1s linear infinite;
|
|
}
|
|
|
|
.copyright {
|
|
position: fixed;
|
|
bottom: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
background: rgba(255, 255, 255, 0.9);
|
|
padding: 10px 0;
|
|
text-align: center;
|
|
font-size: 14px;
|
|
color: #2c3e50;
|
|
backdrop-filter: blur(5px);
|
|
border-top: 1px solid rgba(0,0,0,0.1);
|
|
}
|
|
|
|
.copyright a {
|
|
color: #764ba2;
|
|
text-decoration: none;
|
|
transition: color 0.3s ease;
|
|
}
|
|
|
|
.copyright a:hover {
|
|
color: #667eea;
|
|
}
|
|
|
|
.copyright img {
|
|
width: 20px;
|
|
height: 20px;
|
|
border-radius: 50%;
|
|
vertical-align: middle;
|
|
margin-right: 5px;
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; transform: translateY(20px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
@keyframes spin {
|
|
from { transform: rotate(0deg); }
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.container {
|
|
width: 100%;
|
|
padding: 20px;
|
|
margin: 10px auto;
|
|
}
|
|
body {
|
|
padding: 10px;
|
|
}
|
|
h1 {
|
|
font-size: 24px;
|
|
}
|
|
.key-list h2 {
|
|
font-size: 1.2em;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
align-items: flex-start;
|
|
}
|
|
.key-info {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: 8px;
|
|
}
|
|
li {
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
}
|
|
.key-actions {
|
|
width: 100%;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.verify-btn, .copy-btn {
|
|
width: 100%;
|
|
justify-content: center;
|
|
}
|
|
.key-text {
|
|
word-break: break-all;
|
|
}
|
|
.scroll-buttons {
|
|
right: 10px;
|
|
bottom: 10px;
|
|
}
|
|
.scroll-btn {
|
|
width: 35px;
|
|
height: 35px;
|
|
font-size: 16px;
|
|
}
|
|
.refresh-btn {
|
|
top: 10px;
|
|
right: 10px;
|
|
padding: 8px 16px;
|
|
font-size: 12px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.container {
|
|
padding: 15px;
|
|
}
|
|
h1 {
|
|
font-size: 20px;
|
|
}
|
|
.key-list {
|
|
padding: 15px;
|
|
}
|
|
.status-badge {
|
|
padding: 3px 8px;
|
|
font-size: 0.8em;
|
|
}
|
|
.fail-count {
|
|
font-size: 0.8em;
|
|
}
|
|
.total {
|
|
font-size: 1em;
|
|
padding: 12px 20px;
|
|
}
|
|
}
|