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 Oct 4, 2024
1 parent 9834481 commit b07bc4f
Show file tree
Hide file tree
Showing 64 changed files with 556 additions and 554 deletions.
8 changes: 4 additions & 4 deletions src/webui/www/private/addpeers.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<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>
<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>
"use strict";

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

new Request({
url: "api/v2/torrents/addPeers",
url: "${BASE_PATH}api/v2/torrents/addPeers",
method: "post",
data: {
hashes: hash,
Expand Down
8 changes: 4 additions & 4 deletions src/webui/www/private/addtrackers.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<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>
<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>
"use strict";

Expand All @@ -32,7 +32,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
8 changes: 4 additions & 4 deletions src/webui/www/private/addwebseeds.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<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>
<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>
"use strict";

Expand All @@ -30,7 +30,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
8 changes: 4 additions & 4 deletions src/webui/www/private/confirmfeeddeletion.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<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>
<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>
"use strict";

Expand All @@ -25,7 +25,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
6 changes: 3 additions & 3 deletions src/webui/www/private/confirmruleclear.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<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>
<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>
"use strict";

Expand Down
8 changes: 4 additions & 4 deletions src/webui/www/private/confirmruledeletion.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<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>
<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>
"use strict";

Expand All @@ -26,7 +26,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
8 changes: 4 additions & 4 deletions src/webui/www/private/confirmtrackerdeletion.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<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>
<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>
"use strict";

Expand All @@ -22,7 +22,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 @@ -38,7 +38,7 @@ body {
}

#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 @@ -125,7 +125,7 @@ body {

#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 @@ -272,11 +272,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 @@ -299,8 +299,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: 4px;
line-height: 1px;
Expand All @@ -309,7 +309,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 @@ -332,7 +333,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 @@ -365,14 +366,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 @@ -176,7 +176,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 @@ -326,7 +326,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 @@ tr.dynamicTableHeader {
}

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

.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
31 changes: 16 additions & 15 deletions src/webui/www/private/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ a.propButton img {
}

.contextMenu li:not(.disabled) .arrow-right {
background-image: url("../images/arrow-right.gif");
background-image: url("${BASE_PATH}images/arrow-right.gif");
background-position: right center;
background-repeat: no-repeat;
}
Expand Down Expand Up @@ -379,7 +379,7 @@ a.propButton img {
}

.sliderarea {
background: #f2f2f2 url("../images/slider-area.gif") repeat-x;
background: #f2f2f2 url("${BASE_PATH}images/slider-area.gif") repeat-x;
border: 1px solid #a3a3a3;
border-bottom: 1px solid #ccc;
border-left: 1px solid #ccc;
Expand All @@ -396,7 +396,7 @@ a.propButton img {
}

.sliderknob {
background: url("../images/knob.gif") no-repeat;
background: url("${BASE_PATH}images/knob.gif") no-repeat;
cursor: pointer;
font-size: 1px;
height: 9px;
Expand Down Expand Up @@ -427,7 +427,7 @@ a.propButton img {
}

#mochaToolbar .divider {
background-image: url("../images/toolbox-divider.gif");
background-image: url("${BASE_PATH}images/toolbox-divider.gif");
background-position: left center;
background-repeat: no-repeat;
padding-left: 14px;
Expand All @@ -452,7 +452,7 @@ a.propButton img {

#torrentsFilterInput {
background-color: var(--color-background-default);
background-image: url("../images/edit-find.svg");
background-image: url("${BASE_PATH}images/edit-find.svg");
background-position: left;
background-repeat: no-repeat;
background-size: 1.5em;
Expand All @@ -467,7 +467,7 @@ a.propButton img {
}

#torrentsFilterRegexBox + label {
background-image: url("../images/regex.svg");
background-image: url("${BASE_PATH}images/regex.svg");
background-position: center;
background-repeat: no-repeat;
background-size: 1.5em;
Expand All @@ -481,7 +481,7 @@ a.propButton img {

#torrentsFilterRegexBox:checked + label {
background-color: var(--color-background-default);
background-image: url("../images/regex.svg");
background-image: url("${BASE_PATH}images/regex.svg");
background-position: center;
background-repeat: no-repeat;
background-size: 1.5em;
Expand All @@ -503,7 +503,7 @@ a.propButton img {
}

#torrentFilesFilterInput {
background-image: url("../images/edit-find.svg");
background-image: url("${BASE_PATH}images/edit-find.svg");
background-position: left;
background-repeat: no-repeat;
background-size: 1.5em;
Expand All @@ -514,7 +514,7 @@ a.propButton img {
/* Tri-state checkbox */

label.tristate {
background: url("../images/3-state-checkbox.gif") 0 0 no-repeat;
background: url("${BASE_PATH}images/3-state-checkbox.gif") 0 0 no-repeat;
display: block;
float: left;
height: 13px;
Expand Down Expand Up @@ -643,8 +643,8 @@ span.link :is(img, button) {
}

.categoryToggle {
background: url("../images/go-down.svg") center center / 10px no-repeat
transparent;
background: url("${BASE_PATH}images/go-down.svg") center center / 10px
no-repeat transparent;
border: none;
display: none;
height: 16px;
Expand Down Expand Up @@ -750,7 +750,7 @@ td.generalLabel {
}

td.statusBarSeparator {
background-image: url("../images/toolbox-divider.gif");
background-image: url("${BASE_PATH}images/toolbox-divider.gif");
background-position: center 1px;
background-repeat: no-repeat;
background-size: 2px 18px;
Expand Down Expand Up @@ -849,7 +849,7 @@ td.statusBarSeparator {
}

#rememberBtn {
background: url("../images/object-locked.svg") center center / 24px
background: url("${BASE_PATH}images/object-locked.svg") center center / 24px
no-repeat var(--color-background-popup);
height: 38px;
padding: 4px 6px;
Expand Down Expand Up @@ -889,11 +889,12 @@ td.statusBarSeparator {

.confirmWarning,
.confirmDialogWarning {
background: url("../images/dialog-warning.svg") center center no-repeat;
background: url("${BASE_PATH}images/dialog-warning.svg") center center
no-repeat;
height: 38px;
width: 38px;
}

.confirmWarning {
background-image: url("../images/help-about.svg");
background-image: url("${BASE_PATH}images/help-about.svg");
}
Loading

0 comments on commit b07bc4f

Please sign in to comment.