mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-14 04:13:52 +02:00
fix error text
This commit is contained in:
@@ -108,7 +108,7 @@
|
||||
import { useGeneralSettingsStore } from '@/stores/settings/general';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import { escapeTag, extractFileId } from '../shared/utils';
|
||||
import { extractFileId } from '../shared/utils';
|
||||
import { useGalleryStore } from '../stores';
|
||||
|
||||
const galleryStore = useGalleryStore();
|
||||
@@ -301,7 +301,7 @@
|
||||
toast.success(t('message.image.copied_to_clipboard'));
|
||||
} catch (error) {
|
||||
console.error('Error downloading image:', error);
|
||||
toast.error(escapeTag(`Failed to download image. ${url}`));
|
||||
toast.error(`Failed to download image. ${url}`);
|
||||
} finally {
|
||||
toast.dismiss(msg);
|
||||
}
|
||||
@@ -331,7 +331,7 @@
|
||||
document.body.removeChild(link);
|
||||
} catch (error) {
|
||||
console.error('Error downloading image:', error);
|
||||
toast.error(escapeTag(`Failed to download image. ${url}`));
|
||||
toast.error(`Failed to download image. ${url}`);
|
||||
} finally {
|
||||
toast.dismiss(msg);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ import {
|
||||
} from '../stores';
|
||||
import { getCurrentUser } from '../coordinators/userCoordinator';
|
||||
import { AppDebug, isApiLogSuppressed, logWebRequest } from './appConfig.js';
|
||||
import { escapeTag } from '../shared/utils';
|
||||
import { i18n } from '../plugins/i18n';
|
||||
import { statusCodes } from '../shared/constants/api.js';
|
||||
import { watchState } from './watchState';
|
||||
@@ -194,9 +193,7 @@ export function request(endpoint, options) {
|
||||
text = data.OK;
|
||||
}
|
||||
if (text) {
|
||||
toast.success(
|
||||
options.customMsg ? options.customMsg : escapeTag(text)
|
||||
);
|
||||
toast.success(options.customMsg ? options.customMsg : text);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
@@ -355,7 +352,7 @@ export function $throw(code, error, endpoint) {
|
||||
) {
|
||||
message[1] = `${t('api.error.message.error_message')}: "${t('api.error.message.unavailable')}"`;
|
||||
}
|
||||
const text = message.map((s) => escapeTag(s)).join('\n');
|
||||
const text = message.join('\n');
|
||||
|
||||
if (text.length && !ignoreError) {
|
||||
toast.error(message[0], {
|
||||
|
||||
@@ -23,7 +23,7 @@ import {
|
||||
handleFriendAdd,
|
||||
handleFriendDelete
|
||||
} from '../coordinators/friendRelationshipCoordinator';
|
||||
import { escapeTag, parseLocation } from '../shared/utils';
|
||||
import { parseLocation } from '../shared/utils';
|
||||
import { AppDebug } from './appConfig';
|
||||
import { groupRequest } from '../api';
|
||||
import { request } from './request';
|
||||
@@ -201,7 +201,7 @@ function handlePipeline(args) {
|
||||
if (AppDebug.errorNoty) {
|
||||
toast.dismiss(AppDebug.errorNoty);
|
||||
}
|
||||
AppDebug.errorNoty = toast.error(escapeTag(`WebSocket Error: ${err}`));
|
||||
AppDebug.errorNoty = toast.error(`WebSocket Error: ${err}`);
|
||||
return;
|
||||
}
|
||||
if (typeof content === 'undefined') {
|
||||
|
||||
@@ -10,7 +10,6 @@ import {
|
||||
checkCanInvite,
|
||||
createDefaultNotificationRef,
|
||||
createDefaultNotificationV2Ref,
|
||||
escapeTag,
|
||||
executeWithBackoff,
|
||||
findUserByDisplayName,
|
||||
parseLocation,
|
||||
@@ -1340,7 +1339,7 @@ export const useNotificationStore = defineStore('Notification', () => {
|
||||
console.log('Notification response', args);
|
||||
if (!args.json) return;
|
||||
handleNotificationV2Hide(notificationId);
|
||||
toast.success(escapeTag(args.json));
|
||||
toast.success(args.json);
|
||||
})
|
||||
.catch(() => {
|
||||
handleNotificationV2Hide(notificationId);
|
||||
|
||||
Reference in New Issue
Block a user