mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-21 15:53:50 +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);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user