-
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
0 parents
commit f58b227
Showing
21 changed files
with
18,598 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,2 @@ | ||
node_modules | ||
dist |
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,5 @@ | ||
## SubaTimer | ||
|
||
**SubaTimer** is a little Windows utility that makes easy bla bla bla. | ||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,7 @@ | ||
{ | ||
"dest": "dist/installers/", | ||
"icon": "resources/Icon.ico", | ||
"tags": [ | ||
"Utility" | ||
] | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,73 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>SubaTimer v2.0</title> | ||
<link rel="stylesheet" href="style.css"> | ||
</head> | ||
<body> | ||
<div id="app"> | ||
<h3>Settings</h3> | ||
<div> | ||
<div class="settings-item"> | ||
<label>1 Sub Value in Minutes</label> | ||
<input v-model="subsValue" type="text"> | ||
</div> | ||
|
||
<div class="settings-item"> | ||
<label>1 Bit Value in Seconds </label> | ||
<input v-model="bitsValue" type="text"> | ||
</div> | ||
|
||
<div class="settings-item"> | ||
<label>1 Dollar Value in Minutes </label> | ||
<input v-model="donationValue" type="text"> | ||
</div> | ||
|
||
</div> | ||
|
||
<div class="timer-section"> | ||
<h3>Timer</h3> | ||
<label>Note: OBS_TIMER file is now saved on your desktop</label> | ||
<input v-model="timer" class="countdown"></input> <span v-if="showingNotice">{{notice}}</span> | ||
<button class="timer-button" v-if="!isRunning" @click="startTimer">Start Timer</button> | ||
<button class="timer-button" v-if="isRunning" @click="stopTimer">Stop Timer</button> | ||
</div> | ||
|
||
<div class="time-update"> | ||
<h3>Update Time</h3> | ||
<div class="update-item"> | ||
<label>Enter Subs</label> | ||
<input type="text" v-model="subsToAdd"> | ||
<div class="update-item-buttons"> | ||
<button @click="subsReceived('add')">Add To Time</button> <button @click="subsReceived('remove')">Remove From Time</button> | ||
</div> | ||
</div> | ||
|
||
<div class="update-item"> | ||
<label>Enter Bits</label> | ||
<input type="text" v-model="bitsToAdd"> | ||
<div class="update-item-buttons"> | ||
<button @click="bitsReceived('add')">Add To Time</button> <button @click="bitsReceived('remove')">Remove From Time</button> | ||
</div> | ||
</div> | ||
|
||
<div class="update-item"> | ||
<label>Enter Donation Amount</label> | ||
<input type="text" v-model="donationsToAdd"> | ||
<div class="update-item-buttons"> | ||
<button @click="bucksReceived('add')">Add To Time</button> <button @click="bucksReceived('remove')">Remove From Time</button> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
<footer>Made with ❤️ by Goofer</footer> | ||
</div> | ||
|
||
<script src="scripts/vue.global.js"></script> | ||
<script src="scripts/moment.min.js"></script> | ||
<script src="timer.js"></script> | ||
</body> | ||
</html> |
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,51 @@ | ||
const { app, BrowserWindow } = require('electron') | ||
const path = require('path') | ||
|
||
if (require('electron-squirrel-startup')) app.quit() | ||
|
||
function createWindow() { | ||
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 (win) { | ||
if (win.isMinimized()) win.restore() | ||
win.focus() | ||
} | ||
}) | ||
} | ||
const win = new BrowserWindow({ | ||
width: 800, | ||
height: 600, | ||
icon: 'resources/Icon.ico', | ||
|
||
webPreferences: { | ||
// devTools: true, | ||
preload: path.join(__dirname, 'preload.js'), | ||
nodeIntegration: true, | ||
contextIsolation: false | ||
} | ||
}) | ||
|
||
win.loadFile('index.html') | ||
win.setMenu(null) | ||
} | ||
|
||
app.whenReady().then(() => { | ||
createWindow() | ||
|
||
app.on('activate', () => { | ||
if (BrowserWindow.getAllWindows().length === 0) { | ||
createWindow() | ||
} | ||
}) | ||
}) | ||
|
||
app.on('window-all-closed', () => { | ||
if (process.platform !== 'darwin') { | ||
app.quit() | ||
} | ||
}) |
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,21 @@ | ||
{ | ||
"name": "SubaTimer", | ||
"version": "2.0.0", | ||
"main": "main.js", | ||
"author": "Goofer", | ||
"license": "MIT", | ||
"description": "A timer app for Subathons", | ||
"scripts": { | ||
"start": "electron .", | ||
"build": "npx electron-packager . SubaTimer --platform win32 --arch x64 --out dist/ --icon=./resources/Icon.ico", | ||
"installer": "electron-installer-windows --src dist/SubaTimer-win32-x64/ --config config.json" | ||
}, | ||
"devDependencies": { | ||
"electron": "^19.0.8", | ||
"electron-packager": "^15.5.1" | ||
}, | ||
"dependencies": { | ||
"electron-installer-windows": "^3.0.0", | ||
"electron-squirrel-startup": "^1.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,10 @@ | ||
window.addEventListener('DOMContentLoaded', () => { | ||
const replaceText = (selector, text) => { | ||
const element = document.getElementById(selector) | ||
if (element) element.innerText = text | ||
} | ||
|
||
for (const type of ['chrome', 'node', 'electron']) { | ||
replaceText(`${type}-version`, process.versions[type]) | ||
} | ||
}) |
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.