mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-25 03:58:30 +00:00
3.5.138. Fixed Chat Room Management tooltip. Fixed subscriber emote favorite stars. Fixed chat lines as much as I can for now.
This commit is contained in:
parent
4972ae3c54
commit
e6757432a8
4 changed files with 46 additions and 20 deletions
|
@ -379,7 +379,7 @@ FFZ.prototype.setup_chatview = function() {
|
||||||
|
|
||||||
var total = this.get('invitedPrivateGroupRooms.length') || 0;
|
var total = this.get('invitedPrivateGroupRooms.length') || 0;
|
||||||
|
|
||||||
if ( ! f._chatv._ffz_tabs )
|
if ( ! f._chatv._ffz_tabs && f._chatv.ffz_unread )
|
||||||
for(var room_id in f._chatv.ffz_unread)
|
for(var room_id in f._chatv.ffz_unread)
|
||||||
if ( f._chatv.ffz_unread[room_id] )
|
if ( f._chatv.ffz_unread[room_id] )
|
||||||
total++;
|
total++;
|
||||||
|
@ -389,7 +389,7 @@ FFZ.prototype.setup_chatview = function() {
|
||||||
|
|
||||||
_kickUserFromRoomNoLongerInList: function() {
|
_kickUserFromRoomNoLongerInList: function() {
|
||||||
// Remove an unread notice for any missing channels.
|
// Remove an unread notice for any missing channels.
|
||||||
if ( f._chatv ) {
|
if ( f._chatv && f._chatv.ffz_unread ) {
|
||||||
var updated = false;
|
var updated = false;
|
||||||
for(var room_id in f._chatv.ffz_unread)
|
for(var room_id in f._chatv.ffz_unread)
|
||||||
if ( f._chatv.ffz_unread[room_id] && (!f.rooms[room_id] || !f.rooms[room_id].room) ) {
|
if ( f._chatv.ffz_unread[room_id] && (!f.rooms[room_id] || !f.rooms[room_id].room) ) {
|
||||||
|
@ -487,22 +487,26 @@ FFZ.prototype._modify_cview = function(view) {
|
||||||
try {
|
try {
|
||||||
this.ffzInit();
|
this.ffzInit();
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
f.error("ChatView didInsertElement: " + err);
|
f.error("view:chat ffzInit error: " + err);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
didUpdate: function() {
|
||||||
|
this._super();
|
||||||
|
f.log("view:chat didUpdate", this)
|
||||||
|
},
|
||||||
|
|
||||||
willClearRender: function() {
|
willClearRender: function() {
|
||||||
try {
|
try {
|
||||||
this.ffzTeardown();
|
this.ffzTeardown();
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
f.error("ChatView willClearRender: " + err);
|
f.error("view:chat ffzTeardown error: " + err);
|
||||||
}
|
}
|
||||||
this._super();
|
this._super();
|
||||||
},
|
},
|
||||||
|
|
||||||
ffzInit: function() {
|
ffzInit: function() {
|
||||||
f._chatv = this;
|
f._chatv = this;
|
||||||
this.ffz_unread = {};
|
|
||||||
|
|
||||||
this.$('.textarea-contain').append(f.build_ui_link(this));
|
this.$('.textarea-contain').append(f.build_ui_link(this));
|
||||||
this.$('.chat-messages').find('.html-tooltip').tipsy({live: true, html: true, gravity: utils.tooltip_placement(2*constants.TOOLTIP_DISTANCE, 'n')});
|
this.$('.chat-messages').find('.html-tooltip').tipsy({live: true, html: true, gravity: utils.tooltip_placement(2*constants.TOOLTIP_DISTANCE, 'n')});
|
||||||
|
@ -571,11 +575,6 @@ FFZ.prototype._modify_cview = function(view) {
|
||||||
|
|
||||||
ffzChangeRoom: Ember.observer('controller.currentRoom', function() {
|
ffzChangeRoom: Ember.observer('controller.currentRoom', function() {
|
||||||
f.update_ui_link();
|
f.update_ui_link();
|
||||||
|
|
||||||
if ( ! this.ffz_unread )
|
|
||||||
f.log("!! Chat View Not Initialized !!", this);
|
|
||||||
|
|
||||||
// Temporary fix
|
|
||||||
this.ffz_unread = this.ffz_unread || {};
|
this.ffz_unread = this.ffz_unread || {};
|
||||||
|
|
||||||
// Close mod cards when changing to a new room.
|
// Close mod cards when changing to a new room.
|
||||||
|
@ -584,7 +583,7 @@ FFZ.prototype._modify_cview = function(view) {
|
||||||
|
|
||||||
var room = this.get('controller.currentRoom'),
|
var room = this.get('controller.currentRoom'),
|
||||||
room_id = room && room.get('id'),
|
room_id = room && room.get('id'),
|
||||||
was_unread = room_id && this.ffz_unread && this.ffz_unread[room_id],
|
was_unread = room_id && this.ffz_unread[room_id],
|
||||||
update_height = false;
|
update_height = false;
|
||||||
|
|
||||||
if ( room ) {
|
if ( room ) {
|
||||||
|
@ -714,6 +713,7 @@ FFZ.prototype._modify_cview = function(view) {
|
||||||
|
|
||||||
ffzUpdateUnread: function(target_id) {
|
ffzUpdateUnread: function(target_id) {
|
||||||
var current_id = this.get('controller.currentRoom.id');
|
var current_id = this.get('controller.currentRoom.id');
|
||||||
|
this.ffz_unread = this.ffz_unread || {};
|
||||||
|
|
||||||
if ( target_id === current_id )
|
if ( target_id === current_id )
|
||||||
// We don't care about updates to the current room.
|
// We don't care about updates to the current room.
|
||||||
|
@ -1051,10 +1051,12 @@ FFZ.prototype._modify_cview = function(view) {
|
||||||
|
|
||||||
|
|
||||||
// Chat Room Management Button
|
// Chat Room Management Button
|
||||||
link.className = 'button glyph-only tooltip';
|
link.className = 'button glyph-only';
|
||||||
link.title = "Chat Room Management";
|
link.title = "Chat Room Management";
|
||||||
link.innerHTML = constants.ROOMS + '<span class="notifications"></span>';
|
link.innerHTML = constants.ROOMS + '<span class="notifications"></span>';
|
||||||
|
|
||||||
|
jQuery(link).tipsy({gravity: "n", offset: 5});
|
||||||
|
|
||||||
link.addEventListener('click', function() {
|
link.addEventListener('click', function() {
|
||||||
var controller = view.get('controller');
|
var controller = view.get('controller');
|
||||||
controller && controller.set('showList', !controller.get('showList'));
|
controller && controller.set('showList', !controller.get('showList'));
|
||||||
|
|
|
@ -607,6 +607,18 @@ FFZ.prototype.setup_line = function() {
|
||||||
else
|
else
|
||||||
this.log("Couldn't find VOD Chat Line component.");
|
this.log("Couldn't find VOD Chat Line component.");
|
||||||
|
|
||||||
|
|
||||||
|
var other_lines = ['message-line','whisper-line'];
|
||||||
|
for(var i=0; i < other_lines.length; i++) {
|
||||||
|
var component = utils.ember_resolve('component:' + other_lines[i]);
|
||||||
|
if ( component )
|
||||||
|
component.reopen({
|
||||||
|
didUpdate: function() { },
|
||||||
|
didInsertElement: function() { }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Store the capitalization of our own name.
|
// Store the capitalization of our own name.
|
||||||
var user = this.get_user();
|
var user = this.get_user();
|
||||||
if ( user && user.name )
|
if ( user && user.name )
|
||||||
|
@ -810,12 +822,24 @@ FFZ.prototype._modify_chat_line = function(component, is_vod) {
|
||||||
classNameBindings: is_vod ? ["msgObject.ffz_has_mention:ffz-mentioned"] : [":message-line", ":chat-line", "msgObject.style", "msgObject.ffz_has_mention:ffz-mentioned", "ffzWasDeleted:ffz-deleted", "ffzHasOldMessages:clearfix", "ffzHasOldMessages:ffz-has-deleted"],
|
classNameBindings: is_vod ? ["msgObject.ffz_has_mention:ffz-mentioned"] : [":message-line", ":chat-line", "msgObject.style", "msgObject.ffz_has_mention:ffz-mentioned", "ffzWasDeleted:ffz-deleted", "ffzHasOldMessages:clearfix", "ffzHasOldMessages:ffz-has-deleted"],
|
||||||
attributeBindings: ["msgObject.room:data-room", "msgObject.from:data-sender", "msgObject.deleted:data-deleted"],
|
attributeBindings: ["msgObject.room:data-room", "msgObject.from:data-sender", "msgObject.deleted:data-deleted"],
|
||||||
|
|
||||||
render: function(e) {
|
didUpdate: function() {
|
||||||
e.push(this.buildSenderHTML());
|
this.ffzRender();
|
||||||
if ( this.get("msgObject.deleted") )
|
},
|
||||||
e.push(this.buildDeletedMessageHTML())
|
|
||||||
|
didInsertElement: function() {
|
||||||
|
this.ffzRender();
|
||||||
|
},
|
||||||
|
|
||||||
|
ffzRender: function() {
|
||||||
|
var el = this.get('element'),
|
||||||
|
output = this.buildSenderHTML();
|
||||||
|
|
||||||
|
if ( this.get('msgObject.deleted') )
|
||||||
|
output += this.buildDeletedMessageHTML()
|
||||||
else
|
else
|
||||||
e.push(this.buildMessageHTML());
|
output += this.buildMessageHTML();
|
||||||
|
|
||||||
|
el.innerHTML = output;
|
||||||
},
|
},
|
||||||
|
|
||||||
ffzWasDeleted: function() {
|
ffzWasDeleted: function() {
|
||||||
|
|
|
@ -35,7 +35,7 @@ FFZ.msg_commands = {};
|
||||||
|
|
||||||
// Version
|
// Version
|
||||||
var VER = FFZ.version_info = {
|
var VER = FFZ.version_info = {
|
||||||
major: 3, minor: 5, revision: 136,
|
major: 3, minor: 5, revision: 138,
|
||||||
toString: function() {
|
toString: function() {
|
||||||
return [VER.major, VER.minor, VER.revision].join(".") + (VER.extra || "");
|
return [VER.major, VER.minor, VER.revision].join(".") + (VER.extra || "");
|
||||||
}
|
}
|
||||||
|
|
|
@ -561,7 +561,7 @@ FFZ.menu_pages.channel = {
|
||||||
if ( emote.emoticon_set ) {
|
if ( emote.emoticon_set ) {
|
||||||
var favs = this.settings.favorite_emotes["twitch-" + emote.emoticon_set];
|
var favs = this.settings.favorite_emotes["twitch-" + emote.emoticon_set];
|
||||||
s.classList.add('ffz-can-favorite');
|
s.classList.add('ffz-can-favorite');
|
||||||
s.classList.toggle('ffz-favorite', favs && favs.indexOf(emote.id) !== -1);
|
s.classList.toggle('ffz-favorite', favs && favs.indexOf(emote.id) !== -1 || false);
|
||||||
}
|
}
|
||||||
|
|
||||||
s.setAttribute('data-emote', emote.id);
|
s.setAttribute('data-emote', emote.id);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue