From 6373c52729da9ea26284ca3402f9e5d5fc7e8e6d Mon Sep 17 00:00:00 2001 From: James Lyne Date: Sat, 26 Feb 2022 13:24:48 +0000 Subject: [PATCH] Use initial page title for overviewer maps --- src/providers/OverviewerMapProvider.ts | 3 ++- src/store/state.ts | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/providers/OverviewerMapProvider.ts b/src/providers/OverviewerMapProvider.ts index 9053b55..b7a77a6 100644 --- a/src/providers/OverviewerMapProvider.ts +++ b/src/providers/OverviewerMapProvider.ts @@ -36,6 +36,7 @@ import {OverviewerTileLayer} from "@/leaflet/tileLayer/OverviewerTileLayer"; import LiveAtlasMapDefinition from "@/model/LiveAtlasMapDefinition"; import {OverviewerProjection} from "@/leaflet/projection/OverviewerProjection"; import {LiveAtlasMarkerType} from "@/util/markers"; +import {useStore} from "@/store"; export default class OverviewerMapProvider extends MapProvider { private configurationAbort?: AbortController = undefined; @@ -58,7 +59,7 @@ export default class OverviewerMapProvider extends MapProvider { private static buildServerConfig(response: any): LiveAtlasServerConfig { return { - title: 'Minecraft Overviewer', + title: useStore().state.initialTitle, //Not used by overviewer expandUI: false, diff --git a/src/store/state.ts b/src/store/state.ts index be8e7cf..7fbee2e 100644 --- a/src/store/state.ts +++ b/src/store/state.ts @@ -44,6 +44,7 @@ import {getDefaultMinecraftHead, getMessages} from "@/util"; export type State = { version: string; firstLoad: boolean; + initialTitle: string; servers: Map; configuration: LiveAtlasServerConfig; @@ -104,6 +105,8 @@ export type State = { export const state: State = { version: (process.env.VITE_APP_VERSION || 'Unknown') as string, firstLoad: true, + initialTitle: document.title, + servers: new Map(), configuration: {