diff --git a/package-lock.json b/package-lock.json index 8f147eab..3c4cf1d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9887,6 +9887,11 @@ } } }, + "vue-observe-visibility": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/vue-observe-visibility/-/vue-observe-visibility-0.4.4.tgz", + "integrity": "sha512-2eDYHgL2MJ2wkkNZnus56D0CG8m80BFLuvEcGnD7rQ9jxFogpXMsM9aM5Md+XT8AmYGYCqVfOVBaWFtVvwbpmw==" + }, "vue-style-loader": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-3.1.2.tgz", diff --git a/package.json b/package.json index d934e736..4b80f682 100755 --- a/package.json +++ b/package.json @@ -74,6 +74,7 @@ "vue": "^2.5.16", "vue-clickaway": "^2.2.2", "vue-color": "^2.4.6", + "vue-observe-visibility": "^0.4.4", "vue-template-compiler": "^2.5.16", "vuedraggable": "^2.16.0" } diff --git a/res/font/ffz-fontello.eot b/res/font/ffz-fontello.eot index 886e3abe..90ba0098 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 4e2b57a3..5dad7d65 100644 --- a/res/font/ffz-fontello.svg +++ b/res/font/ffz-fontello.svg @@ -100,6 +100,12 @@ + + + + + + diff --git a/res/font/ffz-fontello.ttf b/res/font/ffz-fontello.ttf index 43ab3c1f..ee9319bd 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 d2127e63..e55ef1d0 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 e74652b7..7028f393 100644 Binary files a/res/font/ffz-fontello.woff2 and b/res/font/ffz-fontello.woff2 differ diff --git a/src/main.js b/src/main.js index 019c5277..57a99673 100644 --- a/src/main.js +++ b/src/main.js @@ -151,7 +151,7 @@ ${typeof x[1] === 'string' ? x[1] : JSON.stringify(x[1], null, 4)}` FrankerFaceZ.Logger = Logger; const VER = FrankerFaceZ.version_info = { - major: 4, minor: 2, revision: 6, + major: 4, minor: 3, revision: 0, commit: __git_commit__, build: __webpack_hash__, toString: () => @@ -174,7 +174,8 @@ FrankerFaceZ.utilities = { time: require('utilities/time'), tooltip: require('utilities/tooltip'), i18n: require('utilities/translation-core'), - dayjs: require('dayjs') + dayjs: require('dayjs'), + popper: require('popper.js').default } diff --git a/src/modules/chat/actions/components/edit-icon.vue b/src/modules/chat/actions/components/edit-icon.vue index 0bb3afd5..ffddbf6a 100644 --- a/src/modules/chat/actions/components/edit-icon.vue +++ b/src/modules/chat/actions/components/edit-icon.vue @@ -4,140 +4,15 @@ {{ t('setting.actions.icon', 'Icon') }} -
-
- -
-
-
- -
-
- - -
- -
-
- {{ t('setting.actions.empty-search', 'no results') }} -
-
-
+ - - \ No newline at end of file + \ No newline at end of file diff --git a/src/modules/chat/rich_providers.js b/src/modules/chat/rich_providers.js index 9e3ad375..8b580604 100644 --- a/src/modules/chat/rich_providers.js +++ b/src/modules/chat/rich_providers.js @@ -5,6 +5,7 @@ // ============================================================================ const CLIP_URL = /^(?:https?:\/\/)?clips\.twitch\.tv\/(\w+)(?:\/)?(\w+)?(?:\/edit)?/; +const NEW_CLIP_URL = /^(?:https?:\/\/)?(?:www\.)?twitch\.tv\/\w+\/clip\/(\w+)/; const VIDEO_URL = /^(?:https?:\/\/)?(?:www\.)?twitch\.tv\/(?:\w+\/v|videos)\/(\w+)/; import GET_CLIP from './clip_info.gql'; @@ -74,13 +75,18 @@ export const Clips = { hide_token: true, test(token) { - return token.type === 'link' && CLIP_URL.test(token.url) + if ( token.type !== 'link' ) + return false; + + return CLIP_URL.test(token.url) || NEW_CLIP_URL.test(token.url); }, process(token) { - const match = CLIP_URL.exec(token.url), - apollo = this.resolve('site.apollo'); + let match = CLIP_URL.exec(token.url); + if ( ! match ) + match = NEW_CLIP_URL.exec(token.url); + const apollo = this.resolve('site.apollo'); if ( ! apollo || ! match || match[1] === 'create' ) return; diff --git a/src/modules/chat/tokenizers.jsx b/src/modules/chat/tokenizers.jsx index 0d68c88b..7be519ac 100644 --- a/src/modules/chat/tokenizers.jsx +++ b/src/modules/chat/tokenizers.jsx @@ -415,7 +415,7 @@ export const BlockedBadges = { export const CustomHighlights = { type: 'highlight', - priority: 100, + priority: 35, component: () => import(/* webpackChunkName: 'vue-chat' */ './components/chat-highlight.vue'), diff --git a/src/sites/twitch-twilight/modules/chat/scroller.js b/src/sites/twitch-twilight/modules/chat/scroller.js index 84f7d4fc..16f494e9 100644 --- a/src/sites/twitch-twilight/modules/chat/scroller.js +++ b/src/sites/twitch-twilight/modules/chat/scroller.js @@ -319,18 +319,8 @@ export default class Scroller extends Module { } inst.ffzHandleKey = inst.ffzHandleKey.bind(inst); - - Mousetrap.bindGlobal('alt', inst.ffzHandleKey, 'keydown'); - Mousetrap.bindGlobal('alt', inst.ffzHandleKey, 'keyup'); - - Mousetrap.bindGlobal('shift', inst.ffzHandleKey, 'keydown'); - Mousetrap.bindGlobal('shift', inst.ffzHandleKey, 'keyup'); - - Mousetrap.bindGlobal('ctrl', inst.ffzHandleKey, 'keydown'); - Mousetrap.bindGlobal('ctrl', inst.ffzHandleKey, 'keyup'); - - Mousetrap.bindGlobal('command', inst.ffzHandleKey, 'keydown'); - Mousetrap.bindGlobal('command', inst.ffzHandleKey, 'keyup'); + window.addEventListener('keydown', inst.ffzHandleKey); + window.addEventListener('keyup', inst.ffzHandleKey); inst.hoverPause = inst.ffzMouseMove.bind(inst); inst.hoverResume = inst.ffzMouseLeave.bind(inst); @@ -624,18 +614,8 @@ export default class Scroller extends Module { inst.ffzInstallHandler(); } - onUnmount() { // eslint-disable-line class-methods-use-this - const Mousetrap = this.web_munch.getModule('mousetrap') || window.Mousetrap; - if ( Mousetrap != null ) { - Mousetrap.unbind('alt', 'keydown'); - Mousetrap.unbind('alt', 'keyup'); - Mousetrap.unbind('shift', 'keydown'); - Mousetrap.unbind('shift', 'keyup'); - Mousetrap.unbind('ctrl', 'keydown'); - Mousetrap.unbind('ctrl', 'keyup'); - Mousetrap.unbind('command', 'keydown'); - Mousetrap.unbind('command', 'keyup'); - } - + onUnmount(inst) { // eslint-disable-line class-methods-use-this + window.removeEventListener('keydown', inst.ffzHandleKey); + window.removeEventListener('keyup', inst.ffzHandleKey); } } \ No newline at end of file diff --git a/src/sites/twitch-twilight/modules/css_tweaks/index.js b/src/sites/twitch-twilight/modules/css_tweaks/index.js index 3230a2ca..326be42e 100644 --- a/src/sites/twitch-twilight/modules/css_tweaks/index.js +++ b/src/sites/twitch-twilight/modules/css_tweaks/index.js @@ -230,14 +230,15 @@ export default class CSSTweaks extends Module { changed: val => this.toggle('square-avatars', !val) }); - this.settings.add('channel.not-live-bar', { + this.settings.add('channel.hide-not-live-bar', { default: true, ui: { path: 'Channel > Appearance >> General', - title: 'Show notification below clips and videos if the streamer is live.', + title: 'Hide the "Not Live" bar.', + description: 'Hide the bar which appears beneath clips and videos when the streamer is live, telling you they are live.', component: 'setting-check-box' }, - changed: val => this.toggle('not-live-bar', !val) + changed: val => this.toggleHide('not-live-bar', val) }); } @@ -254,7 +255,7 @@ export default class CSSTweaks extends Module { this.toggleHide('top-discover', !this.settings.get('layout.discover')); this.toggle('square-avatars', ! this.settings.get('channel.round-avatars')); - this.toggleHide('not-live-bar', ! this.settings.get('channel.not-live-bar')); + this.toggleHide('not-live-bar', this.settings.get('channel.hide-not-live-bar')); const recs = this.settings.get('layout.side-nav.show-rec-channels'); this.toggleHide('side-rec-channels', recs === 0); diff --git a/src/sites/twitch-twilight/modules/directory/index.jsx b/src/sites/twitch-twilight/modules/directory/index.jsx index b86f4a67..fcf75c4b 100644 --- a/src/sites/twitch-twilight/modules/directory/index.jsx +++ b/src/sites/twitch-twilight/modules/directory/index.jsx @@ -85,26 +85,15 @@ export default class Directory extends SiteModule { this.settings.add('directory.show-channel-avatars', { - default: 1, + default: true, ui: { path: 'Directory > Channels >> Appearance', - title: 'Channel Avatars', - description: 'Show channel avatars next to stream titles or directly on their thumbnails.', - component: 'setting-select-box', - - data: [ - {value: 0, title: 'Disabled'}, - {value: 1, title: 'By Title'}, - {value: 2, title: 'Over Thumbnail (Hidden on Hover)'}, - {value: 3, title: 'Over Thumbnail'} - ] + title: 'Display channel avatars.', + component: 'setting-check-box' }, - changed: value => { - this.css_tweaks.toggleHide('profile-hover', value === 2); - this.DirectoryCard.forceUpdate(); - } + changed: () => this.DirectoryCard.forceUpdate() }); @@ -225,7 +214,7 @@ export default class Directory extends SiteModule { cls.prototype.renderIconicImage = function() { if ( this.props.context !== CARD_CONTEXTS.SingleChannelList && - t.settings.get('directory.show-channel-avatars') !== 1 ) + ! t.settings.get('directory.show-channel-avatars') ) return; return old_render_iconic.call(this); diff --git a/src/std-components/icon-picker.vue b/src/std-components/icon-picker.vue index b2e51421..db152489 100644 --- a/src/std-components/icon-picker.vue +++ b/src/std-components/icon-picker.vue @@ -2,7 +2,7 @@
-