add anc
This commit is contained in:
@@ -776,6 +776,16 @@ func (s *settingProvider) PWA(ctx context.Context) *PWASetting {
|
||||
}
|
||||
}
|
||||
|
||||
// AnnouncementEnabled returns true if announcement is enabled.
|
||||
func (s *settingProvider) AnnouncementEnabled(ctx context.Context) bool {
|
||||
return s.getBoolean(ctx, "announcement_enabled", false)
|
||||
}
|
||||
|
||||
// Announcement returns the site announcement content.
|
||||
func (s *settingProvider) Announcement(ctx context.Context) string {
|
||||
return s.getString(ctx, "announcement", "")
|
||||
}
|
||||
|
||||
func IsTrueValue(val string) bool {
|
||||
return val == "1" || val == "true"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user