add counts of different quests
This commit is contained in:
parent
a987079366
commit
0731ec2663
3 changed files with 20 additions and 0 deletions
|
|
@ -114,6 +114,14 @@ export class Armory {
|
|||
if (!quest.char2Status) return 'quest-missing-2';
|
||||
if (quest.char1Status !== quest.char2Status) return 'quest-diff';
|
||||
return '';
|
||||
},
|
||||
getDiffCount: function(quests: any[]): number {
|
||||
return quests.reduce((count, quest) => {
|
||||
if (!quest.char1Status && quest.char2Status) return count + 1;
|
||||
if (quest.char1Status && !quest.char2Status) return count + 1;
|
||||
if (quest.char1Status !== quest.char2Status) return count + 1;
|
||||
return count;
|
||||
}, 0);
|
||||
}
|
||||
},
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -67,6 +67,11 @@
|
|||
<div class="quests-table" style="margin-bottom: 20px;">
|
||||
<h2 class="is-size-4 category-header collapsible">
|
||||
{{@key}}
|
||||
{{#with (getDiffCount this)}}
|
||||
{{#if this}}
|
||||
<span class="diff-count">({{this}} different)</span>
|
||||
{{/if}}
|
||||
{{/with}}
|
||||
<span class="collapse-icon">▼</span>
|
||||
</h2>
|
||||
|
||||
|
|
|
|||
|
|
@ -141,4 +141,11 @@ tr.quest-missing-2 td:nth-child(4) {
|
|||
|
||||
.quest-compare-section .select select {
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
.diff-count {
|
||||
font-size: 0.8em;
|
||||
color: #ffdd57;
|
||||
margin-left: 10px;
|
||||
font-weight: normal;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue