Updated dependencies (delete node_modules, npm install), included windows page script, changed to ejs (for now), initial work on the new design.

react
Daniel Scalzi 2017-08-27 01:13:48 -04:00
parent 6a44694a32
commit 582ea96dfe
15 changed files with 86 additions and 13 deletions

3
.gitignore vendored
View File

@ -1,5 +1,4 @@
/node_modules/
/.vs/
/.vscode/
/mcfiles/
/logs/
/target/

View File

@ -0,0 +1,42 @@
/* Reset body, html, and div presets. */
body, html, div {
margin: 0px;
padding: 0px;
}
body {
background: url('./../images/backgrounds/0.jpg') no-repeat center center fixed;
background-size: cover;
}
#frame_bar {
-webkit-app-region: drag;
background: rgba(1, 2, 1, 0.5);
min-height: 22px;
display: flex;
align-items: center;
}
#button_dock {
margin-left: 2px;
}
.frame_button {
height: 12px;
width: 12px;
border-radius: 50%;
border: 0px;
margin-left: 5px;
}
#frame_button_close {
background-color: #e74c32;
}
#frame_button_restoredown {
background-color: #fed045;
}
#frame_button_minimize {
background-color: #96e734;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 969 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1012 KiB

View File

@ -8,7 +8,7 @@ const fs = require('fs')
const mkpath = require('mkdirp');
function launchMinecraft(versionData, forgeData, basePath){
const authPromise = mojang.auth('nytrocraft@live.com', 'applesrsogood123', uuidV4(), {
const authPromise = mojang.auth('email', 'pass', uuidV4(), {
name: 'Minecraft',
version: 1
})

View File

@ -51,7 +51,7 @@ $(document).on('click', 'a[href^="http"]', function(event) {
testdownloads = async function(){
const lp = require(path.join(__dirname, 'assets', 'js', 'launchprocess.js'))
const basePath = path.join(__dirname, '..', 'mcfiles')
const basePath = path.join(__dirname, '..', 'target', 'test', 'mcfiles')
let versionData = await ag.loadVersionData('1.11.2', basePath)
await ag.validateAssets(versionData, basePath)
console.log('assets done')

8
app/frame.ejs 100644
View File

@ -0,0 +1,8 @@
<div id="frame_bar">
<div id="button_dock">
<button class="frame_button" id="frame_button_close"></button>
<button class="frame_button" id="frame_button_restoredown"></button>
<button class="frame_button" id="frame_button_minimize"></button>
</div>
</div>

13
app/index.ejs 100644
View File

@ -0,0 +1,13 @@
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Westeroscraft Launcher</title>
<script src="./assets/js/script.js"></script>
<link type="text/css" rel="stylesheet" href="./assets/css/launcher.css">
</head>
<body>
<% include frame.ejs %>
<div id="doc">
</div>
</body>
</html>

View File

@ -1,22 +1,25 @@
const {app, BrowserWindow} = require('electron')
const path = require('path')
const url = require('url')
const ejse = require('ejs-electron')
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let win
function createWindow() {
win = new BrowserWindow({ width: 925, height: 500, icon: getPlatformIcon('WesterosSealSquare')})
win = new BrowserWindow({ width: 980, height: 552, icon: getPlatformIcon('WesterosSealSquare'), frame: false})
win.loadURL(url.format({
pathname: path.join(__dirname, 'app', 'index.html'),
pathname: path.join(__dirname, 'app', 'index.ejs'),
protocol: 'file:',
slashes: true
}))
win.setMenu(null)
win.setResizable(true)
win.on('closed', () => {
win = null
})

4
package.bat 100644
View File

@ -0,0 +1,4 @@
@echo off
cmd /k electron-packager . WesterosCraftLauncher --overwrite --asar --platform=win32 --arch=x64 --ignore="\.git(ignore|modules)|package\.bat|node_modules|target" --out="./target" --icon="app/assets/images/WesterosSealSquare.ico"
echo Startup canceled.
pause

View File

@ -2,6 +2,7 @@
"name": "westeroscraftlauncher",
"version": "0.0.1",
"description": "Custom modded launcher for Westeroscraft",
"productName": "WesterosCraft Launcher",
"main": "index.js",
"scripts": {
"start": "electron index.js"
@ -18,13 +19,16 @@
"homepage": "http://www.westeroscraft.com/",
"dependencies": {
"adm-zip": "^0.4.7",
"async": "^2.3.0",
"electron": "^1.6.5",
"extract-zip": "=1.6.0",
"find-java-home": "^0.1.4",
"jQuery": "^1.7.4",
"async": "^2.5.0",
"ejs": "^2.5.7",
"ejs-electron": "^2.0.1",
"find-java-home": "^0.2.0",
"jquery": "^3.2.1",
"mojang": "^0.4.1",
"promise": "^7.1.1",
"uuid": "^3.0.1"
"uuid": "^3.1.0"
},
"devDependencies": {
"electron": "^1.7.5",
"electron-packager": "^9.0.0"
}
}