mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-25 10:04:40 +00:00
zen: update go page
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import "./index.css"
|
import "./index.css"
|
||||||
import { createAsync, query, redirect } from "@solidjs/router"
|
import { createAsync, query, redirect } from "@solidjs/router"
|
||||||
import { Title, Meta } from "@solidjs/meta"
|
import { Title, Meta } from "@solidjs/meta"
|
||||||
import { For, createSignal, onCleanup, onMount } from "solid-js"
|
import { For, createMemo, 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"
|
||||||
@@ -19,8 +19,7 @@ import { LocaleLinks } from "~/component/locale-links"
|
|||||||
|
|
||||||
const checkLoggedIn = query(async () => {
|
const checkLoggedIn = query(async () => {
|
||||||
"use server"
|
"use server"
|
||||||
const workspaceID = await getLastSeenWorkspaceID().catch(() => {})
|
return await getLastSeenWorkspaceID().catch(() => undefined)
|
||||||
if (workspaceID) throw redirect(`/workspace/${workspaceID}`)
|
|
||||||
}, "checkLoggedIn.get")
|
}, "checkLoggedIn.get")
|
||||||
|
|
||||||
function LimitsGraph(props: { href: string }) {
|
function LimitsGraph(props: { href: string }) {
|
||||||
@@ -205,7 +204,8 @@ function LimitsGraph(props: { href: string }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
const loggedin = createAsync(() => checkLoggedIn())
|
const workspaceID = createAsync(() => checkLoggedIn())
|
||||||
|
const subscribeUrl = createMemo(() => (workspaceID() ? `/workspace/${workspaceID()}/billing` : "/auth"))
|
||||||
const i18n = useI18n()
|
const i18n = useI18n()
|
||||||
const language = useLanguage()
|
const language = useLanguage()
|
||||||
return (
|
return (
|
||||||
@@ -223,7 +223,7 @@ 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={loggedin() ? "true" : "false"} />
|
<Meta name="opencode:auth" content={workspaceID() ? "true" : "false"} />
|
||||||
|
|
||||||
<div data-component="container">
|
<div data-component="container">
|
||||||
<Header go hideGetStarted />
|
<Header go hideGetStarted />
|
||||||
@@ -310,7 +310,7 @@ export default function Home() {
|
|||||||
</div>
|
</div>
|
||||||
*/}
|
*/}
|
||||||
</div>
|
</div>
|
||||||
<a href="/auth">
|
<a href={subscribeUrl()}>
|
||||||
<span>
|
<span>
|
||||||
<For
|
<For
|
||||||
each={i18n
|
each={i18n
|
||||||
@@ -420,7 +420,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="/auth">{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>
|
||||||
|
|||||||
Reference in New Issue
Block a user