mirror of
https://github.com/lone-cloud/prism
synced 2026-06-03 08:43:10 -07:00
26 lines
858 B
Go
26 lines
858 B
Go
package server
|
|
|
|
import (
|
|
"fmt"
|
|
"net/http"
|
|
)
|
|
|
|
func (s *Server) handleFragmentIntegrations(w http.ResponseWriter, r *http.Request) {
|
|
w.Header().Set("Content-Type", "text/html")
|
|
|
|
html := ""
|
|
|
|
if s.cfg.IsSignalEnabled() {
|
|
html += `<div id="signal-integration" class="integration-container" hx-get="/fragment/signal" hx-trigger="load"><div class="loading"><div class="spinner"></div></div></div>`
|
|
}
|
|
|
|
if s.cfg.IsProtonEnabled() {
|
|
html += `<div id="proton-integration" class="integration-container" hx-get="/fragment/proton" hx-trigger="load"><div class="loading"><div class="spinner"></div></div></div>`
|
|
}
|
|
|
|
if s.cfg.IsTelegramEnabled() {
|
|
html += `<div id="telegram-integration" class="integration-container" hx-get="/fragment/telegram" hx-trigger="load"><div class="loading"><div class="spinner"></div></div></div>`
|
|
}
|
|
|
|
_, _ = fmt.Fprint(w, html)
|
|
}
|