mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
webui: copy apikey to clipboard button (#12884)
This commit is contained in:

committed by
GitHub

parent
d006150627
commit
f84f492d43
@@ -1367,6 +1367,13 @@ function bindUIButtons() {
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#api-key-copy-button').click(function () {
|
||||
var apiKey = api.key;
|
||||
if (apiKey !== null || apiKey !== undefined) {
|
||||
copyToClipboard(apiKey);
|
||||
}
|
||||
});
|
||||
|
||||
$('#jackett-add-indexer').click(function () {
|
||||
$("#modals").empty();
|
||||
displayUnconfiguredIndexersList();
|
||||
|
@@ -43,6 +43,9 @@
|
||||
<div class="pull-right jackett-apikey">
|
||||
<span class="input-header">API Key: </span>
|
||||
<input id="api-key-input" class="form-control input-right" type="text" value="" placeholder="API Key" readonly="">
|
||||
<button id="api-key-copy-button" title="Copy API Key to clipboard" class="btn btn-primary btn-xs">
|
||||
<span class="glyphicon glyphicon-copy" aria-hidden="true"></span>
|
||||
</button>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
@@ -743,6 +746,6 @@
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="../libs/api.js?changed=2017083001"></script>
|
||||
<script type="text/javascript" src="../custom.js?changed=2022012301"></script>
|
||||
<script type="text/javascript" src="../custom.js?changed=2022012602"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user