feat(portal): mount PuroLocaleSwitcher in Landing/Docs/AuthLayout

This commit is contained in:
mini
2026-04-20 21:36:41 +08:00
parent e711a20373
commit 6328881801
3 changed files with 21 additions and 9 deletions

View File

@@ -2,6 +2,10 @@
<div class="auth-shell" :class="{ 'auth-shell-split': hasNarrative }">
<div class="bg-glow soft"></div>
<div v-if="hasNarrative" class="auth-locale-corner">
<PuroLocaleSwitcher />
</div>
<!-- LEFT: Narrative (split mode only, hidden on mobile) -->
<aside v-if="hasNarrative" class="auth-narrative">
<slot name="narrative"></slot>
@@ -42,6 +46,7 @@
import { computed, onMounted, useSlots } from 'vue'
import { useAppStore } from '@/stores'
import { sanitizeUrl } from '@/utils/url'
import PuroLocaleSwitcher from '@/components/puro/PuroLocaleSwitcher.vue'
const appStore = useAppStore()
@@ -78,6 +83,12 @@ onMounted(() => {
font-family: var(--font-sans);
min-height: 100vh;
}
.auth-shell-split .auth-locale-corner {
position: absolute;
top: 24px;
right: 24px;
z-index: 20;
}
@media (max-width: 900px) {
.auth-shell-split {
grid-template-columns: 1fr;

View File

@@ -11,13 +11,14 @@
<span>PURO AI</span>
</router-link>
<div class="nav-links">
<router-link to="/">首页</router-link>
<a href="#codex">Codex</a>
<a href="#claude-code">Claude Code</a>
<a href="#curl">curl</a>
<router-link to="/">产品</router-link>
<router-link to="/pricing">定价</router-link>
<router-link to="/docs" class="active">文档</router-link>
</div>
<div class="nav-cta">
<router-link to="/login" class="btn btn-primary">登录 </router-link>
<PuroLocaleSwitcher />
<router-link to="/login" class="btn btn-ghost">登录</router-link>
<router-link to="/register" class="btn btn-primary">注册</router-link>
</div>
</div>
</nav>
@@ -251,8 +252,8 @@ requires_openai_auth = <span class="kw">true</span></code></pre>
</template>
<script setup lang="ts">
// DocsView — public quickstart documentation
// Route: /docs (no auth required)
import PuroLocaleSwitcher from '@/components/puro/PuroLocaleSwitcher.vue'
async function copyCode(ev: MouseEvent) {
const button = ev.currentTarget as HTMLButtonElement
const panel = button.closest('.code-panel')

View File

@@ -17,6 +17,7 @@
<a href="/docs">文档</a>
</div>
<div class="nav-cta">
<PuroLocaleSwitcher />
<router-link to="/login" class="btn btn-ghost">登录</router-link>
<router-link to="/register" class="btn btn-primary">免费试用 </router-link>
</div>
@@ -329,8 +330,7 @@ requires_openai_auth = <span class="kw">true</span></code></pre>
</template>
<script setup lang="ts">
// LandingView — public marketing landing page for PURO AI
// Rendered at `/` when user is unauthenticated (see router/index.ts)
import PuroLocaleSwitcher from '@/components/puro/PuroLocaleSwitcher.vue'
</script>
<style scoped>