fix portable config and qqbot packaging

This commit is contained in:
hfshfg
2026-04-30 19:47:57 +08:00
parent a42a1269a4
commit b57aeb068c
6 changed files with 236 additions and 22 deletions

View File

@@ -48,16 +48,51 @@ h1 .lobster { color: #ff6b35; }
.buy-link:hover { text-decoration: underline; }
/* Forms */
.form-group { margin-bottom: 16px; }
label { display: block; color: #ccc; margin-bottom: 6px; font-size: 0.9em; }
input[type="text"], input[type="password"] {
width: 100%; padding: 11px 14px; background: #222; border: 1px solid #444; border-radius: 8px;
color: #fff; font-size: 0.95em; outline: none; transition: border-color 0.2s;
.form-group { display: block; margin-bottom: 16px; clear: both; }
.form-group label {
display: block;
width: auto;
float: none;
color: #ccc;
margin-bottom: 8px;
font-size: 0.9em;
}
.form-group input,
input[type="text"],
input[type="password"] {
display: block;
width: 100%;
min-width: 0;
min-height: 46px;
padding: 11px 14px;
background: #222;
border: 1px solid #444;
border-radius: 8px;
color: #fff;
font-size: 0.95em;
line-height: 1.3;
outline: none;
transition: border-color 0.2s;
}
input:focus { border-color: #ff6b35; }
.input-wrap { position: relative; }
.input-wrap input { padding-right: 44px; }
.toggle-pw { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #888; cursor: pointer; font-size: 0.85em; }
.input-wrap { position: relative; display: block; width: 100%; min-width: 0; }
.input-wrap input { padding-right: 64px; }
.toggle-pw {
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
min-width: 38px;
height: 30px;
background: #2d2d2d;
border: 1px solid #444;
border-radius: 6px;
color: #ccc;
cursor: pointer;
font-size: 0.82em;
line-height: 28px;
text-align: center;
}
.toggle-pw:hover { color: #ccc; }
.hint { color: #888; font-size: 0.8em; margin-top: 6px; line-height: 1.5; }
.hint a { color: #ff6b35; text-decoration: none; }
@@ -359,10 +394,10 @@ let selectedBase = '';
let selectedModel = '';
// --- Model cards ---
document.querySelectorAll('.model-card').forEach(card => {
document.querySelectorAll('#step1 .model-card').forEach(card => {
card.addEventListener('click', (e) => {
if (e.target.closest('.buy-link')) return; // don't select when clicking buy link
document.querySelectorAll('.model-card').forEach(c => c.classList.remove('selected'));
document.querySelectorAll('#step1 .model-card').forEach(c => c.classList.remove('selected'));
card.classList.add('selected');
selectedProvider = card.dataset.provider;
selectedBase = card.dataset.base;
@@ -375,7 +410,7 @@ document.getElementById('nextStep1').addEventListener('click', () => goStep(2));
// --- Steps ---
function goStep(n) {
document.querySelectorAll('.section').forEach(s => s.classList.remove('active'));
document.querySelectorAll('.section:not(.skills-section)').forEach(s => s.classList.remove('active'));
document.getElementById('step' + n).classList.add('active');
// Keep skills section visible
document.querySelectorAll('.steps .step').forEach((s, i) => {
@@ -393,7 +428,7 @@ function setupStep2() {
const providerNames = {
minimax: 'MiniMax', kimi: 'Kimi (月之暗面)', deepseek: 'DeepSeek',
zhipu: '智谱 GLM', qwen: '通义千问', doubao: '豆包',
zai: '智谱 GLM', qwen: '通义千问', doubao: '豆包',
openai: 'OpenAI', anthropic: 'Anthropic Claude', groq: 'Groq',
siliconflow: '硅基流动', custom: '自定义'
};
@@ -401,7 +436,7 @@ function setupStep2() {
document.getElementById('step2desc').textContent = `请填写 ${name} 的 API Key`;
// Buy links
const card = document.querySelector(`.model-card[data-provider="${selectedProvider}"]`);
const card = document.querySelector(`#step1 .model-card[data-provider="${selectedProvider}"]`);
const buyLink = card ? card.querySelector('.buy-link') : null;
const linksDiv = document.getElementById('providerLinks');
linksDiv.innerHTML = '';