mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-17 13:53:52 +02:00
Fixes, option to delete gameLog entries
This commit is contained in:
@@ -1720,7 +1720,7 @@ speechSynthesis.getVoices();
|
||||
}
|
||||
}
|
||||
if ($app.customUserTags.has(json.id)) {
|
||||
var tag = this.customUserTags.get(json.id);
|
||||
var tag = $app.customUserTags.get(json.id);
|
||||
ref.$customTag = tag.tag;
|
||||
ref.$customTagColour = tag.colour;
|
||||
}
|
||||
@@ -9210,6 +9210,25 @@ speechSynthesis.getVoices();
|
||||
this.addGameLogEntry(gameLog, this.lastLocation.location);
|
||||
};
|
||||
|
||||
$app.methods.deleteGameLogEntry = function (row) {
|
||||
this.$confirm('Continue? Delete Log', 'Confirm', {
|
||||
confirmButtonText: 'Confirm',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'info',
|
||||
callback: (action) => {
|
||||
if (action === 'confirm') {
|
||||
removeFromArray(this.gameLogTable.data, row);
|
||||
database.deleteGameLogEntry(row);
|
||||
console.log(row);
|
||||
database.getGamelogDatabase().then((data) => {
|
||||
this.gameLogSessionTable = data;
|
||||
this.updateSharedFeed(true);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$app.data.lastLocationDestination = '';
|
||||
$app.data.lastLocationDestinationTime = 0;
|
||||
$app.data.lastVideoUrl = '';
|
||||
@@ -17546,6 +17565,20 @@ speechSynthesis.getVoices();
|
||||
)
|
||||
};
|
||||
|
||||
API.$on('LOGIN', function () {
|
||||
var D = $app.launchOptionsDialog;
|
||||
if (
|
||||
D.vrcLaunchPathOverride === null ||
|
||||
D.vrcLaunchPathOverride === 'null'
|
||||
) {
|
||||
D.vrcLaunchPathOverride = '';
|
||||
configRepository.setString(
|
||||
'vrcLaunchPathOverride',
|
||||
D.vrcLaunchPathOverride
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
API.$on('LOGOUT', function () {
|
||||
$app.launchOptionsDialog.visible = false;
|
||||
});
|
||||
@@ -20764,15 +20797,19 @@ speechSynthesis.getVoices();
|
||||
}
|
||||
var lastLocation = this.lastLocation.location;
|
||||
AppApi.VrcClosedGracefully().then((result) => {
|
||||
console.log(result, lastLocation);
|
||||
if (result || !this.isRealInstance(lastLocation)) {
|
||||
return;
|
||||
}
|
||||
AppApi.FocusWindow();
|
||||
var message = 'VRChat crashed, attempting to rejoin last instance';
|
||||
this.$message({
|
||||
message,
|
||||
type: 'info'
|
||||
});
|
||||
var entry = {
|
||||
created_at: new Date().toJSON(),
|
||||
type: 'Event',
|
||||
data: 'VRChat crashed, attempting to rejoin last instance'
|
||||
data: message
|
||||
};
|
||||
database.addGamelogEventToDatabase(entry);
|
||||
this.queueGameLogNoty(entry);
|
||||
|
||||
@@ -46,8 +46,8 @@ html
|
||||
el-button(native-type="submit" type="primary" :loading="loginForm.loading" style="width:100%") {{ $t("view.login.login") }}
|
||||
el-button(type="primary" @click="openExternalLink('https://vrchat.com/register')" :loading="loginForm.loading" style="width:100%") {{ $t("view.login.register") }}
|
||||
div(style="text-align:center;font-size:12px")
|
||||
p #[a(@click="openExternalLink('https://vrchat.com/home/password')") {{ $t("view.login.forgotPassword") }}]
|
||||
p © 2019-2022 #[a(@click="openExternalLink('https://github.com/pypy-vrc')") pypy] (mina#5656) & #[a(@click="openExternalLink('https://github.com/Natsumi-sama')") Natsumi]
|
||||
p #[a.x-link(@click="openExternalLink('https://vrchat.com/home/password')") {{ $t("view.login.forgotPassword") }}]
|
||||
p © 2019-2022 #[a.x-link(@click="openExternalLink('https://github.com/pypy-vrc')") pypy] (mina#5656) & #[a.x-link(@click="openExternalLink('https://github.com/Natsumi-sama')") Natsumi]
|
||||
p {{ $t("view.settings.general.legal_notice.info") }}
|
||||
p {{ $t("view.settings.general.legal_notice.disclaimer1") }}
|
||||
p {{ $t("view.settings.general.legal_notice.disclaimer2") }}
|
||||
@@ -492,6 +492,9 @@ html
|
||||
span.x-link(@click="openExternalLink(scope.row.resourceUrl)" v-text="scope.row.resourceUrl")
|
||||
template(v-else-if="scope.row.type === 'Notification' || scope.row.type === 'OnPlayerJoined' || scope.row.type === 'OnPlayerLeft'")
|
||||
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-close" size="mini" @click="deleteGameLogEntry(scope.row)")
|
||||
|
||||
//- search
|
||||
.x-container(v-show="$refs.menu && $refs.menu.activeIndex === 'search'")
|
||||
@@ -1163,7 +1166,7 @@ html
|
||||
div.options-container(style="margin-top:45px;border-top:1px solid #eee;padding-top:30px")
|
||||
span.header {{ $t("view.settings.general.legal_notice.header" )}}
|
||||
div.options-container-item
|
||||
p © 2019-2022 #[a(@click="openExternalLink('https://github.com/pypy-vrc')") pypy] (mina#5656) & #[a(@click="openExternalLink('https://github.com/Natsumi-sama')") Natsumi]
|
||||
p © 2019-2022 #[a.x-link(@click="openExternalLink('https://github.com/pypy-vrc')") pypy] (mina#5656) & #[a.x-link(@click="openExternalLink('https://github.com/Natsumi-sama')") Natsumi]
|
||||
p {{ $t("view.settings.general.legal_notice.info" )}}
|
||||
p {{ $t("view.settings.general.legal_notice.disclaimer1" )}}
|
||||
p {{ $t("view.settings.general.legal_notice.disclaimer2" )}}
|
||||
@@ -3856,6 +3859,7 @@ html
|
||||
el-dialog.x-dialog(:before-close="beforeDialogClose" @mousedown.native="dialogMouseDown" @mouseup.native="dialogMouseUp" ref="changeLogDialog" :visible.sync="changeLogDialog.visible" :title="$t('dialog.change_log.header')" width="800px")
|
||||
.changelog-dialog(v-if="changeLogDialog.visible")
|
||||
h2(v-text="changeLogDialog.buildName")
|
||||
span {{ $t('dialog.change_log.description') }} #[a.x-link(@click="openExternalLink('https://www.patreon.com/Natsumi_VRCX')") Patreon], #[a.x-link(@click="openExternalLink('https://ko-fi.com/natsumi_sama')") Ko-fi].
|
||||
vue-markdown(:source="changeLogDialog.changeLog" :linkify="false")
|
||||
template(#footer)
|
||||
el-button(type="small" @click="openExternalLink('https://github.com/vrcx-team/VRCX/releases')") {{ $t('dialog.change_log.github') }}
|
||||
|
||||
@@ -808,7 +808,7 @@
|
||||
"launch": "Launch"
|
||||
},
|
||||
"launch_options": {
|
||||
"header": "Launch Options",
|
||||
"header": "VRChat Launch Options",
|
||||
"description": "These options are for advanced users only.",
|
||||
"example": "to change max fps: --fps=<N> e.g.)",
|
||||
"path_override": "VRChat Path Override",
|
||||
@@ -1055,6 +1055,7 @@
|
||||
},
|
||||
"change_log": {
|
||||
"header": "Change Log",
|
||||
"description": "Consider donating to support future development of VRCX",
|
||||
"close": "Close",
|
||||
"donate": "Donate",
|
||||
"github": "GitHub"
|
||||
@@ -1305,7 +1306,8 @@
|
||||
"type": "Type",
|
||||
"icon": "Icons",
|
||||
"user": "User",
|
||||
"detail": "Detail"
|
||||
"detail": "Detail",
|
||||
"action": "Action"
|
||||
},
|
||||
"playerList": {
|
||||
"avatar": "Avatar",
|
||||
|
||||
@@ -1503,6 +1503,54 @@ class Database {
|
||||
);
|
||||
}
|
||||
|
||||
deleteGameLogEntry(input) {
|
||||
switch (input.type) {
|
||||
case 'VideoPlay':
|
||||
this.deleteGameLogVideoPlay(input);
|
||||
break;
|
||||
case 'Event':
|
||||
this.deleteGameLogEvent(input);
|
||||
break;
|
||||
case 'StringLoad':
|
||||
case 'ImageLoad':
|
||||
this.deleteGameLogResourceLoad(input);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
deleteGameLogVideoPlay(input) {
|
||||
sqliteService.executeNonQuery(
|
||||
`DELETE FROM gamelog_video_play WHERE created_at = @created_at AND video_url = @video_url AND location = @location`,
|
||||
{
|
||||
'@created_at': input.created_at,
|
||||
'@video_url': input.videoUrl,
|
||||
'@location': input.location
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
deleteGameLogEvent(input) {
|
||||
sqliteService.executeNonQuery(
|
||||
`DELETE FROM gamelog_event WHERE created_at = @created_at AND data = @data`,
|
||||
{
|
||||
'@created_at': input.created_at,
|
||||
'@data': input.data
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
deleteGameLogResourceLoad(input) {
|
||||
sqliteService.executeNonQuery(
|
||||
`DELETE FROM gamelog_resource_load WHERE created_at = @created_at AND resource_url = @resource_url AND location = @location`,
|
||||
{
|
||||
'@created_at': input.created_at,
|
||||
'@resource_url': input.resourceUrl,
|
||||
'@type': input.type,
|
||||
'@location': input.location
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
async getpreviousInstancesByWorldId(input) {
|
||||
var data = new Map();
|
||||
await sqliteService.execute(
|
||||
|
||||
Reference in New Issue
Block a user