Skip to content

Commit

Permalink
Update to version 0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
vaverix committed Apr 30, 2020
1 parent 199333e commit 6feb8e2
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vaverix-twitch-bot",
"description": "Desktop application that allows you to log-in into multiple Twitch.tv channels at once. It also notifies you when someone mentions you in any channel you choose and has couple of other extra features.",
"author": "vaverix",
"version": "0.0.2",
"version": "0.0.3",
"license": "MIT",
"scripts": {
"dev": "electron-webpack dev",
Expand Down
20 changes: 17 additions & 3 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ const bttvEmoteCache = {
urlTemplate: '//cdn.betterttv.net/emote/{{id}}/{{image}}',
}

// autoupdater
autoUpdater.logger = require('electron-log')
autoUpdater.logger.transports.file.level = 'info'

// build menu
const template = [
// { role: 'appMenu' }
Expand Down Expand Up @@ -122,6 +126,17 @@ const template = [
: [{ role: 'close' }]),
],
},
{
label: 'Update',
submenu: [
{
label: 'Check for update',
click: () => {
autoUpdater.checkForUpdatesAndNotify()
},
},
],
},
{
role: 'help',
submenu: [
Expand Down Expand Up @@ -228,10 +243,9 @@ app.on('activate', () => {
// create main BrowserWindow when electron is ready
app.on('ready', () => {
mainWindow = createMainWindow()
// autoupdater
autoUpdater.logger = require('electron-log')
autoUpdater.logger.transports.file.level = 'info'
// check for updates
autoUpdater.checkForUpdatesAndNotify()
setInterval(autoUpdater.checkForUpdatesAndNotify, 600000)
})

const getWindowPosition = () => {
Expand Down
43 changes: 36 additions & 7 deletions src/renderer/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,11 @@
<h6>Options</h6>
<div class="options">
<p>
<label>
<label
class="tooltipped"
data-position="top"
data-tooltip="Scroll messages container to the bottom when a new message appears"
>
<input
v-model="options['__autoscroll']"
@change="updateOptions()"
Expand All @@ -258,7 +262,11 @@
</label>
</p>
<p>
<label>
<label
class="tooltipped"
data-position="top"
data-tooltip="Hide the app to the Windows tray when it loses focus"
>
<input
v-model="options['__autohide']"
@change="updateOptions()"
Expand All @@ -268,7 +276,11 @@
</label>
</p>
<p>
<label>
<label
class="tooltipped"
data-position="top"
data-tooltip="Enable Windows notifications"
>
<input
v-model="options['__notifications']"
@change="updateOptions()"
Expand All @@ -278,7 +290,11 @@
</label>
</p>
<p>
<label>
<label
class="tooltipped"
data-position="top"
data-tooltip="Enable in-app notifications"
>
<input
v-model="options['__toasts']"
@change="updateOptions()"
Expand All @@ -288,7 +304,11 @@
</label>
</p>
<p>
<label>
<label
class="tooltipped"
data-position="top"
data-tooltip="Enable sound que when a new notification appears"
>
<input
v-model="options['__soundalerts']"
@change="updateOptions()"
Expand All @@ -298,7 +318,11 @@
</label>
</p>
<p>
<label>
<label
class="tooltipped"
data-position="top"
data-tooltip="Enable Twitch.tv stream preview (performance and memory heavy feature since it actually loads Twitch player embeded)"
>
<input
v-model="options['__streampreview']"
@change="updateOptions()"
Expand Down Expand Up @@ -586,6 +610,8 @@ export default {
materializeScript.onload = () => {
// enable materialize.css javascript
M.AutoInit() // eslint-disable-line
// enable materialize.css tooltips
M.Tooltip.init(document.querySelectorAll('.tooltipped')) // eslint-disable-line
}
document.head.appendChild(materializeScript)
// add fonts
Expand Down Expand Up @@ -674,7 +700,10 @@ export default {
self.notifications.push(item)
self.$forceUpdate()
self.scrollBottom(`#scrollable-notifications`)
self.showNotification('vaverixBot', `[#${item.channel}]: ${item.message}`)
self.showNotification(
'vaverixBot',
`[#${item.channel}] @${item.username}: ${item.message}`
)
})
ipcRenderer.on('channel:list', (e, item) => {
self.channels = item
Expand Down

0 comments on commit 6feb8e2

Please sign in to comment.