Update config option

release/v1.15
Unknown 2014-03-28 08:39:35 -04:00
parent 6bd4f34c8d
commit cb05b8325c
9 changed files with 7 additions and 17 deletions

View File

@ -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

View File

@ -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

View File

@ -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")

View File

@ -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"

View File

@ -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

View File

@ -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>

View File

@ -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"/>

View File

@ -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" .}}

View File

@ -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