Made font type a field in the config file
Этот коммит содержится в:
@@ -626,7 +626,7 @@ func createProfileImage(username string, userId string) ([]byte, *model.AppError
|
|||||||
|
|
||||||
initial := string(strings.ToUpper(username)[0])
|
initial := string(strings.ToUpper(username)[0])
|
||||||
|
|
||||||
fontBytes, err := ioutil.ReadFile(utils.FindDir("web/static/fonts") + "luximbi.ttf")
|
fontBytes, err := ioutil.ReadFile(utils.FindDir("web/static/fonts") + utils.Cfg.ImageSettings.InitialFont)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, model.NewAppError("createProfileImage", "Could not create default profile image font", err.Error())
|
return nil, model.NewAppError("createProfileImage", "Could not create default profile image font", err.Error())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,8 @@
|
|||||||
"PreviewWidth": 1024,
|
"PreviewWidth": 1024,
|
||||||
"PreviewHeight": 0,
|
"PreviewHeight": 0,
|
||||||
"ProfileWidth": 128,
|
"ProfileWidth": 128,
|
||||||
"ProfileHeight": 128
|
"ProfileHeight": 128,
|
||||||
|
"InitialFont": "luximbi.ttf"
|
||||||
},
|
},
|
||||||
"EmailSettings": {
|
"EmailSettings": {
|
||||||
"ByPassEmail" : true,
|
"ByPassEmail" : true,
|
||||||
|
|||||||
@@ -54,7 +54,8 @@
|
|||||||
"PreviewWidth": 1024,
|
"PreviewWidth": 1024,
|
||||||
"PreviewHeight": 0,
|
"PreviewHeight": 0,
|
||||||
"ProfileWidth": 128,
|
"ProfileWidth": 128,
|
||||||
"ProfileHeight": 128
|
"ProfileHeight": 128,
|
||||||
|
"InitialFont": "luximbi.ttf"
|
||||||
},
|
},
|
||||||
"EmailSettings": {
|
"EmailSettings": {
|
||||||
"ByPassEmail" : true,
|
"ByPassEmail" : true,
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ type ImageSettings struct {
|
|||||||
PreviewHeight uint
|
PreviewHeight uint
|
||||||
ProfileWidth uint
|
ProfileWidth uint
|
||||||
ProfileHeight uint
|
ProfileHeight uint
|
||||||
|
InitialFont string
|
||||||
}
|
}
|
||||||
|
|
||||||
type EmailSettings struct {
|
type EmailSettings struct {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user