Update AccountImport, add select first 100 posts button

pull/4515/head
Daniel Supernault 2023-07-01 22:38:16 -06:00
rodzic 2d959fb354
commit 625a76a51d
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
1 zmienionych plików z 16 dodań i 0 usunięć

Wyświetl plik

@ -105,6 +105,9 @@
<p class="small text-muted mb-0">Tap on posts to include them in your import.</p>
</div>
<p v-else class="lead mb-0"><span class="font-weight-bold">{{ selectedPostsCounter }}</span> posts selected for import</p>
<button v-if="selectedMedia.length" class="btn btn-outline-danger font-weight-bold rounded-pill btn-sm my-1" @click="handleClearAll()">Clear all selected</button>
<button v-else class="btn btn-outline-primary font-weight-bold rounded-pill" @click="handleSelectAll()">Select first 100 posts</button>
</div>
</section>
<section class="row mb-n5 media-selector" style="max-height: 600px;overflow-y: auto;">
@ -590,6 +593,19 @@
window.location.href = '/site/contact'
}
});
},
handleSelectAll() {
let medias = this.postMeta.slice(0, 100);
for (var i = medias.length - 1; i >= 0; i--) {
let m = medias[i];
this.toggleSelectedPost(m);
}
},
handleClearAll() {
this.selectedMedia = []
this.selectedPostsCounter = 0;
}
}
}