[REFACTOR] add Icon to webhook.Interface
This commit is contained in:
parent
bc04183e47
commit
120fa61a0a
15 changed files with 54 additions and 2 deletions
|
@ -9,6 +9,7 @@ import (
|
|||
"crypto/sha1"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"regexp"
|
||||
|
@ -20,6 +21,7 @@ import (
|
|||
"code.gitea.io/gitea/modules/log"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
api "code.gitea.io/gitea/modules/structs"
|
||||
"code.gitea.io/gitea/modules/svg"
|
||||
"code.gitea.io/gitea/modules/util"
|
||||
webhook_module "code.gitea.io/gitea/modules/webhook"
|
||||
"code.gitea.io/gitea/services/forms"
|
||||
|
@ -29,6 +31,10 @@ type matrixHandler struct{}
|
|||
|
||||
func (matrixHandler) Type() webhook_module.HookType { return webhook_module.MATRIX }
|
||||
|
||||
func (matrixHandler) Icon(size int) template.HTML {
|
||||
return svg.RenderHTML("gitea-matrix", size, "img")
|
||||
}
|
||||
|
||||
func (matrixHandler) FormFields(bind func(any)) FormFields {
|
||||
var form struct {
|
||||
forms.WebhookForm
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue