mirror of
https://github.com/koel/koel
synced 2024-11-24 13:13:05 +00:00
Use computed for wiki panel
This commit is contained in:
parent
2df42065f7
commit
4e1ff0fc7a
1 changed files with 13 additions and 4 deletions
|
@ -10,11 +10,10 @@
|
|||
<img v-if="album.info.image" :src="album.info.image" class="cover">
|
||||
|
||||
<div class="wiki" v-if="album.info.wiki && album.info.wiki.summary">
|
||||
<div class="summary" v-show="mode !== 'full' && !showingFullWiki" v-html="album.info.wiki.summary"/>
|
||||
<div class="full" v-show="mode === 'full' || showingFullWiki" v-html="album.info.wiki.full"/>
|
||||
<div class="summary" v-show="showSummary" v-html="album.info.wiki.summary"/>
|
||||
<div class="full" v-show="showFull" v-html="album.info.wiki.full"/>
|
||||
|
||||
<button class="more" v-show="mode !== 'full' && !showingFullWiki"
|
||||
@click.prevent="showingFullWiki = !showingFullWiki">
|
||||
<button class="more" v-show="showSummary" @click.prevent="showingFullWiki = true">
|
||||
Full Wiki
|
||||
</button>
|
||||
</div>
|
||||
|
@ -55,6 +54,16 @@ export default {
|
|||
},
|
||||
},
|
||||
|
||||
computed {
|
||||
showSummary() {
|
||||
return this.mode !== 'full' && !this.showingFullWiki;
|
||||
},
|
||||
|
||||
showFull() {
|
||||
return this.mode === 'full' || this.showingFullWiki;
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
/**
|
||||
* Shuffle all songs in the current album.
|
||||
|
|
Loading…
Reference in a new issue