Group name in instance link

This commit is contained in:
Natsumi
2022-12-10 23:11:02 +13:00
parent 3a062bf4b4
commit e31ec71d09
3 changed files with 195 additions and 73 deletions

View File

@@ -100,11 +100,7 @@ html
span(v-text="currentInstanceWorld.cacheSize")
| Cache
br
span.x-link(v-if="currentInstanceLocation.instanceName" @click="showLaunchDialog(lastLocation.location)")
span \#{{ currentInstanceLocation.instanceName }} {{ currentInstanceLocation.accessType }}
span.flags(v-if="currentInstanceLocation.region" :class="currentInstanceLocation.region" style="display:inline-block;margin-left:5px")
span.flags(v-else class="us" style="display:inline-block;margin-left:5px")
i.el-icon-lock(v-if="currentInstanceLocation.strict" style="display:inline-block;margin-left:5px")
location-world(:locationobject="currentInstanceLocation" :currentuserid="API.currentUser.id")
span(v-if="lastLocation.playerList.size > 0" style="margin-left:5px")
| {{ lastLocation.playerList.size }}
| #[template(v-if="lastLocation.friendList.size > 0") ({{ lastLocation.friendList.size }})]
@@ -763,8 +759,9 @@ html
template(#content)
location(v-if="scope.row.details" :location="scope.row.details.worldId" :hint="scope.row.details.worldName" :link="false")
span.x-link(v-text="scope.row.type" @click="showWorldDialog(scope.row.details.worldId)")
template(v-else-if="scope.row.type && (scope.row.type.startsWith('group.') || scope.row.type === 'moderation.warning.group')")
span.x-link(v-text="scope.row.type" @click="showGroupDialog(scope.row.link)")
template(v-else-if="scope.row.link")
el-tooltip(placement="top" :content="scope.row.linkText" :disabled="hideTooltips")
span.x-link(v-text="scope.row.type" @click="openNotificationLink(scope.row.link)")
span(v-else v-text="scope.row.type")
el-table-column(label="User" prop="senderUsername" width="150")
template(v-once #default="scope")
@@ -802,11 +799,26 @@ html
el-button(type="text" icon="el-icon-chat-line-square" size="mini" style="margin-left:5px" @click="showSendInviteRequestResponseDialog(scope.row)")
template(v-else-if="scope.row.type === 'group.invite'")
el-tooltip(placement="top" content="Accept" :disabled="hideTooltips")
el-button(type="text" icon="el-icon-check" size="mini" @click="sendNotificationResponse(scope.row.id, scope.row.link, 'accept')")
el-button(type="text" icon="el-icon-check" size="mini" style="margin-left:5px" @click="sendNotificationResponse(scope.row.id, scope.row.responses, 'accept')")
el-tooltip(placement="top" content="Decline" :disabled="hideTooltips")
el-button(type="text" icon="el-icon-close" size="mini" @click="sendNotificationResponse(scope.row.id, scope.row.link, 'decline')")
el-tooltip(placement="top" content="Block Group" :disabled="hideTooltips")
el-button(type="text" icon="el-icon-circle-close" size="mini" @click="sendNotificationResponse(scope.row.id, scope.row.link, 'block')")
el-button(type="text" icon="el-icon-close" size="mini" style="margin-left:5px" @click="sendNotificationResponse(scope.row.id, scope.row.responses, 'decline')")
el-tooltip(placement="top" content="Block invites from group" :disabled="hideTooltips")
el-button(type="text" icon="el-icon-circle-close" size="mini" style="margin-left:5px" @click="sendNotificationResponse(scope.row.id, scope.row.responses, 'block')")
template(v-else-if="scope.row.type === 'group.joinRequest'")
el-tooltip(placement="top" content="Accept" :disabled="hideTooltips")
el-button(type="text" icon="el-icon-check" size="mini" style="margin-left:5px" @click="sendNotificationResponse(scope.row.id, scope.row.responses, 'accept')")
el-tooltip(placement="top" content="Decline" :disabled="hideTooltips")
el-button(type="text" icon="el-icon-close" size="mini" style="margin-left:5px" @click="sendNotificationResponse(scope.row.id, scope.row.responses, 'reject')")
el-tooltip(placement="top" content="Block user from requesting" :disabled="hideTooltips")
el-button(type="text" icon="el-icon-circle-close" size="mini" style="margin-left:5px" @click="sendNotificationResponse(scope.row.id, scope.row.responses, 'block')")
template(v-else-if="scope.row.type === 'group.announcement'")
el-tooltip(placement="top" content="Dismiss" :disabled="hideTooltips")
el-button(type="text" icon="el-icon-check" size="mini" style="margin-left:5px" @click="sendNotificationResponse(scope.row.id, scope.row.responses, 'delete')")
el-tooltip(placement="top" content="Unsubscribe" :disabled="hideTooltips")
el-button(type="text" icon="el-icon-close" size="mini" style="margin-left:5px" @click="sendNotificationResponse(scope.row.id, scope.row.responses, 'unsubscribe')")
template(v-else-if="scope.row.type === 'group.informative'")
el-tooltip(placement="top" content="Dismiss" :disabled="hideTooltips")
el-button(type="text" icon="el-icon-check" size="mini" style="margin-left:5px" @click="sendNotificationResponse(scope.row.id, scope.row.responses, 'delete')")
template(v-if="scope.row.type !== 'requestInviteResponse' && scope.row.type !== 'inviteResponse' && scope.row.type !== 'message' && !scope.row.type.includes('group.') && !scope.row.type.includes('moderation.')")
el-tooltip(placement="top" content="Decline" :disabled="hideTooltips")
el-button(type="text" icon="el-icon-close" size="mini" style="margin-left:5px" @click="hideNotification(scope.row)")
@@ -1721,6 +1733,8 @@ html
.detail
span.name Bio
pre.extra(style="font-family:inherit;font-size:12px;white-space:pre-wrap;margin:0 0.5em 0 0") {{ userDialog.ref.bio || '-' }}
div(v-if="userDialog.id === API.currentUser.id" style="float:right")
el-button(type="text" icon="el-icon-edit" size="mini" @click="showBioDialog" style="margin-left:5px")
div(style="margin-top:5px")
el-tooltip(v-if="link" v-for="(link, index) in userDialog.ref.bioLinks" :key="index")
template(#content)
@@ -1950,12 +1964,7 @@ html
#[i.el-icon-check(style="margin-left:10px")] Capacity {{ worldDialog.ref.capacity | commaNumber }} ({{ worldDialog.ref.capacity * 2 | commaNumber }})
div(v-for="room in worldDialog.rooms" :key="room.id")
div(style="margin:5px 0")
span.x-link(@click="showLaunchDialog(room.$location.tag, room.$location.shortName)")
i.el-icon-unlock(v-if="(room.$location.shortName && worldDialog.$location.shortName === room.$location.shortName) || API.currentUser.id === room.$location.userId" style="display:inline-block;margin-right:5px")
span \#{{ room.$location.instanceName }} {{ room.$location.accessType }}
span.flags(v-if="room.$location.region" :class="room.$location.region" style="display:inline-block;margin-left:5px")
span.flags(v-else class="us" style="display:inline-block;margin-left:5px")
i.el-icon-lock(v-if="room.$location.strict" style="display:inline-block;margin-left:5px")
location-world(:locationobject="room.$location" :currentuserid="API.currentUser.id" :worlddialogshortname="worldDialog.$location.shortName")
el-tooltip(placement="top" content="Invite yourself" :disabled="hideTooltips")
invite-yourself(:location="room.$location.tag" :shortname="room.$location.shortName" style="margin-left:5px")
el-tooltip(placement="top" content="Refresh player count" :disabled="hideTooltips")
@@ -2199,12 +2208,14 @@ html
el-tooltip(v-else placement="top" content="Set Representing" :disabled="hideTooltips")
span
el-button(type="default" icon="el-icon-star-off" circle @click="setGroupRepresentation(groupDialog.id)" style="margin-left:5px" :disabled="groupDialog.ref.privacy === 'private'")
el-tooltip(v-else-if="groupDialog.ref.membershipStatus === 'requested'" placement="top" content="Cancel join request" :disabled="hideTooltips")
span
el-button(type="default" icon="el-icon-close" circle @click="cancelGroupRequest(groupDialog.id)" style="margin-left:5px")
el-tooltip(v-else-if="groupDialog.ref.membershipStatus === 'invited'" placement="top" content="Pending invite" :disabled="hideTooltips")
span
el-button(type="default" icon="el-icon-check" circle @click="joinGroup(groupDialog.id)" style="margin-left:5px")
template(v-else-if="groupDialog.ref.membershipStatus === 'requested'")
el-tooltip(placement="top" content="Cancel join request" :disabled="hideTooltips")
span
el-button(type="default" icon="el-icon-close" circle @click="cancelGroupRequest(groupDialog.id)" style="margin-left:5px")
template(v-else-if="groupDialog.ref.membershipStatus === 'invited'")
el-tooltip(placement="top" content="Pending invite" :disabled="hideTooltips")
span
el-button(type="default" icon="el-icon-check" circle @click="joinGroup(groupDialog.id)" style="margin-left:5px")
template(v-else)
el-tooltip(v-if="groupDialog.ref.joinState === 'request'" placement="top" content="Request to join" :disabled="hideTooltips")
el-button(type="default" icon="el-icon-message" circle @click="joinGroup(groupDialog.id)" style="margin-left:5px")
@@ -3289,11 +3300,7 @@ html
span {{ scope.row.created_at | formatDate('short') }}
el-table-column(label="Instance Name" prop="name")
template(v-once #default="scope")
span.x-link(@click="showLaunchDialog(scope.row.location)")
span \#{{ scope.row.$location.instanceName }} {{ scope.row.$location.accessType }}
span.flags(v-if="scope.row.$location.region" :class="scope.row.$location.region" style="display:inline-block;margin-left:5px")
span.flags(v-else class="us" style="display:inline-block;margin-left:5px")
i.el-icon-lock(v-if="scope.row.$location.strict" style="display:inline-block;margin-left:5px")
location-world(:locationobject="scope.row.$location" :currentuserid="API.currentUser.id")
el-table-column(label="Instance Creator" prop="location")
template(v-once #default="scope")
display-name(:userid="scope.row.$location.userId" :location="scope.row.$location.tag" :key="previousInstancesWorldDialog.forceUpdate")