-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
60 changed files
with
13,381 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
.DS_Store | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
.env.test | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
|
||
# next.js build output | ||
.next | ||
|
||
# nuxt.js build output | ||
.nuxt | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# Webpack | ||
.webpack/ | ||
|
||
# Electron-Forge | ||
out/ | ||
|
||
# Other | ||
src/renderer/js/game/offsets.js | ||
combos/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
{ | ||
"name": "combo-tracker", | ||
"productName": "Combo Tracker", | ||
"version": "1.0.0", | ||
"description": "THUGPRO Combo Tracker", | ||
"main": "./.webpack/main", | ||
"keywords": [], | ||
"author": { | ||
"name": "prevzzy" | ||
}, | ||
"license": "MIT", | ||
"config": { | ||
"forge": { | ||
"packagerConfig": { | ||
"asar": true, | ||
"icon": "./src/static/combo-tracker-icon.ico" | ||
}, | ||
"makers": [ | ||
{ | ||
"name": "@electron-forge/maker-zip" | ||
} | ||
], | ||
"plugins": [ | ||
[ | ||
"@electron-forge/plugin-webpack", | ||
{ | ||
"mainConfig": "./webpack.main.config.js", | ||
"renderer": { | ||
"config": "./webpack.renderer.config.js", | ||
"entryPoints": [ | ||
{ | ||
"html": "./src/renderer/index.html", | ||
"js": "./src/renderer.js", | ||
"name": "main_window", | ||
"nodeIntegration": true | ||
}, | ||
{ | ||
"html": "./src/renderer/toast.html", | ||
"js": "./src/renderer/js/toasts/index.js", | ||
"name": "toast_window", | ||
"nodeIntegration": true | ||
} | ||
] | ||
} | ||
} | ||
] | ||
] | ||
} | ||
}, | ||
"watch": { | ||
"restart-electron-app": { | ||
"patterns": [ | ||
"src" | ||
], | ||
"extensions": "js,css,html" | ||
} | ||
}, | ||
"scripts": { | ||
"start": "electron-forge start", | ||
"package": "electron-forge package", | ||
"make": "electron-forge make", | ||
"publish": "electron-forge publish", | ||
"lint": "echo \"No linting configured\"" | ||
}, | ||
"devDependencies": { | ||
"@electron-forge/cli": "^6.0.0-beta.63", | ||
"@electron-forge/maker-zip": "^6.0.0-beta.63", | ||
"@electron-forge/plugin-webpack": "^6.0.0-beta.63", | ||
"@vercel/webpack-asset-relocator-loader": "^1.7.1", | ||
"copy-webpack-plugin": "^10.2.4", | ||
"css-loader": "^6.7.1", | ||
"electron": "4.0.4", | ||
"native-ext-loader": "^2.3.0", | ||
"style-loader": "^3.3.1" | ||
}, | ||
"dependencies": { | ||
"base-64": "^1.0.0", | ||
"binary-search": "^1.3.6", | ||
"bootstrap": "^4.5.0", | ||
"bootstrap-select": "^1.13.18", | ||
"bootswatch": "4.5.0", | ||
"chart.js": "2.9.4", | ||
"dotenv-webpack": "^7.1.0", | ||
"electron-settings": "^4.0.2", | ||
"electron-squirrel-startup": "^1.0.0", | ||
"eslint": "^7.3.0", | ||
"file-loader": "^6.2.0", | ||
"jquery": "^3.5.1", | ||
"material-icons": "^1.10.8", | ||
"memoryjs": "^3.4.0", | ||
"node-gyp-build": "^4.3.0", | ||
"popper.js": "^1.16.1", | ||
"rimraf": "^3.0.2", | ||
"source-map-support": "^0.5.16", | ||
"stream-browserify": "^3.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import { app, globalShortcut } from 'electron' | ||
import { initIpcEvents } from './main/events/listeners' | ||
import { createAppWindows } from './main/browserWindows/browserWindows' | ||
import { initSettings } from './main/settings/settings' | ||
|
||
let mainWindow | ||
let toastWindow | ||
|
||
// Handle creating/removing shortcuts on Windows when installing/uninstalling. | ||
if (require('electron-squirrel-startup')) { | ||
app.quit(); | ||
} | ||
|
||
app.allowRendererProcessReuse = false | ||
const gotTheLock = app.requestSingleInstanceLock() | ||
|
||
if (!gotTheLock) { | ||
app.quit() | ||
} else { | ||
app.on('second-instance', (event, commandLine, workingDirectory) => { | ||
// Someone tried to run a second instance, we should focus our window. | ||
if (mainWindow) { | ||
if (mainWindow.isMinimized()) { | ||
mainWindow.restore() | ||
} | ||
mainWindow.focus() | ||
} | ||
}) | ||
|
||
// Create mainWindow, load the rest of the app, etc... | ||
app.whenReady().then(async () => { | ||
({ | ||
mainWindow, | ||
toastWindow, | ||
} = createAppWindows()) | ||
|
||
await initSettings(mainWindow, toastWindow) | ||
initIpcEvents(mainWindow, toastWindow) | ||
|
||
mainWindow.on('close', () => { | ||
toastWindow.close() | ||
}) | ||
}) | ||
} | ||
|
||
app.on('will-quit', () => { | ||
globalShortcut.unregisterAll() | ||
}) | ||
|
||
app.on('window-all-closed', () => { | ||
if (process.platform !== 'darwin') { | ||
app.quit() | ||
} | ||
}) | ||
|
||
app.on('activate', () => { | ||
// On OS X it's common to re-create a window in the app when the | ||
// dock icon is clicked and there are no other windows open. | ||
if (BrowserWindow.getAllWindows().length === 0) { | ||
createWindow(); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
|
||
import url from 'url' | ||
import electron from 'electron' | ||
import { BrowserWindow } from 'electron' | ||
import { mainWindowConfig, toastWindowConfig } from './windowsConfig' | ||
|
||
function createBrowserWindow(config) { | ||
// needed for relative window position | ||
const display = electron.screen.getPrimaryDisplay() | ||
|
||
let win = new BrowserWindow(config.getBrowserWindowConfig(display)) | ||
win.loadURL(url.format(config.url)) | ||
|
||
if (config.showOnAppLaunch) { | ||
win.once('ready-to-show', () => { | ||
win.show() | ||
}) | ||
} | ||
|
||
if (config.preventMultiple) { | ||
win.webContents.on('new-window', (event, url) => { | ||
event.preventDefault() | ||
}) | ||
} | ||
|
||
return win | ||
} | ||
|
||
export function createAppWindows() { | ||
const mainWindow = createBrowserWindow(mainWindowConfig) | ||
const toastWindow = createBrowserWindow(toastWindowConfig) | ||
|
||
return { | ||
mainWindow, | ||
toastWindow, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
export const mainWindowConfig = { | ||
getBrowserWindowConfig(display) { | ||
return { | ||
width: 1280, | ||
height: 768, | ||
minWidth: 600, | ||
minHeight: 500, | ||
frame: false, | ||
webPreferences: { | ||
nodeIntegration: true, | ||
preload: MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY | ||
}, | ||
} | ||
}, | ||
url: { | ||
pathname: MAIN_WINDOW_WEBPACK_ENTRY, | ||
}, | ||
showOnAppLaunch: true, | ||
preventMultiple: true, | ||
} | ||
|
||
export const toastWindowConfig = { | ||
getBrowserWindowConfig(display) { | ||
return { | ||
height: 700, | ||
width: 300, | ||
x: display.bounds.width - 300, | ||
y: 150, | ||
frame: false, | ||
alwaysOnTop: true, | ||
resizable: false, | ||
movable: false, | ||
show: false, | ||
skipTaskbar: true, | ||
transparent: true, | ||
webPreferences: { | ||
nodeIntegration: true, | ||
preload: TOAST_WINDOW_PRELOAD_WEBPACK_ENTRY, | ||
}, | ||
} | ||
}, | ||
url: { | ||
pathname: TOAST_WINDOW_WEBPACK_ENTRY, | ||
}, | ||
preventMultiple: true, | ||
} |
Oops, something went wrong.