app / web_site /qa.html
AZILS's picture
Upload 323 files
a21c316 verified
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title data-i18n="pageTitle">常见问题 - Antigravity Tools</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/lucide@latest"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');
body {
font-family: 'Inter', sans-serif;
background-color: #0a0a0a;
color: #d1d1d1;
}
.glass {
background: rgba(18, 18, 18, 0.7);
backdrop-filter: blur(12px);
border: 1px solid rgba(16, 185, 129, 0.1);
}
.emerald-gradient {
background: linear-gradient(135deg, #10b981 0%, #059669 100%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
}
.faq-item {
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-item:hover {
border-color: rgba(16, 185, 129, 0.4);
background: rgba(16, 185, 129, 0.05);
}
.faq-answer {
max-height: 0;
overflow: hidden;
transition: max-height 0.3s ease-out;
}
.faq-item.active .faq-answer {
max-height: 800px;
margin-top: 1rem;
}
.faq-item.active .chevron {
transform: rotate(180deg);
}
.search-bar:focus-within {
border-color: #10b981;
box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
}
</style>
</head>
<body class="pb-20">
<!-- 导航栏 -->
<nav
class="sticky top-0 w-full z-50 glass border-b border-emerald-900/30 px-6 py-4 flex justify-between items-center">
<div class="flex items-center space-x-3 cursor-pointer" onclick="location.href='index.html'">
<img src="logo.png" alt="Logo" class="w-8 h-8 rounded-lg shadow-lg shadow-emerald-500/20">
<span class="text-xl font-bold emerald-gradient uppercase tracking-wider">Antigravity</span>
</div>
<div class="flex items-center space-x-4 md:space-x-8">
<div class="hidden md:flex space-x-8 text-sm font-medium">
<a href="index.html" class="hover:text-emerald-400 transition-colors" data-i18n="navHome">首页</a>
<a href="#" class="text-emerald-400 transition-colors font-bold" data-i18n="navFaq">常见问题</a>
</div>
<!-- 语言切换器 -->
<button id="lang-toggle" onclick="toggleLanguage()"
class="glass px-3 py-1 rounded-lg text-xs font-bold border border-emerald-500/30 hover:bg-emerald-500/10 transition-all uppercase">
EN
</button>
</div>
</nav>
<!-- 页头 -->
<header class="py-20 px-6 text-center max-w-4xl mx-auto">
<h1 class="text-4xl md:text-5xl font-bold mb-6 text-white uppercase tracking-tight">
<span data-i18n="headerTitlePre">QA 专题页</span> / <span class="emerald-gradient"
data-i18n="headerTitlePost">常见问题</span>
</h1>
<p class="text-gray-500 text-lg mb-10" data-i18n="headerSub">在这里查找您在使用过程中遇到的各类问题及解决方案。</p>
<!-- 搜索框 -->
<div
class="search-bar max-w-2xl mx-auto flex items-center glass rounded-2xl p-2 border border-emerald-900/30 transition-all">
<i data-lucide="search" class="w-5 h-5 ml-4 text-emerald-500/50"></i>
<input type="text" id="faq-search" placeholder="搜索问题关键字..." data-i18n-placeholder="searchPlaceholder"
class="bg-transparent border-none focus:ring-0 text-white w-full px-4 py-3 placeholder-gray-600 outline-none">
</div>
</header>
<!-- 问题列表容器 -->
<main class="max-w-4xl mx-auto px-6">
<div class="space-y-4" id="faq-container">
<!-- 动态渲染内容 -->
</div>
<!-- 空状态展示 -->
<div id="no-results" class="hidden py-20 text-center text-gray-600">
<i data-lucide="circle-dashed" class="w-12 h-12 mx-auto mb-4 opacity-20"></i>
<p data-i18n="noResults">未找到相关问题,请尝试更换关键词。</p>
</div>
</main>
<footer class="mt-20 py-12 border-t border-emerald-900/30 px-6 text-center">
<p class="text-gray-600 text-sm">
<span data-i18n="footerHelp">需要更多帮助?</span>
<a href="https://github.com/lbjlaq/Antigravity-Manager/issues" class="text-emerald-500 hover:underline ml-1"
data-i18n="footerIssue">前往 GitHub 提交 Issue</a>
</p>
</footer>
<script>
const translations = {
zh: {
pageTitle: "常见问题 - Antigravity Tools",
navHome: "首页",
navFaq: "常见问题",
headerTitlePre: "QA 专题页",
headerTitlePost: "常见问题",
headerSub: "在这里查找您在使用过程中遇到的各类问题及解决方案。",
searchPlaceholder: "搜索问题关键字...",
noResults: "未找到相关问题,请尝试更换关键词。",
footerHelp: "需要更多帮助?",
footerIssue: "前往 GitHub 提交 Issue",
toggleLabel: "EN"
},
en: {
pageTitle: "FAQ - Antigravity Tools",
navHome: "Home",
navFaq: "FAQ",
headerTitlePre: "QA Portal",
headerTitlePost: "FAQ",
headerSub: "Find answers and solutions to common questions here.",
searchPlaceholder: "Search for keywords...",
noResults: "No results found. Try different keywords.",
footerHelp: "Need more help?",
footerIssue: "Open an Issue on GitHub",
toggleLabel: "中文"
}
};
const faqData = [
{
id: 1,
title: {
zh: "macOS 提示“应用已损坏,无法打开”?",
en: "macOS says 'The app is damaged and can't be opened'?"
},
answer: {
zh: `
<p class="mb-4">由于 macOS 的安全机制,非 App Store 下载的应用可能会触发此提示。您可以执行以下命令快速修复:</p>
<code class="block bg-black/50 p-3 rounded-lg border border-emerald-900/30 text-emerald-400 font-mono mb-4 text-xs">
sudo xattr -rd com.apple.quarantine "/Applications/Antigravity Tools.app"
</code>
<p>如果您使用 Homebrew 安装,建议添加 <code class="text-emerald-500">--no-quarantine</code> 参数。</p>
`,
en: `
<p class="mb-4">Due to macOS security mechanisms, apps not from the App Store may trigger this. Fix it with this command:</p>
<code class="block bg-black/50 p-3 rounded-lg border border-emerald-900/30 text-emerald-400 font-mono mb-4 text-xs">
sudo xattr -rd com.apple.quarantine "/Applications/Antigravity Tools.app"
</code>
<p>If using Homebrew, try adding the <code class="text-emerald-500">--no-quarantine</code> flag.</p>
`
}
},
{
id: 2,
title: {
zh: "遇到 HTTP 403 Forbidden 错误怎么办?",
en: "What to do with HTTP 403 Forbidden errors?"
},
answer: {
zh: `
<p class="mb-4">403 错误通常分以下几种情况:</p>
<div class="space-y-4">
<div class="bg-black/30 p-4 rounded-xl border border-emerald-900/20">
<h4 class="text-emerald-400 font-bold mb-1 text-sm">情况 A: VALIDATION_REQUIRED (身份验证)</h4>
<p class="text-xs mb-2">表现:能登录应用但无法发消息,收到包含验证链接的提示。</p>
<p class="text-xs font-bold text-gray-300">解决方法:点击链接并在浏览器配合手机验证码完成验证即可。</p>
</div>
<div class="bg-black/30 p-4 rounded-xl border border-emerald-900/20">
<h4 class="text-emerald-400 font-bold mb-1 text-sm">情况 B: 临时风控 / Unexpected Issue</h4>
<p class="text-xs mb-2">表现:登录时提示 "There was an unexpected issue..."。</p>
<p class="text-xs font-bold text-gray-300 italic">经验建议:静置账号 1-2 周,谷歌系统通常会周期性评估并自动恢复权限。</p>
</div>
<div class="bg-black/30 p-4 rounded-xl border border-red-900/20">
<h4 class="text-red-400 font-bold mb-1 text-sm">情况 C: Violation of Terms of Service (封禁)</h4>
<p class="text-xs font-bold text-gray-300 italic">建议:邮件申述或更换账号。</p>
</div>
</div>
`,
en: `
<p class="mb-4">403 errors usually fall into these categories:</p>
<div class="space-y-4">
<div class="bg-black/30 p-4 rounded-xl border border-emerald-900/20">
<h4 class="text-emerald-400 font-bold mb-1 text-sm">Case A: VALIDATION_REQUIRED</h4>
<p class="text-xs mb-2">Symptom: Can log in but fail to send messages, receiving a link.</p>
<p class="text-xs font-bold text-gray-300">Fix: Click the link and complete mobile verification in browser.</p>
</div>
<div class="bg-black/30 p-4 rounded-xl border border-emerald-900/20">
<h4 class="text-emerald-400 font-bold mb-1 text-sm">Case B: Account Risk / Unexpected Issue</h4>
<p class="text-xs mb-2">Symptom: Login prompt "There was an unexpected issue..."</p>
<p class="text-xs font-bold text-gray-300 italic">Advice: Wait 1-2 weeks. Google systems often restore access periodically.</p>
</div>
<div class="bg-black/30 p-4 rounded-xl border border-red-900/20">
<h4 class="text-red-400 font-bold mb-1 text-sm">Case C: Violation of Terms (Banned)</h4>
<p class="text-xs font-bold text-gray-300 italic">Advice: Email appeal or switch account.</p>
</div>
</div>
`
}
},
{
id: 3,
title: {
zh: "提示 “FAILED_PRECONDITION” 或 400 错误?",
en: "Getting 'FAILED_PRECONDITION' or 400 error?"
},
answer: {
zh: `
<p class="mb-2">当显示 <strong>"Agent terminated due to error"</strong> 且返回 400 预检查失败时,通常是因为 IP 被风控。</p>
<p class="emerald-gradient font-bold text-sm">解决方法:切换一个干净的出口 IP 即可恢复。</p>
`,
en: `
<p class="mb-2">If you see <strong>"Agent terminated due to error"</strong> with a 400 check failure, it's usually an IP risk issue.</p>
<p class="emerald-gradient font-bold text-sm">Fix: Switch to a cleaner proxy/IP to restore service.</p>
`
}
},
{
id: 4,
title: {
zh: "为什么提示 “Resource projects/... not found” (404)?",
en: "Why 'Resource projects/... not found' (404)?"
},
answer: {
zh: `
<p class="mb-4">未找到有效项目。请尝试:</p>
<ul class="list-disc pl-5 space-y-2 text-xs">
<li>在应用中“删除账户”并“重新添加”以重置会话。</li>
<li>手动配置有效的 Google Cloud Project ID。</li>
</ul>
`,
en: `
<p class="mb-4">Valid project not found. Try:</p>
<ul class="list-disc pl-5 space-y-2 text-xs">
<li>Remove and re-add the account in the app.</li>
<li>Manually configure a valid Google Cloud Project ID.</li>
</ul>
`
}
},
{
id: 5,
title: {
zh: "如何接入 Claude Code CLI?",
en: "How to connect Claude Code CLI?"
},
answer: {
zh: `
<p class="mb-4">在开启代理后,在终端执行:</p>
<code class="block bg-black/50 p-3 rounded-lg border border-emerald-900/30 text-emerald-400 font-mono text-xs mb-4">
export ANTHROPIC_API_KEY="sk-antigravity"<br>
export ANTHROPIC_BASE_URL="http://127.0.0.1:8045"<br>
claude
</code>
`,
en: `
<p class="mb-4">Enable proxy, then run in terminal:</p>
<code class="block bg-black/50 p-3 rounded-lg border border-emerald-900/30 text-emerald-400 font-mono text-xs mb-4">
export ANTHROPIC_API_KEY="sk-antigravity"<br>
export ANTHROPIC_BASE_URL="http://127.0.0.1:8045"<br>
claude
</code>
`
}
},
{
id: 6,
title: {
zh: "提示 “Invalid project resource name projects/” 错误?",
en: "Getting 'Invalid project resource name projects/' error?"
},
answer: {
zh: `
<p class="mb-4">这通常是因为 Google 对于通过第三方工具登录的账号加强了风控,缺少官方客户端登录后的初始化操作,导致服务端的项目绑定关系缺失。</p>
<div class="space-y-4">
<div class="bg-black/30 p-4 rounded-xl border border-emerald-900/20">
<h4 class="text-emerald-400 font-bold mb-2 text-sm">方案一(最简单):</h4>
<p class="text-xs">重新通过 antigravity 应用登录获取授权即可恢复。</p>
</div>
<div class="bg-black/30 p-4 rounded-xl border border-emerald-900/20">
<h4 class="text-emerald-400 font-bold mb-2 text-sm">方案二:</h4>
<ol class="list-decimal pl-5 space-y-2 text-xs">
<li>使用官方客户端手动登录一次该账号,触发服务端的初始化和项目绑定。</li>
<li>登录成功后即可退出,之后再切回本工具使用旧的 Refresh Token 即可恢复正常。</li>
</ol>
</div>
</div>
`,
en: `
<p class="mb-4">This usually occurs because Google has strengthened risk control for accounts logged in via third-party tools, skipping necessary initialization. This results in missing project bindings on the server side.</p>
<div class="space-y-4">
<div class="bg-black/30 p-4 rounded-xl border border-emerald-900/20">
<h4 class="text-emerald-400 font-bold mb-2 text-sm">Option 1 (Easiest):</h4>
<p class="text-xs">Simply re-login via the antigravity app to refresh your authorization.</p>
</div>
<div class="bg-black/30 p-4 rounded-xl border border-emerald-900/20">
<h4 class="text-emerald-400 font-bold mb-2 text-sm">Option 2:</h4>
<ol class="list-decimal pl-5 space-y-2 text-xs">
<li>Manually log in to the account once using the official client to trigger server-side initialization and project binding.</li>
<li>After a successful login, you can log out and return to this tool. Using your existing Refresh Token should now work correctly.</li>
</ol>
</div>
</div>
`
}
}
];
let currentLang = 'zh';
function initLanguage() {
const browserLang = navigator.language.split('-')[0];
currentLang = (browserLang === 'zh') ? 'zh' : 'en';
updateUI();
}
function toggleLanguage() {
currentLang = (currentLang === 'zh') ? 'en' : 'zh';
updateUI();
}
function updateUI() {
// 更新静态文本
document.querySelectorAll('[data-i18n]').forEach(el => {
const key = el.getAttribute('data-i18n');
el.innerText = translations[currentLang][key];
});
document.querySelectorAll('[data-i18n-placeholder]').forEach(el => {
const key = el.getAttribute('data-i18n-placeholder');
el.placeholder = translations[currentLang][key];
});
document.getElementById('lang-toggle').innerText = translations[currentLang].toggleLabel;
renderFaqs();
lucide.createIcons();
}
function renderFaqs() {
const container = document.getElementById('faq-container');
const searchTerm = document.getElementById('faq-search').value.toLowerCase();
container.innerHTML = '';
let hasResults = false;
faqData.forEach(item => {
const title = item.title[currentLang];
const answer = item.answer[currentLang];
// 搜索过滤
if (title.toLowerCase().includes(searchTerm) || answer.toLowerCase().includes(searchTerm)) {
hasResults = true;
const el = document.createElement('div');
el.className = 'faq-item glass rounded-2xl p-6 border border-emerald-900/20 cursor-pointer';
el.onclick = () => toggleFaq(el);
el.innerHTML = `
<div class="flex justify-between items-center text-sm md:text-base">
<h3 class="font-bold text-white pr-4">${title}</h3>
<i data-lucide="chevron-down" class="chevron w-5 h-5 text-emerald-500 transition-transform"></i>
</div>
<div class="faq-answer text-gray-400 text-sm leading-relaxed border-t border-emerald-900/10 pt-4">
${answer}
</div>
`;
container.appendChild(el);
}
});
document.getElementById('no-results').classList.toggle('hidden', hasResults);
lucide.createIcons();
}
function toggleFaq(element) {
const isActive = element.classList.contains('active');
document.querySelectorAll('.faq-item').forEach(item => item.classList.remove('active'));
if (!isActive) element.classList.add('active');
}
document.getElementById('faq-search').addEventListener('input', renderFaqs);
// 初始化
initLanguage();
</script>
</body>
</html>