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

View file

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

View file

@ -159,6 +159,10 @@ func (s *Server) handleDeleteSubscription(w http.ResponseWriter, r *http.Request
return 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) s.handleFragmentApps(w, r)
} }

View file

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