web/satellite: don't ignore Vue errors and warnings

Change-Id: If64f362d5634b88c1f564e017ff7af591df9be3c
This commit is contained in:
Egon Elbre 2021-09-24 17:38:16 +03:00
parent 5b66136312
commit 3dbd44347e
2 changed files with 7 additions and 5 deletions

View File

@ -9,5 +9,5 @@ customGlobal.fetch = require('jest-fetch-mock');
customGlobal.fetchMock = customGlobal.fetch;
// Disallow warnings and errors from console.
// customGlobal.console.warn = (message) => { throw new Error(message); };
// customGlobal.console.error = (message) => { throw new Error(message); };
customGlobal.console.warn = (message) => { throw new Error(message); };
customGlobal.console.error = (message) => { throw new Error(message); };

View File

@ -123,6 +123,7 @@ export abstract class RouteConfig {
public static EncryptData = new NavigationLink('encrypt-data', 'Objects Encrypt Data');
public static BucketsManagement = new NavigationLink('buckets', 'Buckets Management');
public static UploadFile = new NavigationLink('upload/', 'Objects Upload');
public static UploadFileChildren = new NavigationLink('*', 'Objects Upload Children');
}
export const notProjectRelatedRoutes = [
@ -429,8 +430,8 @@ export const router = new Router({
component: UploadFile,
children: [
{
path: '*',
name: RouteConfig.UploadFile.name,
path: RouteConfig.UploadFileChildren.path,
name: RouteConfig.UploadFileChildren.name,
component: UploadFile,
},
],
@ -448,7 +449,8 @@ export const router = new Router({
});
router.beforeEach(async (to, from, next) => {
if (from.name === RouteConfig.UploadFile.name && !store.state.appStateModule.appState.isUploadCancelPopupVisible) {
if (((from.name === RouteConfig.UploadFile.name) || (from.name === RouteConfig.UploadFileChildren.name))
&& !store.state.appStateModule.appState.isUploadCancelPopupVisible) {
const areUploadsInProgress: boolean = await store.dispatch(OBJECTS_ACTIONS.CHECK_ONGOING_UPLOADS, to.path);
if (areUploadsInProgress) return;
}