diff --git a/web/satellite/src/components/objects/UploadFile.vue b/web/satellite/src/components/objects/UploadFile.vue index 655b4a583..7b4684248 100644 --- a/web/satellite/src/components/objects/UploadFile.vue +++ b/web/satellite/src/components/objects/UploadFile.vue @@ -9,7 +9,12 @@ @@ -27,6 +32,7 @@ import { AccessGrant, EdgeCredentials } from '@/types/accessGrants'; import { AnalyticsErrorEventSource, AnalyticsEvent } from '@/utils/constants/analyticsEventNames'; import { MetaUtils } from '@/utils/meta'; import { Bucket } from '@/types/buckets'; +import { APP_STATE_MUTATIONS } from '@/store/mutationConstants'; import FileBrowser from '@/components/browser/FileBrowser.vue'; import UploadCancelPopup from '@/components/objects/UploadCancelPopup.vue'; @@ -47,19 +53,6 @@ export default class UploadFile extends Vue { public readonly bucketsManagementPath: string = RouteConfig.Buckets.with(RouteConfig.BucketsManagement).path; - /** - * Indicates if we have objects in this bucket but not for inputted passphrase. - */ - public get isMultiplePassphraseNotificationShown(): boolean { - const name: string = this.$store.state.files.bucket; - const data: Bucket = this.$store.state.bucketUsageModule.page.buckets.find((bucket: Bucket) => bucket.name === name); - - const objectCount: number = data?.objectCount || 0; - const ownObjects = this.$store.getters['files/sortedFiles']; - - return objectCount > 0 && !ownObjects.length; - } - /** * Lifecycle hook after vue instance was created. * Initiates file browser. @@ -147,6 +140,13 @@ export default class UploadFile extends Vue { } } + /** + * Toggles manage project passphrase modal visibility. + */ + public toggleManagePassphrase(): void { + this.$store.commit(APP_STATE_MUTATIONS.TOGGLE_MANAGE_PROJECT_PASSPHRASE_MODAL_SHOWN); + } + /** * Sets local worker with worker instantiated in store. */ @@ -210,6 +210,19 @@ export default class UploadFile extends Vue { return await this.$store.dispatch(ACCESS_GRANTS_ACTIONS.GET_GATEWAY_CREDENTIALS, { accessGrant: data.value, isPublic: true }); } + /** + * Indicates if we have objects in this bucket but not for inputted passphrase. + */ + public get isMultiplePassphraseNotificationShown(): boolean { + const name: string = this.$store.state.files.bucket; + const data: Bucket = this.$store.state.bucketUsageModule.page.buckets.find((bucket: Bucket) => bucket.name === name); + + const objectCount: number = data?.objectCount || 0; + const ownObjects = this.$store.getters['files/sortedFiles']; + + return objectCount > 0 && !ownObjects.length; + } + /** * Indicates if upload cancel popup is visible. */ @@ -259,4 +272,8 @@ export default class UploadFile extends Vue { font-family: 'font_regular', sans-serif; padding-bottom: 200px; } + + .link { + cursor: pointer; + }