diff --git a/app/app.ejs b/app/app.ejs index cf42b38f..fbf9ea9f 100644 --- a/app/app.ejs +++ b/app/app.ejs @@ -11,6 +11,7 @@ background-size: cover; } #main { + height: calc(100% - 22px); background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 100%); } @@ -18,7 +19,9 @@ <% include frame.ejs %>
+ <% include welcome.ejs %> <% include login.ejs %> + <% include landing.ejs %>
\ No newline at end of file diff --git a/app/assets/css/launcher.css b/app/assets/css/launcher.css index a97c3a0b..8a4d6a27 100644 --- a/app/assets/css/launcher.css +++ b/app/assets/css/launcher.css @@ -290,7 +290,7 @@ p { align-items: center; height: 100%; width: 100%; - transition: 0.25s ease; + transition: filter 0.25s ease; } /* Login content wrapper. */ @@ -859,62 +859,62 @@ p { ******************************************************************************/ /* Main content container. */ -#main { - height: calc(100% - 22px); +#landingContainer { + height: 100%; } /* Upper content container. */ -#main > #upper { +#landingContainer > #upper { height: 77%; display: flex; } -#main > #upper > #left { +#landingContainer > #upper > #left { display: inline-flex; width: 15%; height: 100%; justify-content: flex-end; } -#main > #upper > #content { +#landingContainer > #upper > #content { display: inline-flex; width: 59%; height: 100%; } -#main > #upper > #right { +#landingContainer > #upper > #right { display: inline-flex; width: 26%; height: 100%; } /* Lower content container. */ -#main > #lower { +#landingContainer > #lower { height: 23%; display: flex; background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0)); } -#main > #lower > #left { +#landingContainer > #lower > #left { height: 100%; width: 33%; display: inline-flex; justify-content: center; } -#main > #lower > #left #content { +#landingContainer > #lower > #left #content { position: relative; top: 25px; display: inline-flex; line-height: 24px; left: 50px; } -#main > #lower > #center { +#landingContainer > #lower > #center { height: 100%; width: 34%; display: inline-flex; justify-content: center; } -#main > #lower > #center #content { +#landingContainer > #lower > #center #content { position: relative; top: 10px; } -#main > #lower > #right { +#landingContainer > #lower > #right { height: 100%; width: 33%; display: inline-flex; @@ -1186,7 +1186,7 @@ p { * * */ /* Main launch content container. */ -#main > #lower > #right #launch_content { +#landingContainer > #lower > #right #launch_content { position: relative; top: 25px; display: inline-flex; diff --git a/app/assets/js/actionbinder.js b/app/assets/js/actionbinder.js index 1a6e794d..2dfb43d4 100644 --- a/app/assets/js/actionbinder.js +++ b/app/assets/js/actionbinder.js @@ -14,6 +14,15 @@ let launch_content, launch_details, launch_progress, launch_progress_label, laun // Synchronous Listener document.addEventListener('readystatechange', function(){ + + if (document.readyState === 'complete'){ + if(ConfigManager.isFirstLaunch()){ + $('#welcomeContainer').fadeIn(500) + } else { + $('#landingContainer').fadeIn(500) + } + } + if (document.readyState === 'interactive'){ // Save a reference to the launch elements. diff --git a/app/assets/js/configmanager.js b/app/assets/js/configmanager.js index b789afa9..8899d134 100644 --- a/app/assets/js/configmanager.js +++ b/app/assets/js/configmanager.js @@ -7,6 +7,8 @@ const uuidV4 = require('uuid/v4') const sysRoot = process.env.APPDATA || (process.platform == 'darwin' ? process.env.HOME + '/Library/Application Support' : '/var/local') const dataPath = path.join(sysRoot, '.westeroscraft') +const firstLaunch = !fs.existsSync(dataPath) + function resolveMaxRAM(){ const mem = os.totalmem() return mem >= 8000000000 ? '4G' : (mem >= 6000000000 ? '3G' : '2G') @@ -88,6 +90,16 @@ exports.getLauncherDirectory = function(){ return dataPath } +/** + * Check to see if this is the first time the user has launched the + * application. This is determined by the existance of the data path. + * + * @returns {boolean} True if this is the first launch, otherwise false. + */ +exports.isFirstLaunch = function(){ + return firstLaunch +} + // System Settings (Unconfigurable on UI) /** diff --git a/app/landing.ejs b/app/landing.ejs new file mode 100644 index 00000000..2afc2daa --- /dev/null +++ b/app/landing.ejs @@ -0,0 +1,144 @@ + \ No newline at end of file diff --git a/app/login.ejs b/app/login.ejs index 3ee8c9ec..2689c2d9 100644 --- a/app/login.ejs +++ b/app/login.ejs @@ -1,4 +1,4 @@ -
+