mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-17 13:53:52 +02:00
Fix copy to clipboard
This commit is contained in:
@@ -391,30 +391,23 @@ function openExternalLink(link) {
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Open',
|
||||
cancelButtonText: 'Copy',
|
||||
type: 'info'
|
||||
type: 'info',
|
||||
beforeClose: (action, instance, done) => {
|
||||
if (action === 'cancel') {
|
||||
copyToClipboard(link);
|
||||
}
|
||||
done();
|
||||
}
|
||||
})
|
||||
.then((action) => {
|
||||
console.log(action);
|
||||
if (action === 'confirm') {
|
||||
AppApi.OpenLink(link);
|
||||
} else if (action === 'cancel') {
|
||||
copyLink(link);
|
||||
}
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {string} text
|
||||
*/
|
||||
function copyLink(text) {
|
||||
ElMessage({
|
||||
message: 'Link copied to clipboard',
|
||||
type: 'success'
|
||||
});
|
||||
copyToClipboard(text);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {object} ref
|
||||
@@ -541,7 +534,6 @@ export {
|
||||
buildTreeData,
|
||||
replaceBioSymbols,
|
||||
openExternalLink,
|
||||
copyLink,
|
||||
getBundleDateSize,
|
||||
openFolderGeneric,
|
||||
debounce
|
||||
|
||||
Reference in New Issue
Block a user