diff --git a/meteor/client/main.html b/meteor/client/main.html index c8ff8a49de..e7764b7ba4 100644 --- a/meteor/client/main.html +++ b/meteor/client/main.html @@ -9,7 +9,7 @@ - + diff --git a/meteor/client/main.tsx b/meteor/client/main.tsx index e96564ad97..0e3c323331 100644 --- a/meteor/client/main.tsx +++ b/meteor/client/main.tsx @@ -27,7 +27,7 @@ if ('serviceWorker' in navigator) { window.addEventListener('load', () => { // in some versions of Chrome, registering the Service Worker over HTTP throws an arror if (window.location.protocol === 'https:' || window.location.hostname === 'localhost') { - navigator.serviceWorker.register('/sw.js').catch((err) => { + navigator.serviceWorker.register(Meteor.absoluteUrl('./sw.js')).catch((err) => { logger.error('Error registering serviceWorker', err) }) } diff --git a/meteor/client/ui/App.tsx b/meteor/client/ui/App.tsx index e101c78d83..0bacad1052 100644 --- a/meteor/client/ui/App.tsx +++ b/meteor/client/ui/App.tsx @@ -58,6 +58,7 @@ import { DocumentTitleProvider } from '../lib/DocumentTitleProvider' import { Spinner } from '../lib/Spinner' import { catchError, isRunningInPWA } from '../lib/lib' import { firstIfArray, protectString } from '../../lib/lib' +import { Meteor } from 'meteor/meteor' const NullComponent = () => null @@ -90,6 +91,8 @@ export const App: React.FC = function App() { const roles = useRoles(user, subsReady) const featureFlags = useFeatureFlags() + const sofieRootPath = new URL(Meteor.absoluteUrl()).pathname + useEffect(() => { if (user) return @@ -201,7 +204,7 @@ export const App: React.FC = function App() { return ( - +
{/* Header switch - render the usual header for all pages but the rundown view */} {isAuthenticated && ( diff --git a/meteor/client/ui/RundownList/GettingStarted.tsx b/meteor/client/ui/RundownList/GettingStarted.tsx index d702928c26..c4131a1e0a 100644 --- a/meteor/client/ui/RundownList/GettingStarted.tsx +++ b/meteor/client/ui/RundownList/GettingStarted.tsx @@ -28,7 +28,7 @@ export function GettingStarted({ step }: Readonly): JSX.El visible={step === ToolTipStep.TOOLTIP_RUN_MIGRATIONS} placement="bottom" > - {t('Migrations')} + {t('Migrations')} diff --git a/meteor/client/ui/i18n.ts b/meteor/client/ui/i18n.ts index ee0d20d6a2..0593c6088e 100644 --- a/meteor/client/ui/i18n.ts +++ b/meteor/client/ui/i18n.ts @@ -45,7 +45,7 @@ const i18nOptions = { }, backend: { - loadPath: '/locales/{{lng}}/{{ns}}.json', + loadPath: Meteor.absoluteUrl('./locales/{{lng}}/{{ns}}.json'), }, detection: {