mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-05 15:12:32 -06:00
Redesign Web API
Normalize Web API method names. Allow to use alternative Web UI. Switch Web API version to standard form (i.e. "2.0"). Improve Web UI translation code. Retranslate changed files. Add Web API for RSS subsystem.
This commit is contained in:
84
src/webui/www/private/upload.html
Normal file
84
src/webui/www/private/upload.html
Normal file
@@ -0,0 +1,84 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="${LANG}">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>QBT_TR(Upload local torrent)QBT_TR[CONTEXT=HttpServer]</title>
|
||||
<link rel="stylesheet" href="css/style.css" type="text/css" />
|
||||
<link rel="stylesheet" href="css/Window.css" type="text/css" />
|
||||
<script type="text/javascript" src="scripts/mootools-1.2-core-yc.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="scripts/download.js" charset="utf-8"></script>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="upload_frame" name="upload_frame" class="invisible" src="javascript:false;"></iframe>
|
||||
<form action="api/v2/torrents/add" enctype="multipart/form-data" method="post" id="uploadForm" style="text-align: center;" target="upload_frame">
|
||||
<div style="margin-top: 25px; display: inline-block; border: 1px solid lightgrey; border-radius: 4px;">
|
||||
<input type="file" id="fileselect" name="fileselect[]" multiple="multiple"/>
|
||||
</div>
|
||||
<fieldset class="settings" style="border: 0; text-align: left;">
|
||||
<div class="formRow" style="margin-top: 12px;">
|
||||
<label for="savepath" class="leftLabelLarge">QBT_TR(Save files to location:)QBT_TR[CONTEXT=HttpServer]</label>
|
||||
<input type="text" id="savepath" name="savepath" style="width: 16em;"/>
|
||||
</div>
|
||||
<div class="formRow">
|
||||
<label for="rename" class="leftLabelLarge">QBT_TR(Rename torrent)QBT_TR[CONTEXT=HttpServer]</label>
|
||||
<input type="text" id="rename" name="rename" style="width: 16em;"/>
|
||||
</div>
|
||||
<div class="formRow">
|
||||
<label for="category" class="leftLabelLarge">QBT_TR(Category:)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
|
||||
<input type="text" id="category" name="category" style="width: 16em;"/>
|
||||
</div>
|
||||
<div class="formRow">
|
||||
<label for="start_torrent" class="leftLabelLarge">QBT_TR(Start torrent)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
|
||||
<input type="checkbox" id="start_torrent" checked="checked"/>
|
||||
<input type="hidden" id="add_paused" name="paused" value="true" disabled="disabled"/>
|
||||
</div>
|
||||
<div class="formRow">
|
||||
<label for="skip_checking" class="leftLabelLarge">QBT_TR(Skip hash check)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
|
||||
<input type="checkbox" id="skip_checking" name="skip_checking" value="true"/>
|
||||
</div>
|
||||
<div class="formRow">
|
||||
<label for="root_folder" class="leftLabelLarge">QBT_TR(Create subfolder)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
|
||||
<input type="checkbox" id="root_folder" name="root_folder" value="true" checked="checked"/>
|
||||
</div>
|
||||
<div class="formRow">
|
||||
<label for="sequentialDownload" class="leftLabelLarge">QBT_TR(Download in sequential order)QBT_TR[CONTEXT=TransferListWidget]</label>
|
||||
<input type="checkbox" id="sequentialDownload" name="sequentialDownload" value="true"/>
|
||||
</div>
|
||||
<div class="formRow">
|
||||
<label for="firstLastPiecePrio" class="leftLabelLarge">QBT_TR(Download first and last pieces first)QBT_TR[CONTEXT=TransferListWidget]</label>
|
||||
<input type="checkbox" id="firstLastPiecePrio" name="firstLastPiecePrio" value="true"/>
|
||||
</div>
|
||||
<div class="formRow">
|
||||
<label for="dlLimit" class="leftLabelLarge">QBT_TR(Limit download rate)QBT_TR[CONTEXT=HttpServer]</label>
|
||||
<input type="text" id="dlLimit" name="dlLimit" style="width: 16em;" placeholder="Bytes/s"/>
|
||||
</div>
|
||||
<div class="formRow">
|
||||
<label for="upLimit" class="leftLabelLarge">QBT_TR(Limit upload rate)QBT_TR[CONTEXT=HttpServer]</label>
|
||||
<input type="text" id="upLimit" name="upLimit" style="width: 16em;" placeholder="Bytes/s"/>
|
||||
</div>
|
||||
<div id="submitbutton" style="margin-top: 30px; text-align: center;">
|
||||
<button type="submit" style="font-size: 1em;">QBT_TR(Upload Torrents)QBT_TR[CONTEXT=HttpServer]</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
|
||||
var submitted = false;
|
||||
|
||||
$('uploadForm').addEventListener("submit", function() {
|
||||
$('upload_spinner').style.display = "block";
|
||||
submitted = true;
|
||||
});
|
||||
|
||||
$('upload_frame').addEventListener("load", function() {
|
||||
if (submitted)
|
||||
window.parent.closeWindows();
|
||||
});
|
||||
|
||||
$('start_torrent').addEventListener('change', function() {
|
||||
$('add_paused').disabled = $('start_torrent').checked;
|
||||
});
|
||||
</script>
|
||||
<div id="upload_spinner" class="mochaSpinner"></div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user