web/satellite: fix auto open of first uploaded object preview

Fix for AHA moment when user uploads their first object in some particular bucket.

Change-Id: I3682762e6c73b10fd76e816bb752313bc735e9d2
This commit is contained in:
Vitalii 2022-11-09 19:43:53 +02:00 committed by Storj Robot
parent bae4ee4c5f
commit 5f089873e0
2 changed files with 4 additions and 2 deletions

View File

@ -23,7 +23,7 @@
"graphql-tag": "2.12.6",
"load-script": "1.0.0",
"pbkdf2": "3.1.2",
"pinia": "^2.0.23",
"pinia": "2.0.23",
"pretty-bytes": "5.6.0",
"qrcode": "1.5.0",
"stream-browserify": "3.0.0",

View File

@ -4,6 +4,7 @@
import S3, { CommonPrefix } from 'aws-sdk/clients/s3';
import { StoreModule } from '@/types/store';
import { APP_STATE_MUTATIONS } from '@/store/mutationConstants';
const listCache = new Map();
@ -491,7 +492,8 @@ export const makeFilesModule = (): FilesModule => ({
if (uploadedFiles.length === 1) {
if (state.openModalOnFirstUpload === true) {
commit('openModal', params.Key);
commit('setObjectPathForModal', params.Key);
commit(APP_STATE_MUTATIONS.TOGGLE_OBJECT_DETAILS_MODAL_SHOWN, null, { root: true });
}
}