diff --git a/index.html b/index.html index 6e95f3d..35285d5 100644 --- a/index.html +++ b/index.html @@ -28,66 +28,84 @@ window.liveAtlasConfig = { // Server URLS can be defined here instead of using the standalone/config.js file. // Multiple servers are supported, see https://github.com/JLyne/LiveAtlas/wiki/Configuring-Multiple-Servers. - servers: { - creative: { - label: 'Creative', - dynmap: { - configuration: 'http://dynmap.local/creative/MySQL_configuration.php', - update: 'http://dynmap.local/creative/MySQL_update.php?world={world}&ts={timestamp}', - sendmessage: 'http://dynmap.local/creative/MySQL_sendmessage.php', - login: 'http://dynmap.local/creative/MySQL_login.php', - register: 'http://dynmap.local/creative/MySQL_register.php', - tiles: 'http://dynmap.local/creative/MySQL_tiles.php?tile=', - markers: 'http://dynmap.local/creative/MySQL_markers.php?marker=' - } - }, - survival: { - label: 'Survival', - dynmap: { - configuration: 'http://dynmap.local/survival/MySQL_configuration.php', - update: 'http://dynmap.local/survival/MySQL_update.php?world={world}&ts={timestamp}', - sendmessage: 'http://dynmap.local/survival/MySQL_sendmessage.php', - login: 'http://dynmap.local/survival/MySQL_login.php', - register: 'http://dynmap.local/survival/MySQL_register.php', - tiles: 'http://dynmap.local/survival/MySQL_tiles.php?tile=', - markers: 'http://dynmap.local/survival/MySQL_markers.php?marker=' - } - }, - build: { - label: 'Build', - dynmap: { - configuration: 'http://dynmap.local/build/MySQL_configuration.php', - update: 'http://dynmap.local/build/MySQL_update.php?world={world}&ts={timestamp}', - sendmessage: 'http://dynmap.local/build/MySQL_sendmessage.php', - login: 'http://dynmap.local/build/MySQL_login.php', - register: 'http://dynmap.local/build/MySQL_register.php', - tiles: 'http://dynmap.local/build/MySQL_tiles.php?tile=', - markers: 'http://dynmap.local/build/MySQL_markers.php?marker=' - } - }, - test: { - label: 'Local Test', - url: '/map/test', - dynmap: { - configuration: 'http://dynmap.local:8123/up/configuration', - update: 'http://dynmap.local:8123/up/world/{world}/{timestamp}', - sendmessage: 'http://dynmap.local:8123/up/sendmessage', - login: 'http://dynmap.local:8123/up/login', - register: 'http://dynmap.local:8123/up/register', - tiles: 'http://dynmap.local:8123/tiles/', - markers: 'http://dynmap.local:8123/tiles/' - } - }, - }, + // servers: { + // creative: { + // label: 'Creative', + // dynmap: { + // configuration: 'http://dynmap.local/creative/MySQL_configuration.php', + // update: 'http://dynmap.local/creative/MySQL_update.php?world={world}&ts={timestamp}', + // sendmessage: 'http://dynmap.local/creative/MySQL_sendmessage.php', + // login: 'http://dynmap.local/creative/MySQL_login.php', + // register: 'http://dynmap.local/creative/MySQL_register.php', + // tiles: 'http://dynmap.local/creative/MySQL_tiles.php?tile=', + // markers: 'http://dynmap.local/creative/MySQL_markers.php?marker=' + // } + // }, + // survival: { + // label: 'Survival', + // dynmap: { + // configuration: 'http://dynmap.local/survival/MySQL_configuration.php', + // update: 'http://dynmap.local/survival/MySQL_update.php?world={world}&ts={timestamp}', + // sendmessage: 'http://dynmap.local/survival/MySQL_sendmessage.php', + // login: 'http://dynmap.local/survival/MySQL_login.php', + // register: 'http://dynmap.local/survival/MySQL_register.php', + // tiles: 'http://dynmap.local/survival/MySQL_tiles.php?tile=', + // markers: 'http://dynmap.local/survival/MySQL_markers.php?marker=' + // } + // }, + // build: { + // label: 'Build', + // dynmap: { + // configuration: 'http://dynmap.local/build/MySQL_configuration.php', + // update: 'http://dynmap.local/build/MySQL_update.php?world={world}&ts={timestamp}', + // sendmessage: 'http://dynmap.local/build/MySQL_sendmessage.php', + // login: 'http://dynmap.local/build/MySQL_login.php', + // register: 'http://dynmap.local/build/MySQL_register.php', + // tiles: 'http://dynmap.local/build/MySQL_tiles.php?tile=', + // markers: 'http://dynmap.local/build/MySQL_markers.php?marker=' + // } + // }, + // test: { + // label: 'Local Test', + // url: '/map/test', + // dynmap: { + // configuration: 'http://dynmap.local:8123/up/configuration', + // update: 'http://dynmap.local:8123/up/world/{world}/{timestamp}', + // sendmessage: 'http://dynmap.local:8123/up/sendmessage', + // login: 'http://dynmap.local:8123/up/login', + // register: 'http://dynmap.local:8123/up/register', + // tiles: 'http://dynmap.local:8123/tiles/', + // markers: 'http://dynmap.local:8123/tiles/' + // } + // }, + // }, + // These messages are used throughout LiveAtlas and can be translated here + // If a message you want to translate isn't here, it is likely controlled by dynmap itself + // see https://github.com/webbukkit/dynmap/wiki/Configuration.txt messages: { - headingServers: 'Servers', chatNoMessages: 'No chat messages yet...', + chatTitle: 'Chat', chatLogin: 'Please {{link}} to send chat messages', chatLoginLink: 'login', chatSend: 'Send', + chatPlaceholder: 'Type your chat message here...', chatErrorUnknown: 'Unexpected error while sending chat message', chatErrorDisabled: 'Chat is not enabled', + serversHeading: 'Servers', + worldsSkeleton: 'No maps have been configured', + playersSkeleton: 'No players are currently online', + playersTitle: 'Click to center on player\nDouble-click to follow player', + playersTitleHidden: 'This player is currently hidden from the map\nDouble-click to follow player when they become visible', + playersTitleOtherWorld: 'This player is in another world.\nClick to center on player\nDouble-click to follow player', + followingHeading: 'Following', + followingUnfollow: 'Unfollow', + followingTitleUnfollow: 'Stop following this player', + followingHidden: 'Currently hidden', + linkTitle: 'Copy link to current location', + loadingTitle: 'Loading...', + locationRegion: 'Region', + locationChunk: 'Chunk', } }; diff --git a/src/api.ts b/src/api.ts index 1ff14bf..4140015 100644 --- a/src/api.ts +++ b/src/api.ts @@ -66,18 +66,33 @@ function buildMessagesConfig(response: any): LiveAtlasMessageConfig { chatPlayerQuit: response.quitmessage || '', chatAnonymousJoin: response['msg-hiddennamejoin'] || '', chatAnonymousQuit: response['msg-hiddennamequit'] || '', + chatTitle: liveAtlasMessages.chatTitle || '', chatLogin: liveAtlasMessages.chatLogin || '', chatLoginLink: liveAtlasMessages.chatLoginLink || '', chatNoMessages: liveAtlasMessages.chatNoMessages || '', chatSend: liveAtlasMessages.chatSend || '', + chatPlaceholder: liveAtlasMessages.chatPlaceholder || '', chatErrorNotAllowed: response['msg-chatnotallowed'] || '', chatErrorRequiresLogin: response['msg-chatrequireslogin'] || '', chatErrorCooldown: response.spammessage || '', chatErrorDisabled: liveAtlasMessages.chatErrorDisabled || '', chatErrorUnknown: liveAtlasMessages.chatErrorUnknown || '', - headingWorlds: response['msg-maptypes'] || '', - headingPlayers: response['msg-players'] || '', - headingServers: liveAtlasMessages.headingServers || '', + serversHeading: liveAtlasMessages.serversHeading || '', + worldsHeading: response['msg-maptypes'] || '', + worldsSkeleton: liveAtlasMessages.worldsSkeleton || '', + playersHeading: response['msg-players'] || '', + playersSkeleton: liveAtlasMessages.playersSkeleton || '', + playersTitle: liveAtlasMessages.playersTitle || '', + playersTitleHidden: liveAtlasMessages.playersTitleHidden || '', + playersTitleOtherWorld: liveAtlasMessages.playersTitleOtherWorld || '', + followingHeading: liveAtlasMessages.followingHeading || '', + followingHidden: liveAtlasMessages.followingHidden || '', + followingUnfollow: liveAtlasMessages.followingUnfollow || '', + followingTitleUnfollow: liveAtlasMessages.followingTitleUnfollow || '', + linkTitle: liveAtlasMessages.linkTitle || '', + loadingTitle: liveAtlasMessages.loadingTitle || '', + locationRegion: liveAtlasMessages.locationRegion || '', + locationChunk: liveAtlasMessages.locationChunk || '', } } diff --git a/src/components/ChatBox.vue b/src/components/ChatBox.vue index 98d7cbf..4036e54 100644 --- a/src/components/ChatBox.vue +++ b/src/components/ChatBox.vue @@ -23,7 +23,7 @@
@@ -67,9 +67,10 @@ }), messageSend = computed(() => store.state.messages.chatSend), + messagePlaceholder = computed(() => store.state.messages.chatPlaceholder), messageNoMessages = computed(() => store.state.messages.chatNoMessages), messageLogin = computed(() => store.state.messages.chatLogin.replace( - '{{link}}', store.state.messages.chatLoginLink)), + '{{link}}', `${store.state.messages.chatLoginLink}`)), sendMessage = async () => { const message = enteredMessage.value.trim().substring(0, maxMessageLength.value); @@ -117,6 +118,7 @@ messageLogin, messageSend, messageNoMessages, + messagePlaceholder, } } }) diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index 6a2f902..f8170c6 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -18,17 +18,13 @@