1import { Controller } from "@hotwired/stimulus" 2 3// Briefly flashes a green ring around the element to confirm a save, then fades 4// it out. Used on menu editor rows re-rendered via Turbo Streams after an 5// inline save/add so the user gets instant "saved" feedback without a reload. 6export default class extends Controller { 7 connect() { 8 const el = this.element 9 el.style.transition = "box-shadow 0.12s ease-out" 10 el.style.boxShadow = "0 0 0 2px rgb(34 197 94)" // Tailwind green-500 11 12 this.fadeTimer = setTimeout(() => { 13 el.style.transition = "box-shadow 0.9s ease-in" 14 el.style.boxShadow = "0 0 0 0 rgba(34, 197, 94, 0)" 15 }, 650) 16 17 this.clearTimer = setTimeout(() => { 18 el.style.transition = "" 19 el.style.boxShadow = "" 20 }, 1700) 21 } 22 23 disconnect() { 24 clearTimeout(this.fadeTimer) 25 clearTimeout(this.clearTimer) 26 } 27};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.