fix(branding): render theme assets and dynamic metadata
This commit is contained in:
@@ -2,7 +2,7 @@ import { AnalyticsClient, type AnalyticsData } from "./analytics-client";
|
|||||||
import { parseDashboardRange, resolveDashboardRange } from "@/server/services/analytics-range";
|
import { parseDashboardRange, resolveDashboardRange } from "@/server/services/analytics-range";
|
||||||
import { requireFreelancerBackend } from "@/server/web/freelancer";
|
import { requireFreelancerBackend } from "@/server/web/freelancer";
|
||||||
|
|
||||||
export const metadata = { title: "Analizler - Neta" };
|
export const metadata = { title: "Analizler" };
|
||||||
|
|
||||||
export default async function AnalyticsPage({
|
export default async function AnalyticsPage({
|
||||||
searchParams,
|
searchParams,
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export default async function DashboardLayout({
|
|||||||
return (
|
return (
|
||||||
<DashboardShell
|
<DashboardShell
|
||||||
branding={{
|
branding={{
|
||||||
applicationName: branding.applicationName,
|
applicationName: branding.organizationName ?? branding.applicationName,
|
||||||
organizationName: branding.organizationName,
|
organizationName: branding.organizationName,
|
||||||
lightLogoUrl: branding.lightLogoUrl,
|
lightLogoUrl: branding.lightLogoUrl,
|
||||||
darkLogoUrl: branding.darkLogoUrl,
|
darkLogoUrl: branding.darkLogoUrl,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { DashboardClient, type DashboardData } from "./dashboard-client";
|
|||||||
import { parseDashboardRange, resolveDashboardRange } from "@/server/services/analytics-range";
|
import { parseDashboardRange, resolveDashboardRange } from "@/server/services/analytics-range";
|
||||||
import { requireFreelancerBackend } from "@/server/web/freelancer";
|
import { requireFreelancerBackend } from "@/server/web/freelancer";
|
||||||
|
|
||||||
export const metadata = { title: "Dashboard - Neta" };
|
export const metadata = { title: "Dashboard" };
|
||||||
|
|
||||||
export default async function DashboardPage({
|
export default async function DashboardPage({
|
||||||
searchParams,
|
searchParams,
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB |
@@ -1,6 +1,8 @@
|
|||||||
@import "tailwindcss";
|
@import "tailwindcss";
|
||||||
@import "poyraz-ui/preset.css";
|
@import "poyraz-ui/preset.css";
|
||||||
|
|
||||||
|
@custom-variant dark (&:where(.dark, .dark *));
|
||||||
|
|
||||||
@source "../app/**/*.{js,ts,jsx,tsx,mdx}";
|
@source "../app/**/*.{js,ts,jsx,tsx,mdx}";
|
||||||
@source "../components/**/*.{js,ts,jsx,tsx,mdx}";
|
@source "../components/**/*.{js,ts,jsx,tsx,mdx}";
|
||||||
@source "../config/**/*.{js,ts,jsx,tsx,mdx}";
|
@source "../config/**/*.{js,ts,jsx,tsx,mdx}";
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export default async function InvitationPage({
|
|||||||
{query.error && query.message ? <ErrorToaster message={query.message} /> : null}
|
{query.error && query.message ? <ErrorToaster message={query.message} /> : null}
|
||||||
<AuthPageShell
|
<AuthPageShell
|
||||||
branding={{
|
branding={{
|
||||||
applicationName: branding.applicationName,
|
applicationName: branding.organizationName ?? branding.applicationName,
|
||||||
lightLogoUrl: branding.lightLogoUrl,
|
lightLogoUrl: branding.lightLogoUrl,
|
||||||
darkLogoUrl: branding.darkLogoUrl,
|
darkLogoUrl: branding.darkLogoUrl,
|
||||||
}}
|
}}
|
||||||
|
|||||||
+6
-1
@@ -22,11 +22,16 @@ const colorModeScript = `(() => {
|
|||||||
|
|
||||||
export function generateMetadata(): Metadata {
|
export function generateMetadata(): Metadata {
|
||||||
const branding = getPublicBranding();
|
const branding = getPublicBranding();
|
||||||
|
const faviconUrl = branding.iconUrl ?? "/logo/iconLogo.png";
|
||||||
return {
|
return {
|
||||||
title: { default: branding.applicationName, template: `%s · ${branding.applicationName}` },
|
title: { default: branding.applicationName, template: `%s · ${branding.applicationName}` },
|
||||||
description: "Self-hosted freelancer operating dashboard",
|
description: "Self-hosted freelancer operating dashboard",
|
||||||
manifest: "/manifest.webmanifest",
|
manifest: "/manifest.webmanifest",
|
||||||
icons: branding.iconUrl ? { icon: branding.iconUrl, apple: branding.iconUrl } : undefined,
|
icons: {
|
||||||
|
icon: [{ url: faviconUrl, type: "image/png" }],
|
||||||
|
shortcut: [{ url: faviconUrl, type: "image/png" }],
|
||||||
|
apple: [{ url: faviconUrl, type: "image/png" }],
|
||||||
|
},
|
||||||
appleWebApp: {
|
appleWebApp: {
|
||||||
capable: true,
|
capable: true,
|
||||||
statusBarStyle: "default",
|
statusBarStyle: "default",
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@ export default async function LoginPage({
|
|||||||
{error && message && <ErrorToaster message={String(message)} />}
|
{error && message && <ErrorToaster message={String(message)} />}
|
||||||
<AuthPageShell
|
<AuthPageShell
|
||||||
branding={{
|
branding={{
|
||||||
applicationName: branding.applicationName,
|
applicationName: branding.organizationName ?? branding.applicationName,
|
||||||
lightLogoUrl: branding.lightLogoUrl,
|
lightLogoUrl: branding.lightLogoUrl,
|
||||||
darkLogoUrl: branding.darkLogoUrl,
|
darkLogoUrl: branding.darkLogoUrl,
|
||||||
}}
|
}}
|
||||||
|
|||||||
+2
-5
@@ -6,7 +6,7 @@ export const dynamic = "force-dynamic";
|
|||||||
export default function manifest(): MetadataRoute.Manifest {
|
export default function manifest(): MetadataRoute.Manifest {
|
||||||
const branding = getPublicBranding();
|
const branding = getPublicBranding();
|
||||||
return {
|
return {
|
||||||
name: branding.applicationName,
|
name: branding.organizationName ?? branding.applicationName,
|
||||||
short_name: branding.shortName,
|
short_name: branding.shortName,
|
||||||
description: "Self-hosted freelancer operating dashboard",
|
description: "Self-hosted freelancer operating dashboard",
|
||||||
start_url: "/",
|
start_url: "/",
|
||||||
@@ -15,9 +15,6 @@ export default function manifest(): MetadataRoute.Manifest {
|
|||||||
theme_color: branding.primaryColor,
|
theme_color: branding.primaryColor,
|
||||||
icons: branding.iconUrl
|
icons: branding.iconUrl
|
||||||
? [{ src: branding.iconUrl, sizes: "any", type: "image/png" }]
|
? [{ src: branding.iconUrl, sizes: "any", type: "image/png" }]
|
||||||
: [
|
: [{ src: "/logo/iconLogo.png", sizes: "any", type: "image/png" }],
|
||||||
{ src: "/icons/icon-192x192.png", sizes: "192x192", type: "image/png" },
|
|
||||||
{ src: "/icons/icon-512x512.png", sizes: "512x512", type: "image/png" },
|
|
||||||
],
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ export default async function PortalLayout({
|
|||||||
return (
|
return (
|
||||||
<PortalShell
|
<PortalShell
|
||||||
branding={{
|
branding={{
|
||||||
applicationName: branding.applicationName,
|
applicationName: branding.organizationName ?? branding.applicationName,
|
||||||
organizationName: branding.organizationName,
|
organizationName: branding.organizationName,
|
||||||
lightLogoUrl: branding.lightLogoUrl,
|
lightLogoUrl: branding.lightLogoUrl,
|
||||||
darkLogoUrl: branding.darkLogoUrl,
|
darkLogoUrl: branding.darkLogoUrl,
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export default async function RegisterPage({
|
|||||||
{error && message && <ErrorToaster message={String(message)} />}
|
{error && message && <ErrorToaster message={String(message)} />}
|
||||||
<AuthPageShell
|
<AuthPageShell
|
||||||
branding={{
|
branding={{
|
||||||
applicationName: branding.applicationName,
|
applicationName: branding.organizationName ?? branding.applicationName,
|
||||||
lightLogoUrl: branding.lightLogoUrl,
|
lightLogoUrl: branding.lightLogoUrl,
|
||||||
darkLogoUrl: branding.darkLogoUrl,
|
darkLogoUrl: branding.darkLogoUrl,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -147,11 +147,20 @@ export function AuthPageShell({
|
|||||||
>
|
>
|
||||||
<div className="mb-8 flex justify-center lg:hidden">
|
<div className="mb-8 flex justify-center lg:hidden">
|
||||||
<Image
|
<Image
|
||||||
src={branding.lightLogoUrl ?? "/logo/blackLogoLong.png"}
|
src={branding.lightLogoUrl ?? branding.darkLogoUrl ?? "/logo/blackLogoLong.png"}
|
||||||
alt={`${branding.applicationName} logo`}
|
alt={`${branding.applicationName} logo`}
|
||||||
width={180}
|
width={180}
|
||||||
height={56}
|
height={56}
|
||||||
className="h-14 w-auto object-contain"
|
className="h-14 w-auto object-contain dark:hidden"
|
||||||
|
style={{ width: "auto" }}
|
||||||
|
priority
|
||||||
|
/>
|
||||||
|
<Image
|
||||||
|
src={branding.darkLogoUrl ?? branding.lightLogoUrl ?? "/logo/lightLogoLong.png"}
|
||||||
|
alt={`${branding.applicationName} logo`}
|
||||||
|
width={180}
|
||||||
|
height={56}
|
||||||
|
className="hidden h-14 w-auto object-contain dark:block"
|
||||||
style={{ width: "auto" }}
|
style={{ width: "auto" }}
|
||||||
priority
|
priority
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user