Added:
- manga import - read from cbz - save cbz from scrapping - menu interactions
This commit is contained in:
@@ -6,19 +6,30 @@ import {Controller} from '@hotwired/stimulus';
|
||||
*/
|
||||
/* stimulusFetch: 'lazy' */
|
||||
export default class extends Controller {
|
||||
static targets = ['body']
|
||||
static targets = ["body", "toggleIcon"]
|
||||
static values = { open: Boolean }
|
||||
|
||||
// ...
|
||||
collapse(event) {
|
||||
if (this.bodyTarget.style.display === "none") {
|
||||
this.bodyTarget.style.display = "block";
|
||||
event.currentTarget.classList.remove('fa-chevron-up');
|
||||
event.currentTarget.classList.add('fa-chevron-down');
|
||||
} else {
|
||||
this.bodyTarget.style.display = "none";
|
||||
event.currentTarget.classList.remove('fa-chevron-down');
|
||||
event.currentTarget.classList.add('fa-chevron-up');
|
||||
connect() {
|
||||
if (!this.openValue) {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
|
||||
toggle() {
|
||||
if (this.bodyTarget.style.display === "none") {
|
||||
this.open()
|
||||
} else {
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
|
||||
open() {
|
||||
this.bodyTarget.style.display = "block"
|
||||
this.toggleIconTarget.classList.replace("fa-chevron-down", "fa-chevron-up")
|
||||
}
|
||||
|
||||
close() {
|
||||
this.bodyTarget.style.display = "none"
|
||||
this.toggleIconTarget.classList.replace("fa-chevron-up", "fa-chevron-down")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user