@@ -1525,7 +1533,7 @@
// Advanced Tab
const updateNetworkInterfaces = function(default_iface) {
- const url = 'api/v2/app/networkInterfaceList';
+ const url = '${BASEPATH}/api/v2/app/networkInterfaceList';
$('networkInterface').empty();
new Request.JSON({
url: url,
@@ -1547,7 +1555,7 @@
};
const updateInterfaceAddresses = function(iface, default_addr) {
- const url = 'api/v2/app/networkInterfaceAddressList';
+ const url = '${BASEPATH}/api/v2/app/networkInterfaceAddressList';
$('optionalIPAddressToBind').empty();
new Request.JSON({
url: url,
@@ -1574,7 +1582,7 @@
};
const loadPreferences = function() {
- const url = 'api/v2/app/preferences';
+ const url = '${BASEPATH}/api/v2/app/preferences';
new Request.JSON({
url: url,
method: 'get',
@@ -1835,6 +1843,7 @@
$('webui_address_value').setProperty('value', pref.web_ui_address);
$('webui_port_value').setProperty('value', pref.web_ui_port);
$('webui_upnp_checkbox').setProperty('checked', pref.web_ui_upnp);
+ $('webui_basepath_text').setProperty('value', pref.web_ui_base_path);
$('use_https_checkbox').setProperty('checked', pref.use_https);
$('ssl_cert_text').setProperty('value', pref.web_ui_https_cert_path);
$('ssl_key_text').setProperty('value', pref.web_ui_https_key_path);
@@ -2213,6 +2222,7 @@
settings.set('use_https', $('use_https_checkbox').getProperty('checked'));
settings.set('web_ui_https_cert_path', $('ssl_cert_text').getProperty('value'));
settings.set('web_ui_https_key_path', $('ssl_key_text').getProperty('value'));
+ settings.set('web_ui_base_path', $('webui_basepath_text').getProperty('value'));
// Authentication
const web_ui_username = $('webui_username_text').getProperty('value');
@@ -2312,7 +2322,7 @@
const json_str = JSON.encode(settings);
new Request({
- url: 'api/v2/app/setPreferences',
+ url: '${BASEPATH}/api/v2/app/setPreferences',
method: 'post',
data: {
'json': json_str,
diff --git a/src/webui/www/private/views/rss.html b/src/webui/www/private/views/rss.html
index dadd3ea5704c..37fa438bab12 100644
--- a/src/webui/www/private/views/rss.html
+++ b/src/webui/www/private/views/rss.html
@@ -190,7 +190,7 @@
const init = () => {
new Request.JSON({
- url: 'api/v2/app/preferences',
+ url: '${BASEPATH}/api/v2/app/preferences',
method: 'get',
noCache: true,
onFailure: () => {
@@ -434,7 +434,7 @@
// Place in iframe with sandbox attribute to prevent js execution
let torrentDescription = document.createRange().createContextualFragment('');
$('rssDetailsView').append(torrentDescription);
- document.getElementById('rssDescription').srcdoc = '
' + article.description + "";
+ document.getElementById('rssDescription').srcdoc = '
' + article.description + "";
//calculate height to fill screen
document.getElementById('rssDescription').style.height =
@@ -445,7 +445,7 @@
const updateRssFeedList = () => {
new Request.JSON({
- url: 'api/v2/rss/items',
+ url: '${BASEPATH}/api/v2/rss/items',
noCache: true,
method: 'post',
data: {
@@ -667,7 +667,7 @@
rssFeedTable.updateIcons();
new Request({
- url: 'api/v2/rss/refreshItem',
+ url: '${BASEPATH}/api/v2/rss/refreshItem',
noCache: true,
method: 'post',
data: {
@@ -745,7 +745,7 @@
// send request
new Request({
- url: 'api/v2/rss/markAsRead',
+ url: '${BASEPATH}/api/v2/rss/markAsRead',
noCache: true,
method: 'post',
data: {
@@ -786,7 +786,7 @@
rssFeedTable.updateTable(true);
new Request({
- url: 'api/v2/rss/markAsRead',
+ url: '${BASEPATH}/api/v2/rss/markAsRead',
noCache: true,
method: 'post',
data: {
@@ -817,7 +817,7 @@
id: id,
title: 'QBT_TR(Rss Downloader)QBT_TR[CONTEXT=AutomatedRssDownloader]',
loadMethod: 'xhr',
- contentURL: 'views/rssDownloader.html',
+ contentURL: '${BASEPATH}/views/rssDownloader.html',
maximizable: false,
width: loadWindowWidth(id, 800),
height: loadWindowHeight(id, 650),
diff --git a/src/webui/www/private/views/rssDownloader.html b/src/webui/www/private/views/rssDownloader.html
index c21622274e5c..25de77712fec 100644
--- a/src/webui/www/private/views/rssDownloader.html
+++ b/src/webui/www/private/views/rssDownloader.html
@@ -350,7 +350,7 @@
const initRssDownloader = () => {
new Request.JSON({
- url: 'api/v2/app/preferences',
+ url: '${BASEPATH}/api/v2/app/preferences',
method: 'get',
noCache: true,
onFailure: () => {
@@ -426,7 +426,7 @@
});
// get all categories and add to combobox
new Request.JSON({
- url: 'api/v2/torrents/categories',
+ url: '${BASEPATH}/api/v2/torrents/categories',
noCache: true,
method: 'get',
onSuccess: (response) => {
@@ -440,7 +440,7 @@
}).send();
// get all rss feed
new Request.JSON({
- url: 'api/v2/rss/items',
+ url: '${BASEPATH}/api/v2/rss/items',
noCache: true,
method: 'post',
data: {
@@ -468,7 +468,7 @@
const updateRulesList = () => {
// get all rules
new Request.JSON({
- url: 'api/v2/rss/rules',
+ url: '${BASEPATH}/api/v2/rss/rules',
noCache: true,
method: 'get',
onSuccess: (response) => {
@@ -490,7 +490,7 @@
const modifyRuleState = (rule, setting, newState, callback = () => {}) => {
rulesList[rule][setting] = newState;
new Request({
- url: 'api/v2/rss/setRule',
+ url: '${BASEPATH}/api/v2/rss/setRule',
noCache: true,
method: 'post',
data: {
@@ -613,7 +613,7 @@
.getValues();
new Request({
- url: 'api/v2/rss/setRule',
+ url: '${BASEPATH}/api/v2/rss/setRule',
noCache: true,
method: 'post',
data: {
@@ -628,7 +628,7 @@
const updateMatchingArticles = (ruleName) => {
new Request.JSON({
- url: 'api/v2/rss/matchingArticles',
+ url: '${BASEPATH}/api/v2/rss/matchingArticles',
noCache: true,
method: 'post',
data: {
diff --git a/src/webui/www/private/views/search.html b/src/webui/www/private/views/search.html
index 0ce38239aa4d..4566a14db8ad 100644
--- a/src/webui/www/private/views/search.html
+++ b/src/webui/www/private/views/search.html
@@ -301,7 +301,7 @@
searchResultsRowId = 0;
requestCount = 0;
- const url = new URI('api/v2/search/start');
+ const url = new URI('${BASEPATH}/api/v2/search/start');
new Request.JSON({
url: url,
noCache: true,
@@ -321,7 +321,7 @@
};
const stopSearch = function() {
- const url = new URI('api/v2/search/stop');
+ const url = new URI('${BASEPATH}/api/v2/search/stop');
new Request({
url: url,
noCache: true,
@@ -402,7 +402,7 @@
id: id,
title: "QBT_TR(Search plugins)QBT_TR[CONTEXT=PluginSelectDlg]",
loadMethod: 'xhr',
- contentURL: 'views/searchplugins.html',
+ contentURL: '${BASEPATH}/views/searchplugins.html',
scrollbars: false,
maximizable: false,
paddingVertical: 0,
@@ -512,7 +512,7 @@
const getPlugins = function() {
new Request.JSON({
- url: new URI('api/v2/search/plugins'),
+ url: new URI('${BASEPATH}/api/v2/search/plugins'),
noCache: true,
method: 'get',
onSuccess: function(response) {
@@ -638,7 +638,7 @@
const loadSearchResultsData = function() {
const maxResults = 500;
- const url = new URI('api/v2/search/results');
+ const url = new URI('${BASEPATH}/api/v2/search/results');
new Request.JSON({
url: url,
noCache: true,
diff --git a/src/webui/www/private/views/searchplugins.html b/src/webui/www/private/views/searchplugins.html
index f49ae2415037..8011f3052681 100644
--- a/src/webui/www/private/views/searchplugins.html
+++ b/src/webui/www/private/views/searchplugins.html
@@ -122,7 +122,7 @@
QBT_TR(Installed search plugins:)QBT_TR[CONTEXT=PluginSelectDlg]
id: 'installSearchPlugin',
title: "QBT_TR(Install plugin)QBT_TR[CONTEXT=PluginSourceDlg]",
loadMethod: 'xhr',
- contentURL: 'views/installsearchplugin.html',
+ contentURL: '${BASEPATH}/views/installsearchplugin.html',
scrollbars: false,
resizable: false,
maximizable: false,
@@ -135,7 +135,7 @@
QBT_TR(Installed search plugins:)QBT_TR[CONTEXT=PluginSelectDlg]
const uninstallPlugin = function() {
const plugins = searchPluginsTable.selectedRowsIds().join('|');
- const url = new URI('api/v2/search/uninstallPlugin');
+ const url = new URI('${BASEPATH}/api/v2/search/uninstallPlugin');
new Request({
url: url,
noCache: true,
@@ -152,7 +152,7 @@
QBT_TR(Installed search plugins:)QBT_TR[CONTEXT=PluginSelectDlg]
if (plugins && plugins.length)
enable = !window.qBittorrent.Search.getPlugin(plugins[0]).enabled;
- const url = new URI('api/v2/search/enablePlugin');
+ const url = new URI('${BASEPATH}/api/v2/search/enablePlugin');
new Request({
url: url,
noCache: true,
@@ -165,7 +165,7 @@
QBT_TR(Installed search plugins:)QBT_TR[CONTEXT=PluginSelectDlg]
};
const checkForUpdates = function() {
- const url = new URI('api/v2/search/updatePlugins');
+ const url = new URI('${BASEPATH}/api/v2/search/updatePlugins');
new Request({
url: url,
noCache: true,
diff --git a/src/webui/www/public/index.html b/src/webui/www/public/index.html
index e08289abcd5c..675eaecf3e2c 100644
--- a/src/webui/www/public/index.html
+++ b/src/webui/www/public/index.html
@@ -1,16 +1,16 @@
-
+
qBittorrent QBT_TR(Web UI)QBT_TR[CONTEXT=OptionsDialog]
-
-
-
+
+
+
-
+
@@ -20,7 +20,7 @@
QBT_TR(JavaScript Required! You must enable JavaScript for the Web UI to wor
qBittorrent QBT_TR(Web UI)QBT_TR[CONTEXT=OptionsDialog]
-
+