mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-08 20:25:19 +02:00
Added build version for cloud, local and Docker installs
This commit is contained in:
parent
2711563e8b
commit
83aa8ef689
2 changed files with 12 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ import { ArrowLeft, ChevronRight, X } from "lucide-react";
|
|||
import { AnimatePresence, motion } from "motion/react";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { APP_VERSION } from "@/lib/env-config";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
export interface SettingsNavItem {
|
||||
|
|
@ -148,6 +149,11 @@ export function UserSettingsSidebar({
|
|||
);
|
||||
})}
|
||||
</nav>
|
||||
|
||||
{/* Version display */}
|
||||
<div className="mt-auto border-t px-6 py-3">
|
||||
<p className="text-xs text-muted-foreground/50">v{APP_VERSION}</p>
|
||||
</div>
|
||||
</aside>
|
||||
</>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@
|
|||
* as it may prevent the sed replacement from working correctly.
|
||||
*/
|
||||
|
||||
import packageJson from "../package.json";
|
||||
|
||||
// Auth type: "LOCAL" for email/password, "GOOGLE" for OAuth
|
||||
// Placeholder: __NEXT_PUBLIC_FASTAPI_BACKEND_AUTH_TYPE__
|
||||
export const AUTH_TYPE = process.env.NEXT_PUBLIC_FASTAPI_BACKEND_AUTH_TYPE || "GOOGLE";
|
||||
|
|
@ -28,6 +30,10 @@ export const ETL_SERVICE = process.env.NEXT_PUBLIC_ETL_SERVICE || "DOCLING";
|
|||
// Placeholder: __NEXT_PUBLIC_DEPLOYMENT_MODE__
|
||||
export const DEPLOYMENT_MODE = process.env.NEXT_PUBLIC_DEPLOYMENT_MODE || "self-hosted";
|
||||
|
||||
// App version - defaults to package.json version
|
||||
// Can be overridden at build time with NEXT_PUBLIC_APP_VERSION for full git tag version
|
||||
export const APP_VERSION = process.env.NEXT_PUBLIC_APP_VERSION || packageJson.version;
|
||||
|
||||
// Helper to check if local auth is enabled
|
||||
export const isLocalAuth = () => AUTH_TYPE === "LOCAL";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue