appview/models: add NotificationTypeUserMentioned notif type #737

merged
opened by boltless.me targeting master from feat/mentions
Changed files
+7
appview
models
pages
templates
notifications
fragments
+5
appview/models/notifications.go
···
NotificationTypeIssueReopen NotificationType = "issue_reopen"
NotificationTypePullClosed NotificationType = "pull_closed"
NotificationTypePullReopen NotificationType = "pull_reopen"
+
NotificationTypeUserMentioned NotificationType = "user_mentioned"
)
type Notification struct {
···
return "git-pull-request-create"
case NotificationTypeFollowed:
return "user-plus"
+
case NotificationTypeUserMentioned:
+
return "at-sign"
default:
return ""
}
···
return prefs.PullCreated // same pref for now
case NotificationTypeFollowed:
return prefs.Followed
+
case NotificationTypeUserMentioned:
+
return true // always notify on mention
default:
return false
}
+2
appview/pages/templates/notifications/fragments/item.html
···
reopened a pull request
{{ else if eq .Type "followed" }}
followed you
+
{{ else if eq .Type "user_mentioned" }}
+
mentioned you
{{ else }}
{{ end }}
{{ end }}