Links, mainly...
Some checks failed
/ Run system tests (push) Waiting to run
/ Build, push and deploy image (push) Blocked by required conditions
/ Run tests (push) Has been cancelled
/ Checkout (push) Successful in 8m9s

This commit is contained in:
david 2024-07-26 00:59:00 +02:00
parent fd42a3f173
commit 21ab02d647
69 changed files with 2258 additions and 155 deletions

View file

@ -0,0 +1,19 @@
import { Controller } from "@hotwired/stimulus"
// Connects to data-controller="check-link"
export default class extends Controller {
static targets = ["input", "button"]
connect() {
console.log("connect", this.inputTarget, this.buttonTarget)
this.inputTarget.addEventListener("input", e => this.onUrlInputChange(e))
}
onUrlInputChange(event) {
console.log("connect", this.inputTarget, this.buttonTarget)
console.log(event, this.buttonTarget)
this.buttonTarget.href = this.inputTarget.value;
this.buttonTarget.innerHTML = this.inputTarget.value;
return true;
}
}

View file

@ -7,6 +7,9 @@ import { application } from "./application"
import AutosubmitController from "./autosubmit_controller"
application.register("autosubmit", AutosubmitController)
import CheckLinkController from "./check_link_controller"
application.register("check-link", CheckLinkController)
import CollapseChevronTogglerController from "./collapse_chevron_toggler_controller"
application.register("collapse-chevron-toggler", CollapseChevronTogglerController)