Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui): disable export when collection is empty #251

Merged
merged 5 commits into from
Sep 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion packages/ui/src/components/NavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@
</a>
</div>
<div class="navbar-item">
<div class="custom-dropdown" style="padding-left: 0.5rem; padding-right: 0.5rem" @click="toggleExportSelectorDropdown">
<div
class="custom-dropdown"
:style="{ 'pointer-events': collectionLength > 0 ? 'auto' : 'none', 'opacity': collectionLength > 0 ? '1' : '0.5' }"
style="padding-left: 0.5rem; padding-right: 0.5rem" @click="toggleExportSelectorDropdown"
>
<i class="fa fa-file-export"></i>&nbsp;&nbsp;{{ 'Export' }}
<i class="fa fa-caret-down space-right"></i>
</div>
Expand Down Expand Up @@ -144,7 +148,7 @@
LogsModal
},
props: {
nav: String,

Check warning on line 151 in packages/ui/src/components/NavBar.vue

View workflow job for this annotation

GitHub Actions / test

Prop 'nav' requires default value to be set
},
data() {
return {
Expand Down Expand Up @@ -172,6 +176,9 @@
}
},
computed: {
collectionLength() {
return this.$store.state.collection.length
},
activeWorkspace() {
return this.$store.state.activeWorkspace
},
Expand Down
Loading