mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-05 18:05:19 +02:00
new user profile settings UI
Signed-off-by: Unknwon <u@gogs.io>
This commit is contained in:
parent
00767a0522
commit
85f34ba538
16 changed files with 148 additions and 121 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue