mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-28 15:27:43 +00:00
3.5.400. Add support for follower-only chat mode. Dark theme CSS tweaks for the dashboard and chat settings menu. Remove the uptime correction for the dashboard since Twitch fixed their formatting.
This commit is contained in:
parent
48f2f331b7
commit
c12d240fbd
7 changed files with 42 additions and 38 deletions
|
@ -1,4 +1,12 @@
|
|||
<div class="list-header">3.5.399 <time datetime="2016-12-14">(2016-12-14)</time></div>
|
||||
<div class="list-header">3.5.400 <time datetime="2016-12-16">(2016-12-16)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Added: Support for Follower-Only chat mode.</li>
|
||||
<li>Changed: Minor dark theme CSS tweaks.</li>
|
||||
<li> </li>
|
||||
<li>400 revisions is a lot.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header">3.5.399 <time datetime="2016-12-15">(2016-12-15)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Added: Holiday cheer.</li>
|
||||
<li>Changed: The Bits Stacking option now lets you combine all cheer emoticons into one, or combine them by type.</li>
|
||||
|
|
7
dark.css
7
dark.css
|
@ -345,7 +345,9 @@ body.ffz-dark:not([data-page="teams#show"]),
|
|||
}
|
||||
|
||||
.ffz-dark .balloon .balloon__link { color: #a68ed2 !important }
|
||||
.ffz-dark .balloon .balloon__link--selected,
|
||||
.ffz-dark .balloon .balloon__link:hover { color: #fff !important }
|
||||
.ffz-dark .balloon .balloon__link--selected { background-color: #6441a5 !important }
|
||||
|
||||
.ffz-dark .st-autocomplete-sidebar .all p:not(.active),
|
||||
.ffz-dark .st-autocomplete-small .all p:not(.active),
|
||||
|
@ -1108,6 +1110,10 @@ body.ffz-dark:not([data-page="teams#show"]),
|
|||
-webkit-filter: invert(100%);
|
||||
}
|
||||
|
||||
.ffz-dark .form__input[type=range] {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.ffz-dark .form__input[type=text],
|
||||
.ffz-dark .form__input[type=email],
|
||||
.ffz-dark .form__input[type=search],
|
||||
|
@ -1274,6 +1280,7 @@ body.ffz-dark:not([data-page="teams#show"]),
|
|||
border-top-color: rgba(255,255,255, 0.2);
|
||||
}
|
||||
|
||||
.ffz-dark .dash-widget__divider,
|
||||
.ffz-dark .conversation-settings-menu .options-divider {
|
||||
border-bottom-color: rgba(255,255,255,0.2);
|
||||
}
|
||||
|
|
|
@ -29,6 +29,12 @@ var FFZ = window.FrankerFaceZ,
|
|||
},
|
||||
slowoff: {info: 'Disable Slow Mode'},
|
||||
|
||||
/*followers: {
|
||||
label: '/followers <i>[duration followed]</i>',
|
||||
info: 'Enable Followers-Only Mode'
|
||||
},
|
||||
followersoff: { info: 'Disable Followers-Only Mode'},*/
|
||||
|
||||
r9kbeta: {info: 'Enable R9k Mode'},
|
||||
r9kbetaoff: {info: 'Disable R9k Mode'},
|
||||
|
||||
|
|
|
@ -27,35 +27,8 @@ FFZ.prototype.setup_dashboard = function() {
|
|||
utils.toggle_cls('ffz-minimal-dashboard')(true);
|
||||
|
||||
this.update_views('component:dashboards/live-widget', this.modify_dashboard_widget);
|
||||
this.update_views('component:dashboards/live/stream-stats', this.make_uptime_great_again);
|
||||
}
|
||||
|
||||
|
||||
FFZ.prototype.make_uptime_great_again = function(component) {
|
||||
var f = this;
|
||||
utils.ember_reopen_view(component, {
|
||||
ffz_update: function() {
|
||||
this.ffzFixUptime();
|
||||
},
|
||||
|
||||
ffzFixUptime: function() {
|
||||
var online = this.get('channel.stream.createdAt'),
|
||||
now = Date.now() - (f._ws_server_offset || 0),
|
||||
uptime = online && Math.floor((now - online.getTime()) / 1000) || -1,
|
||||
setting = f.settings.stream_uptime;
|
||||
|
||||
this.set('timeLive', uptime >= 0 ? utils.time_to_string(uptime, false, false, false, true) : 'Offline');
|
||||
},
|
||||
|
||||
_reloadStream: function() {
|
||||
var t = this;
|
||||
this.get('channel.stream').then(function(stream) {
|
||||
t.isDestroyed || stream.reload().then(function(stream) {
|
||||
t.isDestroyed || t.ffzFixUptime();
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
//this.update_views('component:dashboards/live/stream-stats', this.modify_dashboard_stats);
|
||||
//this.update_views('component:dashboards/live/stream-health', this.modify_dashboard_health);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -22,6 +22,12 @@ var FFZ = window.FrankerFaceZ,
|
|||
["r9k", "r9k", "This room is in R9K-mode."],
|
||||
["emote", "emoteOnly", "This room is in Twitch emoticons only mode. Emoticons added by extensions are not available in this mode."],
|
||||
["sub", "subsOnly", "This room is in subscribers-only mode."],
|
||||
["follow", function(room) {
|
||||
return room && room.get('followersOnly') > -1
|
||||
}, function(room) {
|
||||
var name = room && (room.get('channel.display_name') || room.get("tmiRoom.displayName") || room.get('isGroupRoom') ? room.get('tmiRoom.name') : FFZ.get_capitalization(room.get('name')) );
|
||||
return "This room is in followers-only mode. You may only participate in chat if you have been following " + utils.sanitize(name) + " for at least " + utils.duration_string((room && room.get('followersOnly') || 0) * 60, true, true) + "."
|
||||
}],
|
||||
["slow", "slow", function(room) { return "This room is in slow mode. You may send messages every <nobr>" + utils.number_commas(room && room.get('slow') || 120) + " seconds</nobr>." }],
|
||||
["ban", "ffz_banned", "You have been banned from talking in this room."],
|
||||
["delay", function(room) {
|
||||
|
|
|
@ -61,7 +61,7 @@ FFZ.channel_metadata = {};
|
|||
|
||||
// Version
|
||||
var VER = FFZ.version_info = {
|
||||
major: 3, minor: 5, revision: 399,
|
||||
major: 3, minor: 5, revision: 400,
|
||||
toString: function() {
|
||||
return [VER.major, VER.minor, VER.revision].join(".") + (VER.extra || "");
|
||||
}
|
||||
|
|
18
src/utils.js
18
src/utils.js
|
@ -965,11 +965,11 @@ module.exports = FFZ.utils = {
|
|||
return (days||'') + ((!no_hours || days || hours) ? ((days && hours < 10 ? "0" : "") + hours + ':') : '') + (minutes < 10 ? "0" : "") + minutes + (no_seconds ? "" : (":" + (seconds < 10 ? "0" : "") + seconds));
|
||||
},
|
||||
|
||||
duration_string: function(val, no_purge) {
|
||||
duration_string: function(val, no_purge, full_names) {
|
||||
if ( ! no_purge && val === 1 )
|
||||
return 'Purge';
|
||||
|
||||
if ( DURATIONS[val] )
|
||||
if ( ! full_names && DURATIONS[val] )
|
||||
return DURATIONS[val];
|
||||
|
||||
var weeks, days, hours, minutes, seconds;
|
||||
|
@ -986,12 +986,16 @@ module.exports = FFZ.utils = {
|
|||
minutes = Math.floor(seconds / 60);
|
||||
seconds %= 60;
|
||||
|
||||
var out = DURATIONS[val] = (weeks ? weeks + 'w' : '') +
|
||||
(days ? days + 'd' : '') +
|
||||
(hours ? hours + 'h' : '') +
|
||||
(minutes ? minutes + 'm' : '') +
|
||||
(seconds ? seconds + 's' : '');
|
||||
var out = (weeks ? weeks + (full_names ? ' week' + pluralize(weeks) + ', ' : 'w') : '') +
|
||||
(days ? days + (full_names ? ' day' + pluralize(days) + ', ' : 'd') : '') +
|
||||
(hours ? hours + (full_names ? ' hour' + pluralize(hours) + ', ' : 'h') : '') +
|
||||
(minutes ? minutes + (full_names ? ' minute' + pluralize(minutes) + ', ' : 'm') : '') +
|
||||
(seconds ? seconds + (full_names ? ' second' + pluralize(seconds) + ', ' : 's') : '');
|
||||
|
||||
if ( full_names )
|
||||
return out.substr(0, out.length - 2);
|
||||
|
||||
DURATIONS[val] = out;
|
||||
return out;
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue