Use initial page title for overviewer maps
This commit is contained in:
parent
a15e9d4b77
commit
6373c52729
@ -36,6 +36,7 @@ import {OverviewerTileLayer} from "@/leaflet/tileLayer/OverviewerTileLayer";
|
|||||||
import LiveAtlasMapDefinition from "@/model/LiveAtlasMapDefinition";
|
import LiveAtlasMapDefinition from "@/model/LiveAtlasMapDefinition";
|
||||||
import {OverviewerProjection} from "@/leaflet/projection/OverviewerProjection";
|
import {OverviewerProjection} from "@/leaflet/projection/OverviewerProjection";
|
||||||
import {LiveAtlasMarkerType} from "@/util/markers";
|
import {LiveAtlasMarkerType} from "@/util/markers";
|
||||||
|
import {useStore} from "@/store";
|
||||||
|
|
||||||
export default class OverviewerMapProvider extends MapProvider {
|
export default class OverviewerMapProvider extends MapProvider {
|
||||||
private configurationAbort?: AbortController = undefined;
|
private configurationAbort?: AbortController = undefined;
|
||||||
@ -58,7 +59,7 @@ export default class OverviewerMapProvider extends MapProvider {
|
|||||||
|
|
||||||
private static buildServerConfig(response: any): LiveAtlasServerConfig {
|
private static buildServerConfig(response: any): LiveAtlasServerConfig {
|
||||||
return {
|
return {
|
||||||
title: 'Minecraft Overviewer',
|
title: useStore().state.initialTitle,
|
||||||
|
|
||||||
//Not used by overviewer
|
//Not used by overviewer
|
||||||
expandUI: false,
|
expandUI: false,
|
||||||
|
@ -44,6 +44,7 @@ import {getDefaultMinecraftHead, getMessages} from "@/util";
|
|||||||
export type State = {
|
export type State = {
|
||||||
version: string;
|
version: string;
|
||||||
firstLoad: boolean;
|
firstLoad: boolean;
|
||||||
|
initialTitle: string;
|
||||||
|
|
||||||
servers: Map<string, LiveAtlasServerDefinition>;
|
servers: Map<string, LiveAtlasServerDefinition>;
|
||||||
configuration: LiveAtlasServerConfig;
|
configuration: LiveAtlasServerConfig;
|
||||||
@ -104,6 +105,8 @@ export type State = {
|
|||||||
export const state: State = {
|
export const state: State = {
|
||||||
version: (process.env.VITE_APP_VERSION || 'Unknown') as string,
|
version: (process.env.VITE_APP_VERSION || 'Unknown') as string,
|
||||||
firstLoad: true,
|
firstLoad: true,
|
||||||
|
initialTitle: document.title,
|
||||||
|
|
||||||
servers: new Map(),
|
servers: new Map(),
|
||||||
|
|
||||||
configuration: {
|
configuration: {
|
||||||
|
Loading…
Reference in New Issue
Block a user