1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-07-04 18:18:31 +00:00
Fixed: The Add Action menu for Chat Actions being too tall to fit within the FFZ Control Center at some resolutions.
Fixed: Styling for various hover-able UI elements.
Fixed: User Context Chat Actions set to show/hide based upon a message's deleted state not properly doing so.
Fixed: The FFZ emote menu appearing too tall at times.
Fixed: Remove debug logging.
Changed: The `Delete All` button in the Chat Actions editors will now not immediately clear all actions, but rather show another button asking the user to confirm.
Changed: Add a page rule for dashboard pop-out chat so that profiles can be made for it.
Changed: Update `CHAT_TYPES` from Twitch.
This commit is contained in:
SirStendec 2019-08-09 14:24:26 -04:00
parent 056cc9c401
commit 39fb185ecf
27 changed files with 130 additions and 83 deletions

View file

@ -1,7 +1,7 @@
{ {
"name": "frankerfacez", "name": "frankerfacez",
"author": "Dan Salvato LLC", "author": "Dan Salvato LLC",
"version": "4.8.1", "version": "4.8.2",
"description": "FrankerFaceZ is a Twitch enhancement suite.", "description": "FrankerFaceZ is a Twitch enhancement suite.",
"license": "Apache-2.0", "license": "Apache-2.0",
"scripts": { "scripts": {

View file

@ -284,7 +284,7 @@ export default class Actions extends Module {
reason_elements.push(<li class="tw-full-width tw-relative"> reason_elements.push(<li class="tw-full-width tw-relative">
<a <a
href="#" href="#"
class="tw-block tw-full-width tw-interactable tw-interactable--inverted tw-interactive tw-pd-05" class="tw-block tw-full-width tw-interactable tw-interactable--hover-enabled tw-interactable--inverted tw-interactive tw-pd-05"
onClick={click_fn(text)} onClick={click_fn(text)}
> >
{text} {text}
@ -301,7 +301,7 @@ export default class Actions extends Module {
reason_elements.push(<li class="tw-full-width tw-relative"> reason_elements.push(<li class="tw-full-width tw-relative">
<a <a
href="#" href="#"
class="tw-block tw-full-width tw-interactable tw-interactable--inverted tw-interactive tw-pd-05" class="tw-block tw-full-width tw-interactable tw-interactable--hover-enabled tw-interactable--inverted tw-interactive tw-pd-05"
onClick={click_fn(rule)} onClick={click_fn(rule)}
> >
{rule} {rule}
@ -546,7 +546,8 @@ export default class Actions extends Module {
if ( ! def || disp.disabled || if ( ! def || disp.disabled ||
(disp.mod_icons != null && disp.mod_icons !== !!mod_icons) || (disp.mod_icons != null && disp.mod_icons !== !!mod_icons) ||
(disp.mod != null && disp.mod !== (current_level > msg_level)) || (disp.mod != null && disp.mod !== (current_level > msg_level)) ||
(disp.staff != null && disp.staff !== (u ? !!u.staff : false)) ) (disp.staff != null && disp.staff !== (u ? !!u.staff : false)) ||
(disp.deleted != null && disp.deleted !== !!msg.deleted) )
continue; continue;
const has_color = def.colored && ap.color, const has_color = def.colored && ap.color,
@ -561,7 +562,7 @@ export default class Actions extends Module {
data-tooltip-type="action" data-tooltip-type="action"
data-action={data.action} data-action={data.action}
data-options={data.options ? JSON.stringify(data.options) : null} data-options={data.options ? JSON.stringify(data.options) : null}
onClick={handle_click} onClick={handle_click} // eslint-disable-line react/jsx-no-bind
onContextMenu={this.handleContext} onContextMenu={this.handleContext}
> >
<span class="tw-button__text"> <span class="tw-button__text">

View file

@ -6,7 +6,7 @@
</h4> </h4>
<button <button
class="tw-button tw-button--hollow tw-mg-t-05" class="tw-button ffz-button--hollow tw-c-text-overlay tw-mg-t-05"
@click="item.refresh()" @click="item.refresh()"
> >
<span class="tw-button__icon tw-button__icon--left"> <span class="tw-button__icon tw-button__icon--left">
@ -65,13 +65,12 @@
@keydown.enter="addUnlisted" @keydown.enter="addUnlisted"
> >
<button <button
class="tw-mg-l-05 tw-button tw-tooltip-wrapper" class="tw-mg-l-05 tw-button"
@click="addUnlisted" @click="addUnlisted"
> >
<span class="tw-button__text ffz-i-plus" /> <span class="tw-button__text ffz-i-plus">
<div class="tw-tooltip">
{{ t('setting.add', 'Add') }} {{ t('setting.add', 'Add') }}
</div> </span>
</button> </button>
</div> </div>
</div> </div>

View file

@ -50,7 +50,7 @@
<button <button
v-if="external" v-if="external"
disabled disabled
class="tw-button tw-button--hollow tw-button--disabled tw-tooltip-wrapper tw-mg-r-1" class="tw-button ffz-button--hollow tw-button--disabled tw-tooltip-wrapper tw-mg-r-1"
> >
<span class="tw-button__icon tw-button__icon--left"> <span class="tw-button__icon tw-button__icon--left">
<figure class="ffz-i-trash" /> <figure class="ffz-i-trash" />
@ -64,7 +64,7 @@
</button> </button>
<button <button
v-else v-else
class="tw-button tw-button--hollow ffz--button-disable tw-mg-r-1" class="tw-button ffz-button--hollow ffz--button-disable tw-mg-r-1"
@click="item.disableAddon(id)" @click="item.disableAddon(id)"
> >
<span class="tw-button__icon tw-button__icon--left"> <span class="tw-button__icon tw-button__icon--left">
@ -76,7 +76,7 @@
</button> </button>
<button <button
v-if="addon.settings" v-if="addon.settings"
class="tw-button tw-button--hollow tw-mg-r-1" class="tw-button ffz-button--hollow tw-mg-r-1"
@click="openSettings()" @click="openSettings()"
> >
<span class="tw-button__icon tw-button__icon--left"> <span class="tw-button__icon tw-button__icon--left">
@ -89,7 +89,7 @@
</template> </template>
<template v-else> <template v-else>
<button <button
class="tw-button tw-button--hollow ffz--button-enable tw-mg-r-1" class="tw-button ffz-button--hollow ffz--button-enable tw-mg-r-1"
@click="item.enableAddon(id)" @click="item.enableAddon(id)"
> >
<span class="tw-button__icon tw-button__icon--left"> <span class="tw-button__icon tw-button__icon--left">
@ -104,7 +104,7 @@
v-if="addon.website" v-if="addon.website"
:href="addon.website" :href="addon.website"
:title="addon.website" :title="addon.website"
class="tw-button tw-button--hollow tw-mg-r-1" class="tw-button ffz-button--hollow tw-mg-r-1"
target="_blank" target="_blank"
rel="noopener" rel="noopener"
> >

View file

@ -12,7 +12,7 @@
<button <button
:disabled="! has_value" :disabled="! has_value"
:class="{'tw-button--disabled': ! has_value}" :class="{'tw-button--disabled': ! has_value}"
class="tw-mg-l-05 tw-button tw-button--hollow tw-tooltip-wrapper" class="tw-mg-l-05 tw-button ffz-button--hollow tw-tooltip-wrapper"
@click="clear" @click="clear"
> >
<span class="tw-button__icon tw-button__icon--left"> <span class="tw-button__icon tw-button__icon--left">
@ -66,7 +66,7 @@
/> />
</section> </section>
<button <button
class="tw-mg-t-05 tw-button tw-button--hollow tw-tooltip-wrapper" class="tw-mg-t-05 tw-button ffz-button--hollow tw-tooltip-wrapper"
@click="reset(i.id)" @click="reset(i.id)"
> >
<span class="tw-button__text">Reset</span> <span class="tw-button__text">Reset</span>

View file

@ -110,6 +110,7 @@
{{ t('setting.actions.drag', 'Drag actions to re-order them.') }} {{ t('setting.actions.drag', 'Drag actions to re-order them.') }}
</div> </div>
<div <div
v-if="! maybe_clear"
v-on-clickaway="closeAdd" v-on-clickaway="closeAdd"
class="tw-relative" class="tw-relative"
> >
@ -130,7 +131,7 @@
dir="down-right" dir="down-right"
size="sm" size="sm"
> >
<simplebar classes="language-select-menu__balloon"> <simplebar classes="ffz-mh-30">
<div class="tw-pd-y-1"> <div class="tw-pd-y-1">
<template v-for="(preset, idx) in presets"> <template v-for="(preset, idx) in presets">
<div <div
@ -142,7 +143,7 @@
v-else v-else
:key="idx" :key="idx"
:disabled="preset.disabled" :disabled="preset.disabled"
class="tw-interactable tw-interactable--inverted tw-full-width" class="tw-interactable tw-interactable--hover-enabled tw-interactable--inverted tw-interactive tw-full-width"
@click="add(preset.value)" @click="add(preset.value)"
> >
<div class="tw-flex tw-align-items-center tw-pd-y-05 tw-pd-x-1"> <div class="tw-flex tw-align-items-center tw-pd-y-05 tw-pd-x-1">
@ -158,9 +159,9 @@
</balloon> </balloon>
</div> </div>
<button <button
v-if="val.length" v-if="! maybe_clear && val.length"
class="tw-mg-l-1 tw-button tw-button--text tw-tooltip-wrapper" class="tw-mg-l-1 tw-button tw-button--text tw-tooltip-wrapper"
@click="clear" @click="maybe_clear = true"
> >
<span class="tw-button__text ffz-i-trash"> <span class="tw-button__text ffz-i-trash">
{{ t('setting.delete-all', 'Delete All') }} {{ t('setting.delete-all', 'Delete All') }}
@ -169,6 +170,27 @@
{{ t('setting.actions.delete-all', "Delete all of this profile's actions.") }} {{ t('setting.actions.delete-all', "Delete all of this profile's actions.") }}
</span> </span>
</button> </button>
<button
v-if="maybe_clear"
class="tw-mg-l-1 tw-button tw-button--text tw-tooltip-wrapper"
@click="doClear"
>
<span class="tw-button__text ffz-i-trash">
{{ t('setting.delete-all', 'Delete All') }}
</span>
<span class="tw-tooltip tw-tooltip--down tw-tooltip--align-right">
{{ t('setting.actions.delete-all', "Delete all of this profile's actions.") }}
</span>
</button>
<button
v-if="maybe_clear"
class="tw-mg-l-1 tw-button tw-button--text tw-tooltip-wrapper"
@click="maybe_clear = false"
>
<span class="tw-button__text ffz-i-cancel">
{{ t('setting.cancel', 'Cancel') }}
</span>
</button>
<button <button
v-if="! val.length && has_default" v-if="! val.length && has_default"
class="tw-mg-l-1 tw-button tw-button--text tw-tooltip-wrapper" class="tw-mg-l-1 tw-button tw-button--text tw-tooltip-wrapper"
@ -224,6 +246,7 @@ export default {
is_deleted: false, is_deleted: false,
show_all: false, show_all: false,
maybe_clear: false,
add_open: false, add_open: false,
} }
}, },
@ -414,6 +437,11 @@ export default {
}, },
methods: { methods: {
doClear() {
this.maybe_clear = false;
this.clear();
},
closeAdd() { closeAdd() {
this.add_open = false; this.add_open = false;
}, },

View file

@ -28,7 +28,7 @@
</div> </div>
<div v-else class="tw-relative"> <div v-else class="tw-relative">
<button <button
class="tw-button tw-button--hollow ffz-color-preview" class="tw-button tw-button--text ffz-color-preview"
@click="togglePicker" @click="togglePicker"
@contextmenu.prevent="maybeResetColor" @contextmenu.prevent="maybeResetColor"
> >

View file

@ -40,7 +40,7 @@
</div> </div>
<button <button
v-else-if="canAddRule" v-else-if="canAddRule"
class="tw-button tw-button--hollow tw-mg-y-1 tw-full-width" class="tw-button ffz-button--hollow tw-mg-y-1 tw-full-width"
@click="adding = true" @click="adding = true"
> >
<span class="tw-button__text ffz-i-plus"> <span class="tw-button__text ffz-i-plus">

View file

@ -64,7 +64,7 @@
<simplebar classes="ffz-vertical-nav__items tw-full-width tw-flex-grow-1"> <simplebar classes="ffz-vertical-nav__items tw-full-width tw-flex-grow-1">
<header v-if="has_unseen" class="tw-border-b tw-pd-1"> <header v-if="has_unseen" class="tw-border-b tw-pd-1">
<button <button
class="tw-button tw-button--hollow tw-full-width" class="tw-button ffz-button--hollow tw-full-width"
@click="allRead" @click="allRead"
> >
<span class="tw-button__text"> <span class="tw-button__text">

View file

@ -66,7 +66,7 @@
<button <button
v-for="(profile, idx) in import_profiles" v-for="(profile, idx) in import_profiles"
:key="idx" :key="idx"
class="tw-block tw-full-width tw-mg-y-05 tw-mg-r-1 tw-pd-05 tw-button tw-button--hollow tw-tooltip-wrapper" class="tw-block tw-full-width tw-mg-y-05 tw-mg-r-1 tw-pd-05 tw-button ffz-button--hollow tw-c-text-overlay tw-tooltip-wrapper"
@click="importProfile(profile)" @click="importProfile(profile)"
> >
<span class="tw-button__text tw-c-text-overlay"> <span class="tw-button__text tw-c-text-overlay">
@ -95,7 +95,7 @@
</h4> </h4>
<button <button
class="tw-block tw-full-width tw-mg-y-05 tw-mg-r-1 tw-pd-05 tw-button tw-button--hollow" class="tw-block tw-full-width tw-mg-y-05 tw-mg-r-1 tw-pd-05 tw-button ffz-button--hollow tw-c-text-overlay"
@click="confirmImport(true)" @click="confirmImport(true)"
> >
<span class="tw-button__text tw-c-text-overlay ffz-i-ok"> <span class="tw-button__text tw-c-text-overlay ffz-i-ok">
@ -104,7 +104,7 @@
</button> </button>
<button <button
class="tw-block tw-full-width tw-mg-y-05 tw-mg-r-1 tw-pd-05 tw-button tw-button--hollow" class="tw-block tw-full-width tw-mg-y-05 tw-mg-r-1 tw-pd-05 tw-button ffz-button--hollow tw-c-text-overlay"
@click="confirmImport(false)" @click="confirmImport(false)"
> >
<span class="tw-button__text tw-c-text-overlay ffz-i-cancel"> <span class="tw-button__text tw-c-text-overlay ffz-i-cancel">

View file

@ -359,7 +359,7 @@ export default class Metadata extends Module {
let btn, popup; let btn, popup;
let cls = maybe_call(def.button, this, data); let cls = maybe_call(def.button, this, data);
if ( typeof cls !== 'string' ) if ( typeof cls !== 'string' )
cls = `tw-button--${cls ? 'hollow' : 'text'}`; cls = cls ? 'ffz-button--hollow' : 'tw-button--text';
if ( typeof icon === 'string' ) if ( typeof icon === 'string' )
icon = (<span class="tw-button__icon tw-button__icon--left"><figure class={icon} /></span>); icon = (<span class="tw-button__icon tw-button__icon--left"><figure class={icon} /></span>);
@ -572,7 +572,7 @@ export default class Metadata extends Module {
if ( btn ) { if ( btn ) {
let cls = maybe_call(def.button, this, data); let cls = maybe_call(def.button, this, data);
if ( typeof cls !== 'string' ) if ( typeof cls !== 'string' )
cls = `tw-button--${cls ? 'hollow' : 'text'}`; cls = cls ? 'ffz-button--hollow' : 'tw-button--text';
if ( btn._class !== cls ) { if ( btn._class !== cls ) {
btn._class = cls; btn._class = cls;
@ -661,7 +661,7 @@ export default class Metadata extends Module {
let btn, popup; let btn, popup;
let cls = maybe_call(def.button, this, data); let cls = maybe_call(def.button, this, data);
if ( typeof cls !== 'string' ) if ( typeof cls !== 'string' )
cls = `tw-button--${cls ? 'hollow' : 'text'}`; cls = cls ? 'ffz-button--hollow' : 'tw-button--text';
const fix = cls === 'tw-button--text'; const fix = cls === 'tw-button--text';
@ -674,7 +674,7 @@ export default class Metadata extends Module {
data-key={key} data-key={key}
tip_content={tooltip} tip_content={tooltip}
> >
{btn = (<button class={`tw-button ${cls}`}> {btn = (<button class={`tw-button ${cls} ffz-has-stat-arrow`}>
{icon} {icon}
{stat = (<span class="ffz-stat-text tw-button__text" />)} {stat = (<span class="ffz-stat-text tw-button__text" />)}
</button>)} </button>)}

View file

@ -171,6 +171,12 @@ export class LocalStorageProvider extends SettingsProvider {
} }
set(key, value) { set(key, value) {
if ( value === undefined ) {
if ( this.has(key) )
this.delete(key);
return;
}
this._cached.set(key, value); this._cached.set(key, value);
localStorage.setItem(this.prefix + key, JSON.stringify(value)); localStorage.setItem(this.prefix + key, JSON.stringify(value));
this.broadcast({type: 'set', key}); this.broadcast({type: 'set', key});

View file

@ -173,6 +173,7 @@ Twilight.KNOWN_MODULES = {
Twilight.CHAT_ROUTES = [ Twilight.CHAT_ROUTES = [
'collection', 'collection',
'popout', 'popout',
'dash-chat',
'video', 'video',
'user-video', 'user-video',
'user-clip', 'user-clip',
@ -193,6 +194,7 @@ Twilight.ROUTE_NAMES = {
'dir-all': 'Browse Live Channels', 'dir-all': 'Browse Live Channels',
'dash': 'Dashboard', 'dash': 'Dashboard',
'popout': 'Popout Chat', 'popout': 'Popout Chat',
'dash-chat': 'Dashboard Popout Chat',
'user-video': 'Channel Video' 'user-video': 'Channel Video'
}; };
@ -215,6 +217,7 @@ Twilight.ROUTES = {
//'dash-automod': '/:userName/dashboard/settings/automod', //'dash-automod': '/:userName/dashboard/settings/automod',
'event': '/event/:eventName', 'event': '/event/:eventName',
'popout': '/popout/:userName/chat', 'popout': '/popout/:userName/chat',
'dash-chat': '/popout/:userName/dashboard/live/chat',
'video': '/videos/:videoID', 'video': '/videos/:videoID',
'user-video': '/:userName/video/:videoID', 'user-video': '/:userName/video/:videoID',
'user-videos': '/:userName/videos/:filter?', 'user-videos': '/:userName/videos/:filter?',

View file

@ -388,7 +388,7 @@ export default class EmoteMenu extends Module {
return (<button return (<button
key={data.code} key={data.code}
data-tone={tone} data-tone={tone}
class="tw-interactive tw-block tw-full-width tw-interactable tw-interactable--inverted tw-pd-y-05 tw-pd-x-2" class="tw-interactive tw-block tw-full-width tw-interactable tw-interactable--hover-enabled tw-interactable--inverted tw-interactive tw-pd-y-05 tw-pd-x-2"
onClick={this.clickTone} onClick={this.clickTone}
> >
{this.renderEmoji(data)} {this.renderEmoji(data)}
@ -432,7 +432,7 @@ export default class EmoteMenu extends Module {
return (<div ref={this.saveRef} class="ffz--emoji-tone-picker tw-relative tw-mg-l-1"> return (<div ref={this.saveRef} class="ffz--emoji-tone-picker tw-relative tw-mg-l-1">
<button <button
class="tw-interactive tw-button tw-button--dropmenu tw-button--hollow" class="tw-interactive tw-button tw-button--dropmenu ffz-button--hollow"
onClick={this.onClick} onClick={this.onClick}
onMouseEnter={this.onMouseEnter} onMouseEnter={this.onMouseEnter}
> >
@ -929,6 +929,7 @@ export default class EmoteMenu extends Module {
} }
pickTone(tone) { pickTone(tone) {
tone = tone || null;
t.settings.provider.set('emoji-tone', tone); t.settings.provider.set('emoji-tone', tone);
this.setState(this.filterState( this.setState(this.filterState(
@ -1712,7 +1713,7 @@ export default class EmoteMenu extends Module {
<div class="emote-picker__tab-nav-container tw-flex tw-border-t tw-c-background-alt"> <div class="emote-picker__tab-nav-container tw-flex tw-border-t tw-c-background-alt">
<div class={`emote-picker-tab-item${tab === 'fav' ? ' emote-picker-tab-item--active' : ''} tw-relative`}> <div class={`emote-picker-tab-item${tab === 'fav' ? ' emote-picker-tab-item--active' : ''} tw-relative`}>
<button <button
class="ffz-tooltip tw-block tw-full-width tw-interactable tw-interactable--inverted tw-interactive" class="ffz-tooltip tw-block tw-full-width tw-interactable tw-interactable--hover-enabled tw-interactable--inverted tw-interactive"
id="emote-picker__fav" id="emote-picker__fav"
data-tab="fav" data-tab="fav"
data-tooltip-type="html" data-tooltip-type="html"
@ -1726,7 +1727,7 @@ export default class EmoteMenu extends Module {
</div> </div>
{this.state.has_channel_tab && <div class={`emote-picker-tab-item${tab === 'channel' ? ' emote-picker-tab-item--active' : ''} tw-relative`}> {this.state.has_channel_tab && <div class={`emote-picker-tab-item${tab === 'channel' ? ' emote-picker-tab-item--active' : ''} tw-relative`}>
<button <button
class="ffz-tooltip tw-block tw-full-width tw-interactable tw-interactable--inverted tw-interactive" class="ffz-tooltip tw-block tw-full-width tw-interactable tw-interactable--hover-enabled tw-interactable--inverted tw-interactive"
id="emote-picker__channel" id="emote-picker__channel"
data-tab="channel" data-tab="channel"
data-tooltip-type="html" data-tooltip-type="html"
@ -1740,7 +1741,7 @@ export default class EmoteMenu extends Module {
</div>} </div>}
<div class={`emote-picker-tab-item${tab === 'all' ? ' emote-picker-tab-item--active' : ''} tw-relative`}> <div class={`emote-picker-tab-item${tab === 'all' ? ' emote-picker-tab-item--active' : ''} tw-relative`}>
<button <button
class="ffz-tooltip tw-block tw-full-width tw-interactable tw-interactable--inverted tw-interactive" class="ffz-tooltip tw-block tw-full-width ttw-interactable tw-interactable--hover-enabled tw-interactable--inverted tw-interactive"
id="emote-picker__all" id="emote-picker__all"
data-tab="all" data-tab="all"
data-tooltip-type="html" data-tooltip-type="html"
@ -1754,7 +1755,7 @@ export default class EmoteMenu extends Module {
</div> </div>
{this.state.has_emoji_tab && <div class={`emote-picker-tab-item${tab === 'emoji' ? ' emote-picker-tab-item--active' : ''} tw-relative`}> {this.state.has_emoji_tab && <div class={`emote-picker-tab-item${tab === 'emoji' ? ' emote-picker-tab-item--active' : ''} tw-relative`}>
<button <button
class="ffz-tooltip tw-block tw-full-width tw-interactable tw-interactable--inverted tw-interactive" class="ffz-tooltip tw-block tw-full-width tw-interactable tw-interactable--hover-enabled tw-interactable--inverted tw-interactive"
id="emote-picker__emoji" id="emote-picker__emoji"
data-tab="emoji" data-tab="emoji"
data-tooltip-type="html" data-tooltip-type="html"
@ -1769,7 +1770,7 @@ export default class EmoteMenu extends Module {
<div class="tw-flex-grow-1" /> <div class="tw-flex-grow-1" />
{!loading && (<div class="emote-picker-tab-item tw-relative"> {!loading && (<div class="emote-picker-tab-item tw-relative">
<button <button
class="ffz-tooltip tw-block tw-full-width tw-interactable tw-interactable--inverted tw-interactive" class="ffz-tooltip tw-block tw-full-width tw-interactable tw-interactable--hover-enabled tw-interactable--inverted tw-interactive"
data-tooltip-type="html" data-tooltip-type="html"
data-title={t.i18n.t('emote-menu.refresh', 'Refresh Data')} data-title={t.i18n.t('emote-menu.refresh', 'Refresh Data')}
onClick={this.clickRefresh} onClick={this.clickRefresh}

View file

@ -91,6 +91,7 @@ const CHAT_TYPES = make_enum(
'GiftPaidUpgrade', 'GiftPaidUpgrade',
'AnonGiftPaidUpgrade', 'AnonGiftPaidUpgrade',
'PrimePaidUpgrade', 'PrimePaidUpgrade',
'ExtendSubscription',
'SubGift', 'SubGift',
'AnonSubGift', 'AnonSubGift',
'Clear', 'Clear',

View file

@ -57,7 +57,7 @@ export default class SettingsMenu extends Module {
this.ffzPauseClick = () => this.setState({ffzPauseMenu: ! this.state.ffzPauseMenu}); this.ffzPauseClick = () => this.setState({ffzPauseMenu: ! this.state.ffzPauseMenu});
val.props.children.push(<div class="tw-full-width tw-relative"> val.props.children.push(<div class="tw-full-width tw-relative">
<button class="tw-block tw-border-radius-medium tw-full-width tw-interactable tw-interactable--inverted tw-interactive" onClick={this.ffzSettingsClick}> <button class="tw-block tw-border-radius-medium tw-full-width tw-interactable tw-interactable--hover-enabled tw-interactable--inverted tw-interactive" onClick={this.ffzSettingsClick}>
<div class="tw-align-items-center tw-flex tw-pd-05 tw-relative"> <div class="tw-align-items-center tw-flex tw-pd-05 tw-relative">
<div class="tw-flex-grow-1"> <div class="tw-flex-grow-1">
{t.i18n.t('site.menu_button', 'FrankerFaceZ Control Center')} {t.i18n.t('site.menu_button', 'FrankerFaceZ Control Center')}
@ -85,7 +85,7 @@ export default class SettingsMenu extends Module {
val.props.children.push(<div class="tw-full-width tw-relative"> val.props.children.push(<div class="tw-full-width tw-relative">
<button <button
class="tw-block tw-border-radius-medium tw-full-width tw-interactable tw-interactable--inverted tw-interactive" class="tw-block tw-border-radius-medium tw-full-width tw-interactable tw-interactable--hover-enabled tw-interactable--inverted tw-interactive"
onClick={this.ffzPauseClick} onClick={this.ffzPauseClick}
> >
<div class="tw-align-items-center tw-flex tw-pd-05 tw-relative"> <div class="tw-align-items-center tw-flex tw-pd-05 tw-relative">
@ -98,21 +98,6 @@ export default class SettingsMenu extends Module {
</button> </button>
</div>); </div>);
/*val.props.children.push(<div class="tw-mg-t-1">
<button
class="tw-block tw-full-width tw-interactable tw-interactable--base tw-interactive"
onClick={this.ffzPauseClick}
>
<div class="tw-flex tw-justify-content-between tw-pd-y-05">
{t.i18n.t('chat.settings.pause', 'Pause Chat')}
<div>
{reason}
<figure class="tw-svg ffz-i-right-dir" />
</div>
</div>
</button>
</div>)*/
return val; return val;
} }

View file

@ -6,7 +6,7 @@
<div class="tw-flex-grow-1 tw-pd-x-2" /> <div class="tw-flex-grow-1 tw-pd-x-2" />
<button <button
v-if="hasUpdate" v-if="hasUpdate"
class="ffz--featured-follow-update tw-button tw-button--hollow" class="ffz--featured-follow-update tw-button ffz-button--hollow"
@click="refresh" @click="refresh"
> >
<span class="tw-button__icon tw-button__icon--left"> <span class="tw-button__icon tw-button__icon--left">

View file

@ -50,7 +50,7 @@
<div class="tw-flex-grow-1 tw-pd-x-2" /> <div class="tw-flex-grow-1 tw-pd-x-2" />
<button <button
:class="{'tw-button--disabled': addedToHosts}" :class="{'tw-button--disabled': addedToHosts}"
class="tw-button tw-button--hollow tw-mg-x-05" class="tw-button ffz-button--hollow tw-mg-x-05"
@click="addToAutoHosts" @click="addToAutoHosts"
> >
<span class="tw-button__text">{{ t('metadata.host.add-channel', 'Add To Auto Host') }}</span> <span class="tw-button__text">{{ t('metadata.host.add-channel', 'Add To Auto Host') }}</span>

View file

@ -8,7 +8,7 @@ import Module from 'utilities/module';
import {has} from 'utilities/object'; import {has} from 'utilities/object';
const PORTRAIT_ROUTES = ['user', 'video', 'user-video', 'user-clip', 'user-videos', 'user-clips', 'user-collections', 'user-events', 'user-followers', 'user-following']; const PORTRAIT_ROUTES = ['user', 'video', 'user-video', 'user-clip', 'user-videos', 'user-clips', 'user-collections', 'user-events', 'user-followers', 'user-following'];
const MINIMAL_ROUTES = ['popout', 'embed-chat']; const MINIMAL_ROUTES = ['popout', 'embed-chat', 'dash-chat'];
export default class Layout extends Module { export default class Layout extends Module {
constructor(...args) { constructor(...args) {

View file

@ -181,6 +181,7 @@
} }
.emote-picker__tab-content { .emote-picker__tab-content {
height: unset !important;
max-height: 50rem; max-height: 50rem;
} }

View file

@ -154,26 +154,27 @@
box-shadow: 0 0 6px 0 var(--ffz-color-5); box-shadow: 0 0 6px 0 var(--ffz-color-5);
} }
} }
.ffz-button--hollow,
.tw-button--hollow { .tw-button--hollow {
border-color: var(--ffz-color-8); border-color: var(--ffz-color-8) !important;
background-color: transparent; background-color: transparent !important;
color: var(--ffz-color-1); color: var(--ffz-color-1) !important;
&:hover { &:hover {
border-color: var(--ffz-color-11); border-color: var(--ffz-color-11) !important;
background-color: var(--ffz-color-9); background-color: var(--ffz-color-9) !important;
color: var(--ffz-color-10); color: var(--ffz-color-10) !important;
} }
&:focus { &:focus {
border-color: var(--ffz-color-11); border-color: var(--ffz-color-11) !important;
background-color: var(--ffz-color-9); background-color: var(--ffz-color-9) !important;
color: var(--ffz-color-10); color: var(--ffz-color-10) !important;
box-shadow: 0 0 6px 0 var(--ffz-color-5); box-shadow: 0 0 6px 0 var(--ffz-color-5) !important;
} }
&:active { &:active {
border-color: var(--ffz-color-13); border-color: var(--ffz-color-13) !important;
background-color: var(--ffz-color-12); background-color: var(--ffz-color-12) !important;
color: var(--ffz-color-10); color: var(--ffz-color-10) !important;
box-shadow: 0 0 6px 0 var(--ffz-color-5); box-shadow: 0 0 6px 0 var(--ffz-color-5) !important;
} }
} }
.tw-button--alert { .tw-button--alert {

View file

@ -46,7 +46,7 @@
:id="'ffz-autocomplete-item-' + id + '-' + idx" :id="'ffz-autocomplete-item-' + id + '-' + idx"
:key="has(item, 'id') ? item.id : idx" :key="has(item, 'id') ? item.id : idx"
:class="{'tw-interactable--hover' : idx === index}" :class="{'tw-interactable--hover' : idx === index}"
class="tw-block tw-full-width tw-interactable tw-interactable--inverted tw-interactive" class="tw-block tw-full-width tw-interactable tw-interactable--hover-enabled tw-interactable--inverted tw-interactive"
tabindex="-1" tabindex="-1"
data-selectable="true" data-selectable="true"
@mouseenter="index = idx" @mouseenter="index = idx"

View file

@ -48,7 +48,7 @@
:aria-checked="val === i[0]" :aria-checked="val === i[0]"
:class="{'tw-interactable--selected': val === i[0]}" :class="{'tw-interactable--selected': val === i[0]}"
:data-title="i[1]" :data-title="i[1]"
class="ffz-tooltip ffz-icon tw-interactable tw-interactable--inverted" class="ffz-tooltip ffz-icon tw-interactable tw-interactable--hover-enabled tw-interactable--inverted tw-interactive"
role="radio" role="radio"
tabindex="0" tabindex="0"
@keydown.space.stop.prevent="" @keydown.space.stop.prevent=""

View file

@ -412,7 +412,6 @@ export function makeReference(x, y, height=0, width=0) {
clientHeight: height clientHeight: height
}; };
console.log('makeReference', out);
return out; return out;
} }

View file

@ -57,7 +57,8 @@ export default class TwitchData extends Module {
constructor(...args) { constructor(...args) {
super(...args); super(...args);
this.inject('site'); this.site = this.parent;
this.inject('site.apollo'); this.inject('site.apollo');
this.inject('site.web_munch'); this.inject('site.web_munch');

View file

@ -256,14 +256,14 @@ textarea.tw-input {
} }
} }
@mixin button-colors($color, $text, $shadow) { @mixin button-colors($color, $border, $text, $shadow) {
&:hover, &:focus { &:hover, &:focus, &:active {
background: $color !important; background: $color !important;
border-color: $color !important; border-color: $border !important;
color: $text !important; color: $text !important;
} }
&:focus { &:focus, &:active {
box-shadow: 0 0 $shadow $color !important; box-shadow: 0 0 $shadow $color !important;
} }
} }
@ -273,12 +273,28 @@ textarea.tw-input {
color: #fff !important; color: #fff !important;
} }
.ffz-button--hollow {
border-color: #dad8de !important;
background-color: transparent !important;
color: #000 !important;
@include button-colors(#6441a4, #9a7fcc, #fff, #7d5bbc);
.tw-root--theme-dark & {
border-color: #424242 !important;
color: #dadada !important;
@include button-colors(#7d5bbe, #9a7fcc, #eeeeee, #7d5bbe)
}
}
.ffz--button-enable { .ffz--button-enable {
@include button-colors(#007600, #fff, 6px); @include button-colors(#007600, #007600, #fff, 6px);
} }
.ffz--button-disable { .ffz--button-disable {
@include button-colors(#bd0f0f, #fff, 6px); @include button-colors(#bd0f0f, #bd0f0f, #fff, 6px);
} }
.ffz--example-report { .ffz--example-report {
@ -299,4 +315,9 @@ textarea.tw-input {
position: absolute; position: absolute;
top: 1rem; top: 1rem;
right: 3rem; right: 3rem;
}
.ffz-mh-30 {
max-height: 30rem;
} }

View file

@ -59,7 +59,7 @@
&:hover { &:hover {
background: rgba(100, 65, 164, .05); background: rgba(100, 65, 164, .05);
.tw-theme-dark & { .tw-root--theme-dark & {
background: rgba(100, 65, 164, .2); background: rgba(100, 65, 164, .2);
} }
} }