Browse Source

Web UI: Changes in title bar

adaptive-webui-19844
ngosang 10 years ago
parent
commit
c5ce99ebec
  1. 2
      src/webui/abstractwebapplication.cpp
  2. 2
      src/webui/www/private/index.html
  3. 4
      src/webui/www/private/login.html
  4. 2
      src/webui/www/public/about.html
  5. 9
      src/webui/www/public/scripts/client.js

2
src/webui/abstractwebapplication.cpp

@ -194,7 +194,7 @@ bool AbstractWebApplication::readFile(const QString& path, QByteArray &data, QSt @@ -194,7 +194,7 @@ bool AbstractWebApplication::readFile(const QString& path, QByteArray &data, QSt
QString dataStr = QString::fromUtf8(data.constData());
translateDocument(dataStr);
if (path.endsWith("about.html"))
if (path.endsWith("about.html") || path.endsWith("index.html") || path.endsWith("client.js"))
dataStr.replace("${VERSION}", VERSION);
data = dataStr.toUtf8();

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

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=10; IE=9; IE=8;" />
<title>QBT_TR(qBittorrent web User Interface)QBT_TR</title>
<title>qBittorrent ${VERSION} QBT_TR(Web UI)QBT_TR</title>
<link rel="stylesheet" href="css/dynamicTable.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<!--<link rel="stylesheet" type="text/css" href="css/Content.css" />-->

4
src/webui/www/private/login.html

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<title>QBT_TR(qBittorrent web User Interface)QBT_TR</title>
<title>qBittorrent QBT_TR(Web UI)QBT_TR</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script type="text/javascript" src="scripts/mootools-1.2-core-yc.js" charset="utf-8"></script>
<script type="text/javascript">
@ -70,7 +70,7 @@ @@ -70,7 +70,7 @@
</head>
<body>
<div id="main">
<h1>QBT_TR(qBittorrent web User Interface)QBT_TR</h1>
<h1>qBittorrent QBT_TR(Web UI)QBT_TR</h1>
<div id="logo" class="col">
<img src="images/qbittorrent.png" alt="qBittorrent logo"/>
</div>

2
src/webui/www/public/about.html

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
<img src="images/skin/mascot.png" align="right"></img>
<p>qBittorrent ${VERSION} (Web UI)</p>
<p>qBittorrent ${VERSION} QBT_TR(Web UI)QBT_TR</p>
<p>Copyright (c) 2011-2015 The qBittorrent project</p>
<p>Homepage: <a href="http://www.qbittorrent.org">http://www.qbittorrent.org</a></p>

9
src/webui/www/public/scripts/client.js

@ -200,10 +200,11 @@ window.addEvent('load', function () { @@ -200,10 +200,11 @@ window.addEvent('load', function () {
transfer_info += friendlyUnit(serverState.up_info_speed, true)
transfer_info += " (" + friendlyUnit(serverState.up_info_data, false) + ")"
$("UpInfos").set('html', transfer_info);
if (speedInTitle)
document.title = "QBT_TR(D:%1 U:%2)QBT_TR".replace("%1", friendlyUnit(serverState.dl_info_speed, true)).replace("%2", friendlyUnit(serverState.up_info_speed, true));
else
document.title = "QBT_TR(qBittorrent web User Interface)QBT_TR";
if (speedInTitle) {
document.title = "QBT_TR([D:%1 U:%2])QBT_TR".replace("%1", friendlyUnit(serverState.dl_info_speed, true)).replace("%2", friendlyUnit(serverState.up_info_speed, true));
document.title += " qBittorrent ${VERSION} QBT_TR(Web UI)QBT_TR";
}else
document.title = "qBittorrent ${VERSION} QBT_TR(Web UI)QBT_TR";
$('DHTNodes').set('html', 'QBT_TR(DHT: %1 nodes)QBT_TR'.replace("%1", serverState.dht_nodes));
if (serverState.connection_status == "connected")
$('connectionStatus').src = 'images/skin/connected.png';

Loading…
Cancel
Save