Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "qryptchat-web",
"private": true,
"version": "0.9.2",
"version": "0.9.3",
"type": "module",
"bin": {
"qc": "./bin/qc.js",
Expand Down
4 changes: 2 additions & 2 deletions src/app/client-layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import ActiveCallInterface from '@/lib/components/voice-call/ActiveCallInterface
// token, since passkey/CoinPay/phone sessions have no cookie.
installApiAuth({ refresh: (token) => useAuthStore.getState().refreshSession(token) });

export default function ClientLayout({ children }) {
export default function ClientLayout({ children, footerBottom }) {
const pathname = usePathname();
const currentTheme = useThemeStore((s) => s.currentTheme);
const { t: _t } = useI18n();
Expand Down Expand Up @@ -60,7 +60,7 @@ export default function ClientLayout({ children }) {
<div className="app" suppressHydrationWarning>
<Navbar />
<main className="main-content">{children}</main>
{shouldShowFooter && <Footer />}
{shouldShowFooter && <Footer bottom={footerBottom} />}
{mounted && (
<>
<PWAToastManager />
Expand Down
24 changes: 22 additions & 2 deletions src/app/layout.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import './globals.css';
import ClientLayout from './client-layout.jsx';
import Script from "next/script";
import { Footer as PfsFooter } from '@profullstack/footer/react';
import PitFooter from '@/lib/components/PitFooter.jsx';

const SITE_URL = (process.env.NEXT_PUBLIC_APP_URL ?? process.env.NEXT_PUBLIC_BASE_URL ?? 'https://qrypt.chat').replace(/\/$/, '');

// Re-render hourly so the pit.world footer stays fresh.
// Re-render hourly so @profullstack/footer and the pit.world footer stay fresh.
export const revalidate = 3600;

export const metadata = {
Expand Down Expand Up @@ -146,7 +147,26 @@ export default function RootLayout({ children }) {
/>
</head>
<body suppressHydrationWarning>
<ClientLayout>{children}</ClientLayout>
<ClientLayout
footerBottom={
<PfsFooter
site="https://qrypt.chat/"
links={[
{ label: 'Security', href: '/security' },
{ label: 'About', href: '/about' },
{ label: 'Blog', href: '/blog' },
{ label: 'FAQ', href: '/faq' },
{ label: 'Contact', href: '/contact' },
{ label: 'Warrant Canary', href: '/warrant-canary' },
{ label: 'Privacy', href: '/privacy' },
{ label: 'Terms', href: '/terms' },
{ label: 'GitHub', href: 'https://github.com/profullstack/qryptchat-web' },
]}
/>
}
>
{children}
</ClientLayout>
<Script data-site="38c4083a-a35e-435d-8a0e-3510c465f419" src="https://crawlproof.com/stats.js" strategy="afterInteractive" />
<PitFooter />
</body>
Expand Down
45 changes: 13 additions & 32 deletions src/lib/components/Footer.jsx
Original file line number Diff line number Diff line change
@@ -1,44 +1,25 @@
'use client';

const links = [
{ label: 'Security', href: '/security' },
{ label: 'About', href: '/about' },
{ label: 'Blog', href: '/blog' },
{ label: 'FAQ', href: '/faq' },
{ label: 'Contact', href: '/contact' },
{ label: 'Warrant Canary', href: '/warrant-canary' },
{ label: 'Privacy', href: '/privacy' },
{ label: 'Terms', href: '/terms' },
{ label: 'GitHub', href: 'https://github.com/profullstack/qryptchat-web' },
];

export default function Footer() {
// One footer row: links, copyright and the Profullstack ring come from
// @profullstack/footer, server-rendered in app/layout.jsx and passed in as
// `bottom`. The Tor mirror link sits just above it when configured.
export default function Footer({ bottom }) {
const onionUrl = process.env.NEXT_PUBLIC_ONION_URL;
const isOnionSite = typeof window !== 'undefined' && window.location.hostname.endsWith('.onion');

return (
<footer className="footer">
<nav className="footer-links" aria-label="Footer">
{links.map((link) => (
<a key={link.href} href={link.href}>{link.label}</a>
))}
</nav>
<p className="footer-copy">
&copy; {new Date().getFullYear()} <a href="https://profullstack.com/">Profullstack, Inc.</a>
{!isOnionSite && onionUrl && (
<>
{' · '}
<a href={onionUrl} target="_blank" rel="noopener noreferrer">Tor .onion</a>
</>
)}
</p>
{!isOnionSite && onionUrl && (
<p className="footer-onion">
🧅 Also on Tor: <a href={onionUrl} target="_blank" rel="noopener noreferrer">{onionUrl}</a>
</p>
)}
{bottom}

<style>{`
.footer { background: var(--color-bg-secondary); border-top: 1px solid var(--color-border-primary); padding: var(--space-6) var(--space-6); display: flex; flex-direction: column; align-items: center; gap: var(--space-2); font-size: 0.875rem; color: var(--color-text-secondary); text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2) var(--space-5); }
.footer a { color: var(--color-text-secondary); text-decoration: none; transition: color .2s; }
.footer a:hover { color: var(--color-brand-primary); }
.footer-copy { margin: 0; }
.footer { background: var(--color-bg-secondary); border-top: 1px solid var(--color-border-primary); color: var(--color-text-secondary); }
.footer-onion { margin: 0; padding-top: var(--space-4); text-align: center; font-size: 0.75rem; word-break: break-all; }
.footer-onion a { color: var(--color-brand-primary); }
`}</style>
</footer>
);
Expand Down
Loading