mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 13:12:34 +00:00 
			
		
		
		
	Keep file tree view icons consistent with icon theme (#33921)
Fix #33914 before:  after:  --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
		@@ -15,8 +15,6 @@ import (
 | 
			
		||||
 | 
			
		||||
	issues_model "code.gitea.io/gitea/models/issues"
 | 
			
		||||
	"code.gitea.io/gitea/modules/emoji"
 | 
			
		||||
	"code.gitea.io/gitea/modules/fileicon"
 | 
			
		||||
	"code.gitea.io/gitea/modules/git"
 | 
			
		||||
	"code.gitea.io/gitea/modules/htmlutil"
 | 
			
		||||
	"code.gitea.io/gitea/modules/log"
 | 
			
		||||
	"code.gitea.io/gitea/modules/markup"
 | 
			
		||||
@@ -181,13 +179,6 @@ func (ut *RenderUtils) RenderLabel(label *issues_model.Label) template.HTML {
 | 
			
		||||
		textColor, itemColor, itemHTML)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (ut *RenderUtils) RenderFileIcon(entry *git.TreeEntry) template.HTML {
 | 
			
		||||
	if setting.UI.FileIconTheme == "material" {
 | 
			
		||||
		return fileicon.DefaultMaterialIconProvider().FileIcon(ut.ctx, entry)
 | 
			
		||||
	}
 | 
			
		||||
	return fileicon.BasicThemeIcon(entry)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// RenderEmoji renders html text with emoji post processors
 | 
			
		||||
func (ut *RenderUtils) RenderEmoji(text string) template.HTML {
 | 
			
		||||
	renderedText, err := markup.PostProcessEmoji(markup.NewRenderContext(ut.ctx), template.HTMLEscapeString(text))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user