add-copy-button
This commit is contained in:
@@ -113,6 +113,7 @@
|
||||
<i class="fa fa-lock" style="margin-bottom:2px;font-size:1rem"></i>
|
||||
<span id="prjpass" class="text-center mb-2" style="word-break:break-all;font-size:12px;margin-bottom:0!important" id="card_pass" hidden><%=projectPass%><i onclick="hidePass()" class="fa fa-eye-slash" style="margin-left:3px;cursor:pointer"></i></span>
|
||||
<span id="prjpass_hidden" class="text-center mb-2" style="word-break:break-all;font-size:12px;margin-bottom:0!important;display:flex;flex-direction:row;align-items:center;justify-content:center">********<i onclick="showPass()" class="fa fa-eye" style="margin-left:3px;cursor:pointer;margin-bottom:5px"></i></span>
|
||||
<a id="copypass" class="btn btn-light"><i class="fa fa-copy"></i></a>
|
||||
</div>
|
||||
<div class="text-center d-none d-md-inline">
|
||||
<button class="rounded-circle border-0" id="sidebarToggle"></button>
|
||||
|
||||
@@ -10,6 +10,18 @@ $(function() {
|
||||
scriptcordova.src = "https://injection/www/cordova.js";
|
||||
document.head.appendChild(scriptcordova);
|
||||
}
|
||||
$("#copypass").click(function(){
|
||||
projectPass = $("#prjpass").text()
|
||||
var input = document.createElement('input');
|
||||
document.body.appendChild(input);
|
||||
input.setAttribute('value', projectPass);
|
||||
input.select();
|
||||
if (document.execCommand('copy')) {
|
||||
document.execCommand('copy');
|
||||
}
|
||||
document.body.removeChild(input);
|
||||
showtext("密钥信息已复制到剪贴板")
|
||||
})
|
||||
})
|
||||
$(function() {
|
||||
get_width();
|
||||
@@ -3862,4 +3874,4 @@ var exportProjects = function() {
|
||||
} else
|
||||
showtext("Unknown Error")
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user