Fixed new library button hiding and not coming back

This commit is contained in:
Stefan Zermatten
2021-03-01 14:08:12 +02:00
parent a8aa1923a8
commit 9a2d10b7ed

View File

@@ -56,7 +56,7 @@
</v-expansion-panel-content>
</v-expansion-panel>
<v-btn
v-show="expandedLibrary === null"
v-show="noLibrariesExpanded"
v-if="editMode"
flat
color="primary"
@@ -116,6 +116,16 @@ export default {
return tier && tier.paidBenefits;
},
},
computed: {
noLibrariesExpanded(){
if (!this.expandedLibrary) return true;
let noneExpanded = true;
this.expandedLibrary.forEach(lib => {
if(lib) noneExpanded = false;
});
return noneExpanded;
},
},
methods: {
insertLibrary(){
if (this.paidBenefits){