This commit is contained in:
2023-08-29 20:06:52 +02:00
parent 7c2eec4446
commit 25702c073a
225 changed files with 1071 additions and 808 deletions

34
Backend/dist/Core.js vendored
View File

@@ -1,4 +1,4 @@
exports.__esModule = true;
Object.defineProperty(exports, "__esModule", { value: true });
var fs_1 = require("fs");
var fs_extra_1 = require("fs-extra");
var os_1 = require("os");
@@ -18,7 +18,7 @@ var bonjour = bnj();
Undecked = {
DEVMODE: process.argv.includes('--dev'),
quality: 96,
dataPath: path.join(os_1.homedir(), 'MorphixProductions', 'Undecked'),
dataPath: path.join((0, os_1.homedir)(), 'MorphixProductions', 'Undecked'),
FileHandler: new FileHandler_1.FileHandler(),
WebServer: new WebServer_1.WebServer(),
SocketServer: new SocketServer_1.SocketServer(),
@@ -36,7 +36,7 @@ Undecked = {
}
};
Undecked.start = function () {
Logger_1.Log('info', 'Starting Undecked');
(0, Logger_1.Log)('info', 'Starting Undecked');
var start = function () {
return Undecked.FileHandler.load(function () {
Undecked.Decks.load(function () {
@@ -46,7 +46,7 @@ Undecked.start = function () {
Undecked.Connections.load(function () {
Undecked.WebServer.start(function (server) {
Undecked.SocketServer.start(server, function () {
Logger_1.Log('info', 'Undecked started');
(0, Logger_1.Log)('info', 'Undecked started');
try {
bonjour.publish({
name: Undecked.getName(),
@@ -64,11 +64,11 @@ Undecked.start = function () {
});
});
};
fs_extra_1.pathExists(path.join(os_1.homedir(), 'GetiyoSoftware', 'Undecked'), function (err, exists) {
(0, fs_extra_1.pathExists)(path.join((0, os_1.homedir)(), 'GetiyoSoftware', 'Undecked'), function (err, exists) {
if (err)
throw err;
if (exists)
fs_extra_1.move(path.join(os_1.homedir(), 'GetiyoSoftware', 'Undecked'), Undecked.dataPath, function (err) {
(0, fs_extra_1.move)(path.join((0, os_1.homedir)(), 'GetiyoSoftware', 'Undecked'), Undecked.dataPath, function (err) {
if (err)
throw err;
start();
@@ -96,30 +96,30 @@ Undecked.convert = function () {
var outputBlackDir = path.join(__filename, '..', '..', '..', 'Static', 'materialicons', 'black');
var inputWhiteDir = path.join("C:\\Users\\Mees\\Pictures\\materialicons\\white");
var inputBlackDir = path.join("C:\\Users\\Mees\\Pictures\\materialicons\\black");
fs_extra_1.ensureDir(outputWhiteDir, function (err) {
(0, fs_extra_1.ensureDir)(outputWhiteDir, function (err) {
if (err)
throw err;
fs_extra_1.ensureDir(inputBlackDir, function (err) {
(0, fs_extra_1.ensureDir)(inputBlackDir, function (err) {
if (err)
throw err;
fs_1.readdir(path.join(inputBlackDir), function (err, files) {
(0, fs_1.readdir)(path.join(inputBlackDir), function (err, files) {
if (err)
throw err;
console.log("Found " + files.length + " icons");
console.log("Found ".concat(files.length, " icons"));
(function handleCopy(i) {
if (i === void 0) { i = 0; }
if (files[i]) {
var inputWhite = path.join(inputWhiteDir, files[i], 'sharp.png');
var inputBlack = path.join(inputBlackDir, files[i], 'sharp.png');
var outputWhite = path.join(outputWhiteDir, files[i] + "_low.png");
var outputBlack = path.join(outputBlackDir, files[i] + "_low.png");
fs_extra_1.copy(inputWhite, outputWhite, function (err) {
var outputWhite = path.join(outputWhiteDir, "".concat(files[i], "_low.png"));
var outputBlack = path.join(outputBlackDir, "".concat(files[i], "_low.png"));
(0, fs_extra_1.copy)(inputWhite, outputWhite, function (err) {
if (err)
console.log("Error whilst copying white '" + files[i] + "'");
fs_extra_1.copy(inputBlack, outputBlack, function (err) {
console.log("Error whilst copying white '".concat(files[i], "'"));
(0, fs_extra_1.copy)(inputBlack, outputBlack, function (err) {
if (err)
console.log("Error whilst copying black '" + files[i] + "'");
console.log("Completed convertion on " + (i + 1) + "/" + files.length);
console.log("Error whilst copying black '".concat(files[i], "'"));
console.log("Completed convertion on ".concat(i + 1, "/").concat(files.length));
handleCopy(i + 1);
});
});