forked from mirror/gitea
Compare commits
25 Commits
e3e08dcc51
...
13921569dd
Author | SHA1 | Date | |
---|---|---|---|
yp05327 | 13921569dd | ||
silverwind | 8fe26fb314 | ||
silverwind | f73d891fc4 | ||
silverwind | 8717c1c2be | ||
wxiaoguang | 8e79aed573 | ||
silverwind | bbaf62589f | ||
Lunny Xiao | 475b6e839c | ||
Jason Song | c6c4d66004 | ||
Yarden Shoham | 2e31a2800e | ||
Yarden Shoham | 428e05662f | ||
Yarden Shoham | a7d0c5de4c | ||
Yarden Shoham | 314cd1ec98 | ||
Lunny Xiao | 3f26fe2fa2 | ||
silverwind | ec3d467f15 | ||
silverwind | 0a2f973de9 | ||
silverwind | 8d93cea296 | ||
silverwind | 68ec9b4859 | ||
wxiaoguang | 4734d43e14 | ||
silverwind | 90a4f9a49e | ||
silverwind | 2d281704de | ||
silverwind | 5bd0773741 | ||
silverwind | f22fe4e194 | ||
silverwind | db01bf6cc8 | ||
silverwind | 9c6e6f4d1b | ||
silverwind | e4a481e0ca |
|
@ -303,7 +303,7 @@ rules:
|
||||||
jquery/no-in-array: [2]
|
jquery/no-in-array: [2]
|
||||||
jquery/no-is-array: [2]
|
jquery/no-is-array: [2]
|
||||||
jquery/no-is-function: [2]
|
jquery/no-is-function: [2]
|
||||||
jquery/no-is: [0]
|
jquery/no-is: [2]
|
||||||
jquery/no-load: [2]
|
jquery/no-load: [2]
|
||||||
jquery/no-map: [2]
|
jquery/no-map: [2]
|
||||||
jquery/no-merge: [2]
|
jquery/no-merge: [2]
|
||||||
|
@ -440,7 +440,7 @@ rules:
|
||||||
no-jquery/no-is-numeric: [2]
|
no-jquery/no-is-numeric: [2]
|
||||||
no-jquery/no-is-plain-object: [2]
|
no-jquery/no-is-plain-object: [2]
|
||||||
no-jquery/no-is-window: [2]
|
no-jquery/no-is-window: [2]
|
||||||
no-jquery/no-is: [0]
|
no-jquery/no-is: [2]
|
||||||
no-jquery/no-jquery-constructor: [0]
|
no-jquery/no-jquery-constructor: [0]
|
||||||
no-jquery/no-live: [2]
|
no-jquery/no-live: [2]
|
||||||
no-jquery/no-load-shorthand: [2]
|
no-jquery/no-load-shorthand: [2]
|
||||||
|
|
|
@ -30,7 +30,7 @@ rules:
|
||||||
"@stylistic/block-opening-brace-newline-after": null
|
"@stylistic/block-opening-brace-newline-after": null
|
||||||
"@stylistic/block-opening-brace-newline-before": null
|
"@stylistic/block-opening-brace-newline-before": null
|
||||||
"@stylistic/block-opening-brace-space-after": null
|
"@stylistic/block-opening-brace-space-after": null
|
||||||
"@stylistic/block-opening-brace-space-before": null
|
"@stylistic/block-opening-brace-space-before": always
|
||||||
"@stylistic/color-hex-case": lower
|
"@stylistic/color-hex-case": lower
|
||||||
"@stylistic/declaration-bang-space-after": never
|
"@stylistic/declaration-bang-space-after": never
|
||||||
"@stylistic/declaration-bang-space-before": null
|
"@stylistic/declaration-bang-space-before": null
|
||||||
|
@ -140,7 +140,7 @@ rules:
|
||||||
function-disallowed-list: null
|
function-disallowed-list: null
|
||||||
function-linear-gradient-no-nonstandard-direction: true
|
function-linear-gradient-no-nonstandard-direction: true
|
||||||
function-name-case: lower
|
function-name-case: lower
|
||||||
function-no-unknown: null
|
function-no-unknown: true
|
||||||
function-url-no-scheme-relative: null
|
function-url-no-scheme-relative: null
|
||||||
function-url-quotes: always
|
function-url-quotes: always
|
||||||
function-url-scheme-allowed-list: null
|
function-url-scheme-allowed-list: null
|
||||||
|
@ -168,7 +168,7 @@ rules:
|
||||||
no-duplicate-selectors: true
|
no-duplicate-selectors: true
|
||||||
no-empty-source: true
|
no-empty-source: true
|
||||||
no-invalid-double-slash-comments: true
|
no-invalid-double-slash-comments: true
|
||||||
no-invalid-position-at-import-rule: null
|
no-invalid-position-at-import-rule: [true, ignoreAtRules: [tailwind]]
|
||||||
no-irregular-whitespace: true
|
no-irregular-whitespace: true
|
||||||
no-unknown-animations: null
|
no-unknown-animations: null
|
||||||
no-unknown-custom-properties: null
|
no-unknown-custom-properties: null
|
||||||
|
@ -181,6 +181,7 @@ rules:
|
||||||
rule-empty-line-before: null
|
rule-empty-line-before: null
|
||||||
rule-selector-property-disallowed-list: null
|
rule-selector-property-disallowed-list: null
|
||||||
scale-unlimited/declaration-strict-value: [[/color$/, font-weight], {ignoreValues: /^(inherit|transparent|unset|initial|currentcolor|none)$/, ignoreFunctions: false, disableFix: true, expandShorthand: true}]
|
scale-unlimited/declaration-strict-value: [[/color$/, font-weight], {ignoreValues: /^(inherit|transparent|unset|initial|currentcolor|none)$/, ignoreFunctions: false, disableFix: true, expandShorthand: true}]
|
||||||
|
selector-anb-no-unmatchable: true
|
||||||
selector-attribute-name-disallowed-list: null
|
selector-attribute-name-disallowed-list: null
|
||||||
selector-attribute-operator-allowed-list: null
|
selector-attribute-operator-allowed-list: null
|
||||||
selector-attribute-operator-disallowed-list: null
|
selector-attribute-operator-disallowed-list: null
|
||||||
|
|
|
@ -17,6 +17,12 @@ menu:
|
||||||
|
|
||||||
# Repository indexer
|
# Repository indexer
|
||||||
|
|
||||||
|
## Builtin repository code search without indexer
|
||||||
|
|
||||||
|
Users could do repository-level code search without setting up a repository indexer.
|
||||||
|
The builtin code search is based on the `git grep` command, which is fast and efficient for small repositories.
|
||||||
|
Better code search support could be achieved by setting up the repository indexer.
|
||||||
|
|
||||||
## Setting up the repository indexer
|
## Setting up the repository indexer
|
||||||
|
|
||||||
Gitea can search through the files of the repositories by enabling this function in your [`app.ini`](administration/config-cheat-sheet.md):
|
Gitea can search through the files of the repositories by enabling this function in your [`app.ini`](administration/config-cheat-sheet.md):
|
||||||
|
|
|
@ -118,7 +118,7 @@ However, there are still some special cases, so the current guideline is:
|
||||||
### Show/Hide Elements
|
### Show/Hide Elements
|
||||||
|
|
||||||
* Vue components are recommended to use `v-if` and `v-show` to show/hide elements.
|
* Vue components are recommended to use `v-if` and `v-show` to show/hide elements.
|
||||||
* Go template code should use Gitea's `.gt-hidden` and `showElem()/hideElem()/toggleElem()`, see more details in `.gt-hidden`'s comment.
|
* Go template code should use `.tw-hidden` and `showElem()/hideElem()/toggleElem()`, see more details in `.tw-hidden`'s comment.
|
||||||
|
|
||||||
### Styles and Attributes in Go HTML Template
|
### Styles and Attributes in Go HTML Template
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ Gitea 使用一些补丁使 Fomantic UI 更具可访问性(参见 `aria.md`)
|
||||||
### 显示/隐藏元素
|
### 显示/隐藏元素
|
||||||
|
|
||||||
* 推荐在Vue组件中使用`v-if`和`v-show`来显示/隐藏元素。
|
* 推荐在Vue组件中使用`v-if`和`v-show`来显示/隐藏元素。
|
||||||
* Go 模板代码应使用 Gitea 的 `.gt-hidden` 和 `showElem()/hideElem()/toggleElem()` 来显示/隐藏元素,请参阅`.gt-hidden`的注释以获取更多详细信息。
|
* Go 模板代码应使用 `.tw-hidden` 和 `showElem()/hideElem()/toggleElem()` 来显示/隐藏元素,请参阅`.tw-hidden`的注释以获取更多详细信息。
|
||||||
|
|
||||||
### Go HTML 模板中的样式和属性
|
### Go HTML 模板中的样式和属性
|
||||||
|
|
||||||
|
|
|
@ -87,6 +87,9 @@ _Symbols used in table:_
|
||||||
| Git Blame | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| Git Blame | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| Visual comparison of image changes | ✓ | ✘ | ✓ | ? | ? | ? | ✘ | ✘ |
|
| Visual comparison of image changes | ✓ | ✘ | ✓ | ? | ? | ? | ✘ | ✘ |
|
||||||
|
|
||||||
|
- Gitea has builtin repository-level code search
|
||||||
|
- Better code search support could be achieved by [using a repository indexer](administration/repo-indexer.md)
|
||||||
|
|
||||||
## Issue Tracker
|
## Issue Tracker
|
||||||
|
|
||||||
| Feature | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE | RhodeCode EE |
|
| Feature | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE | RhodeCode EE |
|
||||||
|
|
|
@ -120,6 +120,16 @@ func (c *halfCommitter) Close() error {
|
||||||
|
|
||||||
// TxContext represents a transaction Context,
|
// TxContext represents a transaction Context,
|
||||||
// it will reuse the existing transaction in the parent context or create a new one.
|
// it will reuse the existing transaction in the parent context or create a new one.
|
||||||
|
// Some tips to use:
|
||||||
|
//
|
||||||
|
// 1 It's always recommended to use `WithTx` in new code instead of `TxContext`, since `WithTx` will handle the transaction automatically.
|
||||||
|
// 2. To maintain the old code which uses `TxContext`:
|
||||||
|
// a. Always call `Close()` before returning regardless of whether `Commit()` has been called.
|
||||||
|
// b. Always call `Commit()` before returning if there are no errors, even if the code did not change any data.
|
||||||
|
// c. Remember the `Committer` will be a halfCommitter when a transaction is being reused.
|
||||||
|
// So calling `Commit()` will do nothing, but calling `Close()` without calling `Commit()` will rollback the transaction.
|
||||||
|
// And all operations submitted by the caller stack will be rollbacked as well, not only the operations in the current function.
|
||||||
|
// d. It doesn't mean rollback is forbidden, but always do it only when there is an error, and you do want to rollback.
|
||||||
func TxContext(parentCtx context.Context) (*Context, Committer, error) {
|
func TxContext(parentCtx context.Context) (*Context, Committer, error) {
|
||||||
if sess, ok := inTransaction(parentCtx); ok {
|
if sess, ok := inTransaction(parentCtx); ok {
|
||||||
return newContext(parentCtx, sess, true), &halfCommitter{committer: sess}, nil
|
return newContext(parentCtx, sess, true), &halfCommitter{committer: sess}, nil
|
||||||
|
|
|
@ -21,7 +21,7 @@ import (
|
||||||
|
|
||||||
// IssuesOptions represents options of an issue.
|
// IssuesOptions represents options of an issue.
|
||||||
type IssuesOptions struct { //nolint
|
type IssuesOptions struct { //nolint
|
||||||
db.Paginator
|
Paginator *db.ListOptions
|
||||||
RepoIDs []int64 // overwrites RepoCond if the length is not 0
|
RepoIDs []int64 // overwrites RepoCond if the length is not 0
|
||||||
AllPublic bool // include also all public repositories
|
AllPublic bool // include also all public repositories
|
||||||
RepoCond builder.Cond
|
RepoCond builder.Cond
|
||||||
|
@ -104,23 +104,11 @@ func applyLimit(sess *xorm.Session, opts *IssuesOptions) *xorm.Session {
|
||||||
return sess
|
return sess
|
||||||
}
|
}
|
||||||
|
|
||||||
// Warning: Do not use GetSkipTake() for *db.ListOptions
|
start := 0
|
||||||
// Its implementation could reset the page size with setting.API.MaxResponseItems
|
if opts.Paginator.Page > 1 {
|
||||||
if listOptions, ok := opts.Paginator.(*db.ListOptions); ok {
|
start = (opts.Paginator.Page - 1) * opts.Paginator.PageSize
|
||||||
if listOptions.Page >= 0 && listOptions.PageSize > 0 {
|
|
||||||
var start int
|
|
||||||
if listOptions.Page == 0 {
|
|
||||||
start = 0
|
|
||||||
} else {
|
|
||||||
start = (listOptions.Page - 1) * listOptions.PageSize
|
|
||||||
}
|
|
||||||
sess.Limit(listOptions.PageSize, start)
|
|
||||||
}
|
|
||||||
return sess
|
|
||||||
}
|
}
|
||||||
|
sess.Limit(opts.Paginator.PageSize, start)
|
||||||
start, limit := opts.Paginator.GetSkipTake()
|
|
||||||
sess.Limit(limit, start)
|
|
||||||
|
|
||||||
return sess
|
return sess
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,13 +68,17 @@ func CountIssuesByRepo(ctx context.Context, opts *IssuesOptions) (map[int64]int6
|
||||||
}
|
}
|
||||||
|
|
||||||
// CountIssues number return of issues by given conditions.
|
// CountIssues number return of issues by given conditions.
|
||||||
func CountIssues(ctx context.Context, opts *IssuesOptions) (int64, error) {
|
func CountIssues(ctx context.Context, opts *IssuesOptions, otherConds ...builder.Cond) (int64, error) {
|
||||||
sess := db.GetEngine(ctx).
|
sess := db.GetEngine(ctx).
|
||||||
Select("COUNT(issue.id) AS count").
|
Select("COUNT(issue.id) AS count").
|
||||||
Table("issue").
|
Table("issue").
|
||||||
Join("INNER", "repository", "`issue`.repo_id = `repository`.id")
|
Join("INNER", "repository", "`issue`.repo_id = `repository`.id")
|
||||||
applyConditions(sess, opts)
|
applyConditions(sess, opts)
|
||||||
|
|
||||||
|
for _, cond := range otherConds {
|
||||||
|
sess.And(cond)
|
||||||
|
}
|
||||||
|
|
||||||
return sess.Count()
|
return sess.Count()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -620,7 +620,7 @@ func AddReviewRequest(ctx context.Context, issue *Issue, reviewer, doer *user_mo
|
||||||
|
|
||||||
// skip it when reviewer hase been request to review
|
// skip it when reviewer hase been request to review
|
||||||
if review != nil && review.Type == ReviewTypeRequest {
|
if review != nil && review.Type == ReviewTypeRequest {
|
||||||
return nil, nil
|
return nil, committer.Commit() // still commit the transaction, or committer.Close() will rollback it, even if it's a reused transaction.
|
||||||
}
|
}
|
||||||
|
|
||||||
// if the reviewer is an official reviewer,
|
// if the reviewer is an official reviewer,
|
||||||
|
|
|
@ -367,7 +367,6 @@ type RunStdError interface {
|
||||||
error
|
error
|
||||||
Unwrap() error
|
Unwrap() error
|
||||||
Stderr() string
|
Stderr() string
|
||||||
IsExitCode(code int) bool
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type runStdError struct {
|
type runStdError struct {
|
||||||
|
@ -392,9 +391,9 @@ func (r *runStdError) Stderr() string {
|
||||||
return r.stderr
|
return r.stderr
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *runStdError) IsExitCode(code int) bool {
|
func IsErrorExitCode(err error, code int) bool {
|
||||||
var exitError *exec.ExitError
|
var exitError *exec.ExitError
|
||||||
if errors.As(r.err, &exitError) {
|
if errors.As(err, &exitError) {
|
||||||
return exitError.ExitCode() == code
|
return exitError.ExitCode() == code
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
|
|
@ -341,7 +341,7 @@ func checkGitVersionCompatibility(gitVer *version.Version) error {
|
||||||
|
|
||||||
func configSet(key, value string) error {
|
func configSet(key, value string) error {
|
||||||
stdout, _, err := NewCommand(DefaultContext, "config", "--global", "--get").AddDynamicArguments(key).RunStdString(nil)
|
stdout, _, err := NewCommand(DefaultContext, "config", "--global", "--get").AddDynamicArguments(key).RunStdString(nil)
|
||||||
if err != nil && !err.IsExitCode(1) {
|
if err != nil && !IsErrorExitCode(err, 1) {
|
||||||
return fmt.Errorf("failed to get git config %s, err: %w", key, err)
|
return fmt.Errorf("failed to get git config %s, err: %w", key, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -364,7 +364,7 @@ func configSetNonExist(key, value string) error {
|
||||||
// already exist
|
// already exist
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if err.IsExitCode(1) {
|
if IsErrorExitCode(err, 1) {
|
||||||
// not exist, set new config
|
// not exist, set new config
|
||||||
_, _, err = NewCommand(DefaultContext, "config", "--global").AddDynamicArguments(key, value).RunStdString(nil)
|
_, _, err = NewCommand(DefaultContext, "config", "--global").AddDynamicArguments(key, value).RunStdString(nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -382,7 +382,7 @@ func configAddNonExist(key, value string) error {
|
||||||
// already exist
|
// already exist
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if err.IsExitCode(1) {
|
if IsErrorExitCode(err, 1) {
|
||||||
// not exist, add new config
|
// not exist, add new config
|
||||||
_, _, err = NewCommand(DefaultContext, "config", "--global", "--add").AddDynamicArguments(key, value).RunStdString(nil)
|
_, _, err = NewCommand(DefaultContext, "config", "--global", "--add").AddDynamicArguments(key, value).RunStdString(nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -403,7 +403,7 @@ func configUnsetAll(key, value string) error {
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if err.IsExitCode(1) {
|
if IsErrorExitCode(err, 1) {
|
||||||
// not exist
|
// not exist
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,118 @@
|
||||||
|
// Copyright 2024 The Gitea Authors. All rights reserved.
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
package git
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bufio"
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
"code.gitea.io/gitea/modules/util"
|
||||||
|
)
|
||||||
|
|
||||||
|
type GrepResult struct {
|
||||||
|
Filename string
|
||||||
|
LineNumbers []int
|
||||||
|
LineCodes []string
|
||||||
|
}
|
||||||
|
|
||||||
|
type GrepOptions struct {
|
||||||
|
RefName string
|
||||||
|
MaxResultLimit int
|
||||||
|
ContextLineNumber int
|
||||||
|
IsFuzzy bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func GrepSearch(ctx context.Context, repo *Repository, search string, opts GrepOptions) ([]*GrepResult, error) {
|
||||||
|
stdoutReader, stdoutWriter, err := os.Pipe()
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("unable to create os pipe to grep: %w", err)
|
||||||
|
}
|
||||||
|
defer func() {
|
||||||
|
_ = stdoutReader.Close()
|
||||||
|
_ = stdoutWriter.Close()
|
||||||
|
}()
|
||||||
|
|
||||||
|
/*
|
||||||
|
The output is like this ( "^@" means \x00):
|
||||||
|
|
||||||
|
HEAD:.air.toml
|
||||||
|
6^@bin = "gitea"
|
||||||
|
|
||||||
|
HEAD:.changelog.yml
|
||||||
|
2^@repo: go-gitea/gitea
|
||||||
|
*/
|
||||||
|
var results []*GrepResult
|
||||||
|
cmd := NewCommand(ctx, "grep", "--null", "--break", "--heading", "--fixed-strings", "--line-number", "--ignore-case", "--full-name")
|
||||||
|
cmd.AddOptionValues("--context", fmt.Sprint(opts.ContextLineNumber))
|
||||||
|
if opts.IsFuzzy {
|
||||||
|
words := strings.Fields(search)
|
||||||
|
for _, word := range words {
|
||||||
|
cmd.AddOptionValues("-e", strings.TrimLeft(word, "-"))
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
cmd.AddOptionValues("-e", strings.TrimLeft(search, "-"))
|
||||||
|
}
|
||||||
|
cmd.AddDynamicArguments(util.IfZero(opts.RefName, "HEAD"))
|
||||||
|
opts.MaxResultLimit = util.IfZero(opts.MaxResultLimit, 50)
|
||||||
|
stderr := bytes.Buffer{}
|
||||||
|
err = cmd.Run(&RunOpts{
|
||||||
|
Dir: repo.Path,
|
||||||
|
Stdout: stdoutWriter,
|
||||||
|
Stderr: &stderr,
|
||||||
|
PipelineFunc: func(ctx context.Context, cancel context.CancelFunc) error {
|
||||||
|
_ = stdoutWriter.Close()
|
||||||
|
defer stdoutReader.Close()
|
||||||
|
|
||||||
|
isInBlock := false
|
||||||
|
scanner := bufio.NewScanner(stdoutReader)
|
||||||
|
var res *GrepResult
|
||||||
|
for scanner.Scan() {
|
||||||
|
line := scanner.Text()
|
||||||
|
if !isInBlock {
|
||||||
|
if _ /* ref */, filename, ok := strings.Cut(line, ":"); ok {
|
||||||
|
isInBlock = true
|
||||||
|
res = &GrepResult{Filename: filename}
|
||||||
|
results = append(results, res)
|
||||||
|
}
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if line == "" {
|
||||||
|
if len(results) >= opts.MaxResultLimit {
|
||||||
|
cancel()
|
||||||
|
break
|
||||||
|
}
|
||||||
|
isInBlock = false
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if line == "--" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if lineNum, lineCode, ok := strings.Cut(line, "\x00"); ok {
|
||||||
|
lineNumInt, _ := strconv.Atoi(lineNum)
|
||||||
|
res.LineNumbers = append(res.LineNumbers, lineNumInt)
|
||||||
|
res.LineCodes = append(res.LineCodes, lineCode)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return scanner.Err()
|
||||||
|
},
|
||||||
|
})
|
||||||
|
// git grep exits by cancel (killed), usually it is caused by the limit of results
|
||||||
|
if IsErrorExitCode(err, -1) && stderr.Len() == 0 {
|
||||||
|
return results, nil
|
||||||
|
}
|
||||||
|
// git grep exits with 1 if no results are found
|
||||||
|
if IsErrorExitCode(err, 1) && stderr.Len() == 0 {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
if err != nil && !errors.Is(err, context.Canceled) {
|
||||||
|
return nil, fmt.Errorf("unable to run git grep: %w, stderr: %s", err, stderr.String())
|
||||||
|
}
|
||||||
|
return results, nil
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
// Copyright 2024 The Gitea Authors. All rights reserved.
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
package git
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"path/filepath"
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestGrepSearch(t *testing.T) {
|
||||||
|
repo, err := openRepositoryWithDefaultContext(filepath.Join(testReposDir, "language_stats_repo"))
|
||||||
|
assert.NoError(t, err)
|
||||||
|
defer repo.Close()
|
||||||
|
|
||||||
|
res, err := GrepSearch(context.Background(), repo, "void", GrepOptions{})
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.Equal(t, []*GrepResult{
|
||||||
|
{
|
||||||
|
Filename: "java-hello/main.java",
|
||||||
|
LineNumbers: []int{3},
|
||||||
|
LineCodes: []string{" public static void main(String[] args)"},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Filename: "main.vendor.java",
|
||||||
|
LineNumbers: []int{3},
|
||||||
|
LineCodes: []string{" public static void main(String[] args)"},
|
||||||
|
},
|
||||||
|
}, res)
|
||||||
|
|
||||||
|
res, err = GrepSearch(context.Background(), repo, "void", GrepOptions{MaxResultLimit: 1})
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.Equal(t, []*GrepResult{
|
||||||
|
{
|
||||||
|
Filename: "java-hello/main.java",
|
||||||
|
LineNumbers: []int{3},
|
||||||
|
LineCodes: []string{" public static void main(String[] args)"},
|
||||||
|
},
|
||||||
|
}, res)
|
||||||
|
|
||||||
|
res, err = GrepSearch(context.Background(), repo, "no-such-content", GrepOptions{})
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.Len(t, res, 0)
|
||||||
|
|
||||||
|
res, err = GrepSearch(context.Background(), &Repository{Path: "no-such-git-repo"}, "no-such-content", GrepOptions{})
|
||||||
|
assert.Error(t, err)
|
||||||
|
assert.Len(t, res, 0)
|
||||||
|
}
|
|
@ -70,13 +70,27 @@ func writeStrings(buf *bytes.Buffer, strs ...string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func HighlightSearchResultCode(filename string, lineNums []int, code string) []ResultLine {
|
||||||
|
// we should highlight the whole code block first, otherwise it doesn't work well with multiple line highlighting
|
||||||
|
hl, _ := highlight.Code(filename, "", code)
|
||||||
|
highlightedLines := strings.Split(string(hl), "\n")
|
||||||
|
|
||||||
|
// The lineNums outputted by highlight.Code might not match the original lineNums, because "highlight" removes the last `\n`
|
||||||
|
lines := make([]ResultLine, min(len(highlightedLines), len(lineNums)))
|
||||||
|
for i := 0; i < len(lines); i++ {
|
||||||
|
lines[i].Num = lineNums[i]
|
||||||
|
lines[i].FormattedContent = template.HTML(highlightedLines[i])
|
||||||
|
}
|
||||||
|
return lines
|
||||||
|
}
|
||||||
|
|
||||||
func searchResult(result *internal.SearchResult, startIndex, endIndex int) (*Result, error) {
|
func searchResult(result *internal.SearchResult, startIndex, endIndex int) (*Result, error) {
|
||||||
startLineNum := 1 + strings.Count(result.Content[:startIndex], "\n")
|
startLineNum := 1 + strings.Count(result.Content[:startIndex], "\n")
|
||||||
|
|
||||||
var formattedLinesBuffer bytes.Buffer
|
var formattedLinesBuffer bytes.Buffer
|
||||||
|
|
||||||
contentLines := strings.SplitAfter(result.Content[startIndex:endIndex], "\n")
|
contentLines := strings.SplitAfter(result.Content[startIndex:endIndex], "\n")
|
||||||
lines := make([]ResultLine, 0, len(contentLines))
|
lineNums := make([]int, 0, len(contentLines))
|
||||||
index := startIndex
|
index := startIndex
|
||||||
for i, line := range contentLines {
|
for i, line := range contentLines {
|
||||||
var err error
|
var err error
|
||||||
|
@ -91,29 +105,16 @@ func searchResult(result *internal.SearchResult, startIndex, endIndex int) (*Res
|
||||||
line[closeActiveIndex:],
|
line[closeActiveIndex:],
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
err = writeStrings(&formattedLinesBuffer,
|
err = writeStrings(&formattedLinesBuffer, line)
|
||||||
line,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
lines = append(lines, ResultLine{Num: startLineNum + i})
|
lineNums = append(lineNums, startLineNum+i)
|
||||||
index += len(line)
|
index += len(line)
|
||||||
}
|
}
|
||||||
|
|
||||||
// we should highlight the whole code block first, otherwise it doesn't work well with multiple line highlighting
|
|
||||||
hl, _ := highlight.Code(result.Filename, "", formattedLinesBuffer.String())
|
|
||||||
highlightedLines := strings.Split(string(hl), "\n")
|
|
||||||
|
|
||||||
// The lines outputted by highlight.Code might not match the original lines, because "highlight" removes the last `\n`
|
|
||||||
lines = lines[:min(len(highlightedLines), len(lines))]
|
|
||||||
highlightedLines = highlightedLines[:len(lines)]
|
|
||||||
for i := 0; i < len(lines); i++ {
|
|
||||||
lines[i].FormattedContent = template.HTML(highlightedLines[i])
|
|
||||||
}
|
|
||||||
|
|
||||||
return &Result{
|
return &Result{
|
||||||
RepoID: result.RepoID,
|
RepoID: result.RepoID,
|
||||||
Filename: result.Filename,
|
Filename: result.Filename,
|
||||||
|
@ -121,7 +122,7 @@ func searchResult(result *internal.SearchResult, startIndex, endIndex int) (*Res
|
||||||
UpdatedUnix: result.UpdatedUnix,
|
UpdatedUnix: result.UpdatedUnix,
|
||||||
Language: result.Language,
|
Language: result.Language,
|
||||||
Color: result.Color,
|
Color: result.Color,
|
||||||
Lines: lines,
|
Lines: HighlightSearchResultCode(result.Filename, lineNums, formattedLinesBuffer.String()),
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// ParsePaginator parses a db.Paginator into a skip and limit
|
// ParsePaginator parses a db.Paginator into a skip and limit
|
||||||
func ParsePaginator(paginator db.Paginator, max ...int) (int, int) {
|
func ParsePaginator(paginator *db.ListOptions, max ...int) (int, int) {
|
||||||
// Use a very large number to indicate no limit
|
// Use a very large number to indicate no limit
|
||||||
unlimited := math.MaxInt32
|
unlimited := math.MaxInt32
|
||||||
if len(max) > 0 {
|
if len(max) > 0 {
|
||||||
|
@ -19,22 +19,15 @@ func ParsePaginator(paginator db.Paginator, max ...int) (int, int) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if paginator == nil || paginator.IsListAll() {
|
if paginator == nil || paginator.IsListAll() {
|
||||||
|
// It shouldn't happen. In actual usage scenarios, there should not be requests to search all.
|
||||||
|
// But if it does happen, respect it and return "unlimited".
|
||||||
|
// And it's also useful for testing.
|
||||||
return 0, unlimited
|
return 0, unlimited
|
||||||
}
|
}
|
||||||
|
|
||||||
// Warning: Do not use GetSkipTake() for *db.ListOptions
|
if paginator.PageSize == 0 {
|
||||||
// Its implementation could reset the page size with setting.API.MaxResponseItems
|
// Do not return any results when searching, it's used to get the total count only.
|
||||||
if listOptions, ok := paginator.(*db.ListOptions); ok {
|
return 0, 0
|
||||||
if listOptions.Page >= 0 && listOptions.PageSize > 0 {
|
|
||||||
var start int
|
|
||||||
if listOptions.Page == 0 {
|
|
||||||
start = 0
|
|
||||||
} else {
|
|
||||||
start = (listOptions.Page - 1) * listOptions.PageSize
|
|
||||||
}
|
|
||||||
return start, listOptions.PageSize
|
|
||||||
}
|
|
||||||
return 0, unlimited
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return paginator.GetSkipTake()
|
return paginator.GetSkipTake()
|
||||||
|
|
|
@ -78,6 +78,17 @@ func (i *Indexer) Search(ctx context.Context, options *internal.SearchOptions) (
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If pagesize == 0, return total count only. It's a special case for search count.
|
||||||
|
if options.Paginator != nil && options.Paginator.PageSize == 0 {
|
||||||
|
total, err := issue_model.CountIssues(ctx, opt, cond)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &internal.SearchResult{
|
||||||
|
Total: total,
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
|
||||||
ids, total, err := issue_model.IssueIDs(ctx, opt, cond)
|
ids, total, err := issue_model.IssueIDs(ctx, opt, cond)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
@ -308,7 +308,7 @@ func SearchIssues(ctx context.Context, opts *SearchOptions) ([]int64, int64, err
|
||||||
|
|
||||||
// CountIssues counts issues by options. It is a shortcut of SearchIssues(ctx, opts) but only returns the total count.
|
// CountIssues counts issues by options. It is a shortcut of SearchIssues(ctx, opts) but only returns the total count.
|
||||||
func CountIssues(ctx context.Context, opts *SearchOptions) (int64, error) {
|
func CountIssues(ctx context.Context, opts *SearchOptions) (int64, error) {
|
||||||
opts = opts.Copy(func(options *SearchOptions) { opts.Paginator = &db_model.ListOptions{PageSize: 0} })
|
opts = opts.Copy(func(options *SearchOptions) { options.Paginator = &db_model.ListOptions{PageSize: 0} })
|
||||||
|
|
||||||
_, total, err := SearchIssues(ctx, opts)
|
_, total, err := SearchIssues(ctx, opts)
|
||||||
return total, err
|
return total, err
|
||||||
|
|
|
@ -106,7 +106,7 @@ type SearchOptions struct {
|
||||||
UpdatedAfterUnix optional.Option[int64]
|
UpdatedAfterUnix optional.Option[int64]
|
||||||
UpdatedBeforeUnix optional.Option[int64]
|
UpdatedBeforeUnix optional.Option[int64]
|
||||||
|
|
||||||
db.Paginator
|
Paginator *db.ListOptions
|
||||||
|
|
||||||
SortBy SortBy // sort by field
|
SortBy SortBy // sort by field
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,6 +77,13 @@ func TestIndexer(t *testing.T, indexer internal.Indexer) {
|
||||||
assert.Equal(t, c.ExpectedIDs, ids)
|
assert.Equal(t, c.ExpectedIDs, ids)
|
||||||
assert.Equal(t, c.ExpectedTotal, result.Total)
|
assert.Equal(t, c.ExpectedTotal, result.Total)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// test counting
|
||||||
|
c.SearchOptions.Paginator = &db.ListOptions{PageSize: 0}
|
||||||
|
countResult, err := indexer.Search(context.Background(), c.SearchOptions)
|
||||||
|
require.NoError(t, err)
|
||||||
|
assert.Empty(t, countResult.Hits)
|
||||||
|
assert.Equal(t, result.Total, countResult.Total)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -218,6 +218,14 @@ func (b *Indexer) Search(ctx context.Context, options *internal.SearchOptions) (
|
||||||
|
|
||||||
skip, limit := indexer_internal.ParsePaginator(options.Paginator, maxTotalHits)
|
skip, limit := indexer_internal.ParsePaginator(options.Paginator, maxTotalHits)
|
||||||
|
|
||||||
|
counting := limit == 0
|
||||||
|
if counting {
|
||||||
|
// If set limit to 0, it will be 20 by default, and -1 is not allowed.
|
||||||
|
// See https://www.meilisearch.com/docs/reference/api/search#limit
|
||||||
|
// So set limit to 1 to make the cost as low as possible, then clear the result before returning.
|
||||||
|
limit = 1
|
||||||
|
}
|
||||||
|
|
||||||
keyword := options.Keyword
|
keyword := options.Keyword
|
||||||
if !options.IsFuzzyKeyword {
|
if !options.IsFuzzyKeyword {
|
||||||
// to make it non fuzzy ("typo tolerance" in meilisearch terms), we have to quote the keyword(s)
|
// to make it non fuzzy ("typo tolerance" in meilisearch terms), we have to quote the keyword(s)
|
||||||
|
@ -236,6 +244,10 @@ func (b *Indexer) Search(ctx context.Context, options *internal.SearchOptions) (
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if counting {
|
||||||
|
searchRes.Hits = nil
|
||||||
|
}
|
||||||
|
|
||||||
hits, err := convertHits(searchRes)
|
hits, err := convertHits(searchRes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
@ -172,6 +172,7 @@ org_kind = Search orgs...
|
||||||
team_kind = Search teams...
|
team_kind = Search teams...
|
||||||
code_kind = Search code...
|
code_kind = Search code...
|
||||||
code_search_unavailable = Code search is currently not available. Please contact the site administrator.
|
code_search_unavailable = Code search is currently not available. Please contact the site administrator.
|
||||||
|
code_search_by_git_grep = Current code search results are provided by "git grep". There might be better results if site administrator enables Repository Indexer.
|
||||||
package_kind = Search packages...
|
package_kind = Search packages...
|
||||||
project_kind = Search projects...
|
project_kind = Search projects...
|
||||||
branch_kind = Search branches...
|
branch_kind = Search branches...
|
||||||
|
|
|
@ -278,9 +278,9 @@ func renderBlame(ctx *context.Context, blameParts []*git.BlamePart, commitNames
|
||||||
|
|
||||||
var avatar string
|
var avatar string
|
||||||
if commit.User != nil {
|
if commit.User != nil {
|
||||||
avatar = string(avatarUtils.Avatar(commit.User, 18, "gt-mr-3"))
|
avatar = string(avatarUtils.Avatar(commit.User, 18))
|
||||||
} else {
|
} else {
|
||||||
avatar = string(avatarUtils.AvatarByEmail(commit.Author.Email, commit.Author.Name, 18, "gt-mr-3"))
|
avatar = string(avatarUtils.AvatarByEmail(commit.Author.Email, commit.Author.Name, 18, "tw-mr-2"))
|
||||||
}
|
}
|
||||||
|
|
||||||
br.Avatar = gotemplate.HTML(avatar)
|
br.Avatar = gotemplate.HTML(avatar)
|
||||||
|
|
|
@ -70,7 +70,7 @@ func GetContentHistoryList(ctx *context.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
src := html.EscapeString(item.UserAvatarLink)
|
src := html.EscapeString(item.UserAvatarLink)
|
||||||
class := avatars.DefaultAvatarClass + " gt-mr-3"
|
class := avatars.DefaultAvatarClass + " tw-mr-2"
|
||||||
name := html.EscapeString(username)
|
name := html.EscapeString(username)
|
||||||
avatarHTML := string(templates.AvatarHTML(src, 28, class, username))
|
avatarHTML := string(templates.AvatarHTML(src, 28, class, username))
|
||||||
timeSinceText := string(timeutil.TimeSinceUnix(item.EditedUnix, ctx.Locale))
|
timeSinceText := string(timeutil.TimeSinceUnix(item.EditedUnix, ctx.Locale))
|
||||||
|
|
|
@ -5,9 +5,11 @@ package repo
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"code.gitea.io/gitea/models/db"
|
"code.gitea.io/gitea/models/db"
|
||||||
"code.gitea.io/gitea/modules/base"
|
"code.gitea.io/gitea/modules/base"
|
||||||
|
"code.gitea.io/gitea/modules/git"
|
||||||
code_indexer "code.gitea.io/gitea/modules/indexer/code"
|
code_indexer "code.gitea.io/gitea/modules/indexer/code"
|
||||||
"code.gitea.io/gitea/modules/setting"
|
"code.gitea.io/gitea/modules/setting"
|
||||||
"code.gitea.io/gitea/services/context"
|
"code.gitea.io/gitea/services/context"
|
||||||
|
@ -17,11 +19,6 @@ const tplSearch base.TplName = "repo/search"
|
||||||
|
|
||||||
// Search render repository search page
|
// Search render repository search page
|
||||||
func Search(ctx *context.Context) {
|
func Search(ctx *context.Context) {
|
||||||
if !setting.Indexer.RepoIndexerEnabled {
|
|
||||||
ctx.Redirect(ctx.Repo.RepoLink)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
language := ctx.FormTrim("l")
|
language := ctx.FormTrim("l")
|
||||||
keyword := ctx.FormTrim("q")
|
keyword := ctx.FormTrim("q")
|
||||||
|
|
||||||
|
@ -42,26 +39,54 @@ func Search(ctx *context.Context) {
|
||||||
page = 1
|
page = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
total, searchResults, searchResultLanguages, err := code_indexer.PerformSearch(ctx, &code_indexer.SearchOptions{
|
var total int
|
||||||
RepoIDs: []int64{ctx.Repo.Repository.ID},
|
var searchResults []*code_indexer.Result
|
||||||
Keyword: keyword,
|
var searchResultLanguages []*code_indexer.SearchResultLanguages
|
||||||
IsKeywordFuzzy: isFuzzy,
|
if setting.Indexer.RepoIndexerEnabled {
|
||||||
Language: language,
|
var err error
|
||||||
Paginator: &db.ListOptions{
|
total, searchResults, searchResultLanguages, err = code_indexer.PerformSearch(ctx, &code_indexer.SearchOptions{
|
||||||
Page: page,
|
RepoIDs: []int64{ctx.Repo.Repository.ID},
|
||||||
PageSize: setting.UI.RepoSearchPagingNum,
|
Keyword: keyword,
|
||||||
},
|
IsKeywordFuzzy: isFuzzy,
|
||||||
})
|
Language: language,
|
||||||
if err != nil {
|
Paginator: &db.ListOptions{
|
||||||
if code_indexer.IsAvailable(ctx) {
|
Page: page,
|
||||||
ctx.ServerError("SearchResults", err)
|
PageSize: setting.UI.RepoSearchPagingNum,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
if code_indexer.IsAvailable(ctx) {
|
||||||
|
ctx.ServerError("SearchResults", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
ctx.Data["CodeIndexerUnavailable"] = true
|
||||||
|
} else {
|
||||||
|
ctx.Data["CodeIndexerUnavailable"] = !code_indexer.IsAvailable(ctx)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
res, err := git.GrepSearch(ctx, ctx.Repo.GitRepo, keyword, git.GrepOptions{ContextLineNumber: 3, IsFuzzy: isFuzzy})
|
||||||
|
if err != nil {
|
||||||
|
ctx.ServerError("GrepSearch", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
ctx.Data["CodeIndexerUnavailable"] = true
|
total = len(res)
|
||||||
} else {
|
pageStart := min((page-1)*setting.UI.RepoSearchPagingNum, len(res))
|
||||||
ctx.Data["CodeIndexerUnavailable"] = !code_indexer.IsAvailable(ctx)
|
pageEnd := min(page*setting.UI.RepoSearchPagingNum, len(res))
|
||||||
|
res = res[pageStart:pageEnd]
|
||||||
|
for _, r := range res {
|
||||||
|
searchResults = append(searchResults, &code_indexer.Result{
|
||||||
|
RepoID: ctx.Repo.Repository.ID,
|
||||||
|
Filename: r.Filename,
|
||||||
|
CommitID: ctx.Repo.CommitID,
|
||||||
|
// UpdatedUnix: not supported yet
|
||||||
|
// Language: not supported yet
|
||||||
|
// Color: not supported yet
|
||||||
|
Lines: code_indexer.HighlightSearchResultCode(r.Filename, r.LineNumbers, strings.Join(r.LineCodes, "\n")),
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ctx.Data["CodeIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled
|
||||||
ctx.Data["Repo"] = ctx.Repo.Repository
|
ctx.Data["Repo"] = ctx.Repo.Repository
|
||||||
ctx.Data["SearchResults"] = searchResults
|
ctx.Data["SearchResults"] = searchResults
|
||||||
ctx.Data["SearchResultLanguages"] = searchResultLanguages
|
ctx.Data["SearchResultLanguages"] = searchResultLanguages
|
||||||
|
|
|
@ -919,9 +919,9 @@ func prepareOpenWithEditorApps(ctx *context.Context) {
|
||||||
schema, _, _ := strings.Cut(app.OpenURL, ":")
|
schema, _, _ := strings.Cut(app.OpenURL, ":")
|
||||||
var iconHTML template.HTML
|
var iconHTML template.HTML
|
||||||
if schema == "vscode" || schema == "vscodium" || schema == "jetbrains" {
|
if schema == "vscode" || schema == "vscodium" || schema == "jetbrains" {
|
||||||
iconHTML = svg.RenderHTML(fmt.Sprintf("gitea-%s", schema), 16, "gt-mr-3")
|
iconHTML = svg.RenderHTML(fmt.Sprintf("gitea-%s", schema), 16, "tw-mr-2")
|
||||||
} else {
|
} else {
|
||||||
iconHTML = svg.RenderHTML("gitea-git", 16, "gt-mr-3") // TODO: it could support user's customized icon in the future
|
iconHTML = svg.RenderHTML("gitea-git", 16, "tw-mr-2") // TODO: it could support user's customized icon in the future
|
||||||
}
|
}
|
||||||
tmplApps = append(tmplApps, map[string]any{
|
tmplApps = append(tmplApps, map[string]any{
|
||||||
"DisplayName": app.DisplayName,
|
"DisplayName": app.DisplayName,
|
||||||
|
|
|
@ -59,7 +59,7 @@ func (p *AuthSourceProvider) DisplayName() string {
|
||||||
|
|
||||||
func (p *AuthSourceProvider) IconHTML(size int) template.HTML {
|
func (p *AuthSourceProvider) IconHTML(size int) template.HTML {
|
||||||
if p.iconURL != "" {
|
if p.iconURL != "" {
|
||||||
img := fmt.Sprintf(`<img class="tw-object-contain gt-mr-3" width="%d" height="%d" src="%s" alt="%s">`,
|
img := fmt.Sprintf(`<img class="tw-object-contain tw-mr-2" width="%d" height="%d" src="%s" alt="%s">`,
|
||||||
size,
|
size,
|
||||||
size,
|
size,
|
||||||
html.EscapeString(p.iconURL), html.EscapeString(p.DisplayName()),
|
html.EscapeString(p.iconURL), html.EscapeString(p.DisplayName()),
|
||||||
|
|
|
@ -35,10 +35,10 @@ func (b *BaseProvider) IconHTML(size int) template.HTML {
|
||||||
case "github":
|
case "github":
|
||||||
svgName = "octicon-mark-github"
|
svgName = "octicon-mark-github"
|
||||||
}
|
}
|
||||||
svgHTML := svg.RenderHTML(svgName, size, "gt-mr-3")
|
svgHTML := svg.RenderHTML(svgName, size, "tw-mr-2")
|
||||||
if svgHTML == "" {
|
if svgHTML == "" {
|
||||||
log.Error("No SVG icon for oauth2 provider %q", b.name)
|
log.Error("No SVG icon for oauth2 provider %q", b.name)
|
||||||
svgHTML = svg.RenderHTML("gitea-openid", size, "gt-mr-3")
|
svgHTML = svg.RenderHTML("gitea-openid", size, "tw-mr-2")
|
||||||
}
|
}
|
||||||
return svgHTML
|
return svgHTML
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ func (o *OpenIDProvider) DisplayName() string {
|
||||||
|
|
||||||
// IconHTML returns icon HTML for this provider
|
// IconHTML returns icon HTML for this provider
|
||||||
func (o *OpenIDProvider) IconHTML(size int) template.HTML {
|
func (o *OpenIDProvider) IconHTML(size int) template.HTML {
|
||||||
return svg.RenderHTML("gitea-openid", size, "gt-mr-3")
|
return svg.RenderHTML("gitea-openid", size, "tw-mr-2")
|
||||||
}
|
}
|
||||||
|
|
||||||
// CreateGothProvider creates a GothProvider from this Provider
|
// CreateGothProvider creates a GothProvider from this Provider
|
||||||
|
|
|
@ -17,6 +17,7 @@ import (
|
||||||
user_model "code.gitea.io/gitea/models/user"
|
user_model "code.gitea.io/gitea/models/user"
|
||||||
"code.gitea.io/gitea/modules/container"
|
"code.gitea.io/gitea/modules/container"
|
||||||
"code.gitea.io/gitea/modules/git"
|
"code.gitea.io/gitea/modules/git"
|
||||||
|
"code.gitea.io/gitea/modules/log"
|
||||||
"code.gitea.io/gitea/modules/storage"
|
"code.gitea.io/gitea/modules/storage"
|
||||||
notify_service "code.gitea.io/gitea/services/notify"
|
notify_service "code.gitea.io/gitea/services/notify"
|
||||||
)
|
)
|
||||||
|
@ -85,25 +86,19 @@ func ChangeTitle(ctx context.Context, issue *issues_model.Issue, doer *user_mode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var reviewNotifers []*ReviewRequestNotifier
|
if err := issues_model.ChangeIssueTitle(ctx, issue, doer, oldTitle); err != nil {
|
||||||
|
|
||||||
if err := db.WithTx(ctx, func(ctx context.Context) error {
|
|
||||||
if err := issues_model.ChangeIssueTitle(ctx, issue, doer, oldTitle); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
if issue.IsPull && issues_model.HasWorkInProgressPrefix(oldTitle) && !issues_model.HasWorkInProgressPrefix(title) {
|
|
||||||
var err error
|
|
||||||
reviewNotifers, err = PullRequestCodeOwnersReview(ctx, issue, issue.PullRequest)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}); err != nil {
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var reviewNotifers []*ReviewRequestNotifier
|
||||||
|
if issue.IsPull && issues_model.HasWorkInProgressPrefix(oldTitle) && !issues_model.HasWorkInProgressPrefix(title) {
|
||||||
|
var err error
|
||||||
|
reviewNotifers, err = PullRequestCodeOwnersReview(ctx, issue, issue.PullRequest)
|
||||||
|
if err != nil {
|
||||||
|
log.Error("PullRequestCodeOwnersReview: %v", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
notify_service.IssueChangeTitle(ctx, doer, issue, oldTitle)
|
notify_service.IssueChangeTitle(ctx, doer, issue, oldTitle)
|
||||||
ReviewRequestNotify(ctx, issue, issue.Poster, reviewNotifers)
|
ReviewRequestNotify(ctx, issue, issue.Poster, reviewNotifers)
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ type ReviewRequestNotifier struct {
|
||||||
ReviewTeam *org_model.Team
|
ReviewTeam *org_model.Team
|
||||||
}
|
}
|
||||||
|
|
||||||
func PullRequestCodeOwnersReview(ctx context.Context, pull *issues_model.Issue, pr *issues_model.PullRequest) ([]*ReviewRequestNotifier, error) {
|
func PullRequestCodeOwnersReview(ctx context.Context, issue *issues_model.Issue, pr *issues_model.PullRequest) ([]*ReviewRequestNotifier, error) {
|
||||||
files := []string{"CODEOWNERS", "docs/CODEOWNERS", ".gitea/CODEOWNERS"}
|
files := []string{"CODEOWNERS", "docs/CODEOWNERS", ".gitea/CODEOWNERS"}
|
||||||
|
|
||||||
if pr.IsWorkInProgress(ctx) {
|
if pr.IsWorkInProgress(ctx) {
|
||||||
|
@ -90,7 +90,7 @@ func PullRequestCodeOwnersReview(ctx context.Context, pull *issues_model.Issue,
|
||||||
|
|
||||||
// https://github.com/go-gitea/gitea/issues/29763, we need to get the files changed
|
// https://github.com/go-gitea/gitea/issues/29763, we need to get the files changed
|
||||||
// between the merge base and the head commit but not the base branch and the head commit
|
// between the merge base and the head commit but not the base branch and the head commit
|
||||||
changedFiles, err := repo.GetFilesChangedBetween(mergeBase, pr.HeadCommitID)
|
changedFiles, err := repo.GetFilesChangedBetween(mergeBase, pr.GetGitRefName())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -112,9 +112,13 @@ func PullRequestCodeOwnersReview(ctx context.Context, pull *issues_model.Issue,
|
||||||
|
|
||||||
notifiers := make([]*ReviewRequestNotifier, 0, len(uniqUsers)+len(uniqTeams))
|
notifiers := make([]*ReviewRequestNotifier, 0, len(uniqUsers)+len(uniqTeams))
|
||||||
|
|
||||||
|
if err := issue.LoadPoster(ctx); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
for _, u := range uniqUsers {
|
for _, u := range uniqUsers {
|
||||||
if u.ID != pull.Poster.ID {
|
if u.ID != issue.Poster.ID {
|
||||||
comment, err := issues_model.AddReviewRequest(ctx, pull, u, pull.Poster)
|
comment, err := issues_model.AddReviewRequest(ctx, issue, u, issue.Poster)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warn("Failed add assignee user: %s to PR review: %s#%d, error: %s", u.Name, pr.BaseRepo.Name, pr.ID, err)
|
log.Warn("Failed add assignee user: %s to PR review: %s#%d, error: %s", u.Name, pr.BaseRepo.Name, pr.ID, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -122,12 +126,12 @@ func PullRequestCodeOwnersReview(ctx context.Context, pull *issues_model.Issue,
|
||||||
notifiers = append(notifiers, &ReviewRequestNotifier{
|
notifiers = append(notifiers, &ReviewRequestNotifier{
|
||||||
Comment: comment,
|
Comment: comment,
|
||||||
IsAdd: true,
|
IsAdd: true,
|
||||||
Reviwer: pull.Poster,
|
Reviwer: u,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for _, t := range uniqTeams {
|
for _, t := range uniqTeams {
|
||||||
comment, err := issues_model.AddTeamReviewRequest(ctx, pull, t, pull.Poster)
|
comment, err := issues_model.AddTeamReviewRequest(ctx, issue, t, issue.Poster)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warn("Failed add assignee team: %s to PR review: %s#%d, error: %s", t.Name, pr.BaseRepo.Name, pr.ID, err)
|
log.Warn("Failed add assignee team: %s to PR review: %s#%d, error: %s", t.Name, pr.BaseRepo.Name, pr.ID, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
@ -41,6 +41,8 @@ export default {
|
||||||
// classes that don't work without CSS variables from "@tailwind base" which we don't use
|
// classes that don't work without CSS variables from "@tailwind base" which we don't use
|
||||||
'transform', 'shadow', 'ring', 'blur', 'grayscale', 'invert', '!invert', 'filter', '!filter',
|
'transform', 'shadow', 'ring', 'blur', 'grayscale', 'invert', '!invert', 'filter', '!filter',
|
||||||
'backdrop-filter',
|
'backdrop-filter',
|
||||||
|
// we use double-class tw-hidden defined in web_src/css/helpers.css for increased specificity
|
||||||
|
'hidden',
|
||||||
// unneeded classes
|
// unneeded classes
|
||||||
'[-a-zA-Z:0-9_.]',
|
'[-a-zA-Z:0-9_.]',
|
||||||
],
|
],
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
<label for="port">{{ctx.Locale.Tr "admin.auths.port"}}</label>
|
<label for="port">{{ctx.Locale.Tr "admin.auths.port"}}</label>
|
||||||
<input id="port" name="port" value="{{$cfg.Port}}" placeholder="636" required>
|
<input id="port" name="port" value="{{$cfg.Port}}" placeholder="636" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="has-tls inline field {{if not .HasTLS}}gt-hidden{{end}}">
|
<div class="has-tls inline field {{if not .HasTLS}}tw-hidden{{end}}">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<label><strong>{{ctx.Locale.Tr "admin.auths.skip_tls_verify"}}</strong></label>
|
<label><strong>{{ctx.Locale.Tr "admin.auths.skip_tls_verify"}}</strong></label>
|
||||||
<input name="skip_verify" type="checkbox" {{if .Source.SkipVerify}}checked{{end}}>
|
<input name="skip_verify" type="checkbox" {{if .Source.SkipVerify}}checked{{end}}>
|
||||||
|
@ -113,7 +113,7 @@
|
||||||
<input type="checkbox" name="groups_enabled" class="js-ldap-group-toggle" {{if $cfg.GroupsEnabled}}checked{{end}}>
|
<input type="checkbox" name="groups_enabled" class="js-ldap-group-toggle" {{if $cfg.GroupsEnabled}}checked{{end}}>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="ldap-group-options" class="ui segment secondary {{if not $cfg.GroupsEnabled}}gt-hidden{{end}}">
|
<div id="ldap-group-options" class="ui segment secondary {{if not $cfg.GroupsEnabled}}tw-hidden{{end}}">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label>{{ctx.Locale.Tr "admin.auths.group_search_base"}}</label>
|
<label>{{ctx.Locale.Tr "admin.auths.group_search_base"}}</label>
|
||||||
<input name="group_dn" value="{{$cfg.GroupDN}}" placeholder="ou=group,dc=mydomain,dc=com">
|
<input name="group_dn" value="{{$cfg.GroupDN}}" placeholder="ou=group,dc=mydomain,dc=com">
|
||||||
|
@ -148,7 +148,7 @@
|
||||||
<input id="use_paged_search" name="use_paged_search" type="checkbox" {{if $cfg.UsePagedSearch}}checked{{end}}>
|
<input id="use_paged_search" name="use_paged_search" type="checkbox" {{if $cfg.UsePagedSearch}}checked{{end}}>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field required search-page-size{{if not $cfg.UsePagedSearch}} gt-hidden{{end}}">
|
<div class="field required search-page-size{{if not $cfg.UsePagedSearch}} tw-hidden{{end}}">
|
||||||
<label for="search_page_size">{{ctx.Locale.Tr "admin.auths.search_page_size"}}</label>
|
<label for="search_page_size">{{ctx.Locale.Tr "admin.auths.search_page_size"}}</label>
|
||||||
<input id="search_page_size" name="search_page_size" value="{{if $cfg.UsePagedSearch}}{{$cfg.SearchPageSize}}{{end}}">
|
<input id="search_page_size" name="search_page_size" value="{{if $cfg.UsePagedSearch}}{{$cfg.SearchPageSize}}{{end}}">
|
||||||
</div>
|
</div>
|
||||||
|
@ -205,7 +205,7 @@
|
||||||
</div>
|
</div>
|
||||||
<p class="help">{{ctx.Locale.Tr "admin.auths.force_smtps_helper"}}</p>
|
<p class="help">{{ctx.Locale.Tr "admin.auths.force_smtps_helper"}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="has-tls inline field {{if not .HasTLS}}gt-hidden{{end}}">
|
<div class="has-tls inline field {{if not .HasTLS}}tw-hidden{{end}}">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<label><strong>{{ctx.Locale.Tr "admin.auths.skip_tls_verify"}}</strong></label>
|
<label><strong>{{ctx.Locale.Tr "admin.auths.skip_tls_verify"}}</strong></label>
|
||||||
<input name="skip_verify" type="checkbox" {{if $cfg.SkipVerify}}checked{{end}}>
|
<input name="skip_verify" type="checkbox" {{if $cfg.SkipVerify}}checked{{end}}>
|
||||||
|
|
|
@ -33,13 +33,13 @@
|
||||||
{{template "admin/auth/source/smtp" .}}
|
{{template "admin/auth/source/smtp" .}}
|
||||||
|
|
||||||
<!-- PAM -->
|
<!-- PAM -->
|
||||||
<div class="pam required field {{if not (eq .type 4)}}gt-hidden{{end}}">
|
<div class="pam required field {{if not (eq .type 4)}}tw-hidden{{end}}">
|
||||||
<label for="pam_service_name">{{ctx.Locale.Tr "admin.auths.pam_service_name"}}</label>
|
<label for="pam_service_name">{{ctx.Locale.Tr "admin.auths.pam_service_name"}}</label>
|
||||||
<input id="pam_service_name" name="pam_service_name" value="{{.pam_service_name}}">
|
<input id="pam_service_name" name="pam_service_name" value="{{.pam_service_name}}">
|
||||||
<label for="pam_email_domain">{{ctx.Locale.Tr "admin.auths.pam_email_domain"}}</label>
|
<label for="pam_email_domain">{{ctx.Locale.Tr "admin.auths.pam_email_domain"}}</label>
|
||||||
<input id="pam_email_domain" name="pam_email_domain" value="{{.pam_email_domain}}">
|
<input id="pam_email_domain" name="pam_email_domain" value="{{.pam_email_domain}}">
|
||||||
</div>
|
</div>
|
||||||
<div class="pam optional field {{if not (eq .type 4)}}gt-hidden{{end}}">
|
<div class="pam optional field {{if not (eq .type 4)}}tw-hidden{{end}}">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label>
|
<label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label>
|
||||||
<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}>
|
<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}>
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
<input name="attributes_in_bind" type="checkbox" {{if .attributes_in_bind}}checked{{end}}>
|
<input name="attributes_in_bind" type="checkbox" {{if .attributes_in_bind}}checked{{end}}>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ldap inline field {{if not (eq .type 2)}}gt-hidden{{end}}">
|
<div class="ldap inline field {{if not (eq .type 2)}}tw-hidden{{end}}">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<label><strong>{{ctx.Locale.Tr "admin.auths.syncenabled"}}</strong></label>
|
<label><strong>{{ctx.Locale.Tr "admin.auths.syncenabled"}}</strong></label>
|
||||||
<input name="is_sync_enabled" type="checkbox" {{if .is_sync_enabled}}checked{{end}}>
|
<input name="is_sync_enabled" type="checkbox" {{if .is_sync_enabled}}checked{{end}}>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="ldap dldap field {{if not (or (eq .type 2) (eq .type 5))}}gt-hidden{{end}}">
|
<div class="ldap dldap field {{if not (or (eq .type 2) (eq .type 5))}}tw-hidden{{end}}">
|
||||||
<div class="inline required field {{if .Err_SecurityProtocol}}error{{end}}">
|
<div class="inline required field {{if .Err_SecurityProtocol}}error{{end}}">
|
||||||
<label>{{ctx.Locale.Tr "admin.auths.security_protocol"}}</label>
|
<label>{{ctx.Locale.Tr "admin.auths.security_protocol"}}</label>
|
||||||
<div class="ui selection security-protocol dropdown">
|
<div class="ui selection security-protocol dropdown">
|
||||||
|
@ -20,17 +20,17 @@
|
||||||
<label for="port">{{ctx.Locale.Tr "admin.auths.port"}}</label>
|
<label for="port">{{ctx.Locale.Tr "admin.auths.port"}}</label>
|
||||||
<input id="port" name="port" value="{{.port}}" placeholder="636">
|
<input id="port" name="port" value="{{.port}}" placeholder="636">
|
||||||
</div>
|
</div>
|
||||||
<div class="has-tls inline field {{if not .HasTLS}}gt-hidden{{end}}">
|
<div class="has-tls inline field {{if not .HasTLS}}tw-hidden{{end}}">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<label><strong>{{ctx.Locale.Tr "admin.auths.skip_tls_verify"}}</strong></label>
|
<label><strong>{{ctx.Locale.Tr "admin.auths.skip_tls_verify"}}</strong></label>
|
||||||
<input name="skip_verify" type="checkbox" {{if .skip_verify}}checked{{end}}>
|
<input name="skip_verify" type="checkbox" {{if .skip_verify}}checked{{end}}>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ldap field {{if not (eq .type 2)}}gt-hidden{{end}}">
|
<div class="ldap field {{if not (eq .type 2)}}tw-hidden{{end}}">
|
||||||
<label for="bind_dn">{{ctx.Locale.Tr "admin.auths.bind_dn"}}</label>
|
<label for="bind_dn">{{ctx.Locale.Tr "admin.auths.bind_dn"}}</label>
|
||||||
<input id="bind_dn" name="bind_dn" value="{{.bind_dn}}" placeholder="cn=Search,dc=mydomain,dc=com">
|
<input id="bind_dn" name="bind_dn" value="{{.bind_dn}}" placeholder="cn=Search,dc=mydomain,dc=com">
|
||||||
</div>
|
</div>
|
||||||
<div class="ldap field {{if not (eq .type 2)}}gt-hidden{{end}}">
|
<div class="ldap field {{if not (eq .type 2)}}tw-hidden{{end}}">
|
||||||
<label for="bind_password">{{ctx.Locale.Tr "admin.auths.bind_password"}}</label>
|
<label for="bind_password">{{ctx.Locale.Tr "admin.auths.bind_password"}}</label>
|
||||||
<input id="bind_password" name="bind_password" type="password" autocomplete="off" value="{{.bind_password}}">
|
<input id="bind_password" name="bind_password" type="password" autocomplete="off" value="{{.bind_password}}">
|
||||||
</div>
|
</div>
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
<label for="user_base">{{ctx.Locale.Tr "admin.auths.user_base"}}</label>
|
<label for="user_base">{{ctx.Locale.Tr "admin.auths.user_base"}}</label>
|
||||||
<input id="user_base" name="user_base" value="{{.user_base}}" placeholder="ou=Users,dc=mydomain,dc=com">
|
<input id="user_base" name="user_base" value="{{.user_base}}" placeholder="ou=Users,dc=mydomain,dc=com">
|
||||||
</div>
|
</div>
|
||||||
<div class="dldap required field {{if not (eq .type 5)}}gt-hidden{{end}}">
|
<div class="dldap required field {{if not (eq .type 5)}}tw-hidden{{end}}">
|
||||||
<label for="user_dn">{{ctx.Locale.Tr "admin.auths.user_dn"}}</label>
|
<label for="user_dn">{{ctx.Locale.Tr "admin.auths.user_dn"}}</label>
|
||||||
<input id="user_dn" name="user_dn" value="{{.user_dn}}" placeholder="uid=%s,ou=Users,dc=mydomain,dc=com">
|
<input id="user_dn" name="user_dn" value="{{.user_dn}}" placeholder="uid=%s,ou=Users,dc=mydomain,dc=com">
|
||||||
</div>
|
</div>
|
||||||
|
@ -115,13 +115,13 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- ldap group end -->
|
<!-- ldap group end -->
|
||||||
|
|
||||||
<div class="ldap inline field {{if not (eq .type 2)}}gt-hidden{{end}}">
|
<div class="ldap inline field {{if not (eq .type 2)}}tw-hidden{{end}}">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<label for="use_paged_search"><strong>{{ctx.Locale.Tr "admin.auths.use_paged_search"}}</strong></label>
|
<label for="use_paged_search"><strong>{{ctx.Locale.Tr "admin.auths.use_paged_search"}}</strong></label>
|
||||||
<input id="use_paged_search" name="use_paged_search" class="use-paged-search" type="checkbox" {{if .use_paged_search}}checked{{end}}>
|
<input id="use_paged_search" name="use_paged_search" class="use-paged-search" type="checkbox" {{if .use_paged_search}}checked{{end}}>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ldap field search-page-size required {{if or (not (eq .type 2)) (not .use_paged_search)}}gt-hidden{{end}}">
|
<div class="ldap field search-page-size required {{if or (not (eq .type 2)) (not .use_paged_search)}}tw-hidden{{end}}">
|
||||||
<label for="search_page_size">{{ctx.Locale.Tr "admin.auths.search_page_size"}}</label>
|
<label for="search_page_size">{{ctx.Locale.Tr "admin.auths.search_page_size"}}</label>
|
||||||
<input id="search_page_size" name="search_page_size" value="{{.search_page_size}}">
|
<input id="search_page_size" name="search_page_size" value="{{.search_page_size}}">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="oauth2 field {{if not (eq .type 6)}}gt-hidden{{end}}">
|
<div class="oauth2 field {{if not (eq .type 6)}}tw-hidden{{end}}">
|
||||||
<div class="inline required field">
|
<div class="inline required field">
|
||||||
<label>{{ctx.Locale.Tr "admin.auths.oauth2_provider"}}</label>
|
<label>{{ctx.Locale.Tr "admin.auths.oauth2_provider"}}</label>
|
||||||
<div class="ui selection type dropdown">
|
<div class="ui selection type dropdown">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="smtp field {{if not (eq .type 3)}}gt-hidden{{end}}">
|
<div class="smtp field {{if not (eq .type 3)}}tw-hidden{{end}}">
|
||||||
<div class="inline required field">
|
<div class="inline required field">
|
||||||
<label>{{ctx.Locale.Tr "admin.auths.smtp_auth"}}</label>
|
<label>{{ctx.Locale.Tr "admin.auths.smtp_auth"}}</label>
|
||||||
<div class="ui selection type dropdown">
|
<div class="ui selection type dropdown">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="sspi field {{if not (eq .type 7)}}gt-hidden{{end}}">
|
<div class="sspi field {{if not (eq .type 7)}}tw-hidden{{end}}">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<label for="sspi_auto_create_users"><strong>{{ctx.Locale.Tr "admin.auths.sspi_auto_create_users"}}</strong></label>
|
<label for="sspi_auto_create_users"><strong>{{ctx.Locale.Tr "admin.auths.sspi_auto_create_users"}}</strong></label>
|
||||||
|
|
|
@ -229,7 +229,7 @@
|
||||||
<dt>{{ctx.Locale.Tr "admin.config.mailer_user"}}</dt>
|
<dt>{{ctx.Locale.Tr "admin.config.mailer_user"}}</dt>
|
||||||
<dd>{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}</dd>
|
<dd>{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}</dd>
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<dt class="gt-py-2">{{ctx.Locale.Tr "admin.config.send_test_mail"}}</dt>
|
<dt class="tw-py-1">{{ctx.Locale.Tr "admin.config.send_test_mail"}}</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<form class="ui form ignore-dirty" action="{{AppSubUrl}}/admin/config/test_mail" method="post">
|
<form class="ui form ignore-dirty" action="{{AppSubUrl}}/admin/config/test_mail" method="post">
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
|
@ -332,7 +332,7 @@
|
||||||
{{range $loggerName, $loggerDetail := .Loggers}}
|
{{range $loggerName, $loggerDetail := .Loggers}}
|
||||||
<dt>{{ctx.Locale.Tr "admin.config.logger_name_fmt" $loggerName}}</dt>
|
<dt>{{ctx.Locale.Tr "admin.config.logger_name_fmt" $loggerName}}</dt>
|
||||||
{{if $loggerDetail.IsEnabled}}
|
{{if $loggerDetail.IsEnabled}}
|
||||||
<dd><pre class="gt-m-0">{{$loggerDetail.EventWriters | JsonUtils.EncodeToString | JsonUtils.PrettyIndent}}</pre></dd>
|
<dd><pre class="tw-m-0">{{$loggerDetail.EventWriters | JsonUtils.EncodeToString | JsonUtils.PrettyIndent}}</pre></dd>
|
||||||
{{else}}
|
{{else}}
|
||||||
<dd>{{ctx.Locale.Tr "admin.config.disabled_logger"}}</dd>
|
<dd>{{ctx.Locale.Tr "admin.config.disabled_logger"}}</dd>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<details>
|
<details>
|
||||||
<summary>{{ctx.Locale.Tr "admin.config.open_with_editor_app_help"}}</summary>
|
<summary>{{ctx.Locale.Tr "admin.config.open_with_editor_app_help"}}</summary>
|
||||||
<pre class="gt-px-4">{{.DefaultOpenWithEditorAppsString}}</pre>
|
<pre class="tw-px-4">{{.DefaultOpenWithEditorAppsString}}</pre>
|
||||||
</details>
|
</details>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached table segment">
|
||||||
<form method="post" action="{{AppSubUrl}}/admin">
|
<form method="post" action="{{AppSubUrl}}/admin">
|
||||||
<table class="ui very basic striped table unstackable gt-mb-0">
|
<table class="ui very basic striped table unstackable tw-mb-0">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached table segment">
|
||||||
<form method="post" action="{{AppSubUrl}}/admin">
|
<form method="post" action="{{AppSubUrl}}/admin">
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<table class="ui very basic table gt-mt-0 gt-px-4">
|
<table class="ui very basic table tw-mt-0 tw-px-4">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ctx.Locale.Tr "admin.dashboard.delete_inactive_accounts"}}</td>
|
<td>{{ctx.Locale.Tr "admin.dashboard.delete_inactive_accounts"}}</td>
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
{{ctx.Locale.Tr "admin.emails.email_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .Total}})
|
{{ctx.Locale.Tr "admin.emails.email_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .Total}})
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached segment">
|
<div class="ui attached segment">
|
||||||
<div class="ui secondary filter menu tw-items-center gt-mx-0">
|
<div class="ui secondary filter menu tw-items-center tw-mx-0">
|
||||||
<form class="ui form ignore-dirty tw-flex-1">
|
<form class="ui form ignore-dirty tw-flex-1">
|
||||||
{{template "shared/search/combo" dict "Value" .Keyword}}
|
{{template "shared/search/combo" dict "Value" .Keyword}}
|
||||||
</form>
|
</form>
|
||||||
<!-- Sort -->
|
<!-- Sort -->
|
||||||
<div class="ui dropdown type jump item gt-mr-0">
|
<div class="ui dropdown type jump item tw-mr-0">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{ctx.Locale.Tr "repo.issues.filter_sort"}}
|
{{ctx.Locale.Tr "repo.issues.filter_sort"}}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
</div>
|
</div>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached segment">
|
<div class="ui attached segment">
|
||||||
<div class="ui secondary filter menu tw-items-center gt-mx-0">
|
<div class="ui secondary filter menu tw-items-center tw-mx-0">
|
||||||
<form class="ui form ignore-dirty tw-flex-1">
|
<form class="ui form ignore-dirty tw-flex-1">
|
||||||
{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.org_kind")}}
|
{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.org_kind")}}
|
||||||
</form>
|
</form>
|
||||||
<!-- Sort -->
|
<!-- Sort -->
|
||||||
<div class="ui dropdown type jump item gt-mr-0">
|
<div class="ui dropdown type jump item tw-mr-0">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{ctx.Locale.Tr "repo.issues.filter_sort"}}
|
{{ctx.Locale.Tr "repo.issues.filter_sort"}}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
-
|
-
|
||||||
{{else}}
|
{{else}}
|
||||||
{{$sum}}
|
{{$sum}}
|
||||||
<form action="{{$.Link}}/remove-all-items" method="post" class="tw-inline-block gt-ml-4">
|
<form action="{{$.Link}}/remove-all-items" method="post" class="tw-inline-block tw-ml-4">
|
||||||
{{$.CsrfTokenHtml}}
|
{{$.CsrfTokenHtml}}
|
||||||
<button class="ui tiny basic red button">{{ctx.Locale.Tr "admin.monitor.queue.settings.remove_all_items"}}</button>
|
<button class="ui tiny basic red button">{{ctx.Locale.Tr "admin.monitor.queue.settings.remove_all_items"}}</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<div class="item tw-flex tw-items-center">
|
<div class="item tw-flex tw-items-center">
|
||||||
<span class="tw-flex-1"> {{svg "octicon-file-directory-fill"}} {{$dir}}</span>
|
<span class="tw-flex-1"> {{svg "octicon-file-directory-fill"}} {{$dir}}</span>
|
||||||
<div>
|
<div>
|
||||||
<button class="ui button primary show-modal gt-p-3" data-modal="#adopt-unadopted-modal-{{$dirI}}">{{svg "octicon-plus"}} {{ctx.Locale.Tr "repo.adopt_preexisting_label"}}</button>
|
<button class="ui button primary show-modal tw-p-2" data-modal="#adopt-unadopted-modal-{{$dirI}}">{{svg "octicon-plus"}} {{ctx.Locale.Tr "repo.adopt_preexisting_label"}}</button>
|
||||||
<div class="ui g-modal-confirm modal" id="adopt-unadopted-modal-{{$dirI}}">
|
<div class="ui g-modal-confirm modal" id="adopt-unadopted-modal-{{$dirI}}">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<span class="label">{{ctx.Locale.Tr "repo.adopt_preexisting"}}</span>
|
<span class="label">{{ctx.Locale.Tr "repo.adopt_preexisting"}}</span>
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
{{template "base/modal_actions_confirm"}}
|
{{template "base/modal_actions_confirm"}}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<button class="ui button red show-modal gt-p-3" data-modal="#delete-unadopted-modal-{{$dirI}}">{{svg "octicon-x"}} {{ctx.Locale.Tr "repo.delete_preexisting_label"}}</button>
|
<button class="ui button red show-modal tw-p-2" data-modal="#delete-unadopted-modal-{{$dirI}}">{{svg "octicon-x"}} {{ctx.Locale.Tr "repo.delete_preexisting_label"}}</button>
|
||||||
<div class="ui g-modal-confirm modal" id="delete-unadopted-modal-{{$dirI}}">
|
<div class="ui g-modal-confirm modal" id="delete-unadopted-modal-{{$dirI}}">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<span class="label">{{ctx.Locale.Tr "repo.delete_preexisting"}}</span>
|
<span class="label">{{ctx.Locale.Tr "repo.delete_preexisting"}}</span>
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
<div class="ui attached segment">
|
<div class="ui attached segment">
|
||||||
{{if .DatabaseCheckHasProblems}}
|
{{if .DatabaseCheckHasProblems}}
|
||||||
{{if .DatabaseType.IsMySQL}}
|
{{if .DatabaseType.IsMySQL}}
|
||||||
<div class="gt-p-3">{{ctx.Locale.Tr "admin.self_check.database_fix_mysql"}}</div>
|
<div class="tw-p-2">{{ctx.Locale.Tr "admin.self_check.database_fix_mysql"}}</div>
|
||||||
{{else if .DatabaseType.IsMSSQL}}
|
{{else if .DatabaseType.IsMSSQL}}
|
||||||
<div class="gt-p-3">{{ctx.Locale.Tr "admin.self_check.database_fix_mssql"}}</div>
|
<div class="tw-p-2">{{ctx.Locale.Tr "admin.self_check.database_fix_mssql"}}</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if .DatabaseCheckCollationMismatch}}
|
{{if .DatabaseCheckCollationMismatch}}
|
||||||
<div class="ui red message">{{ctx.Locale.Tr "admin.self_check.database_collation_mismatch" .DatabaseCheckResult.ExpectedCollation}}</div>
|
<div class="ui red message">{{ctx.Locale.Tr "admin.self_check.database_collation_mismatch" .DatabaseCheckResult.ExpectedCollation}}</div>
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="gt-p-3">{{ctx.Locale.Tr "admin.self_check.no_problem_found"}}</div>
|
<div class="tw-p-2">{{ctx.Locale.Tr "admin.self_check.no_problem_found"}}</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="tw-flex tw-items-center">
|
<div class="tw-flex tw-items-center">
|
||||||
<div class="icon gt-ml-3 gt-mr-3">
|
<div class="icon tw-ml-2 tw-mr-2">
|
||||||
{{if eq .Process.Type "request"}}
|
{{if eq .Process.Type "request"}}
|
||||||
{{svg "octicon-globe" 16}}
|
{{svg "octicon-globe" 16}}
|
||||||
{{else if eq .Process.Type "system"}}
|
{{else if eq .Process.Type "system"}}
|
||||||
|
@ -22,14 +22,14 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{if .Process.Stacks}}
|
{{if .Process.Stacks}}
|
||||||
<div class="divided list gt-ml-3">
|
<div class="divided list tw-ml-2">
|
||||||
{{range .Process.Stacks}}
|
{{range .Process.Stacks}}
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<details>
|
<details>
|
||||||
<summary>
|
<summary>
|
||||||
<div class="flex-text-inline">
|
<div class="flex-text-inline">
|
||||||
<div class="header gt-ml-3">
|
<div class="header tw-ml-2">
|
||||||
<span class="icon gt-mr-3">{{svg "octicon-code" 16}}</span>{{.Description}}{{if gt .Count 1}} * {{.Count}}{{end}}
|
<span class="icon tw-mr-2">{{svg "octicon-code" 16}}</span>{{.Description}}{{if gt .Count 1}} * {{.Count}}{{end}}
|
||||||
</div>
|
</div>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
{{range .Labels}}
|
{{range .Labels}}
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
<div class="list">
|
<div class="list">
|
||||||
{{range .Entry}}
|
{{range .Entry}}
|
||||||
<div class="item tw-flex tw-items-center">
|
<div class="item tw-flex tw-items-center">
|
||||||
<span class="icon gt-mr-4">{{svg "octicon-dot-fill" 16}}</span>
|
<span class="icon tw-mr-4">{{svg "octicon-dot-fill" 16}}</span>
|
||||||
<div class="content tw-flex-1">
|
<div class="content tw-flex-1">
|
||||||
<div class="header"><code>{{.Function}}</code></div>
|
<div class="header"><code>{{.Function}}</code></div>
|
||||||
<div class="description"><code>{{.File}}:{{.Line}}</code></div>
|
<div class="description"><code>{{.File}}:{{.Line}}</code></div>
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .User.LoginSource 0}}gt-hidden{{end}}">
|
<div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .User.LoginSource 0}}tw-hidden{{end}}">
|
||||||
<label for="login_name">{{ctx.Locale.Tr "admin.users.auth_login_name"}}</label>
|
<label for="login_name">{{ctx.Locale.Tr "admin.users.auth_login_name"}}</label>
|
||||||
<input id="login_name" name="login_name" value="{{.User.LoginName}}" autofocus>
|
<input id="login_name" name="login_name" value="{{.User.LoginName}}" autofocus>
|
||||||
</div>
|
</div>
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
<label for="email">{{ctx.Locale.Tr "email"}}</label>
|
<label for="email">{{ctx.Locale.Tr "email"}}</label>
|
||||||
<input id="email" name="email" type="email" value="{{.User.Email}}" autofocus required>
|
<input id="email" name="email" type="email" value="{{.User.Email}}" autofocus required>
|
||||||
</div>
|
</div>
|
||||||
<div class="local field {{if .Err_Password}}error{{end}} {{if not (or (.User.IsLocal) (.User.IsOAuth2))}}gt-hidden{{end}}">
|
<div class="local field {{if .Err_Password}}error{{end}} {{if not (or (.User.IsLocal) (.User.IsOAuth2))}}tw-hidden{{end}}">
|
||||||
<label for="password">{{ctx.Locale.Tr "password"}}</label>
|
<label for="password">{{ctx.Locale.Tr "password"}}</label>
|
||||||
<input id="password" name="password" type="password" autocomplete="new-password">
|
<input id="password" name="password" type="password" autocomplete="new-password">
|
||||||
<p class="help">{{ctx.Locale.Tr "admin.users.password_helper"}}</p>
|
<p class="help">{{ctx.Locale.Tr "admin.users.password_helper"}}</p>
|
||||||
|
@ -128,13 +128,13 @@
|
||||||
<input name="restricted" type="checkbox" {{if .User.IsRestricted}}checked{{end}}>
|
<input name="restricted" type="checkbox" {{if .User.IsRestricted}}checked{{end}}>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inline field {{if DisableGitHooks}}gt-hidden{{end}}">
|
<div class="inline field {{if DisableGitHooks}}tw-hidden{{end}}">
|
||||||
<div class="ui checkbox" data-tooltip-content="{{ctx.Locale.Tr "admin.users.allow_git_hook_tooltip"}}">
|
<div class="ui checkbox" data-tooltip-content="{{ctx.Locale.Tr "admin.users.allow_git_hook_tooltip"}}">
|
||||||
<label><strong>{{ctx.Locale.Tr "admin.users.allow_git_hook"}}</strong></label>
|
<label><strong>{{ctx.Locale.Tr "admin.users.allow_git_hook"}}</strong></label>
|
||||||
<input name="allow_git_hook" type="checkbox" {{if .User.CanEditGitHook}}checked{{end}} {{if DisableGitHooks}}disabled{{end}}>
|
<input name="allow_git_hook" type="checkbox" {{if .User.CanEditGitHook}}checked{{end}} {{if DisableGitHooks}}disabled{{end}}>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inline field {{if or (DisableImportLocal) (.DisableMigrations)}}gt-hidden{{end}}">
|
<div class="inline field {{if or (DisableImportLocal) (.DisableMigrations)}}tw-hidden{{end}}">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<label><strong>{{ctx.Locale.Tr "admin.users.allow_import_local"}}</strong></label>
|
<label><strong>{{ctx.Locale.Tr "admin.users.allow_import_local"}}</strong></label>
|
||||||
<input name="allow_import_local" type="checkbox" {{if .User.CanImportLocal}}checked{{end}} {{if DisableImportLocal}}disabled{{end}}>
|
<input name="allow_import_local" type="checkbox" {{if .User.CanImportLocal}}checked{{end}} {{if DisableImportLocal}}disabled{{end}}>
|
||||||
|
@ -181,7 +181,7 @@
|
||||||
<label>{{ctx.Locale.Tr "settings.lookup_avatar_by_mail"}}</label>
|
<label>{{ctx.Locale.Tr "settings.lookup_avatar_by_mail"}}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field gt-pl-4 {{if .Err_Gravatar}}error{{end}}">
|
<div class="field tw-pl-4 {{if .Err_Gravatar}}error{{end}}">
|
||||||
<label for="gravatar">Avatar {{ctx.Locale.Tr "email"}}</label>
|
<label for="gravatar">Avatar {{ctx.Locale.Tr "email"}}</label>
|
||||||
<input id="gravatar" name="gravatar" value="{{.User.AvatarEmail}}">
|
<input id="gravatar" name="gravatar" value="{{.User.AvatarEmail}}">
|
||||||
</div>
|
</div>
|
||||||
|
@ -194,7 +194,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="inline field gt-pl-4">
|
<div class="inline field tw-pl-4">
|
||||||
<label for="avatar">{{ctx.Locale.Tr "settings.choose_new_avatar"}}</label>
|
<label for="avatar">{{ctx.Locale.Tr "settings.choose_new_avatar"}}</label>
|
||||||
<input name="avatar" type="file" accept="image/png,image/jpeg,image/gif,image/webp">
|
<input name="avatar" type="file" accept="image/png,image/jpeg,image/gif,image/webp">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -103,7 +103,7 @@
|
||||||
<td><span>{{ctx.Locale.Tr "admin.users.never_login"}}</span></td>
|
<td><span>{{ctx.Locale.Tr "admin.users.never_login"}}</span></td>
|
||||||
{{end}}
|
{{end}}
|
||||||
<td>
|
<td>
|
||||||
<div class="tw-flex gt-gap-3">
|
<div class="tw-flex tw-gap-2">
|
||||||
<a href="{{$.Link}}/{{.ID}}" data-tooltip-content="{{ctx.Locale.Tr "admin.users.details"}}">{{svg "octicon-person"}}</a>
|
<a href="{{$.Link}}/{{.ID}}" data-tooltip-content="{{ctx.Locale.Tr "admin.users.details"}}">{{svg "octicon-person"}}</a>
|
||||||
<a href="{{$.Link}}/{{.ID}}/edit" data-tooltip-content="{{ctx.Locale.Tr "edit"}}">{{svg "octicon-pencil"}}</a>
|
<a href="{{$.Link}}/{{.ID}}/edit" data-tooltip-content="{{ctx.Locale.Tr "edit"}}">{{svg "octicon-pencil"}}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .login_type "0-0"}}gt-hidden{{end}}">
|
<div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .login_type "0-0"}}tw-hidden{{end}}">
|
||||||
<label for="login_name">{{ctx.Locale.Tr "admin.users.auth_login_name"}}</label>
|
<label for="login_name">{{ctx.Locale.Tr "admin.users.auth_login_name"}}</label>
|
||||||
<input id="login_name" name="login_name" value="{{.login_name}}">
|
<input id="login_name" name="login_name" value="{{.login_name}}">
|
||||||
</div>
|
</div>
|
||||||
|
@ -59,12 +59,12 @@
|
||||||
<label for="email">{{ctx.Locale.Tr "email"}}</label>
|
<label for="email">{{ctx.Locale.Tr "email"}}</label>
|
||||||
<input id="email" name="email" type="email" value="{{.email}}" required>
|
<input id="email" name="email" type="email" value="{{.email}}" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="required local field {{if .Err_Password}}error{{end}} {{if not (eq .login_type "0-0")}}gt-hidden{{end}}">
|
<div class="required local field {{if .Err_Password}}error{{end}} {{if not (eq .login_type "0-0")}}tw-hidden{{end}}">
|
||||||
<label for="password">{{ctx.Locale.Tr "password"}}</label>
|
<label for="password">{{ctx.Locale.Tr "password"}}</label>
|
||||||
<input id="password" name="password" type="password" autocomplete="new-password" value="{{.password}}" {{if eq .login_type "0-0"}}required{{end}}>
|
<input id="password" name="password" type="password" autocomplete="new-password" value="{{.password}}" {{if eq .login_type "0-0"}}required{{end}}>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="inline field local {{if ne .login_type "0-0"}}gt-hidden{{end}}">
|
<div class="inline field local {{if ne .login_type "0-0"}}tw-hidden{{end}}">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<label><strong>{{ctx.Locale.Tr "auth.allow_password_change"}}</strong></label>
|
<label><strong>{{ctx.Locale.Tr "auth.allow_password_change"}}</strong></label>
|
||||||
<input name="must_change_password" type="checkbox" checked>
|
<input name="must_change_password" type="checkbox" checked>
|
||||||
|
|
|
@ -13,14 +13,14 @@
|
||||||
<!-- mobile right menu, it must be here because in mobile view, each item is a flex column, the first item is a full row column -->
|
<!-- mobile right menu, it must be here because in mobile view, each item is a flex column, the first item is a full row column -->
|
||||||
<div class="ui secondary menu item navbar-mobile-right only-mobile">
|
<div class="ui secondary menu item navbar-mobile-right only-mobile">
|
||||||
{{if .IsSigned}}
|
{{if .IsSigned}}
|
||||||
<a id="mobile-notifications-icon" class="item tw-w-auto gt-p-3" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{ctx.Locale.Tr "notifications"}}">
|
<a id="mobile-notifications-icon" class="item tw-w-auto tw-p-2" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{ctx.Locale.Tr "notifications"}}">
|
||||||
<div class="tw-relative">
|
<div class="tw-relative">
|
||||||
{{svg "octicon-bell"}}
|
{{svg "octicon-bell"}}
|
||||||
<span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}">{{$notificationUnreadCount}}</span>
|
<span class="notification_count{{if not $notificationUnreadCount}} tw-hidden{{end}}">{{$notificationUnreadCount}}</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
<button class="item tw-w-auto ui icon mini button gt-p-3 gt-m-0" id="navbar-expand-toggle" aria-label="{{ctx.Locale.Tr "home.nav_menu"}}">{{svg "octicon-three-bars"}}</button>
|
<button class="item tw-w-auto ui icon mini button tw-p-2 tw-m-0" id="navbar-expand-toggle" aria-label="{{ctx.Locale.Tr "home.nav_menu"}}">{{svg "octicon-three-bars"}}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- navbar links non-mobile -->
|
<!-- navbar links non-mobile -->
|
||||||
|
@ -57,8 +57,8 @@
|
||||||
{{if and .IsSigned .MustChangePassword}}
|
{{if and .IsSigned .MustChangePassword}}
|
||||||
<div class="ui dropdown jump item" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}">
|
<div class="ui dropdown jump item" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}">
|
||||||
<span class="text tw-flex tw-items-center">
|
<span class="text tw-flex tw-items-center">
|
||||||
{{ctx.AvatarUtils.Avatar .SignedUser 24 "gt-mr-2"}}
|
{{ctx.AvatarUtils.Avatar .SignedUser 24 "tw-mr-1"}}
|
||||||
<span class="only-mobile gt-ml-3">{{.SignedUser.Name}}</span>
|
<span class="only-mobile tw-ml-2">{{.SignedUser.Name}}</span>
|
||||||
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
||||||
</span>
|
</span>
|
||||||
<div class="menu user-menu">
|
<div class="menu user-menu">
|
||||||
|
@ -75,19 +75,19 @@
|
||||||
</div><!-- end dropdown avatar menu -->
|
</div><!-- end dropdown avatar menu -->
|
||||||
{{else if .IsSigned}}
|
{{else if .IsSigned}}
|
||||||
{{if EnableTimetracking}}
|
{{if EnableTimetracking}}
|
||||||
<a class="active-stopwatch-trigger item gt-mx-0{{if not .ActiveStopwatch}} gt-hidden{{end}}" href="{{.ActiveStopwatch.IssueLink}}" title="{{ctx.Locale.Tr "active_stopwatch"}}">
|
<a class="active-stopwatch-trigger item tw-mx-0{{if not .ActiveStopwatch}} tw-hidden{{end}}" href="{{.ActiveStopwatch.IssueLink}}" title="{{ctx.Locale.Tr "active_stopwatch"}}">
|
||||||
<div class="tw-relative">
|
<div class="tw-relative">
|
||||||
{{svg "octicon-stopwatch"}}
|
{{svg "octicon-stopwatch"}}
|
||||||
<span class="header-stopwatch-dot"></span>
|
<span class="header-stopwatch-dot"></span>
|
||||||
</div>
|
</div>
|
||||||
<span class="only-mobile gt-ml-3">{{ctx.Locale.Tr "active_stopwatch"}}</span>
|
<span class="only-mobile tw-ml-2">{{ctx.Locale.Tr "active_stopwatch"}}</span>
|
||||||
</a>
|
</a>
|
||||||
<div class="active-stopwatch-popup item tippy-target gt-p-3">
|
<div class="active-stopwatch-popup item tippy-target tw-p-2">
|
||||||
<div class="tw-flex tw-items-center">
|
<div class="tw-flex tw-items-center">
|
||||||
<a class="stopwatch-link tw-flex tw-items-center" href="{{.ActiveStopwatch.IssueLink}}">
|
<a class="stopwatch-link tw-flex tw-items-center" href="{{.ActiveStopwatch.IssueLink}}">
|
||||||
{{svg "octicon-issue-opened" 16 "gt-mr-3"}}
|
{{svg "octicon-issue-opened" 16 "tw-mr-2"}}
|
||||||
<span class="stopwatch-issue">{{.ActiveStopwatch.RepoSlug}}#{{.ActiveStopwatch.IssueIndex}}</span>
|
<span class="stopwatch-issue">{{.ActiveStopwatch.RepoSlug}}#{{.ActiveStopwatch.IssueIndex}}</span>
|
||||||
<span class="ui primary label stopwatch-time gt-my-0 gt-mx-4" data-seconds="{{.ActiveStopwatch.Seconds}}">
|
<span class="ui primary label stopwatch-time tw-my-0 tw-mx-4" data-seconds="{{.ActiveStopwatch.Seconds}}">
|
||||||
{{if .ActiveStopwatch}}{{Sec2Time .ActiveStopwatch.Seconds}}{{end}}
|
{{if .ActiveStopwatch}}{{Sec2Time .ActiveStopwatch.Seconds}}{{end}}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
@ -111,14 +111,14 @@
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<a class="item not-mobile gt-mx-0" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{ctx.Locale.Tr "notifications"}}">
|
<a class="item not-mobile tw-mx-0" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{ctx.Locale.Tr "notifications"}}">
|
||||||
<div class="tw-relative">
|
<div class="tw-relative">
|
||||||
{{svg "octicon-bell"}}
|
{{svg "octicon-bell"}}
|
||||||
<span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}">{{$notificationUnreadCount}}</span>
|
<span class="notification_count{{if not $notificationUnreadCount}} tw-hidden{{end}}">{{$notificationUnreadCount}}</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="ui dropdown jump item gt-mx-0 gt-pr-3" data-tooltip-content="{{ctx.Locale.Tr "create_new"}}">
|
<div class="ui dropdown jump item tw-mx-0 tw-pr-2" data-tooltip-content="{{ctx.Locale.Tr "create_new"}}">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{svg "octicon-plus"}}
|
{{svg "octicon-plus"}}
|
||||||
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
||||||
|
@ -141,10 +141,10 @@
|
||||||
</div><!-- end content create new menu -->
|
</div><!-- end content create new menu -->
|
||||||
</div><!-- end dropdown menu create new -->
|
</div><!-- end dropdown menu create new -->
|
||||||
|
|
||||||
<div class="ui dropdown jump item gt-mx-0 gt-pr-3" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}">
|
<div class="ui dropdown jump item tw-mx-0 tw-pr-2" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}">
|
||||||
<span class="text tw-flex tw-items-center">
|
<span class="text tw-flex tw-items-center">
|
||||||
{{ctx.AvatarUtils.Avatar .SignedUser 24 "gt-mr-2"}}
|
{{ctx.AvatarUtils.Avatar .SignedUser 24 "tw-mr-1"}}
|
||||||
<span class="only-mobile gt-ml-3">{{.SignedUser.Name}}</span>
|
<span class="only-mobile tw-ml-2">{{.SignedUser.Name}}</span>
|
||||||
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
||||||
</span>
|
</span>
|
||||||
<div class="menu user-menu">
|
<div class="menu user-menu">
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
<div class="center page buttons">
|
<div class="center page buttons">
|
||||||
<div class="ui borderless pagination menu">
|
<div class="ui borderless pagination menu">
|
||||||
<a class="{{if .IsFirst}}disabled{{end}} item navigation" {{if not .IsFirst}}href="{{$paginationLink}}{{if $paginationParams}}?{{$paginationParams}}{{end}}"{{end}}>
|
<a class="{{if .IsFirst}}disabled{{end}} item navigation" {{if not .IsFirst}}href="{{$paginationLink}}{{if $paginationParams}}?{{$paginationParams}}{{end}}"{{end}}>
|
||||||
{{svg "gitea-double-chevron-left" 16 "gt-mr-2"}}
|
{{svg "gitea-double-chevron-left" 16 "tw-mr-1"}}
|
||||||
<span class="navigation_label">{{ctx.Locale.Tr "admin.first_page"}}</span>
|
<span class="navigation_label">{{ctx.Locale.Tr "admin.first_page"}}</span>
|
||||||
</a>
|
</a>
|
||||||
<a class="{{if not .HasPrevious}}disabled{{end}} item navigation" {{if .HasPrevious}}href="{{$paginationLink}}?page={{.Previous}}{{if $paginationParams}}&{{$paginationParams}}{{end}}"{{end}}>
|
<a class="{{if not .HasPrevious}}disabled{{end}} item navigation" {{if .HasPrevious}}href="{{$paginationLink}}?page={{.Previous}}{{if $paginationParams}}&{{$paginationParams}}{{end}}"{{end}}>
|
||||||
{{svg "octicon-chevron-left" 16 "gt-mr-2"}}
|
{{svg "octicon-chevron-left" 16 "tw-mr-1"}}
|
||||||
<span class="navigation_label">{{ctx.Locale.Tr "repo.issues.previous"}}</span>
|
<span class="navigation_label">{{ctx.Locale.Tr "repo.issues.previous"}}</span>
|
||||||
</a>
|
</a>
|
||||||
{{range .Pages}}
|
{{range .Pages}}
|
||||||
|
@ -22,11 +22,11 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
<a class="{{if not .HasNext}}disabled{{end}} item navigation" {{if .HasNext}}href="{{$paginationLink}}?page={{.Next}}{{if $paginationParams}}&{{$paginationParams}}{{end}}"{{end}}>
|
<a class="{{if not .HasNext}}disabled{{end}} item navigation" {{if .HasNext}}href="{{$paginationLink}}?page={{.Next}}{{if $paginationParams}}&{{$paginationParams}}{{end}}"{{end}}>
|
||||||
<span class="navigation_label">{{ctx.Locale.Tr "repo.issues.next"}}</span>
|
<span class="navigation_label">{{ctx.Locale.Tr "repo.issues.next"}}</span>
|
||||||
{{svg "octicon-chevron-right" 16 "gt-ml-2"}}
|
{{svg "octicon-chevron-right" 16 "tw-ml-1"}}
|
||||||
</a>
|
</a>
|
||||||
<a class="{{if .IsLast}}disabled{{end}} item navigation" {{if not .IsLast}}href="{{$paginationLink}}?page={{.TotalPages}}{{if $paginationParams}}&{{$paginationParams}}{{end}}"{{end}}>
|
<a class="{{if .IsLast}}disabled{{end}} item navigation" {{if not .IsLast}}href="{{$paginationLink}}?page={{.TotalPages}}{{if $paginationParams}}&{{$paginationParams}}{{end}}"{{end}}>
|
||||||
<span class="navigation_label">{{ctx.Locale.Tr "admin.last_page"}}</span>
|
<span class="navigation_label">{{ctx.Locale.Tr "admin.last_page"}}</span>
|
||||||
{{svg "gitea-double-chevron-right" 16 "gt-ml-2"}}
|
{{svg "gitea-double-chevron-right" 16 "tw-ml-1"}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
<div><button name="btn">submit post</button></div>
|
<div><button name="btn">submit post</button></div>
|
||||||
</form>
|
</form>
|
||||||
<form method="post" action="/no-such-uri" class="form-fetch-action">
|
<form method="post" action="/no-such-uri" class="form-fetch-action">
|
||||||
<div class="gt-py-5">bad action url</div>
|
<div class="tw-py-8">bad action url</div>
|
||||||
<div><button name="btn">submit test</button></div>
|
<div><button name="btn">submit test</button></div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-item-trailing">
|
<div class="flex-item-trailing">
|
||||||
<a class="muted" href="{{$.Link}}">
|
<a class="muted" href="{{$.Link}}">
|
||||||
<span class="flex-text-inline"><i class="color-icon gt-mr-3 tw-bg-blue"></i>Go</span>
|
<span class="flex-text-inline"><i class="color-icon tw-mr-2 tw-bg-blue"></i>Go</span>
|
||||||
</a>
|
</a>
|
||||||
<a class="text grey flex-text-inline" href="{{$.Link}}">{{svg "octicon-star" 16}}45000</a>
|
<a class="text grey flex-text-inline" href="{{$.Link}}">{{svg "octicon-star" 16}}45000</a>
|
||||||
<a class="text grey flex-text-inline" href="{{$.Link}}">{{svg "octicon-git-branch" 16}}1234</a>
|
<a class="text grey flex-text-inline" href="{{$.Link}}">{{svg "octicon-git-branch" 16}}1234</a>
|
||||||
|
@ -104,7 +104,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h1>If parent provides the padding/margin space:</h1>
|
<h1>If parent provides the padding/margin space:</h1>
|
||||||
<div class="tw-border tw-border-secondary gt-py-4">
|
<div class="tw-border tw-border-secondary tw-py-4">
|
||||||
<div class="flex-list flex-space-fitted">
|
<div class="flex-list flex-space-fitted">
|
||||||
<div class="flex-item">item 1 (no padding top)</div>
|
<div class="flex-item">item 1 (no padding top)</div>
|
||||||
<div class="flex-item">item 2 (no padding bottom)</div>
|
<div class="flex-item">item 2 (no padding bottom)</div>
|
||||||
|
|
|
@ -2,6 +2,13 @@
|
||||||
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/devtest.css?v={{AssetVersion}}">
|
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/devtest.css?v={{AssetVersion}}">
|
||||||
<div class="page-content devtest ui container">
|
<div class="page-content devtest ui container">
|
||||||
<div>
|
<div>
|
||||||
|
<h1>Link</h1>
|
||||||
|
<div>
|
||||||
|
<a href="#">normal</a>
|
||||||
|
<a class="muted" href="#">muted</a>
|
||||||
|
<a class="suppressed" href="#">suppressed</a>
|
||||||
|
<a class="silenced" href="#">silenced</a>
|
||||||
|
</div>
|
||||||
<h1>Button</h1>
|
<h1>Button</h1>
|
||||||
<div>
|
<div>
|
||||||
Style:
|
Style:
|
||||||
|
@ -60,10 +67,10 @@
|
||||||
</li>
|
</li>
|
||||||
<li class="sample-group">
|
<li class="sample-group">
|
||||||
<h2>Inline / Plain:</h2>
|
<h2>Inline / Plain:</h2>
|
||||||
<div class="gt-my-2">
|
<div class="tw-my-1">
|
||||||
<button class="btn gt-p-3">Plain button</button>
|
<button class="btn tw-p-2">Plain button</button>
|
||||||
<button class="btn interact-fg gt-p-3">Plain button with interact fg</button>
|
<button class="btn interact-fg tw-p-2">Plain button with interact fg</button>
|
||||||
<button class="btn interact-bg gt-p-3">Plain button with interact bg</button>
|
<button class="btn interact-bg tw-p-2">Plain button with interact bg</button>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -95,8 +102,8 @@
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h1>Loading</h1>
|
<h1>Loading</h1>
|
||||||
<div class="is-loading small-loading-icon tw-border tw-border-secondary gt-py-2"><span>loading ...</span></div>
|
<div class="is-loading small-loading-icon tw-border tw-border-secondary tw-py-1"><span>loading ...</span></div>
|
||||||
<div class="is-loading tw-border tw-border-secondary gt-py-4">
|
<div class="is-loading tw-border tw-border-secondary tw-py-4">
|
||||||
<p>loading ...</p>
|
<p>loading ...</p>
|
||||||
<p>loading ...</p>
|
<p>loading ...</p>
|
||||||
<p>loading ...</p>
|
<p>loading ...</p>
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
<div class="flex-item-trailing muted-links">
|
<div class="flex-item-trailing muted-links">
|
||||||
{{if .PrimaryLanguage}}
|
{{if .PrimaryLanguage}}
|
||||||
<a class="flex-text-inline" href="?q={{$.Keyword}}&sort={{$.SortType}}&language={{.PrimaryLanguage.Language}}{{if $.TabName}}&tab={{$.TabName}}{{end}}">
|
<a class="flex-text-inline" href="?q={{$.Keyword}}&sort={{$.SortType}}&language={{.PrimaryLanguage.Language}}{{if $.TabName}}&tab={{$.TabName}}{{end}}">
|
||||||
<i class="color-icon gt-mr-3" style="background-color: {{.PrimaryLanguage.Color}}"></i>
|
<i class="color-icon tw-mr-2" style="background-color: {{.PrimaryLanguage.Color}}"></i>
|
||||||
{{.PrimaryLanguage.Language}}
|
{{.PrimaryLanguage.Language}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="ui small secondary filter menu tw-items-center gt-mx-0">
|
<div class="ui small secondary filter menu tw-items-center tw-mx-0">
|
||||||
<form class="ui form ignore-dirty tw-flex-1">
|
<form class="ui form ignore-dirty tw-flex-1">
|
||||||
{{if .PageIsExploreUsers}}
|
{{if .PageIsExploreUsers}}
|
||||||
{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.user_kind")}}
|
{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.user_kind")}}
|
||||||
|
@ -7,7 +7,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
</form>
|
</form>
|
||||||
<!-- Sort -->
|
<!-- Sort -->
|
||||||
<div class="ui small dropdown type jump item gt-mr-0">
|
<div class="ui small dropdown type jump item tw-mr-0">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{ctx.Locale.Tr "repo.issues.filter_sort"}}
|
{{ctx.Locale.Tr "repo.issues.filter_sort"}}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div role="main" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home"}}{{end}}" class="page-content home">
|
<div role="main" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home"}}{{end}}" class="page-content home">
|
||||||
<div class="gt-mb-5 gt-px-5">
|
<div class="tw-mb-8 tw-px-8">
|
||||||
<div class="center">
|
<div class="center">
|
||||||
<img class="logo" width="220" height="220" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}">
|
<img class="logo" width="220" height="220" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}">
|
||||||
<div class="hero">
|
<div class="hero">
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="gt-mt-4 gt-hidden" data-db-setting-for="common-host">
|
<div class="tw-mt-4 tw-hidden" data-db-setting-for="common-host">
|
||||||
<div class="inline required field {{if .Err_DbSetting}}error{{end}}">
|
<div class="inline required field {{if .Err_DbSetting}}error{{end}}">
|
||||||
<label for="db_host">{{ctx.Locale.Tr "install.host"}}</label>
|
<label for="db_host">{{ctx.Locale.Tr "install.host"}}</label>
|
||||||
<input id="db_host" name="db_host" value="{{.db_host}}">
|
<input id="db_host" name="db_host" value="{{.db_host}}">
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="gt-mt-4 gt-hidden" data-db-setting-for="postgres">
|
<div class="tw-mt-4 tw-hidden" data-db-setting-for="postgres">
|
||||||
<div class="inline required field">
|
<div class="inline required field">
|
||||||
<label>{{ctx.Locale.Tr "install.ssl_mode"}}</label>
|
<label>{{ctx.Locale.Tr "install.ssl_mode"}}</label>
|
||||||
<div class="ui selection database type dropdown">
|
<div class="ui selection database type dropdown">
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="gt-mt-4 gt-hidden" data-db-setting-for="sqlite3">
|
<div class="tw-mt-4 tw-hidden" data-db-setting-for="sqlite3">
|
||||||
<div class="inline required field {{if or .Err_DbPath .Err_DbSetting}}error{{end}}">
|
<div class="inline required field {{if or .Err_DbPath .Err_DbSetting}}error{{end}}">
|
||||||
<label for="db_path">{{ctx.Locale.Tr "install.path"}}</label>
|
<label for="db_path">{{ctx.Locale.Tr "install.path"}}</label>
|
||||||
<input id="db_path" name="db_path" value="{{.db_path}}">
|
<input id="db_path" name="db_path" value="{{.db_path}}">
|
||||||
|
@ -160,7 +160,7 @@
|
||||||
|
|
||||||
<!-- Email -->
|
<!-- Email -->
|
||||||
<details class="optional field">
|
<details class="optional field">
|
||||||
<summary class="right-content gt-py-3{{if .Err_SMTP}} text red{{end}}">
|
<summary class="right-content tw-py-2{{if .Err_SMTP}} text red{{end}}">
|
||||||
{{ctx.Locale.Tr "install.email_title"}}
|
{{ctx.Locale.Tr "install.email_title"}}
|
||||||
</summary>
|
</summary>
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
|
@ -200,7 +200,7 @@
|
||||||
|
|
||||||
<!-- Server and other services -->
|
<!-- Server and other services -->
|
||||||
<details class="optional field">
|
<details class="optional field">
|
||||||
<summary class="right-content gt-py-3{{if .Err_Services}} text red{{end}}">
|
<summary class="right-content tw-py-2{{if .Err_Services}} text red{{end}}">
|
||||||
{{ctx.Locale.Tr "install.server_service_title"}}
|
{{ctx.Locale.Tr "install.server_service_title"}}
|
||||||
</summary>
|
</summary>
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
|
@ -298,7 +298,7 @@
|
||||||
|
|
||||||
<!-- Admin -->
|
<!-- Admin -->
|
||||||
<details class="optional field">
|
<details class="optional field">
|
||||||
<summary class="right-content gt-py-3{{if .Err_Admin}} text red{{end}}">
|
<summary class="right-content tw-py-2{{if .Err_Admin}} text red{{end}}">
|
||||||
{{ctx.Locale.Tr "install.admin_title"}}
|
{{ctx.Locale.Tr "install.admin_title"}}
|
||||||
</summary>
|
</summary>
|
||||||
<p class="center">{{ctx.Locale.Tr "install.admin_setting_desc"}}</p>
|
<p class="center">{{ctx.Locale.Tr "install.admin_setting_desc"}}</p>
|
||||||
|
@ -327,7 +327,7 @@
|
||||||
<div class="right-content">
|
<div class="right-content">
|
||||||
{{ctx.Locale.Tr "install.env_config_keys_prompt"}}
|
{{ctx.Locale.Tr "install.env_config_keys_prompt"}}
|
||||||
</div>
|
</div>
|
||||||
<div class="right-content gt-mt-3">
|
<div class="right-content tw-mt-2">
|
||||||
{{range .EnvConfigKeys}}<span class="ui label">{{.}}</span>{{end}}
|
{{range .EnvConfigKeys}}<span class="ui label">{{.}}</span>{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -338,7 +338,7 @@
|
||||||
<div class="right-content">
|
<div class="right-content">
|
||||||
These configuration options will be written into: {{.CustomConfFile}}
|
These configuration options will be written into: {{.CustomConfFile}}
|
||||||
</div>
|
</div>
|
||||||
<div class="right-content gt-mt-3">
|
<div class="right-content tw-mt-2">
|
||||||
<button class="ui primary button">{{ctx.Locale.Tr "install.install_btn_confirm"}}</button>
|
<button class="ui primary button">{{ctx.Locale.Tr "install.install_btn_confirm"}}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -347,5 +347,5 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<img class="gt-hidden" src="{{AssetUrlPrefix}}/img/loading.png">
|
<img class="tw-hidden" src="{{AssetUrlPrefix}}/img/loading.png">
|
||||||
{{template "base/footer" .}}
|
{{template "base/footer" .}}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<button class="ui basic button gt-mr-0" hx-post="{{.Org.HomeLink}}?action={{if $.IsFollowing}}unfollow{{else}}follow{{end}}">
|
<button class="ui basic button tw-mr-0" hx-post="{{.Org.HomeLink}}?action={{if $.IsFollowing}}unfollow{{else}}follow{{end}}">
|
||||||
{{if $.IsFollowing}}
|
{{if $.IsFollowing}}
|
||||||
{{ctx.Locale.Tr "user.unfollow"}}
|
{{ctx.Locale.Tr "user.unfollow"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
{{if .Org.Visibility.IsLimited}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</span>{{end}}
|
{{if .Org.Visibility.IsLimited}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</span>{{end}}
|
||||||
{{if .Org.Visibility.IsPrivate}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</span>{{end}}
|
{{if .Org.Visibility.IsPrivate}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</span>{{end}}
|
||||||
</span>
|
</span>
|
||||||
<span class="tw-flex tw-items-center gt-gap-2 tw-ml-auto tw-text-16 tw-whitespace-nowrap">
|
<span class="tw-flex tw-items-center tw-gap-1 tw-ml-auto tw-text-16 tw-whitespace-nowrap">
|
||||||
{{if .EnableFeed}}
|
{{if .EnableFeed}}
|
||||||
<a class="ui basic label button gt-mr-0" href="{{.Org.HomeLink}}.rss" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}">
|
<a class="ui basic label button tw-mr-0" href="{{.Org.HomeLink}}.rss" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}">
|
||||||
{{svg "octicon-rss" 24}}
|
{{svg "octicon-rss" 24}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{{if .RenderedDescription}}<div class="render-content markup">{{.RenderedDescription}}</div>{{end}}
|
{{if .RenderedDescription}}<div class="render-content markup">{{.RenderedDescription}}</div>{{end}}
|
||||||
<div class="text light meta gt-mt-2">
|
<div class="text light meta tw-mt-1">
|
||||||
{{if .Org.Location}}<div class="flex-text-block">{{svg "octicon-location"}} <span>{{.Org.Location}}</span></div>{{end}}
|
{{if .Org.Location}}<div class="flex-text-block">{{svg "octicon-location"}} <span>{{.Org.Location}}</span></div>{{end}}
|
||||||
{{if .Org.Website}}<div class="flex-text-block">{{svg "octicon-link"}} <a class="muted" target="_blank" rel="noopener noreferrer me" href="{{.Org.Website}}">{{.Org.Website}}</a></div>{{end}}
|
{{if .Org.Website}}<div class="flex-text-block">{{svg "octicon-link"}} <a class="muted" target="_blank" rel="noopener noreferrer me" href="{{.Org.Website}}">{{.Org.Website}}</a></div>{{end}}
|
||||||
{{if .IsSigned}}
|
{{if .IsSigned}}
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
{{template "shared/user/profile_big_avatar" .}}
|
{{template "shared/user/profile_big_avatar" .}}
|
||||||
</div>
|
</div>
|
||||||
<div class="ui twelve wide column">
|
<div class="ui twelve wide column">
|
||||||
<div class="gt-mb-4">
|
<div class="tw-mb-4">
|
||||||
{{template "user/overview/header" .}}
|
{{template "user/overview/header" .}}
|
||||||
</div>
|
</div>
|
||||||
{{template "projects/list" .}}
|
{{template "projects/list" .}}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<div class="required field {{if .Err_Name}}error{{end}}">
|
<div class="required field {{if .Err_Name}}error{{end}}">
|
||||||
<label for="org_name">{{ctx.Locale.Tr "org.org_name_holder"}}
|
<label for="org_name">{{ctx.Locale.Tr "org.org_name_holder"}}
|
||||||
<span class="text red gt-hidden" id="org-name-change-prompt">
|
<span class="text red tw-hidden" id="org-name-change-prompt">
|
||||||
<br>{{ctx.Locale.Tr "org.settings.change_orgname_prompt"}}<br>{{ctx.Locale.Tr "org.settings.change_orgname_redirect_prompt"}}
|
<br>{{ctx.Locale.Tr "org.settings.change_orgname_prompt"}}<br>{{ctx.Locale.Tr "org.settings.change_orgname_redirect_prompt"}}
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
{{template "org/team/navbar" .}}
|
{{template "org/team/navbar" .}}
|
||||||
{{if .IsOrganizationOwner}}
|
{{if .IsOrganizationOwner}}
|
||||||
<div class="ui attached segment">
|
<div class="ui attached segment">
|
||||||
<form class="ui form ignore-dirty tw-flex tw-flex-wrap gt-gap-3" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/add" method="post">
|
<form class="ui form ignore-dirty tw-flex tw-flex-wrap tw-gap-2" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/add" method="post">
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<input type="hidden" name="uid" value="{{.SignedUser.ID}}">
|
<input type="hidden" name="uid" value="{{.SignedUser.ID}}">
|
||||||
<div id="search-user-box" class="ui search gt-mr-3"{{if .IsEmailInviteEnabled}} data-allow-email="true" data-allow-email-description="{{ctx.Locale.Tr "org.teams.invite_team_member" $.Team.Name}}"{{end}}>
|
<div id="search-user-box" class="ui search tw-mr-2"{{if .IsEmailInviteEnabled}} data-allow-email="true" data-allow-email-description="{{ctx.Locale.Tr "org.teams.invite_team_member" $.Team.Name}}"{{end}}>
|
||||||
<div class="ui input">
|
<div class="ui input">
|
||||||
<input class="prompt" name="uname" placeholder="{{ctx.Locale.Tr "search.user_kind"}}" autocomplete="off" required>
|
<input class="prompt" name="uname" placeholder="{{ctx.Locale.Tr "search.user_kind"}}" autocomplete="off" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -71,18 +71,18 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
|
|
||||||
<div class="team-units required grouped field {{if eq .Team.AccessMode 3}}gt-hidden{{end}}">
|
<div class="team-units required grouped field {{if eq .Team.AccessMode 3}}tw-hidden{{end}}">
|
||||||
<label>{{ctx.Locale.Tr "org.team_unit_desc"}}</label>
|
<label>{{ctx.Locale.Tr "org.team_unit_desc"}}</label>
|
||||||
<table class="ui celled table">
|
<table class="ui celled table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{ctx.Locale.Tr "units.unit"}}</th>
|
<th>{{ctx.Locale.Tr "units.unit"}}</th>
|
||||||
<th class="center aligned">{{ctx.Locale.Tr "org.teams.none_access"}}
|
<th class="center aligned">{{ctx.Locale.Tr "org.teams.none_access"}}
|
||||||
<span class="tw-align-middle" data-tooltip-content="{{ctx.Locale.Tr "org.teams.none_access_helper"}}">{{svg "octicon-question" 16 "gt-ml-2"}}</span></th>
|
<span class="tw-align-middle" data-tooltip-content="{{ctx.Locale.Tr "org.teams.none_access_helper"}}">{{svg "octicon-question" 16 "tw-ml-1"}}</span></th>
|
||||||
<th class="center aligned">{{ctx.Locale.Tr "org.teams.read_access"}}
|
<th class="center aligned">{{ctx.Locale.Tr "org.teams.read_access"}}
|
||||||
<span class="tw-align-middle" data-tooltip-content="{{ctx.Locale.Tr "org.teams.read_access_helper"}}">{{svg "octicon-question" 16 "gt-ml-2"}}</span></th>
|
<span class="tw-align-middle" data-tooltip-content="{{ctx.Locale.Tr "org.teams.read_access_helper"}}">{{svg "octicon-question" 16 "tw-ml-1"}}</span></th>
|
||||||
<th class="center aligned">{{ctx.Locale.Tr "org.teams.write_access"}}
|
<th class="center aligned">{{ctx.Locale.Tr "org.teams.write_access"}}
|
||||||
<span class="tw-align-middle" data-tooltip-content="{{ctx.Locale.Tr "org.teams.write_access_helper"}}">{{svg "octicon-question" 16 "gt-ml-2"}}</span></th>
|
<span class="tw-align-middle" data-tooltip-content="{{ctx.Locale.Tr "org.teams.write_access_helper"}}">{{svg "octicon-question" 16 "tw-ml-1"}}</span></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
{{template "org/team/navbar" .}}
|
{{template "org/team/navbar" .}}
|
||||||
{{$canAddRemove := and $.IsOrganizationOwner (not $.Team.IncludesAllRepositories)}}
|
{{$canAddRemove := and $.IsOrganizationOwner (not $.Team.IncludesAllRepositories)}}
|
||||||
{{if $canAddRemove}}
|
{{if $canAddRemove}}
|
||||||
<div class="ui attached segment tw-flex tw-flex-wrap gt-gap-3">
|
<div class="ui attached segment tw-flex tw-flex-wrap tw-gap-2">
|
||||||
<form class="ui form ignore-dirty tw-flex-1 tw-flex" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/add" method="post">
|
<form class="ui form ignore-dirty tw-flex-1 tw-flex" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/add" method="post">
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<div id="search-repo-box" data-uid="{{.Org.ID}}" class="ui search">
|
<div id="search-repo-box" data-uid="{{.Org.ID}}" class="ui search">
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
<input class="prompt" name="repo_name" placeholder="{{ctx.Locale.Tr "search.repo_kind"}}" autocomplete="off" required>
|
<input class="prompt" name="repo_name" placeholder="{{ctx.Locale.Tr "search.repo_kind"}}" autocomplete="off" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button class="ui primary button gt-ml-3">{{ctx.Locale.Tr "add"}}</button>
|
<button class="ui primary button tw-ml-2">{{ctx.Locale.Tr "add"}}</button>
|
||||||
</form>
|
</form>
|
||||||
<div class="tw-inline-block">
|
<div class="tw-inline-block">
|
||||||
<button class="ui primary button link-action" data-modal-confirm="{{ctx.Locale.Tr "org.teams.add_all_repos_desc"}}" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/addall">{{ctx.Locale.Tr "add_all"}}</button>
|
<button class="ui primary button link-action" data-modal-confirm="{{ctx.Locale.Tr "org.teams.add_all_repos_desc"}}" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/addall">{{ctx.Locale.Tr "add_all"}}</button>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{if eq .PackageDescriptor.Package.Type "alpine"}}
|
{{if eq .PackageDescriptor.Package.Type "alpine"}}
|
||||||
{{if .PackageDescriptor.Metadata.Maintainer}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Maintainer}}</div>{{end}}
|
{{if .PackageDescriptor.Metadata.Maintainer}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Maintainer}}</div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
|
{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{{if eq .PackageDescriptor.Package.Type "cargo"}}
|
{{if eq .PackageDescriptor.Package.Type "cargo"}}
|
||||||
{{range .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.}}</div>{{end}}
|
{{range .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "tw-mr-2"}} {{.}}</div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
|
{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.DocumentationURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.DocumentationURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.documentation_site"}}</a></div>{{end}}
|
{{if .PackageDescriptor.Metadata.DocumentationURL}}<div class="item">{{svg "octicon-link-external" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Metadata.DocumentationURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.documentation_site"}}</a></div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
|
{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{if eq .PackageDescriptor.Package.Type "chef"}}
|
{{if eq .PackageDescriptor.Package.Type "chef"}}
|
||||||
{{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
|
{{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
|
{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
|
{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{if eq .PackageDescriptor.Package.Type "composer"}}
|
{{if eq .PackageDescriptor.Package.Type "composer"}}
|
||||||
{{range .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.Name}}</div>{{end}}
|
{{range .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "tw-mr-2"}} {{.Name}}</div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.Homepage}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.Homepage}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
{{if .PackageDescriptor.Metadata.Homepage}}<div class="item">{{svg "octicon-link-external" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Metadata.Homepage}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
||||||
{{range .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.}}</div>{{end}}
|
{{range .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "tw-mr-2"}} {{.}}</div>{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{if eq .PackageDescriptor.Package.Type "conan"}}
|
{{if eq .PackageDescriptor.Package.Type "conan"}}
|
||||||
{{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
|
{{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
|
{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
|
{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{if eq .PackageDescriptor.Package.Type "conda"}}
|
{{if eq .PackageDescriptor.Package.Type "conda"}}
|
||||||
{{if .PackageDescriptor.Metadata.License}}<div class="item">{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
|
{{if .PackageDescriptor.Metadata.License}}<div class="item">{{svg "octicon-law" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
|
{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.DocumentationURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.DocumentationURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.documentation_site"}}</a></div>{{end}}
|
{{if .PackageDescriptor.Metadata.DocumentationURL}}<div class="item">{{svg "octicon-link-external" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Metadata.DocumentationURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.documentation_site"}}</a></div>{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{{if eq .PackageDescriptor.Package.Type "container"}}
|
{{if eq .PackageDescriptor.Package.Type "container"}}
|
||||||
<div class="item" title="{{ctx.Locale.Tr "packages.container.details.type"}}">{{svg "octicon-package" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Type.Name}}</div>
|
<div class="item" title="{{ctx.Locale.Tr "packages.container.details.type"}}">{{svg "octicon-package" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.Type.Name}}</div>
|
||||||
{{if .PackageDescriptor.Metadata.Platform}}<div class="item" title="{{ctx.Locale.Tr "packages.container.details.platform"}}">{{svg "octicon-cpu" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Platform}}</div>{{end}}
|
{{if .PackageDescriptor.Metadata.Platform}}<div class="item" title="{{ctx.Locale.Tr "packages.container.details.platform"}}">{{svg "octicon-cpu" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.Platform}}</div>{{end}}
|
||||||
{{range .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.}}</div>{{end}}
|
{{range .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "tw-mr-2"}} {{.}}</div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.Licenses}}<div class="item">{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Licenses}}</div>{{end}}
|
{{if .PackageDescriptor.Metadata.Licenses}}<div class="item">{{svg "octicon-law" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.Licenses}}</div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
|
{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.DocumentationURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.DocumentationURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.documentation_site"}}</a></div>{{end}}
|
{{if .PackageDescriptor.Metadata.DocumentationURL}}<div class="item">{{svg "octicon-link-external" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Metadata.DocumentationURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.documentation_site"}}</a></div>{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{{if eq .PackageDescriptor.Package.Type "helm"}}
|
{{if eq .PackageDescriptor.Package.Type "helm"}}
|
||||||
{{range .PackageDescriptor.Metadata.Maintainers}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.Name}}</div>{{end}}
|
{{range .PackageDescriptor.Metadata.Maintainers}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "tw-mr-2"}} {{.Name}}</div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.Home}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.Home}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
{{if .PackageDescriptor.Metadata.Home}}<div class="item">{{svg "octicon-link-external" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Metadata.Home}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{if eq .PackageDescriptor.Package.Type "maven"}}
|
{{if eq .PackageDescriptor.Package.Type "maven"}}
|
||||||
{{if .PackageDescriptor.Metadata.Name}}<div class="item">{{svg "octicon-note" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Name}}</div>{{end}}
|
{{if .PackageDescriptor.Metadata.Name}}<div class="item">{{svg "octicon-note" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.Name}}</div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
||||||
{{range .PackageDescriptor.Metadata.Licenses}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.}}</div>{{end}}
|
{{range .PackageDescriptor.Metadata.Licenses}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "tw-mr-2"}} {{.}}</div>{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{{if eq .PackageDescriptor.Package.Type "npm"}}
|
{{if eq .PackageDescriptor.Package.Type "npm"}}
|
||||||
{{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
|
{{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
|
{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
|
||||||
{{range .PackageDescriptor.VersionProperties}}
|
{{range .PackageDescriptor.VersionProperties}}
|
||||||
{{if eq .Name "npm.tag"}}<div class="item" title="{{ctx.Locale.Tr "packages.npm.details.tag"}}">{{svg "octicon-versions" 16 "gt-mr-3"}} {{.Value}}</div>{{end}}
|
{{if eq .Name "npm.tag"}}<div class="item" title="{{ctx.Locale.Tr "packages.npm.details.tag"}}">{{svg "octicon-versions" 16 "tw-mr-2"}} {{.Value}}</div>{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{if eq .PackageDescriptor.Package.Type "nuget"}}
|
{{if eq .PackageDescriptor.Package.Type "nuget"}}
|
||||||
{{if .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Authors}}</div>{{end}}
|
{{if .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.Authors}}</div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
|
{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{if eq .PackageDescriptor.Package.Type "pub"}}
|
{{if eq .PackageDescriptor.Package.Type "pub"}}
|
||||||
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
|
{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.DocumentationURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.DocumentationURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.documentation_site"}}</a></div>{{end}}
|
{{if .PackageDescriptor.Metadata.DocumentationURL}}<div class="item">{{svg "octicon-link-external" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Metadata.DocumentationURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.documentation_site"}}</a></div>{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{if eq .PackageDescriptor.Package.Type "pypi"}}
|
{{if eq .PackageDescriptor.Package.Type "pypi"}}
|
||||||
{{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
|
{{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
|
{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{{if eq .PackageDescriptor.Package.Type "rpm"}}
|
{{if eq .PackageDescriptor.Package.Type "rpm"}}
|
||||||
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
|
{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{if eq .PackageDescriptor.Package.Type "rubygems"}}
|
{{if eq .PackageDescriptor.Package.Type "rubygems"}}
|
||||||
{{range .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.}}</div>{{end}}
|
{{range .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "tw-mr-2"}} {{.}}</div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div> {{end}}
|
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div> {{end}}
|
||||||
{{range .PackageDescriptor.Metadata.Licenses}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.}}</div>{{end}}
|
{{range .PackageDescriptor.Metadata.Licenses}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "tw-mr-2"}} {{.}}</div>{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{{if eq .PackageDescriptor.Package.Type "swift"}}
|
{{if eq .PackageDescriptor.Package.Type "swift"}}
|
||||||
{{if .PackageDescriptor.Metadata.Author.String}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
|
{{if .PackageDescriptor.Metadata.Author.String}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
|
{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{if eq .PackageDescriptor.Package.Type "vagrant"}}
|
{{if eq .PackageDescriptor.Package.Type "vagrant"}}
|
||||||
{{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
|
{{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "tw-mr-2"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
|
||||||
{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
|
{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
<p>{{ctx.Locale.Tr "packages.empty.documentation" "https://docs.gitea.com/usage/packages/overview/"}}</p>
|
<p>{{ctx.Locale.Tr "packages.empty.documentation" "https://docs.gitea.com/usage/packages/overview/"}}</p>
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<p class="gt-py-4">{{ctx.Locale.Tr "packages.filter.no_result"}}</p>
|
<p class="tw-py-4">{{ctx.Locale.Tr "packages.filter.no_result"}}</p>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{template "base/paginate" .}}
|
{{template "base/paginate" .}}
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<p class="gt-py-4">{{ctx.Locale.Tr "packages.filter.no_result"}}</p>
|
<p class="tw-py-4">{{ctx.Locale.Tr "packages.filter.no_result"}}</p>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{template "base/paginate" .}}
|
{{template "base/paginate" .}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -43,12 +43,12 @@
|
||||||
<div class="issue-content-right ui segment">
|
<div class="issue-content-right ui segment">
|
||||||
<strong>{{ctx.Locale.Tr "packages.details"}}</strong>
|
<strong>{{ctx.Locale.Tr "packages.details"}}</strong>
|
||||||
<div class="ui relaxed list">
|
<div class="ui relaxed list">
|
||||||
<div class="item">{{svg .PackageDescriptor.Package.Type.SVGName 16 "gt-mr-3"}} {{.PackageDescriptor.Package.Type.Name}}</div>
|
<div class="item">{{svg .PackageDescriptor.Package.Type.SVGName 16 "tw-mr-2"}} {{.PackageDescriptor.Package.Type.Name}}</div>
|
||||||
{{if .HasRepositoryAccess}}
|
{{if .HasRepositoryAccess}}
|
||||||
<div class="item">{{svg "octicon-repo" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Repository.Link}}">{{.PackageDescriptor.Repository.FullName}}</a></div>
|
<div class="item">{{svg "octicon-repo" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Repository.Link}}">{{.PackageDescriptor.Repository.FullName}}</a></div>
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="item">{{svg "octicon-calendar" 16 "gt-mr-3"}} {{TimeSinceUnix .PackageDescriptor.Version.CreatedUnix ctx.Locale}}</div>
|
<div class="item">{{svg "octicon-calendar" 16 "tw-mr-2"}} {{TimeSinceUnix .PackageDescriptor.Version.CreatedUnix ctx.Locale}}</div>
|
||||||
<div class="item">{{svg "octicon-download" 16 "gt-mr-3"}} {{.PackageDescriptor.Version.DownloadCount}}</div>
|
<div class="item">{{svg "octicon-download" 16 "tw-mr-2"}} {{.PackageDescriptor.Version.DownloadCount}}</div>
|
||||||
{{template "package/metadata/alpine" .}}
|
{{template "package/metadata/alpine" .}}
|
||||||
{{template "package/metadata/cargo" .}}
|
{{template "package/metadata/cargo" .}}
|
||||||
{{template "package/metadata/chef" .}}
|
{{template "package/metadata/chef" .}}
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
{{template "package/metadata/swift" .}}
|
{{template "package/metadata/swift" .}}
|
||||||
{{template "package/metadata/vagrant" .}}
|
{{template "package/metadata/vagrant" .}}
|
||||||
{{if not (and (eq .PackageDescriptor.Package.Type "container") .PackageDescriptor.Metadata.Manifests)}}
|
{{if not (and (eq .PackageDescriptor.Package.Type "container") .PackageDescriptor.Metadata.Manifests)}}
|
||||||
<div class="item">{{svg "octicon-database" 16 "gt-mr-3"}} {{FileSize .PackageDescriptor.CalculateBlobSize}}</div>
|
<div class="item">{{svg "octicon-database" 16 "tw-mr-2"}} {{FileSize .PackageDescriptor.CalculateBlobSize}}</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{if not (eq .PackageDescriptor.Package.Type "container")}}
|
{{if not (eq .PackageDescriptor.Package.Type "container")}}
|
||||||
|
@ -100,10 +100,10 @@
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<div class="ui relaxed list">
|
<div class="ui relaxed list">
|
||||||
{{if .HasRepositoryAccess}}
|
{{if .HasRepositoryAccess}}
|
||||||
<div class="item">{{svg "octicon-issue-opened" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Repository.Link}}/issues">{{ctx.Locale.Tr "repo.issues"}}</a></div>
|
<div class="item">{{svg "octicon-issue-opened" 16 "tw-mr-2"}} <a href="{{.PackageDescriptor.Repository.Link}}/issues">{{ctx.Locale.Tr "repo.issues"}}</a></div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if .CanWritePackages}}
|
{{if .CanWritePackages}}
|
||||||
<div class="item">{{svg "octicon-tools" 16 "gt-mr-3"}} <a href="{{.Link}}/settings">{{ctx.Locale.Tr "repo.settings"}}</a></div>
|
<div class="item">{{svg "octicon-tools" 16 "tw-mr-2"}} <a href="{{.Link}}/settings">{{ctx.Locale.Tr "repo.settings"}}</a></div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{{if and $.CanWriteProjects (not $.Repository.IsArchived)}}
|
{{if and $.CanWriteProjects (not $.Repository.IsArchived)}}
|
||||||
<div class="tw-flex tw-justify-between gt-mb-4">
|
<div class="tw-flex tw-justify-between tw-mb-4">
|
||||||
<div class="small-menu-items ui compact tiny menu list-header-toggle">
|
<div class="small-menu-items ui compact tiny menu list-header-toggle">
|
||||||
<a class="item{{if not .IsShowClosed}} active{{end}}" href="?state=open&q={{$.Keyword}}">
|
<a class="item{{if not .IsShowClosed}} active{{end}}" href="?state=open&q={{$.Keyword}}">
|
||||||
{{svg "octicon-project-symlink" 16 "gt-mr-3"}}
|
{{svg "octicon-project-symlink" 16 "tw-mr-2"}}
|
||||||
{{ctx.Locale.PrettyNumber .OpenCount}} {{ctx.Locale.Tr "repo.issues.open_title"}}
|
{{ctx.Locale.PrettyNumber .OpenCount}} {{ctx.Locale.Tr "repo.issues.open_title"}}
|
||||||
</a>
|
</a>
|
||||||
<a class="item{{if .IsShowClosed}} active{{end}}" href="?state=closed&q={{$.Keyword}}">
|
<a class="item{{if .IsShowClosed}} active{{end}}" href="?state=closed&q={{$.Keyword}}">
|
||||||
{{svg "octicon-check" 16 "gt-mr-3"}}
|
{{svg "octicon-check" 16 "tw-mr-2"}}
|
||||||
{{ctx.Locale.PrettyNumber .ClosedCount}} {{ctx.Locale.Tr "repo.issues.closed_title"}}
|
{{ctx.Locale.PrettyNumber .ClosedCount}} {{ctx.Locale.Tr "repo.issues.closed_title"}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
<div class="milestone-list">
|
<div class="milestone-list">
|
||||||
{{range .Projects}}
|
{{range .Projects}}
|
||||||
<li class="milestone-card">
|
<li class="milestone-card">
|
||||||
<h3 class="flex-text-block gt-m-0">
|
<h3 class="flex-text-block tw-m-0">
|
||||||
{{svg .IconName 16}}
|
{{svg .IconName 16}}
|
||||||
<a class="muted" href="{{.Link ctx}}">{{.Title}}</a>
|
<a class="muted" href="{{.Link ctx}}">{{.Title}}</a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{{$canWriteProject := and .CanWriteProjects (or (not .Repository) (not .Repository.IsArchived))}}
|
{{$canWriteProject := and .CanWriteProjects (or (not .Repository) (not .Repository.IsArchived))}}
|
||||||
|
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="tw-flex tw-justify-between tw-items-center gt-mb-4">
|
<div class="tw-flex tw-justify-between tw-items-center tw-mb-4">
|
||||||
<h2 class="gt-mb-0">{{.Project.Title}}</h2>
|
<h2 class="tw-mb-0">{{.Project.Title}}</h2>
|
||||||
{{if $canWriteProject}}
|
{{if $canWriteProject}}
|
||||||
<div class="ui compact mini menu">
|
<div class="ui compact mini menu">
|
||||||
<a class="item" href="{{.Link}}/edit?redirect=project">
|
<a class="item" href="{{.Link}}/edit?redirect=project">
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
{{range .Columns}}
|
{{range .Columns}}
|
||||||
<div class="ui segment project-column" style="background: {{.Color}} !important;" data-id="{{.ID}}" data-sorting="{{.Sorting}}" data-url="{{$.Link}}/{{.ID}}">
|
<div class="ui segment project-column" style="background: {{.Color}} !important;" data-id="{{.ID}}" data-sorting="{{.Sorting}}" data-url="{{$.Link}}/{{.ID}}">
|
||||||
<div class="project-column-header">
|
<div class="project-column-header">
|
||||||
<div class="ui large label project-column-title gt-py-2">
|
<div class="ui large label project-column-title tw-py-1">
|
||||||
<div class="ui small circular grey label project-column-issue-count">
|
<div class="ui small circular grey label project-column-issue-count">
|
||||||
{{.NumIssues ctx}}
|
{{.NumIssues ctx}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
</div>
|
</div>
|
||||||
{{if and $canWriteProject (ne .ID 0)}}
|
{{if and $canWriteProject (ne .ID 0)}}
|
||||||
<div class="ui dropdown jump item">
|
<div class="ui dropdown jump item">
|
||||||
<div class="gt-px-3">
|
<div class="tw-px-2">
|
||||||
{{svg "octicon-kebab-horizontal"}}
|
{{svg "octicon-kebab-horizontal"}}
|
||||||
</div>
|
</div>
|
||||||
<div class="menu user-menu">
|
<div class="menu user-menu">
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{if .AllowDisableOrEnableWorkflow}}
|
{{if .AllowDisableOrEnableWorkflow}}
|
||||||
<button class="ui jump dropdown btn interact-bg gt-p-3">
|
<button class="ui jump dropdown btn interact-bg tw-p-2">
|
||||||
{{svg "octicon-kebab-horizontal"}}
|
{{svg "octicon-kebab-horizontal"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<a class="item link-action" data-url="{{$.Link}}/{{if .CurWorkflowDisabled}}enable{{else}}disable{{end}}?workflow={{$.CurWorkflow}}&actor={{.CurActor}}&status={{$.CurStatus}}">
|
<a class="item link-action" data-url="{{$.Link}}/{{if .CurWorkflowDisabled}}enable{{else}}disable{{end}}?workflow={{$.CurWorkflow}}&actor={{.CurActor}}&status={{$.CurStatus}}">
|
||||||
|
|
|
@ -28,9 +28,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-item-trailing">
|
<div class="flex-item-trailing">
|
||||||
{{if .RefLink}}
|
{{if .RefLink}}
|
||||||
<a class="ui label gt-px-2 gt-mx-0" href="{{.RefLink}}">{{.PrettyRef}}</a>
|
<a class="ui label tw-px-1 tw-mx-0" href="{{.RefLink}}">{{.PrettyRef}}</a>
|
||||||
{{else}}
|
{{else}}
|
||||||
<span class="ui label gt-px-2 gt-mx-0">{{.PrettyRef}}</span>
|
<span class="ui label tw-px-1 tw-mx-0">{{.PrettyRef}}</span>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
<div class="run-list-item-right">
|
<div class="run-list-item-right">
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="{{TabSizeClass .Editorconfig .FileName}} non-diff-file-content">
|
<div class="{{TabSizeClass .Editorconfig .FileName}} non-diff-file-content">
|
||||||
<h4 class="file-header ui top attached header tw-flex tw-items-center tw-justify-between tw-flex-wrap">
|
<h4 class="file-header ui top attached header tw-flex tw-items-center tw-justify-between tw-flex-wrap">
|
||||||
<div class="file-header-left tw-flex tw-items-center gt-py-3 gt-pr-4">
|
<div class="file-header-left tw-flex tw-items-center tw-py-2 tw-pr-4">
|
||||||
{{template "repo/file_info" .}}
|
{{template "repo/file_info" .}}
|
||||||
</div>
|
</div>
|
||||||
<div class="file-header-right file-actions tw-flex tw-items-center tw-flex-wrap">
|
<div class="file-header-right file-actions tw-flex tw-items-center tw-flex-wrap">
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
<a class="ui tiny button" href="{{.RepoLink}}/src/{{.BranchNameSubURL}}/{{.TreePath | PathEscapeSegments}}">{{ctx.Locale.Tr "repo.normal_view"}}</a>
|
<a class="ui tiny button" href="{{.RepoLink}}/src/{{.BranchNameSubURL}}/{{.TreePath | PathEscapeSegments}}">{{ctx.Locale.Tr "repo.normal_view"}}</a>
|
||||||
<a class="ui tiny button" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/{{.TreePath | PathEscapeSegments}}">{{ctx.Locale.Tr "repo.file_history"}}</a>
|
<a class="ui tiny button" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/{{.TreePath | PathEscapeSegments}}">{{ctx.Locale.Tr "repo.file_history"}}</a>
|
||||||
<button class="ui tiny button unescape-button">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</button>
|
<button class="ui tiny button unescape-button">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</button>
|
||||||
<button class="ui tiny button escape-button gt-hidden">{{ctx.Locale.Tr "repo.escape_control_characters"}}</button>
|
<button class="ui tiny button escape-button tw-hidden">{{ctx.Locale.Tr "repo.escape_control_characters"}}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</h4>
|
</h4>
|
||||||
|
@ -41,11 +41,11 @@
|
||||||
{{$row.Avatar}}
|
{{$row.Avatar}}
|
||||||
</div>
|
</div>
|
||||||
<div class="blame-message">
|
<div class="blame-message">
|
||||||
<a href="{{$row.CommitURL}}" title="{{$row.CommitMessage}}">
|
<a class="suppressed tw-text-text" href="{{$row.CommitURL}}" title="{{$row.CommitMessage}}">
|
||||||
{{$row.CommitMessage}}
|
{{$row.CommitMessage}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="blame-time">
|
<div class="blame-time not-mobile">
|
||||||
{{$row.CommitSince}}
|
{{$row.CommitSince}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td class="lines-blame-btn">
|
<td class="lines-blame-btn">
|
||||||
{{if $row.PreviousSha}}
|
{{if $row.PreviousSha}}
|
||||||
<a href="{{$row.PreviousShaURL}}" data-tooltip-content='{{ctx.Locale.Tr "repo.blame_prior"}}'>
|
<a role="button" class="muted" href="{{$row.PreviousShaURL}}" data-tooltip-content='{{ctx.Locale.Tr "repo.blame_prior"}}'>
|
||||||
{{svg "octicon-versions"}}
|
{{svg "octicon-versions"}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -69,12 +69,18 @@
|
||||||
</td>
|
</td>
|
||||||
{{end}}
|
{{end}}
|
||||||
<td rel="L{{$row.RowNumber}}" class="lines-code blame-code chroma">
|
<td rel="L{{$row.RowNumber}}" class="lines-code blame-code chroma">
|
||||||
<code class="code-inner gt-pl-3">{{$row.Code}}</code>
|
<code class="code-inner tw-pl-2">{{$row.Code}}</code>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{end}}
|
{{end}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<div class="code-line-menu tippy-target">
|
||||||
|
{{if $.Permission.CanRead $.UnitTypeIssues}}
|
||||||
|
<a class="item ref-in-new-issue" role="menuitem" data-url-issue-new="{{.RepoLink}}/issues/new" data-url-param-body-link="{{.Repository.Link}}/src/commit/{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}{{if $.HasSourceRenderedToggle}}?display=source{{end}}" rel="nofollow noindex">{{ctx.Locale.Tr "repo.issues.context.reference_issue"}}</a>
|
||||||
|
{{end}}
|
||||||
|
<a class="item copy-line-permalink" role="menuitem" data-url="{{.Repository.Link}}/src/commit/{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}{{if $.HasSourceRenderedToggle}}?display=source{{end}}">{{ctx.Locale.Tr "repo.file_copy_permalink"}}</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -22,14 +22,14 @@
|
||||||
<div class="flex-text-block">
|
<div class="flex-text-block">
|
||||||
{{if .DefaultBranchBranch.IsProtected}}{{svg "octicon-shield-lock"}}{{end}}
|
{{if .DefaultBranchBranch.IsProtected}}{{svg "octicon-shield-lock"}}{{end}}
|
||||||
<a class="gt-ellipsis" href="{{.RepoLink}}/src/branch/{{PathEscapeSegments .DefaultBranchBranch.DBBranch.Name}}">{{.DefaultBranchBranch.DBBranch.Name}}</a>
|
<a class="gt-ellipsis" href="{{.RepoLink}}/src/branch/{{PathEscapeSegments .DefaultBranchBranch.DBBranch.Name}}">{{.DefaultBranchBranch.DBBranch.Name}}</a>
|
||||||
<button class="btn interact-fg gt-px-2" data-clipboard-text="{{.DefaultBranchBranch.DBBranch.Name}}">{{svg "octicon-copy" 14}}</button>
|
<button class="btn interact-fg tw-px-1" data-clipboard-text="{{.DefaultBranchBranch.DBBranch.Name}}">{{svg "octicon-copy" 14}}</button>
|
||||||
{{template "repo/commit_statuses" dict "Status" (index $.CommitStatus .DefaultBranchBranch.DBBranch.CommitID) "Statuses" (index $.CommitStatuses .DefaultBranchBranch.DBBranch.CommitID)}}
|
{{template "repo/commit_statuses" dict "Status" (index $.CommitStatus .DefaultBranchBranch.DBBranch.CommitID) "Statuses" (index $.CommitStatuses .DefaultBranchBranch.DBBranch.CommitID)}}
|
||||||
</div>
|
</div>
|
||||||
<p class="info tw-flex tw-items-center gt-my-2">{{svg "octicon-git-commit" 16 "gt-mr-2"}}<a href="{{.RepoLink}}/commit/{{PathEscape .DefaultBranchBranch.DBBranch.CommitID}}">{{ShortSha .DefaultBranchBranch.DBBranch.CommitID}}</a> · <span class="commit-message">{{RenderCommitMessage $.Context .DefaultBranchBranch.DBBranch.CommitMessage (.Repository.ComposeMetas ctx)}}</span> · {{ctx.Locale.Tr "org.repo_updated"}} {{TimeSince .DefaultBranchBranch.DBBranch.CommitTime.AsTime ctx.Locale}}{{if .DefaultBranchBranch.DBBranch.Pusher}} {{template "shared/user/avatarlink" dict "user" .DefaultBranchBranch.DBBranch.Pusher}}{{template "shared/user/namelink" .DefaultBranchBranch.DBBranch.Pusher}}{{end}}</p>
|
<p class="info tw-flex tw-items-center tw-my-1">{{svg "octicon-git-commit" 16 "tw-mr-1"}}<a href="{{.RepoLink}}/commit/{{PathEscape .DefaultBranchBranch.DBBranch.CommitID}}">{{ShortSha .DefaultBranchBranch.DBBranch.CommitID}}</a> · <span class="commit-message">{{RenderCommitMessage $.Context .DefaultBranchBranch.DBBranch.CommitMessage (.Repository.ComposeMetas ctx)}}</span> · {{ctx.Locale.Tr "org.repo_updated"}} {{TimeSince .DefaultBranchBranch.DBBranch.CommitTime.AsTime ctx.Locale}}{{if .DefaultBranchBranch.DBBranch.Pusher}} {{template "shared/user/avatarlink" dict "user" .DefaultBranchBranch.DBBranch.Pusher}}{{template "shared/user/namelink" .DefaultBranchBranch.DBBranch.Pusher}}{{end}}</p>
|
||||||
</td>
|
</td>
|
||||||
<td class="right aligned middle aligned overflow-visible">
|
<td class="right aligned middle aligned overflow-visible">
|
||||||
{{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}}
|
{{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}}
|
||||||
<button class="btn interact-bg show-create-branch-modal gt-p-3"
|
<button class="btn interact-bg show-create-branch-modal tw-p-2"
|
||||||
data-modal="#create-branch-modal"
|
data-modal="#create-branch-modal"
|
||||||
data-branch-from="{{$.DefaultBranchBranch.DBBranch.Name}}"
|
data-branch-from="{{$.DefaultBranchBranch.DBBranch.Name}}"
|
||||||
data-branch-from-urlcomponent="{{PathEscapeSegments $.DefaultBranchBranch.DBBranch.Name}}"
|
data-branch-from-urlcomponent="{{PathEscapeSegments $.DefaultBranchBranch.DBBranch.Name}}"
|
||||||
|
@ -39,10 +39,10 @@
|
||||||
</button>
|
</button>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if .EnableFeed}}
|
{{if .EnableFeed}}
|
||||||
<a role="button" class="btn interact-bg gt-p-3" href="{{$.FeedURL}}/rss/branch/{{PathEscapeSegments .DefaultBranchBranch.DBBranch.Name}}">{{svg "octicon-rss"}}</a>
|
<a role="button" class="btn interact-bg tw-p-2" href="{{$.FeedURL}}/rss/branch/{{PathEscapeSegments .DefaultBranchBranch.DBBranch.Name}}">{{svg "octicon-rss"}}</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if not $.DisableDownloadSourceArchives}}
|
{{if not $.DisableDownloadSourceArchives}}
|
||||||
<div class="ui dropdown btn interact-bg gt-p-3" data-tooltip-content="{{ctx.Locale.Tr "repo.branch.download" ($.DefaultBranchBranch.DBBranch.Name)}}">
|
<div class="ui dropdown btn interact-bg tw-p-2" data-tooltip-content="{{ctx.Locale.Tr "repo.branch.download" ($.DefaultBranchBranch.DBBranch.Name)}}">
|
||||||
{{svg "octicon-download"}}
|
{{svg "octicon-download"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.DefaultBranchBranch.DBBranch.Name}}.zip" rel="nofollow">{{svg "octicon-file-zip"}} ZIP</a>
|
<a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.DefaultBranchBranch.DBBranch.Name}}.zip" rel="nofollow">{{svg "octicon-file-zip"}} ZIP</a>
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted) (not $.IsMirror)}}
|
{{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted) (not $.IsMirror)}}
|
||||||
<button class="btn interact-bg gt-p-3 show-modal show-rename-branch-modal"
|
<button class="btn interact-bg tw-p-2 show-modal show-rename-branch-modal"
|
||||||
data-is-default-branch="true"
|
data-is-default-branch="true"
|
||||||
data-modal="#rename-branch-modal"
|
data-modal="#rename-branch-modal"
|
||||||
data-old-branch-name="{{$.DefaultBranchBranch.DBBranch.Name}}"
|
data-old-branch-name="{{$.DefaultBranchBranch.DBBranch.Name}}"
|
||||||
|
@ -88,17 +88,17 @@
|
||||||
{{if .DBBranch.IsDeleted}}
|
{{if .DBBranch.IsDeleted}}
|
||||||
<div class="flex-text-block">
|
<div class="flex-text-block">
|
||||||
<a class="gt-ellipsis" href="{{$.RepoLink}}/src/branch/{{PathEscapeSegments .DBBranch.Name}}">{{.DBBranch.Name}}</a>
|
<a class="gt-ellipsis" href="{{$.RepoLink}}/src/branch/{{PathEscapeSegments .DBBranch.Name}}">{{.DBBranch.Name}}</a>
|
||||||
<button class="btn interact-fg gt-px-2" data-clipboard-text="{{.DBBranch.Name}}">{{svg "octicon-copy" 14}}</button>
|
<button class="btn interact-fg tw-px-1" data-clipboard-text="{{.DBBranch.Name}}">{{svg "octicon-copy" 14}}</button>
|
||||||
</div>
|
</div>
|
||||||
<p class="info">{{ctx.Locale.Tr "repo.branch.deleted_by" .DBBranch.DeletedBy.Name}} {{TimeSinceUnix .DBBranch.DeletedUnix ctx.Locale}}</p>
|
<p class="info">{{ctx.Locale.Tr "repo.branch.deleted_by" .DBBranch.DeletedBy.Name}} {{TimeSinceUnix .DBBranch.DeletedUnix ctx.Locale}}</p>
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="flex-text-block">
|
<div class="flex-text-block">
|
||||||
{{if .IsProtected}}{{svg "octicon-shield-lock"}}{{end}}
|
{{if .IsProtected}}{{svg "octicon-shield-lock"}}{{end}}
|
||||||
<a class="gt-ellipsis" href="{{$.RepoLink}}/src/branch/{{PathEscapeSegments .DBBranch.Name}}">{{.DBBranch.Name}}</a>
|
<a class="gt-ellipsis" href="{{$.RepoLink}}/src/branch/{{PathEscapeSegments .DBBranch.Name}}">{{.DBBranch.Name}}</a>
|
||||||
<button class="btn interact-fg gt-px-2" data-clipboard-text="{{.DBBranch.Name}}">{{svg "octicon-copy" 14}}</button>
|
<button class="btn interact-fg tw-px-1" data-clipboard-text="{{.DBBranch.Name}}">{{svg "octicon-copy" 14}}</button>
|
||||||
{{template "repo/commit_statuses" dict "Status" (index $.CommitStatus .DBBranch.CommitID) "Statuses" (index $.CommitStatuses .DBBranch.CommitID)}}
|
{{template "repo/commit_statuses" dict "Status" (index $.CommitStatus .DBBranch.CommitID) "Statuses" (index $.CommitStatuses .DBBranch.CommitID)}}
|
||||||
</div>
|
</div>
|
||||||
<p class="info tw-flex tw-items-center gt-my-2">{{svg "octicon-git-commit" 16 "gt-mr-2"}}<a href="{{$.RepoLink}}/commit/{{PathEscape .DBBranch.CommitID}}">{{ShortSha .DBBranch.CommitID}}</a> · <span class="commit-message">{{RenderCommitMessage $.Context .DBBranch.CommitMessage ($.Repository.ComposeMetas ctx)}}</span> · {{ctx.Locale.Tr "org.repo_updated"}} {{TimeSince .DBBranch.CommitTime.AsTime ctx.Locale}}{{if .DBBranch.Pusher}} {{template "shared/user/avatarlink" dict "user" .DBBranch.Pusher}} {{template "shared/user/namelink" .DBBranch.Pusher}}{{end}}</p>
|
<p class="info tw-flex tw-items-center tw-my-1">{{svg "octicon-git-commit" 16 "tw-mr-1"}}<a href="{{$.RepoLink}}/commit/{{PathEscape .DBBranch.CommitID}}">{{ShortSha .DBBranch.CommitID}}</a> · <span class="commit-message">{{RenderCommitMessage $.Context .DBBranch.CommitMessage ($.Repository.ComposeMetas ctx)}}</span> · {{ctx.Locale.Tr "org.repo_updated"}} {{TimeSince .DBBranch.CommitTime.AsTime ctx.Locale}}{{if .DBBranch.Pusher}} {{template "shared/user/avatarlink" dict "user" .DBBranch.Pusher}} {{template "shared/user/namelink" .DBBranch.Pusher}}{{end}}</p>
|
||||||
{{end}}
|
{{end}}
|
||||||
</td>
|
</td>
|
||||||
<td class="two wide ui">
|
<td class="two wide ui">
|
||||||
|
@ -124,29 +124,29 @@
|
||||||
</span>
|
</span>
|
||||||
{{else if and (not .DBBranch.IsDeleted) $.AllowsPulls (gt .CommitsAhead 0)}}
|
{{else if and (not .DBBranch.IsDeleted) $.AllowsPulls (gt .CommitsAhead 0)}}
|
||||||
<a href="{{$.RepoLink}}/compare/{{PathEscapeSegments $.DefaultBranchBranch.DBBranch.Name}}...{{if ne $.Repository.Owner.Name $.Owner.Name}}{{PathEscape $.Owner.Name}}:{{end}}{{PathEscapeSegments .DBBranch.Name}}">
|
<a href="{{$.RepoLink}}/compare/{{PathEscapeSegments $.DefaultBranchBranch.DBBranch.Name}}...{{if ne $.Repository.Owner.Name $.Owner.Name}}{{PathEscape $.Owner.Name}}:{{end}}{{PathEscapeSegments .DBBranch.Name}}">
|
||||||
<button id="new-pull-request" class="ui compact basic button gt-mr-0">{{if $.CanPull}}{{ctx.Locale.Tr "repo.pulls.compare_changes"}}{{else}}{{ctx.Locale.Tr "action.compare_branch"}}{{end}}</button>
|
<button id="new-pull-request" class="ui compact basic button tw-mr-0">{{if $.CanPull}}{{ctx.Locale.Tr "repo.pulls.compare_changes"}}{{else}}{{ctx.Locale.Tr "action.compare_branch"}}{{end}}</button>
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{else if and .LatestPullRequest.HasMerged .MergeMovedOn}}
|
{{else if and .LatestPullRequest.HasMerged .MergeMovedOn}}
|
||||||
{{if and (not .DBBranch.IsDeleted) $.AllowsPulls (gt .CommitsAhead 0)}}
|
{{if and (not .DBBranch.IsDeleted) $.AllowsPulls (gt .CommitsAhead 0)}}
|
||||||
<a href="{{$.RepoLink}}/compare/{{PathEscapeSegments $.DefaultBranchBranch.DBBranch.Name}}...{{if ne $.Repository.Owner.Name $.Owner.Name}}{{PathEscape $.Owner.Name}}:{{end}}{{PathEscapeSegments .DBBranch.Name}}">
|
<a href="{{$.RepoLink}}/compare/{{PathEscapeSegments $.DefaultBranchBranch.DBBranch.Name}}...{{if ne $.Repository.Owner.Name $.Owner.Name}}{{PathEscape $.Owner.Name}}:{{end}}{{PathEscapeSegments .DBBranch.Name}}">
|
||||||
<button id="new-pull-request" class="ui compact basic button gt-mr-0">{{if $.CanPull}}{{ctx.Locale.Tr "repo.pulls.compare_changes"}}{{else}}{{ctx.Locale.Tr "action.compare_branch"}}{{end}}</button>
|
<button id="new-pull-request" class="ui compact basic button tw-mr-0">{{if $.CanPull}}{{ctx.Locale.Tr "repo.pulls.compare_changes"}}{{else}}{{ctx.Locale.Tr "action.compare_branch"}}{{end}}</button>
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<a href="{{.LatestPullRequest.Issue.Link}}" class="tw-align-middle ref-issue">{{if not .LatestPullRequest.IsSameRepo}}{{.LatestPullRequest.BaseRepo.FullName}}{{end}}#{{.LatestPullRequest.Issue.Index}}</a>
|
<a href="{{.LatestPullRequest.Issue.Link}}" class="tw-align-middle ref-issue">{{if not .LatestPullRequest.IsSameRepo}}{{.LatestPullRequest.BaseRepo.FullName}}{{end}}#{{.LatestPullRequest.Issue.Index}}</a>
|
||||||
{{if .LatestPullRequest.HasMerged}}
|
{{if .LatestPullRequest.HasMerged}}
|
||||||
<a href="{{.LatestPullRequest.Issue.Link}}" class="ui purple large label">{{svg "octicon-git-merge" 16 "gt-mr-2"}}{{ctx.Locale.Tr "repo.pulls.merged"}}</a>
|
<a href="{{.LatestPullRequest.Issue.Link}}" class="ui purple large label">{{svg "octicon-git-merge" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.pulls.merged"}}</a>
|
||||||
{{else if .LatestPullRequest.Issue.IsClosed}}
|
{{else if .LatestPullRequest.Issue.IsClosed}}
|
||||||
<a href="{{.LatestPullRequest.Issue.Link}}" class="ui red large label">{{svg "octicon-git-pull-request" 16 "gt-mr-2"}}{{ctx.Locale.Tr "repo.issues.closed_title"}}</a>
|
<a href="{{.LatestPullRequest.Issue.Link}}" class="ui red large label">{{svg "octicon-git-pull-request" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.issues.closed_title"}}</a>
|
||||||
{{else}}
|
{{else}}
|
||||||
<a href="{{.LatestPullRequest.Issue.Link}}" class="ui green large label">{{svg "octicon-git-pull-request" 16 "gt-mr-2"}}{{ctx.Locale.Tr "repo.issues.open_title"}}</a>
|
<a href="{{.LatestPullRequest.Issue.Link}}" class="ui green large label">{{svg "octicon-git-pull-request" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.issues.open_title"}}</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</td>
|
</td>
|
||||||
<td class="three wide right aligned overflow-visible">
|
<td class="three wide right aligned overflow-visible">
|
||||||
{{if and $.IsWriter (not $.Repository.IsArchived) (not .DBBranch.IsDeleted)}}
|
{{if and $.IsWriter (not $.Repository.IsArchived) (not .DBBranch.IsDeleted)}}
|
||||||
<button class="btn interact-bg gt-p-3 show-modal show-create-branch-modal"
|
<button class="btn interact-bg tw-p-2 show-modal show-create-branch-modal"
|
||||||
data-branch-from="{{.DBBranch.Name}}"
|
data-branch-from="{{.DBBranch.Name}}"
|
||||||
data-branch-from-urlcomponent="{{PathEscapeSegments .DBBranch.Name}}"
|
data-branch-from-urlcomponent="{{PathEscapeSegments .DBBranch.Name}}"
|
||||||
data-tooltip-content="{{ctx.Locale.Tr "repo.branch.new_branch_from" .DBBranch.Name}}"
|
data-tooltip-content="{{ctx.Locale.Tr "repo.branch.new_branch_from" .DBBranch.Name}}"
|
||||||
|
@ -156,10 +156,10 @@
|
||||||
</button>
|
</button>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if $.EnableFeed}}
|
{{if $.EnableFeed}}
|
||||||
<a role="button" class="btn interact-bg gt-p-3" href="{{$.FeedURL}}/rss/branch/{{PathEscapeSegments .DBBranch.Name}}">{{svg "octicon-rss"}}</a>
|
<a role="button" class="btn interact-bg tw-p-2" href="{{$.FeedURL}}/rss/branch/{{PathEscapeSegments .DBBranch.Name}}">{{svg "octicon-rss"}}</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if and (not .DBBranch.IsDeleted) (not $.DisableDownloadSourceArchives)}}
|
{{if and (not .DBBranch.IsDeleted) (not $.DisableDownloadSourceArchives)}}
|
||||||
<div class="ui dropdown btn interact-bg gt-p-3" data-tooltip-content="{{ctx.Locale.Tr "repo.branch.download" (.DBBranch.Name)}}">
|
<div class="ui dropdown btn interact-bg tw-p-2" data-tooltip-content="{{ctx.Locale.Tr "repo.branch.download" (.DBBranch.Name)}}">
|
||||||
{{svg "octicon-download"}}
|
{{svg "octicon-download"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments .DBBranch.Name}}.zip" rel="nofollow">{{svg "octicon-file-zip"}} ZIP</a>
|
<a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments .DBBranch.Name}}.zip" rel="nofollow">{{svg "octicon-file-zip"}} ZIP</a>
|
||||||
|
@ -168,7 +168,7 @@
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if and $.IsWriter (not $.Repository.IsArchived) (not .DBBranch.IsDeleted) (not $.IsMirror)}}
|
{{if and $.IsWriter (not $.Repository.IsArchived) (not .DBBranch.IsDeleted) (not $.IsMirror)}}
|
||||||
<button class="btn interact-bg gt-p-3 show-modal show-rename-branch-modal"
|
<button class="btn interact-bg tw-p-2 show-modal show-rename-branch-modal"
|
||||||
data-is-default-branch="false"
|
data-is-default-branch="false"
|
||||||
data-old-branch-name="{{.DBBranch.Name}}"
|
data-old-branch-name="{{.DBBranch.Name}}"
|
||||||
data-modal="#rename-branch-modal"
|
data-modal="#rename-branch-modal"
|
||||||
|
@ -179,13 +179,13 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if and $.IsWriter (not $.IsMirror) (not $.Repository.IsArchived) (not .IsProtected)}}
|
{{if and $.IsWriter (not $.IsMirror) (not $.Repository.IsArchived) (not .IsProtected)}}
|
||||||
{{if .DBBranch.IsDeleted}}
|
{{if .DBBranch.IsDeleted}}
|
||||||
<button class="btn interact-bg gt-p-3 link-action restore-branch-button" data-url="{{$.Link}}/restore?branch_id={{.DBBranch.ID}}&name={{.DBBranch.Name}}&page={{$.Page.Paginater.Current}}" data-tooltip-content="{{ctx.Locale.Tr "repo.branch.restore" (.DBBranch.Name)}}">
|
<button class="btn interact-bg tw-p-2 link-action restore-branch-button" data-url="{{$.Link}}/restore?branch_id={{.DBBranch.ID}}&name={{.DBBranch.Name}}&page={{$.Page.Paginater.Current}}" data-tooltip-content="{{ctx.Locale.Tr "repo.branch.restore" (.DBBranch.Name)}}">
|
||||||
<span class="text blue">
|
<span class="text blue">
|
||||||
{{svg "octicon-reply"}}
|
{{svg "octicon-reply"}}
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
{{else}}
|
{{else}}
|
||||||
<button class="btn interact-bg gt-p-3 delete-button delete-branch-button" data-url="{{$.Link}}/delete?name={{.DBBranch.Name}}&page={{$.Page.Paginater.Current}}" data-tooltip-content="{{ctx.Locale.Tr "repo.branch.delete" (.DBBranch.Name)}}" data-name="{{.DBBranch.Name}}">
|
<button class="btn interact-bg tw-p-2 delete-button delete-branch-button" data-url="{{$.Link}}/delete?name={{.DBBranch.Name}}&page={{$.Page.Paginater.Current}}" data-tooltip-content="{{ctx.Locale.Tr "repo.branch.delete" (.DBBranch.Name)}}" data-name="{{.DBBranch.Name}}">
|
||||||
{{svg "octicon-trash"}}
|
{{svg "octicon-trash"}}
|
||||||
</button>
|
</button>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -70,8 +70,8 @@
|
||||||
<div class="js-branch-tag-selector {{if .ContainerClasses}}{{.ContainerClasses}}{{end}}">
|
<div class="js-branch-tag-selector {{if .ContainerClasses}}{{.ContainerClasses}}{{end}}">
|
||||||
{{/* show dummy elements before Vue componment is mounted, this code must match the code in BranchTagSelector.vue */}}
|
{{/* show dummy elements before Vue componment is mounted, this code must match the code in BranchTagSelector.vue */}}
|
||||||
<div class="ui dropdown custom">
|
<div class="ui dropdown custom">
|
||||||
<button class="branch-dropdown-button gt-ellipsis ui basic small compact button tw-flex gt-m-0">
|
<button class="branch-dropdown-button gt-ellipsis ui basic small compact button tw-flex tw-m-0">
|
||||||
<span class="text tw-flex tw-items-center gt-mr-2">
|
<span class="text tw-flex tw-items-center tw-mr-1">
|
||||||
{{if .release}}
|
{{if .release}}
|
||||||
{{ctx.Locale.Tr "repo.release.compare"}}
|
{{ctx.Locale.Tr "repo.release.compare"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
|
@ -80,7 +80,7 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
{{svg "octicon-git-branch"}}
|
{{svg "octicon-git-branch"}}
|
||||||
{{end}}
|
{{end}}
|
||||||
<strong ref="dropdownRefName" class="gt-ml-3">{{if and .root.IsViewTag (not .noTag)}}{{.root.TagName}}{{else if .root.IsViewBranch}}{{.root.BranchName}}{{else}}{{ShortSha .root.CommitID}}{{end}}</strong>
|
<strong ref="dropdownRefName" class="tw-ml-2">{{if and .root.IsViewTag (not .noTag)}}{{.root.TagName}}{{else if .root.IsViewBranch}}{{.root.BranchName}}{{else}}{{ShortSha .root.CommitID}}{{end}}</strong>
|
||||||
{{end}}
|
{{end}}
|
||||||
</span>
|
</span>
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
{{$branchLink := HTMLFormat `<a href="%s/src/branch/%s">%s</a>` $.RepoLink (PathEscapeSegments .Name) .Name}}
|
{{$branchLink := HTMLFormat `<a href="%s/src/branch/%s">%s</a>` $.RepoLink (PathEscapeSegments .Name) .Name}}
|
||||||
{{ctx.Locale.Tr "repo.pulls.recently_pushed_new_branches" $branchLink $timeSince}}
|
{{ctx.Locale.Tr "repo.pulls.recently_pushed_new_branches" $branchLink $timeSince}}
|
||||||
</div>
|
</div>
|
||||||
<a role="button" class="ui compact positive button gt-m-0" href="{{$.Repository.ComposeBranchCompareURL $.Repository.BaseRepo .Name}}">
|
<a role="button" class="ui compact positive button tw-m-0" href="{{$.Repository.ComposeBranchCompareURL $.Repository.BaseRepo .Name}}">
|
||||||
{{ctx.Locale.Tr "repo.pulls.compare_changes"}}
|
{{ctx.Locale.Tr "repo.pulls.compare_changes"}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
{{if not .PageIsWiki}}
|
{{if not .PageIsWiki}}
|
||||||
<div class="branch-and-tag-area" data-text-default-branch-tooltip="{{ctx.Locale.Tr "repo.commit.contained_in_default_branch"}}">
|
<div class="branch-and-tag-area" data-text-default-branch-tooltip="{{ctx.Locale.Tr "repo.commit.contained_in_default_branch"}}">
|
||||||
<button class="ui button ellipsis-button load-branches-and-tags gt-mt-3" aria-expanded="false"
|
<button class="ui button ellipsis-button load-branches-and-tags tw-mt-2" aria-expanded="false"
|
||||||
data-fetch-url="{{.RepoLink}}/commit/{{.CommitID}}/load-branches-and-tags"
|
data-fetch-url="{{.RepoLink}}/commit/{{.CommitID}}/load-branches-and-tags"
|
||||||
data-tooltip-content="{{ctx.Locale.Tr "repo.commit.load_referencing_branches_and_tags"}}"
|
data-tooltip-content="{{ctx.Locale.Tr "repo.commit.load_referencing_branches_and_tags"}}"
|
||||||
>...</button>
|
>...</button>
|
||||||
<div class="branch-and-tag-detail gt-hidden">
|
<div class="branch-and-tag-detail tw-hidden">
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<div>{{ctx.Locale.Tr "repo.commit.contained_in"}}</div>
|
<div>{{ctx.Locale.Tr "repo.commit.contained_in"}}</div>
|
||||||
<div class="tw-flex gt-mt-3">
|
<div class="tw-flex tw-mt-2">
|
||||||
<div class="gt-p-2">{{svg "octicon-git-branch"}}</div>
|
<div class="tw-p-1">{{svg "octicon-git-branch"}}</div>
|
||||||
<div class="branch-area flex-text-block tw-flex-wrap tw-flex-1"></div>
|
<div class="branch-area flex-text-block tw-flex-wrap tw-flex-1"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tw-flex gt-mt-3">
|
<div class="tw-flex tw-mt-2">
|
||||||
<div class="gt-p-2">{{svg "octicon-tag"}}</div>
|
<div class="tw-p-1">{{svg "octicon-tag"}}</div>
|
||||||
<div class="tag-area flex-text-block tw-flex-wrap tw-flex-1"></div>
|
<div class="tag-area flex-text-block tw-flex-wrap tw-flex-1"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="ui top attached header clearing segment tw-relative commit-header {{$class}}">
|
<div class="ui top attached header clearing segment tw-relative commit-header {{$class}}">
|
||||||
<div class="tw-flex gt-mb-4 tw-flex-wrap">
|
<div class="tw-flex tw-mb-4 tw-flex-wrap">
|
||||||
<h3 class="gt-mb-0 tw-flex-1"><span class="commit-summary" title="{{.Commit.Summary}}">{{RenderCommitMessage $.Context .Commit.Message ($.Repository.ComposeMetas ctx)}}</span>{{template "repo/commit_statuses" dict "Status" .CommitStatus "Statuses" .CommitStatuses}}</h3>
|
<h3 class="tw-mb-0 tw-flex-1"><span class="commit-summary" title="{{.Commit.Summary}}">{{RenderCommitMessage $.Context .Commit.Message ($.Repository.ComposeMetas ctx)}}</span>{{template "repo/commit_statuses" dict "Status" .CommitStatus "Statuses" .CommitStatuses}}</h3>
|
||||||
{{if not $.PageIsWiki}}
|
{{if not $.PageIsWiki}}
|
||||||
<div>
|
<div>
|
||||||
<a class="ui primary tiny button" href="{{.SourcePath}}">
|
<a class="ui primary tiny button" href="{{.SourcePath}}">
|
||||||
|
@ -139,27 +139,27 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
{{template "repo/commit_load_branches_and_tags" .}}
|
{{template "repo/commit_load_branches_and_tags" .}}
|
||||||
</div>
|
</div>
|
||||||
<div class="ui attached segment tw-flex tw-items-center tw-justify-between gt-py-2 commit-header-row tw-flex-wrap {{$class}}">
|
<div class="ui attached segment tw-flex tw-items-center tw-justify-between tw-py-1 commit-header-row tw-flex-wrap {{$class}}">
|
||||||
<div class="tw-flex tw-items-center author">
|
<div class="tw-flex tw-items-center author">
|
||||||
{{if .Author}}
|
{{if .Author}}
|
||||||
{{ctx.AvatarUtils.Avatar .Author 28 "gt-mr-3"}}
|
{{ctx.AvatarUtils.Avatar .Author 28 "tw-mr-2"}}
|
||||||
{{if .Author.FullName}}
|
{{if .Author.FullName}}
|
||||||
<a href="{{.Author.HomeLink}}"><strong>{{.Author.FullName}}</strong></a>
|
<a href="{{.Author.HomeLink}}"><strong>{{.Author.FullName}}</strong></a>
|
||||||
{{else}}
|
{{else}}
|
||||||
<a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}</strong></a>
|
<a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}</strong></a>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{ctx.AvatarUtils.AvatarByEmail .Commit.Author.Email .Commit.Author.Email 28 "gt-mr-3"}}
|
{{ctx.AvatarUtils.AvatarByEmail .Commit.Author.Email .Commit.Author.Email 28 "tw-mr-2"}}
|
||||||
<strong>{{.Commit.Author.Name}}</strong>
|
<strong>{{.Commit.Author.Name}}</strong>
|
||||||
{{end}}
|
{{end}}
|
||||||
<span class="text grey gt-ml-3" id="authored-time">{{TimeSince .Commit.Author.When ctx.Locale}}</span>
|
<span class="text grey tw-ml-2" id="authored-time">{{TimeSince .Commit.Author.When ctx.Locale}}</span>
|
||||||
{{if or (ne .Commit.Committer.Name .Commit.Author.Name) (ne .Commit.Committer.Email .Commit.Author.Email)}}
|
{{if or (ne .Commit.Committer.Name .Commit.Author.Name) (ne .Commit.Committer.Email .Commit.Author.Email)}}
|
||||||
<span class="text grey gt-mx-3">{{ctx.Locale.Tr "repo.diff.committed_by"}}</span>
|
<span class="text grey tw-mx-2">{{ctx.Locale.Tr "repo.diff.committed_by"}}</span>
|
||||||
{{if ne .Verification.CommittingUser.ID 0}}
|
{{if ne .Verification.CommittingUser.ID 0}}
|
||||||
{{ctx.AvatarUtils.Avatar .Verification.CommittingUser 28 "gt-mx-3"}}
|
{{ctx.AvatarUtils.Avatar .Verification.CommittingUser 28 "tw-mx-2"}}
|
||||||
<a href="{{.Verification.CommittingUser.HomeLink}}"><strong>{{.Commit.Committer.Name}}</strong></a>
|
<a href="{{.Verification.CommittingUser.HomeLink}}"><strong>{{.Commit.Committer.Name}}</strong></a>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{ctx.AvatarUtils.AvatarByEmail .Commit.Committer.Email .Commit.Committer.Name 28 "gt-mr-3"}}
|
{{ctx.AvatarUtils.AvatarByEmail .Commit.Committer.Email .Commit.Committer.Name 28 "tw-mr-2"}}
|
||||||
<strong>{{.Commit.Committer.Name}}</strong>
|
<strong>{{.Commit.Committer.Name}}</strong>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -184,73 +184,73 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{if .Commit.Signature}}
|
{{if .Commit.Signature}}
|
||||||
<div class="ui bottom attached message tw-text-left tw-flex tw-items-center tw-justify-between commit-header-row tw-flex-wrap gt-mb-0 {{$class}}">
|
<div class="ui bottom attached message tw-text-left tw-flex tw-items-center tw-justify-between commit-header-row tw-flex-wrap tw-mb-0 {{$class}}">
|
||||||
<div class="tw-flex tw-items-center">
|
<div class="tw-flex tw-items-center">
|
||||||
{{if .Verification.Verified}}
|
{{if .Verification.Verified}}
|
||||||
{{if ne .Verification.SigningUser.ID 0}}
|
{{if ne .Verification.SigningUser.ID 0}}
|
||||||
{{svg "gitea-lock" 16 "gt-mr-3"}}
|
{{svg "gitea-lock" 16 "tw-mr-2"}}
|
||||||
{{if eq .Verification.TrustStatus "trusted"}}
|
{{if eq .Verification.TrustStatus "trusted"}}
|
||||||
<span class="ui text gt-mr-3">{{ctx.Locale.Tr "repo.commits.signed_by"}}:</span>
|
<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.signed_by"}}:</span>
|
||||||
{{else if eq .Verification.TrustStatus "untrusted"}}
|
{{else if eq .Verification.TrustStatus "untrusted"}}
|
||||||
<span class="ui text gt-mr-3">{{ctx.Locale.Tr "repo.commits.signed_by_untrusted_user"}}:</span>
|
<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.signed_by_untrusted_user"}}:</span>
|
||||||
{{else}}
|
{{else}}
|
||||||
<span class="ui text gt-mr-3">{{ctx.Locale.Tr "repo.commits.signed_by_untrusted_user_unmatched"}}:</span>
|
<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.signed_by_untrusted_user_unmatched"}}:</span>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{ctx.AvatarUtils.Avatar .Verification.SigningUser 28 "gt-mr-3"}}
|
{{ctx.AvatarUtils.Avatar .Verification.SigningUser 28 "tw-mr-2"}}
|
||||||
<a href="{{.Verification.SigningUser.HomeLink}}"><strong>{{.Verification.SigningUser.GetDisplayName}}</strong></a>
|
<a href="{{.Verification.SigningUser.HomeLink}}"><strong>{{.Verification.SigningUser.GetDisplayName}}</strong></a>
|
||||||
{{else}}
|
{{else}}
|
||||||
<span title="{{ctx.Locale.Tr "gpg.default_key"}}">{{svg "gitea-lock-cog" 16 "gt-mr-3"}}</span>
|
<span title="{{ctx.Locale.Tr "gpg.default_key"}}">{{svg "gitea-lock-cog" 16 "tw-mr-2"}}</span>
|
||||||
<span class="ui text gt-mr-3">{{ctx.Locale.Tr "repo.commits.signed_by"}}:</span>
|
<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.signed_by"}}:</span>
|
||||||
{{ctx.AvatarUtils.AvatarByEmail .Verification.SigningEmail "" 28 "gt-mr-3"}}
|
{{ctx.AvatarUtils.AvatarByEmail .Verification.SigningEmail "" 28 "tw-mr-2"}}
|
||||||
<strong>{{.Verification.SigningUser.GetDisplayName}}</strong>
|
<strong>{{.Verification.SigningUser.GetDisplayName}}</strong>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{svg "gitea-unlock" 16 "gt-mr-3"}}
|
{{svg "gitea-unlock" 16 "tw-mr-2"}}
|
||||||
<span class="ui text">{{ctx.Locale.Tr .Verification.Reason}}</span>
|
<span class="ui text">{{ctx.Locale.Tr .Verification.Reason}}</span>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
<div class="tw-flex tw-items-center">
|
<div class="tw-flex tw-items-center">
|
||||||
{{if .Verification.Verified}}
|
{{if .Verification.Verified}}
|
||||||
{{if ne .Verification.SigningUser.ID 0}}
|
{{if ne .Verification.SigningUser.ID 0}}
|
||||||
{{svg "octicon-verified" 16 "gt-mr-3"}}
|
{{svg "octicon-verified" 16 "tw-mr-2"}}
|
||||||
{{if .Verification.SigningSSHKey}}
|
{{if .Verification.SigningSSHKey}}
|
||||||
<span class="ui text gt-mr-3">{{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}:</span>
|
<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}:</span>
|
||||||
{{.Verification.SigningSSHKey.Fingerprint}}
|
{{.Verification.SigningSSHKey.Fingerprint}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<span class="ui text gt-mr-3">{{ctx.Locale.Tr "repo.commits.gpg_key_id"}}:</span>
|
<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.gpg_key_id"}}:</span>
|
||||||
{{.Verification.SigningKey.PaddedKeyID}}
|
{{.Verification.SigningKey.PaddedKeyID}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{svg "octicon-unverified" 16 "gt-mr-3"}}
|
{{svg "octicon-unverified" 16 "tw-mr-2"}}
|
||||||
{{if .Verification.SigningSSHKey}}
|
{{if .Verification.SigningSSHKey}}
|
||||||
<span class="ui text gt-mr-3" data-tooltip-content="{{ctx.Locale.Tr "gpg.default_key"}}">{{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}:</span>
|
<span class="ui text tw-mr-2" data-tooltip-content="{{ctx.Locale.Tr "gpg.default_key"}}">{{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}:</span>
|
||||||
{{.Verification.SigningSSHKey.Fingerprint}}
|
{{.Verification.SigningSSHKey.Fingerprint}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<span class="ui text gt-mr-3" data-tooltip-content="{{ctx.Locale.Tr "gpg.default_key"}}">{{ctx.Locale.Tr "repo.commits.gpg_key_id"}}:</span>
|
<span class="ui text tw-mr-2" data-tooltip-content="{{ctx.Locale.Tr "gpg.default_key"}}">{{ctx.Locale.Tr "repo.commits.gpg_key_id"}}:</span>
|
||||||
{{.Verification.SigningKey.PaddedKeyID}}
|
{{.Verification.SigningKey.PaddedKeyID}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{else if .Verification.Warning}}
|
{{else if .Verification.Warning}}
|
||||||
{{svg "octicon-unverified" 16 "gt-mr-3"}}
|
{{svg "octicon-unverified" 16 "tw-mr-2"}}
|
||||||
{{if .Verification.SigningSSHKey}}
|
{{if .Verification.SigningSSHKey}}
|
||||||
<span class="ui text gt-mr-3">{{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}:</span>
|
<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}:</span>
|
||||||
{{.Verification.SigningSSHKey.Fingerprint}}
|
{{.Verification.SigningSSHKey.Fingerprint}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<span class="ui text gt-mr-3">{{ctx.Locale.Tr "repo.commits.gpg_key_id"}}:</span>
|
<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.gpg_key_id"}}:</span>
|
||||||
{{.Verification.SigningKey.PaddedKeyID}}
|
{{.Verification.SigningKey.PaddedKeyID}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{if .Verification.SigningKey}}
|
{{if .Verification.SigningKey}}
|
||||||
{{if ne .Verification.SigningKey.KeyID ""}}
|
{{if ne .Verification.SigningKey.KeyID ""}}
|
||||||
{{svg "octicon-verified" 16 "gt-mr-3"}}
|
{{svg "octicon-verified" 16 "tw-mr-2"}}
|
||||||
<span class="ui text gt-mr-3">{{ctx.Locale.Tr "repo.commits.gpg_key_id"}}:</span>
|
<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.gpg_key_id"}}:</span>
|
||||||
{{.Verification.SigningKey.PaddedKeyID}}
|
{{.Verification.SigningKey.PaddedKeyID}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if .Verification.SigningSSHKey}}
|
{{if .Verification.SigningSSHKey}}
|
||||||
{{if ne .Verification.SigningSSHKey.Fingerprint ""}}
|
{{if ne .Verification.SigningSSHKey.Fingerprint ""}}
|
||||||
{{svg "octicon-verified" 16 "gt-mr-3"}}
|
{{svg "octicon-verified" 16 "tw-mr-2"}}
|
||||||
<span class="ui text gt-mr-3">{{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}:</span>
|
<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}:</span>
|
||||||
{{.Verification.SigningSSHKey.Fingerprint}}
|
{{.Verification.SigningSSHKey.Fingerprint}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -260,7 +260,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if .NoteRendered}}
|
{{if .NoteRendered}}
|
||||||
<div class="ui top attached header segment git-notes">
|
<div class="ui top attached header segment git-notes">
|
||||||
{{svg "octicon-note" 16 "gt-mr-3"}}
|
{{svg "octicon-note" 16 "tw-mr-2"}}
|
||||||
{{ctx.Locale.Tr "repo.diff.git-notes"}}:
|
{{ctx.Locale.Tr "repo.diff.git-notes"}}:
|
||||||
{{if .NoteAuthor}}
|
{{if .NoteAuthor}}
|
||||||
<a href="{{.NoteAuthor.HomeLink}}">
|
<a href="{{.NoteAuthor.HomeLink}}">
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
{{template "repo/sub_menu" .}}
|
{{template "repo/sub_menu" .}}
|
||||||
<div class="repo-button-row">
|
<div class="repo-button-row">
|
||||||
<div class="tw-flex tw-items-center">
|
<div class="tw-flex tw-items-center">
|
||||||
{{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "gt-mr-2"}}
|
{{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "tw-mr-1"}}
|
||||||
<a href="{{.RepoLink}}/graph" class="ui basic small compact button">
|
<a href="{{.RepoLink}}/graph" class="ui basic small compact button">
|
||||||
{{svg "octicon-git-branch"}}
|
{{svg "octicon-git-branch"}}
|
||||||
{{ctx.Locale.Tr "repo.commit_graph"}}
|
{{ctx.Locale.Tr "repo.commit_graph"}}
|
||||||
|
|
|
@ -13,16 +13,16 @@
|
||||||
{{$commitRepoLink := $.RepoLink}}{{if $.CommitRepoLink}}{{$commitRepoLink = $.CommitRepoLink}}{{end}}
|
{{$commitRepoLink := $.RepoLink}}{{if $.CommitRepoLink}}{{$commitRepoLink = $.CommitRepoLink}}{{end}}
|
||||||
{{range .Commits}}
|
{{range .Commits}}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="author">
|
<td class="author tw-flex">
|
||||||
{{$userName := .Author.Name}}
|
{{$userName := .Author.Name}}
|
||||||
{{if .User}}
|
{{if .User}}
|
||||||
{{if .User.FullName}}
|
{{if .User.FullName}}
|
||||||
{{$userName = .User.FullName}}
|
{{$userName = .User.FullName}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{ctx.AvatarUtils.Avatar .User 28 "gt-mr-2"}}<a href="{{.User.HomeLink}}">{{$userName}}</a>
|
{{ctx.AvatarUtils.Avatar .User 28 "tw-mr-2"}}<a class="muted author-wrapper" href="{{.User.HomeLink}}">{{$userName}}</a>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 28 "gt-mr-2"}}
|
{{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 28 "tw-mr-2"}}
|
||||||
{{$userName}}
|
<span class="author-wrapper">{{$userName}}</span>
|
||||||
{{end}}
|
{{end}}
|
||||||
</td>
|
</td>
|
||||||
<td class="sha">
|
<td class="sha">
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
{{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses}}
|
{{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses}}
|
||||||
{{if IsMultilineCommitMessage .Message}}
|
{{if IsMultilineCommitMessage .Message}}
|
||||||
<pre class="commit-body gt-hidden">{{RenderCommitBody $.Context .Message ($.Repository.ComposeMetas ctx)}}</pre>
|
<pre class="commit-body tw-hidden">{{RenderCommitBody $.Context .Message ($.Repository.ComposeMetas ctx)}}</pre>
|
||||||
{{end}}
|
{{end}}
|
||||||
</td>
|
</td>
|
||||||
{{if .Committer}}
|
{{if .Committer}}
|
||||||
|
@ -76,10 +76,10 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
<td class="text right aligned">{{TimeSince .Author.When ctx.Locale}}</td>
|
<td class="text right aligned">{{TimeSince .Author.When ctx.Locale}}</td>
|
||||||
{{end}}
|
{{end}}
|
||||||
<td class="text right aligned gt-py-0">
|
<td class="text right aligned tw-py-0">
|
||||||
<button class="btn interact-bg gt-p-3" data-tooltip-content="{{ctx.Locale.Tr "copy_hash"}}" data-clipboard-text="{{.ID}}">{{svg "octicon-copy"}}</button>
|
<button class="btn interact-bg tw-p-2" data-tooltip-content="{{ctx.Locale.Tr "copy_hash"}}" data-clipboard-text="{{.ID}}">{{svg "octicon-copy"}}</button>
|
||||||
<a
|
<a
|
||||||
class="btn interact-bg gt-p-3"
|
class="btn interact-bg tw-p-2"
|
||||||
data-tooltip-content="{{ctx.Locale.Tr "repo.commits.view_path"}}"
|
data-tooltip-content="{{ctx.Locale.Tr "repo.commits.view_path"}}"
|
||||||
href="{{if $.FileName}}{{printf "%s/src/commit/%s/%s" $commitRepoLink (PathEscape .ID.String) (PathEscapeSegments $.FileName)}}{{else}}{{printf "%s/src/commit/%s" $commitRepoLink (PathEscape .ID.String)}}{{end}}">
|
href="{{if $.FileName}}{{printf "%s/src/commit/%s/%s" $commitRepoLink (PathEscape .ID.String) (PathEscapeSegments $.FileName)}}{{else}}{{printf "%s/src/commit/%s" $commitRepoLink (PathEscape .ID.String)}}{{end}}">
|
||||||
{{svg "octicon-file-code"}}
|
{{svg "octicon-file-code"}}
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
{{$class = (print $class " isWarning")}}
|
{{$class = (print $class " isWarning")}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
<a href="{{$commitLink}}" rel="nofollow" class="gt-ml-3 {{$class}}">
|
<a href="{{$commitLink}}" rel="nofollow" class="tw-ml-2 {{$class}}">
|
||||||
<span class="shortsha">{{ShortSha .ID.String}}</span>
|
<span class="shortsha">{{ShortSha .ID.String}}</span>
|
||||||
{{if .Signature}}
|
{{if .Signature}}
|
||||||
{{template "repo/shabox_badge" dict "root" $.root "verification" .Verification}}
|
{{template "repo/shabox_badge" dict "root" $.root "verification" .Verification}}
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
<button class="ui button js-toggle-commit-body ellipsis-button" aria-expanded="false">...</button>
|
<button class="ui button js-toggle-commit-body ellipsis-button" aria-expanded="false">...</button>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if IsMultilineCommitMessage .Message}}
|
{{if IsMultilineCommitMessage .Message}}
|
||||||
<pre class="commit-body gt-hidden">{{RenderCommitBody $.root.Context .Message ($.comment.Issue.PullRequest.BaseRepo.ComposeMetas ctx)}}</pre>
|
<pre class="commit-body tw-hidden">{{RenderCommitBody $.root.Context .Message ($.comment.Issue.PullRequest.BaseRepo.ComposeMetas ctx)}}</pre>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue