Skip to content

Commit

Permalink
fix(advanced): Fix margin issues for the download genome button.
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronmussig committed Mar 26, 2023
1 parent 495cf78 commit 3817017
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
8 changes: 8 additions & 0 deletions components/advanced/ResultsDownload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<template v-slot:activator="{ on, attrs }">
<v-btn elevation="0" small
v-bind="attrs"
:disabled="disabled"
@click="downloadFile('csv')"
v-on="on"
>
Expand All @@ -22,6 +23,7 @@
<template v-slot:activator="{ on, attrs }">
<v-btn elevation="0" small
v-bind="attrs"
:disabled="disabled"
@click="downloadFile('tsv')"
v-on="on"
>
Expand All @@ -43,6 +45,12 @@ import {mdiFileDelimited, mdiFileExcel, mdiKeyboardTab} from "@mdi/js";
export default Vue.extend({
name: "ResultsDownload",
props: {
disabled: {
type: Boolean,
default: false
}
},
data: () => ({
mdiFileDelimitedSvg: mdiFileDelimited,
mdiKeyboardTabSvg: mdiKeyboardTab,
Expand Down
6 changes: 3 additions & 3 deletions components/advanced/ResultsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
<!-- style="max-width: 300px;"-->
<!-- ></v-text-field>-->

<ResultsDownload></ResultsDownload>
<ResultsDownload :disabled="totalNumberOfItems === 0"></ResultsDownload>

<NcbiGenomesDownload></NcbiGenomesDownload>
<NcbiGenomesDownload :disabled="totalNumberOfItems === 0"></NcbiGenomesDownload>

</v-row>
</v-card-title>
Expand Down Expand Up @@ -176,7 +176,7 @@ export default Vue.extend({
this.$accessor.advanced.SET_RESULTS_SORT_DESC(value)
}
},
totalNumberOfItems() {
totalNumberOfItems(): number {
return this.$accessor.advanced.results == null ? 0 : this.$accessor.advanced.results.rows.length
},
searchHasBeenRun() {
Expand Down
8 changes: 8 additions & 0 deletions components/util/NcbiGenomesDownload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
<v-btn
elevation="0"
small
style="margin-top: 2px; margin-left: 6px;"
v-bind="attrs"
@click="dialog = !dialog"
:disabled="disabled"
v-on="on"
>
Genomes
Expand Down Expand Up @@ -96,6 +98,12 @@ import Vue from 'vue';
import {mdiDownload} from '@mdi/js';
export default Vue.extend({
props: {
disabled: {
type: Boolean,
default: false,
},
},
data: () => ({
mdiDownloadSvg: mdiDownload,
dialog: false,
Expand Down

0 comments on commit 3817017

Please sign in to comment.