diff --git a/web/satellite/src/components/browser/BreadCrumbs.vue b/web/satellite/src/components/browser/BreadCrumbs.vue index 43a8fa58b..17f293c82 100644 --- a/web/satellite/src/components/browser/BreadCrumbs.vue +++ b/web/satellite/src/components/browser/BreadCrumbs.vue @@ -57,7 +57,7 @@ import { useRouter, useStore } from '@/utils/hooks'; const store = useStore(); const router = useRouter(); -const emit = defineEmits(['onUpdate']); +const emit = defineEmits(['onUpdate', 'bucketClick']); /** * Retrieves the current bucket name from the store. diff --git a/web/satellite/src/components/browser/FileBrowser.vue b/web/satellite/src/components/browser/FileBrowser.vue index 6fcd4b598..a4b32860a 100644 --- a/web/satellite/src/components/browser/FileBrowser.vue +++ b/web/satellite/src/components/browser/FileBrowser.vue @@ -269,7 +269,7 @@ const filesUploading = computed((): string => { /** * Return up to five files currently being uploaded for display purposes. */ -const formattedFilesUploading = computed((): BrowserFile[] => { +const formattedFilesUploading = computed((): string => { if (filesUploading.value.length > 5) { return filesUploading.value.slice(0, 5); } @@ -280,7 +280,7 @@ const formattedFilesUploading = computed((): BrowserFile[] => { /** * Return the text of how many files in total are being uploaded to be displayed to give users more context. */ -const formattedFilesWaitingToBeUploaded = computed((): BrowserFile[] => { +const formattedFilesWaitingToBeUploaded = computed((): string => { let file = 'file'; if (filesUploading.value.length > 1) { diff --git a/web/satellite/src/components/browser/FileEntry.vue b/web/satellite/src/components/browser/FileEntry.vue index 8249a303d..4deacfaaa 100644 --- a/web/satellite/src/components/browser/FileEntry.vue +++ b/web/satellite/src/components/browser/FileEntry.vue @@ -312,10 +312,10 @@ const store = useStore(); const notify = useNotify(); const router = useRouter(); -const props = defineProps({ - path: { type: String, default: '' }, - file: { type: Object as BrowserFile, default: undefined }, -}); +const props = defineProps<{ + path: string, + file: BrowserFile, +}>(); const emit = defineEmits(['onUpdate']); @@ -324,28 +324,28 @@ const deleteConfirmation = ref(false); /** * Return the size of the file formatted. */ -const size: string = computed((): string => { +const size = computed((): string => { return prettyBytes(props.file.Size); }); /** * Return the upload date of the file formatted. */ -const uploadDate: string = computed((): string => { +const uploadDate = computed((): string => { return props.file.LastModified.toLocaleString().split(',')[0]; }); /** * Check with the store to see if the dropdown is open for the current file/folder. */ -const dropdownOpen: string = computed((): string => { +const dropdownOpen = computed((): boolean => { return store.state.files.openedDropdown === props.file.Key; }); /** * Return a link to the current folder for navigation. */ -const link: string = computed((): string => { +const link = computed((): string => { const browserRoot = store.state.files.browserRoot; const pathAndKey = store.state.files.path + props.file.Key; return pathAndKey.length > 0 @@ -356,7 +356,7 @@ const link: string = computed((): string => { /** * Return a flag signifying whether the current file/folder is selected. */ -const isFileSelected: boolean = computed((): string => { +const isFileSelected = computed((): boolean => { return Boolean( store.state.files.selectedAnchorFile === props.file || store.state.files.selectedFiles.find( @@ -371,14 +371,14 @@ const isFileSelected: boolean = computed((): string => { /** * Return a boolean signifying whether the current file/folder is a folder. */ -const fileTypeIsFolder: boolean = computed((): string => { +const fileTypeIsFolder = computed((): boolean => { return props.file.type === 'folder'; }); /** * Return a boolean signifying whether the current file/folder is a file. */ -const fileTypeIsFile: boolean = computed((): string => { +const fileTypeIsFile = computed((): boolean => { return props.file.type === 'file'; }); diff --git a/web/satellite/src/components/common/VSearchAlternateStyling.vue b/web/satellite/src/components/common/VSearchAlternateStyling.vue index 416247d9e..d3c438134 100644 --- a/web/satellite/src/components/common/VSearchAlternateStyling.vue +++ b/web/satellite/src/components/common/VSearchAlternateStyling.vue @@ -12,41 +12,28 @@ > - diff --git a/web/satellite/src/components/common/VTable.vue b/web/satellite/src/components/common/VTable.vue index a13ba3b03..0e94d181c 100644 --- a/web/satellite/src/components/common/VTable.vue +++ b/web/satellite/src/components/common/VTable.vue @@ -31,14 +31,14 @@ import { OnPageClickCallback } from '@/types/pagination'; import TablePagination from '@/components/common/TablePagination.vue'; -const props = defineProps({ - selectable: { type: Boolean, default: false }, - totalPageCount: { type: Number, default: 0 }, - itemsLabel: { type: String, default: 'items' }, - limit: { type: Number, default: 0 }, - totalItemsCount: { type: Number, default: 0 }, - onPageClickCallback: { type: Function as OnPageClickCallback, default: () => () => new Promise(() => false) }, -}); +const props = defineProps<{ + selectable: boolean, + totalPageCount: number, + itemsLabel: string, + limit: number, + totalItemsCount: number, + onPageClickCallback: OnPageClickCallback, +}>();