Browse Source

Apply code formatting

adaptive-webui-19844
Chocobo1 4 years ago
parent
commit
121ff2b7be
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 2
      src/webui/www/private/addpeers.html
  2. 9
      src/webui/www/private/scripts/client.js
  3. 1
      src/webui/www/private/scripts/dynamicTable.js
  4. 3
      src/webui/www/private/views/about.html
  5. 3
      src/webui/www/private/views/preferences.html
  6. 25
      src/webui/www/private/views/rss.html
  7. 49
      src/webui/www/private/views/rssDownloader.html
  8. 5
      src/webui/www/private/views/search.html
  9. 6
      src/webui/www/public/index.html

2
src/webui/www/private/addpeers.html

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
<!DOCTYPE html>
<html lang="${LANG}">
<head>
<meta charset="UTF-8" />
<title>QBT_TR(Add Peers)QBT_TR[CONTEXT=PeersAdditionDialog]</title>
@ -66,4 +67,5 @@ @@ -66,4 +67,5 @@
</div>
</div>
</body>
</html>

9
src/webui/www/private/scripts/client.js

@ -744,20 +744,17 @@ window.addEvent('load', function() { @@ -744,20 +744,17 @@ window.addEvent('load', function() {
}
switch (serverState.connection_status) {
case 'connected': {
case 'connected':
$('connectionStatus').src = 'icons/connected.svg';
$('connectionStatus').alt = 'QBT_TR(Connection status: Connected)QBT_TR[CONTEXT=MainWindow]';
}
break;
case 'firewalled': {
case 'firewalled':
$('connectionStatus').src = 'icons/firewalled.svg';
$('connectionStatus').alt = 'QBT_TR(Connection status: Firewalled)QBT_TR[CONTEXT=MainWindow]';
}
break;
default: {
default:
$('connectionStatus').src = 'icons/disconnected.svg';
$('connectionStatus').alt = 'QBT_TR(Connection status: Disconnected)QBT_TR[CONTEXT=MainWindow]';
}
break;
}

1
src/webui/www/private/scripts/dynamicTable.js

@ -2494,7 +2494,6 @@ window.qBittorrent.DynamicTable = (function() { @@ -2494,7 +2494,6 @@ window.qBittorrent.DynamicTable = (function() {
}
});
return exports();
})();

3
src/webui/www/private/views/about.html

@ -151,7 +151,8 @@ @@ -151,7 +151,8 @@
<li><a name="TOC1" href="#SEC1">GNU GENERAL PUBLIC
LICENSE
<!--TRANSLATORS: Don't translate the license; copy msgid's
verbatim!--></a>
verbatim!-->
</a>
<ul>
<li><a name="TOC2" href="#SEC2">Preamble</a></li>
<li><a name="TOC3" href="#SEC3">TERMS AND CONDITIONS

3
src/webui/www/private/views/preferences.html

@ -803,7 +803,8 @@ @@ -803,7 +803,8 @@
<fieldset class="settings">
<legend><input type="checkbox" id="use_alt_webui_checkbox" onclick="qBittorrent.Preferences.updateAlternativeWebUISettings();" />
<label for="use_alt_webui_checkbox">QBT_TR(Use alternative Web UI)QBT_TR[CONTEXT=OptionsDialog]</label></legend>
<label for="use_alt_webui_checkbox">QBT_TR(Use alternative Web UI)QBT_TR[CONTEXT=OptionsDialog]</label>
</legend>
<div class="formRow">
<label for="webui_files_location_textarea">QBT_TR(Files location:)QBT_TR[CONTEXT=OptionsDialog]</label>
<input type="text" id="webui_files_location_textarea" />

25
src/webui/www/private/views/rss.html

@ -11,7 +11,8 @@ @@ -11,7 +11,8 @@
vertical-align: top;
}
#rssFeedFixedHeaderDiv .dynamicTableHeader, #rssArticleFixedHeaderDiv .dynamicTableHeader {
#rssFeedFixedHeaderDiv .dynamicTableHeader,
#rssArticleFixedHeaderDiv .dynamicTableHeader {
cursor: default;
}
@ -33,7 +34,9 @@ @@ -33,7 +34,9 @@
margin: 0 10px 0 10px;
}
#leftRssColumn, #centerRssColumn, #rightRssColumn {
#leftRssColumn,
#centerRssColumn,
#rightRssColumn {
float: left;
/* should be 20 px but due to rounding differences some browsers don't render that properly */
width: calc(calc(100% - 21px) / 3);
@ -44,7 +47,8 @@ @@ -44,7 +47,8 @@
overflow: auto;
}
#rssFeedTableDiv, #rssArticleTableDiv {
#rssFeedTableDiv,
#rssArticleTableDiv {
height: calc(100vh - 180px);
}
@ -197,9 +201,9 @@ @@ -197,9 +201,9 @@
$('rssFetchingDisabled').removeClass('invisible');
// recalculate heights
let nonPageHeight = $('rssTopBar').getBoundingClientRect().height +
$('desktopHeader').getBoundingClientRect().height +
$('desktopFooterWrapper').getBoundingClientRect().height + 20;
let nonPageHeight = $('rssTopBar').getBoundingClientRect().height
+ $('desktopHeader').getBoundingClientRect().height
+ $('desktopFooterWrapper').getBoundingClientRect().height + 20;
$('rssDetailsView').style.height = 'calc(100vh - ' + nonPageHeight + 'px)';
let nonTableHeight = nonPageHeight + $('rssFeedFixedHeaderDiv').getBoundingClientRect().height;
@ -274,7 +278,6 @@ @@ -274,7 +278,6 @@
});
rssFeedTable.setup('rssFeedTableDiv', 'rssFeedFixedHeaderDiv', rssFeedContextMenu);
const rssArticleContextMenu = new window.qBittorrent.ContextMenu.RssArticleContextMenu({
targets: '.rssArticleElement',
menu: 'rssArticleMenu',
@ -435,8 +438,8 @@ @@ -435,8 +438,8 @@
//calculate height to fill screen
document.getElementById('rssDescription').style.height =
"calc(100% - " + document.getElementById('rssTorrentDetailsName').offsetHeight + "px - " +
document.getElementById('rssTorrentDetailsDate').offsetHeight + "px - 5px)";
"calc(100% - " + document.getElementById('rssTorrentDetailsName').offsetHeight + "px - "
+ document.getElementById('rssTorrentDetailsDate').offsetHeight + "px - 5px)";
}
};
@ -479,8 +482,8 @@ @@ -479,8 +482,8 @@
if (rssFeedTable.rows.getLength() - 1 === flattenedResp.length) {
match = true;
for (let i = 0; i < flattenedResp.length; ++i) {
if ((flattenedResp[i].uid ? flattenedResp[i].uid : '') !== rssFeedTable.rows[i + 1].full_data.dataUid ||
flattenedResp[i].fullName !== rssFeedTable.rows[i + 1].full_data.dataPath) {
if ((flattenedResp[i].uid ? flattenedResp[i].uid : '') !== rssFeedTable.rows[i + 1].full_data.dataUid
|| flattenedResp[i].fullName !== rssFeedTable.rows[i + 1].full_data.dataPath) {
match = false;
break;
}

49
src/webui/www/private/views/rssDownloader.html

@ -12,7 +12,8 @@ @@ -12,7 +12,8 @@
float: left;
}
#rulesTable, #rssDownloaderArticlesTable {
#rulesTable,
#rssDownloaderArticlesTable {
overflow: auto;
width: 100%;
height: 100%;
@ -68,7 +69,9 @@ @@ -68,7 +69,9 @@
margin-bottom: 10px;
}
#rulesTable table, #rssDownloaderFeedsTable table, #rssDownloaderArticlesTable table {
#rulesTable table,
#rssDownloaderFeedsTable table,
#rssDownloaderArticlesTable table {
width: 100%;
}
@ -123,6 +126,7 @@ @@ -123,6 +126,7 @@
float: right;
background-image: url('icons/list-remove.svg');
}
</style>
<div id="RssDownloader" class="RssDownloader">
@ -366,8 +370,8 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also @@ -366,8 +370,8 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
$('rulesTable').style.height = 'calc(100% - ' + $('rulesTableDesc').getBoundingClientRect().height + 'px)';
$('rssDownloaderArticlesTable').style.height = 'calc(100% - ' + $('articleTableDesc').getBoundingClientRect().height + 'px)';
let centerRowNotTableHeight = $('saveButton').getBoundingClientRect().height +
$('ruleSettings').getBoundingClientRect().height + 15;
let centerRowNotTableHeight = $('saveButton').getBoundingClientRect().height
+ $('ruleSettings').getBoundingClientRect().height + 15;
$('rssDownloaderFeeds').style.height = 'calc(100% - ' + centerRowNotTableHeight + 'px)';
@ -759,12 +763,12 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also @@ -759,12 +763,12 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
mainPart = 'QBT_TR(Regex mode: use Perl-compatible regular expressions)QBT_TR[CONTEXT=AutomatedRssDownloader]\n\n';
}
else {
mainPart = 'QBT_TR(Wildcard mode: you can use)QBT_TR[CONTEXT=AutomatedRssDownloader]\n\n' +
' ● QBT_TR(? to match any single character)QBT_TR[CONTEXT=AutomatedRssDownloader]\n' +
' ● QBT_TR(* to match zero or more of any characters)QBT_TR[CONTEXT=AutomatedRssDownloader]\n' +
' ● QBT_TR(Whitespaces count as AND operators (all words, any order))QBT_TR[CONTEXT=AutomatedRssDownloader]\n' +
' ● QBT_TR(| is used as OR operator)QBT_TR[CONTEXT=AutomatedRssDownloader]\n\n' +
'QBT_TR(If word order is important use * instead of whitespace.)QBT_TR[CONTEXT=AutomatedRssDownloader]\n\n';
mainPart = 'QBT_TR(Wildcard mode: you can use)QBT_TR[CONTEXT=AutomatedRssDownloader]\n\n'
+ ' ● QBT_TR(? to match any single character)QBT_TR[CONTEXT=AutomatedRssDownloader]\n'
+ ' ● QBT_TR(* to match zero or more of any characters)QBT_TR[CONTEXT=AutomatedRssDownloader]\n'
+ ' ● QBT_TR(Whitespaces count as AND operators (all words, any order))QBT_TR[CONTEXT=AutomatedRssDownloader]\n'
+ ' ● QBT_TR(| is used as OR operator)QBT_TR[CONTEXT=AutomatedRssDownloader]\n\n'
+ 'QBT_TR(If word order is important use * instead of whitespace.)QBT_TR[CONTEXT=AutomatedRssDownloader]\n\n';
}
let secondPart = 'QBT_TR(An expression with an empty %1 clause (e.g. %2))QBT_TR[CONTEXT=AutomatedRssDownloader]'
.replace('%1', '|').replace('%2', 'expr|');
@ -772,24 +776,23 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also @@ -772,24 +776,23 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
$('mustContainText').title = mainPart + secondPart + 'QBT_TR( will match all articles.)QBT_TR[CONTEXT=AutomatedRssDownloader]';
$('mustNotContainText').title = mainPart + secondPart + 'QBT_TR( will exclude all articles.)QBT_TR[CONTEXT=AutomatedRssDownloader]';
let episodeFilterTitle = 'QBT_TR(Matches articles based on episode filter.)QBT_TR[CONTEXT=AutomatedRssDownloader]\n\n' +
'QBT_TR(Example: )QBT_TR[CONTEXT=AutomatedRssDownloader]' +
'1x2;8-15;5;30-;' +
'QBT_TR( will match 2, 5, 8 through 15, 30 and onward episodes of season one)QBT_TR[CONTEXT=AutomatedRssDownloader]\n\n' +
'QBT_TR(Episode filter rules: )QBT_TR[CONTEXT=AutomatedRssDownloader]\n\n' +
' ● QBT_TR(Season number is a mandatory non-zero value)QBT_TR[CONTEXT=AutomatedRssDownloader]\n' +
' ● QBT_TR(Episode number is a mandatory positive value)QBT_TR[CONTEXT=AutomatedRssDownloader]\n' +
' ● QBT_TR(Filter must end with semicolon)QBT_TR[CONTEXT=AutomatedRssDownloader]\n' +
' ● QBT_TR(Three range types for episodes are supported: )QBT_TR[CONTEXT=AutomatedRssDownloader]\n' +
' ● QBT_TR(Single number: <b>1x25;</b> matches episode 25 of season one)QBT_TR[CONTEXT=AutomatedRssDownloader]\n' +
' ● QBT_TR(Normal range: <b>1x25-40;</b> matches episodes 25 through 40 of season one)QBT_TR[CONTEXT=AutomatedRssDownloader]\n' +
' ● QBT_TR(Infinite range: <b>1x25-;</b> matches episodes 25 and upward of season one, and all episodes of later seasons)QBT_TR[CONTEXT=AutomatedRssDownloader]';
let episodeFilterTitle = 'QBT_TR(Matches articles based on episode filter.)QBT_TR[CONTEXT=AutomatedRssDownloader]\n\n'
+ 'QBT_TR(Example: )QBT_TR[CONTEXT=AutomatedRssDownloader]'
+ '1x2;8-15;5;30-;'
+ 'QBT_TR( will match 2, 5, 8 through 15, 30 and onward episodes of season one)QBT_TR[CONTEXT=AutomatedRssDownloader]\n\n'
+ 'QBT_TR(Episode filter rules: )QBT_TR[CONTEXT=AutomatedRssDownloader]\n\n'
+ ' ● QBT_TR(Season number is a mandatory non-zero value)QBT_TR[CONTEXT=AutomatedRssDownloader]\n'
+ ' ● QBT_TR(Episode number is a mandatory positive value)QBT_TR[CONTEXT=AutomatedRssDownloader]\n'
+ ' ● QBT_TR(Filter must end with semicolon)QBT_TR[CONTEXT=AutomatedRssDownloader]\n'
+ ' ● QBT_TR(Three range types for episodes are supported: )QBT_TR[CONTEXT=AutomatedRssDownloader]\n'
+ ' ● QBT_TR(Single number: <b>1x25;</b> matches episode 25 of season one)QBT_TR[CONTEXT=AutomatedRssDownloader]\n'
+ ' ● QBT_TR(Normal range: <b>1x25-40;</b> matches episodes 25 through 40 of season one)QBT_TR[CONTEXT=AutomatedRssDownloader]\n'
+ ' ● QBT_TR(Infinite range: <b>1x25-;</b> matches episodes 25 and upward of season one, and all episodes of later seasons)QBT_TR[CONTEXT=AutomatedRssDownloader]';
episodeFilterTitle = episodeFilterTitle.replace(/<b>/g, '').replace(/<\/b>/g, '');
$('episodeFilterText').title = episodeFilterTitle;
}
initRssDownloader();
return exports();
})();

5
src/webui/www/private/views/search.html

@ -41,7 +41,10 @@ @@ -41,7 +41,10 @@
margin-right: 20px;
}
#searchMinSeedsFilter, #searchMaxSeedsFilter, #searchMinSizeFilter, #searchMaxSizeFilter {
#searchMinSeedsFilter,
#searchMaxSeedsFilter,
#searchMinSizeFilter,
#searchMaxSizeFilter {
width: 4em;
}

6
src/webui/www/public/index.html

@ -26,10 +26,12 @@ @@ -26,10 +26,12 @@
<form id="loginform" method="post" onsubmit="submitLoginForm();">
<div class="row">
<label for="username">QBT_TR(Username)QBT_TR[CONTEXT=HttpServer]</label><br />
<input type="text" id="username" name="username" autocomplete="username" /></div>
<input type="text" id="username" name="username" autocomplete="username" />
</div>
<div class="row">
<label for="password">QBT_TR(Password)QBT_TR[CONTEXT=HttpServer]</label><br />
<input type="password" id="password" name="password" autocomplete="current-password" /></div>
<input type="password" id="password" name="password" autocomplete="current-password" />
</div>
<div class="row">
<input type="submit" id="login" value="QBT_TR(Login)QBT_TR[CONTEXT=HttpServer]" />
</div>

Loading…
Cancel
Save