From 75feea0d9c69dcdeae11bf281ab6647b0c92a911 Mon Sep 17 00:00:00 2001 From: Kanashimo <66676567+Kanashimo@users.noreply.github.com> Date: Tue, 15 Sep 2026 20:59:04 +0200 Subject: [PATCH] feat: add custom branding (#575) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Emrik Östling --- README.md | 1 + src/components/header.tsx | 6 +++++- src/helpers/env.ts | 2 ++ src/pages/history.tsx | 10 +++++++++- src/pages/listConverters.tsx | 9 +++++++-- src/pages/results.tsx | 9 +++++++-- src/pages/root.tsx | 2 ++ src/pages/user.tsx | 4 ++++ 8 files changed, 37 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 96511b7e..12aa61af 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,7 @@ All are optional, JWT_SECRET is recommended to be set. | ALLOW_UNAUTHENTICATED | false | Allow unauthenticated users to use the service, only set this to true locally | | AUTO_DELETE_EVERY_N_HOURS | 24 | Checks every n hours for files older then n hours and deletes them, set to 0 to disable | | WEBROOT | | The address to the root path setting this to "/convert" will serve the website on "example.com/convert/" | +| BRANDING | ConvertX | Custom string that allows you to change the display name of the website in the header (max 26 characters) | | FFMPEG_ARGS | | Arguments to pass to the input file of ffmpeg, e.g. `-hwaccel vaapi`. See https://github.com/C4illin/ConvertX/issues/190 for more info about hw-acceleration. | | FFMPEG_OUTPUT_ARGS | | Arguments to pass to the output of ffmpeg, e.g. `-preset veryfast` | | HIDE_HISTORY | false | Hide the history page | diff --git a/src/components/header.tsx b/src/components/header.tsx index 7f72fead..d63f5b9b 100644 --- a/src/components/header.tsx +++ b/src/components/header.tsx @@ -4,12 +4,14 @@ export const Header = ({ allowUnauthenticated, hideHistory, webroot = "", + branding = "ConvertX", }: { loggedIn?: boolean; accountRegistration?: boolean; allowUnauthenticated?: boolean; hideHistory?: boolean; webroot?: string; + branding?: string; }) => { let rightNav: JSX.Element; if (loggedIn) { @@ -93,7 +95,9 @@ export const Header = ({ diff --git a/src/helpers/env.ts b/src/helpers/env.ts index 53f6a8fc..c5207882 100644 --- a/src/helpers/env.ts +++ b/src/helpers/env.ts @@ -12,6 +12,8 @@ export const AUTO_DELETE_EVERY_N_HOURS = process.env.AUTO_DELETE_EVERY_N_HOURS export const HIDE_HISTORY = process.env.HIDE_HISTORY?.toLowerCase() === "true" || false; +export const BRANDING = process.env.BRANDING ?? "ConvertX"; + export const WEBROOT = process.env.WEBROOT ?? ""; export const LANGUAGE = process.env.LANGUAGE?.toLowerCase() || "en"; diff --git a/src/pages/history.tsx b/src/pages/history.tsx index 89176982..d0cecdf0 100644 --- a/src/pages/history.tsx +++ b/src/pages/history.tsx @@ -3,7 +3,14 @@ import { BaseHtml } from "../components/base"; import { Header } from "../components/header"; import db from "../db/db"; import { Filename, Jobs } from "../db/types"; -import { ALLOW_UNAUTHENTICATED, HIDE_HISTORY, LANGUAGE, TIMEZONE, WEBROOT } from "../helpers/env"; +import { + ALLOW_UNAUTHENTICATED, + HIDE_HISTORY, + LANGUAGE, + TIMEZONE, + WEBROOT, + BRANDING, +} from "../helpers/env"; import { userService } from "./user"; import { EyeIcon } from "../icons/eye"; import { DeleteIcon } from "../icons/delete"; @@ -36,6 +43,7 @@ export const history = new Elysia().use(userService).get( <>
<> -
+
<> -
+