fix(console): route go links to console
This commit is contained in:
parent
78c139b8b5
commit
d7ee68a41d
1 changed files with 4 additions and 14 deletions
|
|
@ -1,7 +1,6 @@
|
||||||
import "./index.css"
|
import "./index.css"
|
||||||
import { createAsync, query } from "@solidjs/router"
|
|
||||||
import { Title, Meta } from "@solidjs/meta"
|
import { Title, Meta } from "@solidjs/meta"
|
||||||
import { For, createMemo, createSignal, onCleanup, onMount } from "solid-js"
|
import { For, createSignal, onCleanup, onMount } from "solid-js"
|
||||||
//import { HttpHeader } from "@solidjs/start"
|
//import { HttpHeader } from "@solidjs/start"
|
||||||
import goLogoLight from "../../asset/go-ornate-light.svg"
|
import goLogoLight from "../../asset/go-ornate-light.svg"
|
||||||
import goLogoDark from "../../asset/go-ornate-dark.svg"
|
import goLogoDark from "../../asset/go-ornate-dark.svg"
|
||||||
|
|
@ -11,17 +10,11 @@ import { Legal } from "~/component/legal"
|
||||||
import { Footer } from "~/component/footer"
|
import { Footer } from "~/component/footer"
|
||||||
import { Header } from "~/component/header"
|
import { Header } from "~/component/header"
|
||||||
import { config } from "~/config"
|
import { config } from "~/config"
|
||||||
import { getLastSeenWorkspaceID } from "../workspace/common"
|
|
||||||
import { IconMiniMax, IconMiMo, IconZai, IconAlibaba, IconDeepSeek } from "~/component/icon"
|
import { IconMiniMax, IconMiMo, IconZai, IconAlibaba, IconDeepSeek } from "~/component/icon"
|
||||||
import { useI18n } from "~/context/i18n"
|
import { useI18n } from "~/context/i18n"
|
||||||
import { useLanguage } from "~/context/language"
|
import { useLanguage } from "~/context/language"
|
||||||
import { LocaleLinks } from "~/component/locale-links"
|
import { LocaleLinks } from "~/component/locale-links"
|
||||||
|
|
||||||
const checkLoggedIn = query(async () => {
|
|
||||||
"use server"
|
|
||||||
return await getLastSeenWorkspaceID().catch(() => undefined)
|
|
||||||
}, "checkLoggedIn.get")
|
|
||||||
|
|
||||||
const models = [
|
const models = [
|
||||||
"Grok 4.5",
|
"Grok 4.5",
|
||||||
"GLM-5.2",
|
"GLM-5.2",
|
||||||
|
|
@ -188,8 +181,7 @@ function LimitsGraph(props: { href: string }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
const workspaceID = createAsync(() => checkLoggedIn())
|
const subscribeUrl = "/console/go"
|
||||||
const subscribeUrl = createMemo(() => (workspaceID() ? `/workspace/${workspaceID()}/go` : "/auth"))
|
|
||||||
const i18n = useI18n()
|
const i18n = useI18n()
|
||||||
const language = useLanguage()
|
const language = useLanguage()
|
||||||
return (
|
return (
|
||||||
|
|
@ -207,8 +199,6 @@ export default function Home() {
|
||||||
<Meta name="twitter:title" content={i18n.t("go.title")} />
|
<Meta name="twitter:title" content={i18n.t("go.title")} />
|
||||||
<Meta name="twitter:description" content={i18n.t("go.meta.description")} />
|
<Meta name="twitter:description" content={i18n.t("go.meta.description")} />
|
||||||
<Meta name="twitter:image" content="/social-share-black.png" />
|
<Meta name="twitter:image" content="/social-share-black.png" />
|
||||||
<Meta name="opencode:auth" content={workspaceID() ? "true" : "false"} />
|
|
||||||
|
|
||||||
<div data-component="container">
|
<div data-component="container">
|
||||||
<Header go hideGetStarted />
|
<Header go hideGetStarted />
|
||||||
|
|
||||||
|
|
@ -309,7 +299,7 @@ export default function Home() {
|
||||||
</div>
|
</div>
|
||||||
*/}
|
*/}
|
||||||
</div>
|
</div>
|
||||||
<a href={subscribeUrl()}>
|
<a href={subscribeUrl}>
|
||||||
<span>
|
<span>
|
||||||
<For
|
<For
|
||||||
each={i18n
|
each={i18n
|
||||||
|
|
@ -429,7 +419,7 @@ export default function Home() {
|
||||||
{i18n.t("go.faq.a4.p1.beforePricing")}{" "}
|
{i18n.t("go.faq.a4.p1.beforePricing")}{" "}
|
||||||
<a href={language.route("/docs/go/#pricing")}>{i18n.t("go.faq.a4.p1.pricingLink")}</a>{" "}
|
<a href={language.route("/docs/go/#pricing")}>{i18n.t("go.faq.a4.p1.pricingLink")}</a>{" "}
|
||||||
{i18n.t("go.faq.a4.p1.afterPricing")} {i18n.t("go.faq.a4.p2.beforeAccount")}{" "}
|
{i18n.t("go.faq.a4.p1.afterPricing")} {i18n.t("go.faq.a4.p2.beforeAccount")}{" "}
|
||||||
<a href={subscribeUrl()}>{i18n.t("go.faq.a4.p2.accountLink")}</a>. {i18n.t("go.faq.a4.p3")}
|
<a href={subscribeUrl}>{i18n.t("go.faq.a4.p2.accountLink")}</a>. {i18n.t("go.faq.a4.p3")}
|
||||||
</Faq>
|
</Faq>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue