mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
vueui: check current snapshot first when using its props
This commit is contained in:
parent
2ac83c61fd
commit
fa317deeb4
File diff suppressed because one or more lines are too long
@ -8,7 +8,7 @@
|
||||
<div class="list">
|
||||
<div v-for="period in snapshotPeriods">
|
||||
<span class="link" @click="gotoPeriod(period)" >{{period.snapshot.getTimeFormatted()}}</span>
|
||||
<span v-if="currentSnapshot.id === period.snapshot.id" class="current">current</span>
|
||||
<span v-if="isCurrentSnapshot(period)" class="current">current</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -30,6 +30,9 @@ export default {
|
||||
methods: {
|
||||
gotoPeriod(period) {
|
||||
this.$emit('goto-period', period);
|
||||
},
|
||||
isCurrentSnapshot(period) {
|
||||
return this.currentSnapshot && this.currentSnapshot.id === period.snapshot.id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user