-
- {t("settings.sidebar.info.backendUrl")}
+
+
{t("settings.sidebar.info.backendUrl")}
-
+
{backendUrl.replace(/https?:\/\//, "")}
@@ -193,7 +193,7 @@ export function SidebarPart() {
/>
) : null}
{backendMeta.loading ? (
-
+
) : (
backendMeta?.value?.version ||
t("settings.sidebar.info.unknownVersion")
diff --git a/src/pages/parts/util/PageTitle.tsx b/src/pages/parts/util/PageTitle.tsx
new file mode 100644
index 00000000..c8225b45
--- /dev/null
+++ b/src/pages/parts/util/PageTitle.tsx
@@ -0,0 +1,20 @@
+import { Helmet } from "react-helmet-async";
+import { useTranslation } from "react-i18next";
+
+export interface PageTitleProps {
+ k: string;
+ subpage?: boolean;
+}
+
+export function PageTitle(props: PageTitleProps) {
+ const { t } = useTranslation();
+
+ const title = t(props.k);
+ const subPageTitle = t("global.pages.pagetitle", { title });
+
+ return (
+
+ {props.subpage ? subPageTitle : title}
+
+ );
+}
diff --git a/src/setup/App.tsx b/src/setup/App.tsx
index 81eda406..03b1e69c 100644
--- a/src/setup/App.tsx
+++ b/src/setup/App.tsx
@@ -13,6 +13,7 @@ import { generateQuickSearchMediaUrl } from "@/backend/metadata/tmdb";
import { useOnlineListener } from "@/hooks/usePing";
import { AboutPage } from "@/pages/About";
import { AdminPage } from "@/pages/admin/AdminPage";
+import VideoTesterView from "@/pages/developer/VideoTesterView";
import { DmcaPage } from "@/pages/Dmca";
import { NotFoundPage } from "@/pages/errors/NotFoundPage";
import { HomePage } from "@/pages/HomePage";
@@ -106,15 +107,12 @@ function App() {
path="/dev"
component={lazy(() => import("@/pages/DeveloperPage"))}
/>
-
import("@/pages/developer/VideoTesterView"))}
- />
+
+
+
{/* developer routes that can abuse workers are disabled in production */}
{process.env.NODE_ENV === "development" ? (
import("@/pages/developer/TestView"))}
/>
diff --git a/src/setup/i18n.ts b/src/setup/i18n.ts
index 84402df1..ac86edcc 100644
--- a/src/setup/i18n.ts
+++ b/src/setup/i18n.ts
@@ -18,6 +18,13 @@ i18n.use(initReactI18next).init({
});
export const appLanguageOptions = langCodes.map((lang) => {
+ if (lang === "pirate") {
+ return {
+ code: "pirate",
+ name: "Pirate",
+ nativeName: "Pirate Tongue",
+ };
+ }
const [langObj] = ISO6391.getLanguages([lang]);
if (!langObj)
throw new Error(`Language with code ${lang} cannot be found in database`);
diff --git a/src/utils/detectFeatures.ts b/src/utils/detectFeatures.ts
index af62720d..a82a3de3 100644
--- a/src/utils/detectFeatures.ts
+++ b/src/utils/detectFeatures.ts
@@ -46,3 +46,7 @@ export function canPictureInPicture(): boolean {
export function canWebkitPictureInPicture(): boolean {
return "webkitSupportsPresentationMode" in document.createElement("video");
}
+
+export function canPlayHlsNatively(video: HTMLVideoElement): boolean {
+ return !!video.canPlayType("application/vnd.apple.mpegurl");
+}