mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-13 01:57:07 -07:00
[Web UI] Option to hide Top Toolbar
This commit is contained in:
parent
bbc667cb78
commit
6f7dca1f83
4 changed files with 32 additions and 2 deletions
|
@ -61,6 +61,7 @@
|
||||||
<li>
|
<li>
|
||||||
<a class="returnFalse">QBT_TR(&View)QBT_TR</a>
|
<a class="returnFalse">QBT_TR(&View)QBT_TR</a>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li><a id="showTopToolbarLink"><img class="MyMenuIcon" src="theme/checked" alt="QBT_TR(&Top Toolbar)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(&Top Toolbar)QBT_TR</a></li>
|
||||||
<li><a id="speedInBrowserTitleBarLink"><img class="MyMenuIcon" src="theme/checked" alt="QBT_TR(S&peed in Title Bar)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(S&peed in Title Bar)QBT_TR</a></li>
|
<li><a id="speedInBrowserTitleBarLink"><img class="MyMenuIcon" src="theme/checked" alt="QBT_TR(S&peed in Title Bar)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(S&peed in Title Bar)QBT_TR</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -108,7 +108,6 @@ body {
|
||||||
/* Fixes by Chris */
|
/* Fixes by Chris */
|
||||||
/*background-color: #ccc;*/
|
/*background-color: #ccc;*/
|
||||||
height: 20px;
|
height: 20px;
|
||||||
margin-bottom: 5px;
|
|
||||||
border-bottom: 1px solid #3f3f3f;
|
border-bottom: 1px solid #3f3f3f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -262,6 +262,10 @@ a.propButton img {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Mocha Customization */
|
/* Mocha Customization */
|
||||||
|
#mochaToolbar {
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
#mochaToolbar .divider {
|
#mochaToolbar .divider {
|
||||||
background-image: url(../images/skin/toolbox-divider.gif);
|
background-image: url(../images/skin/toolbox-divider.gif);
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
|
|
@ -89,7 +89,6 @@ window.addEvent('load', function () {
|
||||||
width : null,
|
width : null,
|
||||||
resizeLimit : [100, 300]
|
resizeLimit : [100, 300]
|
||||||
});
|
});
|
||||||
MochaUI.Desktop.setDesktopSize();
|
|
||||||
|
|
||||||
setFilter = function (f) {
|
setFilter = function (f) {
|
||||||
// Visually Select the right filter
|
// Visually Select the right filter
|
||||||
|
@ -129,10 +128,23 @@ window.addEvent('load', function () {
|
||||||
});
|
});
|
||||||
initializeWindows();
|
initializeWindows();
|
||||||
|
|
||||||
|
// Show Top Toolbar is enabled by default
|
||||||
|
if (localStorage.getItem('show_top_toolbar') == null)
|
||||||
|
var showTopToolbar = true;
|
||||||
|
else
|
||||||
|
var showTopToolbar = localStorage.getItem('show_top_toolbar') == "true";
|
||||||
|
if (!showTopToolbar) {
|
||||||
|
$('showTopToolbarLink').firstChild.style.opacity = '0';
|
||||||
|
$('mochaToolbar').addClass('invisible');
|
||||||
|
}
|
||||||
|
|
||||||
var speedInTitle = localStorage.getItem('speed_in_browser_title_bar') == "true";
|
var speedInTitle = localStorage.getItem('speed_in_browser_title_bar') == "true";
|
||||||
if (!speedInTitle)
|
if (!speedInTitle)
|
||||||
$('speedInBrowserTitleBarLink').firstChild.style.opacity = '0';
|
$('speedInBrowserTitleBarLink').firstChild.style.opacity = '0';
|
||||||
|
|
||||||
|
// After Show Top Toolbar
|
||||||
|
MochaUI.Desktop.setDesktopSize();
|
||||||
|
|
||||||
var syncMainDataLastResponseId = 0;
|
var syncMainDataLastResponseId = 0;
|
||||||
var serverState = {};
|
var serverState = {};
|
||||||
|
|
||||||
|
@ -271,6 +283,20 @@ window.addEvent('load', function () {
|
||||||
updateMainData();
|
updateMainData();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$('showTopToolbarLink').addEvent('click', function(e) {
|
||||||
|
showTopToolbar = !showTopToolbar;
|
||||||
|
localStorage.setItem('show_top_toolbar', showTopToolbar.toString());
|
||||||
|
if (showTopToolbar) {
|
||||||
|
$('showTopToolbarLink').firstChild.style.opacity = '1';
|
||||||
|
$('mochaToolbar').removeClass('invisible');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$('showTopToolbarLink').firstChild.style.opacity = '0';
|
||||||
|
$('mochaToolbar').addClass('invisible');
|
||||||
|
}
|
||||||
|
MochaUI.Desktop.setDesktopSize();
|
||||||
|
});
|
||||||
|
|
||||||
$('speedInBrowserTitleBarLink').addEvent('click', function(e) {
|
$('speedInBrowserTitleBarLink').addEvent('click', function(e) {
|
||||||
speedInTitle = !speedInTitle;
|
speedInTitle = !speedInTitle;
|
||||||
localStorage.setItem('speed_in_browser_title_bar', speedInTitle.toString());
|
localStorage.setItem('speed_in_browser_title_bar', speedInTitle.toString());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue