Self-hosted project management for devs and their clients: tickets, time tracking, docs and meetings, with an AI assistant that cites its sources. AGPL-3.0.
Ruby agplai-assistantdockerdsgvogdprhotwireissue-trackerjira-alternativeknowledge-basellmmcp-servermeeting-notesopen-sourceproject-managementredmine-alternativeruby-on-railsself-hostedticketingtime-tracking
import { Controller } from "@hotwired/stimulus"
// Dispatches a global event whenever the unread count changes so
// multiple UI elements can stay in sync without requiring a full reload.
export default class extends Controller {
static values = {
count: Number,
}
connect() {
this.dispatchUpdate()
}
countValueChanged() {
this.dispatchUpdate()
}
dispatchUpdate() {
const count = Number.isFinite(this.countValue) ? this.countValue : 0
window.dispatchEvent(new CustomEvent("notifications:count-updated", { detail: { count } }))
}
}