web/satellite: update locked objects wording

Updated locked objects wording to reflect situations when objects were recently deleted.

Change-Id: I9c4e3ca290cce5e211745094b866d568078d4317
This commit is contained in:
Vitalii 2023-11-06 14:47:46 +02:00 committed by Vitalii Shpital
parent a712ee94aa
commit b6e4f4a02d
4 changed files with 9 additions and 54 deletions

View File

@ -94,7 +94,6 @@
<MultiplePassphraseBanner
v-if="lockedFilesEntryDisplayed && isLockedBanner"
:locked-files-count="lockedFilesCount"
:on-close="closeLockedBanner"
/>
@ -176,8 +175,6 @@
<up-entry v-if="path.length > 0" :on-back="onBack" />
<locked-files-entry v-if="lockedFilesEntryDisplayed" />
<file-entry
v-for="file in folders"
:key="file.Key"
@ -216,7 +213,6 @@ import { useRoute, useRouter } from 'vue-router';
import FileBrowserHeader from './FileBrowserHeader.vue';
import FileEntry from './FileEntry.vue';
import LockedFilesEntry from './LockedFilesEntry.vue';
import BreadCrumbs from './BreadCrumbs.vue';
import { AnalyticsErrorEventSource, AnalyticsEvent } from '@/utils/constants/analyticsEventNames';
@ -338,13 +334,6 @@ const currentPath = computed((): string => {
return obStore.state.path;
});
/**
* Return locked files number.
*/
const lockedFilesCount = computed((): number => {
return objectsCount.value - obStore.state.objectsCount;
});
/**
* Returns bucket objects count from store.
*/
@ -359,7 +348,7 @@ const objectsCount = computed((): number => {
* Indicates if locked files entry is displayed.
*/
const lockedFilesEntryDisplayed = computed((): boolean => {
return lockedFilesCount.value > 0 &&
return (objectsCount.value - obStore.state.objectsCount) > 0 &&
objectsCount.value <= NUMBER_OF_DISPLAYED_OBJECTS &&
!isLoading.value &&
!currentPath.value;

View File

@ -1,35 +0,0 @@
// Copyright (C) 2023 Storj Labs, Inc.
// See LICENSE for copying information.
<template>
<table-item
selectable
select-hidden
:on-click="openModal"
:on-primary-click="openModal"
:item="{'name': 'Objects locked', 'size': '', 'date': ''}"
item-type="locked"
>
<template #options>
<th />
</template>
</table-item>
</template>
<script setup lang="ts">
import { ManageProjectPassphraseStep } from '@/types/managePassphrase';
import { MODALS } from '@/utils/constants/appStatePopUps';
import { useAppStore } from '@/store/modules/appStore';
import TableItem from '@/components/common/TableItem.vue';
const appStore = useAppStore();
/**
* Open the modal for the current file.
*/
function openModal(): void {
appStore.setManagePassphraseStep(ManageProjectPassphraseStep.Switch);
appStore.updateActiveModal(MODALS.manageProjectPassphrase);
}
</script>

View File

@ -7,15 +7,17 @@
<LockedIcon class="banner__left__icon" />
<div class="banner__left__labels">
<h2 class="banner__left__labels__title">
You have at least {{ lockedFilesCount }} object{{ lockedFilesCount > 1 ? 's' : '' }} locked with a
different passphrase.
Object count mismatch.
</h2>
<p class="banner__left__labels__subtitle">Enter your other passphrase to access these files.</p>
<p class="banner__left__labels__subtitle">
Files may be uploaded with a different passphrase, or files have been
recently deleted and are not reflected yet.
</p>
</div>
</div>
<div class="banner__right">
<p class="banner__right__unlock" @click="openManageModal">
Unlock now
Try unlock
</p>
<CloseIcon class="banner__right__close" @click="onClose" />
</div>
@ -31,7 +33,6 @@ import LockedIcon from '@/../static/images/browser/locked.svg';
import CloseIcon from '@/../static/images/browser/close.svg';
const props = defineProps<{
lockedFilesCount: number
onClose: () => void
}>();

View File

@ -28,8 +28,8 @@
<OpenWarningIcon class="modal__warning__icon" />
<div class="modal__warning__info">
<p class="modal__warning__info__title">
This bucket includes files that are uploaded using a different encryption passphrase from
the one you entered.
Object count mismatch: files may be uploaded with a different passphrase, or files have
been recently deleted and are not reflected yet.
</p>
</div>
</div>