feat(website): drop hash-based router
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { siChromewebstore, siGithub } from 'simple-icons'
|
||||
|
||||
import CodeEditor from '@/components/CodeEditor'
|
||||
import { Heading } from '@/components/Heading'
|
||||
import { useLanguage } from '@/i18n/context'
|
||||
|
||||
export default function ChromeExtension() {
|
||||
@@ -22,7 +23,9 @@ export default function ChromeExtension() {
|
||||
<div className="space-y-8 mt-8">
|
||||
{/* Features */}
|
||||
<section>
|
||||
<h2 className="text-2xl font-bold mb-4">{isZh ? '核心特性' : 'Key Features'}</h2>
|
||||
<Heading id="key-features" level={2} className="text-2xl font-bold mb-4">
|
||||
{isZh ? '核心特性' : 'Key Features'}
|
||||
</Heading>
|
||||
<div className="grid md:grid-cols-3 gap-4">
|
||||
<div className="p-4 bg-gray-50 dark:bg-gray-800 rounded-lg">
|
||||
<h3 className="font-semibold mb-2">🔓 {isZh ? '多页任务' : 'Multi-Page Tasks'}</h3>
|
||||
@@ -57,7 +60,9 @@ export default function ChromeExtension() {
|
||||
|
||||
{/* Install */}
|
||||
<section>
|
||||
<h2 className="text-2xl font-bold mb-4">{isZh ? '获取扩展' : 'Get the Extension'}</h2>
|
||||
<Heading id="get-the-extension" level={2} className="text-2xl font-bold mb-4">
|
||||
{isZh ? '获取扩展' : 'Get the Extension'}
|
||||
</Heading>
|
||||
<div className="flex flex-wrap gap-3">
|
||||
<a
|
||||
href={chromeWebStoreUrl}
|
||||
@@ -86,9 +91,13 @@ export default function ChromeExtension() {
|
||||
|
||||
{/* Relationship with PageAgent.js */}
|
||||
<section>
|
||||
<h2 className="text-2xl font-bold mb-4">
|
||||
<Heading
|
||||
id="how-it-relates-to-page-agent-js"
|
||||
level={2}
|
||||
className="text-2xl font-bold mb-4"
|
||||
>
|
||||
{isZh ? '与 PageAgent.js 的关系' : 'How It Relates to PageAgent.js'}
|
||||
</h2>
|
||||
</Heading>
|
||||
<div className="p-5 bg-gray-50 dark:bg-gray-800 rounded-lg space-y-3 text-gray-600 dark:text-gray-300">
|
||||
<p>
|
||||
{isZh
|
||||
@@ -105,9 +114,9 @@ export default function ChromeExtension() {
|
||||
|
||||
{/* Third-party Integration */}
|
||||
<section>
|
||||
<h2 className="text-2xl font-bold mb-4">
|
||||
<Heading id="third-party-integration" level={2} className="text-2xl font-bold mb-4">
|
||||
{isZh ? '第三方接入' : 'Third-Party Integration'}
|
||||
</h2>
|
||||
</Heading>
|
||||
<p className="text-gray-600 dark:text-gray-300 mb-4">
|
||||
{isZh
|
||||
? '通过页面 JavaScript 调用 `window.PAGE_AGENT_EXT`,你的应用可以发起跨页面任务并控制浏览器行为。'
|
||||
@@ -145,7 +154,9 @@ localStorage.setItem('PageAgentExtUserAuthToken', '<your-token-from-extension>')
|
||||
|
||||
{/* API Reference */}
|
||||
<section>
|
||||
<h2 className="text-2xl font-bold mb-4">{isZh ? 'API 参考' : 'API Reference'}</h2>
|
||||
<Heading id="api-reference" level={2} className="text-2xl font-bold mb-4">
|
||||
{isZh ? 'API 参考' : 'API Reference'}
|
||||
</Heading>
|
||||
|
||||
{/* AI Assistant Instructions */}
|
||||
<section className="p-4 bg-purple-50 dark:bg-purple-900/20 rounded-lg">
|
||||
@@ -170,9 +181,9 @@ localStorage.setItem('PageAgentExtUserAuthToken', '<your-token-from-extension>')
|
||||
</section>
|
||||
|
||||
{/* TypeScript Declaration */}
|
||||
<h2 className="text-2xl font-bold mb-4">
|
||||
<Heading id="typescript-declaration" level={2} className="text-2xl font-bold mb-4">
|
||||
{isZh ? 'TypeScript 类型声明' : 'TypeScript Declaration'}
|
||||
</h2>
|
||||
</Heading>
|
||||
<p className="text-gray-600 dark:text-gray-300 mb-4">
|
||||
{isZh
|
||||
? '推荐把 `execute` 的类型声明加入你的项目,获得完整类型提示。'
|
||||
@@ -304,11 +315,15 @@ window.PAGE_AGENT_EXT.stop()`
|
||||
|
||||
{/* Integration Guide */}
|
||||
<section>
|
||||
<h2 className="text-2xl font-bold mb-4">
|
||||
<Heading
|
||||
id="integrate-multipageagent-into-your-extension"
|
||||
level={2}
|
||||
className="text-2xl font-bold mb-4"
|
||||
>
|
||||
{isZh
|
||||
? '将 MultiPageAgent 集成你自己的插件'
|
||||
: 'Integrate MultiPageAgent into Your Extension'}
|
||||
</h2>
|
||||
</Heading>
|
||||
<p>@TODO</p>
|
||||
<p className="text-gray-600 dark:text-gray-300 mb-4">
|
||||
{isZh
|
||||
|
||||
Reference in New Issue
Block a user