From 5c97f1cc886344bb8a9eba315a39c0fc14cee51f Mon Sep 17 00:00:00 2001 From: oppiliappan Date: Tue, 09 Jun 2026 13:02:09 +0000 Subject: [PATCH] appview/pages: UI bits for focus mode Signed-off-by: oppiliappan --- appview/issues/issues.go | 10 +++++----- appview/knots/knots.go | 4 ++-- appview/notifications/notifications.go | 16 ++++++++++++++-- appview/pages/funcmap.go | 4 ++++ appview/pages/pages.go | 276 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------------------ appview/pages/templates/focus/fragments/beginButton.html | 10 ++++++++++ appview/pages/templates/focus/fragments/pill.html | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ appview/pages/templates/layouts/base.html | 2 ++ appview/pages/templates/notifications/fragments/count.html | 2 +- appview/pages/templates/notifications/fragments/preview.html | 32 ++++++++++++++++++-------------- appview/pages/templates/notifications/list.html | 23 ++++------------------- appview/pages/templates/timeline/fragments/notifications.html | 18 ++++++++++-------- appview/pipelines/pipelines.go | 14 +++++++------- appview/pulls/comment.go | 8 ++++---- appview/pulls/compose.go | 2 +- appview/pulls/list.go | 2 +- appview/pulls/single.go | 4 ++-- appview/repo/artifact.go | 4 ++-- appview/repo/branches.go | 2 +- appview/repo/compare.go | 24 ++++++++++++------------ appview/repo/index.go | 4 ++-- appview/repo/log.go | 4 ++-- appview/repo/repo.go | 36 ++++++++++++++++++------------------ appview/repo/settings.go | 8 ++++---- appview/repo/tags.go | 4 ++-- appview/repo/webhooks.go | 8 ++++---- appview/settings/settings.go | 12 ++++++------ appview/spindles/spindles.go | 12 ++++++------ appview/state/gfi.go | 16 ++++++++-------- appview/state/profile.go | 40 ++++++++++++++++++++-------------------- appview/state/search.go | 16 ++++++++-------- appview/state/state.go | 2 +- appview/strings/strings.go | 10 +++++----- appview/timeline/home.go | 2 +- input.css | 14 +++++++++++++- 35 file(s) changed, 396 insertion(s)(+), 301 deletion(s)(-) diff --git a/appview/issues/issues.go b/appview/issues/issues.go --- a/appview/issues/issues.go +++ b/appview/issues/issues.go @@ -166,7 +166,7 @@ defs[l.AtUri().String()] = &l } err = rp.pages.RepoSingleIssue(w, pages.RepoSingleIssueParams{ - BaseParams: pages.BaseParamsFromContext(r.Context()), + BaseParams: pages.BaseParamsFromContext(r.Context()), RepoInfo: rp.repoResolver.GetRepoInfo(r, user), Issue: issue, CommentList: models.NewCommentList(issue.Comments), @@ -196,8 +196,8 @@ switch r.Method { case http.MethodGet: rp.pages.EditIssueFragment(w, pages.EditIssueParams{ BaseParams: pages.BaseParamsFromContext(r.Context()), - RepoInfo: rp.repoResolver.GetRepoInfo(r, user), - Issue: issue, + RepoInfo: rp.repoResolver.GetRepoInfo(r, user), + Issue: issue, }) case http.MethodPost: noticeId := "issues" @@ -632,7 +632,7 @@ baseFilterParts = append(baseFilterParts, item.Raw) } baseFilterQuery := strings.Join(baseFilterParts, " ") rp.pages.RepoIssues(w, pages.RepoIssuesParams{ - BaseParams: pages.BaseParamsFromContext(r.Context()), + BaseParams: pages.BaseParamsFromContext(r.Context()), RepoInfo: repoInfo, Issues: issues, IssueCount: totalIssues, @@ -661,7 +661,7 @@ switch r.Method { case http.MethodGet: rp.pages.RepoNewIssue(w, pages.RepoNewIssueParams{ BaseParams: pages.BaseParamsFromContext(r.Context()), - RepoInfo: rp.repoResolver.GetRepoInfo(r, user), + RepoInfo: rp.repoResolver.GetRepoInfo(r, user), }) case http.MethodPost: body := r.FormValue("body") diff --git a/appview/knots/knots.go b/appview/knots/knots.go --- a/appview/knots/knots.go +++ b/appview/knots/knots.go @@ -90,7 +90,7 @@ } k.Pages.Knots(w, pages.KnotsParams{ BaseParams: pages.BaseParamsFromContext(r.Context()), - Knots: knots, + Knots: knots, }) } @@ -141,7 +141,7 @@ repoMap[r.Did] = append(repoMap[r.Did], r) } k.Pages.Knot(w, pages.KnotParams{ - BaseParams: pages.BaseParamsFromContext(r.Context()), + BaseParams: pages.BaseParamsFromContext(r.Context()), Registration: ®istration, Members: members, Repos: repoMap, diff --git a/appview/notifications/notifications.go b/appview/notifications/notifications.go --- a/appview/notifications/notifications.go +++ b/appview/notifications/notifications.go @@ -152,8 +152,13 @@ if err != nil { l.Error("failed to count social unread", "err", err) } + focusCount, err := db.CountFocusNotifs(n.db, user.Did) + if err != nil { + l.Error("failed to count focus notifs", "err", err) + } + err = n.pages.Notifications(w, pages.NotificationsParams{ - BaseParams: pages.BaseParamsFromContext(r.Context()), + BaseParams: pages.BaseParamsFromContext(r.Context()), MobileGroups: pages.GroupNotificationsByDate(notifications), WorkGroups: pages.GroupNotificationsByDate(workNotifications), SocialGroups: pages.GroupNotificationsByDate(socialNotifications), @@ -163,6 +168,7 @@ Page: page, Total: total, ReadFilter: readFilter, CategoryFilter: categoryFilter, + CanFocus: focusCount > 1, }) if err != nil { l.Error("failed to render page", "err", err) @@ -186,11 +192,17 @@ n.pages.Error500(w) return } + focusCount, err := db.CountFocusNotifs(n.db, user.Did) + if err != nil { + l.Error("failed to count focus notifs", "err", err) + } + err = n.pages.NotificationPreview(w, pages.NotificationPreviewParams{ - BaseParams: pages.BaseParamsFromContext(r.Context()), + BaseParams: pages.BaseParamsFromContext(r.Context()), Notifications: notifications, ReadFilter: readFilter, CategoryFilter: categoryFilter, + CanFocus: focusCount > 1, }) if err != nil { l.Error("failed to render notification preview", "err", err) diff --git a/appview/pages/funcmap.go b/appview/pages/funcmap.go --- a/appview/pages/funcmap.go +++ b/appview/pages/funcmap.go @@ -77,6 +77,9 @@ }, "resolve": func(s string) string { return p.DisplayHandle(context.Background(), s) }, + "resolver": func() *idresolver.Resolver { + return p.resolver + }, "primaryHandle": func(s string) string { return primaryHandle(p.resolver, s) }, @@ -383,6 +386,7 @@ "isNil": func(t any) bool { // returns false for other "zero" values return t == nil }, + "hasPrefix": strings.HasPrefix, "list": func(args ...any) []any { return args }, diff --git a/appview/pages/pages.go b/appview/pages/pages.go --- a/appview/pages/pages.go +++ b/appview/pages/pages.go @@ -42,6 +42,19 @@ type baseParamsCtxKey struct{} type BaseParams struct { LoggedInUser *oauth.MultiAccountUser + FocusParams FocusParams +} + +type FocusParams struct { + Focusing bool + FocusLink string + FocusNotificationID int64 + CurrentPath string // r.URL.Path, for off-focus detection in templates + FocusCount int // total unread focus-eligible items remaining +} + +func (p *Pages) Resolver() *idresolver.Resolver { + return p.resolver } func BaseParamsIntoContext(ctx context.Context, bp BaseParams) context.Context { @@ -384,7 +397,7 @@ } type PrivacyPolicyParams struct { BaseParams - Content template.HTML + Content template.HTML } func (p *Pages) PrivacyPolicy(w io.Writer, params PrivacyPolicyParams) error { @@ -458,11 +471,11 @@ } type GoodFirstIssuesParams struct { BaseParams - Issues []models.Issue - RepoGroups []*models.RepoGroup - LabelDefs map[string]*models.LabelDefinition - GfiLabel *models.LabelDefinition - Page pagination.Page + Issues []models.Issue + RepoGroups []*models.RepoGroup + LabelDefs map[string]*models.LabelDefinition + GfiLabel *models.LabelDefinition + Page pagination.Page } func (p *Pages) GoodFirstIssues(w io.Writer, params GoodFirstIssuesParams) error { @@ -550,11 +563,10 @@ func (p *Pages) NotificationPreview(w io.Writer, params NotificationPreviewParams) error { return p.executePlain("notifications/fragments/preview", w, params) } - type UserKeysSettingsParams struct { BaseParams - PubKeys []models.PublicKey - Tab string + PubKeys []models.PublicKey + Tab string } func (p *Pages) UserKeysSettings(w io.Writer, params UserKeysSettingsParams) error { @@ -564,8 +576,8 @@ } type UserEmailsSettingsParams struct { BaseParams - Emails []models.Email - Tab string + Emails []models.Email + Tab string } func (p *Pages) UserEmailsSettings(w io.Writer, params UserEmailsSettingsParams) error { @@ -575,8 +587,8 @@ } type UserNotificationSettingsParams struct { BaseParams - Preferences *models.NotificationPreferences - Tab string + Preferences *models.NotificationPreferences + Tab string } func (p *Pages) UserNotificationSettings(w io.Writer, params UserNotificationSettingsParams) error { @@ -620,8 +632,8 @@ } type KnotsParams struct { BaseParams - Knots []KnotListingParams - Tab string + Knots []KnotListingParams + Tab string } func (p *Pages) Knots(w io.Writer, params KnotsParams) error { @@ -654,8 +666,8 @@ } type SpindlesParams struct { BaseParams - Spindles []models.Spindle - Tab string + Spindles []models.Spindle + Tab string } func (p *Pages) Spindles(w io.Writer, params SpindlesParams) error { @@ -674,10 +686,10 @@ } type SpindleDashboardParams struct { BaseParams - Spindle models.Spindle - Members []string - Repos map[string][]models.Repo - Tab string + Spindle models.Spindle + Members []string + Repos map[string][]models.Repo + Tab string } func (p *Pages) SpindleDashboard(w io.Writer, params SpindleDashboardParams) error { @@ -686,7 +698,7 @@ } type NewRepoParams struct { BaseParams - Knots []string + Knots []string } func (p *Pages) NewRepo(w io.Writer, params NewRepoParams) error { @@ -695,8 +707,8 @@ } type ForkRepoParams struct { BaseParams - Knots []string - RepoInfo repoinfo.RepoInfo + Knots []string + RepoInfo repoinfo.RepoInfo } func (p *Pages) ForkRepo(w io.Writer, params ForkRepoParams) error { @@ -767,11 +779,11 @@ } type ProfileStarredParams struct { BaseParams - Repos []models.Repo - Card *ProfileCard - Page pagination.Page - Total int - Active string + Repos []models.Repo + Card *ProfileCard + Page pagination.Page + Total int + Active string } func (p *Pages) ProfileStarred(w io.Writer, params ProfileStarredParams) error { @@ -781,9 +793,9 @@ } type ProfileStringsParams struct { BaseParams - Strings []models.String - Card *ProfileCard - Active string + Strings []models.String + Card *ProfileCard + Active string } func (p *Pages) ProfileStrings(w io.Writer, params ProfileStringsParams) error { @@ -809,7 +821,7 @@ return p.executeProfile("user/vouches", w, params) } type FollowCard struct { - UserDid string + UserDid string BaseParams FollowStatus models.FollowStatus FollowersCount int64 @@ -819,9 +831,9 @@ } type ProfileFollowersParams struct { BaseParams - Followers []FollowCard - Card *ProfileCard - Active string + Followers []FollowCard + Card *ProfileCard + Active string } func (p *Pages) ProfileFollowers(w io.Writer, params ProfileFollowersParams) error { @@ -831,9 +843,9 @@ } type ProfileFollowingParams struct { BaseParams - Following []FollowCard - Card *ProfileCard - Active string + Following []FollowCard + Card *ProfileCard + Active string } func (p *Pages) ProfileFollowing(w io.Writer, params ProfileFollowingParams) error { @@ -871,8 +883,8 @@ } type EditBioParams struct { BaseParams - Profile *models.Profile - AlsoKnownAs []string + Profile *models.Profile + AlsoKnownAs []string } func (p *Pages) EditBioFragment(w io.Writer, params EditBioParams) error { @@ -881,8 +893,8 @@ } type EditPinsParams struct { BaseParams - Profile *models.Profile - AllRepos []PinnedRepo + Profile *models.Profile + AllRepos []PinnedRepo } type PinnedRepo struct { @@ -980,11 +992,11 @@ } type RepoCommitParams struct { BaseParams - RepoInfo repoinfo.RepoInfo - Active string - EmailToDid map[string]string - Pipeline *models.Pipeline - DiffOpts types.DiffOpts + RepoInfo repoinfo.RepoInfo + Active string + EmailToDid map[string]string + Pipeline *models.Pipeline + DiffOpts types.DiffOpts // singular because it's always going to be just one VerifiedCommit commitverify.VerifiedCommits @@ -1061,8 +1073,8 @@ } type RepoBranchesParams struct { BaseParams - RepoInfo repoinfo.RepoInfo - Active string + RepoInfo repoinfo.RepoInfo + Active string types.RepoBranchesResponse } @@ -1073,8 +1085,8 @@ } type RepoTagsParams struct { BaseParams - RepoInfo repoinfo.RepoInfo - Active string + RepoInfo repoinfo.RepoInfo + Active string types.RepoTagsResponse ArtifactMap map[plumbing.Hash][]models.Artifact DanglingArtifacts []models.Artifact @@ -1087,8 +1099,8 @@ } type RepoTagParams struct { BaseParams - RepoInfo repoinfo.RepoInfo - Active string + RepoInfo repoinfo.RepoInfo + Active string types.RepoTagResponse ArtifactMap map[plumbing.Hash][]models.Artifact DanglingArtifacts []models.Artifact @@ -1101,8 +1113,8 @@ } type RepoArtifactParams struct { BaseParams - RepoInfo repoinfo.RepoInfo - Artifact models.Artifact + RepoInfo repoinfo.RepoInfo + Artifact models.Artifact } func (p *Pages) RepoArtifactFragment(w io.Writer, params RepoArtifactParams) error { @@ -1217,9 +1229,9 @@ } type WebhookDeliveriesListParams struct { BaseParams - RepoInfo repoinfo.RepoInfo - Webhook *models.Webhook - Deliveries []models.WebhookDelivery + RepoInfo repoinfo.RepoInfo + Webhook *models.Webhook + Deliveries []models.WebhookDelivery } func (p *Pages) WebhookDeliveriesList(w io.Writer, params WebhookDeliveriesListParams) error { @@ -1269,12 +1281,12 @@ } type RepoSingleIssueParams struct { BaseParams - RepoInfo repoinfo.RepoInfo - Active string - Issue *models.Issue - CommentList []models.CommentListItem - Backlinks []models.RichReferenceLink - LabelDefs map[string]*models.LabelDefinition + RepoInfo repoinfo.RepoInfo + Active string + Issue *models.Issue + CommentList []models.CommentListItem + Backlinks []models.RichReferenceLink + LabelDefs map[string]*models.LabelDefinition Reactions map[syntax.ATURI]map[models.ReactionKind]models.ReactionDisplayData UserReacted map[syntax.ATURI]map[models.ReactionKind]bool @@ -1288,9 +1300,9 @@ } type EditIssueParams struct { BaseParams - RepoInfo repoinfo.RepoInfo - Issue *models.Issue - Action string + RepoInfo repoinfo.RepoInfo + Issue *models.Issue + Action string } func (p *Pages) EditIssueFragment(w io.Writer, params EditIssueParams) error { @@ -1313,10 +1325,10 @@ } type RepoNewIssueParams struct { BaseParams - RepoInfo repoinfo.RepoInfo - Issue *models.Issue // existing issue if any -- passed when editing - Active string - Action string + RepoInfo repoinfo.RepoInfo + Issue *models.Issue // existing issue if any -- passed when editing + Active string + Action string } func (p *Pages) RepoNewIssue(w io.Writer, params RepoNewIssueParams) error { @@ -1468,9 +1480,9 @@ } type PullNewCommentParams struct { BaseParams - RepoInfo repoinfo.RepoInfo - Pull *models.Pull - RoundNumber int + RepoInfo repoinfo.RepoInfo + Pull *models.Pull + RoundNumber int } func (p *Pages) PullNewCommentFragment(w io.Writer, params PullNewCommentParams) error { @@ -1479,14 +1491,14 @@ } type RepoCompareParams struct { BaseParams - RepoInfo repoinfo.RepoInfo - Forks []models.Repo - Branches []types.Branch - Tags []*types.TagReference - Base string - Head string - Diff *types.NiceDiff - DiffOpts types.DiffOpts + RepoInfo repoinfo.RepoInfo + Forks []models.Repo + Branches []types.Branch + Tags []*types.TagReference + Base string + Head string + Diff *types.NiceDiff + DiffOpts types.DiffOpts Active string } @@ -1498,12 +1510,12 @@ } type RepoCompareNewParams struct { BaseParams - RepoInfo repoinfo.RepoInfo - Forks []models.Repo - Branches []types.Branch - Tags []*types.TagReference - Base string - Head string + RepoInfo repoinfo.RepoInfo + Forks []models.Repo + Branches []types.Branch + Tags []*types.TagReference + Base string + Head string Active string } @@ -1515,9 +1527,9 @@ } type RepoCompareAllowPullParams struct { BaseParams - RepoInfo repoinfo.RepoInfo - Base string - Head string + RepoInfo repoinfo.RepoInfo + Base string + Head string } func (p *Pages) RepoCompareAllowPullFragment(w io.Writer, params RepoCompareAllowPullParams) error { @@ -1535,10 +1547,10 @@ } type LabelPanelParams struct { BaseParams - RepoInfo repoinfo.RepoInfo - Defs map[string]*models.LabelDefinition - Subject string - State models.LabelState + RepoInfo repoinfo.RepoInfo + Defs map[string]*models.LabelDefinition + Subject string + State models.LabelState } func (p *Pages) LabelPanel(w io.Writer, params LabelPanelParams) error { @@ -1547,11 +1559,11 @@ } type EditLabelPanelParams struct { BaseParams - RepoInfo repoinfo.RepoInfo - Defs map[string]*models.LabelDefinition - Subject string - State models.LabelState - Prefix string + RepoInfo repoinfo.RepoInfo + Defs map[string]*models.LabelDefinition + Subject string + State models.LabelState + Prefix string } func (p *Pages) EditLabelPanel(w io.Writer, params EditLabelPanelParams) error { @@ -1560,11 +1572,11 @@ } type RepoStarsParams struct { BaseParams - RepoInfo repoinfo.RepoInfo - Active string - Starrers []models.Star - Page pagination.Page - TotalCount int + RepoInfo repoinfo.RepoInfo + Active string + Starrers []models.Star + Page pagination.Page + TotalCount int } func (p *Pages) RepoStars(w io.Writer, params RepoStarsParams) error { @@ -1574,11 +1586,11 @@ } type RepoForksParams struct { BaseParams - RepoInfo repoinfo.RepoInfo - Active string - Forks []models.Repo - Page pagination.Page - TotalCount int + RepoInfo repoinfo.RepoInfo + Active string + Forks []models.Repo + Page pagination.Page + TotalCount int } func (p *Pages) RepoForks(w io.Writer, params RepoForksParams) error { @@ -1588,11 +1600,11 @@ } type PipelinesParams struct { BaseParams - RepoInfo repoinfo.RepoInfo - Pipelines []models.Pipeline - Active string - FilterKind string - Total int64 + RepoInfo repoinfo.RepoInfo + Pipelines []models.Pipeline + Active string + FilterKind string + Total int64 } func (p *Pages) Pipelines(w io.Writer, params PipelinesParams) error { @@ -1642,11 +1654,11 @@ } type WorkflowParams struct { BaseParams - RepoInfo repoinfo.RepoInfo - Pipeline models.Pipeline - Workflow string - LogUrl string - Active string + RepoInfo repoinfo.RepoInfo + Pipeline models.Pipeline + Workflow string + LogUrl string + Active string } func (p *Pages) Workflow(w io.Writer, params WorkflowParams) error { @@ -1656,7 +1668,7 @@ } type PutStringParams struct { BaseParams - Action string + Action string // this is supplied in the case of editing an existing string String models.String @@ -1668,8 +1680,8 @@ } type StringsDashboardParams struct { BaseParams - Card ProfileCard - Strings []models.String + Card ProfileCard + Strings []models.String } func (p *Pages) StringsDashboard(w io.Writer, params StringsDashboardParams) error { @@ -1678,7 +1690,7 @@ } type StringTimelineParams struct { BaseParams - Strings []models.String + Strings []models.String } func (p *Pages) StringsTimeline(w io.Writer, params StringTimelineParams) error { @@ -1708,13 +1720,13 @@ } type SearchReposParams struct { BaseParams - Repos []models.Repo - Page pagination.Page - ResultCount int - FilterQuery string - SortParam string - TimeTaken time.Duration - DocCount int64 + Repos []models.Repo + Page pagination.Page + ResultCount int + FilterQuery string + SortParam string + TimeTaken time.Duration + DocCount int64 } func (p *Pages) SearchRepos(w io.Writer, params SearchReposParams) error { diff --git a/appview/pages/templates/focus/fragments/beginButton.html b/appview/pages/templates/focus/fragments/beginButton.html new file mode 100644 --- /dev/null +++ b/appview/pages/templates/focus/fragments/beginButton.html @@ -0,0 +1,10 @@ +{{ define "focus/fragments/beginButton" }} + {{ if and .CanFocus (not .FocusParams.Focusing) }} +
+ +
+ {{ end }} +{{ end }} diff --git a/appview/pages/templates/focus/fragments/pill.html b/appview/pages/templates/focus/fragments/pill.html new file mode 100644 --- /dev/null +++ b/appview/pages/templates/focus/fragments/pill.html @@ -0,0 +1,52 @@ +{{ define "focus/pill" }} + {{ if .Focusing }} + {{ $offFocus := and .FocusLink .CurrentPath (not (hasPrefix .CurrentPath .FocusLink)) }} +
+ {{ if $offFocus }}{{ end }} +
+ +
+ +
+ + {{ $remaining := sub .FocusCount 1 }} + {{ if $offFocus }} + + {{ i "route-off" "size-4" }} + Off track + {{ if gt $remaining 0 }} + {{ $remaining }} remaining + {{ end }} + + {{ else }} + + {{ i "telescope" "size-4" }} + Focusing + {{ if gt $remaining 0 }} + {{ $remaining }} remaining + {{ end }} + + {{ end }} + + {{ if $offFocus }} + + Return {{ i "undo-2" "size-4" }} + + {{ else }} +
+ + +
+ {{ end }} +
+
+ {{ end }} +{{ end }} diff --git a/appview/pages/templates/layouts/base.html b/appview/pages/templates/layouts/base.html --- a/appview/pages/templates/layouts/base.html +++ b/appview/pages/templates/layouts/base.html @@ -105,6 +105,8 @@
{{ template "layouts/fragments/footer" . }}
{{ end }} + + {{ template "focus/pill" .FocusParams }} {{ end }} diff --git a/appview/pages/templates/notifications/fragments/count.html b/appview/pages/templates/notifications/fragments/count.html --- a/appview/pages/templates/notifications/fragments/count.html +++ b/appview/pages/templates/notifications/fragments/count.html @@ -1,6 +1,6 @@ {{define "notifications/fragments/count"}} {{if and .Count (gt .Count 0)}} - + {{if gt .Count 99}}99+{{else}}{{.Count}}{{end}} {{end}} diff --git a/appview/pages/templates/notifications/fragments/preview.html b/appview/pages/templates/notifications/fragments/preview.html --- a/appview/pages/templates/notifications/fragments/preview.html +++ b/appview/pages/templates/notifications/fragments/preview.html @@ -1,8 +1,8 @@ {{ define "notifications/fragments/preview" }} -
- {{ $read := .ReadFilter }} - {{ $cat := .CategoryFilter }} + {{ $read := .ReadFilter }} + {{ $cat := .CategoryFilter }} +
- + {{ if and .CanFocus (not .FocusParams.Focusing) }} + {{ template "focus/fragments/beginButton" . }} + {{ else if not .FocusParams.Focusing }} +
+ {{ range $k, $label := list "all" "work" "social" }} + + {{ $label }} + + {{ end }} +
+ {{ end }}
diff --git a/appview/pages/templates/notifications/list.html b/appview/pages/templates/notifications/list.html --- a/appview/pages/templates/notifications/list.html +++ b/appview/pages/templates/notifications/list.html @@ -10,27 +10,11 @@ (dict "Key" "inbox" "Value" "Inbox" "Icon" "inbox") (dict "Key" "unread" "Value" "Unread" "Icon" "glasses") }} - {{/* Mobile controls: single row */}} -
-
- {{ template "fragments/tabSelector" (dict "Name" "read" "Values" $readVals "Active" .ReadFilter) }} - -
- - {{ i "cog" "size-5" }} - -
- {{/* Desktop controls: single row */}} -