Skip to content

Commit 4a56051

Browse files
committed
Refactor upload progress view navigation and actions
1 parent 23e0db1 commit 4a56051

File tree

3 files changed

+14
-17
lines changed

3 files changed

+14
-17
lines changed

client/src/components/Panels/Upload/UploadMethodView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function handleCancel() {
5858
5959
function handleStart() {
6060
uploadMethodRef.value?.startUpload();
61-
// TODO Navigate to progress display
61+
router.push("/upload/progress");
6262
}
6363
6464
function handleReadyStateChange(ready: boolean) {

client/src/components/Panels/Upload/UploadPanel.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ function selectUploadMethod(method: UploadMethodConfig) {
5858
router.push(`/upload/${method.id}`);
5959
}
6060
61+
function showProgressDetails() {
62+
router.push("/upload/progress");
63+
}
64+
6165
function openAdvancedMode() {
6266
showAdvancedModal.value = true;
6367
}
@@ -91,7 +95,7 @@ function openGuidedMode() {
9195
</BButton>
9296
</template>
9397
<template v-slot:header>
94-
<UploadProgressIndicator v-if="hasUploads" @show-details="router.push('/upload/progress')" />
98+
<UploadProgressIndicator v-if="hasUploads" @show-details="showProgressDetails" />
9599
<DelayedInput :delay="100" class="my-2" placeholder="Search upload methods" @change="query = $event" />
96100
</template>
97101
<ScrollList

client/src/components/Panels/Upload/UploadProgress.vue

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,14 @@ function getFileStatusClass(file: UploadItem) {
3939

4040
<template>
4141
<div class="upload-progress-view d-flex flex-column h-100">
42-
<BreadcrumbHeading :items="breadcrumbItems" />
42+
<BreadcrumbHeading :items="breadcrumbItems">
43+
<div v-if="activeItems.length > 0" class="d-flex flex-gapx-1">
44+
<GButton v-if="hasCompleted" size="small" outline color="grey" @click="uploadService.clearCompleted()">
45+
Clear Completed
46+
</GButton>
47+
<GButton size="small" outline color="grey" @click="uploadService.clearAll()"> Clear All </GButton>
48+
</div>
49+
</BreadcrumbHeading>
4350

4451
<div class="upload-progress-content flex-grow-1 overflow-auto p-3">
4552
<div v-if="activeItems.length > 0" class="h-100 d-flex flex-column">
@@ -56,13 +63,6 @@ function getFileStatusClass(file: UploadItem) {
5663
</div>
5764
</div>
5865

59-
<div class="clear-actions mb-3">
60-
<GButton v-if="hasCompleted" outline color="grey" @click="uploadService.clearCompleted()">
61-
Clear Completed
62-
</GButton>
63-
<GButton outline color="grey" @click="uploadService.clearAll()"> Clear All </GButton>
64-
</div>
65-
6666
<div class="file-details-list flex-grow-1 overflow-auto">
6767
<div
6868
v-for="(file, index) in activeItems"
@@ -121,13 +121,6 @@ function getFileStatusClass(file: UploadItem) {
121121
flex-shrink: 0;
122122
}
123123
124-
.clear-actions {
125-
display: flex;
126-
gap: 0.5rem;
127-
justify-content: flex-end;
128-
flex-shrink: 0;
129-
}
130-
131124
.file-details-list {
132125
flex: 1;
133126
overflow-y: auto;

0 commit comments

Comments
 (0)