diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-28 08:39:35 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-28 08:39:35 -0400 |
commit | cb05b8325cdd85dda9bbebf61d8993da34d80e70 (patch) | |
tree | 02f277bc119d4ba6368aac7cb9660e1ee7c3869b | |
parent | 6bd4f34c8dad50da5dc861ffdaebae1577f8881e (diff) | |
download | gitea-cb05b8325cdd85dda9bbebf61d8993da34d80e70.tar.gz gitea-cb05b8325cdd85dda9bbebf61d8993da34d80e70.zip |
Update config option
-rw-r--r-- | conf/app.ini | 2 | ||||
-rw-r--r-- | gogs.go | 2 | ||||
-rw-r--r-- | modules/base/conf.go | 4 | ||||
-rw-r--r-- | modules/middleware/repo.go | 6 | ||||
-rw-r--r-- | routers/admin/admin.go | 1 | ||||
-rw-r--r-- | templates/admin/config.tmpl | 1 | ||||
-rw-r--r-- | templates/base/navbar.tmpl | 2 | ||||
-rw-r--r-- | templates/home.tmpl | 4 | ||||
-rw-r--r-- | templates/install.tmpl | 2 |
9 files changed, 7 insertions, 17 deletions
diff --git a/conf/app.ini b/conf/app.ini index d988b4acbc..a3c749be01 100644 --- a/conf/app.ini +++ b/conf/app.ini @@ -33,8 +33,6 @@ PATH = data/gogs.db [security] INSTALL_LOCK = false -; Use HTTPS to clone repository, otherwise use HTTP. -ENABLE_HTTPS_CLONE = false ; !!CHANGE THIS TO KEEP YOUR USER DATA SAFE!! SECRET_KEY = !#@FDEWREWR&*( ; Auto-login remember days @@ -19,7 +19,7 @@ import ( // Test that go1.2 tag above is included in builds. main.go refers to this definition. const go12tag = true -const APP_VER = "0.1.9.0327 Alpha" +const APP_VER = "0.1.9.0328 Alpha" func init() { base.AppVer = APP_VER diff --git a/modules/base/conf.go b/modules/base/conf.go index f905c38143..b3a987e646 100644 --- a/modules/base/conf.go +++ b/modules/base/conf.go @@ -40,8 +40,6 @@ var ( InstallLock bool - EnableHttpsClone bool - LogInRememberDays int CookieUserName string CookieRememberName string @@ -286,8 +284,6 @@ func NewConfigContext() { InstallLock = Cfg.MustBool("security", "INSTALL_LOCK", false) - EnableHttpsClone = Cfg.MustBool("security", "ENABLE_HTTPS_CLONE", false) - LogInRememberDays = Cfg.MustInt("security", "LOGIN_REMEMBER_DAYS") CookieUserName = Cfg.MustValue("security", "COOKIE_USERNAME") CookieRememberName = Cfg.MustValue("security", "COOKIE_REMEMBER_NAME") diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go index cb4a8632a2..54b735af07 100644 --- a/modules/middleware/repo.go +++ b/modules/middleware/repo.go @@ -71,12 +71,8 @@ func RepoAssignment(redirect bool) martini.Handler { ctx.Repo.IsWatching = models.IsWatching(ctx.User.Id, repo.Id) } ctx.Repo.Repository = repo - scheme := "http" - if base.EnableHttpsClone { - scheme = "https" - } ctx.Repo.CloneLink.SSH = fmt.Sprintf("%s@%s:%s/%s.git", base.RunUser, base.Domain, user.LowerName, repo.LowerName) - ctx.Repo.CloneLink.HTTPS = fmt.Sprintf("%s://%s/%s/%s.git", scheme, base.Domain, user.LowerName, repo.LowerName) + ctx.Repo.CloneLink.HTTPS = fmt.Sprintf("%s%s/%s.git", base.AppUrl, user.LowerName, repo.LowerName) if len(params["branchname"]) == 0 { params["branchname"] = "master" diff --git a/routers/admin/admin.go b/routers/admin/admin.go index 0b5e3d8e7d..f303439fd1 100644 --- a/routers/admin/admin.go +++ b/routers/admin/admin.go @@ -141,7 +141,6 @@ func Config(ctx *middleware.Context) { ctx.Data["Domain"] = base.Domain ctx.Data["RunUser"] = base.RunUser ctx.Data["RunMode"] = strings.Title(martini.Env) - ctx.Data["EnableHttpsClone"] = base.EnableHttpsClone ctx.Data["RepoRootPath"] = base.RepoRootPath ctx.Data["Service"] = base.Service diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl index 39895aa311..ab805d8dea 100644 --- a/templates/admin/config.tmpl +++ b/templates/admin/config.tmpl @@ -17,7 +17,6 @@ <div><b>Run User:</b> {{.RunUser}}</div> <div><b>Run Mode:</b> {{.RunMode}}</div> <hr/> - <div><b>Enable HTTPS Clone</b> <i class="fa fa{{if .EnableHttpsClone}}-check{{end}}-square-o"></i></div> <div><b>Repository Root Path:</b> {{.RepoRootPath}}</div> </div> </div> diff --git a/templates/base/navbar.tmpl b/templates/base/navbar.tmpl index 829ecba62b..7d1f64e495 100644 --- a/templates/base/navbar.tmpl +++ b/templates/base/navbar.tmpl @@ -3,7 +3,7 @@ <nav class="nav"> <a id="nav-logo" class="nav-item{{if .PageIsHome}} active{{end}}" href="/"><img src="/img/favicon.png" alt="Gogs Logo" id="logo"></a> <a class="nav-item{{if .PageIsUserDashboard}} active{{end}}" href="/">Dashboard</a> - <a class="nav-item{{if .PageIsHelp}} active{{end}}" href="/help">Help</a>{{if .IsSigned}} + <a class="nav-item{{if .PageIsHelp}} active{{end}}" href="https://github.com/gogits/gogs/wiki">Help</a>{{if .IsSigned}} <a id="nav-out" class="nav-item navbar-right navbar-btn btn btn-danger" href="/user/logout/"><i class="fa fa-power-off fa-lg"></i></a> <a id="nav-avatar" class="nav-item navbar-right{{if .PageIsUserProfile}} active{{end}}" href="{{.SignedUser.HomeLink}}" data-toggle="tooltip" data-placement="bottom" title="{{.SignedUserName}}"> <img src="{{.SignedUser.AvatarLink}}?s=28" alt="user-avatar" title="username"/> diff --git a/templates/home.tmpl b/templates/home.tmpl index 8121a4e8c9..d3a8c0c343 100644 --- a/templates/home.tmpl +++ b/templates/home.tmpl @@ -1,6 +1,8 @@ {{template "base/head" .}} {{template "base/navbar" .}} <div id="body" class="container"> - Welcome to the land of Gogs! We will add an introduction soon! + <h4>Hey there, welcome to the land of Gogs!</h4> + <p>If you just get your Gogs server running, go <a href="/install">install</a> guide page will help you setup things for your first-time run.</p> + <img src="http://gowalker.org/public/gogs_demo.gif"> </div> {{template "base/footer" .}} diff --git a/templates/install.tmpl b/templates/install.tmpl index 99ac8421f3..aace5e8a85 100644 --- a/templates/install.tmpl +++ b/templates/install.tmpl @@ -123,7 +123,7 @@ <hr/> <div class="form-group text-center"> - <button class="btn btn-primary btn-lg">Test Configuration</button> + <!-- <button class="btn btn-primary btn-lg">Test Configuration</button> --> <button class="btn btn-danger btn-lg">Install Gogs</button> <button class="btn btn-default btn-sm" type="button" data-toggle="modal" data-target="#advance-options-modal"> Advanced Options |