From e14f6088f800ecc9624fd307651e3ed4b6d9a091 Mon Sep 17 00:00:00 2001 From: Wim Date: Tue, 18 Aug 2020 18:08:51 +0200 Subject: [PATCH 01/54] Remove hardcoded ES indexername (#12521) --- modules/indexer/issues/indexer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/indexer/issues/indexer.go b/modules/indexer/issues/indexer.go index 42f08545764bf..9edaef6bdd017 100644 --- a/modules/indexer/issues/indexer.go +++ b/modules/indexer/issues/indexer.go @@ -171,7 +171,7 @@ func InitIssueIndexer(syncReindex bool) { log.Debug("Created Bleve Indexer") case "elasticsearch": graceful.GetManager().RunWithShutdownFns(func(_, atTerminate func(context.Context, func())) { - issueIndexer, err := NewElasticSearchIndexer(setting.Indexer.IssueConnStr, "gitea_issues") + issueIndexer, err := NewElasticSearchIndexer(setting.Indexer.IssueConnStr, setting.Indexer.IssueIndexerName) if err != nil { log.Fatal("Unable to initialize Elastic Search Issue Indexer at connection: %s Error: %v", setting.Indexer.IssueConnStr, err) } From 1ca652c826c1053b86d5e4d4509b27c5f2beaf8a Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Wed, 19 Aug 2020 12:15:55 -0400 Subject: [PATCH 02/54] Add security policy to repo (#12536) --- SECURITY.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000000000..9846a94f7e835 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,10 @@ +# Reporting security issues + +The Gitea maintainers take security seriously. +If you discover a security issue, please bring it to their attention right away! + +### Reporting a Vulnerability + +Please **DO NOT** file a public issue, instead send your report privately to `security@gitea.io`. + +Security reports are greatly appreciated and we will publicly thank you for it, although we keep your name confidential if you request it. From 1701d57fb2763cf8ab7e1d6ebeecccea85c5f987 Mon Sep 17 00:00:00 2001 From: zeripath Date: Wed, 19 Aug 2020 19:37:57 +0100 Subject: [PATCH 03/54] Set z-index for sticky diff box lower (#12537) Fix #12525 Signed-off-by: Andrew Thornton --- web_src/less/_repository.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index aaf729a8e17b2..becc2e216ad00 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -1579,7 +1579,7 @@ &.sticky { position: sticky; top: 0; - z-index: 800; + z-index: 8; margin-bottom: 10px; border-bottom: 1px solid #d4d4d5; padding-left: 5px; From a5440fcb1ef7af8b1b3a828e30dc6af60f0744b2 Mon Sep 17 00:00:00 2001 From: zeripath Date: Wed, 19 Aug 2020 22:35:06 +0100 Subject: [PATCH 04/54] Report error if API merge is not allowed (#12528) #12496 demonstrated that the API merge needs to return some information as to why a merge has been disallowed with a status code 422. This PR ensures that a reason is always returned. Signed-off-by: Andrew Thornton Co-authored-by: Lauris BH --- routers/api/v1/repo/pull.go | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/routers/api/v1/repo/pull.go b/routers/api/v1/repo/pull.go index 21cc048a69295..126815839de2c 100644 --- a/routers/api/v1/repo/pull.go +++ b/routers/api/v1/repo/pull.go @@ -759,8 +759,18 @@ func MergePullRequest(ctx *context.APIContext, form auth.MergePullRequestForm) { return } - if !pr.CanAutoMerge() || pr.HasMerged || pr.IsWorkInProgress() { - ctx.Status(http.StatusMethodNotAllowed) + if !pr.CanAutoMerge() { + ctx.Error(http.StatusMethodNotAllowed, "PR not in mergeable state", "Please try again later") + return + } + + if pr.HasMerged { + ctx.Error(http.StatusMethodNotAllowed, "PR already merged", "") + return + } + + if pr.IsWorkInProgress() { + ctx.Error(http.StatusMethodNotAllowed, "PR is a work in progress", "Work in progress PRs cannot be merged") return } @@ -812,7 +822,7 @@ func MergePullRequest(ctx *context.APIContext, form auth.MergePullRequestForm) { if err := pull_service.Merge(pr, ctx.User, ctx.Repo.GitRepo, models.MergeStyle(form.Do), message); err != nil { if models.IsErrInvalidMergeStyle(err) { - ctx.Status(http.StatusMethodNotAllowed) + ctx.Error(http.StatusMethodNotAllowed, "Invalid merge style", fmt.Errorf("%s is not allowed an allowed merge style for this repository", models.MergeStyle(form.Do))) return } else if models.IsErrMergeConflicts(err) { conflictError := err.(models.ErrMergeConflicts) From dcb543ac2a9cccc16dd161c820a4a002e8a83e82 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Thu, 20 Aug 2020 03:53:49 +0200 Subject: [PATCH 05/54] Show 2FA info on Admin Pannel: Users List (#12515) --- options/locale/locale_en-US.ini | 1 + routers/home.go | 1 + templates/admin/user/list.tmpl | 2 ++ templates/org/member/members.tmpl | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 9727f7d0d1ed9..1cd94a46878dd 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1982,6 +1982,7 @@ users.full_name = Full Name users.activated = Activated users.admin = Admin users.restricted = Restricted +users.2fa = 2FA users.repos = Repos users.created = Created users.last_login = Last Sign-In diff --git a/routers/home.go b/routers/home.go index ae94207ade5cf..5425670878ed5 100644 --- a/routers/home.go +++ b/routers/home.go @@ -233,6 +233,7 @@ func RenderUserSearch(ctx *context.Context, opts *models.SearchUserOptions, tplN ctx.Data["Keyword"] = opts.Keyword ctx.Data["Total"] = count ctx.Data["Users"] = users + ctx.Data["UsersTwoFaStatus"] = models.UserList(users).GetTwoFaStatus() ctx.Data["ShowUserEmail"] = setting.UI.ShowUserEmail ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled diff --git a/templates/admin/user/list.tmpl b/templates/admin/user/list.tmpl index 3442d04195c4a..d6dd7d5c03969 100644 --- a/templates/admin/user/list.tmpl +++ b/templates/admin/user/list.tmpl @@ -25,6 +25,7 @@ {{.i18n.Tr "admin.users.activated"}} {{.i18n.Tr "admin.users.admin"}} {{.i18n.Tr "admin.users.restricted"}} + {{.i18n.Tr "admin.users.2fa"}} {{.i18n.Tr "admin.users.repos"}} {{.i18n.Tr "admin.users.created"}} @@ -43,6 +44,7 @@ + {{.NumRepos}} {{.CreatedUnix.FormatShort}} {{if .LastLoginUnix}} diff --git a/templates/org/member/members.tmpl b/templates/org/member/members.tmpl index 1a65a02278da7..1c33c55c5a6e7 100644 --- a/templates/org/member/members.tmpl +++ b/templates/org/member/members.tmpl @@ -39,7 +39,7 @@
- 2FA + {{$.i18n.Tr "admin.users.2fa"}}
From d15bb17b78f8aee3285b5fadf924ac2dc569f790 Mon Sep 17 00:00:00 2001 From: zeripath Date: Thu, 20 Aug 2020 08:48:40 +0100 Subject: [PATCH 06/54] Default empty merger list to those with write permissions (#12535) Signed-off-by: Andrew Thornton Co-authored-by: Lunny Xiao --- models/branches.go | 5 +++-- modules/convert/convert.go | 6 +++++- services/pull/merge.go | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/models/branches.go b/models/branches.go index fc3c783b3a996..38aa79d2dc75a 100644 --- a/models/branches.go +++ b/models/branches.go @@ -98,9 +98,10 @@ func (protectBranch *ProtectedBranch) CanUserPush(userID int64) bool { } // IsUserMergeWhitelisted checks if some user is whitelisted to merge to this branch -func (protectBranch *ProtectedBranch) IsUserMergeWhitelisted(userID int64) bool { +func (protectBranch *ProtectedBranch) IsUserMergeWhitelisted(userID int64, permissionInRepo Permission) bool { if !protectBranch.EnableMergeWhitelist { - return true + // Then we need to fall back on whether the user has write permission + return permissionInRepo.CanWrite(UnitTypeCode) } if base.Int64sContains(protectBranch.MergeWhitelistUserIDs, userID) { diff --git a/modules/convert/convert.go b/modules/convert/convert.go index ec18b130567fe..94ecdd11503b6 100644 --- a/modules/convert/convert.go +++ b/modules/convert/convert.go @@ -67,8 +67,12 @@ func ToBranch(repo *models.Repository, b *git.Branch, c *git.Commit, bp *models. } if user != nil { + permission, err := models.GetUserRepoPermission(repo, user) + if err != nil { + return nil, err + } branch.UserCanPush = bp.CanUserPush(user.ID) - branch.UserCanMerge = bp.IsUserMergeWhitelisted(user.ID) + branch.UserCanMerge = bp.IsUserMergeWhitelisted(user.ID, permission) } return branch, nil diff --git a/services/pull/merge.go b/services/pull/merge.go index 47521ce14770a..27689384a58aa 100644 --- a/services/pull/merge.go +++ b/services/pull/merge.go @@ -544,7 +544,7 @@ func IsUserAllowedToMerge(pr *models.PullRequest, p models.Permission, user *mod return false, err } - if (p.CanWrite(models.UnitTypeCode) && pr.ProtectedBranch == nil) || (pr.ProtectedBranch != nil && pr.ProtectedBranch.IsUserMergeWhitelisted(user.ID)) { + if (p.CanWrite(models.UnitTypeCode) && pr.ProtectedBranch == nil) || (pr.ProtectedBranch != nil && pr.ProtectedBranch.IsUserMergeWhitelisted(user.ID, p)) { return true, nil } From 0c9eb468e9a55f933286a45f366f41a7a4e79637 Mon Sep 17 00:00:00 2001 From: Gjergji Ramku Date: Thu, 20 Aug 2020 16:53:06 +0200 Subject: [PATCH 07/54] Fix typos (#12542) Signed-off-by: Gjergji Ramku --- routers/private/hook.go | 4 ++-- routers/private/serv.go | 2 +- routers/repo/compare.go | 2 +- services/gitdiff/gitdiff.go | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/routers/private/hook.go b/routers/private/hook.go index 215793c97092b..6cdc5393f4293 100644 --- a/routers/private/hook.go +++ b/routers/private/hook.go @@ -557,7 +557,7 @@ func SetDefaultBranch(ctx *macaron.Context) { if !git.IsErrUnsupportedVersion(err) { gitRepo.Close() ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "Err": fmt.Sprintf("Unable to set default branch onrepository: %s/%s Error: %v", ownerName, repoName, err), + "Err": fmt.Sprintf("Unable to set default branch on repository: %s/%s Error: %v", ownerName, repoName, err), }) return } @@ -566,7 +566,7 @@ func SetDefaultBranch(ctx *macaron.Context) { if err := repo.UpdateDefaultBranch(); err != nil { ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "Err": fmt.Sprintf("Unable to set default branch onrepository: %s/%s Error: %v", ownerName, repoName, err), + "Err": fmt.Sprintf("Unable to set default branch on repository: %s/%s Error: %v", ownerName, repoName, err), }) return } diff --git a/routers/private/serv.go b/routers/private/serv.go index d5b5fcc8f7e7a..2e79fd79acda7 100644 --- a/routers/private/serv.go +++ b/routers/private/serv.go @@ -80,7 +80,7 @@ func ServCommand(ctx *macaron.Context) { KeyID: keyID, } - // Now because we're not translating things properly let's just default some Engish strings here + // Now because we're not translating things properly let's just default some English strings here modeString := "read" if mode > models.AccessModeRead { modeString = "write to" diff --git a/routers/repo/compare.go b/routers/repo/compare.go index fb78ebdeacd4c..f8a18f0696709 100644 --- a/routers/repo/compare.go +++ b/routers/repo/compare.go @@ -598,7 +598,7 @@ func ExcerptBlob(ctx *context.Context) { direction := ctx.Query("direction") filePath := ctx.Query("path") gitRepo := ctx.Repo.GitRepo - chunkSize := gitdiff.BlobExceprtChunkSize + chunkSize := gitdiff.BlobExcerptChunkSize commit, err := gitRepo.GetCommit(commitID) if err != nil { ctx.Error(500, "GetCommit") diff --git a/services/gitdiff/gitdiff.go b/services/gitdiff/gitdiff.go index d50ae6ae27777..fd07a2ad9664d 100644 --- a/services/gitdiff/gitdiff.go +++ b/services/gitdiff/gitdiff.go @@ -89,8 +89,8 @@ type DiffLineSectionInfo struct { RightHunkSize int } -// BlobExceprtChunkSize represent max lines of excerpt -const BlobExceprtChunkSize = 20 +// BlobExcerptChunkSize represent max lines of excerpt +const BlobExcerptChunkSize = 20 // GetType returns the type of a DiffLine. func (d *DiffLine) GetType() int { @@ -139,7 +139,7 @@ func (d *DiffLine) GetExpandDirection() DiffLineExpandDirection { } if d.SectionInfo.LastLeftIdx <= 0 && d.SectionInfo.LastRightIdx <= 0 { return DiffLineExpandUp - } else if d.SectionInfo.RightIdx-d.SectionInfo.LastRightIdx > BlobExceprtChunkSize && d.SectionInfo.RightHunkSize > 0 { + } else if d.SectionInfo.RightIdx-d.SectionInfo.LastRightIdx > BlobExcerptChunkSize && d.SectionInfo.RightHunkSize > 0 { return DiffLineExpandUpDown } else if d.SectionInfo.LeftHunkSize <= 0 && d.SectionInfo.RightHunkSize <= 0 { return DiffLineExpandDown From fff0204cab4df3b36ed746536a1601d79a5a27a1 Mon Sep 17 00:00:00 2001 From: Bagas Sanjaya Date: Thu, 20 Aug 2020 22:51:34 +0700 Subject: [PATCH 08/54] Add placeholder text for "Add SSH/GPG Key" forms (#12533) * Add placeholder text for "Add SSH/GPG Key" forms This commit add placeholder text for both Add SSH key and Add GPG key forms. * Localize placeholders Changes requested by @zeripath Co-authored-by: techknowlogick --- options/locale/locale_en-US.ini | 2 ++ templates/user/settings/keys_gpg.tmpl | 2 +- templates/user/settings/keys_ssh.tmpl | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 1cd94a46878dd..c31d77e1a58ec 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -500,6 +500,8 @@ ssh_helper = Need help? Have a look at GitHub's guide to Need help? Have a look at GitHub's guide about GPG. add_new_key = Add SSH Key add_new_gpg_key = Add GPG Key +key_content_ssh_placeholder = Begins with 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', or 'ecdsa-sha2-nistp521' +key_content_gpg_placeholder = Begins with '-----BEGIN PGP PUBLIC KEY BLOCK-----' ssh_key_been_used = This SSH key has already been added to the server. ssh_key_name_used = An SSH key with same name is already added to your account. gpg_key_id_used = A public GPG key with same ID already exists. diff --git a/templates/user/settings/keys_gpg.tmpl b/templates/user/settings/keys_gpg.tmpl index f86b44bef04f4..332f864dcfa9f 100644 --- a/templates/user/settings/keys_gpg.tmpl +++ b/templates/user/settings/keys_gpg.tmpl @@ -47,7 +47,7 @@
- +
- +
+
+ + -
-
-
- - -
+
- - - - {{ end }} {{ end }}
From b78448e94e1415eb810ee1126135c64ec2942c0f Mon Sep 17 00:00:00 2001 From: zeripath Date: Sat, 22 Aug 2020 10:09:43 +0100 Subject: [PATCH 21/54] Skip SSPI authentication attempts for /api/internal (#12556) * Skip SSPI authentication attempts for /api/internal SSPI fails badly on authentication attempts to /api/internal which it can never succesfully authenticate. Fix #11260 Signed-off-by: Andrew Thornton * Update oauth2.go Co-authored-by: techknowlogick Co-authored-by: Lauris BH --- modules/auth/sso/oauth2.go | 2 +- modules/auth/sso/sso.go | 5 +++++ modules/auth/sso/sspi_windows.go | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/auth/sso/oauth2.go b/modules/auth/sso/oauth2.go index 6860c12e3908b..3f530f036f256 100644 --- a/modules/auth/sso/oauth2.go +++ b/modules/auth/sso/oauth2.go @@ -121,7 +121,7 @@ func (o *OAuth2) VerifyAuthData(ctx *macaron.Context, sess session.Store) *model return nil } - if !isAPIPath(ctx) && !isAttachmentDownload(ctx) { + if isInternalPath(ctx) || !isAPIPath(ctx) && !isAttachmentDownload(ctx) { return nil } diff --git a/modules/auth/sso/sso.go b/modules/auth/sso/sso.go index cf8148d89bc09..c2e36f3f5ebf2 100644 --- a/modules/auth/sso/sso.go +++ b/modules/auth/sso/sso.go @@ -100,6 +100,11 @@ func isAPIPath(ctx *macaron.Context) bool { return strings.HasPrefix(ctx.Req.URL.Path, "/api/") } +// isInternalPath returns true if the specified URL is an internal API path +func isInternalPath(ctx *macaron.Context) bool { + return strings.HasPrefix(ctx.Req.URL.Path, "/api/internal/") +} + // isAttachmentDownload check if request is a file download (GET) with URL to an attachment func isAttachmentDownload(ctx *macaron.Context) bool { return strings.HasPrefix(ctx.Req.URL.Path, "/attachments/") && ctx.Req.Method == "GET" diff --git a/modules/auth/sso/sspi_windows.go b/modules/auth/sso/sspi_windows.go index 2bced4be28d63..00f15d97be5f7 100644 --- a/modules/auth/sso/sspi_windows.go +++ b/modules/auth/sso/sspi_windows.go @@ -148,6 +148,8 @@ func (s *SSPI) shouldAuthenticate(ctx *macaron.Context) (shouldAuth bool) { } else if ctx.Req.FormValue("auth_with_sspi") == "1" { shouldAuth = true } + } else if isInternalPath(ctx) { + shouldAuth = false } else if isAPIPath(ctx) || isAttachmentDownload(ctx) { shouldAuth = true } From fcabbae1686b82cb495d8d430279b745a707f377 Mon Sep 17 00:00:00 2001 From: zeripath Date: Sat, 22 Aug 2020 13:56:33 +0100 Subject: [PATCH 22/54] Set utf8mb4 as the default charset on MySQL if CHARSET is unset (#12563) MySQL in its infinite wisdom determines that UTF8 does not mean UTF8. Our install scripts know about this and will set CHARSET to utf8mb4 if we users choose this but... users who do not explicitly set this variable will default to utf8mb3 without knowing it. This PR changes the unset CHARSET value to utf8mb4 if users choose to use mysql. Signed-off-by: Andrew Thornton --- modules/setting/database.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/setting/database.go b/modules/setting/database.go index a0734bc67a0e6..d5d03c2a306b5 100644 --- a/modules/setting/database.go +++ b/modules/setting/database.go @@ -60,11 +60,13 @@ func GetDBTypeByName(name string) string { func InitDBConfig() { sec := Cfg.Section("database") Database.Type = sec.Key("DB_TYPE").String() + defaultCharset := "utf8" switch Database.Type { case "sqlite3": Database.UseSQLite3 = true case "mysql": Database.UseMySQL = true + defaultCharset = "utf8mb4" case "postgres": Database.UsePostgreSQL = true case "mssql": @@ -78,7 +80,7 @@ func InitDBConfig() { } Database.Schema = sec.Key("SCHEMA").String() Database.SSLMode = sec.Key("SSL_MODE").MustString("disable") - Database.Charset = sec.Key("CHARSET").In("utf8", []string{"utf8", "utf8mb4"}) + Database.Charset = sec.Key("CHARSET").In(defaultCharset, []string{"utf8", "utf8mb4"}) Database.Path = sec.Key("PATH").MustString(filepath.Join(AppDataPath, "gitea.db")) Database.Timeout = sec.Key("SQLITE_TIMEOUT").MustInt(500) Database.MaxIdleConns = sec.Key("MAX_IDLE_CONNS").MustInt(2) From 7a8a05cc44a7ddf39ddea679434acacc8f47dfc1 Mon Sep 17 00:00:00 2001 From: zeripath Date: Sat, 22 Aug 2020 16:07:37 +0100 Subject: [PATCH 23/54] Fix diff path unquoting (#12554) * Fix diff path unquoting services/gitdiff/gitdiff.go whereby there it assumed that the path would always be quoted on both sides This PR simplifies the code here and uses fmt.Fscanf to parse the strings as necessary. Fix #12546 Signed-off-by: Andrew Thornton * Add testcase as per @mrsdizzie Signed-off-by: Andrew Thornton --- services/gitdiff/gitdiff.go | 47 ++++++++++++-------------------- services/gitdiff/gitdiff_test.go | 17 ++++++++++++ 2 files changed, 34 insertions(+), 30 deletions(-) diff --git a/services/gitdiff/gitdiff.go b/services/gitdiff/gitdiff.go index fd07a2ad9664d..538f613b04588 100644 --- a/services/gitdiff/gitdiff.go +++ b/services/gitdiff/gitdiff.go @@ -18,7 +18,6 @@ import ( "os/exec" "regexp" "sort" - "strconv" "strings" "code.gitea.io/gitea/models" @@ -570,40 +569,28 @@ func ParsePatch(maxLines, maxLineCharacters, maxFiles int, reader io.Reader) (*D break } - var middle int - // Note: In case file name is surrounded by double quotes (it happens only in git-shell). // e.g. diff --git "a/xxx" "b/xxx" - hasQuote := line[len(cmdDiffHead)] == '"' - if hasQuote { - middle = strings.Index(line, ` "b/`) + var a string + var b string + + rd := strings.NewReader(line[len(cmdDiffHead):]) + char, _ := rd.ReadByte() + _ = rd.UnreadByte() + if char == '"' { + fmt.Fscanf(rd, "%q ", &a) } else { - middle = strings.Index(line, " b/") + fmt.Fscanf(rd, "%s ", &a) } - - beg := len(cmdDiffHead) - a := line[beg+2 : middle] - b := line[middle+3:] - - if hasQuote { - // Keep the entire string in double quotes for now - a = line[beg:middle] - b = line[middle+1:] - - var err error - a, err = strconv.Unquote(a) - if err != nil { - return nil, fmt.Errorf("Unquote: %v", err) - } - b, err = strconv.Unquote(b) - if err != nil { - return nil, fmt.Errorf("Unquote: %v", err) - } - // Now remove the /a /b - a = a[2:] - b = b[2:] - + char, _ = rd.ReadByte() + _ = rd.UnreadByte() + if char == '"' { + fmt.Fscanf(rd, "%q", &b) + } else { + fmt.Fscanf(rd, "%s", &b) } + a = a[2:] + b = b[2:] curFile = &DiffFile{ Name: b, diff --git a/services/gitdiff/gitdiff_test.go b/services/gitdiff/gitdiff_test.go index 597c9d394eb17..9826ece2dc5c9 100644 --- a/services/gitdiff/gitdiff_test.go +++ b/services/gitdiff/gitdiff_test.go @@ -112,6 +112,23 @@ func TestParsePatch(t *testing.T) { } println(result) + var diff2a = `diff --git "a/A \\ B" b/A/B +--- "a/A \\ B" ++++ b/A/B +@@ -1,3 +1,6 @@ + # gitea-github-migrator ++ ++ Build Status +- Latest Release + Docker Pulls ++ cut off ++ cut off` + result, err = ParsePatch(setting.Git.MaxGitDiffLines, setting.Git.MaxGitDiffLineCharacters, setting.Git.MaxGitDiffFiles, strings.NewReader(diff2a)) + if err != nil { + t.Errorf("ParsePatch failed: %s", err) + } + println(result) + var diff3 = `diff --git a/README.md b/README.md --- a/README.md +++ b/README.md From 2026d885d6c11793e6fd68d06f163de90440e52d Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sun, 23 Aug 2020 01:12:40 +0800 Subject: [PATCH 24/54] Fix bug on migration 147 (#12565) --- models/migrations/v147.go | 98 ++++++++++++++++++++++++--------------- 1 file changed, 60 insertions(+), 38 deletions(-) diff --git a/models/migrations/v147.go b/models/migrations/v147.go index 9716d6e83b893..a39b224039fae 100644 --- a/models/migrations/v147.go +++ b/models/migrations/v147.go @@ -82,51 +82,73 @@ func createReviewsForCodeComments(x *xorm.Engine) error { if err := x.Sync2(new(Review), new(Comment)); err != nil { return err } - sess := x.NewSession() - defer sess.Close() - if err := sess.Begin(); err != nil { - return err - } - if err := sess.Where("review_id = 0 and type = 21").Iterate(new(Comment), func(idx int, bean interface{}) error { - comment := bean.(*Comment) - - review := &Review{ - Type: ReviewTypeComment, - ReviewerID: comment.PosterID, - IssueID: comment.IssueID, - Official: false, - CommitID: comment.CommitSHA, - Stale: comment.Invalidated, - OriginalAuthor: comment.OriginalAuthor, - OriginalAuthorID: comment.OriginalAuthorID, - CreatedUnix: comment.CreatedUnix, - UpdatedUnix: comment.CreatedUnix, - } - if _, err := sess.NoAutoTime().Insert(review); err != nil { + + var updateComment = func(comments []*Comment) error { + sess := x.NewSession() + defer sess.Close() + if err := sess.Begin(); err != nil { return err } - reviewComment := &Comment{ - Type: 22, - PosterID: comment.PosterID, - Content: "", - IssueID: comment.IssueID, - ReviewID: review.ID, - OriginalAuthor: comment.OriginalAuthor, - OriginalAuthorID: comment.OriginalAuthorID, - CreatedUnix: comment.CreatedUnix, - UpdatedUnix: comment.CreatedUnix, + for _, comment := range comments { + review := &Review{ + Type: ReviewTypeComment, + ReviewerID: comment.PosterID, + IssueID: comment.IssueID, + Official: false, + CommitID: comment.CommitSHA, + Stale: comment.Invalidated, + OriginalAuthor: comment.OriginalAuthor, + OriginalAuthorID: comment.OriginalAuthorID, + CreatedUnix: comment.CreatedUnix, + UpdatedUnix: comment.CreatedUnix, + } + if _, err := sess.NoAutoTime().Insert(review); err != nil { + return err + } + + reviewComment := &Comment{ + Type: 22, + PosterID: comment.PosterID, + Content: "", + IssueID: comment.IssueID, + ReviewID: review.ID, + OriginalAuthor: comment.OriginalAuthor, + OriginalAuthorID: comment.OriginalAuthorID, + CreatedUnix: comment.CreatedUnix, + UpdatedUnix: comment.CreatedUnix, + } + if _, err := sess.NoAutoTime().Insert(reviewComment); err != nil { + return err + } + + comment.ReviewID = review.ID + if _, err := sess.ID(comment.ID).Cols("review_id").NoAutoTime().Update(comment); err != nil { + return err + } + } + + return sess.Commit() + } + + var start = 0 + var batchSize = 100 + for { + var comments = make([]*Comment, 0, batchSize) + if err := x.Where("review_id = 0 and type = 21").Limit(batchSize, start).Find(&comments); err != nil { + return err } - if _, err := sess.NoAutoTime().Insert(reviewComment); err != nil { + + if err := updateComment(comments); err != nil { return err } - comment.ReviewID = review.ID - _, err := sess.ID(comment.ID).Cols("review_id").NoAutoTime().Update(comment) - return err - }); err != nil { - return err + start += len(comments) + + if len(comments) < batchSize { + break + } } - return sess.Commit() + return nil } From e429c1164ec68b154b7f06db2c2e04dd25bad094 Mon Sep 17 00:00:00 2001 From: zeripath Date: Sun, 23 Aug 2020 14:15:29 +0100 Subject: [PATCH 25/54] Ensure that the detected charset order is set in chardet test (#12574) TestToUTF8WithFallback is the cause of recurrent spurious test failures even despite code to set the detected charset order. The reason why this happens is because the preferred detected charset order is not being initialised for these tests. This PR simply ensures that this is set at the start of each test and would allow different tests to be written to allow differing orders. Replaces #12571 Close #12571 Signed-off-by: Andrew Thornton --- modules/charset/charset_test.go | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/modules/charset/charset_test.go b/modules/charset/charset_test.go index 394a42c71f0b7..33f0c10a7a201 100644 --- a/modules/charset/charset_test.go +++ b/modules/charset/charset_test.go @@ -5,6 +5,7 @@ package charset import ( + "strings" "testing" "code.gitea.io/gitea/modules/setting" @@ -12,6 +13,22 @@ import ( "github.com/stretchr/testify/assert" ) +func resetDefaultCharsetsOrder() { + defaultDetectedCharsetsOrder := make([]string, 0, len(setting.Repository.DetectedCharsetsOrder)) + for _, charset := range setting.Repository.DetectedCharsetsOrder { + defaultDetectedCharsetsOrder = append(defaultDetectedCharsetsOrder, strings.ToLower(strings.TrimSpace(charset))) + } + setting.Repository.DetectedCharsetScore = map[string]int{} + i := 0 + for _, charset := range defaultDetectedCharsetsOrder { + canonicalCharset := strings.ToLower(strings.TrimSpace(charset)) + if _, has := setting.Repository.DetectedCharsetScore[canonicalCharset]; !has { + setting.Repository.DetectedCharsetScore[canonicalCharset] = i + i++ + } + } +} + func TestRemoveBOMIfPresent(t *testing.T) { res := RemoveBOMIfPresent([]byte{0xc3, 0xa1, 0xc3, 0xa9, 0xc3, 0xad, 0xc3, 0xb3, 0xc3, 0xba}) assert.Equal(t, []byte{0xc3, 0xa1, 0xc3, 0xa9, 0xc3, 0xad, 0xc3, 0xb3, 0xc3, 0xba}, res) @@ -21,6 +38,7 @@ func TestRemoveBOMIfPresent(t *testing.T) { } func TestToUTF8WithErr(t *testing.T) { + resetDefaultCharsetsOrder() var res string var err error @@ -76,6 +94,7 @@ func TestToUTF8WithErr(t *testing.T) { } func TestToUTF8WithFallback(t *testing.T) { + resetDefaultCharsetsOrder() // "ABC" res := ToUTF8WithFallback([]byte{0x41, 0x42, 0x43}) assert.Equal(t, []byte{0x41, 0x42, 0x43}, res) @@ -116,7 +135,7 @@ func TestToUTF8WithFallback(t *testing.T) { } func TestToUTF8(t *testing.T) { - + resetDefaultCharsetsOrder() // Note: golang compiler seems so behave differently depending on the current // locale, so some conversions might behave differently. For that reason, we don't // depend on particular conversions but in expected behaviors. @@ -165,6 +184,7 @@ func TestToUTF8(t *testing.T) { } func TestToUTF8DropErrors(t *testing.T) { + resetDefaultCharsetsOrder() // "ABC" res := ToUTF8DropErrors([]byte{0x41, 0x42, 0x43}) assert.Equal(t, []byte{0x41, 0x42, 0x43}, res) @@ -204,6 +224,7 @@ func TestToUTF8DropErrors(t *testing.T) { } func TestDetectEncoding(t *testing.T) { + resetDefaultCharsetsOrder() testSuccess := func(b []byte, expected string) { encoding, err := DetectEncoding(b) assert.NoError(t, err) @@ -225,10 +246,7 @@ func TestDetectEncoding(t *testing.T) { b = []byte{0x44, 0xe9, 0x63, 0x6f, 0x72, 0x0a} encoding, err := DetectEncoding(b) assert.NoError(t, err) - // due to a race condition in `chardet` library, it could either detect - // "ISO-8859-1" or "IS0-8859-2" here. Technically either is correct, so - // we accept either. - assert.Contains(t, encoding, "ISO-8859") + assert.Contains(t, encoding, "ISO-8859-1") old := setting.Repository.AnsiCharset setting.Repository.AnsiCharset = "placeholder" From e7d65cbc6e50d70753f7228c46cbff0cffde7eba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=99=BA=E8=B6=85?= <1012112796@qq.com> Date: Sun, 23 Aug 2020 23:03:18 +0800 Subject: [PATCH 26/54] Add email notify for new release (#12463) * Add email notify for new release Signed-off-by: a1012112796 <1012112796@qq.com> --- models/release.go | 1 + modules/notification/mail/mail.go | 13 ++++++ services/mailer/mail_release.go | 69 +++++++++++++++++++++++++++++++ templates/mail/release.tmpl | 56 +++++++++++++++++++++++++ 4 files changed, 139 insertions(+) create mode 100644 services/mailer/mail_release.go create mode 100644 templates/mail/release.tmpl diff --git a/models/release.go b/models/release.go index 0c76d17f4b744..f55341b86bb10 100644 --- a/models/release.go +++ b/models/release.go @@ -35,6 +35,7 @@ type Release struct { NumCommits int64 NumCommitsBehind int64 `xorm:"-"` Note string `xorm:"TEXT"` + RenderedNote string `xorm:"-"` IsDraft bool `xorm:"NOT NULL DEFAULT false"` IsPrerelease bool `xorm:"NOT NULL DEFAULT false"` IsTag bool `xorm:"NOT NULL DEFAULT false"` diff --git a/modules/notification/mail/mail.go b/modules/notification/mail/mail.go index 795c8af2c8032..9b2c27280f7a4 100644 --- a/modules/notification/mail/mail.go +++ b/modules/notification/mail/mail.go @@ -145,3 +145,16 @@ func (m *mailNotifier) NotifyPullRequestPushCommits(doer *models.User, pr *model m.NotifyCreateIssueComment(doer, comment.Issue.Repo, comment.Issue, comment) } + +func (m *mailNotifier) NotifyNewRelease(rel *models.Release) { + if err := rel.LoadAttributes(); err != nil { + log.Error("NotifyNewRelease: %v", err) + return + } + + if rel.IsDraft || rel.IsPrerelease { + return + } + + mailer.MailNewRelease(rel) +} diff --git a/services/mailer/mail_release.go b/services/mailer/mail_release.go new file mode 100644 index 0000000000000..55182f55cf5db --- /dev/null +++ b/services/mailer/mail_release.go @@ -0,0 +1,69 @@ +// Copyright 2020 The Gitea 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 mailer + +import ( + "bytes" + "fmt" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/markup/markdown" + "code.gitea.io/gitea/modules/setting" +) + +const ( + tplNewReleaseMail base.TplName = "release" +) + +// MailNewRelease send new release notify to all all repo watchers. +func MailNewRelease(rel *models.Release) { + watcherIDList, err := models.GetRepoWatchersIDs(rel.RepoID) + if err != nil { + log.Error("GetRepoWatchersIDs(%d): %v", rel.RepoID, err) + return + } + + recipients, err := models.GetMaileableUsersByIDs(watcherIDList) + if err != nil { + log.Error("models.GetMaileableUsersByIDs: %v", err) + return + } + + tos := make([]string, 0, len(recipients)) + for _, to := range recipients { + if to.ID != rel.PublisherID { + tos = append(tos, to.Email) + } + } + + rel.RenderedNote = markdown.RenderString(rel.Note, rel.Repo.Link(), rel.Repo.ComposeMetas()) + subject := fmt.Sprintf("%s in %s released", rel.TagName, rel.Repo.FullName()) + + mailMeta := map[string]interface{}{ + "Release": rel, + "Subject": subject, + } + + var mailBody bytes.Buffer + + if err = bodyTemplates.ExecuteTemplate(&mailBody, string(tplNewReleaseMail), mailMeta); err != nil { + log.Error("ExecuteTemplate [%s]: %v", string(tplNewReleaseMail)+"/body", err) + return + } + + msgs := make([]*Message, 0, len(recipients)) + publisherName := rel.Publisher.DisplayName() + relURL := "<" + rel.HTMLURL() + ">" + for _, to := range tos { + msg := NewMessageFrom([]string{to}, publisherName, setting.MailService.FromEmail, subject, mailBody.String()) + msg.Info = subject + msg.SetHeader("Message-ID", relURL) + msgs = append(msgs, msg) + } + + SendAsyncs(msgs) +} diff --git a/templates/mail/release.tmpl b/templates/mail/release.tmpl new file mode 100644 index 0000000000000..bb0eb17a56ec9 --- /dev/null +++ b/templates/mail/release.tmpl @@ -0,0 +1,56 @@ + + + + + {{.Subject}} + + + + + + +

@{{.Release.Publisher.Name}} released {{.Release.TagName}} + in {{.Release.Repo.FullName}}

+

Title: {{.Release.Title}}

+

+ Note:
+ {{- if eq .Release.RenderedNote ""}} + {{else}} + {{.Release.RenderedNote | Str2html}} + {{end -}} +

+

+

+ --- +
+ Downloads: +

+

+ + + From 43a397ce9ae082e0c6e9367e31743e1cb4d71c20 Mon Sep 17 00:00:00 2001 From: John Olheiser Date: Sun, 23 Aug 2020 11:02:35 -0500 Subject: [PATCH 27/54] Initial support for push options (#12169) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Initial support for push options Signed-off-by: jolheiser * Fix misspelling 🤦 Signed-off-by: jolheiser * Fix formatting after conflict resolution * defer close git repo * According the GitLab documentation, git >= 2.10 Signed-off-by: jolheiser * Words are hard. Thanks @mrsdizzie :sweat_smile: Co-authored-by: mrsdizzie * Only update if there are push options Signed-off-by: jolheiser Co-authored-by: mrsdizzie --- cmd/doctor.go | 31 ++++++++++++++++++++ cmd/hook.go | 16 ++++++++++ docs/content/doc/usage/push-options.en-us.md | 31 ++++++++++++++++++++ modules/git/git.go | 6 ++++ modules/private/hook.go | 22 ++++++++++++++ routers/private/hook.go | 12 ++++++++ 6 files changed, 118 insertions(+) create mode 100644 docs/content/doc/usage/push-options.en-us.md diff --git a/cmd/doctor.go b/cmd/doctor.go index 20c1904afa0b9..2a93db27da23a 100644 --- a/cmd/doctor.go +++ b/cmd/doctor.go @@ -127,6 +127,12 @@ var checklist = []check{ isDefault: false, f: runDoctorUserStarNum, }, + { + title: "Enable push options", + name: "enable-push-options", + isDefault: false, + f: runDoctorEnablePushOptions, + }, // more checks please append here } @@ -605,3 +611,28 @@ func runDoctorCheckDBConsistency(ctx *cli.Context) ([]string, error) { return results, nil } + +func runDoctorEnablePushOptions(ctx *cli.Context) ([]string, error) { + numRepos := 0 + _, err := iterateRepositories(func(repo *models.Repository) ([]string, error) { + numRepos++ + r, err := git.OpenRepository(repo.RepoPath()) + if err != nil { + return nil, err + } + defer r.Close() + + if ctx.Bool("fix") { + _, err := git.NewCommand("config", "receive.advertisePushOptions", "true").RunInDir(r.Path) + return nil, err + } + + return nil, nil + }) + + var prefix string + if !ctx.Bool("fix") { + prefix = "DRY RUN: " + } + return []string{fmt.Sprintf("%sEnabled push options for %d repositories.", prefix, numRepos)}, err +} diff --git a/cmd/hook.go b/cmd/hook.go index f5658de7cd75c..863ed832a9ba0 100644 --- a/cmd/hook.go +++ b/cmd/hook.go @@ -178,6 +178,7 @@ Gitea or set your environment appropriately.`, "") GitAlternativeObjectDirectories: os.Getenv(private.GitAlternativeObjectDirectories), GitObjectDirectory: os.Getenv(private.GitObjectDirectory), GitQuarantinePath: os.Getenv(private.GitQuarantinePath), + GitPushOptions: pushOptions(), ProtectedBranchID: prID, IsDeployKey: isDeployKey, } @@ -326,6 +327,7 @@ Gitea or set your environment appropriately.`, "") GitAlternativeObjectDirectories: os.Getenv(private.GitAlternativeObjectDirectories), GitObjectDirectory: os.Getenv(private.GitObjectDirectory), GitQuarantinePath: os.Getenv(private.GitQuarantinePath), + GitPushOptions: pushOptions(), } oldCommitIDs := make([]string, hookBatchSize) newCommitIDs := make([]string, hookBatchSize) @@ -438,3 +440,17 @@ func hookPrintResults(results []private.HookPostReceiveBranchResult) { os.Stderr.Sync() } } + +func pushOptions() map[string]string { + opts := make(map[string]string) + if pushCount, err := strconv.Atoi(os.Getenv(private.GitPushOptionCount)); err == nil { + for idx := 0; idx < pushCount; idx++ { + opt := os.Getenv(fmt.Sprintf("GIT_PUSH_OPTION_%d", idx)) + kv := strings.SplitN(opt, "=", 2) + if len(kv) == 2 { + opts[kv[0]] = kv[1] + } + } + } + return opts +} diff --git a/docs/content/doc/usage/push-options.en-us.md b/docs/content/doc/usage/push-options.en-us.md new file mode 100644 index 0000000000000..439d13b42f88e --- /dev/null +++ b/docs/content/doc/usage/push-options.en-us.md @@ -0,0 +1,31 @@ +--- +date: "2020-07-06T16:00:00+02:00" +title: "Usage: Push Options" +slug: "push-options" +weight: 15 +toc: true +draft: false +menu: + sidebar: + parent: "usage" + name: "Push Options" + weight: 15 + identifier: "push-options" +--- + +# Push Options + +In Gitea `1.13`, support for some [push options](https://git-scm.com/docs/git-push#Documentation/git-push.txt--oltoptiongt) +were added. + + +## Supported Options + +- `repo.private` (true|false) - Change the repository's visibility. +This is particularly useful when combined with push-to-create. +- `repo.template` (true|false) - Change whether the repository is a template. + +Example of changing a repository's visibility to public: +```shell +git push -o repo.private=false -u origin master +``` diff --git a/modules/git/git.go b/modules/git/git.go index 6f231cee7a40a..1061bdb0d5253 100644 --- a/modules/git/git.go +++ b/modules/git/git.go @@ -120,6 +120,12 @@ func Init(ctx context.Context) error { return err } + if version.Compare(gitVersion, "2.10", ">=") { + if err := checkAndSetConfig("receive.advertisePushOptions", "true", true); err != nil { + return err + } + } + if version.Compare(gitVersion, "2.18", ">=") { if err := checkAndSetConfig("core.commitGraph", "true", true); err != nil { return err diff --git a/modules/private/hook.go b/modules/private/hook.go index 010fc4d72453a..84d66943ba255 100644 --- a/modules/private/hook.go +++ b/modules/private/hook.go @@ -9,6 +9,7 @@ import ( "fmt" "net/http" "net/url" + "strconv" "time" "code.gitea.io/gitea/modules/setting" @@ -19,8 +20,28 @@ const ( GitAlternativeObjectDirectories = "GIT_ALTERNATE_OBJECT_DIRECTORIES" GitObjectDirectory = "GIT_OBJECT_DIRECTORY" GitQuarantinePath = "GIT_QUARANTINE_PATH" + GitPushOptionCount = "GIT_PUSH_OPTION_COUNT" ) +// GitPushOptions is a wrapper around a map[string]string +type GitPushOptions map[string]string + +// GitPushOptions keys +const ( + GitPushOptionRepoPrivate = "repo.private" + GitPushOptionRepoTemplate = "repo.template" +) + +// Bool checks for a key in the map and parses as a boolean +func (g GitPushOptions) Bool(key string, def bool) bool { + if val, ok := g[key]; ok { + if b, err := strconv.ParseBool(val); err == nil { + return b + } + } + return def +} + // HookOptions represents the options for the Hook calls type HookOptions struct { OldCommitIDs []string @@ -31,6 +52,7 @@ type HookOptions struct { GitObjectDirectory string GitAlternativeObjectDirectories string GitQuarantinePath string + GitPushOptions GitPushOptions ProtectedBranchID int64 IsDeployKey bool } diff --git a/routers/private/hook.go b/routers/private/hook.go index 6cdc5393f4293..2bccca3e3e30c 100644 --- a/routers/private/hook.go +++ b/routers/private/hook.go @@ -436,6 +436,18 @@ func HookPostReceive(ctx *macaron.Context, opts private.HookOptions) { } } + // Push Options + if repo != nil && len(opts.GitPushOptions) > 0 { + repo.IsPrivate = opts.GitPushOptions.Bool(private.GitPushOptionRepoPrivate, repo.IsPrivate) + repo.IsTemplate = opts.GitPushOptions.Bool(private.GitPushOptionRepoTemplate, repo.IsTemplate) + if err := models.UpdateRepositoryCols(repo, "is_private", "is_template"); err != nil { + log.Error("Failed to Update: %s/%s Error: %v", ownerName, repoName, err) + ctx.JSON(http.StatusInternalServerError, private.HookPostReceiveResult{ + Err: fmt.Sprintf("Failed to Update: %s/%s Error: %v", ownerName, repoName, err), + }) + } + } + results := make([]private.HookPostReceiveBranchResult, 0, len(opts.OldCommitIDs)) // We have to reload the repo in case its state is changed above From d2cee3eea60cd0e459e665dad289b2c5adc1a2a5 Mon Sep 17 00:00:00 2001 From: GiteaBot Date: Sun, 23 Aug 2020 16:03:36 +0000 Subject: [PATCH 28/54] [skip ci] Updated translations via Crowdin --- options/locale/locale_zh-CN.ini | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index 10d35b649bccb..7592043a09c3c 100644 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -499,6 +499,8 @@ ssh_helper=需要帮助? 请查看有关 如何 gpg_helper=需要帮助吗?看一看 GitHub 关于GPG 的指导。 add_new_key=增加 SSH 密钥 add_new_gpg_key=添加的 GPG 密钥 +key_content_ssh_placeholder=以 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384' 或 'ecdsa-sha2-nistp521' 开头 +key_content_gpg_placeholder=以 '-----BEGIN PGP PUBLIC KEY BLOCK-----' 开头 ssh_key_been_used=此 SSH 密钥已添加到服务器。 ssh_key_name_used=使用相同名称的SSH公钥已经存在! gpg_key_id_used=使用相同名称的GPG公钥已经存在! @@ -1092,7 +1094,7 @@ issues.error_modifying_due_date=未能修改到期时间。 issues.error_removing_due_date=未能删除到期时间。 issues.push_commit_1=已于 %[2]s 推送了 %[1]d 提交 issues.push_commits_n=已于 %[2]s 推送了 %[1]d 提交 -issues.force_push_codes="强制推送%[1]s %[2]%[4]s %[6]s" +issues.force_push_codes="强制推送%[1]s %[2]s%[4]s %[6]s" issues.due_date_form=yyyy年mm月dd日 issues.due_date_form_add=添加到期时间 issues.due_date_form_edit=编辑 @@ -1981,6 +1983,7 @@ users.full_name=全名 users.activated=已激活 users.admin=管理员 users.restricted=受限 +users.2fa=两步验证 users.repos=仓库数 users.created=创建时间 users.last_login=上次登录 From dd8ec121880fda03691cf9f4b17be88e1d4be030 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 23 Aug 2020 21:05:17 +0200 Subject: [PATCH 29/54] Increase clickable area on files table links (#12553) --- integrations/repo_test.go | 2 +- templates/repo/view_list.tmpl | 52 ++++++++++++++++------------------- web_src/less/_repository.less | 15 ++++++---- 3 files changed, 34 insertions(+), 35 deletions(-) diff --git a/integrations/repo_test.go b/integrations/repo_test.go index c2a0368b0a579..3121b5135f498 100644 --- a/integrations/repo_test.go +++ b/integrations/repo_test.go @@ -148,7 +148,7 @@ func TestViewRepoWithSymlinks(t *testing.T) { resp := session.MakeRequest(t, req, http.StatusOK) htmlDoc := NewHTMLParser(t, resp.Body) - files := htmlDoc.doc.Find("#repo-files-table > TBODY > TR > TD.name > SPAN") + files := htmlDoc.doc.Find("#repo-files-table > TBODY > TR > TD.name") items := files.Map(func(i int, s *goquery.Selection) string { cls, _ := s.Find("SVG").Attr("class") file := strings.Trim(s.Find("A").Text(), " \t\n") diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl index de7d5b1ea9eb3..db810890f565d 100644 --- a/templates/repo/view_list.tmpl +++ b/templates/repo/view_list.tmpl @@ -45,41 +45,35 @@ {{if $entry.IsSubModule}} - - {{svg "octicon-file-submodule" 16}} - {{$refURL := $commit.RefURL AppUrl $.Repository.FullName}} - {{if $refURL}} - {{$entry.Name}} @ {{ShortSha $commit.RefID}} - {{else}} - {{$entry.Name}} @ {{ShortSha $commit.RefID}} - {{end}} - + {{svg "octicon-file-submodule" 16}} + {{$refURL := $commit.RefURL AppUrl $.Repository.FullName}} + {{if $refURL}} + {{$entry.Name}} @ {{ShortSha $commit.RefID}} + {{else}} + {{$entry.Name}} @ {{ShortSha $commit.RefID}} + {{end}} {{else}} - - {{if $entry.IsDir}} - {{$subJumpablePathName := $entry.GetSubJumpablePathName}} - {{$subJumpablePath := SubJumpablePath $subJumpablePathName}} - {{svg "octicon-file-directory" 16}} - - {{if eq (len $subJumpablePath) 2}} - {{index $subJumpablePath 0}}{{index $subJumpablePath 1}} - {{else}} - {{index $subJumpablePath 0}} - {{end}} - - {{else}} - {{svg (printf "octicon-%s" (EntryIcon $entry)) 16}} - {{$entry.Name}} - {{end}} - + {{if $entry.IsDir}} + {{$subJumpablePathName := $entry.GetSubJumpablePathName}} + {{$subJumpablePath := SubJumpablePath $subJumpablePathName}} + {{svg "octicon-file-directory" 16}} + + {{if eq (len $subJumpablePath) 2}} + {{index $subJumpablePath 0}}{{index $subJumpablePath 1}} + {{else}} + {{index $subJumpablePath 0}} + {{end}} + + {{else}} + {{svg (printf "octicon-%s" (EntryIcon $entry)) 16}} + {{$entry.Name}} + {{end}} {{end}} - - {{$commit.Summary | RenderEmoji}} - + {{$commit.Summary | RenderEmoji}} {{TimeSince $commit.Committer.When $.Lang}} diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index becc2e216ad00..eb316ee71ee51 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -345,8 +345,8 @@ } td { - padding-top: 8px; - padding-bottom: 8px; + padding-top: 0; + padding-bottom: 0; overflow: initial; &.name { @@ -361,14 +361,19 @@ width: 120px; } - .truncate { + > a { + width: calc(100% - 8px); /* prevent overflow into adjacant cell */ display: inline-block; - max-width: 100%; + padding-top: 8px; + padding-bottom: 8px; overflow: hidden; text-overflow: ellipsis; - vertical-align: top; white-space: nowrap; } + + > * { + vertical-align: middle; + } } td.message .isSigned { From 1bf7b8d7c18a4d9e09c3797fe80709ff00bd8f39 Mon Sep 17 00:00:00 2001 From: zeripath Date: Sun, 23 Aug 2020 22:59:41 +0100 Subject: [PATCH 30/54] Fix signing.wont_sign.%!s() if Require Signing commits but not signed in (#12581) signing.wont_sign.%!s() will be displayed if the repository needs signed commits but the user is not logged in. This is displayed because of complicated logic in the the template repo/issue/view_content/pull.tmpl and a shortcut in the code of routers/repo/issue.go This PR adds a default value of notsignedin if users are not signed in, which although our templates will not show will prevent custom templates from showing the above. It also fixes the template to avoid showing signing errors if the user is not authorized to sign. Replaces #12564 Close #12564 Signed-off-by: Andrew Thornton --- options/locale/locale_en-US.ini | 1 + routers/repo/issue.go | 2 ++ templates/repo/issue/view_content/pull.tmpl | 8 ++++---- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index c31d77e1a58ec..00c5ed60764f8 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1276,6 +1276,7 @@ signing.wont_sign.basesigned = The merge will not be signed as the base commit i signing.wont_sign.headsigned = The merge will not be signed as the head commit is not signed signing.wont_sign.commitssigned = The merge will not be signed as all the associated commits are not signed signing.wont_sign.approved = The merge will not be signed as the PR is not approved +signing.wont_sign.not_signed_in = You are not signed in ext_wiki = Ext. Wiki ext_wiki.desc = Link to an external wiki. diff --git a/routers/repo/issue.go b/routers/repo/issue.go index d671f8de74ea7..dabe0f6b0fe17 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -1212,6 +1212,8 @@ func ViewIssue(ctx *context.Context) { log.Error("Error whilst checking if could sign pr %d in repo %s. Error: %v", pull.ID, pull.BaseRepo.FullName(), err) } } + } else { + ctx.Data["WontSignReason"] = "not_signed_in" } ctx.Data["IsPullBranchDeletable"] = canDelete && pull.HeadRepo != nil && diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl index c2b9cb36b9a8c..53e2ddf912b9b 100644 --- a/templates/repo/issue/view_content/pull.tmpl +++ b/templates/repo/issue/view_content/pull.tmpl @@ -73,7 +73,7 @@ {{- else if .IsBlockedByOutdatedBranch}}red {{- else if and .EnableStatusCheck (or .RequiredStatusCheckState.IsFailure .RequiredStatusCheckState.IsError)}}red {{- else if and .EnableStatusCheck (or (not $.LatestCommitStatus) .RequiredStatusCheckState.IsPending .RequiredStatusCheckState.IsWarning)}}yellow - {{- else if and .RequireSigned (not .WillSign)}}red + {{- else if and .AllowMerge .RequireSigned (not .WillSign)}}red {{- else if .Issue.PullRequest.IsChecking}}yellow {{- else if .Issue.PullRequest.CanAutoMerge}}green {{- else}}red{{end}}">{{svg "octicon-git-merge" 32}} @@ -159,7 +159,7 @@ {{svg "octicon-x" 16}} {{$.i18n.Tr "repo.pulls.required_status_check_missing"}} - {{else if and .RequireSigned (not .WillSign)}} + {{else if and .AllowMerge .RequireSigned (not .WillSign)}}
{{svg "octicon-x" 16}} {{$.i18n.Tr "repo.pulls.require_signed_wont_sign"}} @@ -170,7 +170,7 @@
{{end}} {{$notAllOverridableChecksOk := or .IsBlockedByApprovals .IsBlockedByRejection .IsBlockedByOutdatedBranch (and .EnableStatusCheck (not .RequiredStatusCheckState.IsSuccess))}} - {{if and (or $.IsRepoAdmin (not $notAllOverridableChecksOk)) (or (not .RequireSigned) .WillSign)}} + {{if and (or $.IsRepoAdmin (not $notAllOverridableChecksOk)) (or (not .AllowMerge) (not .RequireSigned) .WillSign)}} {{if $notAllOverridableChecksOk}}
{{svg "octicon-dot-fill" 16}} @@ -216,7 +216,7 @@
{{end}} - {{if and (or $.IsRepoAdmin (not $notAllOverridableChecksOk)) (or (not .RequireSigned) .WillSign)}} + {{if and (or $.IsRepoAdmin (not $notAllOverridableChecksOk)) (or (not .AllowMerge) (not .RequireSigned) .WillSign)}} {{if .AllowMerge}} {{$prUnit := .Repository.MustGetUnit $.UnitTypePullRequests}} {{$approvers := .Issue.PullRequest.GetApprovers}} From 0c0f049d09dfcdaaf43029ff853a838c02efc79e Mon Sep 17 00:00:00 2001 From: silverwind Date: Mon, 24 Aug 2020 00:45:21 +0200 Subject: [PATCH 31/54] Reaction picker display improvements (#12576) - Remove overly thin font-width on counter - Add hover effect on reaction picker - Change colors on arc-green to green to match the theme Co-authored-by: Lunny Xiao Co-authored-by: zeripath --- web_src/less/_repository.less | 25 +++++++++++++++++------- web_src/less/themes/theme-arc-green.less | 10 ++++++++++ 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index eb316ee71ee51..0d994c565c8e4 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -2345,9 +2345,10 @@ > .item { float: left; - padding: .5rem !important; + padding: .25rem !important; + margin: .25rem; font-size: 1.5em; - width: 45px; + width: 39px; left: 13px; img.emoji { @@ -2361,10 +2362,9 @@ padding: 0; display: flex; - .ui.label, - .ui.label.visible { + .ui.label { max-height: 40px; - padding: .4rem .8rem; + padding: 7px 18px; display: flex !important; align-items: center; border: 0; @@ -2372,7 +2372,7 @@ border-radius: 0; margin: 0; font-size: 14px; - font-weight: 100; + font-weight: normal; border-color: inherit !important; &.disabled { @@ -2393,11 +2393,22 @@ .select-reaction { display: flex; align-items: center; - padding: 0 .5rem; + padding: 0 14px; &:not(.active) a { display: none; } + + .item { + border-radius: 6px; + display: flex; + justify-content: center; + align-items: center; + } + + .item:hover { + background: #4183c4; + } } &:hover .select-reaction a { diff --git a/web_src/less/themes/theme-arc-green.less b/web_src/less/themes/theme-arc-green.less index f9b643e9693f1..bf7d2e1160655 100644 --- a/web_src/less/themes/theme-arc-green.less +++ b/web_src/less/themes/theme-arc-green.less @@ -704,6 +704,16 @@ a.ui.basic.green.label:hover { border-color: #26577b !important; } +.repository .segment.reactions .ui.label.basic.blue { + color: #a0cc75 !important; + background: #305020 !important; + border-color: #404552 !important; +} + +.repository .segment.reactions .select-reaction .item:hover { + background: #305020; +} + .ui.menu .item > .label { background: #565454; } From 26bf4c51fb900b8a31cfb6d17095515c118a68a1 Mon Sep 17 00:00:00 2001 From: silverwind Date: Mon, 24 Aug 2020 00:48:40 +0200 Subject: [PATCH 32/54] Change tab width go,tmpl,html to 2 (#12572) Make it easier to edit deeply nested code. I plan to convert Less to 2-space so that we have standardized indentation width in the codebase. Co-authored-by: techknowlogick --- .editorconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 6059fa100b758..82542ea86dcc8 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,7 +11,7 @@ trim_trailing_whitespace = false [*.{go,tmpl,html}] indent_style = tab -indent_size = 4 +indent_size = 2 [*.{less,css}] indent_style = space From ee047312a1a3238a8504200f7ded8536ebc838e3 Mon Sep 17 00:00:00 2001 From: silverwind Date: Mon, 24 Aug 2020 03:44:53 +0200 Subject: [PATCH 33/54] Fix emoji replacements, make emoji images consistent (#12567) - Fix emoji not being replaced in issue title change text - Make the image attributes consistent, add alt, remove align Co-authored-by: zeripath Co-authored-by: techknowlogick --- modules/markup/html.go | 1 + modules/markup/html_test.go | 2 +- modules/templates/helper.go | 2 +- templates/repo/issue/view_content/comments.tmpl | 2 +- web_src/js/features/emoji.js | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/markup/html.go b/modules/markup/html.go index 41248654d80d4..bef6269a69157 100644 --- a/modules/markup/html.go +++ b/modules/markup/html.go @@ -481,6 +481,7 @@ func createCustomEmoji(alias, class string) *html.Node { Attr: []html.Attribute{}, } if class != "" { + img.Attr = append(img.Attr, html.Attribute{Key: "alt", Val: fmt.Sprintf(`:%s:`, alias)}) img.Attr = append(img.Attr, html.Attribute{Key: "src", Val: fmt.Sprintf(`%s/img/emoji/%s.png`, setting.StaticURLPrefix, alias)}) } diff --git a/modules/markup/html_test.go b/modules/markup/html_test.go index 69c4e675f593e..7f820d3990556 100644 --- a/modules/markup/html_test.go +++ b/modules/markup/html_test.go @@ -255,7 +255,7 @@ func TestRender_emoji(t *testing.T) { //Text that should be turned into or recognized as emoji test( ":gitea:", - `

`) + `

:gitea:

`) test( "Some text with 😄 in the middle", diff --git a/modules/templates/helper.go b/modules/templates/helper.go index 718fe8f2672ec..f86287f10bef9 100644 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -607,7 +607,7 @@ func ReactionToEmoji(reaction string) template.HTML { if val != nil { return template.HTML(val.Emoji) } - return template.HTML(fmt.Sprintf(``, setting.StaticURLPrefix, reaction)) + return template.HTML(fmt.Sprintf(`:%s:`, reaction, setting.StaticURLPrefix, reaction)) } // RenderNote renders the contents of a git-notes file as a commit message. diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index 850c5b91577f3..39468ee6b2722 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -218,7 +218,7 @@ {{.Poster.GetDisplayName}} - {{$.i18n.Tr "repo.issues.change_title_at" (.OldTitle|Escape) (.NewTitle|Escape) $createdStr | Safe}} + {{$.i18n.Tr "repo.issues.change_title_at" (.OldTitle|RenderEmoji) (.NewTitle|RenderEmoji) $createdStr | Safe}} {{else if eq .Type 11}} diff --git a/web_src/js/features/emoji.js b/web_src/js/features/emoji.js index 3c24a165b9625..51d8801dc8e8e 100644 --- a/web_src/js/features/emoji.js +++ b/web_src/js/features/emoji.js @@ -24,7 +24,7 @@ for (const key of emojiKeys) { export function emojiHTML(name) { let inner; if (name === 'gitea') { - inner = `:${name}:`; + inner = `:${name}:`; } else { inner = emojiString(name); } From 2ae8c7ab1cc1311a493fa4efa205412664f54f96 Mon Sep 17 00:00:00 2001 From: zeripath Date: Mon, 24 Aug 2020 16:48:15 +0100 Subject: [PATCH 34/54] Add cron running API (#12421) * Add cron running API Signed-off-by: Andrew Thornton * Apply suggestions from code review * placate-swagger Signed-off-by: Andrew Thornton * return not found Signed-off-by: Andrew Thornton * Apply suggestions from code review Co-authored-by: techknowlogick --- models/list_options.go | 8 +++ modules/structs/cron.go | 16 ++++++ routers/api/v1/admin/cron.go | 86 +++++++++++++++++++++++++++ routers/api/v1/api.go | 4 ++ routers/api/v1/swagger/cron.go | 16 ++++++ templates/swagger/v1_json.tmpl | 102 +++++++++++++++++++++++++++++++++ 6 files changed, 232 insertions(+) create mode 100644 modules/structs/cron.go create mode 100644 routers/api/v1/admin/cron.go create mode 100644 routers/api/v1/swagger/cron.go diff --git a/models/list_options.go b/models/list_options.go index 62c0944cc80c9..0912355352d69 100644 --- a/models/list_options.go +++ b/models/list_options.go @@ -37,6 +37,14 @@ func (opts ListOptions) setEnginePagination(e Engine) Engine { return e.Limit(opts.PageSize, (opts.Page-1)*opts.PageSize) } +// GetStartEnd returns the start and end of the ListOptions +func (opts ListOptions) GetStartEnd() (start, end int) { + opts.setDefaultValues() + start = (opts.Page - 1) * opts.PageSize + end = start + opts.Page + return +} + func (opts ListOptions) setDefaultValues() { if opts.PageSize <= 0 { opts.PageSize = setting.API.DefaultPagingNum diff --git a/modules/structs/cron.go b/modules/structs/cron.go new file mode 100644 index 0000000000000..f52a5ed3c90a5 --- /dev/null +++ b/modules/structs/cron.go @@ -0,0 +1,16 @@ +// Copyright 2020 The Gitea 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 structs + +import "time" + +// Cron represents a Cron task +type Cron struct { + Name string `json:"name"` + Schedule string `json:"schedule"` + Next time.Time `json:"next"` + Prev time.Time `json:"prev"` + ExecTimes int64 `json:"exec_times"` +} diff --git a/routers/api/v1/admin/cron.go b/routers/api/v1/admin/cron.go new file mode 100644 index 0000000000000..2531346fcb0cd --- /dev/null +++ b/routers/api/v1/admin/cron.go @@ -0,0 +1,86 @@ +// Copyright 2020 The Gitea 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 admin + +import ( + "net/http" + + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/cron" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/routers/api/v1/utils" +) + +// ListCronTasks api for getting cron tasks +func ListCronTasks(ctx *context.APIContext) { + // swagger:operation GET /admin/cron admin adminCronList + // --- + // summary: List cron tasks + // produces: + // - application/json + // parameters: + // - name: page + // in: query + // description: page number of results to return (1-based) + // type: integer + // - name: limit + // in: query + // description: page size of results + // type: integer + // responses: + // "200": + // "$ref": "#/responses/CronList" + // "403": + // "$ref": "#/responses/forbidden" + tasks := cron.ListTasks() + listOpts := utils.GetListOptions(ctx) + start, end := listOpts.GetStartEnd() + + if len(tasks) > listOpts.PageSize { + tasks = tasks[start:end] + } + + res := make([]structs.Cron, len(tasks)) + for i, task := range tasks { + res[i] = structs.Cron{ + Name: task.Name, + Schedule: task.Spec, + Next: task.Next, + Prev: task.Prev, + ExecTimes: task.ExecTimes, + } + } + ctx.JSON(http.StatusOK, res) +} + +// PostCronTask api for getting cron tasks +func PostCronTask(ctx *context.APIContext) { + // swagger:operation POST /admin/cron/{task} admin adminCronRun + // --- + // summary: Run cron task + // produces: + // - application/json + // parameters: + // - name: task + // in: path + // description: task to run + // type: string + // required: true + // responses: + // "204": + // "$ref": "#/responses/empty" + // "404": + // "$ref": "#/responses/notFound" + task := cron.GetTask(ctx.Params(":task")) + if task == nil { + ctx.NotFound() + return + } + task.Run() + log.Trace("Cron Task %s started by admin(%s)", task.Name, ctx.User.Name) + + ctx.Status(http.StatusNoContent) +} diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 506e6a3ec05ab..ab7ef6d6f714a 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -934,6 +934,10 @@ func RegisterRoutes(m *macaron.Macaron) { }) m.Group("/admin", func() { + m.Group("/cron", func() { + m.Get("", admin.ListCronTasks) + m.Post("/:task", admin.PostCronTask) + }) m.Get("/orgs", admin.GetAllOrgs) m.Group("/users", func() { m.Get("", admin.GetAllUsers) diff --git a/routers/api/v1/swagger/cron.go b/routers/api/v1/swagger/cron.go new file mode 100644 index 0000000000000..85f2ed0e3520a --- /dev/null +++ b/routers/api/v1/swagger/cron.go @@ -0,0 +1,16 @@ +// Copyright 2020 The Gitea 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 swagger + +import ( + api "code.gitea.io/gitea/modules/structs" +) + +// CronList +// swagger:response CronList +type swaggerResponseCronList struct { + // in:body + Body []api.Cron `json:"body"` +} diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index ec4570b4881ae..d9c8aeb87d6af 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -23,6 +23,69 @@ }, "basePath": "{{AppSubUrl}}/api/v1", "paths": { + "/admin/cron": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "List cron tasks", + "operationId": "adminCronList", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CronList" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/admin/cron/{task}": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Run cron task", + "operationId": "adminCronRun", + "parameters": [ + { + "type": "string", + "description": "task to run", + "name": "task", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, "/admin/orgs": { "get": { "produces": [ @@ -11931,6 +11994,36 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "Cron": { + "description": "Cron represents a Cron task", + "type": "object", + "properties": { + "exec_times": { + "type": "integer", + "format": "int64", + "x-go-name": "ExecTimes" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "next": { + "type": "string", + "format": "date-time", + "x-go-name": "Next" + }, + "prev": { + "type": "string", + "format": "date-time", + "x-go-name": "Prev" + }, + "schedule": { + "type": "string", + "x-go-name": "Schedule" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "DeleteEmailOption": { "description": "DeleteEmailOption options when deleting email addresses", "type": "object", @@ -15027,6 +15120,15 @@ "$ref": "#/definitions/ContentsResponse" } }, + "CronList": { + "description": "CronList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Cron" + } + } + }, "DeployKey": { "description": "DeployKey", "schema": { From 63f3c42be99cd72e765f7d8abfb8b2500b487855 Mon Sep 17 00:00:00 2001 From: GiteaBot Date: Mon, 24 Aug 2020 15:49:17 +0000 Subject: [PATCH 35/54] [skip ci] Updated translations via Crowdin --- options/locale/locale_ja-JP.ini | 1 + options/locale/locale_tr-TR.ini | 1 + 2 files changed, 2 insertions(+) diff --git a/options/locale/locale_ja-JP.ini b/options/locale/locale_ja-JP.ini index 79b238e92a07a..1f3c949d014d3 100644 --- a/options/locale/locale_ja-JP.ini +++ b/options/locale/locale_ja-JP.ini @@ -1275,6 +1275,7 @@ signing.wont_sign.basesigned=ベース側のコミットが署名されていな signing.wont_sign.headsigned=HEADコミットが署名されていないため、マージは署名されません signing.wont_sign.commitssigned=関連するコミットに署名されていないものがあるため、マージは署名されません signing.wont_sign.approved=PRが未承認のため、マージは署名されません +signing.wont_sign.not_signed_in=あなたはサインインしていません ext_wiki=外部Wiki ext_wiki.desc=外部Wikiへのリンク。 diff --git a/options/locale/locale_tr-TR.ini b/options/locale/locale_tr-TR.ini index e26ca2ff36ca3..b23ce691f5d8b 100644 --- a/options/locale/locale_tr-TR.ini +++ b/options/locale/locale_tr-TR.ini @@ -1275,6 +1275,7 @@ signing.wont_sign.basesigned=Temel işleme imzalanmadığı için birleştirme i signing.wont_sign.headsigned=Ana işleme imzalanmadığı için birleştirme imzalanmayacak signing.wont_sign.commitssigned=İlişkili tüm işlemeler imzalanmadığı için birleştirme imzalanmayacak signing.wont_sign.approved=Değişiklik İsteği onaylanmadığı için birleştirme imzalanmayacak +signing.wont_sign.not_signed_in=Oturum açmadınız ext_wiki=Harici Wiki ext_wiki.desc=Harici bir wiki'ye bağlantı. From 4b97f9018b51c1ef56c16154931123aac6080445 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Mon, 24 Aug 2020 21:46:56 +0200 Subject: [PATCH 36/54] OpenGraph: use repo avatar if exist (#12586) --- models/repo.go | 5 +++++ templates/base/head.tmpl | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/models/repo.go b/models/repo.go index b9ebec8be9329..d9b65769763fa 100644 --- a/models/repo.go +++ b/models/repo.go @@ -2254,6 +2254,11 @@ func (repo *Repository) relAvatarLink(e Engine) string { return setting.AppSubURL + "/repo-avatars/" + repo.Avatar } +// AvatarLink returns a link to the repository's avatar. +func (repo *Repository) AvatarLink() string { + return repo.avatarLink(x) +} + // avatarLink returns user avatar absolute link. func (repo *Repository) avatarLink(e Engine) string { link := repo.relAvatarLink(e) diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index 8c14ccfb6df53..5f27779235bee 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -97,7 +97,11 @@ {{end}} {{end}} - + {{if .Repository.AvatarLink}} + + {{else}} + + {{end}} {{else}} From 125ffb87f0d14b75f89acf2a47dc13c0f6577774 Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Mon, 24 Aug 2020 17:46:41 -0400 Subject: [PATCH 37/54] go1.15 on windows (#12589) * go1.15 on windows * update xgo to use node14 --- .drone.yml | 19 ++++--------------- Makefile | 5 +++-- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/.drone.yml b/.drone.yml index 0bb731d18d017..9824214bcdbe7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -447,23 +447,13 @@ steps: commands: - git fetch --tags --force - - name: static-windows - pull: always - image: techknowlogick/xgo:go-1.14.x - commands: - - apt update && apt -y install curl - - curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs - - export PATH=$PATH:$GOPATH/bin - - make frontend generate release-windows - environment: - GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not - TAGS: bindata sqlite sqlite_unlock_notify - - name: static pull: always image: techknowlogick/xgo:go-1.15.x commands: - - make release-linux release-darwin release-copy release-compress release-sources release-docs release-check + - curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt -y install nodejs + - export PATH=$PATH:$GOPATH/bin + - make release environment: GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not TAGS: bindata sqlite sqlite_unlock_notify @@ -558,8 +548,7 @@ steps: pull: always image: techknowlogick/xgo:go-1.15.x commands: - - apt update && apt -y install curl - - curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs + - curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt -y install nodejs - export PATH=$PATH:$GOPATH/bin - make release environment: diff --git a/Makefile b/Makefile index d0c1fdabfae4d..bfeccf82e056d 100644 --- a/Makefile +++ b/Makefile @@ -42,8 +42,10 @@ ifeq ($(HAS_GO), GO) endif ifeq ($(OS), Windows_NT) + GOFLAGS := -v -buildmode=exe EXECUTABLE ?= gitea.exe else + GOFLAGS := -v EXECUTABLE ?= gitea endif @@ -55,7 +57,6 @@ endif GOFMT ?= gofmt -s -GOFLAGS := -v EXTRA_GOFLAGS ?= MAKE_VERSION := $(shell $(MAKE) -v | head -n 1) @@ -556,7 +557,7 @@ release-windows: | $(DIST_DIRS) GO111MODULE=off $(GO) get -u src.techknowlogick.com/xgo; \ fi @echo "Warning: windows version is built using golang 1.14" - CGO_CFLAGS="$(CGO_CFLAGS)" GO111MODULE=off xgo -go go-1.14.x -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) . + CGO_CFLAGS="$(CGO_CFLAGS)" GO111MODULE=off xgo -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) . ifeq ($(CI),drone) cp /build/* $(DIST)/binaries endif From 019e577d54bc16c13488eb44e08a74bb9c3c66e7 Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Mon, 24 Aug 2020 17:49:26 -0400 Subject: [PATCH 38/54] Update JWT docs in example config (#12591) * Update JWT docs in example config align with way we have `LFS_JWT_SECRET` in config Fix #12590 * Update custom/conf/app.example.ini Co-authored-by: John Olheiser Co-authored-by: John Olheiser --- custom/conf/app.example.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini index 8d4636bfe4128..607041527c57a 100644 --- a/custom/conf/app.example.ini +++ b/custom/conf/app.example.ini @@ -971,8 +971,8 @@ ACCESS_TOKEN_EXPIRATION_TIME=3600 REFRESH_TOKEN_EXPIRATION_TIME=730 ; Check if refresh token got already used INVALIDATE_REFRESH_TOKENS=false -; OAuth2 authentication secret for access and refresh tokens, change this to a unique string. -JWT_SECRET=Bk0yK7Y9g_p56v86KaHqjSbxvNvu3SbKoOdOt2ZcXvU +; OAuth2 authentication secret for access and refresh tokens, change this yourself to a unique string. CLI generate option is helpful in this case. https://docs.gitea.io/en-us/command-line/#generate +JWT_SECRET= ; Maximum length of oauth2 token/cookie stored on server MAX_TOKEN_LENGTH=32767 From f3fb3c6f5600714548c63cb0771e887d7a226744 Mon Sep 17 00:00:00 2001 From: zeripath Date: Mon, 24 Aug 2020 23:39:18 +0100 Subject: [PATCH 39/54] Open transaction when adding Avatar email-hash pairs to the DB (#12577) When adding Avatar email-hash pairs we simply want the DB table to represent a Set. We don't care if the hash-pair is already present, so we just simply Insert and ignore the error. Unfortunately this seems to cause some DBs to log the duplicate insert to their logs - looking like a bug a in Gitea. Now, there is no standard way in SQL to say Insert but if there's an error ignore it. MySQL has INSERT IGNORE, PostgreSQL >= 9.5 has INSERT ... ON CONFLICT DO NOTHING, but I do not believe that SQLite or MSSQL have variants. This PR places the insert in a transaction which we are happy to fail if there is an error - hopefully this will stop the unnecessary logging. Signed-off-by: Andrew Thornton Co-authored-by: techknowlogick --- models/avatar.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/models/avatar.go b/models/avatar.go index 311d71462993f..c9ba2961ef7b9 100644 --- a/models/avatar.go +++ b/models/avatar.go @@ -41,7 +41,18 @@ func AvatarLink(email string) string { Email: lowerEmail, Hash: sum, } - _, _ = x.Insert(emailHash) + // OK we're going to open a session just because I think that that might hide away any problems with postgres reporting errors + sess := x.NewSession() + defer sess.Close() + if err := sess.Begin(); err != nil { + // we don't care about any DB problem just return the lowerEmail + return lowerEmail, nil + } + _, _ = sess.Insert(emailHash) + if err := sess.Commit(); err != nil { + // Seriously we don't care about any DB problems just return the lowerEmail - we expect the transaction to fail most of the time + return lowerEmail, nil + } return lowerEmail, nil }) return setting.AppSubURL + "/avatar/" + url.PathEscape(sum) From e90e122b395f2dc0aff9ee917a7377078c774d31 Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Tue, 25 Aug 2020 02:24:37 -0400 Subject: [PATCH 40/54] update to latest golangci-lint (v1.30.0) (#12597) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bfeccf82e056d..1fec4eb503cad 100644 --- a/Makefile +++ b/Makefile @@ -681,7 +681,7 @@ pr\#%: clean-all golangci-lint: @hash golangci-lint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ export BINARY="golangci-lint"; \ - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(GOPATH)/bin v1.24.0; \ + curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(GOPATH)/bin v1.30.0; \ fi golangci-lint run --timeout 5m From eb4db0445bea4a8dff370d80a270765840fcb8ef Mon Sep 17 00:00:00 2001 From: silverwind Date: Tue, 25 Aug 2020 21:48:53 +0200 Subject: [PATCH 41/54] Reindent Less to 2-space (#12602) Reindent and unify codebase to 2-space indentation. --- .editorconfig | 22 +- .stylelintrc | 2 +- web_src/less/_admin.less | 142 +- web_src/less/_base.less | 1650 ++++---- web_src/less/_chroma.less | 178 +- web_src/less/_dashboard.less | 332 +- web_src/less/_editor.less | 68 +- web_src/less/_explore.less | 160 +- web_src/less/_form.less | 350 +- web_src/less/_home.less | 92 +- web_src/less/_install.less | 52 +- web_src/less/_markdown.less | 950 ++--- web_src/less/_organization.less | 354 +- web_src/less/_repository.less | 4820 +++++++++++----------- web_src/less/_review.less | 270 +- web_src/less/_svg.less | 12 +- web_src/less/_tribute.less | 30 +- web_src/less/_user.less | 260 +- web_src/less/features/animations.less | 44 +- web_src/less/features/gitgraph.less | 466 +-- web_src/less/markdown/mermaid.less | 12 +- web_src/less/themes/theme-arc-green.less | 1426 +++---- 22 files changed, 5843 insertions(+), 5849 deletions(-) diff --git a/.editorconfig b/.editorconfig index 82542ea86dcc8..54738e8838d66 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,28 +1,22 @@ root = true [*] +indent_style = space +indent_size = 2 +tab_width = 2 +end_of_line = lf charset = utf-8 -insert_final_newline = true trim_trailing_whitespace = true -end_of_line = lf - -[*.md] -trim_trailing_whitespace = false +insert_final_newline = true [*.{go,tmpl,html}] indent_style = tab -indent_size = 2 - -[*.{less,css}] -indent_style = space -indent_size = 4 - -[*.{js,json,yml}] -indent_style = space -indent_size = 2 [Makefile] indent_style = tab [*.svg] insert_final_newline = false + +[*.md] +trim_trailing_whitespace = false diff --git a/.stylelintrc b/.stylelintrc index fcc33edeff988..0e1b38228fe9c 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -6,7 +6,7 @@ rules: color-hex-length: null comment-empty-line-before: null declaration-empty-line-before: null - indentation: 4 + indentation: 2 no-descending-specificity: null number-leading-zero: never rule-empty-line-before: null diff --git a/web_src/less/_admin.less b/web_src/less/_admin.less index 5bca054d7169e..29afe96b067c6 100644 --- a/web_src/less/_admin.less +++ b/web_src/less/_admin.less @@ -1,93 +1,93 @@ .admin { - padding-top: 15px; + padding-top: 15px; - .table.segment { - padding: 0; - font-size: 13px; + .table.segment { + padding: 0; + font-size: 13px; - &:not(.striped) { - thead { - th:last-child { - padding-right: 5px !important; - } - } - } - - th { - padding-top: 5px; - padding-bottom: 5px; + &:not(.striped) { + thead { + th:last-child { + padding-right: 5px !important; } + } + } - &:not(.select) { - th, - td { - &:first-of-type { - padding-left: 15px !important; - } - } - } + th { + padding-top: 5px; + padding-bottom: 5px; + } - form tbody button[type='submit'] { - padding: 5px 8px; + &:not(.select) { + th, + td { + &:first-of-type { + padding-left: 15px !important; } + } } - .ui.header, - .ui.segment { - box-shadow: 0 1px 2px 0 rgba(34, 36, 38, .15); + form tbody button[type='submit'] { + padding: 5px 8px; } + } - &.user { - .email { - max-width: 200px; - } - } + .ui.header, + .ui.segment { + box-shadow: 0 1px 2px 0 rgba(34, 36, 38, .15); + } - dl.admin-dl-horizontal { - padding: 20px; - margin: 0; + &.user { + .email { + max-width: 200px; + } + } - dd { - margin-left: 275px; - } + dl.admin-dl-horizontal { + padding: 20px; + margin: 0; - dt { - font-weight: bolder; - float: left; - width: 285px; - clear: left; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } + dd { + margin-left: 275px; } - &.config { - #test-mail-btn { - margin-left: 5px; - } + dt { + font-weight: bolder; + float: left; + width: 285px; + clear: left; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } + } - code, - pre { - white-space: pre-wrap; - word-wrap: break-word; + &.config { + #test-mail-btn { + margin-left: 5px; } + } - #notice-table { - .notice-description { - @media only screen and (max-width: 767px) { - max-width: 80vw; - } - @media only screen and (max-width: 991px) and (min-width: 768px) { - max-width: 360px; - } - @media only screen and (min-width: 992px) and (max-width: 1199.98px) { - max-width: 510px; - } - @media only screen and (min-width: 1200px) { - max-width: 640px; - } - } + code, + pre { + white-space: pre-wrap; + word-wrap: break-word; + } + + #notice-table { + .notice-description { + @media only screen and (max-width: 767px) { + max-width: 80vw; + } + @media only screen and (max-width: 991px) and (min-width: 768px) { + max-width: 360px; + } + @media only screen and (min-width: 992px) and (max-width: 1199.98px) { + max-width: 510px; + } + @media only screen and (min-width: 1200px) { + max-width: 640px; + } } + } } diff --git a/web_src/less/_base.less b/web_src/less/_base.less index 05c2a9b639844..caf108d1be671 100644 --- a/web_src/less/_base.less +++ b/web_src/less/_base.less @@ -1,1270 +1,1270 @@ @font-face { - font-family: 'Yu Gothic'; - src: local('Yu Gothic Medium'); - font-weight: 400; + font-family: 'Yu Gothic'; + src: local('Yu Gothic Medium'); + font-weight: 400; } @font-face { - font-family: 'Yu Gothic'; - src: local('Yu Gothic Bold'); - font-weight: 700; + font-family: 'Yu Gothic'; + src: local('Yu Gothic Bold'); + font-weight: 700; } @font-face { - font-family: 'Noto Color Emoji'; - src: - local('Noto Color Emoji'), - local('Noto-Color-Emoji'), - url('../fonts/noto-color-emoji/NotoColorEmoji.ttf') format('truetype'); + font-family: 'Noto Color Emoji'; + src: + local('Noto Color Emoji'), + local('Noto-Color-Emoji'), + url('../fonts/noto-color-emoji/NotoColorEmoji.ttf') format('truetype'); } @default-fonts: -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" sans-serif; @monospaced-fonts: 'SF Mono', Consolas, Menlo, 'Liberation Mono', Monaco, 'Lucida Console'; .override-fonts(@fonts) { - textarea { - font-family: @fonts; - } - - .markdown:not(code) { - font-family: @fonts; - } - - /* We're going to just override the semantic fonts here */ - h1, - h2, - h3, - h4, - h5 { - font-family: @fonts; - } - - .ui.accordion .title:not(.ui), - .ui.button, - .ui.card > .content > .header.ui.card > .content > .header, - .ui.category.search > .results .category > .name, - .ui.form input:not([type]), - .ui.form input[type="date"], - .ui.form input[type="datetime-local"], - .ui.form input[type="email"], - .ui.form input[type="file"], - .ui.form input[type="number"], - .ui.form input[type="password"], - .ui.form input[type="search"], - .ui.form input[type="tel"], - .ui.form input[type="text"], - .ui.form input[type="time"], - .ui.form input[type="url"], - .ui.header, - .ui.items > .item > .content > .header, - .ui.list .list > .item .header, - .ui.list > .item .header, - .ui.menu, - .ui.message .header, - .ui.modal > .header, - .ui.popup > .header, - .ui.search > .results .result .title, - .ui.search > .results > .message .header, - body, - .ui.input > input, - .ui.input input, - .ui.statistics .statistic > .value, - .ui.statistic > .value, - .ui.statistics .statistic > .label, - .ui.statistic > .label, - .ui.steps .step .title, - .ui.text.container, - .ui.language > .menu > .item& { - font-family: @fonts; - } + textarea { + font-family: @fonts; + } + + .markdown:not(code) { + font-family: @fonts; + } + + /* We're going to just override the semantic fonts here */ + h1, + h2, + h3, + h4, + h5 { + font-family: @fonts; + } + + .ui.accordion .title:not(.ui), + .ui.button, + .ui.card > .content > .header.ui.card > .content > .header, + .ui.category.search > .results .category > .name, + .ui.form input:not([type]), + .ui.form input[type="date"], + .ui.form input[type="datetime-local"], + .ui.form input[type="email"], + .ui.form input[type="file"], + .ui.form input[type="number"], + .ui.form input[type="password"], + .ui.form input[type="search"], + .ui.form input[type="tel"], + .ui.form input[type="text"], + .ui.form input[type="time"], + .ui.form input[type="url"], + .ui.header, + .ui.items > .item > .content > .header, + .ui.list .list > .item .header, + .ui.list > .item .header, + .ui.menu, + .ui.message .header, + .ui.modal > .header, + .ui.popup > .header, + .ui.search > .results .result .title, + .ui.search > .results > .message .header, + body, + .ui.input > input, + .ui.input input, + .ui.statistics .statistic > .value, + .ui.statistic > .value, + .ui.statistics .statistic > .label, + .ui.statistic > .label, + .ui.steps .step .title, + .ui.text.container, + .ui.language > .menu > .item& { + font-family: @fonts; + } } .override-fonts(@default-fonts); body { - background-color: #ffffff; - overflow-y: auto; - display: flex; - flex-direction: column; + background-color: #ffffff; + overflow-y: auto; + display: flex; + flex-direction: column; } @ja-fonts: 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Source Han Sans JP', 'Noto Sans CJK JP', 'Droid Sans Japanese', 'Meiryo', 'MS PGothic'; :lang(ja) { - .override-fonts(@default-fonts, @ja-fonts;); + .override-fonts(@default-fonts, @ja-fonts;); } @zh-CN-fonts: 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans CN', 'Source Han Sans SC', 'Noto Sans CJK SC', 'Microsoft YaHei', 'Heiti SC', SimHei; :lang(zh-CN) { - .override-fonts(@default-fonts, @zh-CN-fonts;); + .override-fonts(@default-fonts, @zh-CN-fonts;); } @zh-TW-fonts: 'PingFang TC', 'Hiragino Sans TC', 'Source Han Sans TW', 'Source Han Sans TC', 'Noto Sans CJK TC', 'Microsoft JhengHei', 'Heiti TC', PMingLiU; :lang(zh-TW) { - .override-fonts(@default-fonts, @zh-TW-fonts;); + .override-fonts(@default-fonts, @zh-TW-fonts;); } @zh-HK-fonts: 'PingFang HK', 'Hiragino Sans TC', 'Source Han Sans HK', 'Source Han Sans TC', 'Noto Sans CJK TC', 'Microsoft JhengHei', 'Heiti TC', PMingLiU_HKSCS, PMingLiU; :lang(zh-HK) { - .override-fonts(@default-fonts, @zh-HK-fonts;); + .override-fonts(@default-fonts, @zh-HK-fonts;); } @ko-fonts: 'Apple SD Gothic Neo', 'NanumBarunGothic', 'Malgun Gothic', 'Gulim', 'Dotum', 'Nanum Gothic', 'Source Han Sans KR', 'Noto Sans CJK KR'; :lang(ko) { - .override-fonts(@default-fonts, @ko-fonts;); + .override-fonts(@default-fonts, @ko-fonts;); } img { - border-radius: 3px; + border-radius: 3px; } table { - border-collapse: collapse; + border-collapse: collapse; } a { - cursor: pointer; + cursor: pointer; } .rounded { - border-radius: .28571429rem !important; + border-radius: .28571429rem !important; } .wrap { - word-wrap: break-word; - word-break: break-all; + word-wrap: break-word; + word-break: break-all; } pre, code, .mono { - font: 12px @monospaced-fonts, monospace; + font: 12px @monospaced-fonts, monospace; - &.raw { - padding: 7px 12px; - margin: 10px 0; - background-color: #f8f8f8; - border: 1px solid #dddddd; - border-radius: 3px; - font-size: 13px; - line-height: 1.5; - overflow: auto; - } + &.raw { + padding: 7px 12px; + margin: 10px 0; + background-color: #f8f8f8; + border: 1px solid #dddddd; + border-radius: 3px; + font-size: 13px; + line-height: 1.5; + overflow: auto; + } - &.wrap { - white-space: pre-wrap; - word-break: break-all; - overflow-wrap: break-word; - word-wrap: break-word; - } + &.wrap { + white-space: pre-wrap; + word-break: break-all; + overflow-wrap: break-word; + word-wrap: break-word; + } } .dont-break-out { - overflow-wrap: break-word; - word-wrap: break-word; - word-break: break-all; - hyphens: auto; + overflow-wrap: break-word; + word-wrap: break-word; + word-break: break-all; + hyphens: auto; } .full.height { - flex-grow: 1; - padding-bottom: 80px; + flex-grow: 1; + padding-bottom: 80px; } .following.bar { - z-index: 900; - left: 0; - margin: 0 !important; + z-index: 900; + left: 0; + margin: 0 !important; - &.light { - background-color: white; - border-bottom: 1px solid #dddddd; - box-shadow: 0 2px 3px rgba(0, 0, 0, .04); - } + &.light { + background-color: white; + border-bottom: 1px solid #dddddd; + box-shadow: 0 2px 3px rgba(0, 0, 0, .04); + } - .column .menu { - margin-top: 0; - } + .column .menu { + margin-top: 0; + } - .top.menu a.item.brand { - padding-left: 0; - } + .top.menu a.item.brand { + padding-left: 0; + } - .brand .ui.mini.image { - width: 30px; - } + .brand .ui.mini.image { + width: 30px; + } - .top.menu a.item:hover, - .top.menu .dropdown.item:hover, - .top.menu .dropdown.item.active { - background-color: transparent; - } + .top.menu a.item:hover, + .top.menu .dropdown.item:hover, + .top.menu .dropdown.item.active { + background-color: transparent; + } - .top.menu a.item:hover { - color: rgba(0, 0, 0, .45); - } + .top.menu a.item:hover { + color: rgba(0, 0, 0, .45); + } - .top.menu .menu { - z-index: 900; - } + .top.menu .menu { + z-index: 900; + } - .fitted .svg { - margin-right: 0; - } + .fitted .svg { + margin-right: 0; + } - .svg { - margin-right: .75em; - } + .svg { + margin-right: .75em; + } - .searchbox { - background-color: #f4f4f4 !important; + .searchbox { + background-color: #f4f4f4 !important; - &:focus { - background-color: #e9e9e9 !important; - } + &:focus { + background-color: #e9e9e9 !important; } + } - .text .svg { - width: 16px; - text-align: center; - } + .text .svg { + width: 16px; + text-align: center; + } - #navbar { - width: 100vw; - min-height: 52px; - padding: 0 .5rem; - } + #navbar { + width: 100vw; + min-height: 52px; + padding: 0 .5rem; + } - #navbar .brand { - margin: 0; - } + #navbar .brand { + margin: 0; + } - @media only screen and (max-width: 767px) { - #navbar:not(.shown) > *:not(:first-child) { - display: none; - } + @media only screen and (max-width: 767px) { + #navbar:not(.shown) > *:not(:first-child) { + display: none; } + } } .right.stackable.menu { - // responsive fix: this makes sure that the right menu when the page - // is on mobile view will have elements stacked on top of each other. - // no, stackable won't work on right menus. - margin-left: auto; - display: flex; - align-items: inherit; - flex-direction: inherit; + // responsive fix: this makes sure that the right menu when the page + // is on mobile view will have elements stacked on top of each other. + // no, stackable won't work on right menus. + margin-left: auto; + display: flex; + align-items: inherit; + flex-direction: inherit; } .ui { - &.left:not(.action) { - float: left; - } + &.left:not(.action) { + float: left; + } - &.right:not(.action) { - float: right; - } + &.right:not(.action) { + float: right; + } - &.button, - &.menu .item { - user-select: auto; - } + &.button, + &.menu .item { + user-select: auto; + } - &.container { - &.fluid { - &.padded { - padding: 0 10px; - } - } + &.container { + &.fluid { + &.padded { + padding: 0 10px; + } } + } - &.form { - .ui.button { - font-weight: normal; - } + &.form { + .ui.button { + font-weight: normal; } + } - &.floating.label { - z-index: 10; - } + &.floating.label { + z-index: 10; + } - &.transparent.label { - background-color: transparent; - } + &.transparent.label { + background-color: transparent; + } - &.nopadding { - padding: 0; - } + &.nopadding { + padding: 0; + } - &.menu, - &.vertical.menu, - &.segment { - box-shadow: none; - } + &.menu, + &.vertical.menu, + &.segment { + box-shadow: none; + } - /* Overide semantic selector '.ui.menu:not(.vertical) .item > .button' */ - /* This fixes the commit graph button on the commits page */ + /* Overide semantic selector '.ui.menu:not(.vertical) .item > .button' */ + /* This fixes the commit graph button on the commits page */ - .menu:not(.vertical) .item > .button.compact { - padding: .58928571em 1.125em; - } + .menu:not(.vertical) .item > .button.compact { + padding: .58928571em 1.125em; + } - .menu:not(.vertical) .item > .button.small { - font-size: .92857143rem; - } + .menu:not(.vertical) .item > .button.small { + font-size: .92857143rem; + } - &.menu .ui.dropdown.item .menu .item { - width: 100%; - } + &.menu .ui.dropdown.item .menu .item { + width: 100%; + } - &.dropdown .menu > .item > .floating.label { - z-index: 11; - } + &.dropdown .menu > .item > .floating.label { + z-index: 11; + } - &.dropdown .menu .menu > .item > .floating.label { - z-index: 21; - } + &.dropdown .menu .menu > .item > .floating.label { + z-index: 21; + } - &.dropdown .menu > .header { - font-size: .8em; - } + &.dropdown .menu > .header { + font-size: .8em; + } - .text { - &.red { - color: #d95c5c !important; + .text { + &.red { + color: #d95c5c !important; - a { - color: #d95c5c !important; + a { + color: #d95c5c !important; - &:hover { - color: #e67777 !important; - } - } + &:hover { + color: #e67777 !important; } + } + } - &.blue { - color: #428bca !important; + &.blue { + color: #428bca !important; - a { - color: #1155cc !important; + a { + color: #1155cc !important; - &:hover { - color: #428bca !important; - } - } - } - - &.black { - color: #444444; - - &:hover { - color: #000000; - } + &:hover { + color: #428bca !important; } + } + } - &.grey { - color: #767676 !important; + &.black { + color: #444444; - a { - color: #444444 !important; + &:hover { + color: #000000; + } + } - &:hover { - color: #000000 !important; - } - } - } + &.grey { + color: #767676 !important; - &.light.grey { - color: #888888 !important; - } + a { + color: #444444 !important; - &.green { - color: #6cc644 !important; + &:hover { + color: #000000 !important; } + } + } - &.purple { - color: #6e5494 !important; - } + &.light.grey { + color: #888888 !important; + } - &.yellow { - color: #fbbd08 !important; - } + &.green { + color: #6cc644 !important; + } - &.orange { - color: #f2711c !important; - } + &.purple { + color: #6e5494 !important; + } - &.gold { - color: #a1882b !important; - } + &.yellow { + color: #fbbd08 !important; + } - &.left { - text-align: left !important; - } + &.orange { + color: #f2711c !important; + } - &.right { - text-align: right !important; - } + &.gold { + color: #a1882b !important; + } - &.small { - font-size: .75em; - } + &.left { + text-align: left !important; + } - &.normal { - font-weight: normal; - } + &.right { + text-align: right !important; + } - &.bold { - font-weight: bold; - } + &.small { + font-size: .75em; + } - &.italic { - font-style: italic; - } + &.normal { + font-weight: normal; + } - &.truncate { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - display: inline-block; - } + &.bold { + font-weight: bold; + } - &.thin { - font-weight: normal; - } + &.italic { + font-style: italic; + } - &.middle { - vertical-align: middle; - } + &.truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + display: inline-block; + } - &.nopadding { - padding: 0; - } + &.thin { + font-weight: normal; + } - &.nomargin { - margin: 0; - } + &.middle { + vertical-align: middle; } - .message { - text-align: center; + &.nopadding { + padding: 0; } - .message > ul { - margin-left: auto; - margin-right: auto; - display: table; - text-align: left; + &.nomargin { + margin: 0; } + } - &.bottom.attached.message { - font-weight: bold; - text-align: left; - color: black; + .message { + text-align: center; + } - .pull-right { - color: black; - } + .message > ul { + margin-left: auto; + margin-right: auto; + display: table; + text-align: left; + } - & > span, - .pull-right > span { - color: #21ba45; - } + &.bottom.attached.message { + font-weight: bold; + text-align: left; + color: black; + + .pull-right { + color: black; } - .header > i + .content { - padding-left: .75rem; - vertical-align: middle; + & > span, + .pull-right > span { + color: #21ba45; } + } - .warning { - &.header { - background-color: #f9edbe !important; - border-color: #efc16b; - } + .header > i + .content { + padding-left: .75rem; + vertical-align: middle; + } - &.segment { - border-color: #efc16b; - } + .warning { + &.header { + background-color: #f9edbe !important; + border-color: #efc16b; } - .info { - &.segment { - border: 1px solid #c5d5dd; + &.segment { + border-color: #efc16b; + } + } - &.top { - background-color: #e6f1f6 !important; + .info { + &.segment { + border: 1px solid #c5d5dd; - h3, - h4 { - margin-top: 0; - } + &.top { + background-color: #e6f1f6 !important; - h3:last-child { - margin-top: 4px; - } + h3, + h4 { + margin-top: 0; + } - > :last-child { - margin-bottom: 0; - } - } + h3:last-child { + margin-top: 4px; } - } - .normal.header { - font-weight: normal; + > :last-child { + margin-bottom: 0; + } + } } + } - .avatar.image, - .avatar.image img, - .avatar.image svg, - .avatar.images .image, - .avatar.images img, - .avatar.images svg { - border-radius: 3px; - } + .normal.header { + font-weight: normal; + } - .form { - .fake { - display: none !important; - } + .avatar.image, + .avatar.image img, + .avatar.image svg, + .avatar.images .image, + .avatar.images img, + .avatar.images svg { + border-radius: 3px; + } - .sub.field { - margin-left: 25px; - } + .form { + .fake { + display: none !important; } - .sha.label { - font-family: @monospaced-fonts, monospace; - font-size: 13px; - padding: 6px 10px 4px; - font-weight: normal; - margin: 0 6px; + .sub.field { + margin-left: 25px; } + } - .button.truncate { - display: inline-block; - max-width: 100%; - overflow: hidden; - text-overflow: ellipsis; - vertical-align: top; - white-space: nowrap; - margin-right: 6px; - } + .sha.label { + font-family: @monospaced-fonts, monospace; + font-size: 13px; + padding: 6px 10px 4px; + font-weight: normal; + margin: 0 6px; + } - &.status.buttons { - .svg { - margin-right: 4px; - } - } + .button.truncate { + display: inline-block; + max-width: 100%; + overflow: hidden; + text-overflow: ellipsis; + vertical-align: top; + white-space: nowrap; + margin-right: 6px; + } - &.inline.delete-button { - padding: 8px 15px; - font-weight: normal; + &.status.buttons { + .svg { + margin-right: 4px; } + } - .background { - &.red { - background-color: #d95c5c !important; - } - - &.blue { - background-color: #428bca !important; - } + &.inline.delete-button { + padding: 8px 15px; + font-weight: normal; + } - &.black { - background-color: #444444; - } + .background { + &.red { + background-color: #d95c5c !important; + } - &.grey { - background-color: #767676 !important; - } + &.blue { + background-color: #428bca !important; + } - &.light.grey { - background-color: #888888 !important; - } + &.black { + background-color: #444444; + } - &.green { - background-color: #6cc644 !important; - } + &.grey { + background-color: #767676 !important; + } - &.purple { - background-color: #6e5494 !important; - } + &.light.grey { + background-color: #888888 !important; + } - &.yellow { - background-color: #fbbf09 !important; - } + &.green { + background-color: #6cc644 !important; + } - &.orange { - background-color: #f2711c !important; - } + &.purple { + background-color: #6e5494 !important; + } - &.gold { - background-color: #a1882b !important; - } + &.yellow { + background-color: #fbbf09 !important; } - .migrate { - color: #888888 !important; - opacity: .5; - a { - color: #444444 !important; + &.orange { + background-color: #f2711c !important; + } - &:hover { - color: #000000 !important; - } - } + &.gold { + background-color: #a1882b !important; } + } - .border { - border: 1px solid; - &.red { - border-color: #d95c5c !important; - } + .migrate { + color: #888888 !important; + opacity: .5; + a { + color: #444444 !important; - &.blue { - border-color: #428bca !important; - } + &:hover { + color: #000000 !important; + } + } + } - &.black { - border-color: #444444; - } + .border { + border: 1px solid; + &.red { + border-color: #d95c5c !important; + } - &.grey { - border-color: #767676 !important; - } + &.blue { + border-color: #428bca !important; + } - &.light.grey { - border-color: #888888 !important; - } + &.black { + border-color: #444444; + } - &.green { - border-color: #6cc644 !important; - } + &.grey { + border-color: #767676 !important; + } - &.purple { - border-color: #6e5494 !important; - } + &.light.grey { + border-color: #888888 !important; + } - &.yellow { - border-color: #fbbd08 !important; - } + &.green { + border-color: #6cc644 !important; + } - &.orange { - border-color: #f2711c !important; - } + &.purple { + border-color: #6e5494 !important; + } - &.gold { - border-color: #a1882b !important; - } + &.yellow { + border-color: #fbbd08 !important; } - .branch-tag-choice { - line-height: 20px; + &.orange { + border-color: #f2711c !important; } - &.pagination.menu { - @media only screen and (max-width: 767px) { - .item:not(.active):not(.navigation), - .item.navigation span.navigation_label { - display: none; - } - } - &.narrow .item { - padding-left: 8px; - padding-right: 8px; - min-width: 1em; - text-align: center; - .icon { - margin-right: 0; - } - } + &.gold { + border-color: #a1882b !important; + } + } + + .branch-tag-choice { + line-height: 20px; + } + + &.pagination.menu { + @media only screen and (max-width: 767px) { + .item:not(.active):not(.navigation), + .item.navigation span.navigation_label { + display: none; + } + } + &.narrow .item { + padding-left: 8px; + padding-right: 8px; + min-width: 1em; + text-align: center; + .icon { + margin-right: 0; + } } + } } .file-comment { - font: 12px @monospaced-fonts, monospace; - color: rgba(0, 0, 0, .87); + font: 12px @monospaced-fonts, monospace; + color: rgba(0, 0, 0, .87); } .ui.floating.dropdown { - .overflow.menu { - .scrolling.menu.items { - border-radius: 0 !important; - box-shadow: none !important; - border-bottom: 1px solid rgba(34, 36, 38, .15); - } + .overflow.menu { + .scrolling.menu.items { + border-radius: 0 !important; + box-shadow: none !important; + border-bottom: 1px solid rgba(34, 36, 38, .15); } + } } .user-menu > .item { - width: 100%; - border-radius: 0 !important; + width: 100%; + border-radius: 0 !important; } .scrolling.menu { - .item.selected { - font-weight: 700 !important; - } + .item.selected { + font-weight: 700 !important; + } } footer { - background-color: white; - border-top: 1px solid #d6d6d6; - width: 100%; - flex-basis: 40px; - color: #888888; - - .container { - width: 100vw !important; - padding: 0 .5rem; - max-width: calc(100vw - 1rem) !important; - - .fa { - width: 16px; - text-align: center; - color: #428bca; - } + background-color: white; + border-top: 1px solid #d6d6d6; + width: 100%; + flex-basis: 40px; + color: #888888; - .links > * { - border-left: 1px solid #d6d6d6; - padding-left: 8px; - margin-left: 5px; + .container { + width: 100vw !important; + padding: 0 .5rem; + max-width: calc(100vw - 1rem) !important; - &:first-child { - border-left: 0; - } - } + .fa { + width: 16px; + text-align: center; + color: #428bca; } - .ui.language .menu { - max-height: 500px; - overflow-y: auto; - margin-bottom: 7px; + .links > * { + border-left: 1px solid #d6d6d6; + padding-left: 8px; + margin-left: 5px; + + &:first-child { + border-left: 0; + } } + } - .ui { - &.left, - &.right { - line-height: 40px; - } + .ui.language .menu { + max-height: 500px; + overflow-y: auto; + margin-bottom: 7px; + } + + .ui { + &.left, + &.right { + line-height: 40px; } + } } .hide { - display: none; + display: none; - &.show-outdated { - display: none !important; - } + &.show-outdated { + display: none !important; + } - &.hide-outdated { - display: none !important; - } + &.hide-outdated { + display: none !important; + } } .center { - text-align: center; + text-align: center; } .generate-img(16); .generate-img(@n, @i: 1) when (@i =< @n) { - .img-@{i} { - width: (2px * @i) !important; - height: (2px * @i) !important; - } + .img-@{i} { + width: (2px * @i) !important; + height: (2px * @i) !important; + } - .generate-img(@n, (@i + 1)); + .generate-img(@n, (@i + 1)); } // Conditional display @media only screen and (min-width: 768px) { - .mobile-only, - .ui.button.mobile-only { - display: none; - } + .mobile-only, + .ui.button.mobile-only { + display: none; + } - // has the same behaviour of sr-only, hiding the content for - // non-screenreaders, but is shown on mobile devices. - .sr-mobile-only { - .sr-only(); - } + // has the same behaviour of sr-only, hiding the content for + // non-screenreaders, but is shown on mobile devices. + .sr-mobile-only { + .sr-only(); + } } @media only screen and (max-width: 767px) { - .not-mobile { - display: none; - } + .not-mobile { + display: none; + } } // Accessibility .sr-only { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - border: 0; + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0; } .sr-only-focusable:active, .sr-only-focusable:focus { - position: static; - width: auto; - height: auto; - margin: 0; - overflow: visible; - clip: auto; + position: static; + width: auto; + height: auto; + margin: 0; + overflow: visible; + clip: auto; } @media only screen and (max-width: 991px) and (min-width: 768px) { - .ui.container { - width: 95%; - } + .ui.container { + width: 95%; + } } .ui.menu.new-menu { - justify-content: center !important; - padding-top: 15px !important; - margin-top: -15px !important; - margin-bottom: 15px !important; - background: #fafafa; - border-width: 1px !important; + justify-content: center !important; + padding-top: 15px !important; + margin-top: -15px !important; + margin-bottom: 15px !important; + background: #fafafa; + border-width: 1px !important; } @media only screen and (max-width: 1200px) { - .ui.menu.new-menu { - overflow-x: auto !important; - justify-content: left !important; - padding-bottom: 2px; - } - - .ui.menu.new-menu::-webkit-scrollbar { - height: 8px; - display: none; - } - - .ui.menu.new-menu:hover::-webkit-scrollbar { - display: block; - } + .ui.menu.new-menu { + overflow-x: auto !important; + justify-content: left !important; + padding-bottom: 2px; + } + + .ui.menu.new-menu::-webkit-scrollbar { + height: 8px; + display: none; + } - .ui.menu.new-menu::-webkit-scrollbar-track { - background: rgba(0, 0, 0, .01); - } + .ui.menu.new-menu:hover::-webkit-scrollbar { + display: block; + } - .ui.menu.new-menu::-webkit-scrollbar-thumb { - background: rgba(0, 0, 0, .2); - } + .ui.menu.new-menu::-webkit-scrollbar-track { + background: rgba(0, 0, 0, .01); + } - .ui.menu.new-menu:after { - position: absolute; - margin-top: -15px; - display: block; - background-image: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1) 100%); - content: ' '; - right: 0; - height: 53px; - z-index: 1000; - width: 60px; - clear: none; - visibility: visible; - } + .ui.menu.new-menu::-webkit-scrollbar-thumb { + background: rgba(0, 0, 0, .2); + } - .ui.menu.new-menu a.item:last-child { - padding-right: 30px !important; - } + .ui.menu.new-menu:after { + position: absolute; + margin-top: -15px; + display: block; + background-image: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1) 100%); + content: ' '; + right: 0; + height: 53px; + z-index: 1000; + width: 60px; + clear: none; + visibility: visible; + } + + .ui.menu.new-menu a.item:last-child { + padding-right: 30px !important; + } } [v-cloak] { - display: none !important; + display: none !important; } .repos-search { - padding-bottom: 0 !important; + padding-bottom: 0 !important; } .repos-filter { - margin-top: 0 !important; - border-bottom-width: 0 !important; - margin-bottom: 2px !important; + margin-top: 0 !important; + border-bottom-width: 0 !important; + margin-bottom: 2px !important; } #user-heatmap { - width: 107%; // Fixes newest contributions not showing - text-align: center; + width: 107%; // Fixes newest contributions not showing + text-align: center; - svg:not(:root) { - overflow: inherit; - padding: 0 !important; - } + svg:not(:root) { + overflow: inherit; + padding: 0 !important; + } - @media only screen and (max-width: 1200px) { - & { - display: none; - } + @media only screen and (max-width: 1200px) { + & { + display: none; } + } - .total-contributions { - text-align: left; - font-weight: 500; - margin-top: 0; - } + .total-contributions { + text-align: left; + font-weight: 500; + margin-top: 0; + } } .heatmap-color-0 { - background-color: #f4f4f4; + background-color: #f4f4f4; } .heatmap-color-1 { - background-color: #d8efbf; + background-color: #d8efbf; } .heatmap-color-2 { - background-color: #9fdb81; + background-color: #9fdb81; } .heatmap-color-3 { - background-color: #66c74b; + background-color: #66c74b; } .heatmap-color-4 { - background-color: #609926; + background-color: #609926; } .heatmap-color-5 { - background-color: #025900; + background-color: #025900; } .activity-bar-graph { - background-color: #6cc644; - color: #000000; + background-color: #6cc644; + color: #000000; } .activity-bar-graph-alt { - color: #000000; + color: #000000; } .archived-icon { - color: lighten(#000000, 70%) !important; + color: lighten(#000000, 70%) !important; } .oauth2-authorize-application-box { - margin-top: 3em !important; + margin-top: 3em !important; } /* multiple radio or checkboxes as inline element */ .inline-grouped-list { - display: inline-block; - vertical-align: top; + display: inline-block; + vertical-align: top; - > .ui { - display: block; - margin-top: 5px; - margin-bottom: 10px; + > .ui { + display: block; + margin-top: 5px; + margin-bottom: 10px; - &:first-child { - margin-top: 1px; - } + &:first-child { + margin-top: 1px; } + } } i.icons .icon:first-child { - margin-right: 0; + margin-right: 0; } i.icon.centerlock { - top: 1em; + top: 1em; } .ui.label { - padding: .3em .5em; + padding: .3em .5em; } .ui.label > .detail .icons { - margin-right: .25em; + margin-right: .25em; } .ui.label > .detail .icons .icon { - margin-right: 0; + margin-right: 0; } .lines-num { - padding-left: 10px; - padding-right: 10px; - text-align: right !important; - color: rgba(27, 31, 35, .3); - width: 1%; - user-select: none; - - span { - &.bottom-line { - &:after { - border-bottom: 1px solid #eaecef; - } - } + padding-left: 10px; + padding-right: 10px; + text-align: right !important; + color: rgba(27, 31, 35, .3); + width: 1%; + user-select: none; + + span { + &.bottom-line { + &:after { + border-bottom: 1px solid #eaecef; + } + } - &:after { - content: attr(data-line-number); - line-height: 20px !important; - padding: 0 10px; - cursor: pointer; - display: block; - } + &:after { + content: attr(data-line-number); + line-height: 20px !important; + padding: 0 10px; + cursor: pointer; + display: block; } + } } .lines-type-marker { - vertical-align: top; + vertical-align: top; } .lines-num, .lines-code { - padding-top: 0; - padding-bottom: 0; - vertical-align: top; + padding-top: 0; + padding-bottom: 0; + vertical-align: top; - pre, - ol { - background-color: inherit; - margin: 0; - padding: 0 !important; + pre, + ol { + background-color: inherit; + margin: 0; + padding: 0 !important; - li { - display: block; - width: calc(100% - 1ch); - padding-left: 1ch; - } + li { + display: block; + width: calc(100% - 1ch); + padding-left: 1ch; } + } } .lines-code code { - white-space: pre; + white-space: pre; } .blame .lines-num { - padding: 0 !important; - background-color: #f5f5f5; + padding: 0 !important; + background-color: #f5f5f5; } .blame .lines-code { - padding: 0 !important; + padding: 0 !important; } .lines-commit { - vertical-align: top; - color: #999999; - padding: 0 !important; - background: #f5f5f5; - width: 1%; - -moz-user-select: none; - -ms-user-select: none; - -webkit-user-select: none; + vertical-align: top; + color: #999999; + padding: 0 !important; + background: #f5f5f5; + width: 1%; + -moz-user-select: none; + -ms-user-select: none; + -webkit-user-select: none; + user-select: none; + + .blame-info { + width: 350px; + max-width: 350px; + display: block; user-select: none; + padding: 0 0 0 10px; - .blame-info { - width: 350px; - max-width: 350px; - display: block; - user-select: none; - padding: 0 0 0 10px; - - .blame-data { - display: flex; - font-family: @default-fonts; - - .blame-message { - flex-grow: 2; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - line-height: 20px; - } - - .blame-time, - .blame-avatar { - flex-shrink: 0; - } - } - } + .blame-data { + display: flex; + font-family: @default-fonts; - .ui.avatar.image { - height: 18px; - width: 18px; + .blame-message { + flex-grow: 2; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + line-height: 20px; + } + + .blame-time, + .blame-avatar { + flex-shrink: 0; + } } + } + + .ui.avatar.image { + height: 18px; + width: 18px; + } } .lines-code, .lines-commit { - .bottom-line { - border-bottom: 1px solid #eaecef; - } + .bottom-line { + border-bottom: 1px solid #eaecef; + } } .code-view { - overflow: auto; - overflow-x: auto; - overflow-y: hidden; + overflow: auto; + overflow-x: auto; + overflow-y: hidden; - &.has-context-menu { - overflow: visible; - overflow-x: visible; - overflow-y: visible; - } + &.has-context-menu { + overflow: visible; + overflow-x: visible; + overflow-y: visible; + } - *:not(.fa):not(.svg):not(.icon) { - font-size: 12px; - font-family: @monospaced-fonts, monospace; - line-height: 20px; - } + *:not(.fa):not(.svg):not(.icon) { + font-size: 12px; + font-family: @monospaced-fonts, monospace; + line-height: 20px; + } - table { - width: 100%; - } + table { + width: 100%; + } - .lines-code.active { - background: #fffbdd !important; - } + .lines-code.active { + background: #fffbdd !important; + } } .octicon-tiny { - font-size: .85714286rem; + font-size: .85714286rem; } .ui.basic.blue.button, .ui.basic.blue.buttons .button { - box-shadow: inset 0 0 0 1px #1678c2 !important; - color: #1678c2 !important; + box-shadow: inset 0 0 0 1px #1678c2 !important; + color: #1678c2 !important; } .ui.label > img { - width: auto !important; - vertical-align: middle; - height: 2.1666em !important; + width: auto !important; + vertical-align: middle; + height: 2.1666em !important; } .svg { - span.green & { - color: #21ba45; - } - span.red & { - color: #db2828; - } - span.purple & { - color: #a333c8; - } + span.green & { + color: #21ba45; + } + span.red & { + color: #db2828; + } + span.purple & { + color: #a333c8; + } } .ui.popup .ui.label { - margin-bottom: .4em; + margin-bottom: .4em; } .color-icon { - margin-right: .5em; - margin-left: .5em; - display: inline-block; - border: 0 solid rgba(0, 0, 0, .2); - border-radius: 100%; - height: 14px; - width: 14px; - position: relative; - top: 2px; + margin-right: .5em; + margin-left: .5em; + display: inline-block; + border: 0 solid rgba(0, 0, 0, .2); + border-radius: 100%; + height: 14px; + width: 14px; + position: relative; + top: 2px; } .ui.label > .color-icon { - margin-left: 0; + margin-left: 0; } .invisible { - visibility: hidden; + visibility: hidden; } /* https://github.com/go-gitea/gitea/issues/10210 */ .ui.attached.segment ~ .ui.top.attached.header { - margin-top: 1rem; + margin-top: 1rem; } table th[data-sortt-asc], table th[data-sortt-desc] { - &:hover { - background: rgba(0, 0, 0, .1) !important; - cursor: pointer !important; - } - .svg { - margin-left: .25rem; - } + &:hover { + background: rgba(0, 0, 0, .1) !important; + cursor: pointer !important; + } + .svg { + margin-left: .25rem; + } } /* limit width of all direct dropdown menu children */ /* https://github.com/go-gitea/gitea/pull/10835 */ .dropdown:not(.selection) > .menu:not(.review-box) > *:not(.header) { - max-width: 300px; - overflow-x: hidden; - text-overflow: ellipsis; + max-width: 300px; + overflow-x: hidden; + text-overflow: ellipsis; } .dropdown:not(.selection) > .menu.review-box > * { - @media only screen and (max-height: 700px) { - .CodeMirror, - .CodeMirror-scroll { - min-height: 100px; - } + @media only screen and (max-height: 700px) { + .CodeMirror, + .CodeMirror-scroll { + min-height: 100px; } + } } .text-label { - display: inline-flex !important; - align-items: center !important; + display: inline-flex !important; + align-items: center !important; } .text-label .color-icon { - position: static !important; + position: static !important; } .emoji, .reaction { - font-size: 1.25em; - line-height: 1; - font-style: normal !important; - font-weight: normal !important; - vertical-align: -.075em; + font-size: 1.25em; + line-height: 1; + font-style: normal !important; + font-weight: normal !important; + vertical-align: -.075em; } .emoji img, .reaction img { - border-width: 0 !important; - margin: 0 !important; - width: 1em !important; - height: 1em !important; - vertical-align: -.15em; + border-width: 0 !important; + margin: 0 !important; + width: 1em !important; + height: 1em !important; + vertical-align: -.15em; } /* https://github.com/go-gitea/gitea/pull/11486 */ .ui.sub.header { - text-transform: none; + text-transform: none; } .ui.tabular.menu { - .item { - padding: 11px 12px; - color: rgba(0, 0, 0, .5); - } + .item { + padding: 11px 12px; + color: rgba(0, 0, 0, .5); + } - .item:hover { - color: rgba(0, 0, 0, .8); - } + .item:hover { + color: rgba(0, 0, 0, .8); + } - .item.active { - color: rgba(0, 0, 0, .9); - margin-top: 1px; /* offset fomantic's margin-bottom: -1px */ - } + .item.active { + color: rgba(0, 0, 0, .9); + margin-top: 1px; /* offset fomantic's margin-bottom: -1px */ + } } .ui.secondary.pointing.menu .item { - padding: 12px; + padding: 12px; } .ui.header > .ui.label.compact { - margin-top: inherit; + margin-top: inherit; } diff --git a/web_src/less/_chroma.less b/web_src/less/_chroma.less index a01aa21023875..11de7b86ba543 100644 --- a/web_src/less/_chroma.less +++ b/web_src/less/_chroma.less @@ -1,377 +1,377 @@ /* Background */ .chroma { - background-color: #ffffff; + background-color: #ffffff; } /* LineTableTD */ .chroma .lntd { - vertical-align: top; - padding: 0; - margin: 0; - border: 0; + vertical-align: top; + padding: 0; + margin: 0; + border: 0; } /* LineTable */ .chroma .lntable { - border-spacing: 0; - padding: 0; - margin: 0; - border: 0; - width: auto; - overflow: auto; - display: block; + border-spacing: 0; + padding: 0; + margin: 0; + border: 0; + width: auto; + overflow: auto; + display: block; } /* LineHighlight */ .chroma .hl { - display: block; - width: 100%; - background-color: #e5e5e5; + display: block; + width: 100%; + background-color: #e5e5e5; } /* LineNumbersTable */ .chroma .lnt { - margin-right: .4em; - padding: 0 .4em; - color: #7f7f7f; + margin-right: .4em; + padding: 0 .4em; + color: #7f7f7f; } /* LineNumbers */ .chroma .ln { - margin-right: .4em; - padding: 0 .4em; - color: #7f7f7f; + margin-right: .4em; + padding: 0 .4em; + color: #7f7f7f; } /* Keyword */ .chroma .k { - color: #d73a49; + color: #d73a49; } /* KeywordConstant */ .chroma .kc { - color: #d73a49; + color: #d73a49; } /* KeywordDeclaration */ .chroma .kd { - color: #d73a49; + color: #d73a49; } /* KeywordNamespace */ .chroma .kn { - color: #d73a49; + color: #d73a49; } /* KeywordPseudo */ .chroma .kp { - color: #d73a49; + color: #d73a49; } /* KeywordReserved */ .chroma .kr { - color: #d73a49; + color: #d73a49; } /* KeywordType */ .chroma .kt { - color: #445588; + color: #445588; } /* NameAttribute */ .chroma .na { - color: #d73a49; + color: #d73a49; } /* NameBuiltin */ .chroma .nb { - color: #005cc5; + color: #005cc5; } /* NameBuiltinPseudo */ .chroma .bp { - color: #999999; + color: #999999; } /* NameClass */ .chroma .nc { - color: #445588; + color: #445588; } /* NameConstant */ .chroma .no { - color: #008080; + color: #008080; } /* NameDecorator */ .chroma .nd { - color: #3c5d5d; + color: #3c5d5d; } /* NameEntity */ .chroma .ni { - color: #6f42c1; + color: #6f42c1; } /* NameException */ .chroma .ne { - color: #990000; + color: #990000; } /* NameFunction */ .chroma .nf { - color: #005cc5; + color: #005cc5; } /* NameLabel */ .chroma .nl { - color: #990000; + color: #990000; } /* NameNamespace */ .chroma .nn { - color: #555555; + color: #555555; } /* NameOther */ .chroma .nx { - color: #24292e; + color: #24292e; } /* NameTag */ .chroma .nt { - color: #22863a; + color: #22863a; } /* NameVariable */ .chroma .nv { - color: #008080; + color: #008080; } /* NameVariableClass */ .chroma .vc { - color: #008080; + color: #008080; } /* NameVariableGlobal */ .chroma .vg { - color: #008080; + color: #008080; } /* NameVariableInstance */ .chroma .vi { - color: #008080; + color: #008080; } /* LiteralString */ .chroma .s { - color: #032f62; + color: #032f62; } /* LiteralStringAffix */ .chroma .sa { - color: #032f62; + color: #032f62; } /* LiteralStringBacktick */ .chroma .sb { - color: #032f62; + color: #032f62; } /* LiteralStringChar */ .chroma .sc { - color: #032f62; + color: #032f62; } /* LiteralStringDelimiter */ .chroma .dl { - color: #032f62; + color: #032f62; } /* LiteralStringDoc */ .chroma .sd { - color: #032f62; + color: #032f62; } /* LiteralStringDouble */ .chroma .s2 { - color: #032f62; + color: #032f62; } /* LiteralStringEscape */ .chroma .se { - color: #032f62; + color: #032f62; } /* LiteralStringHeredoc */ .chroma .sh { - color: #032f62; + color: #032f62; } /* LiteralStringInterpol */ .chroma .si { - color: #032f62; + color: #032f62; } /* LiteralStringOther */ .chroma .sx { - color: #032f62; + color: #032f62; } /* LiteralStringRegex */ .chroma .sr { - color: #22863a; + color: #22863a; } /* LiteralStringSingle */ .chroma .s1 { - color: #24292e; + color: #24292e; } /* LiteralStringSymbol */ .chroma .ss { - color: #032f62; + color: #032f62; } /* LiteralNumber */ .chroma .m { - color: #009999; + color: #009999; } /* LiteralNumberBin */ .chroma .mb { - color: #009999; + color: #009999; } /* LiteralNumberFloat */ .chroma .mf { - color: #009999; + color: #009999; } /* LiteralNumberHex */ .chroma .mh { - color: #009999; + color: #009999; } /* LiteralNumberInteger */ .chroma .mi { - color: #009999; + color: #009999; } /* LiteralNumberIntegerLong */ .chroma .il { - color: #009999; + color: #009999; } /* LiteralNumberOct */ .chroma .mo { - color: #009999; + color: #009999; } /* Operator */ .chroma .o { - color: #d73a49; + color: #d73a49; } /* OperatorWord */ .chroma .ow { - color: #d73a49; + color: #d73a49; } /* Comment */ .chroma .c { - color: #6a737d; + color: #6a737d; } /* CommentHashbang */ .chroma .ch { - color: #6a737d; + color: #6a737d; } /* CommentMultiline */ .chroma .cm { - color: #999988; + color: #999988; } /* CommentSingle */ .chroma .c1 { - color: #6a737d; + color: #6a737d; } /* CommentSpecial */ .chroma .cs { - color: #999999; + color: #999999; } /* CommentPreproc */ .chroma .cp { - color: #999999; + color: #999999; } /* CommentPreprocFile */ .chroma .cpf { - color: #999999; + color: #999999; } /* GenericDeleted */ .chroma .gd { - color: #000000; - background-color: #ffdddd; + color: #000000; + background-color: #ffdddd; } /* GenericEmph */ .chroma .ge { - color: #000000; + color: #000000; } /* GenericError */ .chroma .gr { - color: #aa0000; + color: #aa0000; } /* GenericHeading */ .chroma .gh { - color: #999999; + color: #999999; } /* GenericInserted */ .chroma .gi { - color: #000000; - background-color: #ddffdd; + color: #000000; + background-color: #ddffdd; } /* GenericOutput */ .chroma .go { - color: #888888; + color: #888888; } /* GenericPrompt */ .chroma .gp { - color: #555555; + color: #555555; } /* GenericStrong */ .chroma .gs { - font-weight: bold; + font-weight: bold; } /* GenericSubheading */ .chroma .gu { - color: #aaaaaa; + color: #aaaaaa; } /* GenericTraceback */ .chroma .gt { - color: #aa0000; + color: #aa0000; } /* GenericUnderline */ .chroma .gl { - text-decoration: underline; + text-decoration: underline; } /* TextWhitespace */ .chroma .w { - color: #bbbbbb; + color: #bbbbbb; } diff --git a/web_src/less/_dashboard.less b/web_src/less/_dashboard.less index 548cdf492f322..318e9934a3732 100644 --- a/web_src/less/_dashboard.less +++ b/web_src/less/_dashboard.less @@ -1,210 +1,210 @@ .dashboard { - padding-top: 15px; + padding-top: 15px; + + &.feeds, + &.issues { + .context.user.menu { + z-index: 101; + min-width: 200px; + + .ui.header { + font-size: 1rem; + text-transform: none; + } + } - &.feeds, - &.issues { - .context.user.menu { - z-index: 101; - min-width: 200px; + .filter.menu { + width: initial; - .ui.header { - font-size: 1rem; - text-transform: none; - } - } + .item { + text-align: left; - .filter.menu { - width: initial; - - .item { - text-align: left; - - .text { - height: 16px; - vertical-align: middle; - - &.truncate { - width: 75%; - } - } - - .floating.label { - top: 7px; - left: 90%; - width: 15%; - - @media only screen and (max-width: 768px) { - top: 10px; - left: auto; - width: auto; - right: 13px; - } - } - } + .text { + height: 16px; + vertical-align: middle; - // Sort - .jump.item { - margin: 1px; - padding-right: 0; - } + &.truncate { + width: 75%; + } + } - .menu { - max-height: 300px; - overflow-x: auto; - right: 0 !important; - left: auto !important; - } + .floating.label { + top: 7px; + left: 90%; + width: 15%; - @media only screen and (max-width: 768px) { - width: 100%; - } + @media only screen and (max-width: 768px) { + top: 10px; + left: auto; + width: auto; + right: 13px; + } } + } - .right.stackable.menu > .item.active { - color: #d9453d; - } - } + // Sort + .jump.item { + margin: 1px; + padding-right: 0; + } - /* Accomodate for Semantic's 1px hacks on .attached elements */ + .menu { + max-height: 300px; + overflow-x: auto; + right: 0 !important; + left: auto !important; + } - .dashboard-repos { - margin: 0 1px; + @media only screen and (max-width: 768px) { + width: 100%; + } } - .dashboard-navbar { - width: 100vw; - padding: 0 .5rem; + .right.stackable.menu > .item.active { + color: #d9453d; } + } + + /* Accomodate for Semantic's 1px hacks on .attached elements */ + + .dashboard-repos { + margin: 0 1px; + } + + .dashboard-navbar { + width: 100vw; + padding: 0 .5rem; + } } &.feeds { - .news { + .news { - li { - display: flex; - align-items: baseline; - margin-top: .5rem; - margin-bottom: .5rem; + li { + display: flex; + align-items: baseline; + margin-top: .5rem; + margin-bottom: .5rem; - img { - align-self: flex-start; - } - } - li > * + * { - margin-left: .35rem; - } + img { + align-self: flex-start; + } + } + li > * + * { + margin-left: .35rem; + } - line-height: 1.2; + line-height: 1.2; - > .ui.grid { - margin-left: auto; - margin-right: auto; - } + > .ui.grid { + margin-left: auto; + margin-right: auto; + } - .ui.avatar { - margin-top: 13px; - } + .ui.avatar { + margin-top: 13px; + } - .time-since { - font-size: 13px; - } + .time-since { + font-size: 13px; + } - .issue.title { - width: 80%; - } + .issue.title { + width: 80%; + } - .push.news .content ul { - line-height: 18px; - font-size: 13px; - list-style: none; - padding-left: 10px; + .push.news .content ul { + line-height: 18px; + font-size: 13px; + list-style: none; + padding-left: 10px; - .text.truncate { - width: 80%; - } - } + .text.truncate { + width: 80%; + } + } - .commit-id { - font-family: @monospaced-fonts, monospace; - } + .commit-id { + font-family: @monospaced-fonts, monospace; + } - code { - padding: 1px; - font-size: 85%; - background-color: rgba(0, 0, 0, .04); - border-radius: 3px; - word-break: break-all; - } + code { + padding: 1px; + font-size: 85%; + background-color: rgba(0, 0, 0, .04); + border-radius: 3px; + word-break: break-all; + } + } + + .list { + .header { + .ui.label { + margin-top: -4px; + padding: 4px 5px; + font-weight: normal; + } + + .plus.icon { + margin-top: 5px; + } } - .list { - .header { - .ui.label { - margin-top: -4px; - padding: 4px 5px; - font-weight: normal; - } + ul { + list-style: none; + margin: 0; + padding-left: 0; - .plus.icon { - margin-top: 5px; - } + li { + &:not(:last-child) { + border-bottom: 1px solid #ebebeb; } - ul { - list-style: none; - margin: 0; - padding-left: 0; - - li { - &:not(:last-child) { - border-bottom: 1px solid #ebebeb; - } - - &.private { - background-color: #fcf8e9; - } - - a { - padding: 6px 1.2em; - display: block; + &.private { + background-color: #fcf8e9; + } - .svg { - color: #888888; + a { + padding: 6px 1.2em; + display: block; - &.rear { - font-size: 15px; - } - } + .svg { + color: #888888; - .star-num { - font-size: 12px; - } - } + &.rear { + font-size: 15px; } - } + } - #privateFilterCheckbox .svg { - color: #888888; - margin-right: .25rem; + .star-num { + font-size: 12px; + } } + } + } - .repo-owner-name-list { - .item-name { - max-width: 70%; - margin-bottom: -4px; - } - } + #privateFilterCheckbox .svg { + color: #888888; + margin-right: .25rem; + } - #collaborative-repo-list { - .owner-and-repo { - max-width: 80%; - margin-bottom: -5px; - } + .repo-owner-name-list { + .item-name { + max-width: 70%; + margin-bottom: -4px; + } + } - .owner-name { - max-width: 120px; - margin-bottom: -5px; - } - } + #collaborative-repo-list { + .owner-and-repo { + max-width: 80%; + margin-bottom: -5px; + } + + .owner-name { + max-width: 120px; + margin-bottom: -5px; + } } + } } diff --git a/web_src/less/_editor.less b/web_src/less/_editor.less index cc30c0f311fa2..127416dfc1232 100644 --- a/web_src/less/_editor.less +++ b/web_src/less/_editor.less @@ -1,75 +1,75 @@ .CodeMirror { - font: 14px @monospaced-fonts, monospace; + font: 14px @monospaced-fonts, monospace; - &.cm-s-default { - border-radius: 3px; - padding: 0 !important; - } + &.cm-s-default { + border-radius: 3px; + padding: 0 !important; + } - .cm-comment { - background: inherit !important; - } + .cm-comment { + background: inherit !important; + } } .repository.file.editor .tab[data-tab="write"] { - padding: 0 !important; + padding: 0 !important; } .repository.file.editor .tab[data-tab="write"] .editor-toolbar { - border: 0 !important; + border: 0 !important; } .repository.file.editor .tab[data-tab="write"] .CodeMirror { - border-left: 0; - border-right: 0; - border-bottom: 0; + border-left: 0; + border-right: 0; + border-bottom: 0; } .editor-toolbar { - opacity: 1 !important; + opacity: 1 !important; } .editor-toolbar a:not(:hover) { - background-color: transparent !important; + background-color: transparent !important; } .editor-toolbar i.separator { - border-left: none; + border-left: none; } .editor-loading { - padding: 1rem; - text-align: center; + padding: 1rem; + text-align: center; } .edit-diff { - padding: 0 !important; + padding: 0 !important; } .edit-diff > div > .ui.table { - border-top: none !important; - border-bottom: none !important; - border-left: 1px solid #d4d4d5 !important; - border-right: 1px solid #d4d4d5 !important; + border-top: none !important; + border-bottom: none !important; + border-left: 1px solid #d4d4d5 !important; + border-right: 1px solid #d4d4d5 !important; } #edit_area { - display: none; + display: none; } .monaco-editor-container { - width: 100%; - min-height: 200px; - height: 90vh; + width: 100%; + min-height: 200px; + height: 90vh; } /* overwrite conflicting styles from fomantic */ .monaco-editor-container .inputarea { - min-height: 0 !important; - margin: 0 !important; - padding: 0 !important; - resize: none !important; - border: none !important; - color: transparent !important; - background-color: transparent !important; + min-height: 0 !important; + margin: 0 !important; + padding: 0 !important; + resize: none !important; + border: none !important; + color: transparent !important; + background-color: transparent !important; } diff --git a/web_src/less/_explore.less b/web_src/less/_explore.less index e9a254689615c..47ea240485ff9 100644 --- a/web_src/less/_explore.less +++ b/web_src/less/_explore.less @@ -1,111 +1,111 @@ .explore { - padding-top: 15px; - - .navbar { - justify-content: center; - padding-top: 15px !important; - margin-top: -15px !important; - margin-bottom: 15px !important; - background-color: #fafafa !important; - border-width: 1px !important; - - .svg { - width: 16px; - text-align: center; - margin-right: 5px; - } + padding-top: 15px; + + .navbar { + justify-content: center; + padding-top: 15px !important; + margin-top: -15px !important; + margin-bottom: 15px !important; + background-color: #fafafa !important; + border-width: 1px !important; + + .svg { + width: 16px; + text-align: center; + margin-right: 5px; } + } } .ui.repository.list { - .item { - padding-bottom: 25px; + .item { + padding-bottom: 25px; - &:not(:first-child) { - border-top: 1px solid #eeeeee; - padding-top: 25px; - } + &:not(:first-child) { + border-top: 1px solid #eeeeee; + padding-top: 25px; + } - .ui.header { - font-size: 1.5rem; - padding-bottom: 10px; + .ui.header { + font-size: 1.5rem; + padding-bottom: 10px; - .name { - word-break: break-all; - } + .name { + word-break: break-all; + } - .metas { - color: #888888; - font-size: 14px; - font-weight: normal; + .metas { + color: #888888; + font-size: 14px; + font-weight: normal; - span:not(:last-child) { - margin-right: 5px; - } - } + span:not(:last-child) { + margin-right: 5px; } + } + } - .time { - font-size: 12px; - color: #808080; - } + .time { + font-size: 12px; + color: #808080; + } - .ui.tags { - margin-bottom: 1em; - } + .ui.tags { + margin-bottom: 1em; + } - .ui.avatar.image { - width: 24px; - height: 24px; - } + .ui.avatar.image { + width: 24px; + height: 24px; } + } } .ui.repository.branches { - .info { - font-size: 12px; - color: #808080; - display: flex; - white-space: pre; - .commit-message { - max-width: 72em; - overflow: hidden; - text-overflow: ellipsis; - } - } - .overflow-visible { - overflow: visible; + .info { + font-size: 12px; + color: #808080; + display: flex; + white-space: pre; + .commit-message { + max-width: 72em; + overflow: hidden; + text-overflow: ellipsis; } + } + .overflow-visible { + overflow: visible; + } } .ui.user.list { - .item { - padding-bottom: 25px; + .item { + padding-bottom: 25px; - &:not(:first-child) { - border-top: 1px solid #eeeeee; - padding-top: 25px; - } + &:not(:first-child) { + border-top: 1px solid #eeeeee; + padding-top: 25px; + } - .ui.avatar.image { - width: 40px; - height: 40px; - } + .ui.avatar.image { + width: 40px; + height: 40px; + } - .description { - margin-top: 5px; + .description { + margin-top: 5px; - .svg:not(:first-child) { - margin-left: 5px; - } + .svg:not(:first-child) { + margin-left: 5px; + } - a { - color: #333333; + a { + color: #333333; - &:hover { - text-decoration: underline; - } - } + &:hover { + text-decoration: underline; } + } } + } } diff --git a/web_src/less/_form.less b/web_src/less/_form.less index de48f0ba5489a..07c7cdfc8b03d 100644 --- a/web_src/less/_form.less +++ b/web_src/less/_form.less @@ -1,117 +1,117 @@ .form { - .help { - color: #999999; - padding-top: .6em; - padding-bottom: .6em; - display: inline-block; - } + .help { + color: #999999; + padding-top: .6em; + padding-bottom: .6em; + display: inline-block; + } } .ui.attached.header { - background: #f0f0f0; + background: #f0f0f0; - .right { - margin-top: -5px; + .right { + margin-top: -5px; - .button { - padding: 8px 10px; - font-weight: normal; - } + .button { + padding: 8px 10px; + font-weight: normal; } + } } @create-page-form-input-padding: 250px !important; #create-page-form { - form { - margin: auto; + form { + margin: auto; - .ui.message { - text-align: center; - } + .ui.message { + text-align: center; + } - @media only screen and (min-width: 768px) { - width: 800px !important; + @media only screen and (min-width: 768px) { + width: 800px !important; - .header { - padding-left: @create-page-form-input-padding+30px; - } + .header { + padding-left: @create-page-form-input-padding+30px; + } - .inline.field > label { - text-align: right; - width: @create-page-form-input-padding; - word-wrap: break-word; - } + .inline.field > label { + text-align: right; + width: @create-page-form-input-padding; + word-wrap: break-word; + } - .help { - margin-left: @create-page-form-input-padding+15px; - } + .help { + margin-left: @create-page-form-input-padding+15px; + } - .optional .title { - margin-left: @create-page-form-input-padding; - } + .optional .title { + margin-left: @create-page-form-input-padding; + } - input, - textarea { - width: 50% !important; - } - } + input, + textarea { + width: 50% !important; + } + } - @media only screen and (max-width: 767px) { - .optional .title { - margin-left: 15px; - } + @media only screen and (max-width: 767px) { + .optional .title { + margin-left: 15px; + } - .inline.field > label { - display: block; - } - } + .inline.field > label { + display: block; + } } + } } .signin { - .oauth2 { - div { - display: inline-block; - - p { - margin: 10px 5px 0 0; - float: left; - } - } + .oauth2 { + div { + display: inline-block; + + p { + margin: 10px 5px 0 0; + float: left; + } + } - a { - margin-right: 3px; + a { + margin-right: 3px; - &:last-child { - margin-right: 0; - } - } + &:last-child { + margin-right: 0; + } + } - img { - width: 32px; - height: 32px; + img { + width: 32px; + height: 32px; - &.openidConnect { - width: auto; - } - } + &.openidConnect { + width: auto; + } } + } } @media only screen and (min-width: 768px) { - .g-recaptcha { - margin: 0 auto !important; - width: 304px; - padding-left: 30px; - } + .g-recaptcha { + margin: 0 auto !important; + width: 304px; + padding-left: 30px; + } } @media screen and (max-height: 575px) { - #rc-imageselect, - .g-recaptcha { - transform: scale(.77); - transform-origin: 0 0; - } + #rc-imageselect, + .g-recaptcha { + transform: scale(.77); + transform-origin: 0 0; + } } .user.activate, @@ -119,132 +119,132 @@ .user.reset.password, .user.signin, .user.signup { - @input-padding: 200px; + @input-padding: 200px; + #create-page-form; + + form { + width: 700px !important; + + .header { + padding-left: 0 !important; + text-align: center; + } + + .inline.field > label { + width: @input-padding; + } + + .inline.field > label, + input { + @media only screen and (max-width: 768px) { + width: 100% !important; + } + } + + input[type=number] { + -moz-appearance: textfield; + } + + input::-webkit-outer-spin-button, + input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; + } + } +} + +.repository { + &.new.repo, + &.new.migrate, + &.new.fork { #create-page-form; form { - width: 700px !important; - - .header { - padding-left: 0 !important; - text-align: center; + .dropdown { + .dropdown.icon { + margin-top: -7px !important; + padding-bottom: 5px; } - .inline.field > label { - width: @input-padding; - } + .text { + margin-right: 0 !important; - .inline.field > label, - input { - @media only screen and (max-width: 768px) { - width: 100% !important; - } + i { + margin-right: 0 !important; + } } + } - input[type=number] { - -moz-appearance: textfield; - } + .header { + padding-left: 0 !important; + text-align: center; + } - input::-webkit-outer-spin-button, - input::-webkit-inner-spin-button { - -webkit-appearance: none; - margin: 0; + @media only screen and (max-width: 768px) { + label, + input, + .selection.dropdown { + width: 100% !important; } - } -} -.repository { - &.new.repo, - &.new.migrate, - &.new.fork { - #create-page-form; - - form { - .dropdown { - .dropdown.icon { - margin-top: -7px !important; - padding-bottom: 5px; - } - - .text { - margin-right: 0 !important; - - i { - margin-right: 0 !important; - } - } - } - - .header { - padding-left: 0 !important; - text-align: center; - } - - @media only screen and (max-width: 768px) { - label, - input, - .selection.dropdown { - width: 100% !important; - } - - .field button, - .field a { - margin-bottom: 1em; - width: 100%; - } - } + .field button, + .field a { + margin-bottom: 1em; + width: 100%; } + } } + } - &.new.repo { - .ui.form { - @media only screen and (min-width: 768px) { - #auto-init { - margin-left: @create-page-form-input-padding+15px; - } - } + &.new.repo { + .ui.form { + @media only screen and (min-width: 768px) { + #auto-init { + margin-left: @create-page-form-input-padding+15px; + } + } - .selection.dropdown:not(.owner) { - width: 50% !important; + .selection.dropdown:not(.owner) { + width: 50% !important; - @media only screen and (max-width: 768px) { - width: 100% !important; - } - } + @media only screen and (max-width: 768px) { + width: 100% !important; } + } } + } } .new.webhook { - form { - .help { - margin-left: 25px; - } + form { + .help { + margin-left: 25px; } + } - .events.fields { - .column { - padding-left: 40px; - } + .events.fields { + .column { + padding-left: 40px; } + } } .githook { - textarea { - font-family: @monospaced-fonts, monospace; - } + textarea { + font-family: @monospaced-fonts, monospace; + } } .new.org .ui.form { - @media only screen and (max-width: 768px) { - .field button, - .field a { - margin-bottom: 1em; - width: 100%; - } + @media only screen and (max-width: 768px) { + .field button, + .field a { + margin-bottom: 1em; + width: 100%; + } - .field input { - width: 100% !important; - } + .field input { + width: 100% !important; } + } } diff --git a/web_src/less/_home.less b/web_src/less/_home.less index 90390239a15b0..10d6ca3362480 100644 --- a/web_src/less/_home.less +++ b/web_src/less/_home.less @@ -1,65 +1,65 @@ .home { - .logo { - max-width: 220px; - } - - .hero { - @media only screen and (max-width: 767px) { - h1 { - font-size: 3.5em; - } + .logo { + max-width: 220px; + } - h2 { - font-size: 2em; - } - } + .hero { + @media only screen and (max-width: 767px) { + h1 { + font-size: 3.5em; + } - @media only screen and (min-width: 768px) { - h1 { - font-size: 5.5em; - } - - h2 { - font-size: 3em; - } - } + h2 { + font-size: 2em; + } + } - .svg { - color: #5aa509; - height: 40px; - width: 50px; - vertical-align: bottom; - } + @media only screen and (min-width: 768px) { + h1 { + font-size: 5.5em; + } - &.header { - font-size: 20px; - } + h2 { + font-size: 3em; + } } - p.large { - font-size: 16px; + .svg { + color: #5aa509; + height: 40px; + width: 50px; + vertical-align: bottom; } - .stackable { - padding-top: 30px; + &.header { + font-size: 20px; } + } - a { - color: #5aa509; - } + p.large { + font-size: 16px; + } + + .stackable { + padding-top: 30px; + } + + a { + color: #5aa509; + } } .signup { - padding-top: 15px; + padding-top: 15px; } footer { - .ui.container .left, - .ui.container .right { - @media only screen and (max-width: 880px) { - display: block; - text-align: center; - float: none; - } + .ui.container .left, + .ui.container .right { + @media only screen and (max-width: 880px) { + display: block; + text-align: center; + float: none; } + } } diff --git a/web_src/less/_install.less b/web_src/less/_install.less index b38ec87b760bc..3f59a99aacaf3 100644 --- a/web_src/less/_install.less +++ b/web_src/less/_install.less @@ -1,38 +1,38 @@ .install { - padding-top: 45px; + padding-top: 45px; - form { - @input-padding: 320px !important; + form { + @input-padding: 320px !important; - label { - text-align: right; - width: @input-padding; - } + label { + text-align: right; + width: @input-padding; + } - input { - width: 35% !important; - } + input { + width: 35% !important; + } - .field { - text-align: left; + .field { + text-align: left; - .help { - margin-left: @input-padding+15px; - } + .help { + margin-left: @input-padding+15px; + } - &.optional .title { - margin-left: 38%; - } - } + &.optional .title { + margin-left: 38%; + } } + } - .ui { - .checkbox { - margin-left: 40% !important; + .ui { + .checkbox { + margin-left: 40% !important; - label { - width: auto !important; - } - } + label { + width: auto !important; + } } + } } diff --git a/web_src/less/_markdown.less b/web_src/less/_markdown.less index 1b9c412f6bd35..335a2ebd47b43 100644 --- a/web_src/less/_markdown.less +++ b/web_src/less/_markdown.less @@ -1,514 +1,514 @@ .markdown:not(code) { - overflow: hidden; - font-size: 16px; - line-height: 1.6 !important; - word-wrap: break-word; - - &.ui.segment { - padding: 3em; - } - - &.file-view { - padding: 2em !important; - } - - > *:first-child { - margin-top: 0 !important; - } - - > *:last-child { - margin-bottom: 0 !important; - } - - a:not([href]) { - color: inherit; - text-decoration: none; - } - - .absent { - color: #cc0000; - } - - .anchor { - padding-right: 4px; - margin-left: -20px; - line-height: 1; - color: inherit; - } - - .anchor .svg { - vertical-align: middle; - } - - .anchor:focus { - outline: none; - } - - h1 .anchor .svg, - h2 .anchor .svg, - h3 .anchor .svg, - h4 .anchor .svg, - h5 .anchor .svg, - h6 .anchor .svg { - visibility: hidden; - } - - h1:hover .anchor .svg, - h2:hover .anchor .svg, - h3:hover .anchor .svg, - h4:hover .anchor .svg, - h5:hover .anchor .svg, - h6:hover .anchor .svg { - visibility: visible; - } - - h2 .anchor .svg, - h3 .anchor .svg, - h4 .anchor .svg { - position: relative; - top: -2px; - } - - h1, - h2, - h3, - h4, - h5, - h6 { - margin-top: 1em; - margin-bottom: 16px; - font-weight: bold; - line-height: 1.4; - - &:first-of-type { - margin-top: 0 !important; - } - } - - h1 tt, - h1 code, - h2 tt, - h2 code, - h3 tt, - h3 code, - h4 tt, - h4 code, - h5 tt, - h5 code, - h6 tt, - h6 code { - font-size: inherit; - } - - h1 { - padding-bottom: .3em; - font-size: 2.25em; - line-height: 1.2; - border-bottom: 1px solid #eeeeee; - } - - h2 { - padding-bottom: .3em; - font-size: 1.75em; - line-height: 1.225; - border-bottom: 1px solid #eeeeee; - } - - h3 { - font-size: 1.5em; - line-height: 1.43; - } - - h4 { - font-size: 1.25em; - } - - h5 { - font-size: 1em; - } + overflow: hidden; + font-size: 16px; + line-height: 1.6 !important; + word-wrap: break-word; - h6 { - font-size: 1em; - color: #777777; - } - - p, - blockquote, - ul, - ol, - dl, - table, - pre { - margin-top: 0; - margin-bottom: 16px; - } - - hr { - height: 4px; - padding: 0; - margin: 16px 0; - background-color: #e7e7e7; - border: 0; - } - - ul, - ol { - padding-left: 2em; - } - - ul.no-list, - ol.no-list { - padding: 0; - list-style-type: none; - } - - li.task-list-item { - list-style-type: none; - margin-left: calc(-2em + 2px); - } - - ul ul, - ul ol, - ol ol, - ol ul { - margin-top: 0; - margin-bottom: 0; - } - - ol ol, - ul ol { - list-style-type: lower-roman; - } + &.ui.segment { + padding: 3em; + } - li > p { - margin-top: 0; - } - - dl { - padding: 0; - } - - dl dt { - padding: 0; - margin-top: 16px; - font-size: 1em; - font-style: italic; - font-weight: bold; - } + &.file-view { + padding: 2em !important; + } - dl dd { - padding: 0 16px; - margin-bottom: 16px; - } - - blockquote { - margin-left: 0; - padding: 0 15px; - color: #777777; - border-left: 4px solid #dddddd; - } - - blockquote > :first-child { - margin-top: 0; - } - - blockquote > :last-child { - margin-bottom: 0; - } - - table { - width: auto; - overflow: auto; - word-break: keep-all; - display: block; - } - - table th { - font-weight: bold; - } - - table th, - table td { - padding: 6px 13px !important; - border: 1px solid #dddddd !important; - } - - table tr { - background-color: #ffffff; - border-top: 1px solid #cccccc; - } - - table tr:nth-child(2n) { - background-color: #f8f8f8; - } - - img { - max-width: 100%; - box-sizing: border-box; - } - - .emoji { - max-width: none; - } - - span.frame { - display: block; - overflow: hidden; - } - - span.frame > span { - display: block; - float: left; - width: auto; - padding: 7px; - margin: 13px 0 0; - overflow: hidden; - border: 1px solid #dddddd; - } - - span.frame span img { - display: block; - float: left; - } - - span.frame span span { - display: block; - padding: 5px 0 0; - clear: both; - color: #333333; - } - - span.align-center { - display: block; - overflow: hidden; - clear: both; - } - - span.align-center > span { - display: block; - margin: 13px auto 0; - overflow: hidden; - text-align: center; - } - - span.align-center span img { - margin: 0 auto; - text-align: center; - } - - span.align-right { - display: block; - overflow: hidden; - clear: both; - } - - span.align-right > span { - display: block; - margin: 13px 0 0; - overflow: hidden; - text-align: right; - } + > *:first-child { + margin-top: 0 !important; + } - span.align-right span img { - margin: 0; - text-align: right; - } + > *:last-child { + margin-bottom: 0 !important; + } + + a:not([href]) { + color: inherit; + text-decoration: none; + } + + .absent { + color: #cc0000; + } + + .anchor { + padding-right: 4px; + margin-left: -20px; + line-height: 1; + color: inherit; + } + + .anchor .svg { + vertical-align: middle; + } + + .anchor:focus { + outline: none; + } + + h1 .anchor .svg, + h2 .anchor .svg, + h3 .anchor .svg, + h4 .anchor .svg, + h5 .anchor .svg, + h6 .anchor .svg { + visibility: hidden; + } + + h1:hover .anchor .svg, + h2:hover .anchor .svg, + h3:hover .anchor .svg, + h4:hover .anchor .svg, + h5:hover .anchor .svg, + h6:hover .anchor .svg { + visibility: visible; + } + + h2 .anchor .svg, + h3 .anchor .svg, + h4 .anchor .svg { + position: relative; + top: -2px; + } + + h1, + h2, + h3, + h4, + h5, + h6 { + margin-top: 1em; + margin-bottom: 16px; + font-weight: bold; + line-height: 1.4; + + &:first-of-type { + margin-top: 0 !important; + } + } + + h1 tt, + h1 code, + h2 tt, + h2 code, + h3 tt, + h3 code, + h4 tt, + h4 code, + h5 tt, + h5 code, + h6 tt, + h6 code { + font-size: inherit; + } + + h1 { + padding-bottom: .3em; + font-size: 2.25em; + line-height: 1.2; + border-bottom: 1px solid #eeeeee; + } + + h2 { + padding-bottom: .3em; + font-size: 1.75em; + line-height: 1.225; + border-bottom: 1px solid #eeeeee; + } + + h3 { + font-size: 1.5em; + line-height: 1.43; + } + + h4 { + font-size: 1.25em; + } + + h5 { + font-size: 1em; + } + + h6 { + font-size: 1em; + color: #777777; + } + + p, + blockquote, + ul, + ol, + dl, + table, + pre { + margin-top: 0; + margin-bottom: 16px; + } + + hr { + height: 4px; + padding: 0; + margin: 16px 0; + background-color: #e7e7e7; + border: 0; + } + + ul, + ol { + padding-left: 2em; + } + + ul.no-list, + ol.no-list { + padding: 0; + list-style-type: none; + } + + li.task-list-item { + list-style-type: none; + margin-left: calc(-2em + 2px); + } + + ul ul, + ul ol, + ol ol, + ol ul { + margin-top: 0; + margin-bottom: 0; + } + + ol ol, + ul ol { + list-style-type: lower-roman; + } + + li > p { + margin-top: 0; + } + + dl { + padding: 0; + } + + dl dt { + padding: 0; + margin-top: 16px; + font-size: 1em; + font-style: italic; + font-weight: bold; + } + + dl dd { + padding: 0 16px; + margin-bottom: 16px; + } + + blockquote { + margin-left: 0; + padding: 0 15px; + color: #777777; + border-left: 4px solid #dddddd; + } + + blockquote > :first-child { + margin-top: 0; + } + + blockquote > :last-child { + margin-bottom: 0; + } + + table { + width: auto; + overflow: auto; + word-break: keep-all; + display: block; + } - span.float-left { - display: block; - float: left; - margin-right: 13px; - overflow: hidden; - } + table th { + font-weight: bold; + } - span.float-left span { - margin: 13px 0 0; - } + table th, + table td { + padding: 6px 13px !important; + border: 1px solid #dddddd !important; + } - span.float-right { - display: block; - float: right; - margin-left: 13px; - overflow: hidden; - } + table tr { + background-color: #ffffff; + border-top: 1px solid #cccccc; + } - span.float-right > span { - display: block; - margin: 13px auto 0; - overflow: hidden; - text-align: right; - } + table tr:nth-child(2n) { + background-color: #f8f8f8; + } - code, - tt { - padding: .2em .3em; - margin: 0; - font-size: 85%; - background-color: rgba(0, 0, 0, .04); - border-radius: 3px; - } + img { + max-width: 100%; + box-sizing: border-box; + } - code br, - tt br { - display: none; - } + .emoji { + max-width: none; + } - del code { - text-decoration: inherit; - } - - pre > code { - padding: 0; - margin: 0; - font-size: 100%; - word-break: normal; - white-space: pre; - background: transparent; - border: 0; - } + span.frame { + display: block; + overflow: hidden; + } - .highlight { - margin-bottom: 16px; - } + span.frame > span { + display: block; + float: left; + width: auto; + padding: 7px; + margin: 13px 0 0; + overflow: hidden; + border: 1px solid #dddddd; + } - .highlight pre, - pre { - padding: 16px; - overflow: auto; - font-size: 85%; - line-height: 1.45; - background-color: #f7f7f7; - border-radius: 3px; - } + span.frame span img { + display: block; + float: left; + } - .highlight pre { - margin-bottom: 0; - word-break: normal; - } + span.frame span span { + display: block; + padding: 5px 0 0; + clear: both; + color: #333333; + } - pre { - word-wrap: normal; - } + span.align-center { + display: block; + overflow: hidden; + clear: both; + } - pre code, - pre tt { - display: inline; - max-width: initial; - padding: 0; - margin: 0; - overflow: initial; - line-height: inherit; - word-wrap: normal; - background-color: transparent; - border: 0; - } + span.align-center > span { + display: block; + margin: 13px auto 0; + overflow: hidden; + text-align: center; + } - pre code:before, - pre code:after, - pre tt:before, - pre tt:after { - content: normal; - } + span.align-center span img { + margin: 0 auto; + text-align: center; + } - kbd { - display: inline-block; - padding: 3px 5px; - font-size: 11px; - line-height: 10px; - color: #555555; - vertical-align: middle; - background-color: #fcfcfc; - border: solid 1px #cccccc; - border-bottom-color: #bbbbbb; - border-radius: 3px; - box-shadow: inset 0 -1px 0 #bbbbbb; - } + span.align-right { + display: block; + overflow: hidden; + clear: both; + } - input[type="checkbox"] { - vertical-align: middle !important; - } + span.align-right > span { + display: block; + margin: 13px 0 0; + overflow: hidden; + text-align: right; + } - .csv-data td, - .csv-data th { - padding: 5px; - overflow: hidden; - font-size: 12px; - line-height: 1; - text-align: left; - white-space: nowrap; - } + span.align-right span img { + margin: 0; + text-align: right; + } - .csv-data .blob-num { - padding: 10px 8px 9px; - text-align: right; - background: #ffffff; - border: 0; - } + span.float-left { + display: block; + float: left; + margin-right: 13px; + overflow: hidden; + } - .csv-data tr { - border-top: 0; - } + span.float-left span { + margin: 13px 0 0; + } - .csv-data th { - font-weight: bold; - background: #f8f8f8; - border-top: 0; - } + span.float-right { + display: block; + float: right; + margin-left: 13px; + overflow: hidden; + } - .ui.list .list, - ol.ui.list ol, - ul.ui.list ul { - padding-left: 2em; - } + span.float-right > span { + display: block; + margin: 13px auto 0; + overflow: hidden; + text-align: right; + } + + code, + tt { + padding: .2em .3em; + margin: 0; + font-size: 85%; + background-color: rgba(0, 0, 0, .04); + border-radius: 3px; + } + + code br, + tt br { + display: none; + } + + del code { + text-decoration: inherit; + } + + pre > code { + padding: 0; + margin: 0; + font-size: 100%; + word-break: normal; + white-space: pre; + background: transparent; + border: 0; + } + + .highlight { + margin-bottom: 16px; + } + + .highlight pre, + pre { + padding: 16px; + overflow: auto; + font-size: 85%; + line-height: 1.45; + background-color: #f7f7f7; + border-radius: 3px; + } + + .highlight pre { + margin-bottom: 0; + word-break: normal; + } + + pre { + word-wrap: normal; + } + + pre code, + pre tt { + display: inline; + max-width: initial; + padding: 0; + margin: 0; + overflow: initial; + line-height: inherit; + word-wrap: normal; + background-color: transparent; + border: 0; + } + + pre code:before, + pre code:after, + pre tt:before, + pre tt:after { + content: normal; + } + + kbd { + display: inline-block; + padding: 3px 5px; + font-size: 11px; + line-height: 10px; + color: #555555; + vertical-align: middle; + background-color: #fcfcfc; + border: solid 1px #cccccc; + border-bottom-color: #bbbbbb; + border-radius: 3px; + box-shadow: inset 0 -1px 0 #bbbbbb; + } + + input[type="checkbox"] { + vertical-align: middle !important; + } + + .csv-data td, + .csv-data th { + padding: 5px; + overflow: hidden; + font-size: 12px; + line-height: 1; + text-align: left; + white-space: nowrap; + } + + .csv-data .blob-num { + padding: 10px 8px 9px; + text-align: right; + background: #ffffff; + border: 0; + } + + .csv-data tr { + border-top: 0; + } + + .csv-data th { + font-weight: bold; + background: #f8f8f8; + border-top: 0; + } + + .ui.list .list, + ol.ui.list ol, + ul.ui.list ul { + padding-left: 2em; + } } .repository.wiki.revisions { - .ui.container > .ui.stackable.grid { - -ms-flex-direction: row-reverse; - flex-direction: row-reverse; - - > .header { - margin-top: 0; - - .sub.header { - padding-left: 52px; - word-break: break-word; - } - } + .ui.container > .ui.stackable.grid { + -ms-flex-direction: row-reverse; + flex-direction: row-reverse; + + > .header { + margin-top: 0; + + .sub.header { + padding-left: 52px; + word-break: break-word; + } } + } } .file-revisions-btn { - display: block; - float: left; - margin-bottom: 2px !important; - padding: 11px !important; - margin-right: 10px !important; - - i { - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - } + display: block; + float: left; + margin-bottom: 2px !important; + padding: 11px !important; + margin-right: 10px !important; + + i { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + } } .markdown-block-error { - margin-bottom: 0 !important; - border-bottom-left-radius: 0 !important; - border-bottom-right-radius: 0 !important; - box-shadow: none !important; - font-size: 85% !important; - white-space: pre !important; - padding: .5rem 1rem !important; - text-align: left !important; + margin-bottom: 0 !important; + border-bottom-left-radius: 0 !important; + border-bottom-right-radius: 0 !important; + box-shadow: none !important; + font-size: 85% !important; + white-space: pre !important; + padding: .5rem 1rem !important; + text-align: left !important; } .markdown-block-error + pre { - border-top: none !important; - margin-top: 0 !important; - border-top-left-radius: 0 !important; - border-top-right-radius: 0 !important; + border-top: none !important; + margin-top: 0 !important; + border-top-left-radius: 0 !important; + border-top-right-radius: 0 !important; } diff --git a/web_src/less/_organization.less b/web_src/less/_organization.less index 5a72017c2f5bb..1010b7a911fd3 100644 --- a/web_src/less/_organization.less +++ b/web_src/less/_organization.less @@ -1,212 +1,212 @@ .organization { - padding-top: 15px; - - .head { - .ui.header { - .text { - vertical-align: middle; - font-size: 1.6rem; - margin-left: 15px; - } - - .ui.right { - margin-top: 5px; - } - } + padding-top: 15px; + + .head { + .ui.header { + .text { + vertical-align: middle; + font-size: 1.6rem; + margin-left: 15px; + } + + .ui.right { + margin-top: 5px; + } } + } - &.new.org { - #create-page-form; + &.new.org { + #create-page-form; - form { - .header { - padding-left: 0 !important; - text-align: center; - } - } + form { + .header { + padding-left: 0 !important; + text-align: center; + } } + } - &.options { - input { - min-width: 300px; - } + &.options { + input { + min-width: 300px; } + } - &.profile { - #org-avatar { - width: 100px; - height: 100px; - margin-right: 15px; - } - - #org-info { - .ui.header { - font-size: 36px; - margin-bottom: 0; - } - - .desc { - font-size: 16px; - margin-bottom: 10px; - } - - .meta { - .item { - display: inline-block; - margin-right: 10px; - - .icon { - margin-right: 5px; - } - } - } - } + &.profile { + #org-avatar { + width: 100px; + height: 100px; + margin-right: 15px; + } - .ui.top.header { - .ui.right { - margin-top: 0; - } + #org-info { + .ui.header { + font-size: 36px; + margin-bottom: 0; + } + + .desc { + font-size: 16px; + margin-bottom: 10px; + } + + .meta { + .item { + display: inline-block; + margin-right: 10px; + + .icon { + margin-right: 5px; + } } + } + } - .teams { - .item { - padding: 10px 15px; - } - } + .ui.top.header { + .ui.right { + margin-top: 0; + } } - &.teams, - &.profile { - .members { - .ui.avatar { - width: 48px; - height: 48px; - margin-right: 5px; - } - } + .teams { + .item { + padding: 10px 15px; + } + } + } + + &.teams, + &.profile { + .members { + .ui.avatar { + width: 48px; + height: 48px; + margin-right: 5px; + } } + } - &.invite { - #invite-box { - margin: 50px auto auto; - width: 500px !important; - - #search-user-box { - input { - margin-left: 0; - width: 300px; - } - } - - .ui.button { - margin-left: 5px; - margin-top: -3px; - } + &.invite { + #invite-box { + margin: 50px auto auto; + width: 500px !important; + + #search-user-box { + input { + margin-left: 0; + width: 300px; } + } + + .ui.button { + margin-left: 5px; + margin-top: -3px; + } } + } + + &.members { + .list { + .item { + margin-left: 0; + margin-right: 0; + border-bottom: 1px solid #eeeeee; + + .ui.avatar { + width: 48px; + height: 48px; + } - &.members { - .list { - .item { - margin-left: 0; - margin-right: 0; - border-bottom: 1px solid #eeeeee; - - .ui.avatar { - width: 48px; - height: 48px; - } - - .meta { - line-height: 24px; - } - } + .meta { + line-height: 24px; } + } } + } - &.teams { - .detail { - .item { - padding: 10px 15px; + &.teams { + .detail { + .item { + padding: 10px 15px; - &:not(:last-child) { - border-bottom: 1px solid #eeeeee; - } - } + &:not(:last-child) { + border-bottom: 1px solid #eeeeee; } + } + } - .repositories, - .members { - .item { - padding: 10px 20px; - line-height: 32px; - - &:not(:last-child) { - border-bottom: 1px solid #dddddd; - } + .repositories, + .members { + .item { + padding: 10px 20px; + line-height: 32px; - .button { - padding: 9px 10px; - } - } + &:not(:last-child) { + border-bottom: 1px solid #dddddd; } - #add-repo-form, - #repo-multiple-form, - #add-member-form { - input { - margin-left: 0; - } - - .ui.button { - margin-left: 5px; - margin-top: -3px; - } + .button { + padding: 9px 10px; } + } + } - #repo-top-segment { - height: 60px; - } + #add-repo-form, + #repo-multiple-form, + #add-member-form { + input { + margin-left: 0; + } + + .ui.button { + margin-left: 5px; + margin-top: -3px; + } } - &.settings { - .labelspage { - list-style: none; - padding-top: 0; - - .item { - margin-top: 0; - margin-right: -14px; - margin-left: -14px !important; - padding: 10px; - border-bottom: 1px solid #e1e4e8; - border-top: none; - - a { - font-size: 15px; - padding-top: 5px; - padding-right: 10px; - color: #666666; - - &:hover { - color: #000000; - } - - &.open-issues { - margin-right: 30px; - } - } - - .ui.label { - font-size: 1em; - } - } - - .item:last-child { - border-bottom: none; - padding-bottom: 0; - } + #repo-top-segment { + height: 60px; + } + } + + &.settings { + .labelspage { + list-style: none; + padding-top: 0; + + .item { + margin-top: 0; + margin-right: -14px; + margin-left: -14px !important; + padding: 10px; + border-bottom: 1px solid #e1e4e8; + border-top: none; + + a { + font-size: 15px; + padding-top: 5px; + padding-right: 10px; + color: #666666; + + &:hover { + color: #000000; + } + + &.open-issues { + margin-right: 30px; + } + } + .ui.label { + font-size: 1em; } + } + + .item:last-child { + border-bottom: none; + padding-bottom: 0; + } + } + } } diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index 0d994c565c8e4..c149cc4fe41db 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -1,2822 +1,2822 @@ .repository { - padding-top: 15px; + padding-top: 15px; - .repo-header { - .ui.compact.menu { - margin-left: 1rem; - } + .repo-header { + .ui.compact.menu { + margin-left: 1rem; + } - .ui.header { - margin-top: 0; - } + .ui.header { + margin-top: 0; + } - .ui.huge.breadcrumb { - font-weight: 400; - font-size: 1.5rem; + .ui.huge.breadcrumb { + font-weight: 400; + font-size: 1.5rem; - .label { - vertical-align: middle; - margin-top: -.29165em; - } + .label { + vertical-align: middle; + margin-top: -.29165em; + } - &.repo-title .repo-header-icon { - display: inline-block; - position: relative; - - .avatar { - position: absolute; - right: 0; - bottom: 0; - width: 16px; - height: 16px; - color: #fafafa; - box-shadow: 0 0 0 2px; - margin: 0; - } - } - } + &.repo-title .repo-header-icon { + display: inline-block; + position: relative; - .fork-flag { - margin-left: 36px; - margin-top: 3px; - display: block; - font-size: 12px; - white-space: nowrap; + .avatar { + position: absolute; + right: 0; + bottom: 0; + width: 16px; + height: 16px; + color: #fafafa; + box-shadow: 0 0 0 2px; + margin: 0; } + } + } - .repo-buttons .svg { - margin: 0 .42857143em 0 -.21428571em; - } + .fork-flag { + margin-left: 36px; + margin-top: 3px; + display: block; + font-size: 12px; + white-space: nowrap; + } - .button { - margin-top: 2px; - margin-bottom: 2px; - } + .repo-buttons .svg { + margin: 0 .42857143em 0 -.21428571em; } - .tabs { - .navbar { - justify-content: initial; - } + .button { + margin-top: 2px; + margin-bottom: 2px; } + } + .tabs { .navbar { - display: flex; - justify-content: space-between; + justify-content: initial; + } + } - .ui.label { - margin-left: 7px; - padding: 3px 5px; - } + .navbar { + display: flex; + justify-content: space-between; + + .ui.label { + margin-left: 7px; + padding: 3px 5px; } + } - .owner.dropdown { - min-width: 40% !important; + .owner.dropdown { + min-width: 40% !important; + } + + #file-buttons { + /* The reason for the !important is that Semantic itself has + margin-left: 0 !important on right items on mobile, which is mostly + to make sure elements which on menus would otherwise be on the right + align correctly with other elements when stacked. + Unfortunately, this brings some weird alignment on this particular + element, so we need to override it. */ + margin-left: auto !important; + font-weight: normal; + + .ui.button { + padding: 8px 10px; + font-weight: normal; } + } - #file-buttons { - /* The reason for the !important is that Semantic itself has - margin-left: 0 !important on right items on mobile, which is mostly - to make sure elements which on menus would otherwise be on the right - align correctly with other elements when stacked. - Unfortunately, this brings some weird alignment on this particular - element, so we need to override it. */ - margin-left: auto !important; - font-weight: normal; + .metas { + .menu { + overflow-x: auto; + max-height: 300px; + } - .ui.button { - padding: 8px 10px; - font-weight: normal; + .ui.list { + &.assignees .icon { + line-height: 2em; + } + + .hide { + display: none !important; + } + + .item { + padding: 0; + } + + .label.color { + padding: 0 8px; + margin-right: 5px; + } + + a { + margin: 2px 0; + + .text { + color: #444444; + + &:hover { + color: #000000; + } } + } } - .metas { - .menu { - overflow-x: auto; - max-height: 300px; - } + #deadlineForm input { + width: 12.8rem; + border-radius: 4px 0 0 4px; + border-right: 0; + white-space: nowrap; + } + } - .ui.list { - &.assignees .icon { - line-height: 2em; - } + .header-wrapper { + background-color: #fafafa; + margin-top: -15px; + padding-top: 15px; - .hide { - display: none !important; - } + .ui.tabs.divider { + border-bottom: 0; + } - .item { - padding: 0; - } + .ui.tabular .svg { + margin-right: 5px; + } + } - .label.color { - padding: 0 8px; - margin-right: 5px; - } + .filter.menu { + .label.color { + border-radius: 3px; + margin-left: 15px; + padding: 0 8px; + } - a { - margin: 2px 0; + .svg { + float: left; + margin: 0 -7px 0 -5px; + width: 16px; + } - .text { - color: #444444; + &.labels .svg { + margin: -2px -7px 0 -5px; + } - &:hover { - color: #000000; - } - } - } - } + &.labels { + .label-filter .menu .info { + display: inline-block; + padding: .5rem .25rem; + border-bottom: 1px solid #cccccc; + font-size: 12px; + width: 100%; + white-space: nowrap; + text-align: center; - #deadlineForm input { - width: 12.8rem; - border-radius: 4px 0 0 4px; - border-right: 0; - white-space: nowrap; + code { + border: 1px solid #cccccc; + border-radius: 3px; + padding: 1px 2px; + font-size: 11px; } + } } - .header-wrapper { - background-color: #fafafa; - margin-top: -15px; - padding-top: 15px; + .text { + margin-left: .9em; + } - .ui.tabs.divider { - border-bottom: 0; - } + .menu { + max-height: 300px; + overflow-x: auto; + right: 0 !important; + left: auto !important; + } - .ui.tabular .svg { - margin-right: 5px; - } + .dropdown.item { + margin: 1px; + padding-right: 0; } + } - .filter.menu { - .label.color { - border-radius: 3px; - margin-left: 15px; - padding: 0 8px; - } + .select-label { + .desc { + padding-left: 16px; + } + } - .svg { - float: left; - margin: 0 -7px 0 -5px; - width: 16px; - } + .ui.tabs { + &.container { + margin-top: 14px; + margin-bottom: 0; - &.labels .svg { - margin: -2px -7px 0 -5px; - } + .ui.menu { + border-bottom: 0; + } + } - &.labels { - .label-filter .menu .info { - display: inline-block; - padding: .5rem .25rem; - border-bottom: 1px solid #cccccc; - font-size: 12px; - width: 100%; - white-space: nowrap; - text-align: center; - - code { - border: 1px solid #cccccc; - border-radius: 3px; - padding: 1px 2px; - font-size: 11px; - } - } - } + &.divider { + margin-top: 0; + margin-bottom: 20px; + } + } - .text { - margin-left: .9em; - } + #clone-panel { + width: 350px; - .menu { - max-height: 300px; - overflow-x: auto; - right: 0 !important; - left: auto !important; - } + @media only screen and (max-width: 768px) { + width: 100%; + } - .dropdown.item { - margin: 1px; - padding-right: 0; - } + input { + border-radius: 0; + padding: 5px 10px; + width: 50%; } - .select-label { - .desc { - padding-left: 16px; - } + .clone.button { + font-size: 13px; + padding: 0 5px; + + &:first-child { + border-radius: .28571429rem 0 0 .28571429rem; + } } - .ui.tabs { - &.container { - margin-top: 14px; - margin-bottom: 0; + .icon.button { + padding: 0 10px; + } - .ui.menu { - border-bottom: 0; - } - } + .dropdown .menu { + right: 0 !important; + left: auto !important; + } + } - &.divider { - margin-top: 0; - margin-bottom: 20px; - } + &.file.list { + .repo-description { + display: flex; + justify-content: space-between; + align-items: center; } - #clone-panel { - width: 350px; + #repo-desc { + font-size: 1.2em; + } - @media only screen and (max-width: 768px) { - width: 100%; - } + .choose.reference { + .header .icon { + font-size: 1.4em; + } + } - input { - border-radius: 0; - padding: 5px 10px; - width: 50%; - } + .repo-path { - .clone.button { - font-size: 13px; - padding: 0 5px; + .section, + .divider { + display: inline; + } + } - &:first-child { - border-radius: .28571429rem 0 0 .28571429rem; - } - } + #file-buttons { + font-weight: normal; - .icon.button { - padding: 0 10px; - } + .ui.button { + padding: 8px 10px; + font-weight: normal; + } - .dropdown .menu { - right: 0 !important; - left: auto !important; + .ui.tiny.blue.buttons { + @media only screen and (max-width: 768px) { + width: 100%; } + } } - &.file.list { - .repo-description { - display: flex; - justify-content: space-between; - align-items: center; + #repo-files-table { + thead { + th { + padding-top: 8px; + padding-bottom: 5px; + font-weight: normal; } - #repo-desc { - font-size: 1.2em; + .ui.avatar { + margin-bottom: 5px; } - .choose.reference { - .header .icon { - font-size: 1.4em; + .commit-summary a { + text-decoration: underline; + text-decoration-style: dashed; + + &:hover { + text-decoration-style: solid; + } + + &.default-link { + text-decoration: none; + + &:hover { + text-decoration: underline; + text-decoration-style: solid; } + } } + } - .repo-path { + tbody { + .svg { + margin-left: 3px; + margin-right: 5px; + color: #777777; - .section, - .divider { - display: inline; - } + &.octicon-reply { + margin-right: 10px; + } + + &.octicon-file-directory, + &.octicon-file-submodule { + color: #1e70bf; + } } + } - #file-buttons { - font-weight: normal; + td { + padding-top: 0; + padding-bottom: 0; + overflow: initial; - .ui.button { - padding: 8px 10px; - font-weight: normal; - } + &.name { + max-width: 150px; + } - .ui.tiny.blue.buttons { - @media only screen and (max-width: 768px) { - width: 100%; - } - } + &.message { + max-width: 400px; } - #repo-files-table { - thead { - th { - padding-top: 8px; - padding-bottom: 5px; - font-weight: normal; - } + &.age { + width: 120px; + } - .ui.avatar { - margin-bottom: 5px; - } + > a { + width: calc(100% - 8px); /* prevent overflow into adjacant cell */ + display: inline-block; + padding-top: 8px; + padding-bottom: 8px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } - .commit-summary a { - text-decoration: underline; - text-decoration-style: dashed; + > * { + vertical-align: middle; + } + } - &:hover { - text-decoration-style: solid; - } + td.message .isSigned { + cursor: default; + } - &.default-link { - text-decoration: none; + tr:hover { + background-color: #ffffee; + } - &:hover { - text-decoration: underline; - text-decoration-style: solid; - } - } - } - } + .jumpable-path { + color: #888888; + } + } - tbody { - .svg { - margin-left: 3px; - margin-right: 5px; - color: #777777; + .non-diff-file-content { + .header { + .icon { + font-size: 1em; + } - &.octicon-reply { - margin-right: 10px; - } + .small.icon { + font-size: .75em; + } - &.octicon-file-directory, - &.octicon-file-submodule { - color: #1e70bf; - } - } - } + .tiny.icon { + font-size: .5em; + } - td { - padding-top: 0; - padding-bottom: 0; - overflow: initial; + .file-actions { + margin-bottom: -5px; - &.name { - max-width: 150px; - } + .btn-octicon { + display: inline-block; + padding: 5px; + margin-left: 5px; + line-height: 1; + color: #767676; + vertical-align: middle; + background: transparent; + border: 0; + outline: none; + } - &.message { - max-width: 400px; - } + .btn-octicon:hover { + color: #4078c0; + } - &.age { - width: 120px; - } + .btn-octicon-danger:hover { + color: #bd2c00; + } - > a { - width: calc(100% - 8px); /* prevent overflow into adjacant cell */ - display: inline-block; - padding-top: 8px; - padding-bottom: 8px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } + .btn-octicon.disabled { + color: #bbbbbb; + cursor: default; + } - > * { - vertical-align: middle; - } - } + #delete-file-form { + display: inline-block; + } + } + } - td.message .isSigned { - cursor: default; - } + .view-raw { + padding: 5px; - tr:hover { - background-color: #ffffee; - } + * { + max-width: 100%; + } - .jumpable-path { - color: #888888; - } + img { + border-radius: 0; } + } - .non-diff-file-content { - .header { - .icon { - font-size: 1em; - } + .plain-text { + padding: 1em 2em; - .small.icon { - font-size: .75em; - } + pre { + word-break: break-word; + white-space: pre-wrap; + } + } - .tiny.icon { - font-size: .5em; - } + .csv { + overflow-x: auto; + padding: 0 !important; + } - .file-actions { - margin-bottom: -5px; - - .btn-octicon { - display: inline-block; - padding: 5px; - margin-left: 5px; - line-height: 1; - color: #767676; - vertical-align: middle; - background: transparent; - border: 0; - outline: none; - } - - .btn-octicon:hover { - color: #4078c0; - } - - .btn-octicon-danger:hover { - color: #bd2c00; - } - - .btn-octicon.disabled { - color: #bbbbbb; - cursor: default; - } - - #delete-file-form { - display: inline-block; - } - } - } + pre { + overflow: auto; + } + } - .view-raw { - padding: 5px; + .sidebar { + padding-left: 0; - * { - max-width: 100%; - } + .svg { + width: 16px; + } + } + } - img { - border-radius: 0; - } - } + &.file.editor { + .treepath { + width: 100%; - .plain-text { - padding: 1em 2em; + input { + vertical-align: middle; + box-shadow: rgba(0, 0, 0, .0745098) 0 1px 2px inset; + width: inherit; + padding: 7px 8px; + margin-right: 5px; + } + } - pre { - word-break: break-word; - white-space: pre-wrap; - } - } + .tabular.menu { + .svg { + margin-right: 5px; + } + } - .csv { - overflow-x: auto; - padding: 0 !important; - } + .commit-form-wrapper { + padding-left: 64px; - pre { - overflow: auto; - } - } + .commit-avatar { + float: left; + margin-left: -64px; + width: 3em; + height: auto; + } - .sidebar { - padding-left: 0; + .commit-form { + position: relative; + padding: 15px; + margin-bottom: 10px; + border: 1px solid #dddddd; + border-radius: 3px; + #avatar-arrow; - .svg { - width: 16px; - } + &:after { + border-right-color: #ffffff; } - } - &.file.editor { - .treepath { - width: 100%; + .quick-pull-choice { + .branch-name { + display: inline-block; + padding: 3px 6px; + font: 12px @monospaced-fonts, monospace; + color: rgba(0, 0, 0, .65); + background-color: rgba(209, 227, 237, .45); + border-radius: 3px; + } + + .new-branch-name-input { + position: relative; + margin-left: 25px; input { - vertical-align: middle; - box-shadow: rgba(0, 0, 0, .0745098) 0 1px 2px inset; - width: inherit; - padding: 7px 8px; - margin-right: 5px; + width: 240px !important; + padding-left: 26px !important; } - } + } - .tabular.menu { - .svg { - margin-right: 5px; - } + .octicon-git-branch { + position: absolute; + top: 9px; + left: 10px; + color: #b0c4ce; + } } + } + } + } - .commit-form-wrapper { - padding-left: 64px; + &.options { + #interval { + width: 100px !important; + min-width: 100px; + } - .commit-avatar { - float: left; - margin-left: -64px; - width: 3em; - height: auto; - } + .danger { + .item { + padding: 20px 15px; + } - .commit-form { - position: relative; - padding: 15px; - margin-bottom: 10px; - border: 1px solid #dddddd; - border-radius: 3px; - #avatar-arrow; + .ui.divider { + margin: 0; + } + } + } - &:after { - border-right-color: #ffffff; - } + @comment-avatar-width: 3em; - .quick-pull-choice { - .branch-name { - display: inline-block; - padding: 3px 6px; - font: 12px @monospaced-fonts, monospace; - color: rgba(0, 0, 0, .65); - background-color: rgba(209, 227, 237, .45); - border-radius: 3px; - } - - .new-branch-name-input { - position: relative; - margin-left: 25px; - - input { - width: 240px !important; - padding-left: 26px !important; - } - } - - .octicon-git-branch { - position: absolute; - top: 9px; - left: 10px; - color: #b0c4ce; - } - } - } + .comment textarea { + max-height: none !important; + } + + &.new.issue { + .comment.form { + .comment { + .avatar { + width: @comment-avatar-width; } - } + } + + .content { + margin-left: 4em; + #avatar-arrow; - &.options { - #interval { - width: 100px !important; - min-width: 100px; + &:after { + border-right-color: #ffffff; } - .danger { - .item { - padding: 20px 15px; - } + .markdown { + font-size: 14px; + } + } - .ui.divider { - margin: 0; - } + .metas { + min-width: 220px; + + .filter.menu { + max-height: 300px; + overflow-x: auto; } + } + } + } - @comment-avatar-width: 3em; + &.view.issue { + .title { + padding-bottom: 0 !important; - .comment textarea { - max-height: none !important; - } + h1 { + font-weight: 300; + font-size: 2.3rem; + margin-bottom: 5px; - &.new.issue { - .comment.form { - .comment { - .avatar { - width: @comment-avatar-width; - } - } + .ui.input { + font-size: .5em; + vertical-align: top; + width: 50%; + min-width: 600px; - .content { - margin-left: 4em; - #avatar-arrow; + input { + font-size: 1.5em; + padding: 6px 10px; + } + } + } - &:after { - border-right-color: #ffffff; - } + .index { + font-weight: 300; + color: #aaaaaa; + letter-spacing: -1px; + } - .markdown { - font-size: 14px; - } - } + .label { + margin-right: 10px; + } - .metas { - min-width: 220px; + .edit-zone { + margin-top: 10px; + } + } - .filter.menu { - max-height: 300px; - overflow-x: auto; - } - } + .pull-desc { + code { + color: #0166e6; + } + } + .pull { + &.tabular.menu { + margin-bottom: 1rem; + + .svg { + margin-right: 5px; } - } + } - &.view.issue { - .title { - padding-bottom: 0 !important; - - h1 { - font-weight: 300; - font-size: 2.3rem; - margin-bottom: 5px; - - .ui.input { - font-size: .5em; - vertical-align: top; - width: 50%; - min-width: 600px; - - input { - font-size: 1.5em; - padding: 6px 10px; - } - } + .merge.box { + .avatar { + margin-left: 10px; + margin-top: 10px; + } + .branch-update.grid { + .row { + padding-bottom: 1rem; + .icon { + margin-top: 1.1rem; } + } + } + } - .index { - font-weight: 300; - color: #aaaaaa; - letter-spacing: -1px; - } + .review-item { + display: flex; + justify-content: space-between; + align-items: center; - .label { - margin-right: 10px; - } + .review-item-left, + .review-item-right { + display: flex; + align-items: center; + } - .edit-zone { - margin-top: 10px; - } + .avatar, + .type-icon { + .svg { + width: 23px; + height: 23px; + } } - .pull-desc { - code { - color: #0166e6; - } + .text { + margin: .3em 0 .5em .5em; } - .pull { - &.tabular.menu { - margin-bottom: 1rem; + .type-icon { + align-self: flex-start; + margin-right: 1em; - .svg { - margin-right: 5px; - } - } + i { + line-height: 1.8em; + } + } - .merge.box { - .avatar { - margin-left: 10px; - margin-top: 10px; - } - .branch-update.grid { - .row { - padding-bottom: 1rem; - .icon { - margin-top: 1.1rem; - } - } - } - } + .divider { + margin: .5rem 0; + } - .review-item { - display: flex; - justify-content: space-between; - align-items: center; + .review-content { + padding: 1em 0 1em 3.8em; + } + } + } - .review-item-left, - .review-item-right { - display: flex; - align-items: center; - } + .comment-list { + &:not(.prevent-before-timeline):before { + display: block; + content: ""; + position: absolute; + margin-top: 12px; + margin-bottom: 14px; + top: 0; + bottom: 0; + left: 96px; + width: 2px; + background-color: #f3f3f3; + z-index: -1; + } + + .timeline { + position: relative; + display: block; + margin-left: 40px; + padding-left: 16px; - .avatar, - .type-icon { - .svg { - width: 23px; - height: 23px; - } - } + &:before { //ciara + display: block; + content: ""; + position: absolute; + margin-top: 12px; + margin-bottom: 14px; + top: 0; + bottom: 0; + left: 30px; + width: 2px; + background-color: #f3f3f3; + z-index: -1; + } + } - .text { - margin: .3em 0 .5em .5em; - } + .timeline-item, + .timeline-item-group { + padding: 12px 0; + } - .type-icon { - align-self: flex-start; - margin-right: 1em; + .timeline-item-group { + .timeline-item { + padding-top: 8px; + padding-bottom: 8px; + } + } - i { - line-height: 1.8em; - } - } + .timeline-item { + margin-left: 16px; + position: relative; - .divider { - margin: .5rem 0; - } + .timeline-avatar { + position: absolute; + left: -72px; + img { + width: 40px; + height: 40px; + } + } - .review-content { - padding: 1em 0 1em 3.8em; - } - } + .avatar.image, + .avatar.image img { + width: 20px; + height: 20px; + margin-right: .15em; } - .comment-list { - &:not(.prevent-before-timeline):before { - display: block; - content: ""; - position: absolute; - margin-top: 12px; - margin-bottom: 14px; - top: 0; - bottom: 0; - left: 96px; - width: 2px; - background-color: #f3f3f3; - z-index: -1; + &:first-child:not(.commit) { + padding-top: 0 !important; + } + + &:last-child:not(.commit) { + padding-bottom: 0 !important; + } + + .badge.badge-commit { + border-color: transparent; + background: radial-gradient(white 40%, transparent 40%) no-repeat; + } + + .badge { + width: 32px; + height: 32px; + background-color: #fff; + border: 2px solid #eee; + border-radius: 50%; + display: flex; + float: left; + margin-left: -32px; + margin-right: 8px; + color: #444; + align-items: center; + justify-content: center; + + .svg { + width: 24px; + height: 24px; + padding: 3px; + + &.octicon-circle-slash { + color: #bd2c00; } - .timeline { - position: relative; - display: block; - margin-left: 40px; - padding-left: 16px; - - &:before { //ciara - display: block; - content: ""; - position: absolute; - margin-top: 12px; - margin-bottom: 14px; - top: 0; - bottom: 0; - left: 30px; - width: 2px; - background-color: #f3f3f3; - z-index: -1; - } + &.octicon-dot-fill { + color: #6cc644; } - .timeline-item, - .timeline-item-group { - padding: 12px 0; + &.octicon-comment { + margin-top: 2px; } + } + } - .timeline-item-group { - .timeline-item { - padding-top: 8px; - padding-bottom: 8px; - } + &.comment > .content { + margin-left: -16px; + } + + &.event > .text { + line-height: 32px; + vertical-align: middle; + } + + &.commits-list { + padding-left: 15px; + padding-top: 0; + + .singular-commit { + line-height: 30px; + + &:not(:last-child) { + padding-bottom: 2px; } - .timeline-item { - margin-left: 16px; - position: relative; - - .timeline-avatar { - position: absolute; - left: -72px; - img { - width: 40px; - height: 40px; - } - } + .shabox { + .sha.label { + margin: 0; + border: 1px solid #bbbbbb; - .avatar.image, - .avatar.image img { - width: 20px; - height: 20px; - margin-right: .15em; - } + &.isSigned.isWarning { + border: 1px solid #db2828; + background: fade(#db2828, 10%); - &:first-child:not(.commit) { - padding-top: 0 !important; - } + .shortsha { + display: inline-block; + padding-top: 1px; + } - &:last-child:not(.commit) { - padding-bottom: 0 !important; + &:hover { + background: fade(#db2828, 30%) !important; + } } - .badge.badge-commit { - border-color: transparent; - background: radial-gradient(white 40%, transparent 40%) no-repeat; - } + &.isSigned.isVerified { + border: 1px solid #21ba45; + background: fade(#21ba45, 10%); - .badge { - width: 32px; - height: 32px; - background-color: #fff; - border: 2px solid #eee; - border-radius: 50%; - display: flex; - float: left; - margin-left: -32px; - margin-right: 8px; - color: #444; - align-items: center; - justify-content: center; - - .svg { - width: 24px; - height: 24px; - padding: 3px; - - &.octicon-circle-slash { - color: #bd2c00; - } - - &.octicon-dot-fill { - color: #6cc644; - } - - &.octicon-comment { - margin-top: 2px; - } - } - } + .shortsha { + display: inline-block; + padding-top: 1px; + } - &.comment > .content { - margin-left: -16px; + &:hover { + background: fade(#21ba45, 30%) !important; + } } - &.event > .text { - line-height: 32px; - vertical-align: middle; - } + &.isSigned.isVerifiedUntrusted { + border: 1px solid #fbbd08; + background: fade(#fbbd08, 10%); - &.commits-list { - padding-left: 15px; - padding-top: 0; - - .singular-commit { - line-height: 30px; - - &:not(:last-child) { - padding-bottom: 2px; - } - - .shabox { - .sha.label { - margin: 0; - border: 1px solid #bbbbbb; - - &.isSigned.isWarning { - border: 1px solid #db2828; - background: fade(#db2828, 10%); - - .shortsha { - display: inline-block; - padding-top: 1px; - } - - &:hover { - background: fade(#db2828, 30%) !important; - } - } - - &.isSigned.isVerified { - border: 1px solid #21ba45; - background: fade(#21ba45, 10%); - - .shortsha { - display: inline-block; - padding-top: 1px; - } - - &:hover { - background: fade(#21ba45, 30%) !important; - } - } - - &.isSigned.isVerifiedUntrusted { - border: 1px solid #fbbd08; - background: fade(#fbbd08, 10%); - - .shortsha { - display: inline-block; - padding-top: 1px; - } - - &:hover { - background: fade(#fbbd08, 30%) !important; - } - } - - &.isSigned.isVerifiedUnmatched { - border: 1px solid #f2711c; - background: fade(#f2711c, 10%); - - .shortsha { - display: inline-block; - padding-top: 1px; - } - - &:hover { - background: fade(#f2711c, 30%) !important; - } - } - } - } - } - } + .shortsha { + display: inline-block; + padding-top: 1px; + } - &.event > .commit-status-link { - float: right; - margin-right: 8px; - margin-top: 4px; + &:hover { + background: fade(#fbbd08, 30%) !important; + } } - .author { - font-weight: 700; - } + &.isSigned.isVerifiedUnmatched { + border: 1px solid #f2711c; + background: fade(#f2711c, 10%); - .comment-form-reply .footer { - padding-bottom: 1em; + .shortsha { + display: inline-block; + padding-top: 1px; + } + + &:hover { + background: fade(#f2711c, 30%) !important; + } } + } } + } + } - .comment { - - .tag { - color: #767676; - margin-top: 3px; - padding: 2px 5px; - font-size: 12px; - border: 1px solid rgba(0, 0, 0, .1); - border-radius: 3px; - &.review { - margin-left: 5px; - &.pending { - color: black; - background-color: #fffbb2; - } - } - } + &.event > .commit-status-link { + float: right; + margin-right: 8px; + margin-top: 4px; + } + + .author { + font-weight: 700; + } - .actions { - .item { - float: left; + .comment-form-reply .footer { + padding-bottom: 1em; + } + } - &.context { - float: none; - } + .comment { - &.tag { - margin-right: 5px; - } + .tag { + color: #767676; + margin-top: 3px; + padding: 2px 5px; + font-size: 12px; + border: 1px solid rgba(0, 0, 0, .1); + border-radius: 3px; + &.review { + margin-left: 5px; + &.pending { + color: black; + background-color: #fffbb2; + } + } + } - &.action { - margin-top: 6px; - padding-left: 10px; - padding-right: 3px; - } - } - } + .actions { + .item { + float: left; - > .content { - > div:first-child { - border-top-left-radius: 4px; - border-top-right-radius: 4px; - } + &.context { + float: none; + } - > div:last-child { - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - } - } + &.tag { + margin-right: 5px; + } - .content { - > .header { - #avatar-arrow; - font-weight: normal; - padding: auto 15px; - position: relative; - color: #767676; - background-color: #f7f7f7; - - .text { - padding-top: 10px; - padding-bottom: 10px; - } - - &.arrow-top::before, - &.arrow-top::after { - transform: rotate(90deg); - } - - &.arrow-top::before { - top: -9px; - left: 6px; - } - - &.arrow-top::after { - top: -8px; - left: 7px; - } - - .actions a { - color: rgba(0, 0, 0, .4); - - &:hover { - color: rgba(0, 0, 0, .8); - } - } - } - - > .merge-section { - background-color: #f7f7f7; - - .item { - padding: .25rem 0; - } - - .item-section { - display: flex; - align-items: center; - justify-content: space-between; - padding: 0; - margin-top: -.25rem; - margin-bottom: -.25rem; - } - - .divider { - margin-left: -1rem; - margin-right: -1rem; - } - - &.no-header { - #avatar-arrow; - } - } - - .markdown { - font-size: 14px; - } - - .no-content { - color: #767676; - font-style: italic; - } - - > .bottom.segment { - background: #f3f4f5; - - .ui.images::after { - clear: both; - content: ' '; - display: block; - } - - a { - display: block; - float: left; - margin: 5px; - padding: 5px; - height: 150px; - border: solid 1px #eeeeee; - border-radius: 3px; - max-width: 150px; - background-color: #ffffff; - - &:before { - content: ' '; - display: inline-block; - height: 100%; - vertical-align: middle; - } - } - - .ui.image { - max-height: 100%; - width: auto; - margin: 0; - vertical-align: middle; - } - - span.ui.image { - font-size: 128px; - color: #000000; - } - - span.ui.image:hover { - color: #000000; - } - } - } + &.action { + margin-top: 6px; + padding-left: 10px; + padding-right: 3px; + } + } + } - &:target > .content { - box-shadow: 0 0 10px #8c8c8c; - } + > .content { + > div:first-child { + border-top-left-radius: 4px; + border-top-right-radius: 4px; + } - &:target > .content > .code-comment-content { - padding: 4px; - } + > div:last-child { + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + } + } - &:target > .content > .code-comment-content > .text { - margin-bottom: 0; - } + .content { + > .header { + #avatar-arrow; + font-weight: normal; + padding: auto 15px; + position: relative; + color: #767676; + background-color: #f7f7f7; - .ui.form { - .field { - &:first-child { - clear: none; - } - - &.footer { - overflow: hidden; - } - - .tab.markdown { - min-height: 5rem; - } - } - - textarea { - height: 200px; - font-family: @monospaced-fonts, monospace; - } - } + .text { + padding-top: 10px; + padding-bottom: 10px; + } - .edit.buttons { - margin-top: 10px; - } + &.arrow-top::before, + &.arrow-top::after { + transform: rotate(90deg); } - .event { - padding-left: 15px; + &.arrow-top::before { + top: -9px; + left: 6px; + } - & > .svg:not(.issue-symbol) { - text-shadow: -2px 0 #fff, 0 2px #fff, 2px 0 #fff, 0 -2px #fff; - } + &.arrow-top::after { + top: -8px; + left: 7px; + } - & > .svg.issue-symbol { - font-size: 20px; - margin-left: -35px; - margin-right: -1px; - margin-top: 0 !important; - height: 28px; - width: 28px; - border-radius: 50%; - text-align: center; - line-height: 28px; - background: #eee; - - &::before { - width: 15px; - display: inline-block; - } - - &.octicon-key::before { - width: 18px; - } - - &.octicon-circle-slash::before { - width: 17px; - } - - &.octicon-comment { - font-size: 21px; - line-height: 33px; - - &::before { - width: 20px; - } - } - } + .actions a { + color: rgba(0, 0, 0, .4); - .detail { - font-size: .9rem; - margin-top: 5px; - margin-left: 8px; - } + &:hover { + color: rgba(0, 0, 0, .8); + } + } + } - .segments { - box-shadow: none; + > .merge-section { + background-color: #f7f7f7; - .show-outdated, - .hide-outdated { - display: block; - } - } + .item { + padding: .25rem 0; } - } - .ui.participants { - img { - margin-top: 5px; - margin-right: 5px; + .item-section { + display: flex; + align-items: center; + justify-content: space-between; + padding: 0; + margin-top: -.25rem; + margin-bottom: -.25rem; } - } - .ui.depending { - .item.is-closed { - .title { - text-decoration: line-through; - } + .divider { + margin-left: -1rem; + margin-right: -1rem; } - } - } - .comment.form { - .ui.comments { - margin-top: -12px; - max-width: 100%; - } + &.no-header { + #avatar-arrow; + } + } - .content { - .field:first-child { - clear: none; + .markdown { + font-size: 14px; + } + + .no-content { + color: #767676; + font-style: italic; + } + + > .bottom.segment { + background: #f3f4f5; + + .ui.images::after { + clear: both; + content: ' '; + display: block; } - .form { - #avatar-arrow; + a { + display: block; + float: left; + margin: 5px; + padding: 5px; + height: 150px; + border: solid 1px #eeeeee; + border-radius: 3px; + max-width: 150px; + background-color: #ffffff; + + &:before { + content: ' '; + display: inline-block; + height: 100%; + vertical-align: middle; + } + } - &:after { - border-right-color: #ffffff; - } + .ui.image { + max-height: 100%; + width: auto; + margin: 0; + vertical-align: middle; } - textarea { - height: 200px; - font-family: @monospaced-fonts, monospace; + span.ui.image { + font-size: 128px; + color: #000000; } + + span.ui.image:hover { + color: #000000; + } + } } - } - .labelspage { - list-style: none; - padding-top: 0; + &:target > .content { + box-shadow: 0 0 10px #8c8c8c; + } - .item { - margin-top: 0; - margin-right: -14px; - margin-left: -14px; - padding: 10px; - border-bottom: 1px solid #e1e4e8; - border-top: none; + &:target > .content > .code-comment-content { + padding: 4px; + } - a { - font-size: 15px; - padding-top: 5px; - padding-right: 10px; - color: #666666; + &:target > .content > .code-comment-content > .text { + margin-bottom: 0; + } - &:hover { - color: #000000; - } + .ui.form { + .field { + &:first-child { + clear: none; + } - &.open-issues { - margin-right: 30px; - } + &.footer { + overflow: hidden; } - .ui.label { - font-size: 1em; + .tab.markdown { + min-height: 5rem; } + } + + textarea { + height: 200px; + font-family: @monospaced-fonts, monospace; + } } - .item:last-child { - border-bottom: none; - padding-bottom: 0; + .edit.buttons { + margin-top: 10px; } + } - .orglabel { - opacity: .7; + .event { + padding-left: 15px; + + & > .svg:not(.issue-symbol) { + text-shadow: -2px 0 #fff, 0 2px #fff, 2px 0 #fff, 0 -2px #fff; } - } + & > .svg.issue-symbol { + font-size: 20px; + margin-left: -35px; + margin-right: -1px; + margin-top: 0 !important; + height: 28px; + width: 28px; + border-radius: 50%; + text-align: center; + line-height: 28px; + background: #eee; - .milestone.list { - list-style: none; - padding-top: 15px; + &::before { + width: 15px; + display: inline-block; + } - > .item { - padding-top: 10px; - padding-bottom: 10px; - border-bottom: 1px dashed #aaaaaa; + &.octicon-key::before { + width: 18px; + } - > a { - padding-top: 5px; - padding-right: 10px; - color: #000000; + &.octicon-circle-slash::before { + width: 17px; + } - &:hover { - color: #4078c0; - } + &.octicon-comment { + font-size: 21px; + line-height: 33px; + + &::before { + width: 20px; } + } + } - .ui.progress { - width: 40%; - padding: 0; - border: 0; - margin: 0; + .detail { + font-size: .9rem; + margin-top: 5px; + margin-left: 8px; + } - .bar { - height: 20px; - } - } + .segments { + box-shadow: none; - .meta { - color: #999999; - padding-top: 5px; + .show-outdated, + .hide-outdated { + display: block; + } + } + } + } - .issue-stats .svg { - padding-left: 5px; - } + .ui.participants { + img { + margin-top: 5px; + margin-right: 5px; + } + } - .overdue { - color: red; - } - } + .ui.depending { + .item.is-closed { + .title { + text-decoration: line-through; + } + } + } + } - .operate { - margin-top: -15px; + .comment.form { + .ui.comments { + margin-top: -12px; + max-width: 100%; + } - > a { - font-size: 15px; - padding-top: 5px; - padding-right: 10px; - color: #666666; + .content { + .field:first-child { + clear: none; + } - &:hover { - color: #000000; - } - } - } + .form { + #avatar-arrow; - .content { - padding-top: 10px; - } + &:after { + border-right-color: #ffffff; } + } + + textarea { + height: 200px; + font-family: @monospaced-fonts, monospace; + } } + } - &.new.milestone { - textarea { - height: 200px; + .labelspage { + list-style: none; + padding-top: 0; + + .item { + margin-top: 0; + margin-right: -14px; + margin-left: -14px; + padding: 10px; + border-bottom: 1px solid #e1e4e8; + border-top: none; + + a { + font-size: 15px; + padding-top: 5px; + padding-right: 10px; + color: #666666; + + &:hover { + color: #000000; + } + + &.open-issues { + margin-right: 30px; } + } + + .ui.label { + font-size: 1em; + } + } + + .item:last-child { + border-bottom: none; + padding-bottom: 0; + } + + .orglabel { + opacity: .7; } - &.compare.pull { - .show-form-container { - text-align: left; + } + + .milestone.list { + list-style: none; + padding-top: 15px; + + > .item { + padding-top: 10px; + padding-bottom: 10px; + border-bottom: 1px dashed #aaaaaa; + + > a { + padding-top: 5px; + padding-right: 10px; + color: #000000; + + &:hover { + color: #4078c0; } + } - .choose.branch { - .svg { - margin-right: 10px; - } + .ui.progress { + width: 40%; + padding: 0; + border: 0; + margin: 0; + + .bar { + height: 20px; } + } - .comment.form { - .content { - #avatar-arrow; + .meta { + color: #999999; + padding-top: 5px; - &:after { - border-right-color: #ffffff; - } - } + .issue-stats .svg { + padding-left: 5px; } - .pullrequest-form { - margin-bottom: 1.5rem; + .overdue { + color: red; } + } - .markdown { - font-size: 14px; + .operate { + margin-top: -15px; + + > a { + font-size: 15px; + padding-top: 5px; + padding-right: 10px; + color: #666666; + + &:hover { + color: #000000; + } } + } + + .content { + padding-top: 10px; + } } + } - .filter.dropdown .menu { - margin-top: 1px !important; + &.new.milestone { + textarea { + height: 200px; } + } - &.branches { - .commit-divergence { - .bar-group { - position: relative; - float: left; - padding-bottom: 6px; - width: 90px; - - &:last-child { - border-left: 1px solid #b4b4b4; - } - } + &.compare.pull { + .show-form-container { + text-align: left; + } - .count { - margin: 0 3px; + .choose.branch { + .svg { + margin-right: 10px; + } + } - &.count-ahead { - text-align: left; - } + .comment.form { + .content { + #avatar-arrow; - &.count-behind { - text-align: right; - } - } + &:after { + border-right-color: #ffffff; + } + } + } - .bar { - height: 4px; - position: absolute; - background-color: #d4d4d5; + .pullrequest-form { + margin-bottom: 1.5rem; + } - &.bar-behind { - right: 0; - } + .markdown { + font-size: 14px; + } + } - &.bar-ahead { - left: 0; - } - } + .filter.dropdown .menu { + margin-top: 1px !important; + } + + &.branches { + .commit-divergence { + .bar-group { + position: relative; + float: left; + padding-bottom: 6px; + width: 90px; + + &:last-child { + border-left: 1px solid #b4b4b4; } - } + } - &.commits { - .header { - .search { - input { - font-weight: normal; - padding: 5px 10px; - } - } + .count { + margin: 0 3px; + + &.count-ahead { + text-align: left; } - } - #commits-table { - thead { - th:first-of-type { - padding-left: 15px; - } + &.count-behind { + text-align: right; + } + } - .sha { - &td { - text-align: center; - } + .bar { + height: 4px; + position: absolute; + background-color: #d4d4d5; - width: 175px; - } + &.bar-behind { + right: 0; + } + + &.bar-ahead { + left: 0; + } + } + } + } + + &.commits { + .header { + .search { + input { + font-weight: normal; + padding: 5px 10px; } + } + } + } - td.sha .sha.label { - margin: 0; + #commits-table { + thead { + th:first-of-type { + padding-left: 15px; + } + + .sha { + &td { + text-align: center; } - td.message { - text-overflow: unset; - } + width: 175px; + } + } + + td.sha .sha.label { + margin: 0; + } + + td.message { + text-overflow: unset; + } - &.ui.basic.striped.table tbody tr:nth-child(2n) { - background-color: rgba(0, 0, 0, .02) !important; - } + &.ui.basic.striped.table tbody tr:nth-child(2n) { + background-color: rgba(0, 0, 0, .02) !important; } + } - #commits-table td.sha .sha.label, - #repo-files-table .sha.label, - .timeline-item.commits-list .singular-commit .sha.label { - border: 1px solid #bbbbbb; + #commits-table td.sha .sha.label, + #repo-files-table .sha.label, + .timeline-item.commits-list .singular-commit .sha.label { + border: 1px solid #bbbbbb; - .ui.signature.avatar { - height: 16px; - margin-bottom: 0; - width: auto; - } + .ui.signature.avatar { + height: 16px; + margin-bottom: 0; + width: auto; + } - .detail.icon { - background: #fafafa; - margin: -6px -10px -4px 0; - padding: 5px 4px 5px 6px; - border-left: 1px solid #bbbbbb; - border-top: 0; - border-right: 0; - border-bottom: 0; - border-top-left-radius: 0; - border-bottom-left-radius: 0; + .detail.icon { + background: #fafafa; + margin: -6px -10px -4px 0; + padding: 5px 4px 5px 6px; + border-left: 1px solid #bbbbbb; + border-top: 0; + border-right: 0; + border-bottom: 0; + border-top-left-radius: 0; + border-bottom-left-radius: 0; - img { - margin-right: 0; - } + img { + margin-right: 0; + } - .svg { - margin: 0 .25em 0 0; - } + .svg { + margin: 0 .25em 0 0; + } - > div { - display: flex; - align-items: center; - } - } + > div { + display: flex; + align-items: center; + } + } - &.isSigned.isWarning { - border: 1px solid #db2828; - background: fade(#db2828, 10%); + &.isSigned.isWarning { + border: 1px solid #db2828; + background: fade(#db2828, 10%); - .shortsha { - display: inline-block; - padding-top: 1px; - } + .shortsha { + display: inline-block; + padding-top: 1px; + } - .detail.icon { - border-left: 1px solid #db2828; - color: #db2828; - } + .detail.icon { + border-left: 1px solid #db2828; + color: #db2828; + } - &:hover { - background: fade(#db2828, 30%) !important; - } - } + &:hover { + background: fade(#db2828, 30%) !important; + } + } - &.isSigned.isVerified { - border: 1px solid #21ba45; - background: fade(#21ba45, 10%); + &.isSigned.isVerified { + border: 1px solid #21ba45; + background: fade(#21ba45, 10%); - .shortsha { - display: inline-block; - padding-top: 1px; - } + .shortsha { + display: inline-block; + padding-top: 1px; + } - .detail.icon { - border-left: 1px solid #21ba45; - color: #21ba45; - } + .detail.icon { + border-left: 1px solid #21ba45; + color: #21ba45; + } - &:hover { - background: fade(#21ba45, 30%) !important; - } - } + &:hover { + background: fade(#21ba45, 30%) !important; + } + } - &.isSigned.isVerifiedUntrusted { - border: 1px solid #fbbd08; - background: fade(#fbbd08, 10%); + &.isSigned.isVerifiedUntrusted { + border: 1px solid #fbbd08; + background: fade(#fbbd08, 10%); - .shortsha { - display: inline-block; - padding-top: 1px; - } + .shortsha { + display: inline-block; + padding-top: 1px; + } - .detail.icon { - border-left: 1px solid #fbbd08; - color: #fbbd08; - } + .detail.icon { + border-left: 1px solid #fbbd08; + color: #fbbd08; + } - &:hover { - background: fade(#fbbd08, 30%) !important; - } - } + &:hover { + background: fade(#fbbd08, 30%) !important; + } + } - &.isSigned.isVerifiedUnmatched { - border: 1px solid #f2711c; - background: fade(#f2711c, 10%); + &.isSigned.isVerifiedUnmatched { + border: 1px solid #f2711c; + background: fade(#f2711c, 10%); - .shortsha { - display: inline-block; - padding-top: 1px; - } + .shortsha { + display: inline-block; + padding-top: 1px; + } - .detail.icon { - border-left: 1px solid #f2711c; - color: #f2711c; - } + .detail.icon { + border-left: 1px solid #f2711c; + color: #f2711c; + } - &:hover { - background: fade(#f2711c, 30%) !important; - } - } + &:hover { + background: fade(#f2711c, 30%) !important; + } } + } - .diff-detail-box { - padding: 7px 0; - background: #ffffff; - line-height: 30px; + .diff-detail-box { + padding: 7px 0; + background: #ffffff; + line-height: 30px; - &.sticky { - position: sticky; - top: 0; - z-index: 8; - margin-bottom: 10px; - border-bottom: 1px solid #d4d4d5; - padding-left: 5px; - padding-right: 5px; - } + &.sticky { + position: sticky; + top: 0; + z-index: 8; + margin-bottom: 10px; + border-bottom: 1px solid #d4d4d5; + padding-left: 5px; + padding-right: 5px; + } - > div:after { - clear: both; - content: ""; - display: block; - } + > div:after { + clear: both; + content: ""; + display: block; + } - span.status { - display: inline-block; - width: 12px; - height: 12px; - margin-right: 8px; - vertical-align: middle; + span.status { + display: inline-block; + width: 12px; + height: 12px; + margin-right: 8px; + vertical-align: middle; - &.modify { - background-color: #f0db88; - } + &.modify { + background-color: #f0db88; + } - &.add { - background-color: #b4e2b4; - } + &.add { + background-color: #b4e2b4; + } - &.del { - background-color: #e9aeae; - } + &.del { + background-color: #e9aeae; + } - &.rename { - background-color: #dad8ff; - } - } + &.rename { + background-color: #dad8ff; + } + } - .detail-files { - background: #ffffff; - margin: 0; - } + .detail-files { + background: #ffffff; + margin: 0; } + } - .diff-box .header { - display: flex; - align-items: center; + .diff-box .header { + display: flex; + align-items: center; - .count { - margin-right: 12px; - font-size: 13px; - flex: 0 0 auto; + .count { + margin-right: 12px; + font-size: 13px; + flex: 0 0 auto; - .bar { - background-color: #bd2c00; - height: 12px; - width: 40px; - display: inline-block; - margin: 2px 4px 0; - vertical-align: text-top; + .bar { + background-color: #bd2c00; + height: 12px; + width: 40px; + display: inline-block; + margin: 2px 4px 0; + vertical-align: text-top; - .add { - background-color: #55a532; - height: 12px; - } - } + .add { + background-color: #55a532; + height: 12px; } + } + } - .file { - flex: 1; - color: #888888; - word-break: break-all; - } + .file { + flex: 1; + color: #888888; + word-break: break-all; + } - .button { - margin: -5px 0 -5px 12px; - padding: 8px 10px; - flex: 0 0 auto; - } + .button { + margin: -5px 0 -5px 12px; + padding: 8px 10px; + flex: 0 0 auto; } + } - .diff-file-box { - .header { - background-color: #f7f7f7; - } + .diff-file-box { + .header { + background-color: #f7f7f7; + } - .file-body.file-code { - .lines-num { - text-align: right; - color: #a6a6a6; - width: 1%; - min-width: 50px; - user-select: none; + .file-body.file-code { + .lines-num { + text-align: right; + color: #a6a6a6; + width: 1%; + min-width: 50px; + user-select: none; - span.fold { - display: block; - text-align: center; - } - } + span.fold { + display: block; + text-align: center; } + } + } - .code-diff { - font-size: 12px; - - td { - padding: 0 0 0 10px !important; - border-top: 0; - } + .code-diff { + font-size: 12px; - .lines-num { - padding: 0 5px !important; - } + td { + padding: 0 0 0 10px !important; + border-top: 0; + } - .tag-code .lines-num, - .tag-code td { - padding: 0 !important; - } + .lines-num { + padding: 0 5px !important; + } - tbody { - tr { - td.halfwidth { - // halfwidth is used in split view - and in that case, 1% of each - width: 49%; - } - - td.center { - text-align: center; - } - - [data-line-num]::before { - content: attr(data-line-num); - text-align: right; - } - - .lines-type-marker { - width: 10px; - min-width: 10px; - user-select: none; - } - - [data-type-marker]::before { - content: attr(data-type-marker); - text-align: right; - display: inline-block; - } - } - } - } + .tag-code .lines-num, + .tag-code td { + padding: 0 !important; + } - .code-diff-unified tbody tr { - &.del-code td { - background-color: #ffeef0; - border-color: #f1c0c0; - } + tbody { + tr { + td.halfwidth { + // halfwidth is used in split view - and in that case, 1% of each + width: 49%; + } - &.add-code td { - background-color: #e6ffed; - border-color: #bef5cb; - } + td.center { + text-align: center; + } - &.del-code td.lines-num { - background-color: #ffe5e4; - } + [data-line-num]::before { + content: attr(data-line-num); + text-align: right; + } - &.add-code td.lines-num { - background-color: #cdffd8; - } + .lines-type-marker { + width: 10px; + min-width: 10px; + user-select: none; + } + [data-type-marker]::before { + content: attr(data-type-marker); + text-align: right; + display: inline-block; + } } + } + } - .code-diff-split { + .code-diff-unified tbody tr { + &.del-code td { + background-color: #ffeef0; + border-color: #f1c0c0; + } - table, - tbody { - width: 100%; - } + &.add-code td { + background-color: #e6ffed; + border-color: #bef5cb; + } - tbody tr { - - // light gray for empty lines before / after commit - &.add-code td:nth-child(1), - &.add-code td:nth-child(2), - &.add-code td:nth-child(3), - &.del-code td:nth-child(4), - &.del-code td:nth-child(5), - &.del-code td:nth-child(6) { - background-color: #fafbfc; - border-right-color: #eaecef; - } + &.del-code td.lines-num { + background-color: #ffe5e4; + } - &.del-code { - background-color: #ffeef0; - } + &.add-code td.lines-num { + background-color: #cdffd8; + } - &.del-code td.add-code { - background-color: #e6ffed; - } - &.del-code td.lines-num-new.add-code { - background-color: #cdffd8; - border-color: #bef5cb; - } + } - &.add-code { - background-color: #e6ffed; - border-color: #bef5cb; - } + .code-diff-split { - &.add-code td.lines-num-new { - background-color: #cdffd8; - } + table, + tbody { + width: 100%; + } - td:nth-child(4) { - border-left-width: 1px; - border-left-style: solid; - border-left-color: #f6f8fa; - } - } - } + tbody tr { - &.file-content { - img { - max-width: 100%; - padding: 0; - border-radius: 0; - } - img.emoji { - padding: 0; - } + // light gray for empty lines before / after commit + &.add-code td:nth-child(1), + &.add-code td:nth-child(2), + &.add-code td:nth-child(3), + &.del-code td:nth-child(4), + &.del-code td:nth-child(5), + &.del-code td:nth-child(6) { + background-color: #fafbfc; + border-right-color: #eaecef; + } - clear: right; + &.del-code { + background-color: #ffeef0; } - .ui.bottom.attached.table.segment { - padding-top: 5px; - padding-bottom: 5px; + &.del-code td.add-code { + background-color: #e6ffed; + } + &.del-code td.lines-num-new.add-code { + background-color: #cdffd8; + border-color: #bef5cb; } - } - .diff-stats { + &.add-code { + background-color: #e6ffed; + border-color: #bef5cb; + } - clear: both; - margin-bottom: 5px; - max-height: 400px; - overflow: auto; - padding-left: 0; + &.add-code td.lines-num-new { + background-color: #cdffd8; + } - li { - list-style: none; - padding-bottom: 4px; - margin-bottom: 4px; - border-bottom: 1px dashed #dddddd; - padding-left: 6px; + td:nth-child(4) { + border-left-width: 1px; + border-left-style: solid; + border-left-color: #f6f8fa; } + } + } - .diff-counter { - margin-right: 15px; + &.file-content { + img { + max-width: 100%; + padding: 0; + border-radius: 0; + } + img.emoji { + padding: 0; + } - .del { - color: red; - } - .add { - color: green; - } - } + clear: right; } - .repo-search-result { - padding-top: 10px; - padding-bottom: 10px; + .ui.bottom.attached.table.segment { + padding-top: 5px; + padding-bottom: 5px; + } + } - .lines-num a { - color: inherit; - } + .diff-stats { + + clear: both; + margin-bottom: 5px; + max-height: 400px; + overflow: auto; + padding-left: 0; + + li { + list-style: none; + padding-bottom: 4px; + margin-bottom: 4px; + border-bottom: 1px dashed #dddddd; + padding-left: 6px; } - &.quickstart { - .guide { - .item { - padding: 1em; + .diff-counter { + margin-right: 15px; - small { - font-weight: normal; - } - } + .del { + color: red; + } + .add { + color: green; + } + } + } - .clone.button:first-child { - border-radius: .28571429rem 0 0 .28571429rem; - } + .repo-search-result { + padding-top: 10px; + padding-bottom: 10px; - .ui.action.small.input { - width: 100%; - } + .lines-num a { + color: inherit; + } + } - #repo-clone-url { - border-radius: 0; - padding: 5px 10px; - font-size: 1.2em; - } + &.quickstart { + .guide { + .item { + padding: 1em; + + small { + font-weight: normal; } - } + } - &.release { - #release-list { - border-top: 1px solid #dddddd; - margin-top: 20px; - padding-top: 15px; + .clone.button:first-child { + border-radius: .28571429rem 0 0 .28571429rem; + } - > li { - list-style: none; + .ui.action.small.input { + width: 100%; + } - .meta, - .detail { - padding-top: 30px; - padding-bottom: 40px; - } + #repo-clone-url { + border-radius: 0; + padding: 5px 10px; + font-size: 1.2em; + } + } + } + + &.release { + #release-list { + border-top: 1px solid #dddddd; + margin-top: 20px; + padding-top: 15px; - .meta { - text-align: right; - position: relative; + > li { + list-style: none; - .tag:not(.icon) { - display: block; - margin-top: 15px; - } + .meta, + .detail { + padding-top: 30px; + padding-bottom: 40px; + } - .commit { - display: block; - margin-top: 10px; - } - } + .meta { + text-align: right; + position: relative; - .detail { - border-left: 1px solid #dddddd; - - .author { - img { - margin-bottom: -3px; - } - } - - .download { - margin-top: 20px; - - > a { - .svg { - margin-left: 5px; - margin-right: 5px; - } - } - - .list { - padding-left: 0; - border-top: 1px solid #eeeeee; - - li { - list-style: none; - display: block; - padding-top: 8px; - padding-bottom: 8px; - border-bottom: 1px solid #eeeeee; - - a > .text.right { - margin-right: 5px; - } - } - } - } - - .dot { - width: 9px; - height: 9px; - background-color: #cccccc; - z-index: 999; - position: absolute; - display: block; - left: -5px; - top: 40px; - border-radius: 6px; - border: 1px solid #ffffff; - } - } - } + .tag:not(.icon) { + display: block; + margin-top: 15px; + } + + .commit { + display: block; + margin-top: 10px; + } } - } - &.new.release { - .target { - min-width: 500px; + .detail { + border-left: 1px solid #dddddd; - #tag-name { - margin-top: -4px; + .author { + img { + margin-bottom: -3px; } + } + + .download { + margin-top: 20px; - .at { - margin-left: -5px; + > a { + .svg { + margin-left: 5px; margin-right: 5px; + } } - .dropdown.icon { - margin: 0; - padding-top: 3px; - } + .list { + padding-left: 0; + border-top: 1px solid #eeeeee; - .selection.dropdown { - padding-top: 10px; - padding-bottom: 10px; + li { + list-style: none; + display: block; + padding-top: 8px; + padding-bottom: 8px; + border-bottom: 1px solid #eeeeee; + + a > .text.right { + margin-right: 5px; + } + } } - } + } - .prerelease.field { - margin-bottom: 0; + .dot { + width: 9px; + height: 9px; + background-color: #cccccc; + z-index: 999; + position: absolute; + display: block; + left: -5px; + top: 40px; + border-radius: 6px; + border: 1px solid #ffffff; + } } + } + } + } - .field { + &.new.release { + .target { + min-width: 500px; - button, - input { - @media only screen and (max-width: 438px) { - width: 100%; - } - } + #tag-name { + margin-top: -4px; + } - button { - @media only screen and (max-width: 768px) { - margin-bottom: 1em; - } - } - } + .at { + margin-left: -5px; + margin-right: 5px; + } + + .dropdown.icon { + margin: 0; + padding-top: 3px; + } + + .selection.dropdown { + padding-top: 10px; + padding-bottom: 10px; + } } - &.forks { - .list { - margin-top: 0; + .prerelease.field { + margin-bottom: 0; + } - .item { - padding-top: 10px; - padding-bottom: 10px; - border-bottom: 1px solid #dddddd; + .field { - .ui.avatar { - float: left; - margin-right: 5px; - } + button, + input { + @media only screen and (max-width: 438px) { + width: 100%; + } + } - .link { - padding-top: 5px; - } - } + button { + @media only screen and (max-width: 768px) { + margin-bottom: 1em; } + } } + } - &.wiki { - &.start { - .ui.segment { - padding-top: 70px; - padding-bottom: 100px; + &.forks { + .list { + margin-top: 0; - .svg { - height: 48px; - } - } + .item { + padding-top: 10px; + padding-bottom: 10px; + border-bottom: 1px solid #dddddd; + + .ui.avatar { + float: left; + margin-right: 5px; } - &.new { - .CodeMirror { - .CodeMirror-code { - font-family: @monospaced-fonts, monospace; + .link { + padding-top: 5px; + } + } + } + } - .cm-comment { - background: inherit; - } - } - } + &.wiki { + &.start { + .ui.segment { + padding-top: 70px; + padding-bottom: 100px; - .editor-preview { - background-color: white; - } + .svg { + height: 48px; + } + } + } - .ui.attached.tabular.menu.previewtabs { - margin-bottom: 15px; + &.new { + .CodeMirror { + .CodeMirror-code { + font-family: @monospaced-fonts, monospace; - & + .field .editor-toolbar:not(.fullscreen) a.fa-eye { - display: none; - } - } + .cm-comment { + background: inherit; + } } + } - &.view { - .choose.page { - margin-top: -5px; - } + .editor-preview { + background-color: white; + } - > .markdown { - padding: 15px 30px; - - h1, - h2, - h3, - h4, - h5, - h6 { - &:first-of-type { - margin-top: 0; - } - } - } - } + .ui.attached.tabular.menu.previewtabs { + margin-bottom: 15px; - @media only screen and (max-width: 767px) { - .dividing.header .stackable.grid .button { - margin-top: 2px; - margin-bottom: 2px; - } + & + .field .editor-toolbar:not(.fullscreen) a.fa-eye { + display: none; } + } } - &.settings { - &.collaboration { - .collaborator.list { - padding: 0; + &.view { + .choose.page { + margin-top: -5px; + } - > .item { - margin: 0; - line-height: 2em; + > .markdown { + padding: 15px 30px; - &:not(:last-child) { - border-bottom: 1px solid #dddddd; - } - } - } + h1, + h2, + h3, + h4, + h5, + h6 { + &:first-of-type { + margin-top: 0; + } + } + } + } - #repo-collab-form { - #search-user-box { - .results { - left: 7px; - } - } + @media only screen and (max-width: 767px) { + .dividing.header .stackable.grid .button { + margin-top: 2px; + margin-bottom: 2px; + } + } + } - .ui.button { - margin-left: 5px; - margin-top: -3px; - } - } + &.settings { + &.collaboration { + .collaborator.list { + padding: 0; - #repo-collab-team-form { - #search-team-box { - .results { - left: 7px; - } - } + > .item { + margin: 0; + line-height: 2em; - .ui.button { - margin-left: 5px; - margin-top: -3px; - } - } + &:not(:last-child) { + border-bottom: 1px solid #dddddd; + } } + } - &.branches { - .protected-branches { - .selection.dropdown { - width: 300px; - } + #repo-collab-form { + #search-user-box { + .results { + left: 7px; + } + } - .item { - border: 1px solid #eaeaea; - padding: 10px 15px; + .ui.button { + margin-left: 5px; + margin-top: -3px; + } + } - &:not(:last-child) { - border-bottom: 0; - } - } - } + #repo-collab-team-form { + #search-team-box { + .results { + left: 7px; + } + } - .branch-protection { - .help { - margin-left: 26px; - padding-top: 0; - } + .ui.button { + margin-left: 5px; + margin-top: -3px; + } + } + } - .fields { - margin-left: 20px; - display: block; - } + &.branches { + .protected-branches { + .selection.dropdown { + width: 300px; + } - .whitelist { - margin-left: 26px; + .item { + border: 1px solid #eaeaea; + padding: 10px 15px; - .dropdown img { - display: inline-block; - } - } - } + &:not(:last-child) { + border-bottom: 0; + } } + } - &.webhook { - .events { - .column { - padding-bottom: 0; - } + .branch-protection { + .help { + margin-left: 26px; + padding-top: 0; + } - .help { - font-size: 13px; - margin-left: 26px; - padding-top: 0; - } - } + .fields { + margin-left: 20px; + display: block; } - } - .ui.attached.isSigned.isWarning { - border-left: 1px solid #c29393; - border-right: 1px solid #c29393; + .whitelist { + margin-left: 26px; - &.top, - &.message { - border-top: 1px solid #c29393; + .dropdown img { + display: inline-block; + } } + } + } - &.message { - box-shadow: none; - background-color: #fff5f5; - color: #d95c5c; - - .ui.text { - color: #d64444; - } + &.webhook { + .events { + .column { + padding-bottom: 0; } - &:last-child, - &.bottom { - border-bottom: 1px solid #c29393; + .help { + font-size: 13px; + margin-left: 26px; + padding-top: 0; } + } } + } - .ui.attached.isSigned:not(.isWarning) .pull-right { - padding-top: 5px; + .ui.attached.isSigned.isWarning { + border-left: 1px solid #c29393; + border-right: 1px solid #c29393; + + &.top, + &.message { + border-top: 1px solid #c29393; } - .ui.attached.isSigned.isVerified { - border-left: 1px solid #a3c293; - border-right: 1px solid #a3c293; + &.message { + box-shadow: none; + background-color: #fff5f5; + color: #d95c5c; - &.top, - &.message { - border-top: 1px solid #a3c293; - } + .ui.text { + color: #d64444; + } + } + + &:last-child, + &.bottom { + border-bottom: 1px solid #c29393; + } + } + + .ui.attached.isSigned:not(.isWarning) .pull-right { + padding-top: 5px; + } + + .ui.attached.isSigned.isVerified { + border-left: 1px solid #a3c293; + border-right: 1px solid #a3c293; + + &.top, + &.message { + border-top: 1px solid #a3c293; + } - &.message { - box-shadow: none; - background-color: #fcfff5; - color: #6cc644; + &.message { + box-shadow: none; + background-color: #fcfff5; + color: #6cc644; - .pull-right { - color: #000; - } + .pull-right { + color: #000; + } - .ui.text { - color: #21ba45; - } - } + .ui.text { + color: #21ba45; + } + } - &:last-child, - &.bottom { - border-bottom: 1px solid #a3c293; - } + &:last-child, + &.bottom { + border-bottom: 1px solid #a3c293; } + } - .ui.attached.isSigned.isVerifiedUntrusted { - border-left: 1px solid #c2c193; - border-right: 1px solid #c2c193; + .ui.attached.isSigned.isVerifiedUntrusted { + border-left: 1px solid #c2c193; + border-right: 1px solid #c2c193; - &.top, - &.message { - border-top: 1px solid #c2c193; - } + &.top, + &.message { + border-top: 1px solid #c2c193; + } - &.message { - box-shadow: none; - background-color: #fffff5; - color: #fbbd08; + &.message { + box-shadow: none; + background-color: #fffff5; + color: #fbbd08; - .ui.text { - color: #d2ab00; - } - } + .ui.text { + color: #d2ab00; + } + } - &:last-child, - &.bottom { - border-bottom: 1px solid #c2c193; - } + &:last-child, + &.bottom { + border-bottom: 1px solid #c2c193; } + } - .ui.attached.isSigned.isVerifiedUnmatched { - border-left: 1px solid #c2a893; - border-right: 1px solid #c2a893; + .ui.attached.isSigned.isVerifiedUnmatched { + border-left: 1px solid #c2a893; + border-right: 1px solid #c2a893; - &.top, - &.message { - border-top: 1px solid #c2a893; - } + &.top, + &.message { + border-top: 1px solid #c2a893; + } - &.message { - box-shadow: none; - background-color: #fffaf5; - color: #f2711c; + &.message { + box-shadow: none; + background-color: #fffaf5; + color: #f2711c; - .ui.text { - color: #ee5f00; - } - } + .ui.text { + color: #ee5f00; + } + } - &:last-child, - &.bottom { - border-bottom: 1px solid #c2a893; - } + &:last-child, + &.bottom { + border-bottom: 1px solid #c2a893; } + } - .ui.segment.sub-menu { - padding: 7px; - line-height: 0; + .ui.segment.sub-menu { + padding: 7px; + line-height: 0; - .list { - width: 100%; - display: flex; + .list { + width: 100%; + display: flex; - .item { - width: 100%; - border-radius: 3px; + .item { + width: 100%; + border-radius: 3px; - a { - color: black; + a { + color: black; - &:hover { - color: #666666; - } - } + &:hover { + color: #666666; + } + } - span.ui { - color: black; - } + span.ui { + color: black; + } - &.active { - background: rgba(0, 0, 0, .05); - } - } + &.active { + background: rgba(0, 0, 0, .05); } + } } + } - .segment.reactions, - .select-reaction { - &.dropdown .menu { - right: 0 !important; - left: auto !important; - min-width: 15em; + .segment.reactions, + .select-reaction { + &.dropdown .menu { + right: 0 !important; + left: auto !important; + min-width: 15em; - > .header { - margin: .75rem 0 .5rem; - } + > .header { + margin: .75rem 0 .5rem; + } - > .item { - float: left; - padding: .25rem !important; - margin: .25rem; - font-size: 1.5em; - width: 39px; - left: 13px; + > .item { + float: left; + padding: .25rem !important; + margin: .25rem; + font-size: 1.5em; + width: 39px; + left: 13px; - img.emoji { - margin-right: 0; - } - } + img.emoji { + margin-right: 0; } + } } + } - .segment.reactions { - padding: 0; - display: flex; + .segment.reactions { + padding: 0; + display: flex; - .ui.label { - max-height: 40px; - padding: 7px 18px; - display: flex !important; - align-items: center; - border: 0; - border-right: 1px solid; - border-radius: 0; - margin: 0; - font-size: 14px; - font-weight: normal; - border-color: inherit !important; + .ui.label { + max-height: 40px; + padding: 7px 18px; + display: flex !important; + align-items: center; + border: 0; + border-right: 1px solid; + border-radius: 0; + margin: 0; + font-size: 14px; + font-weight: normal; + border-color: inherit !important; - &.disabled { - cursor: default; - opacity: .5; - } - } + &.disabled { + cursor: default; + opacity: .5; + } + } - .ui.label.basic.blue { - background-color: #f1f8ff !important; - border-color: inherit !important; - } + .ui.label.basic.blue { + background-color: #f1f8ff !important; + border-color: inherit !important; + } - .reaction-count { - margin-left: .5rem; - } + .reaction-count { + margin-left: .5rem; + } - .select-reaction { - display: flex; - align-items: center; - padding: 0 14px; + .select-reaction { + display: flex; + align-items: center; + padding: 0 14px; - &:not(.active) a { - display: none; - } + &:not(.active) a { + display: none; + } - .item { - border-radius: 6px; - display: flex; - justify-content: center; - align-items: center; - } + .item { + border-radius: 6px; + display: flex; + justify-content: center; + align-items: center; + } - .item:hover { - background: #4183c4; - } - } + .item:hover { + background: #4183c4; + } + } - &:hover .select-reaction a { - display: block; - } + &:hover .select-reaction a { + display: block; } + } - .ui.fluid.action.input { - .ui.search.action.input { - flex: auto; - } + .ui.fluid.action.input { + .ui.search.action.input { + flex: auto; } + } - .repository-summary { - .segment.language-stats-details, - .segment.repository-summary { - border-top: none; - background: none; - } + .repository-summary { + .segment.language-stats-details, + .segment.repository-summary { + border-top: none; + background: none; + } - .segment.language-stats-details .item { - white-space: nowrap; - } + .segment.language-stats-details .item { + white-space: nowrap; + } - .segment.language-stats { - padding: 0; - height: 11px; - display: flex; - white-space: nowrap; - width: 100%; - border-radius: 0; - user-select: none; + .segment.language-stats { + padding: 0; + height: 11px; + display: flex; + white-space: nowrap; + width: 100%; + border-radius: 0; + user-select: none; - .bar { - white-space: nowrap; - border: 0; - padding: 0; - margin: 0; - height: 100%; - } - } + .bar { + white-space: nowrap; + border: 0; + padding: 0; + margin: 0; + height: 100%; + } } + } - &.diff .committed-by { - padding-top: .5rem; + &.diff .committed-by { + padding-top: .5rem; - .ui.avatar { - width: 20px; - height: 20px; - } + .ui.avatar { + width: 20px; + height: 20px; + } - span { - margin-right: .25rem; + span { + margin-right: .25rem; - svg { - vertical-align: text-bottom; - margin-right: 2px; - } - } + svg { + vertical-align: text-bottom; + margin-right: 2px; + } } + } } // End of .repository &.user-cards { - .list { - padding: 0; - display: flex; - flex-wrap: wrap; - - .item { - list-style: none; - width: 32%; - margin: 10px 10px 10px 0; - padding-bottom: 14px; - float: left; + .list { + padding: 0; + display: flex; + flex-wrap: wrap; - .avatar { - width: 48px; - height: 48px; - float: left; - display: block; - margin-right: 10px; - } + .item { + list-style: none; + width: 32%; + margin: 10px 10px 10px 0; + padding-bottom: 14px; + float: left; + + .avatar { + width: 48px; + height: 48px; + float: left; + display: block; + margin-right: 10px; + } - .name { - margin-top: 0; - margin-bottom: 0; - font-weight: normal; - } + .name { + margin-top: 0; + margin-bottom: 0; + font-weight: normal; + } - .meta { - margin-top: 5px; - } - } + .meta { + margin-top: 5px; + } } + } } #search-repo-box, #search-user-box { - .results { - .result { - .image { - float: left; - margin-right: 8px; - width: 2em; - height: 2em; - } + .results { + .result { + .image { + float: left; + margin-right: 8px; + width: 2em; + height: 2em; + } - .content { - margin: 6px 0; - } - } + .content { + margin: 6px 0; + } } + } } #search-team-box { - .results { - .result { - .content { - margin: 6px 0; - } - } + .results { + .result { + .content { + margin: 6px 0; + } } + } } #issue-filters.hide { - display: none; + display: none; } #issue-actions { - margin-top: -1rem !important; // counteract padding from Semantic + margin-top: -1rem !important; // counteract padding from Semantic } #issue-actions.hide { - display: none; + display: none; } .ui.checkbox.issue-checkbox { - vertical-align: middle; + vertical-align: middle; } .ui.menu .item > img:not(.ui) { - width: auto; + width: auto; } .issue.list { - list-style: none; - - > .item { - padding-top: 15px; - padding-bottom: 10px; - border-bottom: 1px dashed #aaaaaa; - - .title { - color: #444444; - font-size: 15px; - font-weight: bold; - margin: 0 6px; - - &:hover { - color: #000000; - } - } + list-style: none; - .comment { - padding-right: 10px; - color: #666666; + > .item { + padding-top: 15px; + padding-bottom: 10px; + border-bottom: 1px dashed #aaaaaa; + + .title { + color: #444444; + font-size: 15px; + font-weight: bold; + margin: 0 6px; + + &:hover { + color: #000000; + } + } + + .comment { + padding-right: 10px; + color: #666666; + } + + .desc { + padding-top: 5px; + color: #999999; + + .waiting, + .approvals, + .rejects { + padding-left: 5px; + } + + .checklist { + padding-left: 5px; + + .progress-bar { + margin-left: 2px; + width: 80px; + height: 6px; + display: inline-block; + background-color: #eeeeee; + overflow: hidden; + border-radius: 3px; + vertical-align: 2px !important; + + .progress { + background-color: #cccccc; + display: block; + height: 100%; + } } + } - .desc { - padding-top: 5px; - color: #999999; + .conflicting { + padding-left: 5px; + } - .waiting, - .approvals, - .rejects { - padding-left: 5px; - } - - .checklist { - padding-left: 5px; - - .progress-bar { - margin-left: 2px; - width: 80px; - height: 6px; - display: inline-block; - background-color: #eeeeee; - overflow: hidden; - border-radius: 3px; - vertical-align: 2px !important; - - .progress { - background-color: #cccccc; - display: block; - height: 100%; - } - } - } - - .conflicting { - padding-left: 5px; - } + .due-date { + padding-left: 5px; + } - .due-date { - padding-left: 5px; - } - - a.milestone { - margin-left: 5px; - color: #999999 !important; + a.milestone { + margin-left: 5px; + color: #999999 !important; - &:hover { - color: #000000 !important; - } - } + &:hover { + color: #000000 !important; + } + } - a.ref { - margin-left: 8px; - color: #999999 !important; + a.ref { + margin-left: 8px; + color: #999999 !important; - &:hover { - color: #000000 !important; - } + &:hover { + color: #000000 !important; + } - span { - margin-right: -4px; - } - } + span { + margin-right: -4px; + } + } - .assignee { - margin-top: -5px; - margin-right: 5px; - } + .assignee { + margin-top: -5px; + margin-right: 5px; + } - .overdue { - color: red; - } - } + .overdue { + color: red; + } } + } } .page.buttons { - padding-top: 15px; + padding-top: 15px; } .ui.form { - .dropzone { - border: 2px dashed #0087f5; - box-shadow: none !important; - padding: 0; - min-height: 5rem; - border-radius: 4px; + .dropzone { + border: 2px dashed #0087f5; + box-shadow: none !important; + padding: 0; + min-height: 5rem; + border-radius: 4px; - .dz-button { - color: rgba(0, 0, 0, .6); - } + .dz-button { + color: rgba(0, 0, 0, .6); + } - &:hover .dz-button { - color: rgba(0, 0, 0, .8); - } + &:hover .dz-button { + color: rgba(0, 0, 0, .8); + } - .dz-error-message { - top: 140px; - } + .dz-error-message { + top: 140px; } + } } .settings { - .content { - margin-top: 2px; + .content { + margin-top: 2px; - > .header, - .segment { - box-shadow: 0 1px 2px 0 rgba(34, 36, 38, .15); - } + > .header, + .segment { + box-shadow: 0 1px 2px 0 rgba(34, 36, 38, .15); } + } - .list { - > .item { - .green:not(.ui.button) { - color: #21ba45; - } + .list { + > .item { + .green:not(.ui.button) { + color: #21ba45; + } - &:not(:first-child) { - border-top: 1px solid #eaeaea; - padding: 1rem; - margin: 15px -1rem -1rem; - } + &:not(:first-child) { + border-top: 1px solid #eaeaea; + padding: 1rem; + margin: 15px -1rem -1rem; + } - > .svg { - display: table-cell; - } + > .svg { + display: table-cell; + } - > .svg + .content { - display: table-cell; - padding: 0 0 0 .5em; - vertical-align: top; - } + > .svg + .content { + display: table-cell; + padding: 0 0 0 .5em; + vertical-align: top; + } - .info { - margin-top: 10px; + .info { + margin-top: 10px; - .tab.segment { - border: 0; - padding: 10px 0 0; - } - } + .tab.segment { + border: 0; + padding: 10px 0 0; } + } + } - &.key { - .meta { - padding-top: 5px; - color: #666666; - } - } + &.key { + .meta { + padding-top: 5px; + color: #666666; + } + } - &.email { - > .item:not(:first-child) { - min-height: 60px; - } - } + &.email { + > .item:not(:first-child) { + min-height: 60px; + } + } - &.collaborator { - > .item { - padding: 0; - } - } + &.collaborator { + > .item { + padding: 0; + } } + } } .ui.vertical.menu { - .header.item { - font-size: 1.1em; - background: #f0f0f0; - } + .header.item { + font-size: 1.1em; + background: #f0f0f0; + } } .edit-label.modal, .new-label.segment { - .form { - .column { - padding-right: 0; - } + .form { + .column { + padding-right: 0; + } - .buttons { - margin-left: auto; - padding-top: 15px; - } + .buttons { + margin-left: auto; + padding-top: 15px; + } - .color.picker.column { - width: auto; + .color.picker.column { + width: auto; - .color-picker { - height: 35px; - width: auto; - padding-left: 30px; - } - } + .color-picker { + height: 35px; + width: auto; + padding-left: 30px; + } + } - .minicolors-swatch.minicolors-sprite { - top: 10px; - left: 10px; - width: 15px; - height: 15px; - } + .minicolors-swatch.minicolors-sprite { + top: 10px; + left: 10px; + width: 15px; + height: 15px; + } - .precolors { - padding-left: 0; - padding-right: 0; - margin: 3px 10px auto; - width: 120px; + .precolors { + padding-left: 0; + padding-right: 0; + margin: 3px 10px auto; + width: 120px; - .color { - float: left; - width: 15px; - height: 15px; - } - } + .color { + float: left; + width: 15px; + height: 15px; + } } + } } #avatar-arrow { - &:before, - &:after { - right: 100%; - top: 20px; - border: solid transparent; - content: " "; - height: 0; - width: 0; - position: absolute; - pointer-events: none; - } - - &:before { - border-right-color: #d3d3d4; - border-width: 9px; - margin-top: -9px; - } - - &:after { - border-right-color: #f7f7f7; - border-width: 8px; - margin-top: -8px; - } + &:before, + &:after { + right: 100%; + top: 20px; + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; + } + + &:before { + border-right-color: #d3d3d4; + border-width: 9px; + margin-top: -9px; + } + + &:after { + border-right-color: #f7f7f7; + border-width: 8px; + margin-top: -8px; + } } #transfer-repo-modal, @@ -2824,367 +2824,367 @@ #delete-wiki-modal, #convert-fork-repo-modal, #convert-mirror-repo-modal { - .ui.message { - width: 100% !important; - } + .ui.message { + width: 100% !important; + } } // generate .tab-size-{i} from 1 to 16 .generate-tab-size(16); .generate-tab-size(@n, @i: 1) when (@i =< @n) { - .tab-size-@{i} { - tab-size: @i !important; - } + .tab-size-@{i} { + tab-size: @i !important; + } - .generate-tab-size(@n, (@i + 1)); + .generate-tab-size(@n, (@i + 1)); } .stats-table { - display: table; - width: 100%; + display: table; + width: 100%; - .table-cell { - display: table-cell; + .table-cell { + display: table-cell; - &.tiny { - height: .5em; - } + &.tiny { + height: .5em; } + } } tbody.commit-list { - vertical-align: baseline; + vertical-align: baseline; } .message-wrapper { - overflow: hidden; - text-overflow: ellipsis; - max-width: calc(100% - 50px); - display: inline-block; - vertical-align: middle; + overflow: hidden; + text-overflow: ellipsis; + max-width: calc(100% - 50px); + display: inline-block; + vertical-align: middle; } @media only screen and (max-width: 767.98px) { - tr.commit-list { - width: 100%; - } - th .message-wrapper { - display: block; - max-width: calc(100vw - 70px); - } + tr.commit-list { + width: 100%; + } + th .message-wrapper { + display: block; + max-width: calc(100vw - 70px); + } } @media only screen and (min-width: 768px) and (max-width: 991.98px) { - tr.commit-list { - width: 723px; - } - th .message-wrapper { - max-width: 280px; - } + tr.commit-list { + width: 723px; + } + th .message-wrapper { + max-width: 280px; + } } @media only screen and (min-width: 992px) and (max-width: 1199.98px) { - tr.commit-list { - width: 933px; - } - th .message-wrapper { - max-width: 490px; - } + tr.commit-list { + width: 933px; + } + th .message-wrapper { + max-width: 490px; + } } @media only screen and (min-width: 1200px) { - tr.commit-list { - width: 1127px; - } - th .message-wrapper { - max-width: 680px; - } + tr.commit-list { + width: 1127px; + } + th .message-wrapper { + max-width: 680px; + } } .commit-list .commit-summary a { - text-decoration: underline; - text-decoration-style: dashed; + text-decoration: underline; + text-decoration-style: dashed; - &:hover { - text-decoration-style: solid; - } + &:hover { + text-decoration-style: solid; + } - &.default-link { - text-decoration: none; + &.default-link { + text-decoration: none; - &:hover { - text-decoration: underline; - text-decoration-style: solid; - } + &:hover { + text-decoration: underline; + text-decoration-style: solid; } + } } .commit-list .commit-status-link { - display: inline-block; - vertical-align: middle; + display: inline-block; + vertical-align: middle; } .commit-body { - white-space: pre-wrap; + white-space: pre-wrap; } .git-notes { - &.top { - text-align: left; - } + &.top { + text-align: left; + } - .commit-body { - margin: 0; - } + .commit-body { + margin: 0; + } } @media only screen and (max-width: 767px) { - .ui.stackable.menu { - &.mobile--margin-between-items > .item { - margin-top: 5px; - margin-bottom: 5px; - } + .ui.stackable.menu { + &.mobile--margin-between-items > .item { + margin-top: 5px; + margin-bottom: 5px; + } - &.mobile--no-negative-margins { - margin-left: 0; - margin-right: 0; - } + &.mobile--no-negative-margins { + margin-left: 0; + margin-right: 0; } + } } #topic_edit { - margin-top: 5px; + margin-top: 5px; } #repo-topics { - margin-top: 5px; + margin-top: 5px; } .repo-topic { - cursor: pointer; + cursor: pointer; } #new-dependency-drop-list { - &.ui.selection.dropdown { - min-width: 0; - width: 100%; - border-radius: 4px 0 0 4px; - border-right: 0; - white-space: nowrap; - } + &.ui.selection.dropdown { + min-width: 0; + width: 100%; + border-radius: 4px 0 0 4px; + border-right: 0; + white-space: nowrap; + } - .text { - width: 100%; - overflow: hidden; - } + .text { + width: 100%; + overflow: hidden; + } } #manage_topic { - font-size: 12px; + font-size: 12px; } .label + #manage_topic { - margin-left: 5px; + margin-left: 5px; } .ui.small.label.topic { - margin-bottom: 4px; + margin-bottom: 4px; } .repo-header { - display: flex; - align-items: center; - justify-content: space-between; - flex-wrap: wrap; + display: flex; + align-items: center; + justify-content: space-between; + flex-wrap: wrap; } .repo-header .repo-buttons { - display: flex; - align-items: center; + display: flex; + align-items: center; } .repo-buttons .disabled-repo-button .label { - opacity: .5; + opacity: .5; } .repo-buttons .disabled-repo-button a.button { - opacity: .5; - cursor: not-allowed; + opacity: .5; + cursor: not-allowed; } .repo-buttons .disabled-repo-button a.button:hover { - background: none !important; - color: rgba(0, 0, 0, .6) !important; - box-shadow: 0 0 0 1px rgba(34, 36, 38, .15) inset !important; + background: none !important; + color: rgba(0, 0, 0, .6) !important; + box-shadow: 0 0 0 1px rgba(34, 36, 38, .15) inset !important; } .repo-buttons .ui.labeled.button > .label { - border-left: 0 !important; - margin: 0 !important; + border-left: 0 !important; + margin: 0 !important; } .tag-code { - height: 28px; + height: 28px; } .tag-code, .tag-code td { - background-color: #f0f9ff; - border-color: #f1f8ff !important; - vertical-align: middle; + background-color: #f0f9ff; + border-color: #f1f8ff !important; + vertical-align: middle; } .board { - display: flex; - flex-direction: row; - flex-wrap: nowrap; - overflow-x: auto; - margin: 0 .5em; + display: flex; + flex-direction: row; + flex-wrap: nowrap; + overflow-x: auto; + margin: 0 .5em; } .board-column { - background-color: rgba(0, 0, 0, .05) !important; - border: 1px solid rgba(34, 36, 38, .15) !important; - margin: 0 .5rem !important; - padding: .5rem !important; - width: 320px; - height: 60vh; - overflow-y: scroll; - flex: 0 0 auto; - overflow: visible; - display: flex; - flex-direction: column; + background-color: rgba(0, 0, 0, .05) !important; + border: 1px solid rgba(34, 36, 38, .15) !important; + margin: 0 .5rem !important; + padding: .5rem !important; + width: 320px; + height: 60vh; + overflow-y: scroll; + flex: 0 0 auto; + overflow: visible; + display: flex; + flex-direction: column; } .board-column-header { - display: flex; - justify-content: space-between; + display: flex; + justify-content: space-between; } .board-label { - background: none !important; - line-height: 1.25 !important; + background: none !important; + line-height: 1.25 !important; } .board-column > .cards { - flex: 1; - display: flex; - flex-direction: column; - margin: 0 !important; - padding: 0 !important; + flex: 1; + display: flex; + flex-direction: column; + margin: 0 !important; + padding: 0 !important; - .card .meta > a.milestone { - color: #999999; - } + .card .meta > a.milestone { + color: #999999; + } } .board-column > .divider { - margin: 5px 0; + margin: 5px 0; } .board-column:first-child { - margin-left: auto !important; + margin-left: auto !important; } .board-column:last-child { - margin-right: auto !important; + margin-right: auto !important; } .board-card { - margin: 3px !important; - width: auto !important; - background-color: #fff; - border-radius: 5px; - cursor: pointer; + margin: 3px !important; + width: auto !important; + background-color: #fff; + border-radius: 5px; + cursor: pointer; } .board-card .header { - font-size: 1.1em !important; + font-size: 1.1em !important; } .board-card .content { - padding: 5px 8px !important; + padding: 5px 8px !important; } .board-card .extra.content { - padding: 5px 8px !important; + padding: 5px 8px !important; } td.blob-excerpt { - background-color: #fafafa; + background-color: #fafafa; } .issue-keyword { - border-bottom: 1px dotted #959da5; - display: inline-block; + border-bottom: 1px dotted #959da5; + display: inline-block; } .file-header { - display: flex; - justify-content: space-between; - align-items: center; - padding: 8px 12px !important; + display: flex; + justify-content: space-between; + align-items: center; + padding: 8px 12px !important; } .file-info { - display: flex; - align-items: center; + display: flex; + align-items: center; } .file-info-entry + .file-info-entry { - border-left: 1px solid currentColor; - margin-left: 8px; - padding-left: 8px; + border-left: 1px solid currentColor; + margin-left: 8px; + padding-left: 8px; } .title_wip_desc { - margin-top: 1em; + margin-top: 1em; } .diff-file-box[data-folded="true"] .diff-file-body { - display: none; + display: none; } .diff-file-box[data-folded="true"] .diff-file-header { - border-radius: .28571429rem !important; + border-radius: .28571429rem !important; } /* prevent page shaking on language bar click */ .repository.file .repository-summary { - height: 48px; - overflow: hidden; + height: 48px; + overflow: hidden; } .ui.form .right .ui.button { - margin-left: .25em; - margin-right: 0; + margin-left: .25em; + margin-right: 0; } .removed-code { - background-color: #fdb8c0; + background-color: #fdb8c0; } .added-code { - background-color: #acf2bd; + background-color: #acf2bd; } .repository .ui.menu.new-menu { - background: none !important; + background: none !important; - @media only screen and (max-width: 1200px) { - &:after { - background: none !important; - } + @media only screen and (max-width: 1200px) { + &:after { + background: none !important; } + } } .select-project .item { - color: inherit; - display: inline-flex; - align-items: center; + color: inherit; + display: inline-flex; + align-items: center; } .select-project .item .svg { - margin-right: .5rem; + margin-right: .5rem; } diff --git a/web_src/less/_review.less b/web_src/less/_review.less index 1c84d61f45da5..73506f5f0bf17 100644 --- a/web_src/less/_review.less +++ b/web_src/less/_review.less @@ -1,193 +1,193 @@ .ui.button.add-code-comment { - font-size: 14px; - height: 16px; - line-height: 16px !important; - padding: 0; - position: relative; - width: 16px; - z-index: 5; - float: left; - margin: 2px -10px 2px -20px; - opacity: 0; - transition: transform .1s ease-in-out; - transform: scale(1, 1); - - &:hover { - transform: scale(1.2, 1.2); - } + font-size: 14px; + height: 16px; + line-height: 16px !important; + padding: 0; + position: relative; + width: 16px; + z-index: 5; + float: left; + margin: 2px -10px 2px -20px; + opacity: 0; + transition: transform .1s ease-in-out; + transform: scale(1, 1); + + &:hover { + transform: scale(1.2, 1.2); + } } .add-comment-left.add-comment-right .ui.attached.header { - border: 1px solid #d4d4d5; - margin-top: .5em; - - &:not(.top) { - margin-bottom: .5em; - } - - .show-outdated, - .hide-outdated { - display: block; - margin-left: auto; - } + border: 1px solid #d4d4d5; + margin-top: .5em; + + &:not(.top) { + margin-bottom: .5em; + } + + .show-outdated, + .hide-outdated { + display: block; + margin-left: auto; + } } .focus-lines-new .ui.button.add-code-comment.add-code-comment-right, .focus-lines-old .ui.button.add-code-comment.add-code-comment-left { - opacity: 1; + opacity: 1; } .comment-code-cloud { - padding: 4px; - position: relative; - border: 1px solid #f1f1f1; - margin: 13px 10px 5px auto; - - &:before { - content: " "; - width: 0; - height: 0; - border-left: 13px solid transparent; - border-right: 13px solid transparent; - border-bottom: 13px solid #f1f1f1; - left: 20px; - position: absolute; - top: -13px; - } + padding: 4px; + position: relative; + border: 1px solid #f1f1f1; + margin: 13px 10px 5px auto; - .attached { - &.tab { - border: 0; - padding: 0; - margin: 0; - } + &:before { + content: " "; + width: 0; + height: 0; + border-left: 13px solid transparent; + border-right: 13px solid transparent; + border-bottom: 13px solid #f1f1f1; + left: 20px; + position: absolute; + top: -13px; + } - &.header { - padding: .1rem 1rem; - - .text { - margin: 0; - } - } + .attached { + &.tab { + border: 0; + padding: 0; + margin: 0; } - .right.menu.options .item { - padding: .85714286em .442857em; - cursor: pointer; - } + &.header { + padding: .1rem 1rem; - .ui.form textarea { - border: 0; + .text { + margin: 0; + } } + } - .ui.active.tab { - padding: .5em; + .right.menu.options .item { + padding: .85714286em .442857em; + cursor: pointer; + } - &.markdown { - padding: 1em; - min-height: 168px; - } - } + .ui.form textarea { + border: 0; + } - .ui.tabular.menu { - margin: .5em; - } + .ui.active.tab { + padding: .5em; - .comment-list { - padding-bottom: 10px; + &.markdown { + padding: 1em; + min-height: 168px; } + } + + .ui.tabular.menu { + margin: .5em; + } - .footer { - border-top: 1px solid #f1f1f1; - padding: 10px 0; - - .markdown-info { - display: inline-block; - margin: 5px 0; - font-size: 12px; - color: rgba(0, 0, 0, .6); - } - - .ui.right.floated { - padding-top: 6px; - } - - &:after { - clear: both; - content: ""; - display: block; - } + .comment-list { + padding-bottom: 10px; + } + + .footer { + border-top: 1px solid #f1f1f1; + padding: 10px 0; + + .markdown-info { + display: inline-block; + margin: 5px 0; + font-size: 12px; + color: rgba(0, 0, 0, .6); } - button.comment-form-reply { - margin: .5em .5em .5em 4.5em; + .ui.right.floated { + padding-top: 6px; } - form.comment-form-reply { - margin: 0 0 0 1em; + &:after { + clear: both; + content: ""; + display: block; } + } + + button.comment-form-reply { + margin: .5em .5em .5em 4.5em; + } + + form.comment-form-reply { + margin: 0 0 0 1em; + } } .file-comment { - font: 12px @monospaced-fonts, monospace; - color: rgba(0, 0, 0, .87); + font: 12px @monospaced-fonts, monospace; + color: rgba(0, 0, 0, .87); } a.fold-file { - margin-right: 10px; - color: inherit; + margin-right: 10px; + color: inherit; } a.blob-excerpt { - color: #575a68; - height: 28px; - display: flex; - justify-content: center; - align-items: center; - width: 100%; - background: #daecfe; + color: #575a68; + height: 28px; + display: flex; + justify-content: center; + align-items: center; + width: 100%; + background: #daecfe; } a.blob-excerpt:hover { - background: #428bca; - color: #fff; + background: #428bca; + color: #fff; } .btn-review > .dropdown.icon { - width: auto; - font-size: .85714286em; - margin: 0 0 0 1em; + width: auto; + font-size: .85714286em; + margin: 0 0 0 1em; } @media only screen and (max-width: 768px) { - #review-box > .menu { - > .ui.segment { - width: 94vw; - } - .editor-toolbar { - overflow-x: auto; - } + #review-box > .menu { + > .ui.segment { + width: 94vw; } - - #review-box .CodeMirror-scroll { - max-width: calc(100vw - 70px); + .editor-toolbar { + overflow-x: auto; } + } + + #review-box .CodeMirror-scroll { + max-width: calc(100vw - 70px); + } } @media only screen and (min-width: 768px) and (max-width: 992px) { - #review-box .CodeMirror-scroll { - max-width: 700px; - } + #review-box .CodeMirror-scroll { + max-width: 700px; + } } @media only screen and (min-width: 992px) and (max-width: 1200px) { - #review-box .CodeMirror-scroll { - max-width: 800px; - } + #review-box .CodeMirror-scroll { + max-width: 800px; + } } @media only screen and (min-width: 1200px) { - #review-box .CodeMirror-scroll { - max-width: 900px; - } + #review-box .CodeMirror-scroll { + max-width: 900px; + } } diff --git a/web_src/less/_svg.less b/web_src/less/_svg.less index b17b9a8b329e0..696d0558e0833 100644 --- a/web_src/less/_svg.less +++ b/web_src/less/_svg.less @@ -1,9 +1,9 @@ .svg { - display: inline-block; - vertical-align: text-top; - fill: currentColor; + display: inline-block; + vertical-align: text-top; + fill: currentColor; - .middle & { - vertical-align: middle; - } + .middle & { + vertical-align: middle; + } } diff --git a/web_src/less/_tribute.less b/web_src/less/_tribute.less index 5e91e001745c5..adac4d28b2942 100644 --- a/web_src/less/_tribute.less +++ b/web_src/less/_tribute.less @@ -1,42 +1,42 @@ @import "~tributejs/dist/tribute.css"; .tribute-container { - box-shadow: 0 .25rem .5rem rgba(0, 0, 0, .25); - border-radius: .25rem; + box-shadow: 0 .25rem .5rem rgba(0, 0, 0, .25); + border-radius: .25rem; } .tribute-container ul { - margin-top: 0 !important; - background: #ffffff !important; + margin-top: 0 !important; + background: #ffffff !important; } .tribute-container li { - padding: 3px .5rem !important; + padding: 3px .5rem !important; } .tribute-container li span.fullname { - font-weight: normal; - font-size: .8rem; - margin-left: 3px; + font-weight: normal; + font-size: .8rem; + margin-left: 3px; } .tribute-container li.highlight, .tribute-container li:hover { - background: #2185d0 !important; - color: #ffffff !important; + background: #2185d0 !important; + color: #ffffff !important; } .tribute-item { - display: flex; - align-items: center; + display: flex; + align-items: center; } .tribute-item .emoji, .tribute-item img[src*="/avatar/"] { - margin-right: .5rem; + margin-right: .5rem; } .tribute-container img { - width: 1.5rem !important; - height: 1.5rem !important; + width: 1.5rem !important; + height: 1.5rem !important; } diff --git a/web_src/less/_user.less b/web_src/less/_user.less index ae44df9cc75fd..0b983a382c194 100644 --- a/web_src/less/_user.less +++ b/web_src/less/_user.less @@ -1,163 +1,163 @@ .user { - &:not(.icon) { - padding-top: 15px; - } - - &.profile { - .ui.card { - .header, - .username { - display: block; + &:not(.icon) { + padding-top: 15px; + } + + &.profile { + .ui.card { + .header, + .username { + display: block; + } + + .header { + font-weight: 700; + font-size: 1.3rem; + margin-top: -.2rem; + line-height: 1.3rem; + } + + .extra.content { + padding: 0; + + ul { + margin: 0; + padding: 0; + + li { + padding: 10px; + list-style: none; + + &:not(:last-child) { + border-bottom: 1px solid #eaeaea; } - .header { - font-weight: 700; - font-size: 1.3rem; - margin-top: -.2rem; - line-height: 1.3rem; + .svg, + .fa { + margin-left: 1px; + margin-right: 5px; } - .extra.content { - padding: 0; - - ul { - margin: 0; - padding: 0; - - li { - padding: 10px; - list-style: none; - - &:not(:last-child) { - border-bottom: 1px solid #eaeaea; - } - - .svg, - .fa { - margin-left: 1px; - margin-right: 5px; - } - - &.follow { - .ui.button { - width: 100%; - } - } - } - } - } - - #profile-avatar { - img { - width: 100%; - } - @media only screen and (max-width: 768px) { - height: 250px; - overflow: hidden; - - img { - max-height: 768px; - max-width: 768px; - } - } - } - - @media only screen and (max-width: 768px) { + &.follow { + .ui.button { width: 100%; + } } + } } + } - .ui.repository.list { - margin-top: 25px; - } - - #loading-heatmap { - margin-bottom: 1em; + #profile-avatar { + img { + width: 100%; } - .ui.secondary.stackable.pointing.menu { - flex-wrap: wrap; + @media only screen and (max-width: 768px) { + height: 250px; + overflow: hidden; + + img { + max-height: 768px; + max-width: 768px; + } } - } + } - &.followers { - .header.name { - font-size: 20px; - line-height: 24px; - vertical-align: middle; - } + @media only screen and (max-width: 768px) { + width: 100%; + } + } - .follow { - .ui.button { - padding: 8px 15px; - } - } + .ui.repository.list { + margin-top: 25px; } - &.notification { - .svg { - float: left; - font-size: 2em; + #loading-heatmap { + margin-bottom: 1em; + } + .ui.secondary.stackable.pointing.menu { + flex-wrap: wrap; + } + } - &.green { - color: #21ba45; - } + &.followers { + .header.name { + font-size: 20px; + line-height: 24px; + vertical-align: middle; + } - &.red { - color: #d01919; - } + .follow { + .ui.button { + padding: 8px 15px; + } + } + } - &.purple { - color: #a333c8; - } + &.notification { + .svg { + float: left; + font-size: 2em; - &.blue { - color: #2185d0; - } - } + &.green { + color: #21ba45; + } - .content { - float: left; - margin-left: 7px; - } + &.red { + color: #d01919; + } - table { - form { - display: inline-block; - } + &.purple { + color: #a333c8; + } - button { - padding: 3px 3px 3px 5px; - } + &.blue { + color: #2185d0; + } + } - tr { - cursor: pointer; - } - } + .content { + float: left; + margin-left: 7px; } - &.link-account:not(.icon) { - padding-top: 15px; - padding-bottom: 5px; + table { + form { + display: inline-block; + } + + button { + padding: 3px 3px 3px 5px; + } + + tr { + cursor: pointer; + } } + } - &.settings { - .iconFloat { - float: left; - } + &.link-account:not(.icon) { + padding-top: 15px; + padding-bottom: 5px; + } + + &.settings { + .iconFloat { + float: left; } + } } .user-orgs { + display: flex; + flex-flow: row wrap; + padding: 0; + margin: -3px !important; + + li { display: flex; - flex-flow: row wrap; - padding: 0; - margin: -3px !important; - - li { - display: flex; - border-bottom: 0 !important; - padding: 3px !important; - width: 20%; - max-width: 60px; - } + border-bottom: 0 !important; + padding: 3px !important; + width: 20%; + max-width: 60px; + } } diff --git a/web_src/less/features/animations.less b/web_src/less/features/animations.less index 65ff1fef3f825..8ee923a97dcb7 100644 --- a/web_src/less/features/animations.less +++ b/web_src/less/features/animations.less @@ -1,34 +1,34 @@ @keyframes isloadingspin { - 0% { transform: translate(-50%, -50%) rotate(0deg); } - 100% { transform: translate(-50%, -50%) rotate(360deg); } + 0% { transform: translate(-50%, -50%) rotate(0deg); } + 100% { transform: translate(-50%, -50%) rotate(360deg); } } .is-loading { - background: transparent !important; - color: transparent !important; - border: transparent !important; - pointer-events: none !important; - position: relative !important; - overflow: hidden !important; + background: transparent !important; + color: transparent !important; + border: transparent !important; + pointer-events: none !important; + position: relative !important; + overflow: hidden !important; } .is-loading:after { - content: ""; - position: absolute; - display: block; - width: 4rem; - height: 4rem; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); - animation: isloadingspin 500ms infinite linear; - border-width: 4px; - border-style: solid; - border-color: #ececec #ececec #666 #666; - border-radius: 100%; + content: ""; + position: absolute; + display: block; + width: 4rem; + height: 4rem; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + animation: isloadingspin 500ms infinite linear; + border-width: 4px; + border-style: solid; + border-color: #ececec #ececec #666 #666; + border-radius: 100%; } .markdown pre.is-loading, .editor-loading.is-loading { - height: 12rem; + height: 12rem; } diff --git a/web_src/less/features/gitgraph.less b/web_src/less/features/gitgraph.less index 8a9c4239a7987..da81b13352d48 100644 --- a/web_src/less/features/gitgraph.less +++ b/web_src/less/features/gitgraph.less @@ -1,256 +1,256 @@ #git-graph-container { - float: left; - display: block; - overflow-x: auto; - width: 100%; + float: left; + display: block; + overflow-x: auto; + width: 100%; + + .color-buttons { + margin-right: 0; + } + + .ui.header.dividing { + padding-bottom: 10px; + } + + li { + list-style-type: none; + height: 20px; + line-height: 20px; + white-space: nowrap; + + .node-relation { + font-family: "Bitstream Vera Sans Mono", "Courier", monospace; + } - .color-buttons { - margin-right: 0; + .author { + color: #666666; } - .ui.header.dividing { - padding-bottom: 10px; + .time { + color: #999999; + font-size: 80%; } - li { - list-style-type: none; - height: 20px; - line-height: 20px; - white-space: nowrap; - - .node-relation { - font-family: "Bitstream Vera Sans Mono", "Courier", monospace; - } - - .author { - color: #666666; - } - - .time { - color: #999999; - font-size: 80%; - } - - a { - color: #000000; - } - - a:hover { - text-decoration: underline; - } - - a em { - color: #bb0000; - border-bottom: 1px dotted #bbbbbb; - text-decoration: none; - font-style: normal; - } + a { + color: #000000; } - #rel-container { - max-width: 30%; - overflow-x: auto; - float: left; + a:hover { + text-decoration: underline; } - #rev-container { - width: 100%; + a em { + color: #bb0000; + border-bottom: 1px dotted #bbbbbb; + text-decoration: none; + font-style: normal; } + } - #rev-list { - margin: 0; - padding: 0 5px; - min-width: 95%; + #rel-container { + max-width: 30%; + overflow-x: auto; + float: left; + } - li.highlight, - li.hover { - background-color: rgba(0, 0, 0, .05); - } + #rev-container { + width: 100%; + } + + #rev-list { + margin: 0; + padding: 0 5px; + min-width: 95%; - li.highlight.hover { - background-color: rgba(0, 0, 0, .1); - } + li.highlight, + li.hover { + background-color: rgba(0, 0, 0, .05); } - #graph-raw-list { - margin: 0; + li.highlight.hover { + background-color: rgba(0, 0, 0, .1); } + } - &.monochrome #rel-container { - .flow-group { - stroke: grey; - fill: grey; - } + #graph-raw-list { + margin: 0; + } - .flow-group.highlight { - stroke: black; - fill: black; - } + &.monochrome #rel-container { + .flow-group { + stroke: grey; + fill: grey; + } + + .flow-group.highlight { + stroke: black; + fill: black; + } + } + + &:not(.monochrome) #rel-container { + .flow-group { + &.flow-color-16-1 { + stroke: #499a37; + fill: #499a37; + } + + &.flow-color-16-2 { + stroke: hsl(356, 58%, 54%); + fill: #ce4751; + } + + &.flow-color-16-3 { + stroke: #8f9121; + fill: #8f9121; + } + + &.flow-color-16-4 { + stroke: #ac32a6; + fill: #ac32a6; + } + + &.flow-color-16-5 { + stroke: #3d27aa; + fill: #3d27aa; + } + + &.flow-color-16-6 { + stroke: #c67d28; + fill: #c67d28; + } + + &.flow-color-16-7 { + stroke: #4db392; + fill: #4db392; + } + + &.flow-color-16-8 { + stroke: #aa4d30; + fill: #aa4d30; + } + + &.flow-color-16-9 { + stroke: #2a6f84; + fill: #2a6f84; + } + + &.flow-color-16-10 { + stroke: #c45327; + fill: #c45327; + } + + &.flow-color-16-11 { + stroke: #3d965c; + fill: #3d965c; + } + + &.flow-color-16-12 { + stroke: #792a93; + fill: #792a93; + } + + &.flow-color-16-13 { + stroke: #439d73; + fill: #439d73; + } + + &.flow-color-16-14 { + stroke: #103aad; + fill: #103aad; + } + + &.flow-color-16-15 { + stroke: #982e85; + fill: #982e85; + } + + &.flow-color-16-0 { + stroke: #7db233; + fill: #7db233; + } } - &:not(.monochrome) #rel-container { - .flow-group { - &.flow-color-16-1 { - stroke: #499a37; - fill: #499a37; - } - - &.flow-color-16-2 { - stroke: hsl(356, 58%, 54%); - fill: #ce4751; - } - - &.flow-color-16-3 { - stroke: #8f9121; - fill: #8f9121; - } - - &.flow-color-16-4 { - stroke: #ac32a6; - fill: #ac32a6; - } - - &.flow-color-16-5 { - stroke: #3d27aa; - fill: #3d27aa; - } - - &.flow-color-16-6 { - stroke: #c67d28; - fill: #c67d28; - } - - &.flow-color-16-7 { - stroke: #4db392; - fill: #4db392; - } - - &.flow-color-16-8 { - stroke: #aa4d30; - fill: #aa4d30; - } - - &.flow-color-16-9 { - stroke: #2a6f84; - fill: #2a6f84; - } - - &.flow-color-16-10 { - stroke: #c45327; - fill: #c45327; - } - - &.flow-color-16-11 { - stroke: #3d965c; - fill: #3d965c; - } - - &.flow-color-16-12 { - stroke: #792a93; - fill: #792a93; - } - - &.flow-color-16-13 { - stroke: #439d73; - fill: #439d73; - } - - &.flow-color-16-14 { - stroke: #103aad; - fill: #103aad; - } - - &.flow-color-16-15 { - stroke: #982e85; - fill: #982e85; - } - - &.flow-color-16-0 { - stroke: #7db233; - fill: #7db233; - } - } - - .flow-group.highlight { - &.flow-color-16-1 { - stroke: #5ac144; - fill: #5ac144; - } - - &.flow-color-16-2 { - stroke: #ed5a8b; - fill: #ed5a8b; - } - - &.flow-color-16-3 { - stroke: #ced049; - fill: #ced048; - } - - &.flow-color-16-4 { - stroke: #db61d7; - fill: #db62d6; - } - - &.flow-color-16-5 { - stroke: #4e33d1; - fill: #4f35d1; - } - - &.flow-color-16-6 { - stroke: #e6a151; - fill: #e6a151; - } - - &.flow-color-16-7 { - stroke: #44daaa; - fill: #44daaa; - } - - &.flow-color-16-8 { - stroke: #dd7a5c; - fill: #dd7a5c; - } - - &.flow-color-16-9 { - stroke: #38859c; - fill: #38859c; - } - - &.flow-color-16-10 { - stroke: #d95520; - fill: #d95520; - } - - &.flow-color-16-11 { - stroke: #42ae68; - fill: #42ae68; - } - - &.flow-color-16-12 { - stroke: #9126b5; - fill: #9126b5; - } - - &.flow-color-16-13 { - stroke: #4ab080; - fill: #4ab080; - } - - &.flow-color-16-14 { - stroke: #284fb8; - fill: #284fb8; - } - - &.flow-color-16-15 { - stroke: #971c80; - fill: #971c80; - } - - &.flow-color-16-0 { - stroke: #87ca28; - fill: #87ca28; - } - } + .flow-group.highlight { + &.flow-color-16-1 { + stroke: #5ac144; + fill: #5ac144; + } + + &.flow-color-16-2 { + stroke: #ed5a8b; + fill: #ed5a8b; + } + + &.flow-color-16-3 { + stroke: #ced049; + fill: #ced048; + } + + &.flow-color-16-4 { + stroke: #db61d7; + fill: #db62d6; + } + + &.flow-color-16-5 { + stroke: #4e33d1; + fill: #4f35d1; + } + + &.flow-color-16-6 { + stroke: #e6a151; + fill: #e6a151; + } + + &.flow-color-16-7 { + stroke: #44daaa; + fill: #44daaa; + } + + &.flow-color-16-8 { + stroke: #dd7a5c; + fill: #dd7a5c; + } + + &.flow-color-16-9 { + stroke: #38859c; + fill: #38859c; + } + + &.flow-color-16-10 { + stroke: #d95520; + fill: #d95520; + } + + &.flow-color-16-11 { + stroke: #42ae68; + fill: #42ae68; + } + + &.flow-color-16-12 { + stroke: #9126b5; + fill: #9126b5; + } + + &.flow-color-16-13 { + stroke: #4ab080; + fill: #4ab080; + } + + &.flow-color-16-14 { + stroke: #284fb8; + fill: #284fb8; + } + + &.flow-color-16-15 { + stroke: #971c80; + fill: #971c80; + } + + &.flow-color-16-0 { + stroke: #87ca28; + fill: #87ca28; + } } + } } diff --git a/web_src/less/markdown/mermaid.less b/web_src/less/markdown/mermaid.less index 2b7951eec9bf9..4fc1258f03a2b 100644 --- a/web_src/less/markdown/mermaid.less +++ b/web_src/less/markdown/mermaid.less @@ -1,12 +1,12 @@ .mermaid-chart { - display: flex; - justify-content: center; - align-items: center; - padding: 1rem; - margin: 1rem 0; + display: flex; + justify-content: center; + align-items: center; + padding: 1rem; + margin: 1rem 0; } /* mermaid's errorRenderer seems to unavoidably spew stuff into , hide it */ body > div[id*="mermaid-"] { - display: none !important; + display: none !important; } diff --git a/web_src/less/themes/theme-arc-green.less b/web_src/less/themes/theme-arc-green.less index bf7d2e1160655..0367e124360e2 100644 --- a/web_src/less/themes/theme-arc-green.less +++ b/web_src/less/themes/theme-arc-green.less @@ -1,534 +1,534 @@ /* Background */ .chroma { - background-color: #2a2e3a; + background-color: #2a2e3a; } /* LineTableTD */ .chroma .lntd { - vertical-align: top; - padding: 0; - margin: 0; - border: 0; + vertical-align: top; + padding: 0; + margin: 0; + border: 0; } /* LineTable */ .chroma .lntable { - border-spacing: 0; - padding: 0; - margin: 0; - border: 0; - width: auto; - overflow: auto; - display: block; + border-spacing: 0; + padding: 0; + margin: 0; + border: 0; + width: auto; + overflow: auto; + display: block; } /* LineHighlight */ .chroma .hl { - display: block; - width: 100%; - background-color: #3f424d; + display: block; + width: 100%; + background-color: #3f424d; } /* LineNumbersTable */ .chroma .lnt { - margin-right: .4em; - padding: 0 .4em; - color: #7f7f7f; + margin-right: .4em; + padding: 0 .4em; + color: #7f7f7f; } /* LineNumbers */ .chroma .ln { - margin-right: .4em; - padding: 0 .4em; - color: #7f7f7f; + margin-right: .4em; + padding: 0 .4em; + color: #7f7f7f; } /* Keyword */ .chroma .k { - color: #f63; + color: #f63; } /* KeywordConstant */ .chroma .kc { - color: #fa1; + color: #fa1; } /* KeywordDeclaration */ .chroma .kd { - color: #9daccc; + color: #9daccc; } /* KeywordNamespace */ .chroma .kn { - color: #fa1; + color: #fa1; } /* KeywordPseudo */ .chroma .kp { - color: #5f8700; + color: #5f8700; } /* KeywordReserved */ .chroma .kr { - color: #f63; + color: #f63; } /* KeywordType */ .chroma .kt { - color: #9daccc; + color: #9daccc; } /* NameAttribute */ .chroma .na { - color: #8a8a8a; + color: #8a8a8a; } /* NameBuiltin */ .chroma .nb { - color: #9daccc; + color: #9daccc; } /* NameBuiltinPseudo */ .chroma .bp { - color: #9daccc; + color: #9daccc; } /* NameClass */ .chroma .nc { - color: #fa1; + color: #fa1; } /* NameConstant */ .chroma .no { - color: #fa1; + color: #fa1; } /* NameDecorator */ .chroma .nd { - color: #9daccc; + color: #9daccc; } /* NameEntity */ .chroma .ni { - color: #fa1; + color: #fa1; } /* NameException */ .chroma .ne { - color: #af8700; + color: #af8700; } /* NameFunction */ .chroma .nf { - color: #9daccc; + color: #9daccc; } /* NameLabel */ .chroma .nl { - color: #fa1; + color: #fa1; } /* NameNamespace */ .chroma .nn { - color: #fa1; + color: #fa1; } /* NameOther */ .chroma .nx { - color: #9daccc; + color: #9daccc; } /* NameTag */ .chroma .nt { - color: #9daccc; + color: #9daccc; } /* NameVariable */ .chroma .nv { - color: #9daccc; + color: #9daccc; } /* NameVariableClass */ .chroma .vc { - color: #f81; + color: #f81; } /* NameVariableGlobal */ .chroma .vg { - color: #fa1; + color: #fa1; } /* NameVariableInstance */ .chroma .vi { - color: #fa1; + color: #fa1; } /* LiteralString */ .chroma .s { - color: #1af; + color: #1af; } /* LiteralStringAffix */ .chroma .sa { - color: #1af; + color: #1af; } /* LiteralStringBacktick */ .chroma .sb { - color: #a0cc75; + color: #a0cc75; } /* LiteralStringChar */ .chroma .sc { - color: #1af; + color: #1af; } /* LiteralStringDelimiter */ .chroma .dl { - color: #1af; + color: #1af; } /* LiteralStringDoc */ .chroma .sd { - color: #6a737d; + color: #6a737d; } /* LiteralStringDouble */ .chroma .s2 { - color: #a0cc75; + color: #a0cc75; } /* LiteralStringEscape */ .chroma .se { - color: #f63; + color: #f63; } /* LiteralStringHeredoc */ .chroma .sh { - color: #1af; + color: #1af; } /* LiteralStringInterpol */ .chroma .si { - color: #fa1; + color: #fa1; } /* LiteralStringOther */ .chroma .sx { - color: #fa1; + color: #fa1; } /* LiteralStringRegex */ .chroma .sr { - color: #97c; + color: #97c; } /* LiteralStringSingle */ .chroma .s1 { - color: #a0cc75; + color: #a0cc75; } /* LiteralStringSymbol */ .chroma .ss { - color: #fa1; + color: #fa1; } /* LiteralNumber */ .chroma .m { - color: #1af; + color: #1af; } /* LiteralNumberBin */ .chroma .mb { - color: #1af; + color: #1af; } /* LiteralNumberFloat */ .chroma .mf { - color: #1af; + color: #1af; } /* LiteralNumberHex */ .chroma .mh { - color: #1af; + color: #1af; } /* LiteralNumberInteger */ .chroma .mi { - color: #1af; + color: #1af; } /* LiteralNumberIntegerLong */ .chroma .il { - color: #1af; + color: #1af; } /* LiteralNumberOct */ .chroma .mo { - color: #1af; + color: #1af; } /* Operator */ .chroma .o { - color: #f63; + color: #f63; } /* OperatorWord */ .chroma .ow { - color: #5f8700; + color: #5f8700; } /* Comment */ .chroma .c { - color: #6a737d; + color: #6a737d; } /* CommentHashbang */ .chroma .ch { - color: #6a737d; + color: #6a737d; } /* CommentMultiline */ .chroma .cm { - color: #6a737d; + color: #6a737d; } /* CommentSingle */ .chroma .c1 { - color: #6a737d; + color: #6a737d; } /* CommentSpecial */ .chroma .cs { - color: #637d; + color: #637d; } /* CommentPreproc */ .chroma .cp { - color: #fc6; + color: #fc6; } /* CommentPreprocFile */ .chroma .cpf { - color: #fc6; + color: #fc6; } /* GenericDeleted */ .chroma .gd { - color: #fff; - background-color: #5f3737; + color: #fff; + background-color: #5f3737; } /* GenericEmph */ .chroma .ge { - font-style: italic; + font-style: italic; } /* GenericError */ .chroma .gr { - color: #f33; + color: #f33; } /* GenericHeading */ .chroma .gh { - color: #fa1; + color: #fa1; } /* GenericInserted */ .chroma .gi { - color: #fff; - background-color: #3a523a; + color: #fff; + background-color: #3a523a; } /* GenericOutput */ .chroma .go { - color: #888888; + color: #888888; } /* GenericPrompt */ .chroma .gp { - color: #555555; + color: #555555; } /* GenericStrong */ .chroma .gs { - font-weight: bold; + font-weight: bold; } /* GenericSubheading */ .chroma .gu { - color: #9daccc; + color: #9daccc; } /* GenericTraceback */ .chroma .gt { - color: #f63; + color: #f63; } /* GenericUnderline */ .chroma .gl { - text-decoration: underline; + text-decoration: underline; } /* TextWhitespace */ .chroma .w { - color: #bbbbbb; + color: #bbbbbb; } .repository .ui.segment.sub-menu .list .item { + color: #dbdbdb; + a, + span.ui { color: #dbdbdb; - a, - span.ui { - color: #dbdbdb; - } + } } .ui.horizontal.segments > .segment { - background-color: #383c4a; + background-color: #383c4a; } body { - background: #383c4a; - color: #9e9e9e; + background: #383c4a; + color: #9e9e9e; } /* firefox scroll bars */ * { - scrollbar-width: thin; - scrollbar-color: #87ab63 rgba(255, 255, 255, .1); + scrollbar-width: thin; + scrollbar-color: #87ab63 rgba(255, 255, 255, .1); } /* webkit scrollbars */ ::-webkit-scrollbar { - -webkit-appearance: none !important; - width: 10px !important; - height: 10px !important; + -webkit-appearance: none !important; + width: 10px !important; + height: 10px !important; } ::-webkit-scrollbar-track { - border-radius: 0 !important; - background: rgba(255, 255, 255, .1) !important; + border-radius: 0 !important; + background: rgba(255, 255, 255, .1) !important; } ::-webkit-scrollbar-thumb { - cursor: pointer !important; - border-radius: 5px !important; - -webkit-transition: color .2s ease !important; - transition: color .2s ease !important; - background: #87ab63 !important; + cursor: pointer !important; + border-radius: 5px !important; + -webkit-transition: color .2s ease !important; + transition: color .2s ease !important; + background: #87ab63 !important; } ::-webkit-scrollbar-thumb:window-inactive { - background: #87ab63 !important; + background: #87ab63 !important; } ::-webkit-scrollbar-thumb:hover { - background: #87ab63 !important; + background: #87ab63 !important; } a { - color: #87ab63; + color: #87ab63; } a:hover { - color: #a0cc75; + color: #a0cc75; } .ui.card > .extra a:not(.ui):hover, .ui.cards > .card > .extra a:not(.ui):hover { - color: #a0cc75; + color: #a0cc75; } .ui.breadcrumb a:hover { - color: #a0cc75; + color: #a0cc75; } .ui.breadcrumb a { - color: #87ab63; + color: #87ab63; } .repository .metas .ui.list a .text { - color: #87ab63; + color: #87ab63; } .repository .metas .ui.list a .text:hover { - color: #a0cc75; + color: #a0cc75; } .repository .label.list .item a { - color: #87ab63; + color: #87ab63; } .repository .label.list .item a:hover { - color: #a0cc75; + color: #a0cc75; } .repository .milestone.list > .item > a { - color: #87ab63; + color: #87ab63; } .repository .milestone.list > .item > a:hover { - color: #a0cc75; + color: #a0cc75; } .repository.release #release-list { - border-top: 1px solid #4c505c; + border-top: 1px solid #4c505c; } .repository .milestone.list > .item .operate > a { - color: #87ab63; + color: #87ab63; } .repository .milestone.list > .item .operate > a:hover { - color: #a0cc75; + color: #a0cc75; } .ui.green.progress .bar { - background-color: #668844; + background-color: #668844; } .ui.progress.success .bar { - background-color: #7b9e57 !important; + background-color: #7b9e57 !important; } .following.bar.light { - background: #2e323e; - border-bottom: 1px solid #313131; + background: #2e323e; + border-bottom: 1px solid #313131; } .ui.secondary.menu .active.item { - color: #dbdbdb; + color: #dbdbdb; } .ui.secondary.menu .item { - color: #9e9e9e; + color: #9e9e9e; } .following.bar .top.menu a.item:hover { - color: #ffffff; + color: #ffffff; } .ui.attached.header { - background: #404552; - border: 1px solid #404552; - color: #dbdbdb; + background: #404552; + border: 1px solid #404552; + color: #dbdbdb; } .ui.attached.table { - border: 1px solid #304251; - background: #304251; + border: 1px solid #304251; + background: #304251; } .feeds .list ul li:not(:last-child) { - border-bottom: 1px solid #333640; + border-bottom: 1px solid #333640; } .feeds .list ul li.private { - background: #353945; - border: 1px solid #333640; + background: #353945; + border: 1px solid #333640; } .ui.secondary.menu .dropdown.item:hover, @@ -536,196 +536,196 @@ a:hover { .ui.secondary.menu .active.item:hover, .ui.secondary.menu a.item:hover, .ui.dropdown .menu .active.item { - color: #ffffff; + color: #ffffff; } .ui.menu .ui.dropdown .menu > .item { - background: #2c303a !important; - color: #9e9e9e !important; + background: #2c303a !important; + color: #9e9e9e !important; } .ui.secondary.menu .dropdown.item > .menu, .ui.text.menu .dropdown.item > .menu { - border: 1px solid #434444; + border: 1px solid #434444; } footer { - background: #2e323e; - border-top: 1px solid #313131; - color: #bababa; + background: #2e323e; + border-top: 1px solid #313131; + color: #bababa; } .ui.menu .dropdown.item .menu { - background: #2c303a; + background: #2c303a; } .ui.menu .ui.dropdown .menu > .item:hover, .ui.menu .ui.dropdown .menu > .selected.item { - color: #ffffff !important; + color: #ffffff !important; } .ui.dropdown .menu > .header { - color: #dbdbdb; + color: #dbdbdb; } .ui.red.label, .ui.red.labels .label { - background-color: #7d3434 !important; - border-color: #8a2121 !important; + background-color: #7d3434 !important; + border-color: #8a2121 !important; } .ui.menu { - background: #404552; - border: 1px solid #353945; + background: #404552; + border: 1px solid #353945; } .ui.menu .active.item:hover, .ui.vertical.menu .active.item:hover { - color: #dbdbdb; - background: #4b5162; + color: #dbdbdb; + background: #4b5162; } .ui.link.menu .item:hover, .ui.menu .dropdown.item:hover, .ui.menu .link.item:hover, .ui.menu a.item:hover { - color: #dbdbdb; - background: #454b5a; + color: #dbdbdb; + background: #454b5a; } .ui.menu .active.item { - background: #4b5162; - color: #dbdbdb; + background: #4b5162; + color: #dbdbdb; } .ui.input input { - background: #404552; - border: 2px solid #353945; - color: #dbdbdb; + background: #404552; + border: 2px solid #353945; + color: #dbdbdb; } .ui.input input:focus, .ui.input.focus input { - background: #404552; - border: 2px solid #353945; - color: #dbdbdb; + background: #404552; + border: 2px solid #353945; + color: #dbdbdb; } .ui.accordion .title:not(.ui) { - color: #dbdbdb; + color: #dbdbdb; } .ui.label, .ui.label.basic { - color: #dbdbdb; - background-color: #404552; + color: #dbdbdb; + background-color: #404552; } .issue.list > .item .title { - color: #87ab63; + color: #87ab63; } .issue.list > .item .title:hover { - color: #a0cc75; + color: #a0cc75; } .issue.list > .item { - border-bottom: 1px dashed #475767; + border-bottom: 1px dashed #475767; } .ui.green.label, .ui.green.labels .label, .ui.basic.green.label { - background-color: #2d693b !important; - border-color: #2d693b !important; + background-color: #2d693b !important; + border-color: #2d693b !important; } .ui.basic.green.labels a.label:hover, a.ui.basic.green.label:hover { - background-color: #16ab39 !important; - border-color: #16ab39 !important; - color: #ffffff !important; + background-color: #16ab39 !important; + border-color: #16ab39 !important; + color: #ffffff !important; } .issue.list > .item .comment { - color: #129c92; + color: #129c92; } .ui.basic.button, .ui.basic.buttons .button { - color: #797979; + color: #797979; } .ui.basic.red.active.button, .ui.basic.red.buttons .active.button { - box-shadow: 0 0 0 1px #c75252 inset !important; - color: #c75252 !important; + box-shadow: 0 0 0 1px #c75252 inset !important; + color: #c75252 !important; } .ui.basic.button:focus, .ui.basic.button:hover, .ui.basic.buttons .button:focus, .ui.basic.buttons .button:hover { - color: #dbdbdb; - box-shadow: 0 0 0 1px rgba(200, 200, 200, .35) inset; - background: rgba(0, 0, 0, .5); + color: #dbdbdb; + box-shadow: 0 0 0 1px rgba(200, 200, 200, .35) inset; + background: rgba(0, 0, 0, .5); } .ui.menu .item { - background: #404552; - color: #9e9e9e; + background: #404552; + color: #9e9e9e; } .ui.menu .item.disabled, .ui.menu .item.disabled:hover, .ui.ui.menu .item.disabled, .ui.ui.menu .item.disabled:hover { - color: #626773; + color: #626773; } .ui.pagination.menu .active.item { - color: #dbdbdb; - background-color: #87ab63; + color: #dbdbdb; + background-color: #87ab63; } .repository .header-wrapper { - background-color: #2a2e3a; + background-color: #2a2e3a; } .ui.header, .ui.breadcrumb .divider { - color: #9e9e9e; + color: #9e9e9e; } .ui.blue.label, .ui.blue.labels .label, .repository .segment.reactions .ui.label.basic.blue { - background-color: #26577b !important; - border-color: #26577b !important; + background-color: #26577b !important; + border-color: #26577b !important; } .repository .segment.reactions .ui.label.basic.blue { - color: #a0cc75 !important; - background: #305020 !important; - border-color: #404552 !important; + color: #a0cc75 !important; + background: #305020 !important; + border-color: #404552 !important; } .repository .segment.reactions .select-reaction .item:hover { - background: #305020; + background: #305020; } .ui.menu .item > .label { - background: #565454; + background: #565454; } .ui.blue.button, .ui.blue.buttons .button { - background-color: #87ab63; + background-color: #87ab63; } .ui.blue.button:hover, .ui.blue.buttons .button:hover { - background-color: #a0cc75; + background-color: #a0cc75; } .ui.form input:not([type]), @@ -740,9 +740,9 @@ a.ui.basic.green.label:hover { .ui.form input[type="text"], .ui.form input[type="time"], .ui.form input[type="url"] { - color: #9e9e9e; - background: #404552; - border: 2px solid #353945; + color: #9e9e9e; + background: #404552; + border: 2px solid #353945; } .ui.form input:not([type]):focus, @@ -757,464 +757,464 @@ a.ui.basic.green.label:hover { .ui.form input[type="text"]:focus, .ui.form input[type="time"]:focus, .ui.form input[type="url"]:focus { - background: #404552; - border: 2px solid #4b505f; - color: #dbdbdb; + background: #404552; + border: 2px solid #4b505f; + color: #dbdbdb; } .ui.action.input:not([class*="left action"]) input:focus { - border-right-color: #4b505f !important; + border-right-color: #4b505f !important; } .ui.green.button, .ui.green.buttons .button { - background-color: #87ab63; + background-color: #87ab63; } .ui.green.button:hover, .ui.green.buttons .button:hover { - background-color: #a0cc75; + background-color: #a0cc75; } .ui.button { - background: #383c4a; - border: 1px solid #4c505c; - color: #dbdbdb; + background: #383c4a; + border: 1px solid #4c505c; + color: #dbdbdb; } .ui.labeled.button:not([class*="left labeled"]) > .label, .ui[class*="left labeled"].button > .button { - background: #404552; - border: 1px solid #4c505c; - color: #87ab63; + background: #404552; + border: 1px solid #4c505c; + color: #87ab63; } .ui.button:hover { - background-color: #404552; - color: #dbdbdb; + background-color: #404552; + color: #dbdbdb; } .ui.table thead th, .ui.table > thead > tr > th { - background: #404552; - color: #dbdbdb !important; + background: #404552; + color: #dbdbdb !important; } .repository.file.list #repo-files-table tr { - background: #2a2e3a; + background: #2a2e3a; } .repository.file.list #repo-files-table tr:hover { - background-color: #393d4a !important; + background-color: #393d4a !important; } .ui.table { - color: #a5a5a5 !important; - border-color: #4c505c; - background: #353945; + color: #a5a5a5 !important; + border-color: #4c505c; + background: #353945; } .ui.table tbody tr { - border-color: #333640; - background: #2a2e3a; + border-color: #333640; + background: #2a2e3a; } .ui .text.grey { - color: #a5a5a8 !important; + color: #a5a5a8 !important; } .ui.attached.table.segment { - background: #353945; - color: #dbdbdb !important; + background: #353945; + color: #dbdbdb !important; } .markdown:not(code) h2 { - border-bottom: 1px solid #304251; + border-bottom: 1px solid #304251; } .ui.tabular.menu { - border-bottom-color: rgba(255, 255, 255, .1); + border-bottom-color: rgba(255, 255, 255, .1); - .item.active { - border-top-color: #404552; - border-left-color: #404552; - border-right-color: #404552; - background: #353945; - color: #dbdbdb; - } + .item.active { + border-top-color: #404552; + border-left-color: #404552; + border-right-color: #404552; + background: #353945; + color: #dbdbdb; + } - .item { - color: #9e9e9e; - } + .item { + color: #9e9e9e; + } - .item:hover { - color: #dbdbdb; - } + .item:hover { + color: #dbdbdb; + } - &.navbar { - .item.active { - border-top-color: transparent; - border-left-color: transparent; - border-right-color: transparent; - background: #383c4a; - } + &.navbar { + .item.active { + border-top-color: transparent; + border-left-color: transparent; + border-right-color: transparent; + background: #383c4a; } + } } .markdown:not(code) .highlight pre, .markdown:not(code) pre { - background-color: #2a2e3a; - border: 1px solid #404552; + background-color: #2a2e3a; + border: 1px solid #404552; } .markdown:not(code) table tr:nth-child(2n) { - background-color: #2a2e39; + background-color: #2a2e39; } .markdown:not(code) table tr:nth-child(2n-1) { - background-color: #383b44; + background-color: #383b44; } .markdown:not(code) table thead tr:nth-child(2n-1) { - background-color: #464c5d !important; + background-color: #464c5d !important; } .markdown:not(code) table td, .markdown:not(code) table th { - border-color: #4c505c !important; + border-color: #4c505c !important; } .repository.file.editor.edit, .repository.wiki.new .CodeMirror { - .editor-preview, - .editor-preview-side, - & + .editor-preview-side { - background: #353945; - - .markdown:not(code).ui.segment { - border-width: 0; - } + .editor-preview, + .editor-preview-side, + & + .editor-preview-side { + background: #353945; + + .markdown:not(code).ui.segment { + border-width: 0; } + } } .ui.dropdown .menu { - background: #2c303a; + background: #2c303a; } .ui.dropdown .menu > .message:not(.ui) { - color: #636363; + color: #636363; } .ui.input { - color: #dbdbdb; + color: #dbdbdb; } .overflow.menu .items .item { - color: #9d9d9d; + color: #9d9d9d; } .overflow.menu .items .item:hover { - color: #dbdbdb; + color: #dbdbdb; } .ui.segment { - background: #353945; - color: #9e9e9e !important; - border: 1px solid #404552; + background: #353945; + color: #9e9e9e !important; + border: 1px solid #404552; } .ui.list > .item > .content { - color: #9e9e9e !important; + color: #9e9e9e !important; } .ui.active.button:active, .ui.button:active, .ui.button:focus, .ui.active.button { - background-color: #2e3e4e; - color: #dbdbdb; + background-color: #2e3e4e; + color: #dbdbdb; } .ui.active.button:hover { - background-color: #475e75; - color: #dbdbdb; + background-color: #475e75; + color: #dbdbdb; } .ui.dropdown .menu .selected.item, .ui.dropdown.selected { - color: #dbdbdb; + color: #dbdbdb; } .ui.dropdown .menu > .item:hover { - color: #dbdbdb; + color: #dbdbdb; } .ui.dropdown .menu > .item { - color: #9e9e9e; + color: #9e9e9e; } .ui.attached.segment { - border: 1px solid #404552; + border: 1px solid #404552; } .repository.view.issue .comment-list .event > .svg.issue-symbol { - background: #3b4954; + background: #3b4954; } .repository.view.issue .comment-list .event > .svg:not(.issue-symbol) { - text-shadow: -2px 0 #383c4a, 0 2px #383c4a, 2px 0 #383c4a, 0 -2px #383c4a; + text-shadow: -2px 0 #383c4a, 0 2px #383c4a, 2px 0 #383c4a, 0 -2px #383c4a; } .ui .text.grey a { - color: #dbdbdb !important; + color: #dbdbdb !important; } .ui .comment .actions a { - color: #9e9e9e !important; + color: #9e9e9e !important; } .ui .comment .actions a.active, .ui .comment .actions a:hover { - color: #fff !important; + color: #fff !important; } .repository.view.issue .comment-list .comment .content { - > .bottom.segment { - background: #353945; - a { - border: solid 1px #353945; - background-color: #353945; - } + > .bottom.segment { + background: #353945; + a { + border: solid 1px #353945; + background-color: #353945; } + } - .header { - color: #dbdbdb; - background-color: #404552; - border-bottom: 1px solid #353944; - } + .header { + color: #dbdbdb; + background-color: #404552; + border-bottom: 1px solid #353944; + } - .merge-section { - background-color: #404552; - border-top: 1px solid #353944; - } + .merge-section { + background-color: #404552; + border-top: 1px solid #353944; + } - .header:after, - > .merge-section.no-header:after { - border-right-color: #404552; - } + .header:after, + > .merge-section.no-header:after { + border-right-color: #404552; + } - .header:before, - > .merge-section.no-header:before { - border-right-color: #404552; - } + .header:before, + > .merge-section.no-header:before { + border-right-color: #404552; + } } .repository.new.issue .comment.form .content:after { - border-right-color: #353945; + border-right-color: #353945; } .repository.new.issue .comment.form .content:before { - border-right-color: #353945; + border-right-color: #353945; } .repository.view.issue .comment-list:not(.prevent-before-timeline):before, .repository.view.issue .comment-list .timeline:before { - background-color: #3b4954; + background-color: #3b4954; } .repository.view.issue .comment-list .timeline-item .badge { - background-color: #383c4a; - border-color: #3b4954; - color: #9e9e9e; + background-color: #383c4a; + border-color: #3b4954; + color: #9e9e9e; } .repository.view.issue .comment-list .comment .tag { - color: #dbdbdb; - border-color: rgb(152, 152, 152); + color: #dbdbdb; + border-color: rgb(152, 152, 152); } .repository.view.issue .comment-list .timeline-item .badge.badge-commit { - background: radial-gradient(#383c4a 40%, transparent 40%) no-repeat; + background: radial-gradient(#383c4a 40%, transparent 40%) no-repeat; } .repository .comment.form .content .form:after { - border-right-color: #313c47; + border-right-color: #313c47; } .repository .comment.form .content .form:before { - border-right-color: #313c47; + border-right-color: #313c47; } .ui .text.grey a:hover { - color: #dbdbdb !important; + color: #dbdbdb !important; } .ui.basic.green.active.button, .ui.basic.green.buttons .active.button { - color: #13ae38 !important; - box-shadow: 0 0 0 1px #13ae38 inset !important; + color: #13ae38 !important; + box-shadow: 0 0 0 1px #13ae38 inset !important; } .ui.form textarea, .ui.form textarea:focus { - color: #dbdbdb; - background: #404552; - border: 2px solid #353945; + color: #dbdbdb; + background: #404552; + border: 2px solid #353945; } .ui.form textarea:focus { - border: 1px solid #456580; + border: 1px solid #456580; } .ui .info.segment.top { - background-color: #404552 !important; + background-color: #404552 !important; } .repository .diff-file-box .code-diff-unified tbody tr.del-code td { - background-color: #3c2626 !important; - border-color: #634343 !important; + background-color: #3c2626 !important; + border-color: #634343 !important; } .repository .diff-file-box .code-diff-unified tbody tr.del-code td.lines-num { - background-color: #4e2c2c !important; + background-color: #4e2c2c !important; } .repository .diff-file-box .code-diff-unified tbody tr.add-code td { - background-color: #283e2d !important; - border-color: #314a37 !important; + background-color: #283e2d !important; + border-color: #314a37 !important; } .repository .diff-file-box .code-diff-unified tbody tr.add-code td.lines-num { - background-color: #2c4632 !important; + background-color: #2c4632 !important; } .removed-code { - background-color: #5f3737; + background-color: #5f3737; } .added-code { - background-color: #3a523a; + background-color: #3a523a; } .tag-code, .tag-code td { - background: #353945 !important; + background: #353945 !important; } .tag-code td.lines-num { - background-color: #3a3e4c !important; + background-color: #3a3e4c !important; } .tag-code td.lines-type-marker, td.blob-hunk { - color: #dbdbdb !important; + color: #dbdbdb !important; } .ui.vertical.menu .active.item { - background: #4b5162; + background: #4b5162; } .ui.vertical.menu .item { - background: #353945; + background: #353945; } .ui.vertical.menu .header.item { - background: #404552; + background: #404552; } .ui.vertical.menu { - background: #353945; - border: 1px solid #333640; + background: #353945; + border: 1px solid #333640; } .ui.repository.list .item:not(:first-child) { - border-top: 1px solid #4c505c; + border-top: 1px solid #4c505c; } .ui .text.blue { - color: #87ab63 !important; + color: #87ab63 !important; } .ui.selection.active.dropdown, .ui.selection.active.dropdown .menu { - border-color: #4e5361; - box-shadow: 0 2px 3px 0 rgba(34, 36, 38, .15); + border-color: #4e5361; + box-shadow: 0 2px 3px 0 rgba(34, 36, 38, .15); } .ui.selection.active.dropdown:hover, .ui.selection.active.dropdown:hover .menu { - border-color: #4e5361; - box-shadow: 0 2px 3px 0 rgba(34, 36, 38, .15); + border-color: #4e5361; + box-shadow: 0 2px 3px 0 rgba(34, 36, 38, .15); } .ui.selection.dropdown { - background: #404552; - border: 1px solid #404552; - color: #9e9e9e; + background: #404552; + border: 1px solid #404552; + color: #9e9e9e; } .ui.menu .ui.dropdown .menu > .active.item { - color: #dbdbdb !important; + color: #dbdbdb !important; } .ui.card, .ui.cards > .card { - background: #353945; - box-shadow: 0 1px 3px 0 #4c505c, 0 0 0 1px #4c505c; + background: #353945; + box-shadow: 0 1px 3px 0 #4c505c, 0 0 0 1px #4c505c; } .ui.card > .content > .header, .ui.cards > .card > .content > .header { - color: #dbdbdb; + color: #dbdbdb; } .ui.card > .extra a:not(.ui), .ui.cards > .card > .extra a:not(.ui) { - color: #87ab63; + color: #87ab63; } .ui .text.black { - color: #9e9e9e; + color: #9e9e9e; } .ui .text.black:hover { - color: #dbdbdb; + color: #dbdbdb; } .ui.secondary.segment { - background: #353945; + background: #353945; } .ui.secondary.pointing.menu { - border-bottom-color: rgba(255, 255, 255, .15); + border-bottom-color: rgba(255, 255, 255, .15); } .ui.secondary.pointing.menu .active.item { - color: #dbdbdb; + color: #dbdbdb; } .ui.user.list .item:not(:first-child) { - border-top: 1px solid #4c505c; + border-top: 1px solid #4c505c; } .ui.secondary.pointing.menu .active.item:hover { - color: #dbdbdb; + color: #dbdbdb; } .ui.secondary.pointing.menu .dropdown.item:hover, .ui.secondary.pointing.menu .link.item:hover, .ui.secondary.pointing.menu a.item:hover { - color: #dbdbdb; + color: #dbdbdb; } .ui.pointing.dropdown > .menu:not(.hidden)::after { - background: #2c303a; + background: #2c303a; } .ui.checkbox label, .ui.checkbox + label, .ui.form .field > label { - color: #9e9e9e; + color: #9e9e9e; } .ui.form .inline.field > label, @@ -1222,348 +1222,348 @@ td.blob-hunk { .ui.form .inline.fields .field > label, .ui.form .inline.fields .field > p, .ui.form .inline.fields > label { - color: #9e9e9e; + color: #9e9e9e; } .user.settings .email.list .item:not(:first-child) { - border-top: 1px solid #3f4451; + border-top: 1px solid #3f4451; } .explore .navbar { - background-color: #2a2e3a !important; + background-color: #2a2e3a !important; } .ui.menu.new-menu { - background: #2a2e3a; - border-color: transparent !important; + background: #2a2e3a; + border-color: transparent !important; - @media only screen and (max-width: 1200px) { - &:after { - background: linear-gradient(to right, transparent 0%, #2a2e3a 100%); - } + @media only screen and (max-width: 1200px) { + &:after { + background: linear-gradient(to right, transparent 0%, #2a2e3a 100%); } + } } input { - background: #2e323e; + background: #2e323e; } .settings .key.list .item:not(:first-child) { - border-top: 1px solid #404552; + border-top: 1px solid #404552; } .ui.attached.info.message, .ui.info.message { - box-shadow: 0 0 0 1px #4b5e71 inset, 0 0 0 0 transparent; + box-shadow: 0 0 0 1px #4b5e71 inset, 0 0 0 0 transparent; } .ui.bottom.attached.message { - background-color: #2c662d; - color: #87ab63; + background-color: #2c662d; + color: #87ab63; } .ui.bottom.attached.message .pull-right { - color: #87ab63; + color: #87ab63; } .ui.info.message { - background-color: #2c3b4a; - color: #9ebcc5; + background-color: #2c3b4a; + color: #9ebcc5; } .ui .warning.header { - background-color: #5d3a22 !important; - border-color: #794f31; + background-color: #5d3a22 !important; + border-color: #794f31; } .ui.red.message, .ui.error.message { - background-color: rgba(80, 23, 17, .6); - color: #f9cbcb; - box-shadow: 0 0 0 1px rgba(121, 71, 66, .5) inset, 0 0 0 0 transparent; + background-color: rgba(80, 23, 17, .6); + color: #f9cbcb; + box-shadow: 0 0 0 1px rgba(121, 71, 66, .5) inset, 0 0 0 0 transparent; } .ui.red.button, .ui.red.buttons .button { - background-color: #7d3434; + background-color: #7d3434; } .ui.red.button:hover, .ui.red.buttons .button:hover { - background-color: #984646; + background-color: #984646; } .ui.checkbox label:hover, .ui.checkbox + label:hover { - color: #dbdbdb !important; + color: #dbdbdb !important; } .ui.checkbox input:checked ~ .box:after, .ui.checkbox input:checked ~ label:after { - color: #7f98ad; + color: #7f98ad; } .ui.checkbox input:checked ~ .box:before, .ui.checkbox input:checked ~ label:before { - background: #304251; - opacity: 1; - color: #7f98ad; - border-color: #304251; + background: #304251; + opacity: 1; + color: #7f98ad; + border-color: #304251; } .ui.checkbox .box:hover::before, .ui.checkbox label:hover::before { - background: #304251; + background: #304251; } .ui.checkbox .box:before, .ui.checkbox label:before { - background: #304251; - border: 1px solid #304251; + background: #304251; + border: 1px solid #304251; } .ui.checkbox label:before { - border-color: #476075; + border-color: #476075; } .ui.checkbox .box:active::before, .ui.checkbox label:active::before { - background: #304251; - border-color: rgba(34, 36, 38, .35); + background: #304251; + border-color: rgba(34, 36, 38, .35); } .ui.checkbox input:focus ~ .box:before, .ui.checkbox input:focus ~ label:before { - border-color: #304251; - background: #304251; + border-color: #304251; + background: #304251; } .ui.checkbox input:checked:focus ~ .box:before, .ui.checkbox input:checked:focus ~ label:before, .ui.checkbox input:not([type="radio"]):indeterminate:focus ~ .box:before, .ui.checkbox input:not([type="radio"]):indeterminate:focus ~ label:before { - border-color: #304251; - background: #304251; + border-color: #304251; + background: #304251; } .ui.checkbox input:checked:focus ~ .box:after, .ui.checkbox input:checked:focus ~ label:after, .ui.checkbox input:not([type="radio"]):indeterminate:focus ~ .box:after, .ui.checkbox input:not([type="radio"]):indeterminate:focus ~ label:after { - color: #7f98ad; + color: #7f98ad; } .ui.checkbox input:focus ~ .box:after, .ui.checkbox input:focus ~ label, .ui.checkbox input:focus ~ label:after { - color: #9a9a9a; + color: #9a9a9a; } .ui.selection.dropdown:hover { - border: 1px solid #456580; + border: 1px solid #456580; } .ui.selection.dropdown .menu > .item { - border-top: 1px solid #313c47; + border-top: 1px solid #313c47; } .ui.selection.visible.dropdown > .text:not(.default) { - color: #9e9e9e; + color: #9e9e9e; } .ui.positive.message { - background-color: #0d491b; - color: #87ab63; - box-shadow: 0 0 0 1px #2d693b inset, 0 0 0 0 transparent; + background-color: #0d491b; + color: #87ab63; + box-shadow: 0 0 0 1px #2d693b inset, 0 0 0 0 transparent; } .ui.negative.message { - background-color: rgba(80, 23, 17, .6); - color: #f9cbcb; - box-shadow: 0 0 0 1px rgba(121, 71, 66, .5) inset, 0 0 0 0 transparent; + background-color: rgba(80, 23, 17, .6); + color: #f9cbcb; + box-shadow: 0 0 0 1px rgba(121, 71, 66, .5) inset, 0 0 0 0 transparent; } .user.profile .ui.card .extra.content ul li:not(:last-child) { - border-bottom: 1px solid #4c505c; + border-bottom: 1px solid #4c505c; } .ui.form .dropzone { - border: 2px dashed #7f98ad; - background-color: #2e323e; + border: 2px dashed #7f98ad; + background-color: #2e323e; - .dz-button { - color: rgba(158, 158, 158, .8); - } + .dz-button { + color: rgba(158, 158, 158, .8); + } } .ui.form .dropzone:hover .dz-button { - color: rgba(158, 158, 158, 1); + color: rgba(158, 158, 158, 1); } .ui.basic.red.button, .ui.basic.red.buttons .button { - box-shadow: 0 0 0 1px #a04141 inset !important; - color: #a04141 !important; + box-shadow: 0 0 0 1px #a04141 inset !important; + color: #a04141 !important; } .ui.list .list > .item .header, .ui.list > .item .header { - color: #dedede; + color: #dedede; } .ui.list .list > .item .description, .ui.list > .item .description { - color: #9e9e9e; + color: #9e9e9e; } .ui.user.list .item .description a { - color: #668cb1; + color: #668cb1; } .repository.file.list #repo-files-table tbody .svg.octicon-file-directory, .repository.file.list #repo-files-table tbody .svg.octicon-file-submodule { - color: #7c9b5e; + color: #7c9b5e; } .ui.blue.button:focus, .ui.blue.buttons .button:focus { - background-color: #a27558; + background-color: #a27558; } .ui.basic.blue.button:hover, .ui.basic.blue.buttons .button:hover { - box-shadow: 0 0 0 1px #87ab63 inset !important; - color: #87ab63 !important; + box-shadow: 0 0 0 1px #87ab63 inset !important; + color: #87ab63 !important; } .ui.basic.blue.button:focus, .ui.basic.blue.buttons .button:focus { - box-shadow: 0 0 0 1px #87ab63 inset !important; - color: #87ab63 !important; + box-shadow: 0 0 0 1px #87ab63 inset !important; + color: #87ab63 !important; } .repository.labels .ui.basic.black.label { - background-color: #bbbbbb !important; + background-color: #bbbbbb !important; } .lines-commit { - background: #2e323e !important; + background: #2e323e !important; } .bottom-line { - border-color: #4e525e !important; + border-color: #4e525e !important; } .lines-num { - color: #9e9e9e !important; - border-color: #2d2d2d !important; + color: #9e9e9e !important; + border-color: #2d2d2d !important; } td.blob-excerpt { - background-color: rgba(0, 0, 0, .15); + background-color: rgba(0, 0, 0, .15); } a.blob-excerpt { - color: #ccc; - background: #393d4a; + color: #ccc; + background: #393d4a; } a.blob-excerpt:hover { - background: #87ab63; + background: #87ab63; } .code-view .lines-code.active { - background: #534d1b !important; + background: #534d1b !important; } a.ui.label:hover, a.ui.labels .label:hover { - background-color: #505667 !important; - color: #dbdbdb !important; + background-color: #505667 !important; + color: #dbdbdb !important; } .repository #commits-table td.sha .sha.label, .repository #repo-files-table .sha.label { - border-color: #888; + border-color: #888; } .repository #commits-table td.sha .sha.label.isSigned .detail.icon, .repository #repo-files-table .sha.label.isSigned .detail.icon { - background: none; - border-left-color: #888; + background: none; + border-left-color: #888; } .repository .ui.attached.message.isSigned.isVerified { - background-color: #394829; - color: #9e9e9e; + background-color: #394829; + color: #9e9e9e; - &.message { - color: #87ab63; - .ui.text { - color: #9e9e9e; - } - .pull-right { - color: #87ab63; - } + &.message { + color: #87ab63; + .ui.text { + color: #9e9e9e; } + .pull-right { + color: #87ab63; + } + } } .repository .ui.attached.message.isSigned.isVerifiedUntrusted { - background-color: #4a3903; - color: #9e9e9e; - &.message { - color: #c2c193; - .ui.text { - color: #9e9e9e; - } - .pull-right, - a { - color: #c2c193; - } + background-color: #4a3903; + color: #9e9e9e; + &.message { + color: #c2c193; + .ui.text { + color: #9e9e9e; } + .pull-right, + a { + color: #c2c193; + } + } } .repository .ui.attached.message.isSigned.isVerifiedUnmatched { - background-color: #4e3321; - color: #9e9e9e; - &.message { - color: #c2a893; - .ui.text { - color: #9e9e9e; - } - .pull-right, - a { - color: #c2a893; - } + background-color: #4e3321; + color: #9e9e9e; + &.message { + color: #c2a893; + .ui.text { + color: #9e9e9e; + } + .pull-right, + a { + color: #c2a893; } + } } .repository .ui.attached.message.isSigned.isWarning { - background-color: rgba(80, 23, 17, .6); - &.message { - color: #d07d7d; - .ui.text { - color: #d07d7d; - } - .pull-right { - color: #9e9e9e; - } + background-color: rgba(80, 23, 17, .6); + &.message { + color: #d07d7d; + .ui.text { + color: #d07d7d; } + .pull-right { + color: #9e9e9e; + } + } } .repository .label.list .item { - border-bottom: 1px dashed #4c505c; + border-bottom: 1px dashed #4c505c; } .ui.basic.blue.button, .ui.basic.blue.buttons .button { - box-shadow: 0 0 0 1px #87ab63 inset !important; - color: #87ab63 !important; + box-shadow: 0 0 0 1px #87ab63 inset !important; + color: #87ab63 !important; } .ui.text.yellow, .yellow.icon.icon.icon { - color: #e4ac07 !important; + color: #e4ac07 !important; } .repository .diff-file-box .code-diff-split tbody tr.add-code td:nth-child(1), @@ -1572,7 +1572,7 @@ a.ui.labels .label:hover { .repository .diff-file-box .code-diff-split tbody tr.del-code td:nth-child(4), .repository .diff-file-box .code-diff-split tbody tr.del-code td:nth-child(5), .repository .diff-file-box .code-diff-split tbody tr.del-code td:nth-child(6) { - background-color: #2a2e3a; + background-color: #2a2e3a; } .repository .diff-file-box .code-diff-split tbody tr.add-code td:nth-child(4), @@ -1580,415 +1580,415 @@ a.ui.labels .label:hover { .repository .diff-file-box .code-diff-split tbody tr.add-code td:nth-child(6), .repository .diff-file-box .code-diff-split tbody tr td.add-code, .repository .diff-file-box .code-diff-split tbody tr td.lines-num-new.add-code { - background-color: #283e2d !important; - border-color: #314a37 !important; + background-color: #283e2d !important; + border-color: #314a37 !important; } .repository .diff-file-box .code-diff-split tbody tr.del-code td:nth-child(1), .repository .diff-file-box .code-diff-split tbody tr.del-code td:nth-child(2), .repository .diff-file-box .code-diff-split tbody tr.del-code td:nth-child(3), .repository .diff-file-box .code-diff-split tbody tr td.del-code { - background-color: #3c2626 !important; - border-color: #634343 !important; + background-color: #3c2626 !important; + border-color: #634343 !important; } .organization.teams .detail .item:not(:last-child), .organization.members .list .item { - border-bottom-color: #404552; + border-bottom-color: #404552; } .ui.blue.button:active, .ui.blue.buttons .button:active { - background-color: #a27558; + background-color: #a27558; } #git-graph-container li a { - color: #c79575; + color: #c79575; } #git-graph-container li .author { - color: #c79575; + color: #c79575; } .ui.header .sub.header { - color: #9e9e9e; + color: #9e9e9e; } .ui.dividing.header { - border-bottom: 1px solid #4c505c; + border-bottom: 1px solid #4c505c; } .ui.modal > .header { - background: #404552; - color: #dbdbdb; + background: #404552; + color: #dbdbdb; } .ui.modal > .actions { - background: #404552; - border-top: 1px solid #404552; + background: #404552; + border-top: 1px solid #404552; } .ui.modal > .content { - background: #383c4a; + background: #383c4a; } .editor-toolbar { - background-color: #404552; - border-color: #7f98ad; + background-color: #404552; + border-color: #7f98ad; } .edit-diff > div > .ui.table { - border-left-color: #404552 !important; - border-right-color: #404552 !important; + border-left-color: #404552 !important; + border-right-color: #404552 !important; } .editor-toolbar a { - color: #87ab63 !important; + color: #87ab63 !important; } .editor-toolbar a.active, .editor-toolbar a:hover { - background: #2a2e3a; - border-color: transparent; + background: #2a2e3a; + border-color: transparent; } .editor-toolbar i.separator { - border-right-color: #7f98ad; + border-right-color: #7f98ad; } .repository .diff-detail-box { - background-color: #383c4a; + background-color: #383c4a; - .detail-files { - background-color: inherit; - } + .detail-files { + background-color: inherit; + } - &.sticky { - border-bottom-color: rgba(255, 255, 255, .1); - } + &.sticky { + border-bottom-color: rgba(255, 255, 255, .1); + } } .comment-code-cloud { - border-color: #3a3a3a; + border-color: #3a3a3a; - &:before { - border-bottom: 13px solid #5a5a5a; - } + &:before { + border-bottom: 13px solid #5a5a5a; + } - .ui.attached.top.header { - background: none transparent; - border: 0; - } - - .ui.active.tab { - &:not(.markdown) { - textarea:focus { - border: none; - } + .ui.attached.top.header { + background: none transparent; + border: 0; + } - background: #404552; - } + .ui.active.tab { + &:not(.markdown) { + textarea:focus { + border: none; + } - border-color: rgba(255, 255, 255, .15); + background: #404552; } - .footer { - border-top-color: #5a5a5a; + border-color: rgba(255, 255, 255, .15); + } - .markdown-info { - color: inherit; - } + .footer { + border-top-color: #5a5a5a; + .markdown-info { + color: inherit; } + + } } .add-comment-left.add-comment-right .ui.attached.header { - border-color: #5d5c5c; - border-right: none; + border-color: #5d5c5c; + border-right: none; } .file-comment { - color: #888888; + color: #888888; } .ui.comments .comment { - .author { - color: #dbdbdb; - } + .author { + color: #dbdbdb; + } - .metadata { - color: #808084; - } + .metadata { + color: #808084; + } - .text { - color: #9e9e9e; - } + .text { + color: #9e9e9e; + } } .heatmap(@heat) { - @heatmap-cold: #2d303b; - @heatmap-hot: #a0cc75; - background-color: mix(@heatmap-hot, @heatmap-cold, @heat); + @heatmap-cold: #2d303b; + @heatmap-hot: #a0cc75; + background-color: mix(@heatmap-hot, @heatmap-cold, @heat); } .heatmap-color-0 { - .heatmap(0%); + .heatmap(0%); } .heatmap-color-1 { - .heatmap(20%); + .heatmap(20%); } .heatmap-color-2 { - .heatmap(40%); + .heatmap(40%); } .heatmap-color-3 { - .heatmap(60%); + .heatmap(60%); } .heatmap-color-4 { - .heatmap(80%); + .heatmap(80%); } .heatmap-color-5 { - .heatmap(100%); + .heatmap(100%); } .activity-bar-graph { - background-color: #a0cc75; - color: #9e9e9e; + background-color: #a0cc75; + color: #9e9e9e; } /* code mirror dark theme */ .CodeMirror { - color: #9daccc; + color: #9daccc; + background-color: #2e323e; + border-color: #7f98ad; + border-top: 0; + + div.CodeMirror-cursor { + border-left: 1px solid #9e9e9e; + } + + .CodeMirror-gutters { background-color: #2e323e; - border-color: #7f98ad; - border-top: 0; + } + + ::selection, + ::-moz-selection, + .CodeMirror-selected { + background: #42402f !important; + } + + &.cm-s-default, + &.cm-s-paper { + .cm-property { + color: #a0cc75; + } - div.CodeMirror-cursor { - border-left: 1px solid #9e9e9e; + .cm-header { + color: #9daccc; } - .CodeMirror-gutters { - background-color: #2e323e; + .cm-quote { + color: #009900; } - ::selection, - ::-moz-selection, - .CodeMirror-selected { - background: #42402f !important; + .cm-keyword { + color: #cc8a61; } - &.cm-s-default, - &.cm-s-paper { - .cm-property { - color: #a0cc75; - } - - .cm-header { - color: #9daccc; - } - - .cm-quote { - color: #009900; - } - - .cm-keyword { - color: #cc8a61; - } - - .cm-atom { - color: #ef5e77; - } - - .cm-number { - color: #ff5656; - } - - .cm-def { - color: #e4e4e4; - } - - .cm-variable-2 { - color: #00bdbf; - } - - .cm-variable-3 { - color: #008855; - } - - .cm-comment { - color: #8e9ab3; - } - - .cm-string { - color: #a77272; - } - - .cm-string-2 { - color: #ff5500; - } - - .cm-meta, - .cm-qualifier { - color: #ffb176; - } - - .cm-builtin { - color: #b7c951; - } - - .cm-bracket { - color: #999977; - } - - .cm-tag { - color: #f1d273; - } - - .cm-attribute { - color: #bfcc70; - } - - .cm-hr { - color: #999999; - } - - .cm-url { - color: #c5cfd0; - } - - .cm-link { - color: #d8c792; - } - - .cm-error { - /* color: #ff6e00; */ - color: #dbdbeb; - } + .cm-atom { + color: #ef5e77; } + + .cm-number { + color: #ff5656; + } + + .cm-def { + color: #e4e4e4; + } + + .cm-variable-2 { + color: #00bdbf; + } + + .cm-variable-3 { + color: #008855; + } + + .cm-comment { + color: #8e9ab3; + } + + .cm-string { + color: #a77272; + } + + .cm-string-2 { + color: #ff5500; + } + + .cm-meta, + .cm-qualifier { + color: #ffb176; + } + + .cm-builtin { + color: #b7c951; + } + + .cm-bracket { + color: #999977; + } + + .cm-tag { + color: #f1d273; + } + + .cm-attribute { + color: #bfcc70; + } + + .cm-hr { + color: #999999; + } + + .cm-url { + color: #c5cfd0; + } + + .cm-link { + color: #d8c792; + } + + .cm-error { + /* color: #ff6e00; */ + color: #dbdbeb; + } + } } .ui.popup { - background-color: #383c4a; - color: #9e9e9e; - border-color: #9e9e9e; + background-color: #383c4a; + color: #9e9e9e; + border-color: #9e9e9e; - &.top::before { - background-color: #383c4a; - } + &.top::before { + background-color: #383c4a; + } } .markdown:not(code) h1 { - border-bottom-color: #888; + border-bottom-color: #888; } .markdown:not(code) blockquote { - border-left-color: #888; + border-left-color: #888; } .markdown:not(code) code, .markdown:not(code) tt { - background-color: #2a2e3a; + background-color: #2a2e3a; } footer .container .links > * { - border-left-color: #888; + border-left-color: #888; } .repository.file.list #repo-files-table tbody .svg { - color: #9e9e9e; + color: #9e9e9e; } .repository.release #release-list > li .detail { - border-left-color: #4c505c; + border-left-color: #4c505c; } .repository.release #release-list > li .detail .dot { - background-color: #888; - border-color: #383c4a; + background-color: #888; + border-color: #383c4a; } .repository.release #release-list > li .detail .download .list { - border-top-color: #404552; + border-top-color: #404552; } .repository.release #release-list > li .detail .download .list li { - border-bottom-color: #404552; + border-bottom-color: #404552; } .board-column { - background-color: rgba(0, 0, 0, .2) !important; + background-color: rgba(0, 0, 0, .2) !important; } .tribute-container { - box-shadow: 0 .25rem .5rem rgba(0, 0, 0, .6); + box-shadow: 0 .25rem .5rem rgba(0, 0, 0, .6); } .tribute-container ul { - background: #2d303b !important; + background: #2d303b !important; } .tribute-container li.highlight, .tribute-container li:hover { - background: #728e5e !important; + background: #728e5e !important; } .repository .repo-header .ui.huge.breadcrumb.repo-title .repo-header-icon .avatar { - color: #2a2e3a; + color: #2a2e3a; } #git-graph-container.monochrome #rel-container .flow-group { - stroke: dimgrey; - fill: dimgrey; + stroke: dimgrey; + fill: dimgrey; } #git-graph-container.monochrome #rel-container .flow-group.highlight { - stroke: darkgrey; - fill: darkgrey; + stroke: darkgrey; + fill: darkgrey; } #git-graph-container:not(.monochrome) #rel-container .flow-group { - &.flow-color-16-5 { - stroke: #5543b1; - fill: #5543b1; - } + &.flow-color-16-5 { + stroke: #5543b1; + fill: #5543b1; + } } #git-graph-container:not(.monochrome) #rel-container .flow-group.highlight { - &.flow-color-16-5 { - stroke: #7058e6; - fill: #7058e6; - } + &.flow-color-16-5 { + stroke: #7058e6; + fill: #7058e6; + } } #git-graph-container #rev-list li.highlight, #git-graph-container #rev-list li.hover { - background-color: rgba(255, 255, 255, .05); + background-color: rgba(255, 255, 255, .05); } #git-graph-container #rev-list li.highlight.hover { - background-color: rgba(255, 255, 255, .1); + background-color: rgba(255, 255, 255, .1); } #git-graph-container .ui.buttons button#flow-color-monochrome.ui.button { - border-left-color: rgb(76, 80, 92); - border-left-style: solid; - border-left-width: 1px; + border-left-color: rgb(76, 80, 92); + border-left-style: solid; + border-left-width: 1px; } .mermaid-chart { - filter: invert(84%) hue-rotate(180deg); + filter: invert(84%) hue-rotate(180deg); } .is-loading:after { - border-color: #4a4c58 #4a4c58 #d7d7da #d7d7da; + border-color: #4a4c58 #4a4c58 #d7d7da #d7d7da; } .markdown-block-error { - border: 1px solid rgba(121, 71, 66, .5) !important; - border-bottom: none !important; + border: 1px solid rgba(121, 71, 66, .5) !important; + border-bottom: none !important; } From b611ae19083ef754aac18e55774bcfe39fae137e Mon Sep 17 00:00:00 2001 From: John Olheiser Date: Tue, 25 Aug 2020 18:04:18 -0500 Subject: [PATCH 42/54] Mark Cache with ini tag (#12605) Signed-off-by: jolheiser --- modules/setting/cache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/setting/cache.go b/modules/setting/cache.go index 34a212db18854..af47bd085ab81 100644 --- a/modules/setting/cache.go +++ b/modules/setting/cache.go @@ -23,7 +23,7 @@ type Cache struct { var ( // CacheService the global cache CacheService = struct { - Cache + Cache `ini:"cache"` LastCommit struct { Enabled bool From 69b3dd636201d340ab6bdfa49ed95456a4e5acb7 Mon Sep 17 00:00:00 2001 From: zeripath Date: Wed, 26 Aug 2020 14:47:38 +0100 Subject: [PATCH 43/54] Escape Email in forgot_password.tmpl (#12610) Signed-off-by: Andrew Thornton --- templates/user/auth/forgot_passwd.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/user/auth/forgot_passwd.tmpl b/templates/user/auth/forgot_passwd.tmpl index 1e061763a5418..111e42a3df9b6 100644 --- a/templates/user/auth/forgot_passwd.tmpl +++ b/templates/user/auth/forgot_passwd.tmpl @@ -10,7 +10,7 @@
{{template "base/alert" .}} {{if .IsResetSent}} -

{{.i18n.Tr "auth.reset_password_mail_sent_prompt" .Email .ResetPwdCodeLives | Str2html}}

+

{{.i18n.Tr "auth.reset_password_mail_sent_prompt" (Escape .Email) .ResetPwdCodeLives | Str2html}}

{{else if .IsResetRequest}}
From 7d14d6c1c13f1eac4b9456c5db4c3594bc4dc237 Mon Sep 17 00:00:00 2001 From: silverwind Date: Wed, 26 Aug 2020 17:52:44 +0200 Subject: [PATCH 44/54] Fix file table overflows (#12603) - Fix overflow regression from https://github.com/go-gitea/gitea/pull/12553. - Fix submodule columns stretching the table - Refactor template to share more HTML nodes - Introduce CSS helper classes Co-authored-by: zeripath Co-authored-by: techknowlogick --- integrations/repo_test.go | 2 +- templates/repo/view_list.tmpl | 58 ++++++++++++++++++----------------- web_src/less/_repository.less | 19 +++++++++--- web_src/less/helpers.less | 6 ++++ web_src/less/index.less | 1 + 5 files changed, 52 insertions(+), 34 deletions(-) create mode 100644 web_src/less/helpers.less diff --git a/integrations/repo_test.go b/integrations/repo_test.go index 3121b5135f498..c1652aeb1d32b 100644 --- a/integrations/repo_test.go +++ b/integrations/repo_test.go @@ -148,7 +148,7 @@ func TestViewRepoWithSymlinks(t *testing.T) { resp := session.MakeRequest(t, req, http.StatusOK) htmlDoc := NewHTMLParser(t, resp.Body) - files := htmlDoc.doc.Find("#repo-files-table > TBODY > TR > TD.name") + files := htmlDoc.doc.Find("#repo-files-table > TBODY > TR > TD.name > SPAN.truncate") items := files.Map(func(i int, s *goquery.Selection) string { cls, _ := s.Find("SVG").Attr("class") file := strings.Trim(s.Find("A").Text(), " \t\n") diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl index db810890f565d..36c3024d1dbf4 100644 --- a/templates/repo/view_list.tmpl +++ b/templates/repo/view_list.tmpl @@ -43,37 +43,39 @@ {{$entry := index $item 0}} {{$commit := index $item 1}} - {{if $entry.IsSubModule}} - - {{svg "octicon-file-submodule" 16}} - {{$refURL := $commit.RefURL AppUrl $.Repository.FullName}} - {{if $refURL}} - {{$entry.Name}} @ {{ShortSha $commit.RefID}} + + + {{if $entry.IsSubModule}} + {{svg "octicon-file-submodule" 16}} + {{$refURL := $commit.RefURL AppUrl $.Repository.FullName}} + {{if $refURL}} + {{$entry.Name}}@{{ShortSha $commit.RefID}} + {{else}} + {{$entry.Name}}@{{ShortSha $commit.RefID}} + {{end}} {{else}} - {{$entry.Name}} @ {{ShortSha $commit.RefID}} + {{if $entry.IsDir}} + {{$subJumpablePathName := $entry.GetSubJumpablePathName}} + {{$subJumpablePath := SubJumpablePath $subJumpablePathName}} + {{svg "octicon-file-directory" 16}} + + {{if eq (len $subJumpablePath) 2}} + {{index $subJumpablePath 0}}{{index $subJumpablePath 1}} + {{else}} + {{index $subJumpablePath 0}} + {{end}} + + {{else}} + {{svg (printf "octicon-%s" (EntryIcon $entry)) 16}} + {{$entry.Name}} + {{end}} {{end}} - - {{else}} - - {{if $entry.IsDir}} - {{$subJumpablePathName := $entry.GetSubJumpablePathName}} - {{$subJumpablePath := SubJumpablePath $subJumpablePathName}} - {{svg "octicon-file-directory" 16}} - - {{if eq (len $subJumpablePath) 2}} - {{index $subJumpablePath 0}}{{index $subJumpablePath 1}} - {{else}} - {{index $subJumpablePath 0}} - {{end}} - - {{else}} - {{svg (printf "octicon-%s" (EntryIcon $entry)) 16}} - {{$entry.Name}} - {{end}} - - {{end}} + + - {{$commit.Summary | RenderEmoji}} + + {{$commit.Summary | RenderEmoji}} + {{TimeSince $commit.Committer.When $.Lang}} diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index c149cc4fe41db..26423ff29f2f0 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -361,14 +361,23 @@ width: 120px; } - > a { - width: calc(100% - 8px); /* prevent overflow into adjacant cell */ - display: inline-block; - padding-top: 8px; - padding-bottom: 8px; + .truncate { + display: inline-flex; + align-items: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; + width: 100%; + } + + a { + padding-top: 8px; + padding-bottom: 8px; + } + + .at { + margin-left: 3px; + margin-right: 3px; } > * { diff --git a/web_src/less/helpers.less b/web_src/less/helpers.less new file mode 100644 index 0000000000000..d854d288076e0 --- /dev/null +++ b/web_src/less/helpers.less @@ -0,0 +1,6 @@ +.flex-0 { + flex: 0; +} +.flex-1 { + flex: 1; +} diff --git a/web_src/less/index.less b/web_src/less/index.less index 92b25e1db12a3..bcc0d54d87d89 100644 --- a/web_src/less/index.less +++ b/web_src/less/index.less @@ -1,5 +1,6 @@ @import "~font-awesome/css/font-awesome.css"; +@import "./helpers.less"; @import "./features/gitgraph.less"; @import "./features/animations.less"; @import "./markdown/mermaid.less"; From 65444c5ea3b8ee417f0e1194e6e46740256f8cbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=99=BA=E8=B6=85?= <1012112796@qq.com> Date: Thu, 27 Aug 2020 00:39:45 +0800 Subject: [PATCH 45/54] Add link to home page on swagger ui (#12601) * Add link to home page on swagger ui Signed-off-by: a1012112796 <1012112796@qq.com> * translate * Apply review suggestion * Move to right, Thanks @silverwind * tweaks Co-authored-by: silverwind Co-authored-by: John Olheiser Co-authored-by: techknowlogick --- options/locale/locale_en-US.ini | 1 + templates/swagger/ui.tmpl | 25 ++++++++++++++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 00c5ed60764f8..388348e95c694 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -21,6 +21,7 @@ signed_in_as = Signed in as enable_javascript = This website works better with JavaScript. toc = Table of Contents licenses = Licenses +return_to_gitea = Return to Gitea username = Username email = Email Address diff --git a/templates/swagger/ui.tmpl b/templates/swagger/ui.tmpl index 9072b49a37d83..eb30578aca7f2 100644 --- a/templates/swagger/ui.tmpl +++ b/templates/swagger/ui.tmpl @@ -6,19 +6,34 @@ + {{svg "octicon-reply" 16}}{{.i18n.Tr "return_to_gitea"}}
From e25d4867be295218eb9268f8a6416b7d9247ef75 Mon Sep 17 00:00:00 2001 From: silverwind Date: Wed, 26 Aug 2020 19:42:46 +0200 Subject: [PATCH 46/54] Extract Swagger CSS to its own file (#12616) --- templates/swagger/ui.tmpl | 27 ------------------------ web_src/less/standalone/swagger.less | 31 ++++++++++++++++++++++++++++ webpack.config.js | 1 + 3 files changed, 32 insertions(+), 27 deletions(-) create mode 100644 web_src/less/standalone/swagger.less diff --git a/templates/swagger/ui.tmpl b/templates/swagger/ui.tmpl index eb30578aca7f2..7ad39dd8e0c2f 100644 --- a/templates/swagger/ui.tmpl +++ b/templates/swagger/ui.tmpl @@ -4,33 +4,6 @@ Gitea API - {{svg "octicon-reply" 16}}{{.i18n.Tr "return_to_gitea"}} diff --git a/web_src/less/standalone/swagger.less b/web_src/less/standalone/swagger.less new file mode 100644 index 0000000000000..c34469bede3fd --- /dev/null +++ b/web_src/less/standalone/swagger.less @@ -0,0 +1,31 @@ +html { + box-sizing: border-box; + overflow-y: scroll; +} + +*, +*:before, +*:after { + box-sizing: inherit; +} + +body { + margin: 0; + background: #fff; +} + +.swagger-back-link { + color: #1f69c0; + text-decoration: none; + position: absolute; + top: 1rem; + right: 1.5rem; + display: flex; + align-items: center; +} + +.swagger-back-link svg { + color: inherit; + fill: currentColor; + margin-right: .5rem; +} diff --git a/webpack.config.js b/webpack.config.js index 9a69c550f2021..b8c26daceec21 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -50,6 +50,7 @@ module.exports = { ], swagger: [ resolve(__dirname, 'web_src/js/standalone/swagger.js'), + resolve(__dirname, 'web_src/less/standalone/swagger.less'), ], serviceworker: [ resolve(__dirname, 'web_src/js/serviceworker.js'), From f8601f3f099b9b0cf98085fec94734c39c013bee Mon Sep 17 00:00:00 2001 From: silverwind Date: Thu, 27 Aug 2020 22:45:37 +0200 Subject: [PATCH 47/54] Fix ellipsis in files table (#12617) Turns out text ellispsis does not work in combination with flexbox and while wrapping in a display:block can help in some cases, I could not get this to work properly so this changes the truncate to inline-block again and reduces the clickable area to just vertical expansion from the links. --- templates/repo/view_list.tmpl | 8 ++++---- web_src/less/_repository.less | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl index 36c3024d1dbf4..2e70f4ff84b17 100644 --- a/templates/repo/view_list.tmpl +++ b/templates/repo/view_list.tmpl @@ -49,7 +49,7 @@ {{svg "octicon-file-submodule" 16}} {{$refURL := $commit.RefURL AppUrl $.Repository.FullName}} {{if $refURL}} - {{$entry.Name}}@{{ShortSha $commit.RefID}} + {{$entry.Name}}@{{ShortSha $commit.RefID}} {{else}} {{$entry.Name}}@{{ShortSha $commit.RefID}} {{end}} @@ -58,7 +58,7 @@ {{$subJumpablePathName := $entry.GetSubJumpablePathName}} {{$subJumpablePath := SubJumpablePath $subJumpablePathName}} {{svg "octicon-file-directory" 16}} - + {{if eq (len $subJumpablePath) 2}} {{index $subJumpablePath 0}}{{index $subJumpablePath 1}} {{else}} @@ -67,14 +67,14 @@ {{else}} {{svg (printf "octicon-%s" (EntryIcon $entry)) 16}} - {{$entry.Name}} + {{$entry.Name}} {{end}} {{end}} - {{$commit.Summary | RenderEmoji}} + {{$commit.Summary | RenderEmoji}} {{TimeSince $commit.Committer.When $.Lang}} diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index 26423ff29f2f0..80fb8edcf7c55 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -362,12 +362,13 @@ } .truncate { - display: inline-flex; - align-items: center; + display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; + padding-top: 8px; + padding-bottom: 8px; } a { From ed2f6e137be8fe3c85292e8344b5bb5cfb56891d Mon Sep 17 00:00:00 2001 From: GiteaBot Date: Thu, 27 Aug 2020 20:46:30 +0000 Subject: [PATCH 48/54] [skip ci] Updated translations via Crowdin --- options/locale/locale_ja-JP.ini | 1 + options/locale/locale_tr-TR.ini | 1 + 2 files changed, 2 insertions(+) diff --git a/options/locale/locale_ja-JP.ini b/options/locale/locale_ja-JP.ini index 1f3c949d014d3..73ee62ed0e165 100644 --- a/options/locale/locale_ja-JP.ini +++ b/options/locale/locale_ja-JP.ini @@ -21,6 +21,7 @@ signed_in_as=サインイン済み enable_javascript=このサイトはJavaScriptを使用しています toc=目次 licenses=ライセンス +return_to_gitea=Giteaに戻る username=ユーザー名 email=メールアドレス diff --git a/options/locale/locale_tr-TR.ini b/options/locale/locale_tr-TR.ini index b23ce691f5d8b..1f9bdabd8f278 100644 --- a/options/locale/locale_tr-TR.ini +++ b/options/locale/locale_tr-TR.ini @@ -21,6 +21,7 @@ signed_in_as=Giriş yapan: enable_javascript=Bu web sitesi JavaScript ile daha iyi çalışır. toc=İçindekiler Tablosu licenses=Lisanslar +return_to_gitea=Gitea'ya Dön username=Kullanıcı Adı email=E-posta Adresi From 211321fb936683815c4033fdfb9ac46af8a3b357 Mon Sep 17 00:00:00 2001 From: John Olheiser Date: Thu, 27 Aug 2020 20:36:37 -0500 Subject: [PATCH 49/54] Git migration UX (#12619) * Initial work Signed-off-by: jolheiser * Implementation Signed-off-by: jolheiser * Fix gitlab and token cloning Signed-off-by: jolheiser * Imports and JS Signed-off-by: jolheiser * Fix test Signed-off-by: jolheiser * Linting Signed-off-by: jolheiser * Generate swagger Signed-off-by: jolheiser * Move mirror toggle and rename options Signed-off-by: jolheiser Co-authored-by: Lauris BH Co-authored-by: Lunny Xiao --- modules/auth/repo_form.go | 2 + modules/migrations/base/downloader.go | 8 +- modules/migrations/base/release.go | 2 +- modules/migrations/base/uploader.go | 2 +- modules/migrations/git.go | 6 ++ modules/migrations/gitea.go | 13 +-- modules/migrations/gitea_test.go | 2 +- modules/migrations/github.go | 63 +++++++------ modules/migrations/github_test.go | 2 +- modules/migrations/gitlab.go | 57 ++++++------ modules/migrations/gitlab_test.go | 2 +- modules/migrations/migrate.go | 13 +-- modules/structs/repo.go | 27 ++++++ options/locale/locale_en-US.ini | 10 +- routers/repo/repo.go | 16 ++-- templates/repo/migrate.tmpl | 126 ++++++++++++++------------ templates/swagger/v1_json.tmpl | 9 ++ web_src/js/features/migration.js | 53 +++++++++++ web_src/js/index.js | 28 +----- web_src/less/_form.less | 5 + 20 files changed, 269 insertions(+), 177 deletions(-) create mode 100644 web_src/js/features/migration.js diff --git a/modules/auth/repo_form.go b/modules/auth/repo_form.go index 696d3b9a535d5..b3fead7da97ac 100644 --- a/modules/auth/repo_form.go +++ b/modules/auth/repo_form.go @@ -56,8 +56,10 @@ func (f *CreateRepoForm) Validate(ctx *macaron.Context, errs binding.Errors) bin type MigrateRepoForm struct { // required: true CloneAddr string `json:"clone_addr" binding:"Required"` + Service int `json:"service"` AuthUsername string `json:"auth_username"` AuthPassword string `json:"auth_password"` + AuthToken string `json:"auth_token"` // required: true UID int64 `json:"uid" binding:"Required"` // required: true diff --git a/modules/migrations/base/downloader.go b/modules/migrations/base/downloader.go index c31f3df1d19e0..b692969ba5011 100644 --- a/modules/migrations/base/downloader.go +++ b/modules/migrations/base/downloader.go @@ -7,13 +7,20 @@ package base import ( "context" + "io" "time" "code.gitea.io/gitea/modules/structs" ) +// AssetDownloader downloads an asset (attachment) for a release +type AssetDownloader interface { + GetAsset(tag string, id int64) (io.ReadCloser, error) +} + // Downloader downloads the site repo informations type Downloader interface { + AssetDownloader SetContext(context.Context) GetRepoInfo() (*Repository, error) GetTopics() ([]string, error) @@ -28,7 +35,6 @@ type Downloader interface { // DownloaderFactory defines an interface to match a downloader implementation and create a downloader type DownloaderFactory interface { - Match(opts MigrateOptions) (bool, error) New(opts MigrateOptions) (Downloader, error) GitServiceType() structs.GitServiceType } diff --git a/modules/migrations/base/release.go b/modules/migrations/base/release.go index b2541f1bf5016..2a223920c77c6 100644 --- a/modules/migrations/base/release.go +++ b/modules/migrations/base/release.go @@ -8,7 +8,7 @@ import "time" // ReleaseAsset represents a release asset type ReleaseAsset struct { - URL string + ID int64 Name string ContentType *string Size *int diff --git a/modules/migrations/base/uploader.go b/modules/migrations/base/uploader.go index 85ad60fe0e5aa..07c2bb0d42396 100644 --- a/modules/migrations/base/uploader.go +++ b/modules/migrations/base/uploader.go @@ -11,7 +11,7 @@ type Uploader interface { CreateRepo(repo *Repository, opts MigrateOptions) error CreateTopics(topic ...string) error CreateMilestones(milestones ...*Milestone) error - CreateReleases(releases ...*Release) error + CreateReleases(downloader Downloader, releases ...*Release) error SyncTags() error CreateLabels(labels ...*Label) error CreateIssues(issues ...*Issue) error diff --git a/modules/migrations/git.go b/modules/migrations/git.go index af345808b56b7..5c9acb2533f29 100644 --- a/modules/migrations/git.go +++ b/modules/migrations/git.go @@ -6,6 +6,7 @@ package migrations import ( "context" + "io" "code.gitea.io/gitea/modules/migrations/base" ) @@ -64,6 +65,11 @@ func (g *PlainGitDownloader) GetReleases() ([]*base.Release, error) { return nil, ErrNotSupported } +// GetAsset returns an asset +func (g *PlainGitDownloader) GetAsset(_ string, _ int64) (io.ReadCloser, error) { + return nil, ErrNotSupported +} + // GetIssues returns issues according page and perPage func (g *PlainGitDownloader) GetIssues(page, perPage int) ([]*base.Issue, bool, error) { return nil, false, ErrNotSupported diff --git a/modules/migrations/gitea.go b/modules/migrations/gitea.go index 8c097e143cb07..082ddcd5fb0e8 100644 --- a/modules/migrations/gitea.go +++ b/modules/migrations/gitea.go @@ -93,12 +93,15 @@ func (g *GiteaLocalUploader) CreateRepo(repo *base.Repository, opts base.Migrate } var remoteAddr = repo.CloneURL - if len(opts.AuthUsername) > 0 { + if len(opts.AuthToken) > 0 || len(opts.AuthUsername) > 0 { u, err := url.Parse(repo.CloneURL) if err != nil { return err } u.User = url.UserPassword(opts.AuthUsername, opts.AuthPassword) + if len(opts.AuthToken) > 0 { + u.User = url.UserPassword("oauth2", opts.AuthToken) + } remoteAddr = u.String() } @@ -210,7 +213,7 @@ func (g *GiteaLocalUploader) CreateLabels(labels ...*base.Label) error { } // CreateReleases creates releases -func (g *GiteaLocalUploader) CreateReleases(releases ...*base.Release) error { +func (g *GiteaLocalUploader) CreateReleases(downloader base.Downloader, releases ...*base.Release) error { var rels = make([]*models.Release, 0, len(releases)) for _, release := range releases { var rel = models.Release{ @@ -269,13 +272,11 @@ func (g *GiteaLocalUploader) CreateReleases(releases ...*base.Release) error { // download attachment err = func() error { - resp, err := http.Get(asset.URL) + rc, err := downloader.GetAsset(rel.TagName, asset.ID) if err != nil { return err } - defer resp.Body.Close() - - _, err = storage.Attachments.Save(attach.RelativePath(), resp.Body) + _, err = storage.Attachments.Save(attach.RelativePath(), rc) return err }() if err != nil { diff --git a/modules/migrations/gitea_test.go b/modules/migrations/gitea_test.go index c0d2dcd180265..02b2f0a5c9f5e 100644 --- a/modules/migrations/gitea_test.go +++ b/modules/migrations/gitea_test.go @@ -26,7 +26,7 @@ func TestGiteaUploadRepo(t *testing.T) { user := models.AssertExistsAndLoadBean(t, &models.User{ID: 1}).(*models.User) var ( - downloader = NewGithubDownloaderV3("", "", "go-xorm", "builder") + downloader = NewGithubDownloaderV3("", "", "", "go-xorm", "builder") repoName = "builder-" + time.Now().Format("2006-01-02-15-04-05") uploader = NewGiteaLocalUploader(graceful.GetManager().HammerContext(), user, user.Name, repoName) ) diff --git a/modules/migrations/github.go b/modules/migrations/github.go index 97d62b994f213..eb73a7e0d4038 100644 --- a/modules/migrations/github.go +++ b/modules/migrations/github.go @@ -6,8 +6,11 @@ package migrations import ( + "bytes" "context" "fmt" + "io" + "io/ioutil" "net/http" "net/url" "strings" @@ -37,16 +40,6 @@ func init() { type GithubDownloaderV3Factory struct { } -// Match returns ture if the migration remote URL matched this downloader factory -func (f *GithubDownloaderV3Factory) Match(opts base.MigrateOptions) (bool, error) { - u, err := url.Parse(opts.CloneAddr) - if err != nil { - return false, err - } - - return strings.EqualFold(u.Host, "github.com") && opts.AuthUsername != "", nil -} - // New returns a Downloader related to this factory according MigrateOptions func (f *GithubDownloaderV3Factory) New(opts base.MigrateOptions) (base.Downloader, error) { u, err := url.Parse(opts.CloneAddr) @@ -60,7 +53,7 @@ func (f *GithubDownloaderV3Factory) New(opts base.MigrateOptions) (base.Download log.Trace("Create github downloader: %s/%s", oldOwner, oldName) - return NewGithubDownloaderV3(opts.AuthUsername, opts.AuthPassword, oldOwner, oldName), nil + return NewGithubDownloaderV3(opts.AuthUsername, opts.AuthPassword, opts.AuthToken, oldOwner, oldName), nil } // GitServiceType returns the type of git service @@ -81,7 +74,7 @@ type GithubDownloaderV3 struct { } // NewGithubDownloaderV3 creates a github Downloader via github v3 API -func NewGithubDownloaderV3(userName, password, repoOwner, repoName string) *GithubDownloaderV3 { +func NewGithubDownloaderV3(userName, password, token, repoOwner, repoName string) *GithubDownloaderV3 { var downloader = GithubDownloaderV3{ userName: userName, password: password, @@ -90,23 +83,19 @@ func NewGithubDownloaderV3(userName, password, repoOwner, repoName string) *Gith repoName: repoName, } - var client *http.Client - if userName != "" { - if password == "" { - ts := oauth2.StaticTokenSource( - &oauth2.Token{AccessToken: userName}, - ) - client = oauth2.NewClient(downloader.ctx, ts) - } else { - client = &http.Client{ - Transport: &http.Transport{ - Proxy: func(req *http.Request) (*url.URL, error) { - req.SetBasicAuth(userName, password) - return nil, nil - }, - }, - } - } + client := &http.Client{ + Transport: &http.Transport{ + Proxy: func(req *http.Request) (*url.URL, error) { + req.SetBasicAuth(userName, password) + return nil, nil + }, + }, + } + if token != "" { + ts := oauth2.StaticTokenSource( + &oauth2.Token{AccessToken: token}, + ) + client = oauth2.NewClient(downloader.ctx, ts) } downloader.client = github.NewClient(client) return &downloader @@ -290,10 +279,8 @@ func (g *GithubDownloaderV3) convertGithubRelease(rel *github.RepositoryRelease) } for _, asset := range rel.Assets { - u, _ := url.Parse(*asset.BrowserDownloadURL) - u.User = url.UserPassword(g.userName, g.password) r.Assets = append(r.Assets, base.ReleaseAsset{ - URL: u.String(), + ID: *asset.ID, Name: *asset.Name, ContentType: asset.ContentType, Size: asset.Size, @@ -331,6 +318,18 @@ func (g *GithubDownloaderV3) GetReleases() ([]*base.Release, error) { return releases, nil } +// GetAsset returns an asset +func (g *GithubDownloaderV3) GetAsset(_ string, id int64) (io.ReadCloser, error) { + asset, redir, err := g.client.Repositories.DownloadReleaseAsset(g.ctx, g.repoOwner, g.repoName, id, http.DefaultClient) + if err != nil { + return nil, err + } + if asset == nil { + return ioutil.NopCloser(bytes.NewBufferString(redir)), nil + } + return asset, nil +} + // GetIssues returns issues according start and limit func (g *GithubDownloaderV3) GetIssues(page, perPage int) ([]*base.Issue, bool, error) { opt := &github.IssueListByRepoOptions{ diff --git a/modules/migrations/github_test.go b/modules/migrations/github_test.go index 814c771e8c2b4..0b8c559d305f4 100644 --- a/modules/migrations/github_test.go +++ b/modules/migrations/github_test.go @@ -64,7 +64,7 @@ func assertLabelEqual(t *testing.T, name, color, description string, label *base func TestGitHubDownloadRepo(t *testing.T) { GithubLimitRateRemaining = 3 //Wait at 3 remaining since we could have 3 CI in // - downloader := NewGithubDownloaderV3(os.Getenv("GITHUB_READ_TOKEN"), "", "go-gitea", "test_repo") + downloader := NewGithubDownloaderV3("", "", os.Getenv("GITHUB_READ_TOKEN"), "go-gitea", "test_repo") err := downloader.RefreshRate() assert.NoError(t, err) diff --git a/modules/migrations/gitlab.go b/modules/migrations/gitlab.go index 4f218c95f1f99..eec16d24333a1 100644 --- a/modules/migrations/gitlab.go +++ b/modules/migrations/gitlab.go @@ -8,6 +8,8 @@ import ( "context" "errors" "fmt" + "io" + "net/http" "net/url" "strings" "time" @@ -32,21 +34,6 @@ func init() { type GitlabDownloaderFactory struct { } -// Match returns true if the migration remote URL matched this downloader factory -func (f *GitlabDownloaderFactory) Match(opts base.MigrateOptions) (bool, error) { - var matched bool - - u, err := url.Parse(opts.CloneAddr) - if err != nil { - return false, err - } - if strings.EqualFold(u.Host, "gitlab.com") && opts.AuthUsername != "" { - matched = true - } - - return matched, nil -} - // New returns a Downloader related to this factory according MigrateOptions func (f *GitlabDownloaderFactory) New(opts base.MigrateOptions) (base.Downloader, error) { u, err := url.Parse(opts.CloneAddr) @@ -56,10 +43,11 @@ func (f *GitlabDownloaderFactory) New(opts base.MigrateOptions) (base.Downloader baseURL := u.Scheme + "://" + u.Host repoNameSpace := strings.TrimPrefix(u.Path, "/") + repoNameSpace = strings.TrimSuffix(repoNameSpace, ".git") log.Trace("Create gitlab downloader. BaseURL: %s RepoName: %s", baseURL, repoNameSpace) - return NewGitlabDownloader(baseURL, repoNameSpace, opts.AuthUsername, opts.AuthPassword), nil + return NewGitlabDownloader(baseURL, repoNameSpace, opts.AuthUsername, opts.AuthPassword, opts.AuthToken), nil } // GitServiceType returns the type of git service @@ -85,15 +73,13 @@ type GitlabDownloader struct { // NewGitlabDownloader creates a gitlab Downloader via gitlab API // Use either a username/password, personal token entered into the username field, or anonymous/public access // Note: Public access only allows very basic access -func NewGitlabDownloader(baseURL, repoPath, username, password string) *GitlabDownloader { +func NewGitlabDownloader(baseURL, repoPath, username, password, token string) *GitlabDownloader { var gitlabClient *gitlab.Client var err error - if username != "" { - if password == "" { - gitlabClient, err = gitlab.NewClient(username, gitlab.WithBaseURL(baseURL)) - } else { - gitlabClient, err = gitlab.NewBasicAuthClient(username, password, gitlab.WithBaseURL(baseURL)) - } + if token != "" { + gitlabClient, err = gitlab.NewClient(token, gitlab.WithBaseURL(baseURL)) + } else { + gitlabClient, err = gitlab.NewBasicAuthClient(username, password, gitlab.WithBaseURL(baseURL)) } if err != nil { @@ -271,7 +257,7 @@ func (g *GitlabDownloader) GetLabels() ([]*base.Label, error) { } func (g *GitlabDownloader) convertGitlabRelease(rel *gitlab.Release) *base.Release { - + var zero int r := &base.Release{ TagName: rel.TagName, TargetCommitish: rel.Commit.ID, @@ -284,9 +270,11 @@ func (g *GitlabDownloader) convertGitlabRelease(rel *gitlab.Release) *base.Relea for k, asset := range rel.Assets.Links { r.Assets = append(r.Assets, base.ReleaseAsset{ - URL: asset.URL, - Name: asset.Name, - ContentType: &rel.Assets.Sources[k].Format, + ID: int64(asset.ID), + Name: asset.Name, + ContentType: &rel.Assets.Sources[k].Format, + Size: &zero, + DownloadCount: &zero, }) } return r @@ -315,6 +303,21 @@ func (g *GitlabDownloader) GetReleases() ([]*base.Release, error) { return releases, nil } +// GetAsset returns an asset +func (g *GitlabDownloader) GetAsset(tag string, id int64) (io.ReadCloser, error) { + link, _, err := g.client.ReleaseLinks.GetReleaseLink(g.repoID, tag, int(id)) + if err != nil { + return nil, err + } + resp, err := http.Get(link.URL) + if err != nil { + return nil, err + } + + // resp.Body is closed by the uploader + return resp.Body, nil +} + // GetIssues returns issues according start and limit // Note: issue label description and colors are not supported by the go-gitlab library at this time // TODO: figure out how to transfer issue reactions diff --git a/modules/migrations/gitlab_test.go b/modules/migrations/gitlab_test.go index 003da5bbdfd10..daf05f8e3a6fa 100644 --- a/modules/migrations/gitlab_test.go +++ b/modules/migrations/gitlab_test.go @@ -27,7 +27,7 @@ func TestGitlabDownloadRepo(t *testing.T) { t.Skipf("Can't access test repo, skipping %s", t.Name()) } - downloader := NewGitlabDownloader("https://gitlab.com", "gitea/test_repo", gitlabPersonalAccessToken, "") + downloader := NewGitlabDownloader("https://gitlab.com", "gitea/test_repo", "", "", gitlabPersonalAccessToken) if downloader == nil { t.Fatal("NewGitlabDownloader is nil") } diff --git a/modules/migrations/migrate.go b/modules/migrations/migrate.go index c970ba6920883..7858dfc6850c6 100644 --- a/modules/migrations/migrate.go +++ b/modules/migrations/migrate.go @@ -13,7 +13,6 @@ import ( "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/migrations/base" "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/structs" ) // MigrateOptions is equal to base.MigrateOptions @@ -33,18 +32,15 @@ func MigrateRepository(ctx context.Context, doer *models.User, ownerName string, var ( downloader base.Downloader uploader = NewGiteaLocalUploader(ctx, doer, ownerName, opts.RepoName) - theFactory base.DownloaderFactory + err error ) for _, factory := range factories { - if match, err := factory.Match(opts); err != nil { - return nil, err - } else if match { + if factory.GitServiceType() == opts.GitServiceType { downloader, err = factory.New(opts) if err != nil { return nil, err } - theFactory = factory break } } @@ -57,11 +53,8 @@ func MigrateRepository(ctx context.Context, doer *models.User, ownerName string, opts.Comments = false opts.Issues = false opts.PullRequests = false - opts.GitServiceType = structs.PlainGitService downloader = NewPlainGitDownloader(ownerName, opts.RepoName, opts.CloneAddr) log.Trace("Will migrate from git: %s", opts.OriginalURL) - } else if opts.GitServiceType == structs.NotMigrated { - opts.GitServiceType = theFactory.GitServiceType() } uploader.gitServiceType = opts.GitServiceType @@ -169,7 +162,7 @@ func migrateRepository(downloader base.Downloader, uploader base.Uploader, opts relBatchSize = len(releases) } - if err := uploader.CreateReleases(releases[:relBatchSize]...); err != nil { + if err := uploader.CreateReleases(downloader, releases[:relBatchSize]...); err != nil { return err } releases = releases[relBatchSize:] diff --git a/modules/structs/repo.go b/modules/structs/repo.go index 217a6f74adc7b..808d2ffbc8ed0 100644 --- a/modules/structs/repo.go +++ b/modules/structs/repo.go @@ -218,6 +218,32 @@ func (gt GitServiceType) Name() string { return "" } +// Title represents the service type's proper title +func (gt GitServiceType) Title() string { + switch gt { + case GithubService: + return "GitHub" + case GiteaService: + return "Gitea" + case GitlabService: + return "GitLab" + case GogsService: + return "Gogs" + case PlainGitService: + return "Git" + } + return "" +} + +// TokenAuth represents whether a service type supports token-based auth +func (gt GitServiceType) TokenAuth() bool { + switch gt { + case GithubService, GiteaService, GitlabService: + return true + } + return false +} + var ( // SupportedFullGitService represents all git services supported to migrate issues/labels/prs and etc. // TODO: add to this list after new git service added @@ -233,6 +259,7 @@ type MigrateRepoOption struct { CloneAddr string `json:"clone_addr" binding:"Required"` AuthUsername string `json:"auth_username"` AuthPassword string `json:"auth_password"` + AuthToken string `json:"auth_token"` // required: true UID int `json:"uid" binding:"Required"` // required: true diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 388348e95c694..5aeffc758024e 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -26,6 +26,7 @@ return_to_gitea = Return to Gitea username = Username email = Email Address password = Password +access_token = Access Token re_type = Re-Type Password captcha = CAPTCHA twofa = Two-Factor Authentication @@ -707,9 +708,10 @@ form.name_reserved = The repository name '%s' is reserved. form.name_pattern_not_allowed = The pattern '%s' is not allowed in a repository name. need_auth = Clone Authorization -migrate_type = Migration Type -migrate_type_helper = This repository will be a mirror -migrate_type_helper_disabled = Your site administrator has disabled new mirrors. +migrate_options = Migration Options +migrate_service = Migration Service +migrate_options_mirror_helper = This repository will be a mirror +migrate_options_mirror_disabled = Your site administrator has disabled new mirrors. migrate_items = Migration Items migrate_items_wiki = Wiki migrate_items_milestones = Milestones @@ -725,7 +727,7 @@ migrate.permission_denied = You are not allowed to import local repositories. migrate.invalid_local_path = "The local path is invalid. It does not exist or is not a directory." migrate.failed = Migration failed: %v migrate.lfs_mirror_unsupported = Mirroring LFS objects is not supported - use 'git lfs fetch --all' and 'git lfs push --all' instead. -migrate.migrate_items_options = When migrating from github, input a username and migration options will be displayed. +migrate.migrate_items_options = Authentication is needed to migrate items from a service that supports them. migrated_from = Migrated from %[2]s migrated_from_fake = Migrated From %[1]s migrate.migrating = Migrating from %s ... diff --git a/routers/repo/repo.go b/routers/repo/repo.go index 27c8ff1e03ebb..71df2d0cb75b7 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -7,7 +7,6 @@ package repo import ( "fmt" - "net/url" "os" "path" "strings" @@ -269,6 +268,9 @@ func Migrate(ctx *context.Context) { ctx.Data["pull_requests"] = ctx.Query("pull_requests") == "1" ctx.Data["releases"] = ctx.Query("releases") == "1" ctx.Data["LFSActive"] = setting.LFS.StartServer + // Plain git should be first + ctx.Data["service"] = structs.PlainGitService + ctx.Data["Services"] = append([]structs.GitServiceType{structs.PlainGitService}, structs.SupportedFullGitService...) ctxUser := checkContextUser(ctx, ctx.QueryInt64("org")) if ctx.Written() { @@ -316,6 +318,9 @@ func handleMigrateError(ctx *context.Context, owner *models.User, err error, nam // MigratePost response for migrating from external git repository func MigratePost(ctx *context.Context, form auth.MigrateRepoForm) { ctx.Data["Title"] = ctx.Tr("new_migrate") + // Plain git should be first + ctx.Data["service"] = structs.PlainGitService + ctx.Data["Services"] = append([]structs.GitServiceType{structs.PlainGitService}, structs.SupportedFullGitService...) ctxUser := checkContextUser(ctx, form.UID) if ctx.Written() { @@ -349,15 +354,9 @@ func MigratePost(ctx *context.Context, form auth.MigrateRepoForm) { return } - var gitServiceType = structs.PlainGitService - u, err := url.Parse(form.CloneAddr) - if err == nil && strings.EqualFold(u.Host, "github.com") { - gitServiceType = structs.GithubService - } - var opts = migrations.MigrateOptions{ OriginalURL: form.CloneAddr, - GitServiceType: gitServiceType, + GitServiceType: structs.GitServiceType(form.Service), CloneAddr: remoteAddr, RepoName: form.RepoName, Description: form.Description, @@ -365,6 +364,7 @@ func MigratePost(ctx *context.Context, form auth.MigrateRepoForm) { Mirror: form.Mirror && !setting.Repository.DisableMirrors, AuthUsername: form.AuthUsername, AuthPassword: form.AuthPassword, + AuthToken: form.AuthToken, Wiki: form.Wiki, Issues: form.Issues, Milestones: form.Milestones, diff --git a/templates/repo/migrate.tmpl b/templates/repo/migrate.tmpl index 60b432beaa268..d5a31a680095b 100644 --- a/templates/repo/migrate.tmpl +++ b/templates/repo/migrate.tmpl @@ -14,83 +14,52 @@ {{.i18n.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{.i18n.Tr "repo.migrate.clone_local_path"}}{{end}} -
{{.i18n.Tr "repo.migrate.migrate_items_options"}} {{if .LFSActive}}
{{.i18n.Tr "repo.migrate.lfs_mirror_unsupported"}}{{end}}
-
-
- - {{.i18n.Tr "repo.need_auth"}} -
-
-
- - -
- -
- - -
-
-
-
- -
- -