Browse Source

Merge pull request #13336 from Chocobo1/webui

Minor WebUI improvements
adaptive-webui-19844
Mike Tzou 4 years ago committed by GitHub
parent
commit
c967bf31ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/base/http/types.h
  2. 2
      src/gui/gpl.html
  3. 2
      src/gui/thanks.html
  4. 2
      src/gui/translators.html
  5. 4
      src/webui/api/torrentscontroller.cpp
  6. 2
      src/webui/www/private/download.html
  7. 2
      src/webui/www/private/scripts/mocha-init.js
  8. 2
      src/webui/www/private/upload.html
  9. 2
      src/webui/www/public/scripts/login.js

2
src/base/http/types.h

@ -63,7 +63,7 @@ namespace Http @@ -63,7 +63,7 @@ namespace Http
const char CONTENT_TYPE_HTML[] = "text/html";
const char CONTENT_TYPE_CSS[] = "text/css";
const char CONTENT_TYPE_TXT[] = "text/plain";
const char CONTENT_TYPE_TXT[] = "text/plain; charset=UTF-8";
const char CONTENT_TYPE_JS[] = "application/javascript";
const char CONTENT_TYPE_JSON[] = "application/json";
const char CONTENT_TYPE_GIF[] = "image/gif";

2
src/gui/gpl.html

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta charset="UTF-8">
<title>License</title>
</head>
<body>

2
src/gui/thanks.html

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta charset="UTF-8">
<title>Thanks</title>
</head>
<body>

2
src/gui/translators.html

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta charset="UTF-8">
<title>Translators</title>
</head>
<body>

4
src/webui/api/torrentscontroller.cpp

@ -601,9 +601,9 @@ void TorrentsController::addAction() @@ -601,9 +601,9 @@ void TorrentsController::addAction()
}
if (partialSuccess)
setResult("Ok.");
setResult(QLatin1String("Ok."));
else
setResult("Fails.");
setResult(QLatin1String("Fails."));
}
void TorrentsController::addTrackersAction()

2
src/webui/www/private/download.html

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
</head>
<body>
<iframe id="download_frame" name="download_frame" class="invisible" src="javascript:false;"></iframe>
<iframe id="download_frame" name="download_frame" class="invisible" src="about:blank"></iframe>
<form action="api/v2/torrents/add" enctype="multipart/form-data" method="post" id="downloadForm" style="text-align: center;" target="download_frame" autocorrect="off" autocapitalize="none">
<div style="text-align: center;">
<br/>

2
src/webui/www/private/scripts/mocha-init.js

@ -1025,7 +1025,7 @@ const initializeWindows = function() { @@ -1025,7 +1025,7 @@ const initializeWindows = function() {
new Request({
url: 'api/v2/app/shutdown',
onSuccess: function() {
document.write('<!doctype html><html lang="${LANG}"><head> <meta charset="utf-8"> <title>QBT_TR(qBittorrent has been shutdown)QBT_TR[CONTEXT=HttpServer]</title></head><body> <h1 style="text-align: center;">QBT_TR(qBittorrent has been shutdown)QBT_TR[CONTEXT=HttpServer]</h1></body></html>');
document.write('<!doctype html><html lang="${LANG}"><head> <meta charset="UTF-8"> <title>QBT_TR(qBittorrent has been shutdown)QBT_TR[CONTEXT=HttpServer]</title></head><body> <h1 style="text-align: center;">QBT_TR(qBittorrent has been shutdown)QBT_TR[CONTEXT=HttpServer]</h1></body></html>');
document.close();
stop();
}

2
src/webui/www/private/upload.html

@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
</head>
<body>
<iframe id="upload_frame" name="upload_frame" class="invisible" src="javascript:false;"></iframe>
<iframe id="upload_frame" name="upload_frame" class="invisible" src="about:blank"></iframe>
<form action="api/v2/torrents/add" enctype="multipart/form-data" method="post" id="uploadForm" style="text-align: center;" target="upload_frame" autocorrect="off" autocapitalize="none">
<div style="margin-top: 25px; display: inline-block; border: 1px solid lightgrey; border-radius: 4px;">
<input type="file" id="fileselect" name="fileselect[]" multiple="multiple" />

2
src/webui/www/public/scripts/login.js

@ -42,7 +42,7 @@ function submitLoginForm() { @@ -42,7 +42,7 @@ function submitLoginForm() {
const xhr = new XMLHttpRequest();
xhr.open('POST', 'api/v2/auth/login', true);
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=utf-8');
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=UTF-8');
xhr.addEventListener('readystatechange', function() {
if (xhr.readyState === 4) { // DONE state
if ((xhr.status === 200) && (xhr.responseText === "Ok."))

Loading…
Cancel
Save