Skip to content

Commit

Permalink
web/satellite: update upload text and UX
Browse files Browse the repository at this point in the history
This change changes the file browser empty state text to inform that
clicking it will open the upload dialog.

Issue: #6853

Change-Id: I7aeafccf262522975bd354966e71995e5a022081
  • Loading branch information
wilfred-asomanii committed Mar 29, 2024
1 parent dab2464 commit 491175c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
5 changes: 3 additions & 2 deletions web/satellite/src/components/BrowserCardViewComponent.vue
Expand Up @@ -73,7 +73,9 @@
>
<template #no-data>
<div class="d-flex justify-center">
<p class="text-body-2">{{ search ? 'No data found.' : 'Drag and drop files to upload' }}</p>
<p class="text-body-2 cursor-pointer" @click="emit('uploadClick')">
{{ search ? 'No data found' : 'Drag and drop files or click here to upload' }}
</p>
</div>
</template>

Expand Down Expand Up @@ -218,7 +220,6 @@ const props = defineProps<{
const emit = defineEmits<{
uploadClick: [];
newFolderClick: [];
}>();
const analyticsStore = useAnalyticsStore();
Expand Down
12 changes: 9 additions & 3 deletions web/satellite/src/components/BrowserTableComponent.vue
Expand Up @@ -26,7 +26,6 @@
:items="tableFiles"
:search="search"
:item-value="(item: BrowserObjectWrapper) => item.browserObject.path + item.browserObject.Key"
:no-data-text="search ? 'No data found' : 'Drag and drop files to upload'"
:page="cursor.page"
hover
must-sort
Expand All @@ -38,6 +37,11 @@
@update:page="onPageChange"
@update:itemsPerPage="onLimitChange"
>
<template #no-data>
<p class="text-body-2 cursor-pointer" @click="emit('uploadClick')">
{{ search ? 'No data found' : 'Drag and drop files or click here to upload' }}
</p>
</template>
<template #item="{ props: rowProps }">
<v-data-table-row v-bind="rowProps">
<template #item.name="{ item }: ItemSlotProps">
Expand Down Expand Up @@ -171,7 +175,6 @@ import { AnalyticsErrorEventSource, AnalyticsEvent } from '@/utils/constants/ana
import { useBucketsStore } from '@/store/modules/bucketsStore';
import { useConfigStore } from '@/store/modules/configStore';
import { tableSizeOptions } from '@/types/common';
import { useAppStore } from '@/store/modules/appStore';
import { BrowserObjectTypeInfo, BrowserObjectWrapper, EXTENSION_INFOS, FILE_INFO, FOLDER_INFO } from '@/types/browser';
import { useAnalyticsStore } from '@/store/modules/analyticsStore';
import { useUsersStore } from '@/store/modules/usersStore';
Expand Down Expand Up @@ -201,12 +204,15 @@ const props = defineProps<{
loading?: boolean;
}>();
const emit = defineEmits<{
uploadClick: [];
}>();
const analyticsStore = useAnalyticsStore();
const config = useConfigStore();
const obStore = useObjectBrowserStore();
const projectsStore = useProjectsStore();
const bucketsStore = useBucketsStore();
const appStore = useAppStore();
const userStore = useUsersStore();
const notify = useNotify();
Expand Down
4 changes: 2 additions & 2 deletions web/satellite/src/views/Bucket.vue
Expand Up @@ -189,8 +189,8 @@
</v-row>
</v-col>

<browser-card-view-component v-if="isCardView" :force-empty="!isInitialized" @new-folder-click="isNewFolderDialogOpen = true" @upload-click="menu = true" />
<browser-table-component v-else :loading="isFetching" :force-empty="!isInitialized" />
<browser-card-view-component v-if="isCardView" :force-empty="!isInitialized" @upload-click="buttonFileUpload" />
<browser-table-component v-else :loading="isFetching" :force-empty="!isInitialized" @upload-click="buttonFileUpload" />
</v-container>

<browser-new-folder-dialog v-model="isNewFolderDialogOpen" />
Expand Down

0 comments on commit 491175c

Please sign in to comment.