mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-05 22:00:54 +00:00
3.5.432. Add more stats to mod cards, including username history. De-duplicate mod card stats code with about menu debugging code. Closes #105.
This commit is contained in:
parent
81945e601d
commit
df7f5d6ba0
10 changed files with 267 additions and 135 deletions
|
@ -374,9 +374,9 @@ FFZ.prototype.setup_layout = function() {
|
|||
'.ffz-theater-stats .app-main.theatre .cn-hosting--bottom,' +
|
||||
'.ffz-theater-stats .app-main.theatre .cn-metabar__more {' +
|
||||
'max-width: calc(100% - 350px);' +
|
||||
'bottom: ' + (theatre_video_bottom + 55) + 'px !important}' +
|
||||
'bottom: ' + (theatre_video_bottom + 85) + 'px !important}' +
|
||||
'.ffz-theater-stats:not(.ffz-theatre-conversations):not(.ffz-top-conversations) .app-main.theatre .cn-metabar__more {' +
|
||||
'bottom: ' + (theatre_video_bottom + 90) + 'px !important}';
|
||||
'bottom: ' + (theatre_video_bottom + 130) + 'px !important}';
|
||||
|
||||
} else {
|
||||
out += '.ffz-sidebar-swap .player-mini{left:' + (width + 10) + 'px !important}' +
|
||||
|
|
|
@ -17,6 +17,7 @@ var FFZ = window.FrankerFaceZ,
|
|||
C: 67,
|
||||
H: 72,
|
||||
S: 83,
|
||||
Y: 89,
|
||||
N: 78
|
||||
},
|
||||
|
||||
|
@ -1140,9 +1141,12 @@ FFZ.prototype.modify_moderation_card = function(component) {
|
|||
else if ( t.lv_view && key === keycodes.H )
|
||||
return t.ffzChangePage('history');
|
||||
|
||||
else if ( t.lv_view && key === keycodes.S )
|
||||
else if ( key === keycodes.S )
|
||||
return t.ffzChangePage('stats');
|
||||
|
||||
else if ( key === keycodes.Y )
|
||||
return t.ffzChangePage('name_history');
|
||||
|
||||
else if ( t.lv_view_notes && key === keycodes.N )
|
||||
return t.ffzChangePage('notes');
|
||||
|
||||
|
@ -1367,6 +1371,9 @@ FFZ.prototype.modify_moderation_card = function(component) {
|
|||
if ( page_id === 'default' )
|
||||
tab.classList.add('active');
|
||||
|
||||
if ( page.needs_lv )
|
||||
tab.classList.add('needs-lv');
|
||||
|
||||
tab.setAttribute('data-page', page_id);
|
||||
tabs.appendChild(tab);
|
||||
|
||||
|
|
|
@ -15,7 +15,9 @@ var FFZ = window.FrankerFaceZ,
|
|||
'emoteonlyoff': 'emote_only_off',
|
||||
'host': 'host_on',
|
||||
'unhost': 'host_off',
|
||||
'clear': 'clear_chat'
|
||||
'clear': 'clear_chat',
|
||||
'followersoff': 'followers_off',
|
||||
'followers': 'followers_on'
|
||||
},
|
||||
|
||||
STATUS_BADGES = [
|
||||
|
@ -1346,7 +1348,19 @@ FFZ.prototype._modify_room = function(room) {
|
|||
|
||||
var target_notice = NOTICE_MAPPING[event.moderation_action];
|
||||
if ( target_notice ) {
|
||||
var last_notice = this.ffz_last_notices && this.ffz_last_notices[target_notice];
|
||||
var last_notice;
|
||||
if ( ! this.ffz_last_notices )
|
||||
last_notice = null;
|
||||
else if ( Array.isArray(target_notice) )
|
||||
for(var i=0; i < target_notice.length; i++) {
|
||||
var tn = this.ffz_last_notices[target_notice[i]];
|
||||
if ( tn ) {
|
||||
last_notice = tn;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
last_notice = this.ffz_last_notices[target_notice];
|
||||
|
||||
if ( last_notice && ! last_notice.has_owner ) {
|
||||
last_notice.message += ' (By: ' + event.created_by + ')';
|
||||
|
@ -1369,7 +1383,7 @@ FFZ.prototype._modify_room = function(room) {
|
|||
if ( ! event.topic || event.topic.substr(-room_id.length) !== room_id || event.created_by === this.get("session.userData.login") )
|
||||
return;
|
||||
|
||||
//f.log("Login Moderation for " + this.get('id') + ' [' + room_id + ']', event);
|
||||
f.log("Login Moderation for " + this.get('id') + ' [' + room_id + ']', event);
|
||||
|
||||
// In case we get unexpected input, do the other thing.
|
||||
if ( f.has_bttv || ["ban", "unban", "timeout", "untimeout"].indexOf(event.moderation_action) === -1 )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue