From 09b9962b552b964156a3d86836c0a9cb153e1b89 Mon Sep 17 00:00:00 2001 From: vaverix Date: Fri, 15 May 2020 21:54:12 +0200 Subject: [PATCH] Update to version 0.0.9 --- package.json | 2 +- src/main/index.js | 11 +++-- src/renderer/App.vue | 97 +++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 104 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index b156259..2f5f79c 100644 --- a/package.json +++ b/package.json @@ -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.8", + "version": "0.0.9", "license": "MIT", "scripts": { "dev": "electron-webpack dev", diff --git a/src/main/index.js b/src/main/index.js index 0214d58..315cbb1 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -374,8 +374,16 @@ const getBTTVEmotes = (channel) => { bttvEmoteCache.data[channel] = [] } bttvEmoteCache.data[channel].push(n) + bttvEmoteCache.data[channel] = underscore.uniq( + bttvEmoteCache.data[channel], + 'code' + ) } else { bttvEmoteCache.data.global.push(n) + bttvEmoteCache.data.global = underscore.uniq( + bttvEmoteCache.data.global, + 'code' + ) } mainWindow.webContents.send('channel:emotes', bttvEmoteCache) }) @@ -484,9 +492,6 @@ ipcMain.on('app:login', (e, data) => { let searchFor = String(val).toLowerCase().trim() if (message.toLowerCase().indexOf(searchFor) != -1) notify = true }) - console.log(lookFor) - console.log(message) - console.log(notify) if (notify) { mainWindow.webContents.send('channel:notification', msg) } diff --git a/src/renderer/App.vue b/src/renderer/App.vue index c6620a3..70092df 100644 --- a/src/renderer/App.vue +++ b/src/renderer/App.vue @@ -130,6 +130,7 @@ >
@@ -171,7 +172,7 @@ />
-
+
+ + +
+ + +
@@ -478,6 +529,7 @@ export default { __keywords: '', }, showAdvancedOptions: false, + showEmotesMenu: false, loggedIn: false, isConnected: false, disableLogin: false, @@ -538,6 +590,7 @@ export default { } }, pickChannel(channel) { + this.showEmotesMenu = false this.currentChannel = channel if (this.options && this.options['__streampreview']) { this.dragStreamPreview() @@ -671,6 +724,16 @@ export default { }) return newMessage }, + addToMessage(text) { + this.input[this.currentChannel] += ` ${text} ` + this.$forceUpdate() + try { + this.$el.querySelector('#input_message_' + this.currentChannel).focus() + } catch (e) { + // empty + } + this.showEmotesMenu = false + }, versionClick() { ipcRenderer.send('dev:openDevTools', {}) }, @@ -966,7 +1029,7 @@ body, display: inline-grid; } #swipe-notifications .input-field { - display: none; + display: none !important; } .relative { position: relative; @@ -1029,6 +1092,36 @@ input, font-size: 13px; padding: 0 10px; } +.btn-emotes { + position: relative; +} +.emotes-menu { + display: none; + position: absolute; + border: 1px solid #313131; + background: #252525; + padding: 0 10px; + top: -253px; + left: -78px; + height: 250px; + overflow-y: auto; + width: 170px; + z-index: 1; +} +.emotes-menu.open { + display: block; +} +.emotes-menu .emote.link { + margin: 1px 2px; +} +.btn-emotes i { + font-size: 13px; + filter: grayscale(1); +} +.flow-root { + display: table !important; + display: flow-root !important; +} .input-field .prefix.active { color: #9b6aff; }