1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-07-02 17:18:31 +00:00

4.0.0-rc3.3.

* Update all usages of `tw-input` and `tw-select` to use the new, overly-verbose classes Twitch added.
* Add a few of the monkey faces to the local emote code to make them work.
* Override emotes when building the emote code <-> id map, to let emotes from higher sets override global emotes.
This commit is contained in:
SirStendec 2018-06-29 19:45:33 -04:00
parent 8befc8850b
commit 5626a3c389
20 changed files with 51 additions and 46 deletions

View file

@ -1,4 +1,10 @@
<div class="list-header">4.0.0-rc3.1<span>@662c50c7e3e4ac110441</span> <time datetime="2018-05-31">(2018-06-27)</time></div>
<div class="list-header">4.0.0-rc3.3<span>@85ad2d458fb808c0365f</span> <time datetime="2018-06-29">(2018-06-29)</time></div>
<ul class="chat-menu-content menu-side-padding">
<li>Fixed: Update class names for all input elements to use Twitch's new, long-winded methodology.</li>
<li>Fixed: Some Prime smileys not appearing correctly locally.</li>
</ul>
<div class="list-header">4.0.0-rc3.1<span>@662c50c7e3e4ac110441</span> <time datetime="2018-06-27">(2018-06-27)</time></div>
<ul class="chat-menu-content menu-side-padding">
<li>Fixed: Display smileys like <code>:-)</code> correctly as emotes in locally echoed messages.</li>
</ul>

View file

@ -100,7 +100,7 @@ class FrankerFaceZ extends Module {
FrankerFaceZ.Logger = Logger;
const VER = FrankerFaceZ.version_info = {
major: 4, minor: 0, revision: 0, extra: '-rc3.1',
major: 4, minor: 0, revision: 0, extra: '-rc3.3',
build: __webpack_hash__,
toString: () =>
`${VER.major}.${VER.minor}.${VER.revision}${VER.extra || ''}${DEBUG ? '-dev' : ''}`

View file

@ -8,7 +8,7 @@
<input
id="edit_reason"
v-model.trim="value.reason"
class="tw-mg-y-05 tw-input tw-display-inline"
class="tw-border-radius-medium tw-font-size-6 tw-full-width tw-input tw-pd-x-1 tw-pd-y-05 tw-mg-y-05"
@input="$emit('input', value)"
>
</div>

View file

@ -9,7 +9,7 @@
id="edit_chat"
v-model="value.command"
:placeholder="defaults.command"
class="tw-mg-y-05 tw-input tw-display-inline"
class="tw-border-radius-medium tw-font-size-6 tw-full-width tw-input tw-pd-x-1 tw-pd-y-05 tw-mg-y-05"
@input="$emit('input', value)"
>

View file

@ -10,17 +10,15 @@
{{ t('setting.actions.icon.search', 'Search for Icon') }}
</label>
<div class="tw-relative tw-mg-t-05">
<div class="tw-input__icon-group tw-top-0 tw-left-0 tw-z-default tw-absolute">
<div class="tw-input__icon tw-c-text-alt-2 tw-align-items-center tw-flex tw-justify-content-center">
<div class="tw-absolute tw-align-items-center tw-c-text-alt-2 tw-flex tw-full-height tw-input__icon tw-justify-content-center tw-left-0 tw-top-0 tw-z-default">
<figure class="ffz-i-search" />
</div>
</div>
<input
id="icon-search"
:placeholder="t('setting.actions.icon.search', 'Search for Icon')"
v-model="search"
type="search"
class="tw-input tw-pd-l-3"
class="tw-block tw-border-radius-medium tw-font-size-6 tw-full-width tw-input tw-pd-l-3 tw-pd-r-1 tw-pd-y-05"
autocapitalize="off"
autocorrect="off"
autocomplete="off"

View file

@ -7,7 +7,7 @@
<input
id="edit_image"
v-model="value.image"
class="tw-mg-y-05 tw-input tw-display-inline"
class="tw-border-radius-medium tw-font-size-6 tw-full-width tw-input tw-pd-x-1 tw-pd-y-05 tw-mg-y-05"
@input="$emit('input', value)"
>
</div>

View file

@ -7,7 +7,7 @@
<input
id="edit_text"
v-model="value.text"
class="tw-mg-y-05 tw-input tw-display-inline"
class="tw-border-radius-medium tw-font-size-6 tw-full-width tw-input tw-pd-x-1 tw-pd-y-05 tw-mg-y-05"
@input="$emit('input', value)"
>
</div>

View file

@ -9,7 +9,7 @@
id="edit_duration"
v-model.number="value.duration"
:placeholder="defaults.duration"
class="tw-mg-y-05 tw-input tw-display-inline"
class="tw-border-radius-medium tw-font-size-6 tw-full-width tw-input tw-pd-x-1 tw-pd-y-05 tw-mg-y-05"
type="number"
@input="$emit('input', value)"
>
@ -23,7 +23,7 @@
<input
id="edit_reason"
v-model.trim="value.reason"
class="tw-mg-y-05 tw-input tw-display-inline"
class="tw-border-radius-medium tw-font-size-6 tw-full-width tw-input tw-pd-x-1 tw-pd-y-05 tw-mg-y-05"
@input="$emit('input', value)"
>
</div>

View file

@ -9,7 +9,7 @@
id="edit_url"
v-model="value.url"
:placeholder="defaults.url"
class="tw-mg-y-05 tw-input tw-display-inline"
class="tw-border-radius-medium tw-font-size-6 tw-full-width tw-input tw-pd-x-1 tw-pd-y-05 tw-mg-y-05"
@input="$emit('input', value)"
>

View file

@ -683,10 +683,7 @@ export const AddonEmotes = {
if ( source === '--global--' || emote_id === 80393 )
source = this.i18n.t('emote.global', 'Twitch Global');
else if ( source === '--twitch-turbo--' || source === 'turbo' || source === '--turbo-faces--' )
source = this.i18n.t('emote.turbo', 'Twitch Turbo');
else if ( source === '--prime--' || source === '--prime-faces--' )
else if ( source === '--twitch-turbo--' || source === 'turbo' || source === '--turbo-faces--' || source === '--prime--' || source === '--prime-faces--' )
source = this.i18n.t('emote.prime', 'Twitch Prime');
else

View file

@ -23,7 +23,7 @@
<input
v-model="edit_data.appearance.tooltip"
class="tw-mg-y-05 tw-input tw-display-inline"
class="tw-border-radius-medium tw-font-size-6 tw-full-width tw-input tw-pd-x-1 tw-pd-y-05 tw-mg-y-05"
>
</div>
@ -36,7 +36,7 @@
id="renderer_type"
ref="renderer_type"
v-model="edit_data.appearance.type"
class="tw-mg-y-05 tw-select tw-display-inline"
class="tw-border-radius-medium tw-font-size-6 tw-full-width tw-select tw-pd-l-1 tw-pd-r-3 tw-pd-y-05 tw-mg-y-05"
>
<option
v-for="(r, key) in data.renderers"
@ -80,7 +80,7 @@
<select
id="vis_mod"
v-model="edit_data.display.mod"
class="tw-mg-y-05 tw-select tw-display-inline"
class="tw-border-radius-medium tw-font-size-6 tw-full-width tw-select tw-pd-l-1 tw-pd-r-3 tw-pd-y-05 tw-mg-y-05"
>
<option :value="undefined" selected>{{ t('setting.unset', 'Unset') }}</option>
<option :value="true">{{ t('setting.true', 'True') }}</option>
@ -96,7 +96,7 @@
<select
id="vis_mod_icons"
v-model="edit_data.display.mod_icons"
class="tw-mg-y-05 tw-select tw-display-inline"
class="tw-border-radius-medium tw-font-size-6 tw-full-width tw-select tw-pd-l-1 tw-pd-r-3 tw-pd-y-05 tw-mg-y-05"
>
<option :value="undefined" selected>{{ t('setting.unset', 'Unset') }}</option>
<option :value="true">{{ t('setting.visible', 'Visible') }}</option>
@ -112,7 +112,7 @@
<select
id="vis_deleted"
v-model="edit_data.display.deleted"
class="tw-mg-y-05 tw-select tw-display-inline"
class="tw-border-radius-medium tw-font-size-6 tw-full-width tw-select tw-pd-l-1 tw-pd-r-3 tw-pd-y-05 tw-mg-y-05"
>
<option :value="undefined" selected>{{ t('setting.unset', 'Unset') }}</option>
<option :value="true">{{ t('setting.true', 'True') }}</option>
@ -132,7 +132,7 @@
<select
id="action_type"
v-model="edit_data.action"
class="tw-mg-y-05 tw-select tw-display-inline"
class="tw-border-radius-medium tw-font-size-6 tw-full-width tw-select tw-pd-l-1 tw-pd-r-3 tw-pd-y-05 tw-mg-y-05"
>
<option
v-for="(a, key) in data.actions"

View file

@ -135,7 +135,7 @@
v-else
:key="idx"
:disabled="preset.disabled"
class="tw-interactable"
class="tw-interactable tw-full-width"
@click="add(preset.value)"
>
<div class="tw-flex tw-align-items-center tw-pd-y-05 tw-pd-x-1">

View file

@ -7,7 +7,7 @@
v-bind="$attrs"
v-model="color"
type="text"
class="tw-input tw-pd-r-3"
class="tw-block tw-border-radius-medium tw-font-size-6 tw-full-width tw-input tw-pd-l-1 tw-pd-r-3 tw-pd-y-05 tw-mg-y-05"
autocapitalize="off"
autocorrect="off"
autocomplete="off"

View file

@ -10,7 +10,7 @@
</div>
<select
ref="sort_select"
class="tw-mg-x-05 tw-select tw-display-line tw-width-auto"
class="tw-border-radius-medium tw-font-size-6 tw-select tw-pd-l-1 tw-pd-r-3 tw-pd-y-05 tw-mg-x-05"
@change="onSort"
>
<option :selected="sort_by === 0">{{ t('setting.experiments.sort-name', 'Sort By: Name') }}</option>
@ -40,7 +40,7 @@
<div class="tw-flex tw-flex-shrink-0 tw-align-items-start">
<select
:data-key="key"
class="tw-mg-05 tw-select tw-display-line tw-width-auto"
class="tw-border-radius-medium tw-font-size-6 tw-select tw-pd-l-1 tw-pd-r-3 tw-pd-y-05 tw-mg-x-05"
@change="onChange($event)"
>
<option
@ -108,7 +108,7 @@
<div class="tw-flex tw-flex-shrink-0 tw-align-items-start">
<select
:data-key="key"
class="tw-mg-05 tw-select tw-display-line tw-width-auto"
class="tw-border-radius-medium tw-font-size-6 tw-select tw-pd-l-1 tw-pd-r-3 tw-pd-y-05 tw-mg-x-05"
@change="onTwitchChange($event)"
>
<option

View file

@ -4,7 +4,7 @@
ref="button"
:class="{active: opened}"
tabindex="0"
class="tw-select"
class="tw-block tw-border-radius-medium tw-font-size-6 tw-full-width tw-select tw-pd-l-1 tw-pd-r-3 tw-pd-y-05"
@keyup.up.stop.prevent="focusShow"
@keyup.left.stop.prevent="focusShow"
@keyup.down.stop.prevent="focusShow"

View file

@ -11,7 +11,7 @@
<select
ref="control"
:id="item.full_key"
class="tw-mg-05 tw-select tw-display-inline tw-width-auto"
class="tw-border-radius-medium tw-font-size-6 tw-select tw-pd-l-1 tw-pd-r-3 tw-pd-y-05 tw-mg-05"
@change="onChange"
>
<option

View file

@ -12,7 +12,7 @@
ref="control"
:id="item.full_key"
:value="value"
class="tw-mg-05 tw-input tw-display-inline tw-width-auto"
class="tw-border-radius-medium tw-font-size-6 tw-input tw-pd-x-1 tw-pd-y-05 tw-mg-05 tw-input"
@change="onChange"
>

View file

@ -22,7 +22,7 @@
v-model="edit_data.v"
:placeholder="adding ? t('setting.terms.add-placeholder', 'Add a new term') : edit_data.v"
type="text"
class="tw-input"
class="tw-block tw-full-width tw-border-radius-medium tw-font-size-6 tw-full-width tw-input tw-pd-x-1 tw-pd-y-05"
autocapitalize="off"
autocorrect="off"
>
@ -37,7 +37,11 @@
</div>
<div class="tw-flex-shrink-0 tw-mg-x-05">
<span v-if="! editing">{{ term_type }}</span>
<select v-else v-model="edit_data.t" class="tw-select ffz-min-width-unset">
<select
v-else
v-model="edit_data.t"
class="tw-block tw-border-radius-medium tw-font-size-6 tw-select tw-pd-l-1 tw-pd-r-3 tw-pd-y-05 ffz-min-width-unset"
>
<option value="text">{{ t('setting.terms.type.text', 'Text') }}</option>
<option value="glob">{{ t('setting.terms.type.glob', 'Glob') }}</option>
<option value="regex">{{ t('setting.terms.type.regex-word', 'Regex (Word)') }}</option>

View file

@ -809,11 +809,7 @@ export default class EmoteMenu extends Module {
title = t.i18n.t('emote-menu.global', 'Global Emotes');
sort_key = 100;
} else if ( title === '--twitch-turbo--' || title === 'turbo' || title === '--turbo-faces--' ) {
title = t.i18n.t('emote-menu.turbo', 'Turbo');
sort_key = 75;
} else if ( title === '--prime--' || title === '--prime-faces--' ) {
} else if ( title === '--twitch-turbo--' || title === 'turbo' || title === '--turbo-faces--' || title === '--prime--' || title === '--prime-faces--' ) {
title = t.i18n.t('emote-menu.prime', 'Prime');
icon = 'crown';
sort_key = 75;
@ -1232,7 +1228,7 @@ export default class EmoteMenu extends Module {
<div class="tw-relative">
<input
type="text"
class="tw-input"
class="tw-block tw-border-radius-medium tw-font-size-6 tw-full-width tw-input tw-pd-x-1 tw-pd-y-05"
onChange={this.handleFilterChange}
onKeyDown={this.handleKeyDown}
placeholder={t.i18n.t('emote-menu.search', 'Search for Emotes')}

View file

@ -34,7 +34,12 @@ const REGEX_EMOTES = {
'\\:-?\\(': [':(', ':-('],
'\\:-?\\)': [':)', ':-)'],
'\\;-?(p|P)': [';p', ';P', ';-p', ';-P'],
'\\;-?\\)': [';)', ';-)']
'\\;-?\\)': [';)', ';-)'],
'#-?[\\\\/]': ['#/', '#-/', '#//', '#-//'],
':-?(?:7|L)': [':7', ':L', ':-7', ':-L'],
'\\&lt\\;\\]': ['<]'],
'\\:-?(S|s)': [':s', ':S', ':-s', ':-S'],
'\\:\\&gt\\;': [':>']
};
@ -598,12 +603,11 @@ export default class ChatHook extends Module {
for(const emote of set.emotes)
if ( emote ) {
const token = emote.token;
if ( has(REGEX_EMOTES, token) ) {
for(const token of REGEX_EMOTES[token] )
if ( ! has(emotes, token) )
emotes[token] = emote.id;
if ( Array.isArray(REGEX_EMOTES[token]) ) {
for(const tok of REGEX_EMOTES[token] )
emotes[tok] = emote.id;
} else if ( ! has(emotes, token) )
} else
emotes[token] = emote.id;
}