mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 06:46:04 +02:00
Bulk unfriend
This commit is contained in:
+91
-4
@@ -9052,6 +9052,9 @@ speechSynthesis.getVoices();
|
|||||||
};
|
};
|
||||||
|
|
||||||
$app.methods.photonBotCheck = function (dtNow) {
|
$app.methods.photonBotCheck = function (dtNow) {
|
||||||
|
if (this.photonLobbyCurrentUser === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
var photonBots = [];
|
var photonBots = [];
|
||||||
this.photonLobbyCurrent.forEach((ref, id) => {
|
this.photonLobbyCurrent.forEach((ref, id) => {
|
||||||
if (this.photonLobbyJointime.has(id)) {
|
if (this.photonLobbyJointime.has(id)) {
|
||||||
@@ -9337,7 +9340,11 @@ speechSynthesis.getVoices();
|
|||||||
joinTime: Date.parse(gameLogDate),
|
joinTime: Date.parse(gameLogDate),
|
||||||
hasInstantiated,
|
hasInstantiated,
|
||||||
inVRMode: user.inVRMode,
|
inVRMode: user.inVRMode,
|
||||||
avatarEyeHeight: user.avatarEyeHeight
|
avatarEyeHeight: user.avatarEyeHeight,
|
||||||
|
canModerateInstance: user.canModerateInstance,
|
||||||
|
groupOnNameplate: user.groupOnNameplate,
|
||||||
|
showGroupBadgeToOthers: user.showGroupBadgeToOthers,
|
||||||
|
showSocialRank: user.showSocialRank
|
||||||
});
|
});
|
||||||
this.photonUserJoin(id, user.avatarDict, gameLogDate);
|
this.photonUserJoin(id, user.avatarDict, gameLogDate);
|
||||||
}
|
}
|
||||||
@@ -9429,7 +9436,13 @@ speechSynthesis.getVoices();
|
|||||||
joinTime: Date.parse(gameLogDate),
|
joinTime: Date.parse(gameLogDate),
|
||||||
hasInstantiated,
|
hasInstantiated,
|
||||||
inVRMode: data.Parameters[249].inVRMode,
|
inVRMode: data.Parameters[249].inVRMode,
|
||||||
avatarEyeHeight: data.Parameters[249].avatarEyeHeight
|
avatarEyeHeight: data.Parameters[249].avatarEyeHeight,
|
||||||
|
canModerateInstance:
|
||||||
|
data.Parameters[249].canModerateInstance,
|
||||||
|
groupOnNameplate: data.Parameters[249].groupOnNameplate,
|
||||||
|
showGroupBadgeToOthers:
|
||||||
|
data.Parameters[249].showGroupBadgeToOthers,
|
||||||
|
showSocialRank: data.Parameters[249].showSocialRank
|
||||||
});
|
});
|
||||||
this.photonUserJoin(
|
this.photonUserJoin(
|
||||||
data.Parameters[254],
|
data.Parameters[254],
|
||||||
@@ -9900,7 +9913,6 @@ speechSynthesis.getVoices();
|
|||||||
var ref = API.cachedUsers.get(user.id);
|
var ref = API.cachedUsers.get(user.id);
|
||||||
var photonUser = {
|
var photonUser = {
|
||||||
id: user.id,
|
id: user.id,
|
||||||
username: user.username,
|
|
||||||
displayName: user.displayName,
|
displayName: user.displayName,
|
||||||
developerType: user.developerType,
|
developerType: user.developerType,
|
||||||
profilePicOverride: user.profilePicOverride,
|
profilePicOverride: user.profilePicOverride,
|
||||||
@@ -17665,8 +17677,76 @@ speechSynthesis.getVoices();
|
|||||||
$app.data.friendsListSearch = '';
|
$app.data.friendsListSearch = '';
|
||||||
$app.data.friendsListSearchFilterVIP = false;
|
$app.data.friendsListSearchFilterVIP = false;
|
||||||
$app.data.friendsListSearchFilters = [];
|
$app.data.friendsListSearchFilters = [];
|
||||||
|
$app.data.friendsListSelectAllCheckbox = false;
|
||||||
|
$app.data.friendsListBulkUnfriendMode = false;
|
||||||
|
|
||||||
|
$app.methods.showBulkUnfriendSelectionConfirm = function () {
|
||||||
|
var elementsTicked = 0;
|
||||||
|
for (var ctx of this.friendsListTable.data) {
|
||||||
|
if (ctx.$selected) {
|
||||||
|
elementsTicked++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (elementsTicked === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$confirm(
|
||||||
|
`Are you sure you want to delete ${elementsTicked} friends?
|
||||||
|
This can negatively affect your trust rank,
|
||||||
|
This action cannot be undone.`,
|
||||||
|
`Delete ${elementsTicked} friends?`,
|
||||||
|
{
|
||||||
|
confirmButtonText: 'Confirm',
|
||||||
|
cancelButtonText: 'Cancel',
|
||||||
|
type: 'info',
|
||||||
|
callback: (action) => {
|
||||||
|
if (action === 'confirm') {
|
||||||
|
this.bulkUnfriendSelection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
$app.methods.bulkUnfriendSelection = function () {
|
||||||
|
for (var ctx of this.friendsListTable.data) {
|
||||||
|
if (ctx.$selected) {
|
||||||
|
API.deleteFriend({
|
||||||
|
userId: ctx.id
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// $app.methods.showBulkUnfriendAllConfirm = function () {
|
||||||
|
// this.$confirm(
|
||||||
|
// `Are you sure you want to delete all your friends?
|
||||||
|
// This can negatively affect your trust rank,
|
||||||
|
// This action cannot be undone.`,
|
||||||
|
// 'Delete all friends?',
|
||||||
|
// {
|
||||||
|
// confirmButtonText: 'Confirm',
|
||||||
|
// cancelButtonText: 'Cancel',
|
||||||
|
// type: 'info',
|
||||||
|
// callback: (action) => {
|
||||||
|
// if (action === 'confirm') {
|
||||||
|
// this.bulkUnfriendAll();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// );
|
||||||
|
// };
|
||||||
|
|
||||||
|
// $app.methods.bulkUnfriendAll = function () {
|
||||||
|
// for (var ctx of this.friendsListTable.data) {
|
||||||
|
// API.deleteFriend({
|
||||||
|
// userId: ctx.id
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
|
||||||
$app.methods.friendsListSearchChange = function () {
|
$app.methods.friendsListSearchChange = function () {
|
||||||
|
this.friendsListTable.data = [];
|
||||||
var filters = [...this.friendsListSearchFilters];
|
var filters = [...this.friendsListSearchFilters];
|
||||||
if (filters.length === 0) {
|
if (filters.length === 0) {
|
||||||
filters = ['Display Name', 'Rank', 'Status', 'Bio', 'Memo'];
|
filters = ['Display Name', 'Rank', 'Status', 'Bio', 'Memo'];
|
||||||
@@ -17679,6 +17759,9 @@ speechSynthesis.getVoices();
|
|||||||
if (typeof ctx.ref === 'undefined') {
|
if (typeof ctx.ref === 'undefined') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (typeof ctx.$selected === 'undefined') {
|
||||||
|
ctx.$selected = false;
|
||||||
|
}
|
||||||
if (this.friendsListSearchFilterVIP && !ctx.isVIP) {
|
if (this.friendsListSearchFilterVIP && !ctx.isVIP) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -20228,7 +20311,11 @@ speechSynthesis.getVoices();
|
|||||||
joinTime: Date.parse(dateTime),
|
joinTime: Date.parse(dateTime),
|
||||||
hasInstantiated,
|
hasInstantiated,
|
||||||
inVRMode: user.inVRMode,
|
inVRMode: user.inVRMode,
|
||||||
avatarEyeHeight: user.avatarEyeHeight
|
avatarEyeHeight: user.avatarEyeHeight,
|
||||||
|
canModerateInstance: user.canModerateInstance,
|
||||||
|
groupOnNameplate: user.groupOnNameplate,
|
||||||
|
showGroupBadgeToOthers: user.showGroupBadgeToOthers,
|
||||||
|
showSocialRank: user.showSocialRank
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-2
@@ -133,8 +133,8 @@ html
|
|||||||
span.name Created
|
span.name Created
|
||||||
span.extra {{ currentInstanceWorld.ref.created_at | formatDate('long') }}
|
span.extra {{ currentInstanceWorld.ref.created_at | formatDate('long') }}
|
||||||
div.photon-event-table(v-if="photonLoggingEnabled")
|
div.photon-event-table(v-if="photonLoggingEnabled")
|
||||||
div(style="position:absolute;margin-left:195px;z-index:1")
|
div(style="position:absolute;width:600px;margin-left:195px;z-index:1")
|
||||||
el-select(v-model="photonEventTableTypeFilter" @change="photonEventTableFilterChange" multiple clearable collapse-tags style="flex:1;width:150px" placeholder="Filter")
|
el-select(v-model="photonEventTableTypeFilter" @change="photonEventTableFilterChange" multiple clearable collapse-tags style="flex:1;width:220px" placeholder="Filter")
|
||||||
el-option(v-once v-for="type in photonEventTableTypeFilterList" :key="type" :label="type" :value="type")
|
el-option(v-once v-for="type in photonEventTableTypeFilterList" :key="type" :label="type" :value="type")
|
||||||
el-input(v-model="photonEventTableFilter" @input="photonEventTableFilterChange" placeholder="Search" clearable style="width:150px;margin-left:10px")
|
el-input(v-model="photonEventTableFilter" @input="photonEventTableFilterChange" placeholder="Search" clearable style="width:150px;margin-left:10px")
|
||||||
el-button(@click="showChatboxBlacklistDialog" style="margin-left:10px") Chatbox Blacklist
|
el-button(@click="showChatboxBlacklistDialog" style="margin-left:10px") Chatbox Blacklist
|
||||||
@@ -951,6 +951,12 @@ html
|
|||||||
div.options-container(style="margin-top:0")
|
div.options-container(style="margin-top:0")
|
||||||
span.header Friends List
|
span.header Friends List
|
||||||
div(style="float:right;font-size:13px")
|
div(style="float:right;font-size:13px")
|
||||||
|
div(v-if="friendsListBulkUnfriendMode" style="display:inline-block;margin-right:10px")
|
||||||
|
el-button(size="small" @click="showBulkUnfriendSelectionConfirm") Bulk Unfriend Selection
|
||||||
|
//- el-button(size="small" @click="showBulkUnfriendAllConfirm" style="margin-right:5px") Bulk Unfriend All
|
||||||
|
div(style="display:inline-block;margin-right:10px")
|
||||||
|
span.name Bulk Unfriend Mode
|
||||||
|
el-switch(v-model="friendsListBulkUnfriendMode" style="margin-left:5px")
|
||||||
span Load missing entries
|
span Load missing entries
|
||||||
el-tooltip(placement="top" style="margin-left:5px" content="This takes a lot of API requests so use it sparingly")
|
el-tooltip(placement="top" style="margin-left:5px" content="This takes a lot of API requests so use it sparingly")
|
||||||
i.el-icon-warning
|
i.el-icon-warning
|
||||||
@@ -973,6 +979,10 @@ html
|
|||||||
el-tooltip(placement="top" content="Clear results" :disabled="hideTooltips")
|
el-tooltip(placement="top" content="Clear results" :disabled="hideTooltips")
|
||||||
el-button(type="default" @click="friendsListTable.data = []" icon="el-icon-delete" circle style="flex:none;margin-left:5px")
|
el-button(type="default" @click="friendsListTable.data = []" icon="el-icon-delete" circle style="flex:none;margin-left:5px")
|
||||||
data-tables(v-bind="friendsListTable" @row-click="selectFriendsListRow" style="margin-top:10px;cursor:pointer")
|
data-tables(v-bind="friendsListTable" @row-click="selectFriendsListRow" style="margin-top:10px;cursor:pointer")
|
||||||
|
el-table-column(v-if="friendsListBulkUnfriendMode" width="55" prop="$selected")
|
||||||
|
template(v-once #default="scope")
|
||||||
|
el-button(type="text" size="mini" @click.stop)
|
||||||
|
el-checkbox(v-model="scope.row.$selected")
|
||||||
el-table-column(label="No." width="70" prop="$friendNum" sortable="custom")
|
el-table-column(label="No." width="70" prop="$friendNum" sortable="custom")
|
||||||
el-table-column(label="Avatar" width="70" prop="photo")
|
el-table-column(label="Avatar" width="70" prop="photo")
|
||||||
template(v-once #default="scope")
|
template(v-once #default="scope")
|
||||||
|
|||||||
Reference in New Issue
Block a user