1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-07-05 02:28:31 +00:00

3.5.22 to 3.5.30. I need to commit more. Added basic setting for Stream Uptime, made Uptime seconds configurable. Tooltip for Stream Latency includes resolution. Added Stream Uptime to the directory. Added Reset Settings button. Added customizable in-line moderation icons. Added option to show channel logos in the directory. Added option to swap columns on the dashboard. Split Minimalistic Chat into two configurable sub-options.

This commit is contained in:
SirStendec 2015-10-17 18:05:44 -04:00
parent 4072f3c82a
commit f62132cc7e
22 changed files with 1067 additions and 306 deletions

View file

@ -12,7 +12,7 @@ FFZ.settings_info.swap_sidebars = {
category: "Appearance",
no_mobile: true,
no_bttv: true,
name: "Swap Sidebar Positions",
help: "Swap the positions of the left and right sidebars, placing chat on the left.",
@ -26,6 +26,26 @@ FFZ.settings_info.swap_sidebars = {
};
FFZ.settings_info.flip_dashboard = {
type: "boolean",
value: false,
category: "Appearance",
no_mobile: true,
no_bttv: true,
name: "Swap Dashboard Positions",
help: "Swap the positions of the left and right columns of the dashboard.",
on_update: function(val) {
if ( this.has_bttv )
return;
document.body.classList.toggle("ffz-flip-dashboard", val);
}
};
FFZ.settings_info.right_column_width = {
type: "button",
value: 340,
@ -33,17 +53,17 @@ FFZ.settings_info.right_column_width = {
category: "Appearance",
no_mobile: true,
no_bttv: true,
name: "Right Sidebar Width",
help: "Set the width of the right sidebar for chat.",
method: function() {
var old_val = this.settings.right_column_width || 340,
new_val = prompt("Right Sidebar Width\n\nPlease enter a new width for the right sidebar, in pixels. Minimum: 250, Default: 340", old_val);
if ( new_val === null || new_val === undefined )
return;
var width = parseInt(new_val);
if ( ! width || width === NaN )
width = 340;
@ -54,11 +74,11 @@ FFZ.settings_info.right_column_width = {
on_update: function(val) {
if ( this.has_bttv )
return;
var Layout = App.__container__.lookup('controller:layout');
if ( ! Layout )
return;
Layout.set('rightColumnWidth', val);
Ember.propertyDidChange(Layout, 'contentWidth');
}
@ -89,48 +109,64 @@ FFZ.prototype.setup_layout = function() {
Layout.reopen({
rightColumnWidth: 340,
isTooSmallForRightColumn: function() {
return this.get("windowWidth") < (1090 - this.get('rightColumnWidth'))
}.property("windowWidth", "rightColumnWidth"),
contentWidth: function() {
var left_width = this.get("isLeftColumnClosed") ? 50 : 240,
right_width = this.get("isRightColumnClosed") ? 0 : this.get("rightColumnWidth");
return this.get("windowWidth") - left_width - right_width - 60;
}.property("windowWidth", "isRightColumnClosed", "isLeftColumnClosed", "rightColumnWidth"),
playerStyle: function() {
var h = this.get('windowHeight'),
c = this.get('PLAYER_CONTROLS_HEIGHT'),
r = this.get('contentWidth'),
i = (9 * r / 16) + c,
d = h - 120 - 60,
c = h - 94 - 185,
l = Math.floor(r),
o = Math.floor(Math.min(i, d)),
s = Math.floor(Math.min(i, c));
return "<style>.dynamic-player, .dynamic-player object, .dynamic-player video{width:" + l + "px !important;height:" + o + "px !important} .dynamic-target-player,.dynamic-target-player object, .dynamic-target-player video{width:" + l + "px !important;height:" + s + "px !important}</style><style>.dynamic-player .player object{width:100% !important; height:100% !important}</style>";
}.property("contentWidth", "windowHeight", "PLAYER_CONTROLS_HEIGHT"),
/*ffzUpdateWidth: _.throttle(function() {
var rc = document.querySelector('#right_close');
if ( ! rc )
return;
var left_width = this.get("isLeftColumnClosed") ? 50 : 240,
right_width;
if ( f.settings.swap_sidebars )
right_width = rc.offsetLeft; // + this.get('rightColumnWidth') - 5;
else
right_width = document.body.offsetWidth - rc.offsetLeft - left_width - 25;
if ( right_width < 250 ) {
// Close it!
}
this.set('rightColumnWidth', right_width);
Ember.propertyDidChange(Layout, 'contentWidth');
}, 200),*/
ffzUpdateCss: function() {
var width = this.get('rightColumnWidth');
f._layout_style.innerHTML = '#main_col.expandRight #right_close { left: none !important; } #right_col { width: ' + width + 'px; } body:not(.ffz-sidebar-swap) #main_col:not(.expandRight) { margin-right: ' + width + 'px; } body.ffz-sidebar-swap #main_col:not(.expandRight) { margin-left: ' + width + 'px; }';
}.observes("rightColumnWidth"),
ffzFixTabs: function() {
if ( f.settings.group_tabs && f._chatv && f._chatv._ffz_tabs ) {
setTimeout(function() {