@@ -20,9 +20,9 @@ export const readerRoute = {
|
||||
detectCodeStringLanguage: t.procedure
|
||||
.input<{ codeString: string }>()
|
||||
.action(async ({ input }) => {
|
||||
const { ModelOperations } = require("@vscode/vscode-languagedetection")
|
||||
const modulOperations = new ModelOperations()
|
||||
const result = await modulOperations.runModel(input.codeString)
|
||||
const { ModelOperations } = require("vscode-languagedetection")
|
||||
const modelOperations = new ModelOperations()
|
||||
const result = await modelOperations.runModel(input.codeString)
|
||||
return result
|
||||
}),
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import pkg from "@pkg"
|
||||
import { attachOpenInEditor } from "@renderer/lib/dev"
|
||||
import { getNewIssueUrl } from "@renderer/lib/issues"
|
||||
import { clearLocalPersistStoreData } from "@renderer/store/utils/clear"
|
||||
@@ -6,8 +5,8 @@ import { useEffect, useRef } from "react"
|
||||
import { isRouteErrorResponse, useRouteError } from "react-router-dom"
|
||||
import { toast } from "sonner"
|
||||
|
||||
import { Logo } from "../icons/logo"
|
||||
import { StyledButton } from "../ui/button"
|
||||
import { PoweredByFooter } from "./PoweredByFooter"
|
||||
|
||||
export function ErrorElement() {
|
||||
const error = useRouteError()
|
||||
@@ -85,20 +84,8 @@ export function ErrorElement() {
|
||||
|
||||
<FallbackIssue message={message} stack={stack} />
|
||||
<div className="grow" />
|
||||
<footer className="center mt-12 flex gap-2">
|
||||
Powered by
|
||||
{" "}
|
||||
<Logo className="size-5" />
|
||||
{" "}
|
||||
<a
|
||||
href={pkg.homepage}
|
||||
className="cursor-pointer font-bold text-theme-accent"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
{APP_NAME}
|
||||
</a>
|
||||
</footer>
|
||||
|
||||
<PoweredByFooter />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import pkg from "@pkg"
|
||||
import { isElectronBuild } from "@renderer/constants"
|
||||
import { captureException } from "@sentry/react"
|
||||
import { useEffect } from "react"
|
||||
@@ -7,6 +6,7 @@ import { useLocation, useNavigate } from "react-router-dom"
|
||||
|
||||
import { Logo } from "../icons/logo"
|
||||
import { StyledButton } from "../ui/button"
|
||||
import { PoweredByFooter } from "./PoweredByFooter"
|
||||
|
||||
class AccessNotFoundError extends Error {
|
||||
constructor(
|
||||
@@ -59,20 +59,7 @@ export const NotFound = () => {
|
||||
</p>
|
||||
</main>
|
||||
|
||||
<footer className="center -mt-12 flex gap-2 py-8">
|
||||
Powered by
|
||||
{" "}
|
||||
<Logo className="size-5" />
|
||||
{" "}
|
||||
<a
|
||||
href={pkg.homepage}
|
||||
className="cursor-pointer font-bold text-theme-accent no-underline"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
{APP_NAME}
|
||||
</a>
|
||||
</footer>
|
||||
<PoweredByFooter className="center -mt-12 flex gap-2 py-8" />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
import pkg from "@pkg"
|
||||
import { cn } from "@renderer/lib/utils"
|
||||
|
||||
import { Logo } from "../icons/logo"
|
||||
|
||||
export const PoweredByFooter: Component = ({ className }) => (
|
||||
<footer className={cn("center mt-12 flex gap-2", className)}>
|
||||
Powered by
|
||||
{" "}
|
||||
<Logo className="size-5" />
|
||||
{" "}
|
||||
<a
|
||||
href={pkg.homepage}
|
||||
className="cursor-pointer font-bold text-theme-accent"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
{APP_NAME}
|
||||
</a>
|
||||
</footer>
|
||||
)
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Logo } from "@renderer/components/icons/logo"
|
||||
import { PoweredByFooter } from "@renderer/components/common/PoweredByFooter"
|
||||
import { StyledButton } from "@renderer/components/ui/button"
|
||||
import { UserAvatar } from "@renderer/components/user-button"
|
||||
import { apiClient } from "@renderer/lib/api-fetch"
|
||||
@@ -28,23 +28,18 @@ export function Component() {
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="flex h-screen w-full flex-col items-center justify-center gap-10 px-4">
|
||||
<Logo className="size-20" />
|
||||
<UserAvatar className="bg-stone-100 px-10 py-4 text-2xl" />
|
||||
<h1 className="text-center text-3xl font-bold">
|
||||
Successfully connected to
|
||||
{" "}
|
||||
{APP_NAME}
|
||||
{" "}
|
||||
Account
|
||||
</h1>
|
||||
<div className="flex h-screen w-full flex-col items-center justify-center gap-10 px-4 pb-12 pt-[30vh]">
|
||||
<UserAvatar className="gap-8 px-10 py-4 text-2xl" />
|
||||
<h2 className="text-center">
|
||||
You have successfully connected to
|
||||
{" "}
|
||||
{APP_NAME}
|
||||
{" "}
|
||||
Account. Now is the time
|
||||
to open
|
||||
Account.
|
||||
{" "}
|
||||
<br />
|
||||
<br />
|
||||
Now is the time to open
|
||||
{" "}
|
||||
{APP_NAME}
|
||||
{" "}
|
||||
@@ -60,7 +55,7 @@ export function Component() {
|
||||
</StyledButton>
|
||||
|
||||
<StyledButton
|
||||
className="h-14 !rounded-full px-10 text-lg"
|
||||
className="h-14 !rounded-full px-5 text-lg"
|
||||
onClick={async () => window.open(await getCallbackUrl(), "_top")}
|
||||
>
|
||||
Open
|
||||
@@ -68,6 +63,8 @@ export function Component() {
|
||||
{APP_NAME}
|
||||
</StyledButton>
|
||||
</div>
|
||||
<div className="grow" />
|
||||
<PoweredByFooter />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user