diff --git a/fontello.config.json b/fontello.config.json index 7ed1fa5a..d2f7c70f 100644 --- a/fontello.config.json +++ b/fontello.config.json @@ -635,6 +635,40 @@ "search": [ "reset player unclicked" ] + }, + { + "uid": "a3d0a62c5abd3e027103287c6702466f", + "css": "whispers", + "code": 59451, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M391.4 650L500 758.6 608.6 650H750V250H250V650H391.4ZM500 900L350 750C310 749.1 269.9 752 230.1 748 178.4 739 144.4 686.4 150 635.7 150.3 503.8 149.3 371.9 150.5 240 154.4 184 210.1 143.7 264.4 150 429.5 150.4 594.8 149.4 760 150.5 816 154.5 856.3 210.1 850 264.4 849.7 396.3 850.7 528.1 849.5 660 845.5 716 789.9 756.4 735.6 750H650L500 900Z", + "width": 1000 + }, + "search": [ + "whispers" + ] + }, + { + "uid": "bc61ebcf2f5d8d08b1e9e62167df7617", + "css": "cake", + "code": 61949, + "src": "fontawesome" + }, + { + "uid": "0048e3bf3ba4e1d92b331a59bec2d3dd", + "css": "channel-points", + "code": 59452, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M500 300A200 200 0 0 1 700 500H600A100 100 0 0 0 500 400ZM511.7 100.2A400 400 0 0 0 100 500 400 400 0 0 0 900 500 400 400 0 0 0 511.7 100.2ZM508.8 200.1A300 300 0 0 1 800 500 300 300 0 0 1 200 500 300 300 0 0 1 508.8 200.1Z", + "width": 1000 + }, + "search": [ + "channel-points" + ] } ] } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index c0c6f46e..915e8b7f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "frankerfacez", - "version": "4.14.6", + "version": "4.14.12", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -2296,9 +2296,8 @@ } }, "displacejs": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/displacejs/-/displacejs-1.3.2.tgz", - "integrity": "sha512-voRe/da7mfc/yncf0eGnCLB1vwioPHRS6Xv7xoNBXRUJeyq18usqwaxl9WCl5QWVAzEm/lfHxnRmx5w6UBZMkA==" + "version": "github:sirstendec/displace#38306dedc200e980fefe3a9b978700cc6d1f127b", + "from": "github:sirstendec/displace" }, "dns-equal": { "version": "1.0.0", diff --git a/package.json b/package.json index cf2830c9..c09ef69d 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "frankerfacez", "author": "Dan Salvato LLC", - "version": "4.14.12", + "version": "4.15.0", "description": "FrankerFaceZ is a Twitch enhancement suite.", "license": "Apache-2.0", "scripts": { @@ -65,7 +65,7 @@ "@ffz/icu-msgparser": "^1.0.1", "crypto-js": "^3.1.9-1", "dayjs": "^1.8.15", - "displacejs": "^1.2.4", + "displacejs": "github:sirstendec/displace", "emoji-regex": "^8.0.0", "file-saver": "^2.0.1", "graphql": "^14.4.2", diff --git a/res/font/ffz-fontello.eot b/res/font/ffz-fontello.eot index 3f613f2b..679fcdea 100644 Binary files a/res/font/ffz-fontello.eot and b/res/font/ffz-fontello.eot differ diff --git a/res/font/ffz-fontello.svg b/res/font/ffz-fontello.svg index ecd8ffa5..07bd45d2 100644 --- a/res/font/ffz-fontello.svg +++ b/res/font/ffz-fontello.svg @@ -124,6 +124,10 @@ + + + + @@ -166,6 +170,8 @@ + + diff --git a/res/font/ffz-fontello.ttf b/res/font/ffz-fontello.ttf index 33b335c8..987a77ed 100644 Binary files a/res/font/ffz-fontello.ttf and b/res/font/ffz-fontello.ttf differ diff --git a/res/font/ffz-fontello.woff b/res/font/ffz-fontello.woff index 997fba36..9ca90fdb 100644 Binary files a/res/font/ffz-fontello.woff and b/res/font/ffz-fontello.woff differ diff --git a/res/font/ffz-fontello.woff2 b/res/font/ffz-fontello.woff2 index 0971425a..39df3502 100644 Binary files a/res/font/ffz-fontello.woff2 and b/res/font/ffz-fontello.woff2 differ diff --git a/src/modules/chat/actions/components/edit-combo.vue b/src/modules/chat/actions/components/edit-combo.vue new file mode 100644 index 00000000..91b03c25 --- /dev/null +++ b/src/modules/chat/actions/components/edit-combo.vue @@ -0,0 +1,42 @@ + + + \ No newline at end of file diff --git a/src/modules/chat/actions/components/preview-combo.vue b/src/modules/chat/actions/components/preview-combo.vue new file mode 100644 index 00000000..2d6569e2 --- /dev/null +++ b/src/modules/chat/actions/components/preview-combo.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/src/modules/chat/actions/components/preview-text.vue b/src/modules/chat/actions/components/preview-text.vue index 2f6aef43..04df4429 100644 --- a/src/modules/chat/actions/components/preview-text.vue +++ b/src/modules/chat/actions/components/preview-text.vue @@ -1,5 +1,3 @@ \ No newline at end of file diff --git a/src/modules/chat/actions/index.jsx b/src/modules/chat/actions/index.jsx index 485c3691..ee655ddc 100644 --- a/src/modules/chat/actions/index.jsx +++ b/src/modules/chat/actions/index.jsx @@ -177,7 +177,7 @@ export default class Actions extends Module { default: [ {v: {action: 'friend'}}, - {v: {action: 'whisper', appearance: {type: 'text', text: 'Whisper', button: true}}}, + {v: {action: 'whisper', appearance: {type: 'combo', icon: '', text: 'Whisper', button: true}}}, {v: {type: 'space'}}, {v: {action: 'card_menu'}}, {v: {type: 'new-line'}}, diff --git a/src/modules/chat/actions/renderers.jsx b/src/modules/chat/actions/renderers.jsx index 159cec37..2a3c95d1 100644 --- a/src/modules/chat/actions/renderers.jsx +++ b/src/modules/chat/actions/renderers.jsx @@ -48,6 +48,34 @@ export const icon = { } +// ============================================================================ +// Text + Icon +// ============================================================================ + +export const combo = { + title: 'Text and Icon', + title_i18n: 'setting.actions.appearance.combo', + + colored: true, + editor: () => import(/* webpackChunkName: 'main-menu' */ './components/edit-combo.vue'), + + load(data) { + if ( data.icon && data.icon.startsWith('ffz-fa') ) + loadFontAwesome(); + + return true; + }, + + component: () => import(/* webpackChunkName: 'main-menu' */ './components/preview-combo.vue'), + + render(data, createElement, color) { + return ( + {data.text} + ) + } +} + + // ============================================================================ // Image // ============================================================================ diff --git a/src/modules/chat/badges.jsx b/src/modules/chat/badges.jsx index bb9e1923..c0bb0a5c 100644 --- a/src/modules/chat/badges.jsx +++ b/src/modules/chat/badges.jsx @@ -288,6 +288,11 @@ export default class Badges extends Module { title, count: d.data }); + } else if ( d.badge === 'founder' ) { + title = this.i18n.t('badges.founder.months', '{title}\n(Subscribed for {count,number} Month{count,en_plural})', { + title, + count: d.data + }); } } @@ -371,7 +376,7 @@ export default class Badges extends Module { else slot = last_slot++; - const data = dynamic_data[badge_id], + const data = dynamic_data[badge_id] || (badge_id === 'founder' && dynamic_data['subscriber']), urls = badge_id === 'moderator' && custom_mod && room && room.data && room.data.mod_urls, badges = []; diff --git a/src/modules/chat/emotes.js b/src/modules/chat/emotes.js index 1b1c8ce7..6f906a02 100644 --- a/src/modules/chat/emotes.js +++ b/src/modules/chat/emotes.js @@ -13,7 +13,7 @@ import GET_EMOTE from './emote_info.gql'; const MOD_KEY = IS_OSX ? 'metaKey' : 'ctrlKey'; -const EXTRA_INVENTORY = [33563]; +//const EXTRA_INVENTORY = [33563]; const MODIFIERS = { 59847: { @@ -64,7 +64,7 @@ export default class Emotes extends Module { this.inject('settings'); this.inject('experiments'); - this.twitch_inventory_sets = new Set(EXTRA_INVENTORY); + this.twitch_inventory_sets = new Set; //(EXTRA_INVENTORY); this.__twitch_emote_to_set = new Map; this.__twitch_set_to_channel = new Map; @@ -127,7 +127,7 @@ export default class Emotes extends Module { onEnable() { // Just in case there's a weird load order going on. - this.on('site:enabled', this.loadTwitchInventory); + // this.on('site:enabled', this.loadTwitchInventory); this.style = new ManagedStyle('emotes'); @@ -146,7 +146,7 @@ export default class Emotes extends Module { this.socket.on(':command:follow_sets', this.updateFollowSets, this); this.loadGlobalSets(); - this.loadTwitchInventory(); + //this.loadTwitchInventory(); } @@ -788,6 +788,21 @@ export default class Emotes extends Module { } + setTwitchEmoteSet(emote_id, set_id) { + if ( isNaN(emote_id) || ! isFinite(emote_id) ) + return; + + this.__twitch_emote_to_set.set(emote_id, set_id); + } + + setTwitchSetChannel(set_id, channel) { + if ( isNaN(set_id) || ! isFinite(set_id) ) + return; + + this.__twitch_set_to_channel.set(set_id, channel); + } + + getTwitchEmoteSet(emote_id, callback) { const tes = this.__twitch_emote_to_set; @@ -869,6 +884,9 @@ export default class Emotes extends Module { return data; } catch(err) { + if ( err === 'No known Twitch emote set with that ID.' ) + return null; + tes.delete(set_id); } } @@ -896,6 +914,15 @@ export default class Emotes extends Module { if ( callback ) callback(data); - }).catch(() => tes.delete(set_id)); + }).catch(err => { + if ( err === 'No known Twitch emote set with that ID.' ) { + if ( callback ) + callback(null); + + return; + } + + tes.delete(set_id) + }); } } \ No newline at end of file diff --git a/src/modules/logviewer/index.js b/src/modules/logviewer/index.js index 27afef41..901776b6 100644 --- a/src/modules/logviewer/index.js +++ b/src/modules/logviewer/index.js @@ -59,7 +59,7 @@ export default class Logviewer extends Module { if ( ! card.channel || ! card.user ) return; - card.lv_topic = `logs-${card.channel.login}-${card.channel.user}`; + card.lv_topic = `logs-${card.channel.login}-${card.user.login}`; this.lv_socket.subscribe(card, card.lv_topic); } diff --git a/src/modules/main_menu/components/main-menu.vue b/src/modules/main_menu/components/main-menu.vue index 78f09b54..28513617 100644 --- a/src/modules/main_menu/components/main-menu.vue +++ b/src/modules/main_menu/components/main-menu.vue @@ -219,7 +219,10 @@ export default { this.displace = displace(this.$el, { handle: this.$el.querySelector('header'), highlightInputs: true, - constrain: true + constrain: true, + ignoreFn(event) { + return event.target.closest('button') != null + } }); }) }, diff --git a/src/modules/viewer_cards/card.vue b/src/modules/viewer_cards/card.vue index 140f0340..a8392bc8 100644 --- a/src/modules/viewer_cards/card.vue +++ b/src/modules/viewer_cards/card.vue @@ -1,96 +1,115 @@