Compare commits
2 Commits
6b33913471
...
99faf7d058
@@ -1,8 +1,11 @@
|
||||
import type { Metadata } from "next";
|
||||
import { Inter } from "next/font/google";
|
||||
import { Roboto } from "next/font/google";
|
||||
import "./globals.css";
|
||||
|
||||
const inter = Inter({ subsets: ["latin"] });
|
||||
const roboto = Roboto({
|
||||
subsets: ["latin"],
|
||||
weight: ["300", "400", "500", "700"]
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "PromptArch - AI Prompt Engineering Platform",
|
||||
@@ -17,7 +20,7 @@ export default function RootLayout({
|
||||
}>) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body className={inter.className}>{children}</body>
|
||||
<body className={roboto.className}>{children}</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -34,9 +34,13 @@ export default function Sidebar({ currentView, onViewChange }: SidebarProps) {
|
||||
const SidebarContent = () => (
|
||||
<>
|
||||
<div className="border-b p-4 lg:p-6">
|
||||
<a href="https://www.rommark.dev" className="mb-4 flex items-center gap-2 text-xs font-medium text-muted-foreground hover:text-primary transition-colors">
|
||||
<Menu className="h-3 w-3" />
|
||||
Back to rommark.dev
|
||||
</a>
|
||||
<a href="https://github.com/roman-ryzenadvanced/PromptArch-the-prompt-enhancer" target="_blank" rel="noopener noreferrer" className="block">
|
||||
<h1 className="flex items-center gap-2 text-lg lg:text-xl font-bold hover:opacity-80 transition-opacity">
|
||||
<div className="flex h-7 w-7 lg:h-8 lg:w-8 items-center justify-center rounded-lg bg-primary text-primary-foreground text-sm lg:text-base">
|
||||
<div className="flex h-7 w-7 lg:h-8 lg:w-8 items-center justify-center rounded-lg bg-[#4285F4] text-primary-foreground text-sm lg:text-base">
|
||||
PA
|
||||
</div>
|
||||
PromptArch
|
||||
|
||||
@@ -4,13 +4,19 @@ const DEFAULT_QWEN_ENDPOINT = "https://dashscope-intl.aliyuncs.com/compatible-mo
|
||||
const TOKEN_STORAGE_KEY = "promptarch-qwen-tokens";
|
||||
|
||||
function getOAuthBaseUrl(): string {
|
||||
const basePath = '/tools/promptarch';
|
||||
if (typeof window !== "undefined") {
|
||||
return `${window.location.origin}/api/qwen`;
|
||||
const origin = window.location.origin;
|
||||
return `${origin}${basePath}/api/qwen`;
|
||||
}
|
||||
if (process.env.NEXT_PUBLIC_SITE_URL) {
|
||||
return `${process.env.NEXT_PUBLIC_SITE_URL}/api/qwen`;
|
||||
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL.replace(/\/$/, "");
|
||||
if (siteUrl.endsWith(basePath)) {
|
||||
return `${siteUrl}/api/qwen`;
|
||||
}
|
||||
return "/api/qwen";
|
||||
return `${siteUrl}${basePath}/api/qwen`;
|
||||
}
|
||||
return `${basePath}/api/qwen`;
|
||||
}
|
||||
|
||||
export interface QwenOAuthConfig {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
reactStrictMode: true,
|
||||
basePath: '/tools/promptarch',
|
||||
trailingSlash: true,
|
||||
};
|
||||
|
||||
module.exports = nextConfig;
|
||||
|
||||
Reference in New Issue
Block a user