Add view to dynmap

This commit is contained in:
cyber-dream 2022-08-02 06:05:49 +03:00
parent cd757112b3
commit 30b3f804c9
5 changed files with 33 additions and 4 deletions

View File

@ -36,6 +36,7 @@
<%- include('loginOptions') %> <%- include('loginOptions') %>
<%- include('settings') %> <%- include('settings') %>
<%- include('landing') %> <%- include('landing') %>
<%- include('dynmap') %>
</div> </div>
<%- include('overlay') %> <%- include('overlay') %>
<div id="loadingContainer"> <div id="loadingContainer">

View File

@ -0,0 +1,3 @@
dynmapDoneButton.addEventListener('click', () => {
switchView(getCurrentView(), VIEWS.landing)
})

View File

@ -326,7 +326,7 @@ function asyncSystemScan(mcVersion, launchAfter = true){
// Show this information to the user. // Show this information to the user.
setOverlayContent( setOverlayContent(
'No Compatible<br>Java Installation Found', 'No Compatible<br>Java Installation Found',
'In order to join WesterosCraft, you need a 64-bit installation of Java 8. Would you like us to install a copy?', 'In order to join Skirda, you need a 64-bit installation of Java 8. Would you like us to install a copy?',
'Install Java', 'Install Java',
'Install Manually' 'Install Manually'
) )
@ -838,6 +838,7 @@ function slide_(up){
// Bind news button. // Bind news button.
document.getElementById('newsButton').onclick = () => { document.getElementById('newsButton').onclick = () => {
switchView(getCurrentView(), VIEWS.dynmap, 500, 500)
// Toggle tabbing. // Toggle tabbing.
/*if(newsActive){ /*if(newsActive){
$('#landingContainer *').removeAttr('tabindex') $('#landingContainer *').removeAttr('tabindex')
@ -852,8 +853,8 @@ document.getElementById('newsButton').onclick = () => {
ConfigManager.save() ConfigManager.save()
} }
}*/ }*/
slide_(!newsActive) //slide_(!newsActive)
newsActive = !newsActive //newsActive = !newsActive
} }
// Array to store article meta. // Array to store article meta.

View File

@ -21,7 +21,8 @@ const VIEWS = {
loginOffline: '#loginOfflineContainer', loginOffline: '#loginOfflineContainer',
settings: '#settingsContainer', settings: '#settingsContainer',
welcome: '#welcomeContainer', welcome: '#welcomeContainer',
waiting: '#waitingContainer' waiting: '#waitingContainer',
dynmap: '#dynmapContainer'
} }
// The currently shown view container. // The currently shown view container.

23
app/dynmap.ejs Normal file
View File

@ -0,0 +1,23 @@
<div id="dynmapContainer" style="display: none;">
<div id="center">
<div class="bot_wrapper">
<div id="content">
<button id="dynmapDoneButton"> <!-- Rename all elements to dynmapEtc -->
<div id="newsButtonAlert" style="display: none;"></div>
<svg id="newsButtonSVG" viewBox="0 0 24.87 13.97">
<defs>
<style>.arrowLine{fill:none;stroke:#FFF;stroke-width:2px;}</style>
</defs>
<polyline class="arrowLine" points="0.71 13.26 12.56 1.41 24.16 13.02"/>
</svg>
&#10;<span id="newsButtonText">MAP</span>
</button>
</div>
</div>
</div>
<div id="iframecontainer">
<iframe id="dynmapiframe" src="https://minemap.gregbrzezinski.com" frameborder="0"></iframe>
</div>
<script src="./assets/js/scripts/dynmap.js"></script>
</div>