mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 15:27:54 +00:00
Prepare WebUI resources.
Html/Css/JavaScript files displacement. Also add new icon.
This commit is contained in:
parent
b0f767e699
commit
3d20f2f670
BIN
src/Icons/oxygen/system-log-out.png
Normal file
BIN
src/Icons/oxygen/system-log-out.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource>
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>Icons/3-state-checkbox.gif</file>
|
||||
<file>Icons/L.gif</file>
|
||||
<file>Icons/loading.png</file>
|
||||
@ -349,5 +349,6 @@
|
||||
<file>Icons/skin/tabs.gif</file>
|
||||
<file>Icons/skin/toolbox-divider.gif</file>
|
||||
<file>Icons/skin/uploading.png</file>
|
||||
<file>Icons/oxygen/system-log-out.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
@ -6,10 +6,11 @@ HEADERS += $$PWD/httpserver.h \
|
||||
$$PWD/httpresponsegenerator.h \
|
||||
$$PWD/btjson.h \
|
||||
$$PWD/prefjson.h \
|
||||
$$PWD/httpheader.h \
|
||||
$$PWD/httprequestheader.h \
|
||||
$$PWD/httpresponseheader.h \
|
||||
$$PWD/jsonutils.h
|
||||
$$PWD/jsonutils.h \
|
||||
$$PWD/httptypes.h \
|
||||
$$PWD/extra_translations.h \
|
||||
$$PWD/webapplication.h \
|
||||
$$PWD/requesthandler.h
|
||||
|
||||
SOURCES += $$PWD/httpserver.cpp \
|
||||
$$PWD/httpconnection.cpp \
|
||||
@ -17,9 +18,8 @@ SOURCES += $$PWD/httpserver.cpp \
|
||||
$$PWD/httpresponsegenerator.cpp \
|
||||
$$PWD/btjson.cpp \
|
||||
$$PWD/prefjson.cpp \
|
||||
$$PWD/httpheader.cpp \
|
||||
$$PWD/httprequestheader.cpp \
|
||||
$$PWD/httpresponseheader.cpp
|
||||
$$PWD/webapplication.cpp \
|
||||
$$PWD/requesthandler.cpp
|
||||
|
||||
# QJson JSON parser/serializer for using with Qt4
|
||||
lessThan(QT_MAJOR_VERSION, 5) {
|
||||
|
@ -1,37 +1,39 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource prefix="webui/">
|
||||
<file>html/index.html</file>
|
||||
<file>html/download.html</file>
|
||||
<file>html/addtrackers.html</file>
|
||||
<file>html/upload.html</file>
|
||||
<file>html/about.html</file>
|
||||
<file>html/filters.html</file>
|
||||
<file>html/transferlist.html</file>
|
||||
<file>html/prop-general.html</file>
|
||||
<file>html/prop-trackers.html</file>
|
||||
<file>html/prop-files.html</file>
|
||||
<file>html/properties.html</file>
|
||||
<file>html/uploadlimit.html</file>
|
||||
<file>html/downloadlimit.html</file>
|
||||
<file>html/preferences.html</file>
|
||||
<file>html/preferences_content.html</file>
|
||||
<file>html/confirmdeletion.html</file>
|
||||
<file>css/Core.css</file>
|
||||
<file>css/Layout.css</file>
|
||||
<file>css/Window.css</file>
|
||||
<file>css/Tabs.css</file>
|
||||
<file>css/dynamicTable.css</file>
|
||||
<file>css/style.css</file>
|
||||
<file>scripts/excanvas-compressed.js</file>
|
||||
<file>scripts/mocha-yc.js</file>
|
||||
<file>scripts/mocha-init.js</file>
|
||||
<file>scripts/mootools-1.2-core-yc.js</file>
|
||||
<file>scripts/mootools-1.2-more.js</file>
|
||||
<file>scripts/dynamicTable.js</file>
|
||||
<file>scripts/client.js</file>
|
||||
<file>scripts/download.js</file>
|
||||
<file>scripts/progressbar.js</file>
|
||||
<file>scripts/contextmenu.js</file>
|
||||
<file>scripts/parametrics.js</file>
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>www/private/index.html</file>
|
||||
<file>www/private/login.html</file>
|
||||
<file>www/public/css/Core.css</file>
|
||||
<file>www/public/css/dynamicTable.css</file>
|
||||
<file>www/public/css/Layout.css</file>
|
||||
<file>www/public/css/style.css</file>
|
||||
<file>www/public/css/Tabs.css</file>
|
||||
<file>www/public/css/Window.css</file>
|
||||
<file>www/public/scripts/client.js</file>
|
||||
<file>www/public/scripts/contextmenu.js</file>
|
||||
<file>www/public/scripts/download.js</file>
|
||||
<file>www/public/scripts/dynamicTable.js</file>
|
||||
<file>www/public/scripts/excanvas-compressed.js</file>
|
||||
<file>www/public/scripts/mocha.js</file>
|
||||
<file>www/public/scripts/mocha-init.js</file>
|
||||
<file>www/public/scripts/mocha-yc.js</file>
|
||||
<file>www/public/scripts/mootools-1.2-core-yc.js</file>
|
||||
<file>www/public/scripts/mootools-1.2-more.js</file>
|
||||
<file>www/public/scripts/parametrics.js</file>
|
||||
<file>www/public/scripts/progressbar.js</file>
|
||||
<file>www/public/about.html</file>
|
||||
<file>www/public/addtrackers.html</file>
|
||||
<file>www/public/confirmdeletion.html</file>
|
||||
<file>www/public/download.html</file>
|
||||
<file>www/public/downloadlimit.html</file>
|
||||
<file>www/public/filters.html</file>
|
||||
<file>www/public/preferences.html</file>
|
||||
<file>www/public/preferences_content.html</file>
|
||||
<file>www/public/properties.html</file>
|
||||
<file>www/public/prop-files.html</file>
|
||||
<file>www/public/prop-general.html</file>
|
||||
<file>www/public/prop-trackers.html</file>
|
||||
<file>www/public/transferlist.html</file>
|
||||
<file>www/public/upload.html</file>
|
||||
<file>www/public/uploadlimit.html</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@ -37,7 +37,8 @@
|
||||
<ul>
|
||||
<li><a id="uploadLink"><img class="MyMenuIcon" src="theme/list-add" width="16" height="16" onload="fixPNG(this)"/>_(&Add torrent file...)</a></li>
|
||||
<li><a id="downloadLink"><img class="MyMenuIcon" src="theme/insert-link" width="16" height="16" onload="fixPNG(this)"/>_(Add &link to torrent...)</a></li>
|
||||
<li class="divider"><a id="shutdownLink"><img class="MyMenuIcon" src="theme/application-exit" width="16" height="16" onload="fixPNG(this)"/>_(Exit qBittorrent)</a></li>
|
||||
<li class="divider"><a id="logoutLink"><img class="MyMenuIcon" src="theme/system-log-out" width="16" height="16" onload="fixPNG(this)"/>_(Logout)</a></li>
|
||||
<li><a id="shutdownLink"><img class="MyMenuIcon" src="theme/application-exit" width="16" height="16" onload="fixPNG(this)"/>_(Exit qBittorrent)</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
76
src/webui/www/private/login.html
Normal file
76
src/webui/www/private/login.html
Normal file
@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" dir="ltr">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=8" />
|
||||
<title>qBittorrent web User Interface</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">
|
||||
window.addEvent('domready', function() {
|
||||
$('loginform').addEvent('submit', function(e) {
|
||||
new Event(e).stop();
|
||||
submitLoginForm();
|
||||
});
|
||||
});
|
||||
|
||||
function submitLoginForm() {
|
||||
new Request({
|
||||
url: '/login',
|
||||
method: 'post',
|
||||
data: $('loginform').toQueryString(),
|
||||
onFailure: function() {
|
||||
alert("_(Unable to log in, qBittorrent is probably unreachable.)");
|
||||
},
|
||||
onSuccess: function(text) {
|
||||
if (text == "Ok.") {
|
||||
// Session started. Simply reload page.
|
||||
window.location.reload();
|
||||
} else {
|
||||
$('error_msg').set('html', '_(Invalid Username or Password.)');
|
||||
}
|
||||
}
|
||||
}).send();
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.col {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.row {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
#main {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
text-align: center;
|
||||
padding-top: 5em;
|
||||
}
|
||||
#formplace {
|
||||
text-align: left;
|
||||
padding: 10px;
|
||||
}
|
||||
#error_msg {
|
||||
color: #f00;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="main">
|
||||
<h1>_(qBittorrent web User Interface)</h1>
|
||||
<div id="logo" class="col">
|
||||
<img src="images/skin/mascot.png" />
|
||||
</div>
|
||||
<div id="formplace" class="col">
|
||||
<form id="loginform" action="">
|
||||
<div class="row"><label for="username">_(Name)</label><br /><input type="text" id="username" name="username" /></div>
|
||||
<div class="row"><label for="password">_(Password)</label><br /><input type="password" id="password" name="password" /></div>
|
||||
<div class="row"><input type="submit" id="login" value="_(Login)" /></div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="error_msg"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -247,15 +247,26 @@ initializeWindows = function(){
|
||||
});
|
||||
});
|
||||
|
||||
addClickEvent('logout', function(e){
|
||||
new Event(e).stop();
|
||||
new Request({
|
||||
url: '/logout',
|
||||
method: 'get',
|
||||
onSuccess: function() {
|
||||
window.location.reload();
|
||||
}
|
||||
}).send();
|
||||
});
|
||||
|
||||
addClickEvent('shutdown', function(e){
|
||||
new Event(e).stop();
|
||||
new Request({url: 'command/shutdown',
|
||||
new Request({
|
||||
url: 'command/shutdown',
|
||||
onSuccess: function() {
|
||||
document.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title>_(qBittorrent has been shutdown.)</title><style type=\"text/css\">body { text-align: center; }</style></head><body><h1>_(qBittorrent has been shutdown.)</h1></body></html>");
|
||||
stop();
|
||||
}
|
||||
}
|
||||
).send();
|
||||
}).send();
|
||||
});
|
||||
|
||||
// Deactivate menu header links
|
Loading…
Reference in New Issue
Block a user