more minor webpush UI adjustments

This commit is contained in:
Egor 2026-02-16 22:43:22 -08:00
parent 6027c1cac5
commit cd5f8e39c4
4 changed files with 8 additions and 8 deletions

View file

@ -167,9 +167,7 @@ details[open] > .card-header::before {
border: 0.0625rem solid var(--border-color);
font-size: 0.875rem;
font-weight: 400;
white-space: normal;
word-break: break-all;
max-width: 20rem;
white-space: nowrap;
transition: opacity 0.2s;
pointer-events: none;
z-index: 10;
@ -311,7 +309,7 @@ details[open] > .card-header::before {
}
.channel-webpush.badge-subscribed {
background: var(--success);
background: var(--accent);
color: var(--text-on-color);
}

View file

@ -128,8 +128,7 @@ func (s *Server) buildAppListData(apps []notification.App) []AppListItem {
for _, sub := range app.Subscriptions {
if sub.Channel == notification.ChannelWebPush && sub.WebPush != nil {
webPushSubs = append(webPushSubs, SubscriptionItem{
ID: sub.ID,
Tooltip: sub.WebPush.Endpoint,
ID: sub.ID,
})
}
}

View file

@ -159,6 +159,10 @@ func (s *Server) handleDeleteSubscription(w http.ResponseWriter, r *http.Request
return
}
util.SetToast(w, fmt.Sprintf("%s disabled", sub.Channel.Label()), "success")
message := fmt.Sprintf("%s disabled", sub.Channel.Label())
if sub.Channel == notification.ChannelWebPush {
message = fmt.Sprintf("%s deleted", sub.Channel.Label())
}
util.SetToast(w, message, "success")
s.handleFragmentApps(w, r)
}

View file

@ -32,7 +32,6 @@
{{range .Subscriptions}}
<span class="channel-badge channel-{{$channel.Channel}} badge-subscribed">
{{$channel.Label}}
{{if .Tooltip}}<span class="tooltip">{{.Tooltip}}</span>{{end}}
<button type="button" class="btn-delete-sub"
hx-delete="/apps/{{$app.AppName}}/subscriptions/{{.ID}}"
hx-target="#apps-list"