mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-23 00:33:50 +02:00
Delete screenshot metadata
This commit is contained in:
@@ -42,6 +42,13 @@
|
||||
@click="uploadScreenshotToGallery"
|
||||
>{{ t('dialog.screenshot_metadata.upload') }}</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="screenshotMetadataDialog.metadata.filePath"
|
||||
size="small"
|
||||
icon="el-icon-delete"
|
||||
@click="deleteMetadata(screenshotMetadataDialog.metadata.filePath)"
|
||||
>{{ t('dialog.screenshot_metadata.delete_metadata') }}</el-button
|
||||
>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
@@ -279,6 +286,26 @@
|
||||
});
|
||||
});
|
||||
}
|
||||
function deleteMetadata(path) {
|
||||
if (!path) {
|
||||
return;
|
||||
}
|
||||
AppApi.DeleteScreenshotMetadata(path).then((result) => {
|
||||
if (!result) {
|
||||
$message({
|
||||
message: t('message.screenshot_metadata.delete_failed'),
|
||||
type: 'error'
|
||||
});
|
||||
return;
|
||||
}
|
||||
$message({
|
||||
message: t('message.screenshot_metadata.deleted'),
|
||||
type: 'success'
|
||||
});
|
||||
const D = props.screenshotMetadataDialog;
|
||||
getAndDisplayScreenshot(D.metadata.filePath, true);
|
||||
});
|
||||
}
|
||||
function uploadScreenshotToGallery() {
|
||||
const D = props.screenshotMetadataDialog;
|
||||
if (D.metadata.fileSizeBytes > 10000000) {
|
||||
|
||||
Reference in New Issue
Block a user