mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-17 05:43:51 +02:00
Hold shift to delete without prompt
This commit is contained in:
143
html/src/app.js
143
html/src/app.js
@@ -128,7 +128,8 @@ speechSynthesis.getVoices();
|
||||
isSteamVRRunning: false,
|
||||
isHmdAfk: false,
|
||||
appVersion: '',
|
||||
latestAppVersion: ''
|
||||
latestAppVersion: '',
|
||||
shiftHeld: false
|
||||
},
|
||||
i18n,
|
||||
computed: {},
|
||||
@@ -234,6 +235,12 @@ speechSynthesis.getVoices();
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
document.addEventListener('keydown', function (e) {
|
||||
if (e.shiftKey) {
|
||||
$app.shiftHeld = true;
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener('keyup', function (e) {
|
||||
if (e.ctrlKey) {
|
||||
if (e.key === 'I') {
|
||||
@@ -252,6 +259,10 @@ speechSynthesis.getVoices();
|
||||
) {
|
||||
$app.screenshotMetadataCarouselChange(carouselNavigation);
|
||||
}
|
||||
|
||||
if (!e.shiftKey) {
|
||||
$app.shiftHeld = false;
|
||||
}
|
||||
});
|
||||
|
||||
addEventListener('wheel', (event) => {
|
||||
@@ -7187,15 +7198,18 @@ speechSynthesis.getVoices();
|
||||
};
|
||||
|
||||
$app.methods.deleteFriendLog = function (row) {
|
||||
// FIXME: 메시지 수정
|
||||
$app.removeFromArray(this.friendLogTable.data, row);
|
||||
database.deleteFriendLogHistory(row.rowId);
|
||||
};
|
||||
|
||||
$app.methods.deleteFriendLogPrompt = function (row) {
|
||||
this.$confirm('Continue? Delete Log', 'Confirm', {
|
||||
confirmButtonText: 'Confirm',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'info',
|
||||
callback: (action) => {
|
||||
if (action === 'confirm') {
|
||||
$app.removeFromArray(this.friendLogTable.data, row);
|
||||
database.deleteFriendLogHistory(row.rowId);
|
||||
this.deleteFriendLog(row);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -7265,17 +7279,20 @@ speechSynthesis.getVoices();
|
||||
});
|
||||
|
||||
$app.methods.deletePlayerModeration = function (row) {
|
||||
// FIXME: 메시지 수정
|
||||
this.$confirm('Continue? Delete Moderation', 'Confirm', {
|
||||
API.deletePlayerModeration({
|
||||
moderated: row.targetUserId,
|
||||
type: row.type
|
||||
});
|
||||
};
|
||||
|
||||
$app.methods.deletePlayerModerationPrompt = function (row) {
|
||||
this.$confirm(`Continue? Delete Moderation ${row.type}`, 'Confirm', {
|
||||
confirmButtonText: 'Confirm',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'info',
|
||||
callback: (action) => {
|
||||
if (action === 'confirm') {
|
||||
API.deletePlayerModeration({
|
||||
moderated: row.targetUserId,
|
||||
type: row.type
|
||||
});
|
||||
this.deletePlayerModeration(row);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -7433,43 +7450,51 @@ speechSynthesis.getVoices();
|
||||
};
|
||||
|
||||
$app.methods.hideNotification = function (row) {
|
||||
if (row.type === 'ignoredFriendRequest') {
|
||||
API.deleteHiddenFriendRequest(
|
||||
{
|
||||
notificationId: row.id
|
||||
},
|
||||
row.senderUserId
|
||||
);
|
||||
} else {
|
||||
API.hideNotification({
|
||||
notificationId: row.id
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$app.methods.hideNotificationPrompt = function (row) {
|
||||
this.$confirm(`Continue? Decline ${row.type}`, 'Confirm', {
|
||||
confirmButtonText: 'Confirm',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'info',
|
||||
callback: (action) => {
|
||||
if (action === 'confirm') {
|
||||
if (row.type === 'ignoredFriendRequest') {
|
||||
API.deleteHiddenFriendRequest(
|
||||
{
|
||||
notificationId: row.id
|
||||
},
|
||||
row.senderUserId
|
||||
);
|
||||
} else {
|
||||
API.hideNotification({
|
||||
notificationId: row.id
|
||||
});
|
||||
}
|
||||
this.hideNotification(row);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$app.methods.deleteNotificationLog = function (row) {
|
||||
$app.removeFromArray(this.notificationTable.data, row);
|
||||
if (
|
||||
row.type !== 'friendRequest' &&
|
||||
row.type !== 'ignoredFriendRequest'
|
||||
) {
|
||||
database.deleteNotification(row.id);
|
||||
}
|
||||
};
|
||||
|
||||
$app.methods.deleteNotificationLogPrompt = function (row) {
|
||||
this.$confirm(`Continue? Delete ${row.type}`, 'Confirm', {
|
||||
confirmButtonText: 'Confirm',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'info',
|
||||
callback: (action) => {
|
||||
if (action === 'confirm') {
|
||||
$app.removeFromArray(this.notificationTable.data, row);
|
||||
if (
|
||||
row.type !== 'friendRequest' &&
|
||||
row.type !== 'ignoredFriendRequest'
|
||||
) {
|
||||
database.deleteNotification(row.id);
|
||||
}
|
||||
this.deleteNotificationLog(row);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -18416,27 +18441,30 @@ speechSynthesis.getVoices();
|
||||
return displayName;
|
||||
};
|
||||
|
||||
$app.methods.confirmDeleteGameLogUserInstance = function (row) {
|
||||
this.$confirm('Continue? Delete', 'Confirm', {
|
||||
confirmButtonText: 'Confirm',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'info',
|
||||
callback: (action) => {
|
||||
if (action === 'confirm') {
|
||||
database.deleteGameLogInstance({
|
||||
id: this.previousInstancesUserDialog.userRef.id,
|
||||
displayName:
|
||||
this.previousInstancesUserDialog.userRef
|
||||
.displayName,
|
||||
location: row.location
|
||||
});
|
||||
$app.removeFromArray(
|
||||
this.previousInstancesUserDialogTable.data,
|
||||
row
|
||||
);
|
||||
$app.methods.deleteGameLogUserInstance = function (row) {
|
||||
database.deleteGameLogInstance({
|
||||
id: this.previousInstancesUserDialog.userRef.id,
|
||||
displayName: this.previousInstancesUserDialog.userRef.displayName,
|
||||
location: row.location
|
||||
});
|
||||
$app.removeFromArray(this.previousInstancesUserDialogTable.data, row);
|
||||
};
|
||||
|
||||
$app.methods.deleteGameLogUserInstancePrompt = function (row) {
|
||||
this.$confirm(
|
||||
'Continue? Delete User From GameLog Instance',
|
||||
'Confirm',
|
||||
{
|
||||
confirmButtonText: 'Confirm',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'info',
|
||||
callback: (action) => {
|
||||
if (action === 'confirm') {
|
||||
this.deleteGameLogUserInstance(row);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
);
|
||||
};
|
||||
|
||||
// #endregion
|
||||
@@ -18504,20 +18532,21 @@ speechSynthesis.getVoices();
|
||||
});
|
||||
};
|
||||
|
||||
$app.methods.confirmDeleteGameLogWorldInstance = function (row) {
|
||||
this.$confirm('Continue? Delete', 'Confirm', {
|
||||
$app.methods.deleteGameLogWorldInstance = function (row) {
|
||||
database.deleteGameLogInstanceByInstanceId({
|
||||
location: row.location
|
||||
});
|
||||
$app.removeFromArray(this.previousInstancesWorldDialogTable.data, row);
|
||||
};
|
||||
|
||||
$app.methods.deleteGameLogWorldInstancePrompt = function (row) {
|
||||
this.$confirm('Continue? Delete GameLog Instance', 'Confirm', {
|
||||
confirmButtonText: 'Confirm',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'info',
|
||||
callback: (action) => {
|
||||
if (action === 'confirm') {
|
||||
database.deleteGameLogInstanceByInstanceId({
|
||||
location: row.location
|
||||
});
|
||||
$app.removeFromArray(
|
||||
this.previousInstancesWorldDialogTable.data,
|
||||
row
|
||||
);
|
||||
this.deleteGameLogWorldInstance(row);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
"minimized": "Start minimized",
|
||||
"tray": "Minimize to tray when closing",
|
||||
"disable_gpu_acceleration": "Disable GPU Acceleration",
|
||||
"disable_gpu_acceleration_tooltip": "Only change this option if you know what you're doing, may fix issues with UI, requires restarting VRCX",
|
||||
"disable_gpu_acceleration_tooltip": "Only change this option if you know what you're doing, breaks SteamVR overlay, may fix issues with UI, requires restarting VRCX",
|
||||
"proxy": "Proxy settings"
|
||||
},
|
||||
"favorites": {
|
||||
|
||||
@@ -20,7 +20,8 @@ mixin previousInstances()
|
||||
template(v-once #default="scope")
|
||||
el-button(type="text" icon="el-icon-info" size="mini" @click="showLaunchDialog(scope.row.location)")
|
||||
el-button(type="text" icon="el-icon-tickets" size="mini" @click="showPreviousInstanceInfoDialog(scope.row.location)")
|
||||
el-button(type="text" icon="el-icon-close" size="mini" @click="confirmDeleteGameLogUserInstance(scope.row)")
|
||||
el-button(v-if="shiftHeld" style="color:#f56c6c" type="text" icon="el-icon-close" size="mini" @click="deleteGameLogUserInstance(scope.row)")
|
||||
el-button(v-else type="text" icon="el-icon-close" size="mini" @click="deleteGameLogUserInstancePrompt(scope.row)")
|
||||
|
||||
//- dialog Table: Previous Instances World
|
||||
el-dialog.x-dialog(:before-close="beforeDialogClose" @mousedown.native="dialogMouseDown" @mouseup.native="dialogMouseUp" ref="previousInstancesWorldDialog" :visible.sync="previousInstancesWorldDialog.visible" :title="$t('dialog.previous_instances.header')" width="1000px")
|
||||
@@ -42,7 +43,8 @@ mixin previousInstances()
|
||||
el-table-column(:label="$t('table.previous_instances.action')" width="90" align="right")
|
||||
template(v-once #default="scope")
|
||||
el-button(type="text" icon="el-icon-tickets" size="mini" @click="showPreviousInstanceInfoDialog(scope.row.location)")
|
||||
el-button(type="text" icon="el-icon-close" size="mini" @click="confirmDeleteGameLogWorldInstance(scope.row)")
|
||||
el-button(v-if="shiftHeld" style="color:#f56c6c" type="text" icon="el-icon-close" size="mini" @click="deleteGameLogWorldInstance(scope.row)")
|
||||
el-button(v-else type="text" icon="el-icon-close" size="mini" @click="deleteGameLogWorldInstancePrompt(scope.row)")
|
||||
|
||||
//- dialog Table: Previous Instance Info
|
||||
el-dialog.x-dialog(:before-close="beforeDialogClose" @mousedown.native="dialogMouseDown" @mouseup.native="dialogMouseUp" ref="previousInstanceInfoDialog" :visible.sync="previousInstanceInfoDialog.visible" :title="$t('dialog.previous_instances.info')" width="800px")
|
||||
|
||||
@@ -18,4 +18,5 @@ mixin friendLogTab()
|
||||
span ({{ scope.row.previousTrustLevel }} #[i.el-icon-right] {{ scope.row.trustLevel }})
|
||||
el-table-column(:label="$t('table.friendLog.action')" width="80" align="right")
|
||||
template(v-once #default="scope")
|
||||
el-button(type="text" icon="el-icon-delete" size="mini" @click="deleteFriendLog(scope.row)")
|
||||
el-button(v-if="shiftHeld" style="color:#f56c6c" type="text" icon="el-icon-close" size="mini" @click="deleteFriendLog(scope.row)")
|
||||
el-button(v-else type="text" icon="el-icon-delete" size="mini" @click="deleteFriendLogPrompt(scope.row)")
|
||||
|
||||
@@ -47,6 +47,8 @@ mixin gameLogTab()
|
||||
span.x-link(v-else v-text="scope.row.data")
|
||||
el-table-column(:label="$t('table.gameLog.action')" width="80" align="right")
|
||||
template(v-once #default="scope")
|
||||
el-button(v-if="scope.row.type !== 'OnPlayerJoined' && scope.row.type !== 'OnPlayerLeft' && scope.row.type !== 'Location' && scope.row.type !== 'PortalSpawn'" type="text" icon="el-icon-delete" size="mini" @click="deleteGameLogEntryPrompt(scope.row)")
|
||||
template(v-if="scope.row.type !== 'OnPlayerJoined' && scope.row.type !== 'OnPlayerLeft' && scope.row.type !== 'Location' && scope.row.type !== 'PortalSpawn'")
|
||||
el-button(v-if="shiftHeld" style="color:#f56c6c" type="text" icon="el-icon-close" size="mini" @click="deleteGameLogEntry(scope.row)")
|
||||
el-button(v-else type="text" icon="el-icon-delete" size="mini" @click="deleteGameLogEntryPrompt(scope.row)")
|
||||
el-tooltip(placement="top" content="Open Instance Info" :disabled="hideTooltips")
|
||||
el-button(v-if="scope.row.type === 'Location'" type="text" icon="el-icon-tickets" size="mini" @click="showPreviousInstanceInfoDialog(scope.row.location)")
|
||||
|
||||
@@ -23,4 +23,6 @@ mixin moderationTab()
|
||||
span.x-link(v-text="scope.row.targetDisplayName" @click="showUserDialog(scope.row.targetUserId)")
|
||||
el-table-column(:label="$t('table.moderation.action')" width="80" align="right")
|
||||
template(v-once #default="scope")
|
||||
el-button(v-if="scope.row.sourceUserId === API.currentUser.id" type="text" icon="el-icon-close" size="mini" @click="deletePlayerModeration(scope.row)")
|
||||
template(v-if="scope.row.sourceUserId === API.currentUser.id")
|
||||
el-button(v-if="shiftHeld" style="color:#f56c6c" type="text" icon="el-icon-close" size="mini" @click="deletePlayerModeration(scope.row)")
|
||||
el-button(v-else type="text" icon="el-icon-close" size="mini" @click="deletePlayerModerationPrompt(scope.row)")
|
||||
|
||||
@@ -84,10 +84,13 @@ mixin notificationsTab()
|
||||
el-button(v-else type="text" icon="el-icon-collection-tag" size="mini" style="margin-left:5px" @click="sendNotificationResponse(scope.row.id, scope.row.responses, response.type)")
|
||||
template(v-if="scope.row.type !== 'requestInviteResponse' && scope.row.type !== 'inviteResponse' && scope.row.type !== 'message' && scope.row.type !== 'boop' && scope.row.type !== 'groupChange' && !scope.row.type.includes('group.') && !scope.row.type.includes('moderation.') && !scope.row.type.includes('instance.')")
|
||||
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)")
|
||||
el-button(v-if="shiftHeld" style="color:#f56c6c;margin-left:5px" type="text" icon="el-icon-close" size="mini" @click="hideNotification(scope.row)")
|
||||
el-button(v-else type="text" icon="el-icon-close" size="mini" style="margin-left:5px" @click="hideNotificationPrompt(scope.row)")
|
||||
template(v-if="scope.row.type === 'group.queueReady'")
|
||||
el-tooltip(placement="top" content="Delete log" :disabled="hideTooltips")
|
||||
el-button(type="text" icon="el-icon-delete" size="mini" style="margin-left:5px" @click="deleteNotificationLog(scope.row)")
|
||||
el-button(v-if="shiftHeld" style="color:#f56c6c;margin-left:5px" type="text" icon="el-icon-close" size="mini" @click="deleteNotificationLog(scope.row)")
|
||||
el-button(v-else type="text" icon="el-icon-delete" size="mini" style="margin-left:5px" @click="deleteNotificationLogPrompt(scope.row)")
|
||||
template(v-if="scope.row.type !== 'friendRequest' && scope.row.type !== 'ignoredFriendRequest' && !scope.row.type.includes('group.') && !scope.row.type.includes('moderation.')")
|
||||
el-tooltip(placement="top" content="Delete log" :disabled="hideTooltips")
|
||||
el-button(type="text" icon="el-icon-delete" size="mini" style="margin-left:5px" @click="deleteNotificationLog(scope.row)")
|
||||
el-button(v-if="shiftHeld" style="color:#f56c6c;margin-left:5px" type="text" icon="el-icon-close" size="mini" @click="deleteNotificationLog(scope.row)")
|
||||
el-button(v-else type="text" icon="el-icon-delete" size="mini" style="margin-left:5px" @click="deleteNotificationLogPrompt(scope.row)")
|
||||
|
||||
Reference in New Issue
Block a user