Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: webpage toggle, sound notification, fix evga links (#52)
Co-authored-by: Evan Gentis <evan.gentis@gmail.com> Co-authored-by: Jef LeCompte <jeffreylec@gmail.com>
- Loading branch information
1 parent
25643c4
commit a217409
Showing
11 changed files
with
89 additions
and
5 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
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 |
---|---|---|
|
@@ -6,3 +6,7 @@ node_modules/ | |
|
||
.env | ||
success-*.png | ||
|
||
*.wav | ||
*.mp3 | ||
*.flac |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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,25 @@ | ||
import playerLib = require('play-sound'); | ||
import {Config} from '../config'; | ||
import {Logger} from '../logger'; | ||
import * as fs from 'fs'; | ||
|
||
const notificationSound = './resources/sounds/' + Config.notifications.playSound; | ||
const player = playerLib(); | ||
|
||
export default function playSound() { | ||
// Check if file exists | ||
fs.access(notificationSound, fs.constants.F_OK, err => { | ||
if (err) { | ||
Logger.error(`error opening sound file: ${err.message}`); | ||
return; | ||
} | ||
|
||
player.play(notificationSound, (err: string) => { | ||
Logger.info('✔ playing sound'); | ||
|
||
if (err) { | ||
Logger.error(`error playing sound: ${err}`); | ||
} | ||
}); | ||
}); | ||
} |
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
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 @@ | ||
declare module 'play-sound'; |