Small fixes

This commit is contained in:
Natsumi
2022-12-19 01:52:48 +13:00
parent dc77363c3f
commit 3079efa7fd
4 changed files with 39 additions and 39 deletions

View File

@@ -813,7 +813,7 @@ speechSynthesis.getVoices();
"<span><span @click=\"showWorldDialog\" :class=\"{ 'x-link': link && this.location !== 'private' && this.location !== 'offline'}\">" +
'<i v-if="isTraveling" class="el-icon el-icon-loading" style="display:inline-block;margin-right:5px"></i>' +
'<span style="margin-right:5px">{{ text }}</span></span>' +
'<span v-if="groupName" @click="showGroupDialog" class="x-link" style="margin-right:5px">{{ groupName }}</span>' +
'<span v-if="groupName" @click="showGroupDialog" class="x-link" style="margin-right:5px">({{ groupName }})</span>' +
'<span class="flags" :class="region" style="display:inline-block"></span>' +
'<i v-if="strict" class="el-icon el-icon-lock" style="display:inline-block;margin-left:5px"></i></span>',
props: {
@@ -946,7 +946,7 @@ speechSynthesis.getVoices();
'<span><span @click="showLaunchDialog" class="x-link">' +
'<i v-if="isUnlocked" class="el-icon el-icon-unlock" style="display:inline-block;margin-right:5px"></i>' +
'<span style="margin-right:5px"> #{{ instanceName }} {{ accessType }}</span></span>' +
'<span v-if="groupName" @click="showGroupDialog" class="x-link" style="margin-right:5px">{{ groupName }}</span>' +
'<span v-if="groupName" @click="showGroupDialog" class="x-link" style="margin-right:5px">({{ groupName }})</span>' +
'<span class="flags" :class="region" style="display:inline-block"></span>' +
'<i v-if="strict" class="el-icon el-icon-lock" style="display:inline-block;margin-left:5px"></i></span>',
props: {
@@ -1229,6 +1229,7 @@ speechSynthesis.getVoices();
API.logout = function () {
this.$emit('LOGOUT');
webApiService.clearCookies();
// return this.call('logout', {
// method: 'PUT'
// }).finally(() => {
@@ -5523,7 +5524,9 @@ speechSynthesis.getVoices();
playOverlayNotification = true;
}
var message = '';
if (noty.message) {
if (noty.title) {
message = `${noty.title}, ${noty.message}`;
} else if (noty.message) {
message = noty.message;
}
var messageList = [
@@ -11989,6 +11992,10 @@ speechSynthesis.getVoices();
this.updateSharedFeed(true);
API.getUser({
userId: id
}).then(() => {
if (this.userDialog.visible && id === this.userDialog.id) {
this.applyUserDialogLocation(true);
}
});
}
});
@@ -13493,7 +13500,7 @@ speechSynthesis.getVoices();
$app.methods.promptOmniDirectDialog = function () {
this.$prompt(
'Enter a User/World/Instance/Avatar URL or ID (UUID)',
'Enter a User/World/Instance/Avatar/Group URL or ID (UUID)',
'Direct Access',
{
distinguishCancelAndClose: true,
@@ -22850,9 +22857,11 @@ speechSynthesis.getVoices();
}
*/
API.getGroup = function (params) {
// includeRoles=true
return this.call(`groups/${params.groupId}`, {
method: 'GET'
method: 'GET',
params: {
includeRoles: params.includeRoles || false
}
}).then((json) => {
var args = {
json,
@@ -23263,8 +23272,7 @@ speechSynthesis.getVoices();
API.getGroupInstances = function (params) {
return this.call(`groups/${params.groupId}/instances`, {
method: 'GET',
params
method: 'GET'
}).then((json) => {
var args = {
json,
@@ -23376,6 +23384,8 @@ speechSynthesis.getVoices();
_updated_at: ''
},
updatedAt: '',
// includeRoles: true
roles: [],
// group list
$memberId: '',
groupId: '',
@@ -23440,7 +23450,6 @@ speechSynthesis.getVoices();
announcement: {},
members: [],
instances: [],
roles: [],
memberRoles: []
};
@@ -23459,7 +23468,6 @@ speechSynthesis.getVoices();
D.treeData = [];
D.announcement = {};
D.instances = [];
D.roles = [];
D.memberRoles = [];
if (this.groupDialogLastMembers !== groupId) {
D.members = [];
@@ -23495,7 +23503,7 @@ speechSynthesis.getVoices();
$app.methods.getGroupDialogGroup = function (groupId) {
var D = this.groupDialog;
return API.getGroup({groupId})
return API.getGroup({groupId, includeRoles: true})
.catch((err) => {
throw err;
})
@@ -23503,6 +23511,16 @@ speechSynthesis.getVoices();
if (D.id === args1.ref.id) {
D.ref = args1.ref;
D.inGroup = args1.ref.membershipStatus === 'member';
for (var role of args1.ref.roles) {
if (
D.ref &&
D.ref.myMember &&
Array.isArray(D.ref.myMember.roleIds) &&
D.ref.myMember.roleIds.includes(role.id)
) {
D.memberRoles.push(role);
}
}
if (D.inGroup) {
API.getGroupAnnouncement({
groupId
@@ -23537,23 +23555,6 @@ speechSynthesis.getVoices();
this.applyGroupDialogInstances(args3.json);
}
});
API.getGroupRoles({
groupId
}).then((args4) => {
if (groupId === args4.params.groupId) {
D.roles = args4.json;
for (var role of args4.json) {
if (
D.ref &&
D.ref.myMember &&
Array.isArray(D.ref.myMember.roleIds) &&
D.ref.myMember.roleIds.includes(role.id)
) {
D.memberRoles.push(role);
}
}
}
});
}
if (this.$refs.groupDialogTabs.currentName === '0') {
this.groupDialogLastActiveTab = 'Info';
@@ -23626,7 +23627,6 @@ speechSynthesis.getVoices();
D.treeData = buildTreeData({
group: D.ref,
announcement: D.announcement,
roles: D.roles,
instances: D.instances,
members: D.members
});

View File

@@ -173,8 +173,8 @@ html
span(v-else-if="scope.row.status === 'ask me'") Ask Me
span(v-else-if="scope.row.status === 'busy'") Do Not Disturb
span(v-else) Offline
i.x-user-status(:class="statusClass(scope.row.status)")
span(v-if="scope.row.statusDescription !== scope.row.previousStatusDescription" v-text="scope.row.statusDescription" style="margin-left:5px")
i.x-user-status(:class="statusClass(scope.row.status)" style="margin-right:5px")
span(v-if="scope.row.statusDescription !== scope.row.previousStatusDescription" v-text="scope.row.statusDescription")
span.x-link(v-else-if="scope.row.type === 'PortalSpawn'" @click="showWorldDialog(scope.row.location, scope.row.shortName)")
location(:location="scope.row.location" :hint="scope.row.worldName" :grouphint="scope.row.groupName" :link="false")
span(v-else-if="scope.row.type === 'ChatBoxMessage'" v-text="scope.row.text")
@@ -708,8 +708,7 @@ html
el-table-column(label="Type" prop="type" width="150")
el-table-column(label="User" prop="displayName")
template(v-once #default="scope")
span(v-if="scope.row.type === 'DisplayName'") {{ scope.row.previousDisplayName }} #[i.el-icon-right]
| &nbsp;
span(v-if="scope.row.type === 'DisplayName'") {{ scope.row.previousDisplayName }} #[i.el-icon-right]
span.x-link(v-text="scope.row.displayName || scope.row.userId" @click="showUserDialog(scope.row.userId)")
template(v-if="scope.row.type === 'TrustLevel'")
span ({{ scope.row.previousTrustLevel }} #[i.el-icon-right] {{ scope.row.trustLevel }})
@@ -785,7 +784,8 @@ html
img.x-link(v-lazy="scope.row.imageUrl" style="width:500px" @click="downloadAndSaveImage(scope.row.imageUrl)")
el-table-column(label="Message" prop="message")
template(v-once #default="scope")
span(v-if="scope.row.message" v-text="scope.row.message")
span(v-if="scope.row.title") {{ scope.row.title }}, {{ scope.row.message }}
span(v-else-if="scope.row.message" v-text="scope.row.message")
span(v-else-if='scope.row.details && scope.row.details.inviteMessage' v-text="scope.row.details.inviteMessage")
span(v-else-if='scope.row.details && scope.row.details.requestMessage' v-text="scope.row.details.requestMessage")
span(v-else-if='scope.row.details && scope.row.details.responseMessage' v-text="scope.row.details.responseMessage")
@@ -2244,7 +2244,7 @@ html
el-dropdown-item(icon="el-icon-refresh" command="Refresh") Refresh
template(v-if="groupDialog.inGroup")
template(v-if="groupDialog.ref.myMember")
el-dropdown-item(v-if="groupDialog.ref.myMember.isSubscribedToAnnouncements" icon="el-icon-close" command="Unsubscribe To Announcements" divided) Unsubscribe To Announcements
el-dropdown-item(v-if="groupDialog.ref.myMember.isSubscribedToAnnouncements" icon="el-icon-close" command="Unsubscribe To Announcements" divided) Unsubscribe From Announcements
el-dropdown-item(v-else icon="el-icon-check" command="Subscribe To Announcements" divided) Subscribe To Announcements
el-dropdown-item(v-if="hasGroupPermission(groupDialog.ref, 'group-invites-manage')" icon="el-icon-message" command="Invite To Group") Invite To Group
template(v-if="groupDialog.ref.myMember && groupDialog.ref.privacy === 'default'")

View File

@@ -80,7 +80,7 @@ Vue.component('marquee-text', MarqueeText);
Vue.component('location', {
template:
'<span><span style="margin-right:5px">{{ text }}</span>' +
'<span v-if="groupName" style="margin-right:5px">{{ groupName }}</span>' +
'<span v-if="groupName" style="margin-right:5px">({{ groupName }})</span>' +
'<span class="flags" :class="region" style="display:inline-block;margin-bottom:2px"></span>' +
'<i v-if="strict" class="el-icon el-icon-lock" style="display:inline-block;margin-left:5px"></i></span>',
props: {