Skip to content

Commit

Permalink
Use BASE_PATH in all WebUI resources
Browse files Browse the repository at this point in the history
This applies to all scripts, css, images, and WebAPI requests.
  • Loading branch information
Piccirello committed Nov 27, 2024
1 parent 32498a7 commit c68971a
Show file tree
Hide file tree
Showing 64 changed files with 604 additions and 602 deletions.
12 changes: 6 additions & 6 deletions src/webui/www/private/addpeers.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<head>
<meta charset="UTF-8">
<title>QBT_TR(Add Peers)QBT_TR[CONTEXT=PeersAdditionDialog]</title>
<link rel="stylesheet" href="css/style.css?v=${CACHEID}" type="text/css">
<script src="scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
<script src="scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
<script src="scripts/localpreferences.js?v=${CACHEID}"></script>
<script src="scripts/color-scheme.js?v=${CACHEID}"></script>
<link rel="stylesheet" href="${BASE_PATH}css/style.css?v=${CACHEID}" type="text/css">
<script src="${BASE_PATH}scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
<script src="${BASE_PATH}scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
<script src="${BASE_PATH}scripts/localpreferences.js?v=${CACHEID}"></script>
<script src="${BASE_PATH}scripts/color-scheme.js?v=${CACHEID}"></script>
<script>
"use strict";

Expand Down Expand Up @@ -42,7 +42,7 @@
return;

new Request({
url: "api/v2/torrents/addPeers",
url: "${BASE_PATH}api/v2/torrents/addPeers",
method: "post",
data: {
hashes: hash,
Expand Down
12 changes: 6 additions & 6 deletions src/webui/www/private/addtrackers.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<head>
<meta charset="UTF-8">
<title>QBT_TR(Add trackers)QBT_TR[CONTEXT=TrackersAdditionDialog]</title>
<link rel="stylesheet" href="css/style.css?v=${CACHEID}" type="text/css">
<script src="scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
<script src="scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
<script src="scripts/localpreferences.js?v=${CACHEID}"></script>
<script src="scripts/color-scheme.js?v=${CACHEID}"></script>
<link rel="stylesheet" href="${BASE_PATH}css/style.css?v=${CACHEID}" type="text/css">
<script src="${BASE_PATH}scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
<script src="${BASE_PATH}scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
<script src="${BASE_PATH}scripts/localpreferences.js?v=${CACHEID}"></script>
<script src="${BASE_PATH}scripts/color-scheme.js?v=${CACHEID}"></script>
<script>
"use strict";

Expand All @@ -34,7 +34,7 @@

const hash = new URI().getData("hash");
new Request({
url: "api/v2/torrents/addTrackers",
url: "${BASE_PATH}api/v2/torrents/addTrackers",
method: "post",
data: {
hash: hash,
Expand Down
12 changes: 6 additions & 6 deletions src/webui/www/private/addwebseeds.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<head>
<meta charset="UTF-8">
<title>QBT_TR(Add web seeds)QBT_TR[CONTEXT=HttpServer]</title>
<link rel="stylesheet" href="css/style.css?v=${CACHEID}" type="text/css">
<script src="scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
<script src="scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
<script src="scripts/localpreferences.js?v=${CACHEID}"></script>
<script src="scripts/color-scheme.js?v=${CACHEID}"></script>
<link rel="stylesheet" href="${BASE_PATH}css/style.css?v=${CACHEID}" type="text/css">
<script src="${BASE_PATH}scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
<script src="${BASE_PATH}scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
<script src="${BASE_PATH}scripts/localpreferences.js?v=${CACHEID}"></script>
<script src="${BASE_PATH}scripts/color-scheme.js?v=${CACHEID}"></script>
<script>
"use strict";

Expand All @@ -32,7 +32,7 @@
e.stopPropagation();
const hash = new URI().getData("hash");
new Request({
url: "api/v2/torrents/addWebSeeds",
url: "${BASE_PATH}api/v2/torrents/addWebSeeds",
method: "post",
data: {
hash: hash,
Expand Down
12 changes: 6 additions & 6 deletions src/webui/www/private/confirmfeeddeletion.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<head>
<meta charset="UTF-8">
<title>QBT_TR(Deletion confirmation)QBT_TR[CONTEXT=RSSWidget]</title>
<link rel="stylesheet" href="css/style.css?v=${CACHEID}" type="text/css">
<script src="scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
<script src="scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
<script src="scripts/localpreferences.js?v=${CACHEID}"></script>
<script src="scripts/color-scheme.js?v=${CACHEID}"></script>
<link rel="stylesheet" href="${BASE_PATH}css/style.css?v=${CACHEID}" type="text/css">
<script src="${BASE_PATH}scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
<script src="${BASE_PATH}scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
<script src="${BASE_PATH}scripts/localpreferences.js?v=${CACHEID}"></script>
<script src="${BASE_PATH}scripts/color-scheme.js?v=${CACHEID}"></script>
<script>
"use strict";

Expand All @@ -27,7 +27,7 @@
let completionCount = 0;
paths.forEach((path) => {
new Request({
url: "api/v2/rss/removeItem",
url: "${BASE_PATH}api/v2/rss/removeItem",
method: "post",
data: {
path: decodeURIComponent(path)
Expand Down
10 changes: 5 additions & 5 deletions src/webui/www/private/confirmruleclear.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<head>
<meta charset="UTF-8">
<title>QBT_TR(Clear downloaded episodes)QBT_TR[CONTEXT=AutomatedRssDownloader]</title>
<link rel="stylesheet" href="css/style.css?v=${CACHEID}" type="text/css">
<script src="scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
<script src="scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
<script src="scripts/localpreferences.js?v=${CACHEID}"></script>
<script src="scripts/color-scheme.js?v=${CACHEID}"></script>
<link rel="stylesheet" href="${BASE_PATH}css/style.css?v=${CACHEID}" type="text/css">
<script src="${BASE_PATH}scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
<script src="${BASE_PATH}scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
<script src="${BASE_PATH}scripts/localpreferences.js?v=${CACHEID}"></script>
<script src="${BASE_PATH}scripts/color-scheme.js?v=${CACHEID}"></script>
<script>
"use strict";

Expand Down
12 changes: 6 additions & 6 deletions src/webui/www/private/confirmruledeletion.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<head>
<meta charset="UTF-8">
<title>QBT_TR(Rule deletion confirmation)QBT_TR[CONTEXT=AutomatedRssDownloader]</title>
<link rel="stylesheet" href="css/style.css?v=${CACHEID}" type="text/css">
<script src="scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
<script src="scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
<script src="scripts/localpreferences.js?v=${CACHEID}"></script>
<script src="scripts/color-scheme.js?v=${CACHEID}"></script>
<link rel="stylesheet" href="${BASE_PATH}css/style.css?v=${CACHEID}" type="text/css">
<script src="${BASE_PATH}scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
<script src="${BASE_PATH}scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
<script src="${BASE_PATH}scripts/localpreferences.js?v=${CACHEID}"></script>
<script src="${BASE_PATH}scripts/color-scheme.js?v=${CACHEID}"></script>
<script>
"use strict";

Expand All @@ -28,7 +28,7 @@
let completionCount = 0;
rules.forEach((rule) => {
new Request({
url: "api/v2/rss/removeRule",
url: "${BASE_PATH}api/v2/rss/removeRule",
method: "post",
data: {
ruleName: decodeURIComponent(rule)
Expand Down
12 changes: 6 additions & 6 deletions src/webui/www/private/confirmtrackerdeletion.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<head>
<meta charset="UTF-8">
<title>QBT_TR(Remove tracker)QBT_TR[CONTEXT=confirmDeletionDlg]</title>
<link rel="stylesheet" href="css/style.css?v=${CACHEID}" type="text/css">
<script src="scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
<script src="scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
<script src="scripts/localpreferences.js?v=${CACHEID}"></script>
<script src="scripts/color-scheme.js?v=${CACHEID}"></script>
<link rel="stylesheet" href="${BASE_PATH}css/style.css?v=${CACHEID}" type="text/css">
<script src="${BASE_PATH}scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
<script src="${BASE_PATH}scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
<script src="${BASE_PATH}scripts/localpreferences.js?v=${CACHEID}"></script>
<script src="${BASE_PATH}scripts/color-scheme.js?v=${CACHEID}"></script>
<script>
"use strict";

Expand All @@ -24,7 +24,7 @@
});
$("confirmBtn").addEvent("click", (e) => {
e.stopPropagation();
const cmd = "api/v2/torrents/removeTrackers";
const cmd = "${BASE_PATH}api/v2/torrents/removeTrackers";
new Request({
url: cmd,
method: "post",
Expand Down
21 changes: 11 additions & 10 deletions src/webui/www/private/css/Layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Required by:
}

#desktopTitlebar {
background: url("../images/logo.gif") no-repeat;
background: url("${BASE_PATH}images/logo.gif") no-repeat;
background-position: left 0;
height: 32px;
padding: 7px 8px 6px;
Expand Down Expand Up @@ -119,7 +119,7 @@ Required by:

#desktopNavbar ul li a.arrow-right,
#desktopNavbar ul li a:hover.arrow-right {
background-image: url("../images/arrow-right.gif");
background-image: url("${BASE_PATH}images/arrow-right.gif");
background-position: right 7px;
background-repeat: no-repeat;
}
Expand Down Expand Up @@ -269,11 +269,11 @@ li.divider {
}

.panel-collapse {
background: url("../images/collapse.svg") center/16px no-repeat;
background: url("${BASE_PATH}images/collapse.svg") center/16px no-repeat;
}

.panel-expand {
background: url("../images/collapse.svg") center/16px no-repeat;
background: url("${BASE_PATH}images/collapse.svg") center/16px no-repeat;
transform: rotate(180deg);
}

Expand All @@ -296,8 +296,8 @@ li.divider {
}

.horizontalHandle .handleIcon {
background: url("../images/handle-icon-horizontal.gif") center center
no-repeat;
background: url("${BASE_PATH}images/handle-icon-horizontal.gif") center
center no-repeat;
font-size: 1px;
height: 6px;
line-height: 1px;
Expand All @@ -306,7 +306,8 @@ li.divider {
}

.columnHandle {
background: url("../images/handle-icon.gif") center center no-repeat;
background: url("${BASE_PATH}images/handle-icon.gif") center center
no-repeat;
border: 1px solid var(--color-border-default);
border-bottom: 0;
border-top: 0;
Expand All @@ -329,7 +330,7 @@ li.divider {

/* Have to specify div here for IE6's sake */
div.toolbox.divider {
background: url("../images/toolbox-divider.gif") repeat-y;
background: url("${BASE_PATH}images/toolbox-divider.gif") repeat-y;
padding-left: 8px;
}

Expand Down Expand Up @@ -362,14 +363,14 @@ div.toolbox.divider {
}

#spinnerWrapper {
background: url("../images/spinner-placeholder.gif") no-repeat;
background: url("${BASE_PATH}images/spinner-placeholder.gif") no-repeat;
height: 16px;
margin: 4px 5px 0;
width: 16px;
}

#spinner {
background: url("../images/spinner.gif") no-repeat;
background: url("${BASE_PATH}images/spinner.gif") no-repeat;
display: none;
height: 16px;
width: 16px;
Expand Down
4 changes: 2 additions & 2 deletions src/webui/www/private/css/Window.css
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ div.mochaToolbarWrapper.bottom {
}

.mochaSpinner {
background: url("../images/spinner.gif") no-repeat;
background: url("${BASE_PATH}images/spinner.gif") no-repeat;
bottom: 7px;
display: none;
height: 16px;
Expand Down Expand Up @@ -325,7 +325,7 @@ div.mochaToolbarWrapper.bottom {
/* Example Window Themes */

#about_contentWrapper {
background: #e5e5e5 url("../images/logo2.gif") 3px 3px no-repeat;
background: #e5e5e5 url("${BASE_PATH}images/logo2.gif") 3px 3px no-repeat;
}

#builder_contentWrapper {
Expand Down
4 changes: 2 additions & 2 deletions src/webui/www/private/css/dynamicTable.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@
}

.dynamicTable th.sorted {
background-image: url("../images/go-up.svg");
background-image: url("${BASE_PATH}images/go-up.svg");
background-position: right 3px center;
background-repeat: no-repeat;
background-size: 12px;
}

.dynamicTable th.sorted.reverse {
background-image: url("../images/go-down.svg");
background-image: url("${BASE_PATH}images/go-down.svg");
}

.dynamicTable span.flags {
Expand Down
Loading

0 comments on commit c68971a

Please sign in to comment.