WebUI: Fix add torrent spinner in Firefox

Firefox seems to have an issue where svgs loaded via background-url are not animated. Loading the svg directly as an img fixes this.

Related: #23074.
PR #23195.
This commit is contained in:
Thomas (Tom) Piccirello
2025-09-07 01:02:32 -07:00
committed by GitHub
parent 3146a3c2f9
commit f651a311a4
2 changed files with 11 additions and 2 deletions

View File

@@ -131,6 +131,15 @@
background-color: initial; background-color: initial;
} }
#loadingSpinner {
position: absolute;
left: 6px;
bottom: 2px;
width: 16px;
height: 16px;
display: block;
}
</style> </style>
</head> </head>
@@ -396,7 +405,7 @@
</div> </div>
</div> </div>
<div id="submitbutton" style="display: flex; margin-top: 10px; align-items: center; position: relative;"> <div id="submitbutton" style="display: flex; margin-top: 10px; align-items: center; position: relative;">
<div id="loadingSpinner" class="mochaSpinner" style="display: block; bottom: 2px;"></div> <img id="loadingSpinner" src="images/spinner.svg" alt="" aria-hidden="true">
<div id="errorIcon" class="mochaErrorIcon invisible" style="bottom: 2px;"></div> <div id="errorIcon" class="mochaErrorIcon invisible" style="bottom: 2px;"></div>
<span id="metadataStatus" style="padding-left: 28px;">Retrieving metadata</span> <span id="metadataStatus" style="padding-left: 28px;">Retrieving metadata</span>
<button id="saveTorrent" type="button" class="invisible" style="font-size: 1em;">QBT_TR(Save as .torrent file)QBT_TR[CONTEXT=AddNewTorrentDialog]</button> <button id="saveTorrent" type="button" class="invisible" style="font-size: 1em;">QBT_TR(Save as .torrent file)QBT_TR[CONTEXT=AddNewTorrentDialog]</button>

View File

@@ -3138,7 +3138,7 @@ window.qBittorrent.DynamicTable ??= (() => {
img_path = "images/task-reject.svg"; img_path = "images/task-reject.svg";
break; break;
case "isLoading": case "isLoading":
img_path = "images/spinner.gif"; img_path = "images/spinner.svg";
break; break;
case "unread": case "unread":
img_path = "images/mail-inbox.svg"; img_path = "images/mail-inbox.svg";