diff --git a/README.md b/README.md index 7822aa07..b4bbf645 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,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..d81573ac 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,7 @@ export const Header = ({ diff --git a/src/helpers/env.ts b/src/helpers/env.ts index 53f6a8fc..58656ee2 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..a5c60561 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( <>
<> -
+
<> -
+