From 700fd8b89ba8e6e08614fbe3decff905a5606cec Mon Sep 17 00:00:00 2001 From: Natsumi Date: Sun, 26 Sep 2021 09:56:33 +1200 Subject: [PATCH] Copy user URL --- html/src/app.js | 10 ++++++++++ html/src/index.pug | 1 + 2 files changed, 11 insertions(+) diff --git a/html/src/app.js b/html/src/app.js index 68c0fc0a..d2a6bfdc 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -10834,6 +10834,8 @@ speechSynthesis.getVoices(); this.displayPreviousImages('User', 'Display'); } else if (command === 'Manage Gallery') { this.showGalleryDialog(); + } else if (command === 'Copy User') { + this.copyUser(D.id); } else { this.$confirm(`Continue? ${command}`, 'Confirm', { confirmButtonText: 'Confirm', @@ -12217,6 +12219,14 @@ speechSynthesis.getVoices(); this.copyToClipboard(`https://vrchat.com/home/world/${worldId}`); }; + $app.methods.copyUser = function (userId) { + this.$message({ + message: 'User URL copied to clipboard', + type: 'success' + }); + this.copyToClipboard(`https://vrchat.com/home/user/${userId}`); + }; + // App: VRCPlus Icons API.$on('LOGIN', function () { diff --git a/html/src/index.pug b/html/src/index.pug index 13c3aae3..8db7399b 100644 --- a/html/src/index.pug +++ b/html/src/index.pug @@ -1091,6 +1091,7 @@ html el-button(:type="(userDialog.incomingRequest || userDialog.outgoingRequest) ? 'success' : (userDialog.isBlock || userDialog.isMute || userDialog.isHideAvatar) ? 'danger' : 'default'" icon="el-icon-more" circle style="margin-left:5px") el-dropdown-menu(#default="dropdown") el-dropdown-item(icon="el-icon-refresh" command="Refresh") Refresh + el-dropdown-item(icon="el-icon-s-order" command="Copy User") Copy User URL template(v-if="userDialog.ref.id === API.currentUser.id") el-dropdown-item(icon="el-icon-picture-outline" command="Manage Gallery" divided) Manage Gallery/Icons el-dropdown-item(icon="el-icon-s-custom" command="Show Avatar Author") Show Avatar Author