mirror of
https://github.com/danbulant/Mangades
synced 2026-06-17 13:21:03 +00:00
fix select all button
This commit is contained in:
parent
db5ed7b5c3
commit
9707229b2b
1 changed files with 7 additions and 3 deletions
|
|
@ -236,10 +236,10 @@
|
|||
var copyrightOpen = false;
|
||||
|
||||
function selectAll() {
|
||||
if(arraysEqual(selected, chapters)) {
|
||||
if(arraysEqual(selected, chapters.data)) {
|
||||
selected = [];
|
||||
} else {
|
||||
selected = chapters.slice();
|
||||
selected = chapters.data.slice();
|
||||
}
|
||||
if(selected.length) {
|
||||
text = `Selected ${selected.length} chapters`;
|
||||
|
|
@ -470,7 +470,11 @@
|
|||
</b>
|
||||
</p>
|
||||
<button on:click={selectAll}>
|
||||
Select all
|
||||
{#if chapters && chapters.data.length && arraysEqual(selected, chapters.data)}
|
||||
Deselect all
|
||||
{:else}
|
||||
Select all
|
||||
{/if}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue