mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-25 12:08:30 +00:00
3.5.380. Fix bits rendering, maybe. Hook relocated scrolling logic. (Why is it in layout? :-/) Closes #57
This commit is contained in:
parent
32f3e9b20b
commit
b5f2677642
4 changed files with 42 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
|||
<div class="list-header">3.5.380 <time datetime="2016-11-23">(2016-11-23)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Fixed: Lazy load bits rendering information to avoid a race condition.</li>
|
||||
<li>Fixed: Hook the new scrolling logic in the Ember service layout.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header">3.5.379 <time datetime="2016-11-23">(2016-11-23)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Changed: Minor refactor to bits rendering.</li>
|
||||
|
|
|
@ -91,7 +91,15 @@ FFZ.prototype.setup_bits = function() {
|
|||
return this.error("Unable to locate the Ember service:bits-rendering-config");
|
||||
|
||||
Service.reopen({
|
||||
ffz_has_css: false,
|
||||
|
||||
ffz_get_tier: function(prefix, amount) {
|
||||
if ( ! this.get('isLoaded') ) {
|
||||
this._actionPromiseCache = false;
|
||||
this.loadRenderConfig();
|
||||
} else if ( ! this.ffz_has_css )
|
||||
this.ffz_update_css();
|
||||
|
||||
var config = this._getConfigPrefix(prefix) || {},
|
||||
tiers = config.tiers || [],
|
||||
tier = null,
|
||||
|
@ -157,12 +165,17 @@ FFZ.prototype.setup_bits = function() {
|
|||
}
|
||||
|
||||
utils.update_css(f._chat_style, 'bit-styles', output.join(''));
|
||||
this.ffz_has_css = true;
|
||||
}.observes('config'),
|
||||
|
||||
}.observes('config')
|
||||
loadRenderConfig: function() {
|
||||
var out = this._super();
|
||||
if ( ! this.get('config') )
|
||||
this._actionPromiseCache = false;
|
||||
return out;
|
||||
}
|
||||
});
|
||||
|
||||
if ( ! Service.get('isLoaded') )
|
||||
if ( Service.get('isLoaded') )
|
||||
Service.loadRenderConfig();
|
||||
else
|
||||
Service.ffz_update_css();
|
||||
}
|
|
@ -1,5 +1,7 @@
|
|||
var FFZ = window.FrankerFaceZ,
|
||||
utils = require('../utils');
|
||||
utils = require('../utils'),
|
||||
|
||||
route_helper;
|
||||
|
||||
|
||||
// --------------------
|
||||
|
@ -169,6 +171,12 @@ FFZ.prototype.setup_layout = function() {
|
|||
s.id = 'ffz-layout-css';
|
||||
document.head.appendChild(s);
|
||||
|
||||
try {
|
||||
route_helper = window.require("web-client/utilities/route-matcher");
|
||||
} catch(err) {
|
||||
this.error("Unable to require the route-matcher utility.", err);
|
||||
}
|
||||
|
||||
var Layout = utils.ember_lookup('service:layout'),
|
||||
f = this;
|
||||
|
||||
|
@ -183,6 +191,15 @@ FFZ.prototype.setup_layout = function() {
|
|||
|
||||
portraitVideoBelow: false,
|
||||
|
||||
channelCoverHeight: function() {
|
||||
var setting = f.settings.hide_channel_banner,
|
||||
banner_hidden = setting === 1 ? f.settings.channel_bar_bottom : setting > 0;
|
||||
|
||||
return ( banner_hidden || ! route_helper || route_helper.routeMatches && route_helper.routeMatches(this.get('globals.currentPath'), route_helper.ROUTES.CHANNEL_ANY) ) ?
|
||||
0 : 380;
|
||||
|
||||
}.property("globals.currentPath"),
|
||||
|
||||
portraitMode: function() {
|
||||
var raw = this.get("rawPortraitMode");
|
||||
this.set('portraitVideoBelow', raw === 3 || raw === 4);
|
||||
|
|
|
@ -61,7 +61,7 @@ FFZ.channel_metadata = {};
|
|||
|
||||
// Version
|
||||
var VER = FFZ.version_info = {
|
||||
major: 3, minor: 5, revision: 379,
|
||||
major: 3, minor: 5, revision: 380,
|
||||
toString: function() {
|
||||
return [VER.major, VER.minor, VER.revision].join(".") + (VER.extra || "");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue