show successful clipboard copy on the button
parent
4968f7b080
commit
e7798344d8
|
@ -2260,7 +2260,7 @@
|
|||
"message": "Copy to clipboard"
|
||||
},
|
||||
"cliCopySuccessful": {
|
||||
"message": "Content has been copied to clipboard!"
|
||||
"message": "Copied!"
|
||||
},
|
||||
|
||||
"loggingNote": {
|
||||
|
|
|
@ -43,7 +43,21 @@ function getCliCommand(command, cliBuffer) {
|
|||
|
||||
function copyToClipboard(text, nwGui) {
|
||||
function onCopySuccessful() {
|
||||
writeLineToOutput("* " + i18n.getMessage("cliCopySuccessful"));
|
||||
const button = $('.tab-cli .copy');
|
||||
const origText = button.text();
|
||||
const origWidth = button.css("width");
|
||||
button.text(i18n.getMessage("cliCopySuccessful"));
|
||||
button.css({
|
||||
width: origWidth,
|
||||
textAlign: "center",
|
||||
});
|
||||
setTimeout(() => {
|
||||
button.text(origText);
|
||||
button.css({
|
||||
width: "",
|
||||
textAlign: "",
|
||||
});
|
||||
}, 1500);
|
||||
}
|
||||
|
||||
function onCopyFailed(ex) {
|
||||
|
|
Loading…
Reference in New Issue