mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-14 01:35:55 +09:00
1 parent
00767a0522
commit
85f34ba538
16 files changed
+148
-121
No files matched your search
@@ -13,7 +13,7 @@ watch_dirs = [
|
||||
watch_exts = [".go"]
|
||||
build_delay = 1500
|
||||
cmds = [
|
||||
["go", "install", "-tags", "sqlite"],# redis memcache cert pam
|
||||
["go", "install", "-tags", "sqlite"],# redis memcache cert pam tidb
|
||||
["go", "build", "-tags", "sqlite"],
|
||||
["./gogs", "web"]
|
||||
]
|
||||
@@ -241,7 +241,7 @@ location = Location
|
||||
update_profile = Update Profile
|
||||
update_profile_success = Your profile has been updated successfully.
|
||||
change_username = Username Changed
|
||||
change_username_desc = You changed your username. This will affect the way how links relate to your account. Do you want to continue?
|
||||
change_username_prompt = This change will affect the way how links relate to your account.
|
||||
continue = Continue
|
||||
cancel = Cancel
|
||||
|
||||
|
||||
@@ -72,6 +72,7 @@ var (
|
||||
}
|
||||
|
||||
EnableSQLite3 bool
|
||||
EnableTidb bool
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -143,6 +144,14 @@ func getEngine() (*xorm.Engine, error) {
|
||||
return nil, fmt.Errorf("Fail to create directories: %v", err)
|
||||
}
|
||||
cnnstr = "file:" + DbCfg.Path + "?cache=shared&mode=rwc"
|
||||
case "tidb":
|
||||
if !EnableTidb {
|
||||
return nil, fmt.Errorf("Unknown database type: %s", DbCfg.Type)
|
||||
}
|
||||
if err := os.MkdirAll(path.Dir(DbCfg.Path), os.ModePerm); err != nil {
|
||||
return nil, fmt.Errorf("Fail to create directories: %v", err)
|
||||
}
|
||||
cnnstr = "goleveldb://" + DbCfg.Path
|
||||
default:
|
||||
return nil, fmt.Errorf("Unknown database type: %s", DbCfg.Type)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
// +build tidb
|
||||
|
||||
// Copyright 2015 The Gogs Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
_ "github.com/go-xorm/tidb"
|
||||
_ "github.com/pingcap/tidb"
|
||||
)
|
||||
|
||||
func init() {
|
||||
EnableTidb = true
|
||||
}
|
||||
@@ -88,12 +88,12 @@ func (f *SignInForm) Validate(ctx *macaron.Context, errs binding.Errors) binding
|
||||
// \/ \/ \/ \/ \/
|
||||
|
||||
type UpdateProfileForm struct {
|
||||
UserName string `form:"uname" binding:"Required;MaxSize(35)"`
|
||||
FullName string `form:"fullname" binding:"MaxSize(100)"`
|
||||
Email string `form:"email" binding:"Required;Email;MaxSize(254)"`
|
||||
Website string `form:"website" binding:"Url;MaxSize(100)"`
|
||||
Location string `form:"location" binding:"MaxSize(50)"`
|
||||
Avatar string `form:"avatar" binding:"Required;Email;MaxSize(254)"`
|
||||
Name string `binding:"Required;MaxSize(35)"`
|
||||
FullName string `binding:"MaxSize(100)"`
|
||||
Email string `binding:"Required;Email;MaxSize(254)"`
|
||||
Website string `binding:"Url;MaxSize(100)"`
|
||||
Location string `binding:"MaxSize(50)"`
|
||||
Gravatar string `binding:"Required;Email;MaxSize(254)"`
|
||||
}
|
||||
|
||||
func (f *UpdateProfileForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
|
||||
@@ -101,8 +101,8 @@ func (f *UpdateProfileForm) Validate(ctx *macaron.Context, errs binding.Errors)
|
||||
}
|
||||
|
||||
type UploadAvatarForm struct {
|
||||
Enable bool `form:"enable"`
|
||||
Avatar *multipart.FileHeader `form:"avatar"`
|
||||
Enable bool
|
||||
Avatar *multipart.FileHeader
|
||||
}
|
||||
|
||||
func (f *UploadAvatarForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
|
||||
|
||||
@@ -76,7 +76,6 @@ func ToUtf8WithErr(content []byte) (error, string) {
|
||||
}
|
||||
|
||||
encoding, _ := charset.Lookup(charsetLabel)
|
||||
|
||||
if encoding == nil {
|
||||
return fmt.Errorf("unknow char decoder %s", charsetLabel), string(content)
|
||||
}
|
||||
|
||||
@@ -4364,7 +4364,7 @@ func confLocaleLocale_deDeIni() (*asset, error) {
|
||||
return a, nil
|
||||
}
|
||||
|
||||
var _confLocaleLocale_enUsIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xc4\xbd\xeb\x92\xdc\x46\xae\x27\xfe\x9d\x4f\x41\xeb\x84\xfe\xb2\x23\x5a\xa5\xb0\xfd\xdf\x4b\x38\x24\x79\x5b\xdd\xd6\x65\x8e\x5a\xdd\xa3\x6e\xcf\xec\xac\x42\x41\xb3\x8a\xac\x2a\x8e\xaa\xc8\x32\xc9\x52\xa9\xe7\xc4\x89\xd8\xd7\xd8\xd7\xdb\x27\x59\xe0\x07\x20\x2f\x24\xab\x25\x79\x4e\xec\x7e\xe9\x66\x65\x22\x6f\x48\x24\x12\x40\x22\x91\xf9\x6e\x97\x15\x65\xb7\x48\x9f\xa4\xa7\xe9\x2e\xaf\xea\x4d\xd9\x75\x69\x57\x6e\x96\x0f\xd7\x4d\xd7\x97\x45\xfa\xa2\xea\xe9\x77\xfb\xb1\x5a\x94\x49\xb2\x6e\xb6\x25\x81\xbe\xa4\x7f\x49\x91\x77\xeb\x79\x93\xb7\x05\x25\x9c\xdb\x77\x52\x7e\xda\x6d\x9a\x96\x81\x7e\x91\xaf\x64\x5d\x6e\x76\x5c\x86\xfe\x25\x5d\xb5\xaa\xb3\xaa\xa6\x9f\xd7\xf4\x95\xbe\xaa\x93\xae\x59\x54\xf9\x26\x0b\x32\x90\x60\xf9\x3f\xa5\x3f\xd4\x45\x7a\xdd\x97\xbb\xf4\x71\xb7\xcd\x37\x9b\xa7\x79\x87\x22\x7d\x99\xe6\x8b\x45\xb3\xaf\xfb\xc7\x8f\x24\x43\x2a\x6f\xf6\xbd\xd5\x7e\xb9\xef\x25\x6d\xbf\xb3\xa4\x5f\x77\x49\x5b\xae\x2a\x1a\x58\x4b\x49\x6f\xf5\x33\x39\x94\xf3\xae\xea\xb9\xd3\x7f\x95\xaf\xe4\x63\xd9\x76\x55\xc3\xfd\xf9\x8b\x7c\x25\xbb\x7c\xc5\x00\x57\xf4\x2f\xe9\xcb\xed\x6e\x93\xa3\xc0\x8d\x7e\x26\x9b\xbc\x5e\xed\x05\xe6\xb5\x7e\x26\x8b\xb6\xa4\xac\xac\x2e\x0f\x94\x7a\x86\x1f\x29\xfd\x98\xcd\x66\xc9\x9e\x70\x9a\xed\xda\x66\x59\x6d\xca\x2c\xaf\x8b\x6c\x2b\x58\xfb\x95\xd2\x53\x4d\x4f\x29\x3d\xe5\x74\x0c\xa3\x2c\x08\x41\x59\xde\xe9\x58\x68\x6a\x08\x5f\x79\x97\xa0\xaa\x3a\xdf\x5a\x69\xfe\x4c\xca\x6d\x5e\x6d\x78\x12\x1e\xf2\x07\x75\xbe\xeb\x0e\x0d\xa6\xea\x4a\x3f\x09\x11\x59\x7f\xbb\x2b\x81\x87\x87\x37\xf4\x95\x2c\xf2\x5d\xbf\x58\xe7\xdc\x57\xf9\x4a\x08\x68\xd7\x10\x42\x9a\xf6\x16\x70\xf6\x23\x69\xda\x55\x5e\x57\xff\xc8\x7b\x41\xd2\x65\xf0\x33\xd9\x56\x6d\xdb\x30\x7e\x2f\xf0\x91\xd0\x88\x33\xae\x87\x52\xde\x10\x26\x82\x5a\x38\x67\x5b\xad\x5a\x41\x25\x67\x5e\xe0\x17\xd7\xc2\x79\xcb\xa6\xfd\xa0\x19\xcf\xf9\x73\x50\x94\x3a\xa1\xb9\x71\xfb\x79\x4d\xc8\xd7\xdc\x0b\xfc\x88\x00\xba\x24\x2f\xb6\x84\xca\x5d\x5e\x97\x8c\xa3\x53\xfe\x45\x78\xa1\x5f\x89\xd2\x54\xd6\x95\x7d\x5f\xd5\x2b\x46\xf6\xa9\x24\xa5\xd7\x9a\x94\x04\x79\x2e\xed\xb6\xd9\xbb\xe9\xa4\xf4\xbf\xd1\xcf\xf4\x4a\x7e\x4a\x5e\x50\x08\x99\xae\x24\x8f\xa4\xcb\x96\x65\x59\xc8\x58\xba\xf4\x39\x7d\x27\xbb\xfd\x66\x43\x58\xfb\x7d\x5f\x76\x3d\x17\xba\xa2\xdf\x34\x7e\xf9\x9d\x54\x5d\x47\x1f\x94\xfc\x0a\x1f\x09\x4d\x5d\xbd\xc0\x60\xce\xf0\x91\x24\xef\xba\x32\x6f\x17\xeb\xf7\x89\xfc\x47\x5f\xf9\x83\x69\xef\xd8\xa4\x32\x21\x29\x11\x49\x0b\xd6\x40\xb2\x68\x0a\xfe\x71\x46\xff\xa8\xea\xaa\xee\x7a\x5a\x71\xef\x13\xfd\x60\x30\xf9\x92\x09\xe8\xab\x1e\x58\xd0\x44\x2c\xdf\x8e\x67\x30\x7d\x5e\xb5\x5d\xff\xb0\xaf\x88\x58\xdf\xee\xeb\x84\xc7\x47\xab\x2d\x2b\xe6\xc6\x84\x5e\x34\x84\x22\x24\xb7\x34\xbe\x8b\xdb\xeb\x3f\xbf\x3e\x49\xaf\x88\x13\xad\xda\x92\xbe\x53\xaa\x83\xfe\x51\x99\x1f\x67\x09\x95\xb2\x96\xce\xf3\x3e\x9f\xe7\x5d\xe9\xd1\xca\x99\x42\xdd\x2e\x0f\x34\xce\x5c\x0d\x1c\xac\xeb\xa3\xf1\x4e\xad\x10\xaa\x43\xd7\x95\xab\xe3\x0d\x2f\x2e\x4a\x67\xa6\x86\xc2\x57\x9b\x92\xd3\xa9\xaa\xf4\xd5\x9b\x37\x97\xe7\xcf\xd2\xb2\x5e\x55\x75\x99\x1e\xaa\x7e\x9d\xee\xfb\xe5\x7f\xcd\x56\x65\x5d\xb6\xc4\xe3\x16\x55\x4a\x6b\xaa\x25\x4a\x48\x89\xb0\x65\x70\xb3\xa4\xeb\x36\xb4\xf6\x81\xde\xeb\xeb\xd7\xe9\x05\xa3\x78\x97\xf7\x6b\x74\xa4\x5f\x27\xdd\xef\x1b\x46\x91\x6b\xf0\x66\x5d\xa6\xa0\x32\x00\x35\x4b\xc3\x47\x5a\x68\x1f\x67\x49\xd9\xb6\x19\xb1\xa5\xfe\x36\xd3\xc2\x5a\xdf\x10\x52\xaa\x20\xd2\xa9\x9b\x3e\x9d\x97\x29\xca\xcc\x92\xc4\x3a\x6c\xd8\x3d\xdd\xed\x36\xd5\x42\xd6\xfa\x0b\xc9\xf3\x88\xe6\x1d\x44\xb1\x14\xc2\x01\x51\x96\x17\xa0\x8b\xd8\x33\xaf\x87\x34\x62\x20\x28\xbf\x2e\x89\x01\xae\xf7\x2b\x61\x7b\x9b\x66\x5f\x7c\x03\x4a\xb5\xde\x7b\x42\x4d\xdf\x36\xd4\x61\x60\xc7\x01\xf8\x26\x4e\x89\xe2\x78\xd3\x6a\xcb\x6d\x43\x7c\xc5\x11\x7b\x45\x04\x75\xa8\x28\x93\x46\xda\xe5\x1f\x69\xbd\xf5\x4d\xda\xaf\xab\x2e\x2d\x88\xd8\x16\x5c\x31\x2d\x8d\x3d\x6d\x17\x42\x16\x44\xa0\x42\x1a\x96\x16\xcf\x01\xa0\xb6\x7b\xa2\xa6\x35\x55\xc6\x9b\x11\xef\x9c\x54\xe5\x54\x3f\x31\x24\xaa\x07\xf4\x4d\x94\xdb\x10\x57\x66\xbe\x79\x8e\x0f\xfd\x1d\xd6\x4f\xbd\xca\x97\x4b\xea\x55\x47\x54\xf1\x32\x5d\x6c\x1a\x22\xa9\x5f\xdf\xbe\xee\x98\x60\xd6\xd9\xae\x69\xb1\xcd\x51\xd6\x15\x7d\xba\xb4\x00\xd1\x0c\x51\xef\xb7\x73\xfa\x75\x58\x57\xc4\x01\x80\x76\x2e\xc1\xbb\x39\xa5\x52\x13\xfb\x8e\xa6\xf0\x24\x25\x12\xa6\x11\x10\xca\x40\x00\x3c\x86\xa2\xea\xf2\x39\xcd\x3d\x83\x2f\x69\xdb\xda\xb7\x44\x56\xeb\xbe\xdf\x59\xcb\x2f\x6f\x6e\xae\xa4\x69\x97\x7a\x57\xdb\x79\x40\x19\x98\x83\x0d\x6f\xbc\x75\xda\xd4\x33\x10\xc9\xbe\xdd\x0c\xe8\x87\xc6\x6a\x39\x47\xf0\xc2\x5d\x78\xc4\x7f\xae\x3d\x7a\x80\xe7\x8e\xa4\x93\x03\xa8\x89\x70\x5c\x62\x03\x24\xa2\x6e\x76\x5c\x6f\x40\xd5\x97\x9a\xe0\x49\x19\x9b\xa6\xcb\x97\xad\x93\x72\x21\xfb\x04\xec\x7f\x4b\x03\x56\x36\x72\x7d\x41\x68\x00\x2f\x41\xea\xb2\x6d\xb6\x94\xfa\x9c\xfe\xf9\x04\xdf\xfd\x0b\xae\x0f\x30\x79\x51\x10\x7f\xeb\x4e\xd2\xb7\xcf\xcf\xd2\xff\xf4\xe3\x0f\x3f\xcc\xd2\x57\x3d\xaf\x44\x26\xce\xbf\x33\x51\xd1\xa7\xec\xe1\x0e\x94\x58\x46\x4f\x7Line truncated
|
||||
var _confLocaleLocale_enUsIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xc4\xbd\xeb\x92\xdc\x46\xae\x27\xfe\x9d\x4f\x41\xeb\x84\xfe\xb2\x23\x5a\xa5\xb0\xfd\xdf\x4b\x38\x24\x79\x5b\xdd\xd6\x65\x8e\x5a\xdd\xa3\x6e\xcf\xec\xac\x42\x41\xb3\x8a\xac\x2a\x8e\xaa\xc8\x32\xc9\x52\xa9\xe7\xc4\x89\xd8\xd7\xd8\xd7\xdb\x27\x59\xe0\x07\x20\x2f\x24\xab\x25\x79\x4e\xec\x7e\xe9\x66\x65\x22\x6f\x48\x24\x12\x40\x22\x91\xf9\x6e\x97\x15\x65\xb7\x48\x9f\xa4\xa7\xe9\x2e\xaf\xea\x4d\xd9\x75\x69\x57\x6e\x96\x0f\xd7\x4d\xd7\x97\x45\xfa\xa2\xea\xe9\x77\xfb\xb1\x5a\x94\x49\xb2\x6e\xb6\x25\x81\xbe\xa4\x7f\x49\x91\x77\xeb\x79\x93\xb7\x05\x25\x9c\xdb\x77\x52\x7e\xda\x6d\x9a\x96\x81\x7e\x91\xaf\x64\x5d\x6e\x76\x5c\x86\xfe\x25\x5d\xb5\xaa\xb3\xaa\xa6\x9f\xd7\xf4\x95\xbe\xaa\x93\xae\x59\x54\xf9\x26\x0b\x32\x90\x60\xf9\x3f\xa5\x3f\xd4\x45\x7a\xdd\x97\xbb\xf4\x71\xb7\xcd\x37\x9b\xa7\x79\x87\x22\x7d\x99\xe6\x8b\x45\xb3\xaf\xfb\xc7\x8f\x24\x43\x2a\x6f\xf6\xbd\xd5\x7e\xb9\xef\x25\x6d\xbf\xb3\xa4\x5f\x77\x49\x5b\xae\x2a\x1a\x58\x4b\x49\x6f\xf5\x33\x39\x94\xf3\xae\xea\xb9\xd3\x7f\x95\xaf\xe4\x63\xd9\x76\x55\xc3\xfd\xf9\x8b\x7c\x25\xbb\x7c\xc5\x00\x57\xf4\x2f\xe9\xcb\xed\x6e\x93\xa3\xc0\x8d\x7e\x26\x9b\xbc\x5e\xed\x05\xe6\xb5\x7e\x26\x8b\xb6\xa4\xac\xac\x2e\x0f\x94\x7a\x86\x1f\x29\xfd\x98\xcd\x66\xc9\x9e\x70\x9a\xed\xda\x66\x59\x6d\xca\x2c\xaf\x8b\x6c\x2b\x58\xfb\x95\xd2\x53\x4d\x4f\x29\x3d\xe5\x74\x0c\xa3\x2c\x08\x41\x59\xde\xe9\x58\x68\x6a\x08\x5f\x79\x97\xa0\xaa\x3a\xdf\x5a\x69\xfe\x4c\xca\x6d\x5e\x6d\x78\x12\x1e\xf2\x07\x75\xbe\xeb\x0e\x0d\xa6\xea\x4a\x3f\x09\x11\x59\x7f\xbb\x2b\x81\x87\x87\x37\xf4\x95\x2c\xf2\x5d\xbf\x58\xe7\xdc\x57\xf9\x4a\x08\x68\xd7\x10\x42\x9a\xf6\x16\x70\xf6\x23\x69\xda\x55\x5e\x57\xff\xc8\x7b\x41\xd2\x65\xf0\x33\xd9\x56\x6d\xdb\x30\x7e\x2f\xf0\x91\xd0\x88\x33\xae\x87\x52\xde\x10\x26\x82\x5a\x38\x67\x5b\xad\x5a\x41\x25\x67\x5e\xe0\x17\xd7\xc2\x79\xcb\xa6\xfd\xa0\x19\xcf\xf9\x73\x50\x94\x3a\xa1\xb9\x71\xfb\x79\x4d\xc8\xd7\xdc\x0b\xfc\x88\x00\xba\x24\x2f\xb6\x84\xca\x5d\x5e\x97\x8c\xa3\x53\xfe\x45\x78\xa1\x5f\x89\xd2\x54\xd6\x95\x7d\x5f\xd5\x2b\x46\xf6\xa9\x24\xa5\xd7\x9a\x94\x04\x79\x2e\xed\xb6\xd9\xbb\xe9\xa4\xf4\xbf\xd1\xcf\xf4\x4a\x7e\x4a\x5e\x50\x08\x99\xae\x24\x8f\xa4\xcb\x96\x65\x59\xc8\x58\xba\xf4\x39\x7d\x27\xbb\xfd\x66\x43\x58\xfb\x7d\x5f\x76\x3d\x17\xba\xa2\xdf\x34\x7e\xf9\x9d\x54\x5d\x47\x1f\x94\xfc\x0a\x1f\x09\x4d\x5d\xbd\xc0\x60\xce\xf0\x91\x24\xef\xba\x32\x6f\x17\xeb\xf7\x89\xfc\x47\x5f\xf9\x83\x69\xef\xd8\xa4\x32\x21\x29\x11\x49\x0b\xd6\x40\xb2\x68\x0a\xfe\x71\x46\xff\xa8\xea\xaa\xee\x7a\x5a\x71\xef\x13\xfd\x60\x30\xf9\x92\x09\xe8\xab\x1e\x58\xd0\x44\x2c\xdf\x8e\x67\x30\x7d\x5e\xb5\x5d\xff\xb0\xaf\x88\x58\xdf\xee\xeb\x84\xc7\x47\xab\x2d\x2b\xe6\xc6\x84\x5e\x34\x84\x22\x24\xb7\x34\xbe\x8b\xdb\xeb\x3f\xbf\x3e\x49\xaf\x88\x13\xad\xda\x92\xbe\x53\xaa\x83\xfe\x51\x99\x1f\x67\x09\x95\xb2\x96\xce\xf3\x3e\x9f\xe7\x5d\xe9\xd1\xca\x99\x42\xdd\x2e\x0f\x34\xce\x5c\x0d\x1c\xac\xeb\xa3\xf1\x4e\xad\x10\xaa\x43\xd7\x95\xab\xe3\x0d\x2f\x2e\x4a\x67\xa6\x86\xc2\x57\x9b\x92\xd3\xa9\xaa\xf4\xd5\x9b\x37\x97\xe7\xcf\xd2\xb2\x5e\x55\x75\x99\x1e\xaa\x7e\x9d\xee\xfb\xe5\x7f\xcd\x56\x65\x5d\xb6\xc4\xe3\x16\x55\x4a\x6b\xaa\x25\x4a\x48\x89\xb0\x65\x70\xb3\xa4\xeb\x36\xb4\xf6\x81\xde\xeb\xeb\xd7\xe9\x05\xa3\x78\x97\xf7\x6b\x74\xa4\x5f\x27\xdd\xef\x1b\x46\x91\x6b\xf0\x66\x5d\xa6\xa0\x32\x00\x35\x4b\xc3\x47\x5a\x68\x1f\x67\x49\xd9\xb6\x19\xb1\xa5\xfe\x36\xd3\xc2\x5a\xdf\x10\x52\xaa\x20\xd2\xa9\x9b\x3e\x9d\x97\x29\xca\xcc\x92\xc4\x3a\x6c\xd8\x3d\xdd\xed\x36\xd5\x42\xd6\xfa\x0b\xc9\xf3\x88\xe6\x1d\x44\xb1\x14\xc2\x01\x51\x96\x17\xa0\x8b\xd8\x33\xaf\x87\x34\x62\x20\x28\xbf\x2e\x89\x01\xae\xf7\x2b\x61\x7b\x9b\x66\x5f\x7c\x03\x4a\xb5\xde\x7b\x42\x4d\xdf\x36\xd4\x61\x60\xc7\x01\xf8\x26\x4e\x89\xe2\x78\xd3\x6a\xcb\x6d\x43\x7c\xc5\x11\x7b\x45\x04\x75\xa8\x28\x93\x46\xda\xe5\x1f\x69\xbd\xf5\x4d\xda\xaf\xab\x2e\x2d\x88\xd8\x16\x5c\x31\x2d\x8d\x3d\x6d\x17\x42\x16\x44\xa0\x42\x1a\x96\x16\xcf\x01\xa0\xb6\x7b\xa2\xa6\x35\x55\xc6\x9b\x11\xef\x9c\x54\xe5\x54\x3f\x31\x24\xaa\x07\xf4\x4d\x94\xdb\x10\x57\x66\xbe\x79\x8e\x0f\xfd\x1d\xd6\x4f\xbd\xca\x97\x4b\xea\x55\x47\x54\xf1\x32\x5d\x6c\x1a\x22\xa9\x5f\xdf\xbe\xee\x98\x60\xd6\xd9\xae\x69\xb1\xcd\x51\xd6\x15\x7d\xba\xb4\x00\xd1\x0c\x51\xef\xb7\x73\xfa\x75\x58\x57\xc4\x01\x80\x76\x2e\xc1\xbb\x39\xa5\x52\x13\xfb\x8e\xa6\xf0\x24\x25\x12\xa6\x11\x10\xca\x40\x00\x3c\x86\xa2\xea\xf2\x39\xcd\x3d\x83\x2f\x69\xdb\xda\xb7\x44\x56\xeb\xbe\xdf\x59\xcb\x2f\x6f\x6e\xae\xa4\x69\x97\x7a\x57\xdb\x79\x40\x19\x98\x83\x0d\x6f\xbc\x75\xda\xd4\x33\x10\xc9\xbe\xdd\x0c\xe8\x87\xc6\x6a\x39\x47\xf0\xc2\x5d\x78\xc4\x7f\xae\x3d\x7a\x80\xe7\x8e\xa4\x93\x03\xa8\x89\x70\x5c\x62\x03\x24\xa2\x6e\x76\x5c\x6f\x40\xd5\x97\x9a\xe0\x49\x19\x9b\xa6\xcb\x97\xad\x93\x72\x21\xfb\x04\xec\x7f\x4b\x03\x56\x36\x72\x7d\x41\x68\x00\x2f\x41\xea\xb2\x6d\xb6\x94\xfa\x9c\xfe\xf9\x04\xdf\xfd\x0b\xae\x0f\x30\x79\x51\x10\x7f\xeb\x4e\xd2\xb7\xcf\xcf\xd2\xff\xf4\xe3\x0f\x3f\xcc\xd2\x57\x3d\xaf\x44\x26\xce\xbf\x33\x51\xd1\xa7\xec\xe1\x0e\x94\x58\x46\x4f\x7Line truncated
|
||||
|
||||
func confLocaleLocale_enUsIniBytes() ([]byte, error) {
|
||||
return bindataRead(
|
||||
@@ -4379,7 +4379,7 @@ func confLocaleLocale_enUsIni() (*asset, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "conf/locale/locale_en-US.ini", size: 42114, mode: os.FileMode(420), modTime: time.Unix(1441551355, 0)}
|
||||
info := bindataFileInfo{name: "conf/locale/locale_en-US.ini", size: 42071, mode: os.FileMode(420), modTime: time.Unix(1441567776, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
@font-face{font-family:octicons;src:url(../fonts/octicons.eot?#iefix&v=396334ee3da78f4302d25c758ae3e3ce5dc3c97d) format('embedded-opentype'),url(../fonts/octicons.woff?v=396334ee3da78f4302d25c758ae3e3ce5dc3c97d) format('woff'),url(../fonts/octicons.ttf?v=396334ee3da78f4302d25c758ae3e3ce5dc3c97d) format('truetype'),url(../fonts/octicons.svg?v=396334ee3da78f4302d25c758ae3e3ce5dc3c97d#octicons) format('svg');font-weight:400;font-style:normal}.mega-octicon,.octicon{font:normal normal normal 16px/1 octicons;display:inline-block;text-decoration:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mega-octicon{font-size:32px}.octicon-alert:before{content:'\f02d'}.octicon-arrow-down:before{content:'\f03f'}.octicon-arrow-left:before{content:'\f040'}.octicon-arrow-right:before{content:'\f03e'}.octicon-arrow-small-down:before{content:'\f0a0'}.octicon-arrow-small-left:before{content:'\f0a1'}.octicon-arrow-small-right:before{content:'\f071'}.octicon-arrow-small-up:before{content:'\f09f'}.octicon-arrow-up:before{content:'\f03d'}.octicon-beaker:before,.octicon-microscope:before{content:'\f0dd'}.octicon-bell:before{content:'\f0de'}.octicon-book:before{content:'\f007'}.octicon-bookmark:before{content:'\f07b'}.octicon-briefcase:before{content:'\f0d3'}.octicon-broadcast:before{content:'\f048'}.octicon-browser:before{content:'\f0c5'}.octicon-bug:before{content:'\f091'}.octicon-calendar:before{content:'\f068'}.octicon-check:before{content:'\f03a'}.octicon-checklist:before{content:'\f076'}.octicon-chevron-down:before{content:'\f0a3'}.octicon-chevron-left:before{content:'\f0a4'}.octicon-chevron-right:before{content:'\f078'}.octicon-chevron-up:before{content:'\f0a2'}.octicon-circle-slash:before{content:'\f084'}.octicon-circuit-board:before{content:'\f0d6'}.octicon-clippy:before{content:'\f035'}.octicon-clock:before{content:'\f046'}.octicon-cloud-download:before{content:'\f00b'}.octicon-cloud-upload:before{content:'\f00c'}.octicon-code:before{content:'\f05f'}.octicon-color-mode:before{content:'\f065'}.octicon-comment-add:before,.octicon-comment:before{content:'\f02b'}.octicon-comment-discussion:before{content:'\f04f'}.octicon-credit-card:before{content:'\f045'}.octicon-dash:before{content:'\f0ca'}.octicon-dashboard:before{content:'\f07d'}.octicon-database:before{content:'\f096'}.octicon-clone:before,.octicon-desktop-download:before{content:'\f0dc'}.octicon-device-camera:before{content:'\f056'}.octicon-device-camera-video:before{content:'\f057'}.octicon-device-desktop:before{content:'\f27c'}.octicon-device-mobile:before{content:'\f038'}.octicon-diff:before{content:'\f04d'}.octicon-diff-added:before{content:'\f06b'}.octicon-diff-ignored:before{content:'\f099'}.octicon-diff-modified:before{content:'\f06d'}.octicon-diff-removed:before{content:'\f06c'}.octicon-diff-renamed:before{content:'\f06e'}.octicon-ellipsis:before{content:'\f09a'}.octicon-eye-unwatch:before,.octicon-eye-watch:before,.octicon-eye:before{content:'\f04e'}.octicon-file-binary:before{content:'\f094'}.octicon-file-code:before{content:'\f010'}.octicon-file-directory:before{content:'\f016'}.octicon-file-media:before{content:'\f012'}.octicon-file-pdf:before{content:'\f014'}.octicon-file-submodule:before{content:'\f017'}.octicon-file-symlink-directory:before{content:'\f0b1'}.octicon-file-symlink-file:before{content:'\f0b0'}.octicon-file-text:before{content:'\f011'}.octicon-file-zip:before{content:'\f013'}.octicon-flame:before{content:'\f0d2'}.octicon-fold:before{content:'\f0cc'}.octicon-gear:before{content:'\f02f'}.octicon-gift:before{content:'\f042'}.octicon-gist:before{content:'\f00e'}.octicon-gist-secret:before{content:'\f08c'}.octicon-git-branch-create:before,.octicon-git-branch-delete:before,.octicon-git-branch:before{content:'\f020'}.octicon-git-commit:before{content:'\f01f'}.octicon-git-compare:before{content:'\f0ac'}.octicon-git-merge:before{content:'\f023'}.octicon-git-pull-request-abandoned:before,.octicon-git-pull-request:before{content:'\f009'}.octicon-globe:before{content:'\f0b6'}.octicon-graph:before{content:'\f043'}.octicon-heart:before{content:'\2665'}.octicon-history:before{content:'\f07e'}.octicon-home:before{content:'\f08d'}.octicon-horizontal-rule:before{content:'\f070'}.octicon-hubot:before{content:'\f09d'}.octicon-inbox:before{content:'\f0cf'}.octicon-info:before{content:'\f059'}.octicon-issue-closed:before{content:'\f028'}.octicon-issue-opened:before{content:'\f026'}.octicon-issue-reopened:before{content:'\f027'}.octicon-jersey:before{content:'\f019'}.octicon-key:before{content:'\f049'}.octicon-keyboard:before{content:'\f00d'}.octicon-law:before{content:'\f0d8'}.octicon-light-bulb:before{content:'\f000'}.octicon-link:before{content:'\f05c'}.octicon-link-external:before{content:'\f07f'}.octicon-list-ordered:before{content:'\f062'}.octicon-list-unordered:before{content:'\f061'}.octicon-location:before{content:'\f060'}.octicon-gLine truncated
|
||||
@font-face{font-family:octicons;src:url(../fonts/octicons.eot?#iefix&v=396334ee3da78f4302d25c758ae3e3ce5dc3c97d) format('embedded-opentype'),url(../fonts/octicons.woff?v=396334ee3da78f4302d25c758ae3e3ce5dc3c97d) format('woff'),url(../fonts/octicons.ttf?v=396334ee3da78f4302d25c758ae3e3ce5dc3c97d) format('truetype'),url(../fonts/octicons.svg?v=396334ee3da78f4302d25c758ae3e3ce5dc3c97d#octicons) format('svg');font-weight:400;font-style:normal}.mega-octicon,.octicon{font:normal normal normal 16px/1 octicons;display:inline-block;text-decoration:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mega-octicon{font-size:32px}.octicon-alert:before{content:'\f02d'}.octicon-arrow-down:before{content:'\f03f'}.octicon-arrow-left:before{content:'\f040'}.octicon-arrow-right:before{content:'\f03e'}.octicon-arrow-small-down:before{content:'\f0a0'}.octicon-arrow-small-left:before{content:'\f0a1'}.octicon-arrow-small-right:before{content:'\f071'}.octicon-arrow-small-up:before{content:'\f09f'}.octicon-arrow-up:before{content:'\f03d'}.octicon-beaker:before,.octicon-microscope:before{content:'\f0dd'}.octicon-bell:before{content:'\f0de'}.octicon-book:before{content:'\f007'}.octicon-bookmark:before{content:'\f07b'}.octicon-briefcase:before{content:'\f0d3'}.octicon-broadcast:before{content:'\f048'}.octicon-browser:before{content:'\f0c5'}.octicon-bug:before{content:'\f091'}.octicon-calendar:before{content:'\f068'}.octicon-check:before{content:'\f03a'}.octicon-checklist:before{content:'\f076'}.octicon-chevron-down:before{content:'\f0a3'}.octicon-chevron-left:before{content:'\f0a4'}.octicon-chevron-right:before{content:'\f078'}.octicon-chevron-up:before{content:'\f0a2'}.octicon-circle-slash:before{content:'\f084'}.octicon-circuit-board:before{content:'\f0d6'}.octicon-clippy:before{content:'\f035'}.octicon-clock:before{content:'\f046'}.octicon-cloud-download:before{content:'\f00b'}.octicon-cloud-upload:before{content:'\f00c'}.octicon-code:before{content:'\f05f'}.octicon-color-mode:before{content:'\f065'}.octicon-comment-add:before,.octicon-comment:before{content:'\f02b'}.octicon-comment-discussion:before{content:'\f04f'}.octicon-credit-card:before{content:'\f045'}.octicon-dash:before{content:'\f0ca'}.octicon-dashboard:before{content:'\f07d'}.octicon-database:before{content:'\f096'}.octicon-clone:before,.octicon-desktop-download:before{content:'\f0dc'}.octicon-device-camera:before{content:'\f056'}.octicon-device-camera-video:before{content:'\f057'}.octicon-device-desktop:before{content:'\f27c'}.octicon-device-mobile:before{content:'\f038'}.octicon-diff:before{content:'\f04d'}.octicon-diff-added:before{content:'\f06b'}.octicon-diff-ignored:before{content:'\f099'}.octicon-diff-modified:before{content:'\f06d'}.octicon-diff-removed:before{content:'\f06c'}.octicon-diff-renamed:before{content:'\f06e'}.octicon-ellipsis:before{content:'\f09a'}.octicon-eye-unwatch:before,.octicon-eye-watch:before,.octicon-eye:before{content:'\f04e'}.octicon-file-binary:before{content:'\f094'}.octicon-file-code:before{content:'\f010'}.octicon-file-directory:before{content:'\f016'}.octicon-file-media:before{content:'\f012'}.octicon-file-pdf:before{content:'\f014'}.octicon-file-submodule:before{content:'\f017'}.octicon-file-symlink-directory:before{content:'\f0b1'}.octicon-file-symlink-file:before{content:'\f0b0'}.octicon-file-text:before{content:'\f011'}.octicon-file-zip:before{content:'\f013'}.octicon-flame:before{content:'\f0d2'}.octicon-fold:before{content:'\f0cc'}.octicon-gear:before{content:'\f02f'}.octicon-gift:before{content:'\f042'}.octicon-gist:before{content:'\f00e'}.octicon-gist-secret:before{content:'\f08c'}.octicon-git-branch-create:before,.octicon-git-branch-delete:before,.octicon-git-branch:before{content:'\f020'}.octicon-git-commit:before{content:'\f01f'}.octicon-git-compare:before{content:'\f0ac'}.octicon-git-merge:before{content:'\f023'}.octicon-git-pull-request-abandoned:before,.octicon-git-pull-request:before{content:'\f009'}.octicon-globe:before{content:'\f0b6'}.octicon-graph:before{content:'\f043'}.octicon-heart:before{content:'\2665'}.octicon-history:before{content:'\f07e'}.octicon-home:before{content:'\f08d'}.octicon-horizontal-rule:before{content:'\f070'}.octicon-hubot:before{content:'\f09d'}.octicon-inbox:before{content:'\f0cf'}.octicon-info:before{content:'\f059'}.octicon-issue-closed:before{content:'\f028'}.octicon-issue-opened:before{content:'\f026'}.octicon-issue-reopened:before{content:'\f027'}.octicon-jersey:before{content:'\f019'}.octicon-key:before{content:'\f049'}.octicon-keyboard:before{content:'\f00d'}.octicon-law:before{content:'\f0d8'}.octicon-light-bulb:before{content:'\f000'}.octicon-link:before{content:'\f05c'}.octicon-link-external:before{content:'\f07f'}.octicon-list-ordered:before{content:'\f062'}.octicon-list-unordered:before{content:'\f061'}.octicon-location:before{content:'\f060'}.octicon-gLine truncated
|
||||
+19
-2
@@ -148,7 +148,7 @@ function initInstall() {
|
||||
// Database type change detection.
|
||||
$("#db_type").change(function () {
|
||||
var db_type = $('#db_type').val();
|
||||
if (db_type === "SQLite3") {
|
||||
if (db_type === "SQLite3" || db_type === "TiDB") {
|
||||
$('#sql_settings').hide();
|
||||
$('#pgsql_settings').hide();
|
||||
$('#sqlite_settings').show();
|
||||
@@ -389,7 +389,7 @@ function initRepository() {
|
||||
}
|
||||
}
|
||||
|
||||
function initOrganization(){
|
||||
function initOrganization() {
|
||||
if ($('.organization').length == 0) {
|
||||
return;
|
||||
}
|
||||
@@ -405,8 +405,24 @@ function initOrganization(){
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function initUser() {
|
||||
if ($('.user').length == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Options
|
||||
if ($('.user.settings.profile').length > 0) {
|
||||
$('#username').keyup(function () {
|
||||
var $prompt_span = $('#name-change-prompt');
|
||||
if ($(this).val().toString().toLowerCase() != $(this).data('name').toString().toLowerCase()) {
|
||||
$prompt_span.show();
|
||||
} else {
|
||||
$prompt_span.hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function initWebhook() {
|
||||
@@ -545,5 +561,6 @@ $(document).ready(function () {
|
||||
initInstall();
|
||||
initRepository();
|
||||
initOrganization();
|
||||
initUser();
|
||||
initWebhook();
|
||||
});
|
||||
@@ -80,10 +80,6 @@
|
||||
}
|
||||
|
||||
&.options {
|
||||
input {
|
||||
width: 50%!important;
|
||||
min-width: 300px;
|
||||
}
|
||||
#interval {
|
||||
width: 100px!important;
|
||||
min-width: 100px;
|
||||
|
||||
+9
-2
@@ -85,7 +85,14 @@ func InstallInit(ctx *middleware.Context) {
|
||||
ctx.Data["Title"] = ctx.Tr("install.install")
|
||||
ctx.Data["PageIsInstall"] = true
|
||||
|
||||
ctx.Data["DbOptions"] = []string{"MySQL", "PostgreSQL", "SQLite3"}
|
||||
dbOpts := []string{"MySQL", "PostgreSQL"}
|
||||
if models.EnableSQLite3 {
|
||||
dbOpts = append(dbOpts, "SQLite3")
|
||||
}
|
||||
if models.EnableTidb {
|
||||
dbOpts = append(dbOpts, "TiDB")
|
||||
}
|
||||
ctx.Data["DbOptions"] = dbOpts
|
||||
}
|
||||
|
||||
func Install(ctx *middleware.Context) {
|
||||
@@ -163,7 +170,7 @@ func InstallPost(ctx *middleware.Context, form auth.InstallForm) {
|
||||
|
||||
// Pass basic check, now test configuration.
|
||||
// Test database setting.
|
||||
dbTypes := map[string]string{"MySQL": "mysql", "PostgreSQL": "postgres", "SQLite3": "sqlite3"}
|
||||
dbTypes := map[string]string{"MySQL": "mysql", "PostgreSQL": "postgres", "SQLite3": "sqlite3", "TiDB": "tidb"}
|
||||
models.DbCfg.Type = dbTypes[form.DbType]
|
||||
models.DbCfg.Host = form.DbHost
|
||||
models.DbCfg.User = form.DbUser
|
||||
|
||||
@@ -47,11 +47,11 @@ func SettingsPost(ctx *middleware.Context, form auth.UpdateProfileForm) {
|
||||
}
|
||||
|
||||
// Check if user name has been changed.
|
||||
if ctx.User.Name != form.UserName {
|
||||
if err := models.ChangeUserName(ctx.User, form.UserName); err != nil {
|
||||
if ctx.User.Name != form.Name {
|
||||
if err := models.ChangeUserName(ctx.User, form.Name); err != nil {
|
||||
switch {
|
||||
case models.IsErrUserAlreadyExist(err):
|
||||
ctx.Flash.Error(ctx.Tr("form.username_been_taken"))
|
||||
ctx.Flash.Error(ctx.Tr("form.name_been_taken"))
|
||||
ctx.Redirect(setting.AppSubUrl + "/user/settings")
|
||||
case models.IsErrEmailAlreadyUsed(err):
|
||||
ctx.Flash.Error(ctx.Tr("form.email_been_used"))
|
||||
@@ -67,16 +67,16 @@ func SettingsPost(ctx *middleware.Context, form auth.UpdateProfileForm) {
|
||||
}
|
||||
return
|
||||
}
|
||||
log.Trace("User name changed: %s -> %s", ctx.User.Name, form.UserName)
|
||||
ctx.User.Name = form.UserName
|
||||
log.Trace("User name changed: %s -> %s", ctx.User.Name, form.Name)
|
||||
ctx.User.Name = form.Name
|
||||
}
|
||||
|
||||
ctx.User.FullName = form.FullName
|
||||
ctx.User.Email = form.Email
|
||||
ctx.User.Website = form.Website
|
||||
ctx.User.Location = form.Location
|
||||
ctx.User.Avatar = base.EncodeMd5(form.Avatar)
|
||||
ctx.User.AvatarEmail = form.Avatar
|
||||
ctx.User.Avatar = base.EncodeMd5(form.Gravatar)
|
||||
ctx.User.AvatarEmail = form.Gravatar
|
||||
if err := models.UpdateUser(ctx.User); err != nil {
|
||||
ctx.Handle(500, "UpdateUser", err)
|
||||
return
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="sql_settings" class="{{if eq .CurDbOption "SQLite3"}}hide{{end}}">
|
||||
<div id="sql_settings" class="{{if or (eq .CurDbOption "SQLite3") (eq .CurDbOption "TiDB")}}hide{{end}}">
|
||||
<div class="inline required field {{if .Err_DbSetting}}error{{end}}">
|
||||
<label for="db_host">{{.i18n.Tr "install.host"}}</label>
|
||||
<input id="db_host" name="db_host" value="{{.db_host}}">
|
||||
@@ -62,7 +62,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="sqlite_settings" class="{{if not (eq .CurDbOption "SQLite3")}}hide{{end}}">
|
||||
<div id="sqlite_settings" class="{{if not (or (eq .CurDbOption "SQLite3") (eq .CurDbOption "TiDB"))}}hide{{end}}">
|
||||
<div class="inline required field {{if or .Err_DbPath .Err_DbSetting}}error{{end}}">
|
||||
<label for="db_path">{{.i18n.Tr "install.path"}}</label>
|
||||
<input id="db_path" name="db_path" value="{{.db_path}}">
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="required field {{if .Err_OrgName}}error{{end}}">
|
||||
<div class="required field {{if .Err_Name}}error{{end}}">
|
||||
<label for="org_name">{{.i18n.Tr "org.org_name_holder"}}<span class="text red hide" id="org-name-change-prompt"> {{.i18n.Tr "org.settings.change_orgname_prompt"}}</span></label>
|
||||
<input id="org_name" name="name" value="{{.Org.Name}}" data-org-name="{{.Org.Name}}" autofocus required>
|
||||
</div>
|
||||
|
||||
@@ -1,82 +1,74 @@
|
||||
{{template "ng/base/head" .}}
|
||||
{{template "ng/base/header" .}}
|
||||
<div id="setting-wrapper" class="main-wrapper">
|
||||
<div id="user-profile-setting" class="container clear">
|
||||
{{template "user/settings/nav" .}}
|
||||
<div class="grid-4-5 left">
|
||||
<div class="setting-content">
|
||||
{{template "ng/base/alert" .}}
|
||||
<div id="setting-content">
|
||||
<div id="user-profile-setting-content" class="panel panel-radius">
|
||||
<div class="panel-header">
|
||||
<strong>{{.i18n.Tr "settings.public_profile"}}</strong>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form class="form form-align" id="user-profile-form" action="{{AppSubUrl}}/user/settings" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="text-center panel-desc">{{.i18n.Tr "settings.profile_desc"}}</div>
|
||||
<div class="field">
|
||||
<label>{{.i18n.Tr "settings.uid"}}</label>
|
||||
<label class="text-left">{{.SignedUser.Id}}</label>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="req" for="username">{{.i18n.Tr "username"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_UserName}}ipt-error{{end}}" id="username" name="uname" type="text" value="{{.SignedUser.Name}}" data-uname="{{.SignedUser.Name}}" required />
|
||||
</div>
|
||||
<div class="white-popup-block mfp-hide" id="change-username-modal">
|
||||
<h1 class="text-red">{{.i18n.Tr "settings.change_username"}}</h1>
|
||||
<p>{{.i18n.Tr "settings.change_username_desc"}}</p>
|
||||
<br>
|
||||
<button class="btn btn-red btn-large btn-radius" id="change-username-submit">{{.i18n.Tr "settings.continue"}}</button>
|
||||
<button class="btn btn-large btn-radius popup-modal-dismiss">{{.i18n.Tr "settings.cancel"}}</button>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="full-name">{{.i18n.Tr "settings.full_name"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_FullName}}ipt-error{{end}}" id="full-name" name="fullname" type="text" value="{{.SignedUser.FullName}}" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="req" for="email">{{.i18n.Tr "email"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_Email}}ipt-error{{end}}" id="email" name="email" type="email" value="{{.SignedUser.Email}}" required />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="website">{{.i18n.Tr "settings.website"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_Website}}ipt-error{{end}}" id="website" name="website" type="url" value="{{.SignedUser.Website}}" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="location">{{.i18n.Tr "settings.location"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_Location}}ipt-error{{end}}" id="location" name="location" type="text" value="{{.SignedUser.Location}}" />
|
||||
</div>
|
||||
<div class="field {{if DisableGravatar}}hide{{end}}">
|
||||
<label class="req" for="gravatar-email">Gravatar {{.i18n.Tr "email"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_Avatar}}ipt-error{{end}}" id="gravatar-email" name="avatar" type="text" value="{{.SignedUser.AvatarEmail}}" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label></label>
|
||||
<button class="btn btn-green btn-large btn-radius" id="change-username-btn" href="#change-username-modal">{{.i18n.Tr "settings.update_profile"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
<hr>
|
||||
<form class="form form-align" id="user-profile-form" action="{{AppSubUrl}}/user/settings/avatar" method="post" enctype="multipart/form-data">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="field">
|
||||
<label for="enable">{{.i18n.Tr "settings.enable_custom_avatar"}}</label>
|
||||
<input class="ipt-chk" id="enable" name="enable" type="checkbox" {{if .SignedUser.UseCustomAvatar}}checked{{end}} />
|
||||
<span>{{.i18n.Tr "settings.enable_custom_avatar_helper"}}</span>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>{{.i18n.Tr "settings.choose_new_avatar"}}</label>
|
||||
<input name="avatar" type="file" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label></label>
|
||||
<button class="btn btn-green btn-large btn-radius">{{.i18n.Tr "settings.update_avatar"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/head" .}}
|
||||
<div class="user settings profile">
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "user/settings/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.public_profile"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<p>{{.i18n.Tr "settings.profile_desc"}}</p>
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="inline field">
|
||||
<label>{{.i18n.Tr "settings.uid"}}</label>
|
||||
<span>{{.SignedUser.Id}}</span>
|
||||
</div>
|
||||
<div class="required field {{if .Err_Name}}error{{end}}">
|
||||
<label for="username">{{.i18n.Tr "username"}}<span class="text red hide" id="name-change-prompt"> {{.i18n.Tr "settings.change_username_prompt"}}</span></label>
|
||||
<input id="username" name="name" value="{{.SignedUser.Name}}" data-name="{{.SignedUser.Name}}" autofocus required>
|
||||
</div>
|
||||
<div class="field {{if .Err_FullName}}error{{end}}">
|
||||
<label for="full_name">{{.i18n.Tr "settings.full_name"}}</label>
|
||||
<input id="full_name" name="full_name" value="{{.SignedUser.FullName}}">
|
||||
</div>
|
||||
<div class="required field {{if .Err_Email}}error{{end}}">
|
||||
<label for="email">{{.i18n.Tr "email"}}</label>
|
||||
<input id="email" name="email" value="{{.SignedUser.Email}}">
|
||||
</div>
|
||||
<div class="field {{if .Err_Website}}error{{end}}">
|
||||
<label for="website">{{.i18n.Tr "settings.website"}}</label>
|
||||
<input id="website" name="website" type="url" value="{{.SignedUser.Website}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="location">{{.i18n.Tr "settings.location"}}</label>
|
||||
<input id="location" name="location" value="{{.SignedUser.Location}}">
|
||||
</div>
|
||||
<div class="required field {{if or DisableGravatar .SignedUser.UseCustomAvatar}}hide{{end}} {{if .Err_Gravatar}}error{{end}}">
|
||||
<label for="gravatar">Gravatar {{.i18n.Tr "email"}}</label>
|
||||
<input id="gravatar" name="gravatar" value="{{.SignedUser.AvatarEmail}}" />
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<button class="ui green button">{{$.i18n.Tr "settings.update_profile"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="ui divider"></div>
|
||||
|
||||
<form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="inline field">
|
||||
<label>{{.i18n.Tr "settings.enable_custom_avatar"}}</label>
|
||||
<div class="ui checkbox">
|
||||
<input name="enable" type="checkbox" {{if .SignedUser.UseCustomAvatar}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "settings.enable_custom_avatar_helper"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label for="avatar">{{.i18n.Tr "settings.choose_new_avatar"}}</label>
|
||||
<input name="avatar" type="file" >
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<button class="ui green button">{{$.i18n.Tr "settings.update_avatar"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "ng/base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
@@ -1,5 +1,5 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="user settings">
|
||||
<div class="user settings sshkeys">
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "user/settings/navbar" .}}
|
||||
@@ -78,15 +78,6 @@
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "settings.ssh_key_deletion_desc"}}</p>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="ui red basic inverted cancel button">
|
||||
<i class="remove icon"></i>
|
||||
{{.i18n.Tr "modal.no"}}
|
||||
</div>
|
||||
<div class="ui green basic inverted ok button">
|
||||
<i class="checkmark icon"></i>
|
||||
{{.i18n.Tr "modal.yes"}}
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
Reference in new issue
Block a user