mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Add custom emoji support (#16004)
This commit is contained in:
		@@ -208,7 +208,9 @@ var (
 | 
			
		||||
		DefaultTheme          string
 | 
			
		||||
		Themes                []string
 | 
			
		||||
		Reactions             []string
 | 
			
		||||
		ReactionsMap          map[string]bool
 | 
			
		||||
		ReactionsMap          map[string]bool `ini:"-"`
 | 
			
		||||
		CustomEmojis          []string
 | 
			
		||||
		CustomEmojisMap       map[string]string `ini:"-"`
 | 
			
		||||
		SearchRepoDescription bool
 | 
			
		||||
		UseServiceWorker      bool
 | 
			
		||||
 | 
			
		||||
@@ -256,6 +258,8 @@ var (
 | 
			
		||||
		DefaultTheme:        `gitea`,
 | 
			
		||||
		Themes:              []string{`gitea`, `arc-green`},
 | 
			
		||||
		Reactions:           []string{`+1`, `-1`, `laugh`, `hooray`, `confused`, `heart`, `rocket`, `eyes`},
 | 
			
		||||
		CustomEmojis:        []string{`gitea`},
 | 
			
		||||
		CustomEmojisMap:     map[string]string{"gitea": ":gitea:"},
 | 
			
		||||
		Notification: struct {
 | 
			
		||||
			MinTimeout            time.Duration
 | 
			
		||||
			TimeoutStep           time.Duration
 | 
			
		||||
@@ -983,6 +987,10 @@ func NewContext() {
 | 
			
		||||
	for _, reaction := range UI.Reactions {
 | 
			
		||||
		UI.ReactionsMap[reaction] = true
 | 
			
		||||
	}
 | 
			
		||||
	UI.CustomEmojisMap = make(map[string]string)
 | 
			
		||||
	for _, emoji := range UI.CustomEmojis {
 | 
			
		||||
		UI.CustomEmojisMap[emoji] = ":" + emoji + ":"
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func parseAuthorizedPrincipalsAllow(values []string) ([]string, bool) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user