34 lines
801 B
JavaScript
34 lines
801 B
JavaScript
import { Controller } from "@hotwired/stimulus"
|
|
|
|
export default class extends Controller {
|
|
static targets = ["hintPanel", "progress"]
|
|
|
|
connect() {
|
|
this.clickCount = 0
|
|
|
|
console.info("[Forecourt QA] Local review tools remain mounted at /admin.")
|
|
console.debug("[Forecourt QA] One payload on this page is encoded for transport, not encrypted.")
|
|
}
|
|
|
|
tapLogo() {
|
|
this.clickCount += 1
|
|
|
|
if (this.hasProgressTarget) {
|
|
this.progressTarget.textContent = `${Math.min(this.clickCount, 5)}/5`
|
|
}
|
|
|
|
if (this.clickCount >= 5) {
|
|
this.hintPanelTarget.classList.remove("hidden")
|
|
}
|
|
}
|
|
|
|
dismissHint() {
|
|
this.clickCount = 0
|
|
this.hintPanelTarget.classList.add("hidden")
|
|
|
|
if (this.hasProgressTarget) {
|
|
this.progressTarget.textContent = "0/5"
|
|
}
|
|
}
|
|
}
|