From 30b3f804c970f4f0029c351731b5dc05cb459e6f Mon Sep 17 00:00:00 2001 From: cyber-dream Date: Tue, 2 Aug 2022 06:05:49 +0300 Subject: [PATCH] Add view to dynmap --- app/app.ejs | 1 + app/assets/js/scripts/dynmap.js | 3 +++ app/assets/js/scripts/landing.js | 7 ++++--- app/assets/js/scripts/uibinder.js | 3 ++- app/dynmap.ejs | 23 +++++++++++++++++++++++ 5 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 app/assets/js/scripts/dynmap.js create mode 100644 app/dynmap.ejs diff --git a/app/app.ejs b/app/app.ejs index 7f4657d..d14b351 100644 --- a/app/app.ejs +++ b/app/app.ejs @@ -36,6 +36,7 @@ <%- include('loginOptions') %> <%- include('settings') %> <%- include('landing') %> + <%- include('dynmap') %> <%- include('overlay') %>
diff --git a/app/assets/js/scripts/dynmap.js b/app/assets/js/scripts/dynmap.js new file mode 100644 index 0000000..2547764 --- /dev/null +++ b/app/assets/js/scripts/dynmap.js @@ -0,0 +1,3 @@ +dynmapDoneButton.addEventListener('click', () => { + switchView(getCurrentView(), VIEWS.landing) + }) \ No newline at end of file diff --git a/app/assets/js/scripts/landing.js b/app/assets/js/scripts/landing.js index a328581..bf7ca5f 100644 --- a/app/assets/js/scripts/landing.js +++ b/app/assets/js/scripts/landing.js @@ -326,7 +326,7 @@ function asyncSystemScan(mcVersion, launchAfter = true){ // Show this information to the user. setOverlayContent( 'No Compatible
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 Manually' ) @@ -838,6 +838,7 @@ function slide_(up){ // Bind news button. document.getElementById('newsButton').onclick = () => { + switchView(getCurrentView(), VIEWS.dynmap, 500, 500) // Toggle tabbing. /*if(newsActive){ $('#landingContainer *').removeAttr('tabindex') @@ -852,8 +853,8 @@ document.getElementById('newsButton').onclick = () => { ConfigManager.save() } }*/ - slide_(!newsActive) - newsActive = !newsActive + //slide_(!newsActive) + //newsActive = !newsActive } // Array to store article meta. diff --git a/app/assets/js/scripts/uibinder.js b/app/assets/js/scripts/uibinder.js index c12ae71..3a37d18 100644 --- a/app/assets/js/scripts/uibinder.js +++ b/app/assets/js/scripts/uibinder.js @@ -21,7 +21,8 @@ const VIEWS = { loginOffline: '#loginOfflineContainer', settings: '#settingsContainer', welcome: '#welcomeContainer', - waiting: '#waitingContainer' + waiting: '#waitingContainer', + dynmap: '#dynmapContainer' } // The currently shown view container. diff --git a/app/dynmap.ejs b/app/dynmap.ejs new file mode 100644 index 0000000..611685c --- /dev/null +++ b/app/dynmap.ejs @@ -0,0 +1,23 @@ + \ No newline at end of file