Copy world name

This commit is contained in:
Natsumi
2023-02-09 22:18:01 +13:00
parent 6b1ff166aa
commit a6fef7a03b
3 changed files with 11 additions and 1 deletions

View File

@@ -17622,6 +17622,14 @@ speechSynthesis.getVoices();
this.copyToClipboard(`https://vrchat.com/home/world/${worldId}`);
};
$app.methods.copyWorldName = function (worldName) {
this.$message({
message: 'World name copied to clipboard',
type: 'success'
});
this.copyToClipboard(worldName);
};
$app.methods.copyUser = function (userId) {
this.$message({
message: 'User URL copied to clipboard',

View File

@@ -2064,6 +2064,7 @@ html
el-dropdown-menu(#default="dropdown")
el-dropdown-item(@click.native="copyWorldId(worldDialog.id)") {{ $t('dialog.world.info.copy_id') }}
el-dropdown-item(@click.native="copyWorldUrl(worldDialog.id)") {{ $t('dialog.world.info.copy_url') }}
el-dropdown-item(@click.native="copyWorldName(worldDialog.ref.name)") {{ $t('dialog.world.info.copy_name') }}
.x-friend-item(v-if="worldDialog.ref.previewYoutubeId" style="width:350px" @click="openExternalLink(`https://www.youtube.com/watch?v=${worldDialog.ref.previewYoutubeId}`)")
.detail
span.name {{ $t('dialog.world.info.youtube_preview') }}
@@ -2335,7 +2336,7 @@ html
el-tooltip(placement="top" content="Refresh player count" :disabled="hideTooltips")
el-button(v-if="room.tag !== lastLocation.location" @click="refreshInstancePlayerCount(room.tag)" size="mini" icon="el-icon-refresh" style="margin-left:5px" circle)
span(v-if="room.occupants" style="margin-left:5px") {{ room.occupants }} #[template(v-if="room.friendCount > 0") ({{ room.friendCount }})]
.x-friend-list(style="margin:10px 0;max-height:unset" v-if="room.users.length")
.x-friend-list(style="margin:10px 0;padding:0;max-height:unset" v-if="room.users.length")
.x-friend-item(v-for="user in room.users" :key="user.id" @click="showUserDialog(user.id)" class="x-friend-item-border")
.avatar(:class="userStatusClass(user)")
img(v-lazy="userImage(user)")

View File

@@ -601,6 +601,7 @@
"id_tooltip": "Copy to clipboard",
"copy_id": "Copy ID",
"copy_url": "Copy URL",
"copy_name": "Copy Name",
"youtube_preview": "Youtube Preview",
"players": "Players",
"favorites": "Favorites",