diff --git a/.babelrc b/.babelrc index acff6def..ed9077bf 100644 --- a/.babelrc +++ b/.babelrc @@ -2,6 +2,7 @@ "plugins": [ "@babel/plugin-syntax-dynamic-import", "@babel/plugin-proposal-optional-chaining", - "@babel/plugin-proposal-nullish-coalescing-operator" + "@babel/plugin-proposal-nullish-coalescing-operator", + ["@babel/plugin-proposal-object-rest-spread", {"loose": true, "useBuiltIns": true}] ] } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index a6511296..2c8c5ede 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "frankerfacez", - "version": "4.6.1", + "version": "4.7.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -304,6 +304,16 @@ "@babel/plugin-syntax-nullish-coalescing-operator": "^7.2.0" } }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.5.5.tgz", + "integrity": "sha512-F2DxJJSQ7f64FyTVl5cw/9MWn6naXGdk3Q3UhDbFEEHv+EilCPoeRD3Zh/Utx1CJz4uyKlQ4uH+bJPbEhMV7Zw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-syntax-object-rest-spread": "^7.2.0" + } + }, "@babel/plugin-proposal-optional-chaining": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.2.0.tgz", @@ -341,6 +351,15 @@ "@babel/helper-plugin-utils": "^7.0.0" } }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz", + "integrity": "sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, "@babel/plugin-syntax-optional-chaining": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.2.0.tgz", diff --git a/package.json b/package.json index 0df21afb..98bc0061 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "frankerfacez", "author": "Dan Salvato LLC", - "version": "4.7.1", + "version": "4.7.2", "description": "FrankerFaceZ is a Twitch enhancement suite.", "license": "Apache-2.0", "scripts": { @@ -22,6 +22,7 @@ "devDependencies": { "@babel/core": "^7.5.5", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4", + "@babel/plugin-proposal-object-rest-spread": "^7.5.5", "@babel/plugin-proposal-optional-chaining": "^7.2.0", "@babel/plugin-syntax-dynamic-import": "^7.2.0", "@babel/plugin-transform-react-jsx": "^7.3.0", diff --git a/src/modules/chat/actions/types.jsx b/src/modules/chat/actions/types.jsx index a0e2ad32..f876f447 100644 --- a/src/modules/chat/actions/types.jsx +++ b/src/modules/chat/actions/types.jsx @@ -118,7 +118,7 @@ export const msg_delete = { title: 'Delete Message', tooltip(data) { - return this.i18n.t('chat.actions.delete', "Delete {user.login}'s message", {user: data.user}); + return this.i18n.t('chat.actions.delete.tooltip', "Delete {user.login}'s message", {user: data.user}); }, click(event, data) { @@ -155,7 +155,7 @@ export const ban = { }, tooltip(data) { - return this.i18n.t('chat.actions.ban', 'Ban {user.login}', {user: data.user}); + return this.i18n.t('chat.actions.ban.tooltip', 'Ban {user.login}', {user: data.user}); }, click(event, data) { @@ -201,7 +201,7 @@ export const timeout = { tooltip(data) { return this.i18n.t( - 'chat.actions.timeout', + 'chat.actions.timeout.tooltip', 'Timeout {user.login} for {duration,number} second{duration,en_plural}', { user: data.user, @@ -261,7 +261,7 @@ export const untimeout = { title: 'Untimeout User', tooltip(data) { - return this.i18n.t('chat.actions.untimeout', 'Untimeout {user.login}', {user: data.user}); + return this.i18n.t('chat.actions.untimeout.tooltip', 'Untimeout {user.login}', {user: data.user}); }, click(event, data) { @@ -287,7 +287,7 @@ export const whisper = { title: 'Whisper User', tooltip(data) { - return this.i18n.t('chat.actions.whisper', 'Whisper {user.login}', data); + return this.i18n.t('chat.actions.whisper.tooltip', 'Whisper {user.login}', data); }, click(event, data) { diff --git a/src/modules/main_menu/components/profile-manager.vue b/src/modules/main_menu/components/profile-manager.vue index 33136dd5..5b297823 100644 --- a/src/modules/main_menu/components/profile-manager.vue +++ b/src/modules/main_menu/components/profile-manager.vue @@ -307,8 +307,9 @@ export default { }, importProfile(profile_data, data) { + this.import_profile = profile_data; + if ( profile_data.url ) { - this.import_profile = profile_data; this.import_profile_data = data; return; } @@ -327,6 +328,12 @@ export default { const prof = this.context.createProfile(profile_data); + prof.update({ + i18n_key: undefined, + desc_i18n_key: undefined, + description: `${prof.description ? prof.description + '\n' : ''}${this.t('setting.backup-restore.imported-at', 'Imported at {now,datetime}.', {now: new Date})}` + }); + let i = 0; if ( ! data ) { diff --git a/src/modules/main_menu/components/profile-selector.vue b/src/modules/main_menu/components/profile-selector.vue index d64a909a..6ba36900 100644 --- a/src/modules/main_menu/components/profile-selector.vue +++ b/src/modules/main_menu/components/profile-selector.vue @@ -61,9 +61,9 @@ -

{{ t(p.i18n_key, p.title, p) }}

+

{{ p.i18n_key ? t(p.i18n_key, p.title, p) : p.title }}

- {{ t(p.desc_i18n_key, p.description, p) }} + {{ p.desc_i18n_key ? t(p.desc_i18n_key, p.description, p) : p.description }}
diff --git a/src/modules/main_menu/index.js b/src/modules/main_menu/index.js index 92712249..890ca668 100644 --- a/src/modules/main_menu/index.js +++ b/src/modules/main_menu/index.js @@ -63,12 +63,12 @@ export default class MainMenu extends Module { }); this.settings.addUI('faq', { - path: 'Home > FAQ', + path: 'Home > FAQ @{"profile_warning": false}', component: 'faq-page' }); this.settings.addUI('feedback', { - path: 'Home > Feedback', + path: 'Home > Feedback @{"profile_warning": false}', component: 'feedback-page' }); @@ -83,7 +83,7 @@ export default class MainMenu extends Module { }) this.settings.addUI('changelog', { - path: 'Home > Changelog', + path: 'Home > Changelog @{"profile_warning": false}', component: 'changelog' }); diff --git a/src/sites/twitch-twilight/modules/css_tweaks/index.js b/src/sites/twitch-twilight/modules/css_tweaks/index.js index d62b3b88..4ff2070d 100644 --- a/src/sites/twitch-twilight/modules/css_tweaks/index.js +++ b/src/sites/twitch-twilight/modules/css_tweaks/index.js @@ -32,7 +32,7 @@ const CLASSES = { 'dir-live-ind': '.live-channel-card:not([data-a-target*="host"]) .stream-type-indicator.stream-type-indicator--live,.stream-thumbnail__card .stream-type-indicator.stream-type-indicator--live,.preview-card .stream-type-indicator.stream-type-indicator--live,.preview-card .preview-card-stat.preview-card-stat--live', 'profile-hover': '.preview-card .tw-relative:hover .ffz-channel-avatar', 'not-live-bar': 'div[data-test-selector="non-live-video-banner-layout"]', - 'channel-live-ind': 'div[data-target="channel-header__live-indicator"]' + 'channel-live-ind': '.channel-header__user .tw-channel-status-text-indicator' }; diff --git a/src/sites/twitch-twilight/modules/directory/index.jsx b/src/sites/twitch-twilight/modules/directory/index.jsx index a2f96da0..a0fcd58c 100644 --- a/src/sites/twitch-twilight/modules/directory/index.jsx +++ b/src/sites/twitch-twilight/modules/directory/index.jsx @@ -55,7 +55,7 @@ export default class Directory extends SiteModule { this.DirectoryShelf = this.fine.define( 'directory-shelf', - n => n.getShelfTitle && n.props && n.props.shelf, + n => n.shouldRenderNode && n.props && n.props.shelf, DIR_ROUTES ); diff --git a/styles/widgets/profile-selector.scss b/styles/widgets/profile-selector.scss index 2ccbd6be..0ffd8bb9 100644 --- a/styles/widgets/profile-selector.scss +++ b/styles/widgets/profile-selector.scss @@ -15,6 +15,9 @@ outline: none; cursor: pointer; + border-left: 4px solid; + border-left-color: transparent; + &.live .ffz--profile-row__icon { color: green; } @@ -28,6 +31,10 @@ } } + &.current { + border-left-color: #6441a4; + } + .description { opacity: .7; }