diff options
| author | 8cy <[email protected]> | 2020-06-22 17:22:30 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-06-22 17:22:30 -0700 |
| commit | 02c1568c654f8aaef98464de9006c00aa30e980b (patch) | |
| tree | 22d6e1c1ccb30aa54fba223fdeea7ba1737e4078 | |
| parent | Merge pull request #1 from 8cy/test (diff) | |
| download | monkey-type-desktop-02c1568c654f8aaef98464de9006c00aa30e980b.tar.xz monkey-type-desktop-02c1568c654f8aaef98464de9006c00aa30e980b.zip | |
fix formatting from linter
| -rw-r--r-- | README.MD | 3 | ||||
| -rw-r--r-- | config.js | 18 | ||||
| -rw-r--r-- | index.js | 18 | ||||
| -rw-r--r-- | menu.js | 12 | ||||
| -rw-r--r-- | package.json | 2 | ||||
| -rw-r--r-- | test/config.js | 24 |
6 files changed, 39 insertions, 38 deletions
@@ -21,5 +21,8 @@ You can set your own rich presence values with that information. Currently, only Windows builds are in the release section, however, you can build Linux or Mac using the `$ npm run dist` script along side your platforms flag; `--windows`, `--linux` or `--mac`. +### Other Info +Feel free to run lint yourself via `$ yarn xo`. + ### License MIT
\ No newline at end of file @@ -5,17 +5,17 @@ module.exports = new Store({ defaults: { debugEnable: false, menuEnable: true, - configCookieOverwrite: "", + configCookieOverwrite: '', discordRPC: { - clientId: "722389325483999243", + clientId: '722389325483999243', RPC: { - details: "Typing on Monkey Type", - state: "Desktop Application Beta", - smallImageText: "", - smallImageKey: "", - largeImageText: "Monkey Type", - largeImageKey: "icon", - refreshTime: 15, + details: 'Typing on Monkey Type', + state: 'Desktop Application Beta', + smallImageText: '', + smallImageKey: '', + largeImageText: 'Monkey Type', + largeImageKey: 'icon', + refreshTime: 15 } }, dontTouch: { @@ -58,7 +58,7 @@ const createMainWindow = async () => { mainWindow = undefined; }); - await win.loadURL("https://monkey-type.com/"); + await win.loadURL('https://monkey-type.com/'); return win; }; @@ -106,19 +106,19 @@ async function setActivity() { state: config.get('discordRPC').RPC.state, largeImageKey: config.get('discordRPC').RPC.largeImageKey, largeImageText: config.get('discordRPC').RPC.largeImageText, - //smallImageKey: config.get('discordRPC').RPC.smallImageKey, - //smallImageText: config.get('discordRPC').RPC.smallImageText, + // smallImageKey: config.get('discordRPC').RPC.smallImageKey, + // smallImageText: config.get('discordRPC').RPC.smallImageText, startTimestamp: startTimestamp }); } rpc.on('ready', () => { setActivity(); - console.log('initial set'); + console.log('DiscordRPC: Initial set completed.'); setInterval(() => { setActivity(); - console.log('refresh set'); + console.log('DiscordRPC: Refresh set completed.'); }, 15e3); }); @@ -129,11 +129,11 @@ rpc.login({ clientId }).catch(console.error); menuEnable ? Menu.setApplicationMenu(menu) : Menu.setApplicationMenu(null); mainWindow = await createMainWindow(); - //session.defaultSession.cookies.get({}).then(cookies => console.log(cookies)); - + // session.defaultSession.cookies.get({}).then(cookies => console.log(cookies)); + // A more complete and custom config system will be implemented but at the moment you can just transfer your config cookie. if (config.get('configCookieOverwrite').length > 50) { - let configCookie = { name: 'config', value: config.get('configCookieOverwrite') }; - session.defaultSession.cookies.set(configCookie).then(() => {}, (error) => console.error(error)); + const configCookie = { name: 'config', value: config.get('configCookieOverwrite') }; + session.defaultSession.cookies.set(configCookie).then(() => {}, error => console.error(error)); } })(); @@ -171,11 +171,11 @@ const otherTemplate = [ const template = process.platform === 'darwin' ? macosTemplate : otherTemplate; // Ideally, this should be un-commented and only pushed if in debug mode, but I find it pretty useful and chose to keep it in release. -//if (is.development) { - template.push({ - label: 'Debug', - submenu: debugSubmenu - }); -//} +// if (is.development) + +template.push({ + label: 'Debug', + submenu: debugSubmenu +}); module.exports = Menu.buildFromTemplate(template); diff --git a/package.json b/package.json index a0eec34..9836ff1 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,6 @@ "author": "Sin", "scripts": { "postinstall": "electron-builder install-app-deps", - "lint": "xo", - "test": "npm run lint", "start": "electron .", "pack": "electron-builder --dir", "dist": "electron-builder --macos --linux --windows", diff --git a/test/config.js b/test/config.js index 6f3081c..d6dc0d7 100644 --- a/test/config.js +++ b/test/config.js @@ -9,24 +9,24 @@ module.exports = new Store({ debugEnable: false, menuEnable: true, discordRPC: { - clientId: "722389325483999243", + clientId: '722389325483999243', timeEnable: true, RPC: { - details: "Typing on Monkey Type", - state: "Desktop Application Beta", + details: 'Typing on Monkey Type', + state: 'Desktop Application Beta', startTimestamp: 0, endTimestamp: 0, - smallImageText: "", - smallImageKey: "", - largeImageText: "Monkey Type", - largeImageKey: "icon", + smallImageText: '', + smallImageKey: '', + largeImageText: 'Monkey Type', + largeImageKey: 'icon', refreshTime: 15, instance: true, - match: "", - party: "", - partyMax: "", - join: "", - spectate: "" + match: '', + party: '', + partyMax: '', + join: '', + spectate: '' } }, dontTouch: { |