Skip to content

Commit

Permalink
0.0.26
Browse files Browse the repository at this point in the history
  • Loading branch information
xDeltaFox committed Dec 24, 2017
1 parent f2e6e40 commit 2914d5c
Show file tree
Hide file tree
Showing 16 changed files with 646 additions and 1,147 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ app/lib
app/public/img/games
DB
config.json
to

# =========================
# Operating System Files
Expand Down
84 changes: 51 additions & 33 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,13 @@
const {
app,
autoUpdater,
BrowserView,
BrowserWindow,
BrowserWindowProxy,
ClientRequest,
clipboard,
contentTracing,
Cookies,
crashReporter,
Debugger,
desktopCapturer,
dialog,
DownloadItem,
globalShortcut,
IncomingMessage,
ipcMain,
ipcRenderer,
Menu,
MenuItem,
nativeImage,
net,
powerSaveBlocker,
protocol,
remote,
session,
shell,
systemPreferences,
TouchBar,
Tray,
webContents,
webFrame,
WebRequest,
webviewTag
remote
} = require('electron');

const isDev = require('electron-is-dev'); // this is required to check if the app is running in development mode.
const { appUpdater } = require('./appUpdate.js');
autoUpdater.setFeedURL("https://github.com/xDeltaFox/InfinityApp/releases/latest/");

const fs = require('fs');
const os = require('os');
Expand Down Expand Up @@ -129,7 +100,7 @@ function setupSystemTray() {
log.info("Iniciando o icone na bandeja do sistema...");
var SystemTray = require('./SystemTray');
if (!systemTray) {
systemTray = new SystemTray(mainWindow, appUpdater, { myName, appVersion, buildVersion });
systemTray = new SystemTray(mainWindow, autoUpdater.checkForUpdates(), { myName, appVersion, buildVersion });
}
}

Expand Down Expand Up @@ -238,7 +209,7 @@ function createwindow(isVisible, options) {
mainWindow.webContents.once('did-frame-finish-load', () => {
const checkOS = isWindowsOrmacOS();
if (checkOS && !isDev) {
appUpdater();
autoUpdater.checkForUpdates();
}
});

Expand Down Expand Up @@ -268,6 +239,11 @@ function createwindow(isVisible, options) {
});
}

function sendStatusToWindow(to, text) {
log.info(`${to} >> ${text}`);
mainWindow.webContents.send(to, text);
}

app.on('ready', function() {
createslash();
log.info(`Estou, Pronto!\n{platform: ${process.platform}}`);
Expand All @@ -292,6 +268,46 @@ app.on('before-quit', function(e) {
}
});

//----------------------------------------
//--------------autoUpdater---------------
//----------------------------------------

autoUpdater.on('checking-for-update', () => {
sendStatusToWindow('updatetext', 'Buscando atualizações...');
});

autoUpdater.on('update-available', (info) => {
sendStatusToWindow('updatetext', 'Atualização disponivel');
});

autoUpdater.on('update-not-available', (info) => {
sendStatusToWindow('updatetext', 'Está é a ultima versão.');
});

autoUpdater.on('error', (err) => {
sendStatusToWindow('updatetext', 'Erro ao atualizar.');
});

autoUpdater.on('download-progress', (progressObj) => {
let speed = ((progressObj.bytesPerSecond / 1000) / 1000).toFixed(1);
let transferred = ((progressObj.transferred / 1000) / 1000).toFixed(1);
let total = ((progressObj.total / 1000) / 1000).toFixed(1);
let percent = progressObj.percent.toFixed(1);

let log_message = "Velocidade: " + speed + " Mb/s";
log_message = log_message + ' - Baixado: ' + percent + '%';
log_message = log_message + ' (' + transferred + "/" + total + ')';
sendStatusToWindow('updatetext', log_message);
});

autoUpdater.on('update-downloaded', (info) => {
sendStatusToWindow('updatetext', 'Atualização baixada, em 5 segundos será instalada.');

setTimeout(function() {
autoUpdater.quitAndInstall();
}, 5000)
});

module.exports = {
app,
remote,
Expand All @@ -302,7 +318,9 @@ module.exports = {
login
}

//---------------------------------------
//---------------FUNCTIONS---------------
//---------------------------------------

function isWindowsOrmacOS() {
return process.platform === 'darwin' || process.platform === 'win32';
Expand Down
9 changes: 9 additions & 0 deletions app/public/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ span.username-2eY8s9 {

/* App */

.uploadbox {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 10;
}

.app {
position: absolute;
width: 100%;
Expand Down
47 changes: 34 additions & 13 deletions app/public/css/games.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
margin: 0 auto;
}

.gameview-add {
.gameview-add,
.gameview-edit {
position: fixed;
top: 0;
right: 0;
Expand Down Expand Up @@ -43,7 +44,7 @@

.game-item-T5e87d:hover .game-add-footer .footer-descripition,
.game-add-F58dY4:hover .game-add-footer .footer-descripition,
.game-item-T5e87d:hover .game-options-Ao1t71 {
.game-item-T5e87d:hover .game-buttons-fThe32 {
opacity: 1 !important;
}

Expand Down Expand Up @@ -124,19 +125,25 @@
}

.game-options-Ao1t71 {
fill: white;
}

.game-buttons-fThe32 {
position: absolute;
top: 0;
right: 0;
width: 50px;
height: 50px;
background: #2b2929;
border-radius: 40px 0px 0px 40px;
margin-top: 5px;
/* border: 2px solid beige; */
border-right: 2px solid beige;
left: 0;
display: flex;
opacity: 0;
}

.game-options-Ao1t71 {
width: 30px;
height: 30px;
background: #2b2929;
border-radius: 20px;
margin: 2px;
}

.gameview-Te2Y93 label {
color: #fff;
padding: 5px;
Expand Down Expand Up @@ -165,20 +172,34 @@
color: #fff;
}

.gameview-Te2Y93>span {
margin-left: 2px;
color: #fff;
font-weight: 700;
}

.gameview-Te2Y93 span {
margin-left: 10px;
color: #fff;
font-weight: 600;
font-weight: 400;
}

.comfirm-Te2Y93 span {
.comfirm-Te2Y93 span,
.comfirm-ht95e2 span {
color: #fff;
padding: 4px 10px;
margin: 5px;
border: 1px solid white;
border-radius: 3px;
}

.comfirm-Te2Y93 span:hover {
.comfirm-Te2Y93 span:hover,
.comfirm-ht95e2 span:hover {
background: #17b006;
}

.game-edit-Dg4jk0 {
width: 20px;
height: 20px;
margin: 1px;
}
27 changes: 9 additions & 18 deletions app/public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,6 @@ input:focus {
}

.win-buttons {
width: 65px;
height: 20px;
position: absolute;
top: 0;
right: 0;
Expand All @@ -180,30 +178,15 @@ input:focus {
}

.win-buttons button {
width: 20px;
height: 20px;
background-size: 20px;
background-position: 50%;
opacity: .6;
-webkit-app-region: no-drag;
padding: 0;
}

.win-buttons button:hover {
opacity: 1
}

.win-minimize {
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNiIgaGVpZ2h0PSIyNiI+CiAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgIDxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik0xOSAxOXYtMkg3djJoMTJ6Ii8+CiAgICA8cGF0aCBkPSJNMSAyNWgyNFYxSDF2MjR6Ii8+CiAgPC9nPgo8L3N2Zz4=);
}

.win-maximize {
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNiIgaGVpZ2h0PSIyNiI+CiAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgIDxwYXRoIGQ9Ik0xIDFoMjR2MjRIMVYxeiIvPgogICAgPHBhdGggZmlsbD0iI0ZGRiIgZD0iTTggMTNINnY3aDd2LTJIOHYtNXptLTIgMGgyVjhoNVY2SDZ2N3ptNyA1djJoN3YtN2gtMnY1aC01em0wLTEydjJoNXY1aDJWNmgtN3oiLz4KICA8L2c+Cjwvc3ZnPg==);
}

.win-close {
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNiIgaGVpZ2h0PSIyNiI+CiAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgIDxwYXRoIGQ9Ik0xIDFoMjR2MjRIMVYxeiIvPgogICAgPHBhdGggZmlsbD0iI0ZGRiIgZD0iTTIwIDcuNDFMMTguNTkgNiAxMyAxMS41OSA3LjQxIDYgNiA3LjQxIDExLjU5IDEzIDYgMTguNTkgNy40MSAyMCAxMyAxNC40MSAxOC41OSAyMCAyMCAxOC41OSAxNC40MSAxMyAyMCA3LjQxeiIvPgogIDwvZz4KPC9zdmc+);
}

.separator {
background-color: hsla(240, 6%, 97%, .1);
margin: 0 8px;
Expand Down Expand Up @@ -245,6 +228,14 @@ input:focus {
float: right;
}

.update-box {
position: fixed;
right: 0;
bottom: 0;
padding: 3px 10px;
background: #e4e0e0;
}


/* ABAS */

Expand Down
13 changes: 9 additions & 4 deletions app/public/js/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ $(function() {
$('.downmost').append(`
`);
$(this).removeClass('active');
i = 0;
clearInterval(timeOut);
return;
} else {
// transition-function
// $('.util-app').css('background-color', $(this).css('background-color'));
Expand All @@ -89,7 +93,7 @@ $(function() {
`);

// icon-clone
$('.loading-2Y9J6r').append($(this).contents('.itens-icon').clone());
$('.loading-2Y9J6r').append($(this).children('.have-ot').children('.itens-icon').clone());
$('.loading-2Y9J6r').contents('.itens-icon').css('width', '60px');
$('.loading-2Y9J6r').contents('.itens-icon').css('height', '60px');
$('.loading-2Y9J6r').contents('.itens-icon').css('margin', 'auto');
Expand Down Expand Up @@ -129,10 +133,11 @@ $(function() {
break;
}
}, Math.random() * 1000);
$(this).removeClass('active');
i = 0;
clearInterval(timeOut);
return;
}
$(this).removeClass('active');
i = 0;
clearInterval(timeOut);
});

$('.switch').click(function(event) {
Expand Down
Loading

0 comments on commit 2914d5c

Please sign in to comment.