From c1ceec45da8c600dea2b932127519c04484258d8 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Tue, 16 Sep 2014 08:32:13 -0400 Subject: [PATCH] Fix mirror UI style and work on #475 --- gogs.go | 2 +- models/publickey.go | 13 +++++++++---- public/ng/css/gogs.css | 2 +- public/ng/less/gogs/dashboard.less | 4 +--- templates/.VERSION | 2 +- templates/user/dashboard/dashboard.tmpl | 4 ++-- 6 files changed, 15 insertions(+), 12 deletions(-) diff --git a/gogs.go b/gogs.go index f492b2f7f..f0aebf036 100644 --- a/gogs.go +++ b/gogs.go @@ -17,7 +17,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.5.1.0915 Beta" +const APP_VER = "0.5.1.0916 Beta" func init() { runtime.GOMAXPROCS(runtime.NumCPU()) diff --git a/models/publickey.go b/models/publickey.go index 1246cffc5..dccb89362 100644 --- a/models/publickey.go +++ b/models/publickey.go @@ -14,6 +14,7 @@ import ( "os/exec" "path" "path/filepath" + "runtime" "strings" "sync" "time" @@ -160,10 +161,14 @@ func saveAuthorizedKeyFile(key *PublicKey) error { if err != nil { return err } - if finfo.Mode().Perm() > 0600 { - log.Error(4, "authorized_keys file has unusual permission flags: %s - setting to -rw-------", finfo.Mode().Perm().String()) - if err = f.Chmod(0600); err != nil { - return err + + // FIXME: following command does not support in Windows. + if runtime.GOOS != "windows" { + if finfo.Mode().Perm() > 0600 { + log.Error(4, "authorized_keys file has unusual permission flags: %s - setting to -rw-------", finfo.Mode().Perm().String()) + if err = f.Chmod(0600); err != nil { + return err + } } } diff --git a/public/ng/css/gogs.css b/public/ng/css/gogs.css index 8f82e0af3..db4aad228 100644 --- a/public/ng/css/gogs.css +++ b/public/ng/css/gogs.css @@ -686,7 +686,7 @@ ol.linenums { width: auto; } /* -The dashboard page style + The dashboard page style */ #dashboard-header { border-bottom: 1px solid #d6d6d6; diff --git a/public/ng/less/gogs/dashboard.less b/public/ng/less/gogs/dashboard.less index afef60cfa..60aa80726 100644 --- a/public/ng/less/gogs/dashboard.less +++ b/public/ng/less/gogs/dashboard.less @@ -1,9 +1,7 @@ @import "../ui/var"; - /* -The dashboard page style + The dashboard page style */ - @dashboardHeaderBorderColor: #D6D6D6; @dashboardHeaderLinkColor: #444; @dashboardHeaderLinkHoverColor: #D9453D; diff --git a/templates/.VERSION b/templates/.VERSION index 6db2a3e6c..261667dbe 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.5.1.0915 Beta \ No newline at end of file +0.5.1.0916 Beta \ No newline at end of file diff --git a/templates/user/dashboard/dashboard.tmpl b/templates/user/dashboard/dashboard.tmpl index bf0aba097..2f9bbc4ed 100644 --- a/templates/user/dashboard/dashboard.tmpl +++ b/templates/user/dashboard/dashboard.tmpl @@ -9,7 +9,7 @@
-
+

{{.GetActUserName}} {{if eq .GetOpType 1}} @@ -30,7 +30,7 @@ {{ $push := ActionContent2Commits .}} {{ $repoLink := .GetRepoLink}} {{range $push.Commits}} -

  • {{ShortSha .Sha1}} {{.Message}}
  • +
  • {{ShortSha .Sha1}} {{.Message}}
  • {{end}}