mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 03:55:38 -04:00
Add version and commit info footer to settings page
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -13,7 +13,13 @@ const sectionVariants = {
|
||||
},
|
||||
};
|
||||
|
||||
export function SettingsShell({ children }: { children: ReactNode }) {
|
||||
export function SettingsShell({
|
||||
children,
|
||||
footer,
|
||||
}: {
|
||||
children: ReactNode;
|
||||
footer?: ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<motion.div
|
||||
className="mx-auto max-w-2xl space-y-8"
|
||||
@@ -37,6 +43,8 @@ export function SettingsShell({ children }: { children: ReactNode }) {
|
||||
{Children.map(children, (child) => (
|
||||
<motion.div variants={sectionVariants}>{child}</motion.div>
|
||||
))}
|
||||
|
||||
{footer && <motion.div variants={sectionVariants}>{footer}</motion.div>}
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import { auth } from "@/lib/auth/server";
|
||||
import { db } from "@/lib/db/client";
|
||||
import { webhookConnections, webhookEventLog } from "@/lib/db/schema";
|
||||
import { getSetting } from "@/lib/services/settings";
|
||||
import { APP_VERSION, GIT_COMMIT } from "@/lib/version";
|
||||
import { AccountSection } from "./_components/account-section";
|
||||
import { IntegrationsSection } from "./_components/integrations-section";
|
||||
import { ServerSection } from "./_components/server-section";
|
||||
@@ -58,8 +59,41 @@ export default async function SettingsPage() {
|
||||
: Promise.resolve(false),
|
||||
]);
|
||||
|
||||
const repoUrl = "https://github.com/jakejarvis/sofa";
|
||||
|
||||
return (
|
||||
<SettingsShell>
|
||||
<SettingsShell
|
||||
footer={
|
||||
<footer className="border-t border-border/50 pt-6 pb-2 text-center text-xs text-muted-foreground">
|
||||
<p>
|
||||
<a
|
||||
href={repoUrl}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="font-medium text-primary/80 hover:text-primary transition-colors"
|
||||
>
|
||||
Sofa
|
||||
</a>{" "}
|
||||
v{APP_VERSION}
|
||||
{GIT_COMMIT !== "unknown" && (
|
||||
<>
|
||||
{" "}
|
||||
(
|
||||
<a
|
||||
href={`${repoUrl}/commit/${GIT_COMMIT}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="font-mono hover:text-primary transition-colors"
|
||||
>
|
||||
{GIT_COMMIT}
|
||||
</a>
|
||||
)
|
||||
</>
|
||||
)}
|
||||
</p>
|
||||
</footer>
|
||||
}
|
||||
>
|
||||
<AccountSection
|
||||
user={{
|
||||
name: session.user.name,
|
||||
|
||||
Reference in New Issue
Block a user