Skip to content
This repository was archived by the owner on Apr 18, 2022. It is now read-only.

Commit afeba8d

Browse files
committed
Fixed client and prepare downloads
Fixed client and prepare downloads
1 parent 24cb54e commit afeba8d

7 files changed

Lines changed: 95 additions & 156 deletions

File tree

client/app/.mcscriptStudioCode

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"backup":{"openedFiles":{}}}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.mcscriptStudioCodeIgnore
2+
.mcscriptStudioCode

client/app/client.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
// Modules to control application life and create native browser window
2-
const {app, BrowserWindow} = require('electron')
2+
const {app, BrowserWindow, dialog} = require('electron')
33
const fs = require("fs")
4+
const server = require("mcscriptstudiocodehost");
5+
46
require('electron-debug')({showDevTools: false}); // Debugs
57
require("./util.js")
68
var icon = __dirname + '/assets/images/icon.png';
79

10+
11+
812
// Keep a global reference of the window object, if you don't, the window will
913
// be closed automatically when the JavaScript object is garbage collected.
1014
let mainWindow
1115

12-
function createWindow () {
16+
async function createWindow () {
17+
18+
server["default"](dialog.showOpenDialog({properties: ['openFile', 'openDirectory', 'multiSelections']}),mcscriptStudioCode.util.address.port);
19+
1320
// Create the browser window.
1421
mainWindow = new BrowserWindow({width: 800, height: 600, maximized: true, icon: icon})
1522

client/app/package-lock.json

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/app/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
},
2323
"homepage": "https://github.com/miniminelp/mcscriptstudiocode#readme",
2424
"dependencies": {
25-
"electron-debug": "^2.0.0"
25+
"electron-debug": "^2.0.0",
26+
"electron-prompt": "^1.2.0",
27+
"mcscriptstudiocodehost": "0.0.1"
2628
},
2729
"devDependencies": {
2830
"electron": "^2.0.7"

client/app/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ global.mcscriptStudioCode = {
22
util: {
33
address: {
44
host: "localhost",
5-
port: 80,
5+
port: 5050,
66
protocol: "http",
77
toString: function() {return `${mcscriptStudioCode.util.address.protocol}://${mcscriptStudioCode.util.address.host}:${mcscriptStudioCode.util.address.port}/`;}
88
}

0 commit comments

Comments
 (0)