diff --git a/src/webui/api/appcontroller.cpp b/src/webui/api/appcontroller.cpp index bc35390356ac..3d7d6eb776b8 100644 --- a/src/webui/api/appcontroller.cpp +++ b/src/webui/api/appcontroller.cpp @@ -54,6 +54,7 @@ #include "base/scanfoldersmodel.h" #include "base/torrentfileguard.h" #include "base/utils/fs.h" +#include "base/utils/misc.h" #include "base/utils/net.h" #include "base/utils/password.h" #include "../webapplication.h" @@ -68,6 +69,18 @@ void AppController::versionAction() setResult(QBT_VERSION); } +void AppController::buildInfoAction() +{ + const QJsonObject versions = { + {"qt", QT_VERSION_STR}, + {"libtorrent", Utils::Misc::libtorrentVersionString()}, + {"boost", Utils::Misc::boostVersionString()}, + {"openssl", Utils::Misc::opensslVersionString()}, + {"bitness", (QT_POINTER_SIZE * 8)} + }; + setResult(versions); +} + void AppController::shutdownAction() { qDebug() << "Shutdown request from Web UI"; diff --git a/src/webui/api/appcontroller.h b/src/webui/api/appcontroller.h index e1b240075c94..63432bb6ee3a 100644 --- a/src/webui/api/appcontroller.h +++ b/src/webui/api/appcontroller.h @@ -43,6 +43,7 @@ class AppController : public APIController private slots: void webapiVersionAction(); void versionAction(); + void buildInfoAction(); void shutdownAction(); void preferencesAction(); void setPreferencesAction(); diff --git a/src/webui/www/private/about.html b/src/webui/www/private/about.html index 171e76882acc..43f378b78400 100644 --- a/src/webui/www/private/about.html +++ b/src/webui/www/private/about.html @@ -1,10 +1,693 @@ -qBittorrent Mascot -

qBittorrent ${VERSION} QBT_TR(Web UI)QBT_TR[CONTEXT=OptionsDialog]

-

QBT_TR(An advanced BitTorrent client programmed in C++, based on Qt toolkit and libtorrent-rasterbar.)QBT_TR[CONTEXT=about]

-

Copyright (c) 2011-2019 The qBittorrent project

-

QBT_TR(Home Page:)QBT_TR[CONTEXT=about] https://www.qbittorrent.org

-

QBT_TR(Bug Tracker:)QBT_TR[CONTEXT=about] http://bugs.qbittorrent.org

-

QBT_TR(Forum:)QBT_TR[CONTEXT=about] http://forum.qbittorrent.org

-

QBT_TR(IRC: #qbittorrent on Freenode)QBT_TR[CONTEXT=HttpServer]

-

QBT_TR(Original authors)QBT_TR[CONTEXT=HttpServer]

-Ishan Arora, Ankit Gupta, Chandan Shikhar Dua and Swapnil Kumar. +
+ qBittorrent Mascot +

qBittorrent ${VERSION} QBT_TR(Web UI)QBT_TR[CONTEXT=OptionsDialog]

+

QBT_TR(An advanced BitTorrent client programmed in C++, based on Qt toolkit and libtorrent-rasterbar.)QBT_TR[CONTEXT=AboutDialog]

+

Copyright (c) 2011-2019 The qBittorrent project

+

QBT_TR(Home Page:)QBT_TR[CONTEXT=AboutDialog] https://www.qbittorrent.org

+

QBT_TR(Bug Tracker:)QBT_TR[CONTEXT=AboutDialog] http://bugs.qbittorrent.org

+

QBT_TR(Forum:)QBT_TR[CONTEXT=AboutDialog] http://forum.qbittorrent.org

+

QBT_TR(IRC: #qbittorrent on Freenode)QBT_TR[CONTEXT=HttpServer]

+
+ + + + + + + + + + + + diff --git a/src/webui/www/private/aboutToolbar.html b/src/webui/www/private/aboutToolbar.html new file mode 100644 index 000000000000..a5fb62c5ca20 --- /dev/null +++ b/src/webui/www/private/aboutToolbar.html @@ -0,0 +1,47 @@ +
+ +
+
+ + diff --git a/src/webui/www/private/properties_content.html b/src/webui/www/private/properties_content.html index 9d1ac5a32a06..b01f2737e3d0 100644 --- a/src/webui/www/private/properties_content.html +++ b/src/webui/www/private/properties_content.html @@ -1,4 +1,4 @@ -
+
QBT_TR(Transfer)QBT_TR[CONTEXT=PropertiesWidget] @@ -79,7 +79,7 @@ -
@@ -99,7 +99,7 @@ -
@@ -119,7 +119,7 @@ -
@@ -132,7 +132,7 @@ -
diff --git a/src/webui/www/private/scripts/client.js b/src/webui/www/private/scripts/client.js index c98c4ac55d5d..17b6ec3fce9f 100644 --- a/src/webui/www/private/scripts/client.js +++ b/src/webui/www/private/scripts/client.js @@ -721,51 +721,36 @@ window.addEvent('load', function() { }; $('PropGeneralLink').addEvent('click', function(e) { + $$('.propertiesTabContent').addClass('invisible'); $('prop_general').removeClass("invisible"); - $('prop_trackers').addClass("invisible"); - $('prop_webseeds').addClass("invisible"); - $('prop_files').addClass("invisible"); - $('prop_peers').addClass("invisible"); updatePropertiesPanel(); localStorage.setItem('selected_tab', this.id); }); $('PropTrackersLink').addEvent('click', function(e) { + $$('.propertiesTabContent').addClass('invisible'); $('prop_trackers').removeClass("invisible"); - $('prop_general').addClass("invisible"); - $('prop_webseeds').addClass("invisible"); - $('prop_files').addClass("invisible"); - $('prop_peers').addClass("invisible"); updatePropertiesPanel(); localStorage.setItem('selected_tab', this.id); }); $('PropPeersLink').addEvent('click', function(e) { + $$('.propertiesTabContent').addClass('invisible'); $('prop_peers').removeClass("invisible"); - $('prop_trackers').addClass("invisible"); - $('prop_general').addClass("invisible"); - $('prop_webseeds').addClass("invisible"); - $('prop_files').addClass("invisible"); updatePropertiesPanel(); localStorage.setItem('selected_tab', this.id); }); $('PropWebSeedsLink').addEvent('click', function(e) { + $$('.propertiesTabContent').addClass('invisible'); $('prop_webseeds').removeClass("invisible"); - $('prop_general').addClass("invisible"); - $('prop_trackers').addClass("invisible"); - $('prop_files').addClass("invisible"); - $('prop_peers').addClass("invisible"); updatePropertiesPanel(); localStorage.setItem('selected_tab', this.id); }); $('PropFilesLink').addEvent('click', function(e) { + $$('.propertiesTabContent').addClass('invisible'); $('prop_files').removeClass("invisible"); - $('prop_general').addClass("invisible"); - $('prop_trackers').addClass("invisible"); - $('prop_webseeds').addClass("invisible"); - $('prop_peers').addClass("invisible"); updatePropertiesPanel(); localStorage.setItem('selected_tab', this.id); }); diff --git a/src/webui/www/private/scripts/mocha-init.js b/src/webui/www/private/scripts/mocha-init.js index 70a57e795eae..457579addb63 100644 --- a/src/webui/www/private/scripts/mocha-init.js +++ b/src/webui/www/private/scripts/mocha-init.js @@ -737,9 +737,14 @@ var initializeWindows = function() { var id = 'aboutpage'; new MochaUI.Window({ id: id, - title: 'QBT_TR(About)QBT_TR[CONTEXT=AboutDlg]', + title: 'QBT_TR(About qBittorrent)QBT_TR[CONTEXT=AboutDialog]', loadMethod: 'xhr', contentURL: 'about.html', + require: { + css: ['css/Tabs.css'] + }, + toolbar: true, + toolbarURL: 'aboutToolbar.html', padding: 10, width: loadWindowWidth(id, 550), height: loadWindowHeight(id, 290), diff --git a/src/webui/www/webui.qrc b/src/webui/www/webui.qrc index d7ddaee5dd4d..d4342e2a283d 100644 --- a/src/webui/www/webui.qrc +++ b/src/webui/www/webui.qrc @@ -1,6 +1,7 @@ private/about.html + private/aboutToolbar.html private/addtrackers.html private/confirmdeletion.html private/css/Core.css