forked from mirror/gitea
Compare commits
6 Commits
abb330e613
...
34290a00c4
Author | SHA1 | Date | |
---|---|---|---|
silverwind | 34290a00c4 | ||
wxiaoguang | b251e608c0 | ||
buckybytes | 16e360099d | ||
GiteaBot | a4a766f4a2 | ||
silverwind | 095fdd691d | ||
Nanguan Lin | 5ca65d3390 |
|
@ -62,7 +62,6 @@ cpu.out
|
|||
/data
|
||||
/indexers
|
||||
/log
|
||||
/public/img/avatar
|
||||
/tests/integration/gitea-integration-*
|
||||
/tests/integration/indexers-*
|
||||
/tests/e2e/gitea-e2e-*
|
||||
|
@ -78,6 +77,7 @@ cpu.out
|
|||
/public/assets/js
|
||||
/public/assets/css
|
||||
/public/assets/fonts
|
||||
/public/assets/img/avatar
|
||||
/public/assets/img/webpack
|
||||
/vendor
|
||||
/web_src/fomantic/node_modules
|
||||
|
|
|
@ -42,10 +42,6 @@ overrides:
|
|||
worker: true
|
||||
rules:
|
||||
no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, status, statusbar, stop, toolbar, top]
|
||||
- files: ["build/generate-images.js"]
|
||||
rules:
|
||||
i/no-unresolved: [0]
|
||||
i/no-extraneous-dependencies: [0]
|
||||
- files: ["*.config.*"]
|
||||
rules:
|
||||
i/no-unused-modules: [0]
|
||||
|
|
|
@ -58,7 +58,7 @@ cpu.out
|
|||
/data
|
||||
/indexers
|
||||
/log
|
||||
/public/img/avatar
|
||||
/public/assets/img/avatar
|
||||
/tests/integration/gitea-integration-*
|
||||
/tests/integration/indexers-*
|
||||
/tests/e2e/gitea-e2e-*
|
||||
|
|
16
Makefile
16
Makefile
|
@ -147,6 +147,8 @@ TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE) $(FOMAN
|
|||
GO_DIRS := build cmd models modules routers services tests
|
||||
WEB_DIRS := web_src/js web_src/css
|
||||
|
||||
ESLINT_FILES := web_src/js tools *.config.js tests/e2e
|
||||
STYLELINT_FILES := web_src/css web_src/js/components/*.vue
|
||||
SPELLCHECK_FILES := $(GO_DIRS) $(WEB_DIRS) docs/content templates options/locale/locale_en-US.ini .github
|
||||
EDITORCONFIG_FILES := templates .github/workflows options/locale/locale_en-US.ini
|
||||
|
||||
|
@ -375,19 +377,19 @@ lint-backend-fix: lint-go-fix lint-go-vet lint-editorconfig
|
|||
|
||||
.PHONY: lint-js
|
||||
lint-js: node_modules
|
||||
npx eslint --color --max-warnings=0 --ext js,vue web_src/js build *.config.js tests/e2e
|
||||
npx eslint --color --max-warnings=0 --ext js,vue $(ESLINT_FILES)
|
||||
|
||||
.PHONY: lint-js-fix
|
||||
lint-js-fix: node_modules
|
||||
npx eslint --color --max-warnings=0 --ext js,vue web_src/js build *.config.js tests/e2e --fix
|
||||
npx eslint --color --max-warnings=0 --ext js,vue $(ESLINT_FILES) --fix
|
||||
|
||||
.PHONY: lint-css
|
||||
lint-css: node_modules
|
||||
npx stylelint --color --max-warnings=0 web_src/css web_src/js/components/*.vue
|
||||
npx stylelint --color --max-warnings=0 $(STYLELINT_FILES)
|
||||
|
||||
.PHONY: lint-css-fix
|
||||
lint-css-fix: node_modules
|
||||
npx stylelint --color --max-warnings=0 web_src/css web_src/js/components/*.vue --fix
|
||||
npx stylelint --color --max-warnings=0 $(STYLELINT_FILES) --fix
|
||||
|
||||
.PHONY: lint-swagger
|
||||
lint-swagger: node_modules
|
||||
|
@ -444,7 +446,7 @@ lint-yaml: .venv
|
|||
|
||||
.PHONY: watch
|
||||
watch:
|
||||
@bash build/watch.sh
|
||||
@bash tools/watch.sh
|
||||
|
||||
.PHONY: watch-frontend
|
||||
watch-frontend: node-check node_modules
|
||||
|
@ -916,7 +918,7 @@ $(WEBPACK_DEST): $(WEBPACK_SOURCES) $(WEBPACK_CONFIGS) package-lock.json
|
|||
.PHONY: svg
|
||||
svg: node-check | node_modules
|
||||
rm -rf $(SVG_DEST_DIR)
|
||||
node build/generate-svg.js
|
||||
node tools/generate-svg.js
|
||||
|
||||
.PHONY: svg-check
|
||||
svg-check: svg
|
||||
|
@ -960,7 +962,7 @@ generate-gitignore:
|
|||
.PHONY: generate-images
|
||||
generate-images: | node_modules
|
||||
npm install --no-save fabric@6.0.0-beta19 imagemin-zopfli@7
|
||||
node build/generate-images.js $(TAGS)
|
||||
node tools/generate-images.js $(TAGS)
|
||||
|
||||
.PHONY: generate-manpage
|
||||
generate-manpage:
|
||||
|
|
|
@ -37,7 +37,7 @@ gitea embedded list [--include-vendored] [patterns...]
|
|||
|
||||
- 列出所有模板文件,无论在哪个虚拟目录下:`**.tmpl`
|
||||
- 列出所有邮件模板文件:`templates/mail/**.tmpl`
|
||||
- 列出 `public/img` 目录下的所有文件:`public/img/**`
|
||||
列出 `public/assets/img` 目录下的所有文件:`public/assets/img/**`
|
||||
|
||||
不要忘记为模式使用引号,因为空格、`*` 和其他字符可能对命令行解释器有特殊含义。
|
||||
|
||||
|
@ -49,8 +49,8 @@ gitea embedded list [--include-vendored] [patterns...]
|
|||
|
||||
```sh
|
||||
$ gitea embedded list '**openid**'
|
||||
public/img/auth/openid_connect.svg
|
||||
public/img/openid-16x16.png
|
||||
public/assets/img/auth/openid_connect.svg
|
||||
public/assets/img/openid-16x16.png
|
||||
templates/user/auth/finalize_openid.tmpl
|
||||
templates/user/auth/signin_openid.tmpl
|
||||
templates/user/auth/signup_openid_connect.tmpl
|
||||
|
|
|
@ -214,7 +214,7 @@ REPO_INDEXER_CONN_STR = http://elastic:changeme@localhost:9200
|
|||
|
||||
### Building and adding SVGs
|
||||
|
||||
SVG icons are built using the `make svg` target which compiles the icon sources defined in `build/generate-svg.js` into the output directory `public/assets/img/svg`. Custom icons can be added in the `web_src/svg` directory.
|
||||
SVG icons are built using the `make svg` target which compiles the icon sources into the output directory `public/assets/img/svg`. Custom icons can be added in the `web_src/svg` directory.
|
||||
|
||||
### Building the Logo
|
||||
|
||||
|
|
|
@ -201,7 +201,7 @@ REPO_INDEXER_CONN_STR = http://elastic:changeme@localhost:9200
|
|||
|
||||
### 构建和添加 SVGs
|
||||
|
||||
SVG 图标是使用 `make svg` 目标构建的,该目标将 `build/generate-svg.js` 中定义的图标源编译到输出目录 `public/img/svg` 中。可以在 `web_src/svg` 目录中添加自定义图标。
|
||||
SVG 图标是使用 `make svg` 命令构建的,该命令将图标资源编译到输出目录 `public/assets/img/svg` 中。可以在 `web_src/svg` 目录中添加自定义图标。
|
||||
|
||||
### 构建 Logo
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
This file may be distributed, modified, and used in other works with just
|
||||
one restriction: modified versions must clearly indicate the modification
|
||||
(a name change, or a displayed message, or ?).
|
|
@ -1312,6 +1312,8 @@ editor.file_editing_no_longer_exists = The file being edited, "%s", no longer ex
|
|||
editor.file_deleting_no_longer_exists = The file being deleted, "%s", no longer exists in this repository.
|
||||
editor.file_changed_while_editing = The file contents have changed since you started editing. <a target="_blank" rel="noopener noreferrer" href="%s">Click here</a> to see them or <strong>Commit Changes again</strong> to overwrite them.
|
||||
editor.file_already_exists = A file named "%s" already exists in this repository.
|
||||
editor.commit_id_not_matching = The Commit ID does not match the ID when you began editing. Commit into a patch branch and then merge.
|
||||
editor.push_out_of_date = The push appears to be out of date.
|
||||
editor.commit_empty_file_header = Commit an empty file
|
||||
editor.commit_empty_file_text = The file you're about to commit is empty. Proceed?
|
||||
editor.no_changes_to_show = There are no changes to show.
|
||||
|
|
|
@ -333,9 +333,9 @@ func editFilePost(ctx *context.Context, form forms.EditRepoFileForm, isNewFile b
|
|||
ctx.Error(http.StatusInternalServerError, err.Error())
|
||||
}
|
||||
} else if models.IsErrCommitIDDoesNotMatch(err) {
|
||||
ctx.RenderWithErr(ctx.Tr("repo.editor.file_changed_while_editing", ctx.Repo.RepoLink+"/compare/"+util.PathEscapeSegments(form.LastCommit)+"..."+util.PathEscapeSegments(ctx.Repo.CommitID)), tplEditFile, &form)
|
||||
ctx.RenderWithErr(ctx.Tr("repo.editor.commit_id_not_matching", ctx.Repo.RepoLink+"/compare/"+util.PathEscapeSegments(form.LastCommit)+"..."+util.PathEscapeSegments(ctx.Repo.CommitID)), tplEditFile, &form)
|
||||
} else if git.IsErrPushOutOfDate(err) {
|
||||
ctx.RenderWithErr(ctx.Tr("repo.editor.file_changed_while_editing", ctx.Repo.RepoLink+"/compare/"+util.PathEscapeSegments(form.LastCommit)+"..."+util.PathEscapeSegments(form.NewBranchName)), tplEditFile, &form)
|
||||
ctx.RenderWithErr(ctx.Tr("repo.editor.push_out_of_date", ctx.Repo.RepoLink+"/compare/"+util.PathEscapeSegments(form.LastCommit)+"..."+util.PathEscapeSegments(form.NewBranchName)), tplEditFile, &form)
|
||||
} else if git.IsErrPushRejected(err) {
|
||||
errPushRej := err.(*git.ErrPushRejected)
|
||||
if len(errPushRej.Message) == 0 {
|
||||
|
|
|
@ -622,26 +622,31 @@ func SearchRepo(ctx *context.Context) {
|
|||
}
|
||||
}
|
||||
|
||||
var err error
|
||||
// To improve performance when only the count is requested
|
||||
if ctx.FormBool("count_only") {
|
||||
if count, err := repo_model.CountRepository(ctx, opts); err != nil {
|
||||
log.Error("CountRepository: %v", err)
|
||||
ctx.JSON(http.StatusInternalServerError, nil) // frontend JS doesn't handle error response (same as below)
|
||||
} else {
|
||||
ctx.SetTotalCountHeader(count)
|
||||
ctx.JSONOK()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
repos, count, err := repo_model.SearchRepository(ctx, opts)
|
||||
if err != nil {
|
||||
ctx.JSON(http.StatusInternalServerError, api.SearchError{
|
||||
OK: false,
|
||||
Error: err.Error(),
|
||||
})
|
||||
log.Error("SearchRepository: %v", err)
|
||||
ctx.JSON(http.StatusInternalServerError, nil)
|
||||
return
|
||||
}
|
||||
|
||||
ctx.SetTotalCountHeader(count)
|
||||
|
||||
// To improve performance when only the count is requested
|
||||
if ctx.FormBool("count_only") {
|
||||
return
|
||||
}
|
||||
|
||||
latestCommitStatuses, err := commitstatus_service.FindReposLastestCommitStatuses(ctx, repos)
|
||||
if err != nil {
|
||||
log.Error("FindReposLastestCommitStatuses: %v", err)
|
||||
ctx.JSON(http.StatusInternalServerError, nil)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,8 @@ import (
|
|||
"code.gitea.io/gitea/modules/git"
|
||||
"code.gitea.io/gitea/modules/gitrepo"
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
"code.gitea.io/gitea/modules/markup"
|
||||
"code.gitea.io/gitea/modules/markup/markdown"
|
||||
"code.gitea.io/gitea/modules/optional"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
"code.gitea.io/gitea/services/context"
|
||||
|
@ -34,6 +36,7 @@ func prepareContextForCommonProfile(ctx *context.Context) {
|
|||
func PrepareContextForProfileBigAvatar(ctx *context.Context) {
|
||||
prepareContextForCommonProfile(ctx)
|
||||
|
||||
ctx.Data["IsFollowing"] = ctx.Doer != nil && user_model.IsFollowing(ctx, ctx.Doer.ID, ctx.ContextUser.ID)
|
||||
ctx.Data["ShowUserEmail"] = setting.UI.ShowUserEmail && ctx.ContextUser.Email != "" && ctx.IsSigned && !ctx.ContextUser.KeepEmailPrivate
|
||||
if setting.Service.UserLocationMapURL != "" {
|
||||
ctx.Data["ContextUserLocationMapURL"] = setting.Service.UserLocationMapURL + url.QueryEscape(ctx.ContextUser.Location)
|
||||
|
@ -45,6 +48,17 @@ func PrepareContextForProfileBigAvatar(ctx *context.Context) {
|
|||
return
|
||||
}
|
||||
ctx.Data["OpenIDs"] = openIDs
|
||||
if len(ctx.ContextUser.Description) != 0 {
|
||||
content, err := markdown.RenderString(&markup.RenderContext{
|
||||
Metas: map[string]string{"mode": "document"},
|
||||
Ctx: ctx,
|
||||
}, ctx.ContextUser.Description)
|
||||
if err != nil {
|
||||
ctx.ServerError("RenderString", err)
|
||||
return
|
||||
}
|
||||
ctx.Data["RenderedDescription"] = content
|
||||
}
|
||||
|
||||
showPrivate := ctx.IsSigned && (ctx.Doer.IsAdmin || ctx.Doer.ID == ctx.ContextUser.ID)
|
||||
orgs, err := db.Find[organization.Organization](ctx, organization.FindOrgOptions{
|
||||
|
|
|
@ -55,5 +55,16 @@ export default {
|
|||
current: 'currentcolor',
|
||||
transparent: 'transparent',
|
||||
},
|
||||
borderRadius: {
|
||||
'none': '0',
|
||||
'sm': '2px',
|
||||
'DEFAULT': 'var(--border-radius)', // 4px
|
||||
'md': 'var(--border-radius-medium)', // 6px
|
||||
'lg': '8px',
|
||||
'xl': '12px',
|
||||
'2xl': '16px',
|
||||
'3xl': '24px',
|
||||
'full': 'var(--border-radius-circle)', // 50%
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
</div>
|
||||
|
||||
<h1>If parent provides the padding/margin space:</h1>
|
||||
<div class="gt-border-secondary gt-py-4">
|
||||
<div class="tw-border tw-border-secondary gt-py-4">
|
||||
<div class="flex-list flex-space-fitted">
|
||||
<div class="flex-item">item 1 (no padding top)</div>
|
||||
<div class="flex-item">item 2 (no padding bottom)</div>
|
||||
|
|
|
@ -95,8 +95,8 @@
|
|||
|
||||
<div>
|
||||
<h1>Loading</h1>
|
||||
<div class="is-loading small-loading-icon gt-border-secondary gt-py-2"><span>loading ...</span></div>
|
||||
<div class="is-loading gt-border-secondary gt-py-4">
|
||||
<div class="is-loading small-loading-icon tw-border tw-border-secondary gt-py-2"><span>loading ...</span></div>
|
||||
<div class="is-loading tw-border tw-border-secondary gt-py-4">
|
||||
<p>loading ...</p>
|
||||
<p>loading ...</p>
|
||||
<p>loading ...</p>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
{{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}}
|
||||
</span>
|
||||
<span class="gt-df gt-ac gt-gap-2 gt-ml-auto gt-font-16 tw-whitespace-nowrap">
|
||||
<span class="gt-df gt-ac gt-gap-2 tw-ml-auto gt-font-16 tw-whitespace-nowrap">
|
||||
{{if .EnableFeed}}
|
||||
<a class="ui basic label button gt-mr-0" href="{{.Org.HomeLink}}.rss" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}">
|
||||
{{svg "octicon-rss" 24}}
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
{{end}}
|
||||
{{end}}
|
||||
{{RenderLabel $.Context ctx.Locale .}}
|
||||
<p class="gt-ml-auto">{{template "repo/issue/labels/label_archived" .}}</p>
|
||||
<p class="tw-ml-auto">{{template "repo/issue/labels/label_archived" .}}</p>
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
|
@ -108,7 +108,7 @@
|
|||
</div>
|
||||
{{range .OpenProjects}}
|
||||
<a class="{{if $.ProjectID}}{{if eq $.ProjectID .ID}}active selected{{end}}{{end}} item gt-df" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&project={{.ID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}{{if $.ShowArchivedLabels}}&archived=true{{end}}">
|
||||
{{svg .IconName 18 "gt-mr-3 gt-shrink-0"}}<span class="gt-ellipsis">{{.Title}}</span>
|
||||
{{svg .IconName 18 "gt-mr-3 tw-shrink-0"}}<span class="gt-ellipsis">{{.Title}}</span>
|
||||
</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
</div>
|
||||
<div class="label-operation gt-df">
|
||||
{{template "repo/issue/labels/label_archived" .}}
|
||||
<div class="gt-df gt-ml-auto">
|
||||
<div class="gt-df tw-ml-auto">
|
||||
{{if and (not $.PageIsOrgSettingsLabels) (not $.Repository.IsArchived) (or $.CanWriteIssues $.CanWritePulls)}}
|
||||
<a class="edit-label-button" href="#" data-id="{{.ID}}" data-title="{{.Name}}" {{if .Exclusive}}data-exclusive{{end}} {{if gt .ArchivedUnix 0}}data-is-archived{{end}} data-num-issues="{{.NumIssues}}" data-description="{{.Description}}" data-color={{.Color}}>{{svg "octicon-pencil"}} {{ctx.Locale.Tr "repo.issues.label_edit"}}</a>
|
||||
<a class="delete-button" href="#" data-url="{{$.Link}}/delete" data-id="{{.ID}}">{{svg "octicon-trash"}} {{ctx.Locale.Tr "repo.issues.label_delete"}}</a>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
{{ctx.Locale.Tr "repo.pulls.tab_files"}}
|
||||
<span class="ui small label">{{if .NumFiles}}{{.NumFiles}}{{else}}-{{end}}</span>
|
||||
</a>
|
||||
<span class="item gt-ml-auto gt-pr-0 gt-font-bold gt-df gt-ac gt-gap-3">
|
||||
<span class="item tw-ml-auto gt-pr-0 gt-font-bold gt-df gt-ac gt-gap-3">
|
||||
<span><span class="text green">{{if .Diff.TotalAddition}}+{{.Diff.TotalAddition}}{{end}}</span> <span class="text red">{{if .Diff.TotalDeletion}}-{{.Diff.TotalDeletion}}{{end}}</span></span>
|
||||
<span class="diff-stats-bar">
|
||||
<div class="diff-stats-add-bar" style="width: {{Eval 100 "*" .Diff.TotalAddition "/" "(" .Diff.TotalAddition "+" .Diff.TotalDeletion "+" 0.0 ")"}}%"></div>
|
||||
|
|
|
@ -116,13 +116,12 @@
|
|||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{{end}}
|
||||
{{if $modifyBrokenPullMirror}}
|
||||
{{/* even if a repo is a pull mirror (IsMirror=true), the PullMirror might still be nil if the mirror migration is broken */}}
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<div class="text red gt-py-4 gt-border-secondary-bottom">{{ctx.Locale.Tr "repo.settings.mirror_settings.direction.pull"}}: {{ctx.Locale.Tr "error.occurred"}}</div>
|
||||
<div class="text red gt-py-4">{{ctx.Locale.Tr "repo.settings.mirror_settings.direction.pull"}}: {{ctx.Locale.Tr "error.occurred"}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -201,8 +200,9 @@
|
|||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
{{end}}{{/* end if: $modifyBrokenPullMirror / $isWorkingPullMirror */}}
|
||||
</table>
|
||||
{{end}}{{/* end if: IsMirror */}}
|
||||
{{end}}{{/* end if .Repository.IsMirror */}}
|
||||
|
||||
<table class="ui table">
|
||||
<thead>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<div class="full height">
|
||||
<nav class="ui secondary menu gt-border-secondary-bottom">
|
||||
<nav class="ui secondary menu">
|
||||
<div class="ui container gt-df">
|
||||
<div class="item gt-f1">
|
||||
<a href="{{AppSubUrl}}/" aria-label="{{ctx.Locale.Tr "home"}}">
|
||||
|
@ -28,6 +28,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="divider gt-my-0"></div>
|
||||
<div role="main" class="page-content status-page-500">
|
||||
<div class="ui container" >
|
||||
<style> .ui.message.flash-message { text-align: left; } </style>
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
|
||||
{{if .ContextUser.IsOrganization}}
|
||||
<div class="right menu">
|
||||
<a class="{{if .PageIsNews}}active {{end}}item gt-ml-auto" href="{{.ContextUser.DashboardLink}}{{if .Team}}/{{PathEscape .Team.Name}}{{end}}">
|
||||
<a class="{{if .PageIsNews}}active {{end}}item tw-ml-auto" href="{{.ContextUser.DashboardLink}}{{if .Team}}/{{PathEscape .Team.Name}}{{end}}">
|
||||
{{svg "octicon-rss"}} {{ctx.Locale.Tr "activities"}}
|
||||
</a>
|
||||
{{if not .UnitIssuesGlobalDisabled}}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env node
|
||||
import imageminZopfli from 'imagemin-zopfli';
|
||||
import imageminZopfli from 'imagemin-zopfli'; // eslint-disable-line i/no-unresolved
|
||||
import {loadSVGFromString, Canvas, Rect, util} from 'fabric/node'; // eslint-disable-line i/no-unresolved
|
||||
import {optimize} from 'svgo';
|
||||
import {loadSVGFromString, Canvas, Rect, util} from 'fabric/node';
|
||||
import {readFile, writeFile} from 'node:fs/promises';
|
||||
import {argv, exit} from 'node:process';
|
||||
|
|
@ -52,18 +52,6 @@ Gitea's private styles use `g-` prefix.
|
|||
.gt-font-semibold { font-weight: var(--font-weight-semibold) !important; }
|
||||
.gt-font-bold { font-weight: var(--font-weight-bold) !important; }
|
||||
|
||||
.gt-rounded { border-radius: var(--border-radius) !important; }
|
||||
.gt-rounded-top { border-radius: var(--border-radius) var(--border-radius) 0 0 !important; }
|
||||
.gt-rounded-bottom { border-radius: 0 0 var(--border-radius) var(--border-radius) !important; }
|
||||
.gt-rounded-left { border-radius: var(--border-radius) 0 0 var(--border-radius) !important; }
|
||||
.gt-rounded-right { border-radius: 0 var(--border-radius) var(--border-radius) 0 !important; }
|
||||
|
||||
.gt-border-secondary { border: 1px solid var(--color-secondary) !important; }
|
||||
.gt-border-secondary-top { border-top: 1px solid var(--color-secondary) !important; }
|
||||
.gt-border-secondary-bottom { border-bottom: 1px solid var(--color-secondary) !important; }
|
||||
.gt-border-secondary-left { border-left: 1px solid var(--color-secondary) !important; }
|
||||
.gt-border-secondary-right { border-right: 1px solid var(--color-secondary) !important; }
|
||||
|
||||
.interact-fg { color: inherit !important; }
|
||||
.interact-fg:hover { color: var(--color-primary) !important; }
|
||||
.interact-fg:active { color: var(--color-primary-active) !important; }
|
||||
|
@ -121,14 +109,6 @@ Gitea's private styles use `g-` prefix.
|
|||
.gt-my-4 { margin-top: 1rem !important; margin-bottom: 1rem !important; }
|
||||
.gt-my-5 { margin-top: 2rem !important; margin-bottom: 2rem !important; }
|
||||
|
||||
.gt-m-auto { margin: auto !important; }
|
||||
.gt-mx-auto { margin-left: auto !important; margin-right: auto !important; }
|
||||
.gt-my-auto { margin-top: auto !important; margin-bottom: auto !important; }
|
||||
.gt-mt-auto { margin-top: auto !important; }
|
||||
.gt-mr-auto { margin-right: auto !important; }
|
||||
.gt-mb-auto { margin-bottom: auto !important; }
|
||||
.gt-ml-auto { margin-left: auto !important; }
|
||||
|
||||
.gt-p-0 { padding: 0 !important; }
|
||||
.gt-p-1 { padding: .125rem !important; }
|
||||
.gt-p-2 { padding: .25rem !important; }
|
||||
|
@ -199,8 +179,6 @@ Gitea's private styles use `g-` prefix.
|
|||
.gt-gap-y-4 { row-gap: 1rem !important; }
|
||||
.gt-gap-y-5 { row-gap: 2rem !important; }
|
||||
|
||||
.gt-shrink-0 { flex-shrink: 0 !important; }
|
||||
|
||||
.gt-font-12 { font-size: 12px !important }
|
||||
.gt-font-13 { font-size: 13px !important }
|
||||
.gt-font-14 { font-size: 14px !important }
|
||||
|
|
|
@ -235,7 +235,7 @@ const sfc = {
|
|||
if (!this.reposTotalCount) {
|
||||
const totalCountSearchURL = `${this.subUrl}/repo/search?count_only=1&uid=${this.uid}&team_id=${this.teamId}&q=&page=1&mode=`;
|
||||
response = await GET(totalCountSearchURL);
|
||||
this.reposTotalCount = response.headers.get('X-Total-Count');
|
||||
this.reposTotalCount = response.headers.get('X-Total-Count') ?? '?';
|
||||
}
|
||||
|
||||
response = await GET(searchedURL);
|
||||
|
@ -409,7 +409,7 @@ export default sfc; // activate the IDE's Vue plugin
|
|||
</div>
|
||||
</overflow-menu>
|
||||
</div>
|
||||
<div v-if="repos.length" class="ui attached table segment gt-rounded-bottom">
|
||||
<div v-if="repos.length" class="ui attached table segment tw-rounded-b">
|
||||
<ul class="repo-owner-name-list">
|
||||
<li class="gt-df gt-ac gt-py-3" v-for="repo, index in repos" :class="{'active': index === activeIndex}" :key="repo.id">
|
||||
<a class="repo-list-link muted" :href="repo.link">
|
||||
|
@ -425,8 +425,9 @@ export default sfc; // activate the IDE's Vue plugin
|
|||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div v-if="showMoreReposLink" class="center gt-py-3 gt-border-secondary-top">
|
||||
<div class="ui borderless pagination menu narrow">
|
||||
<div v-if="showMoreReposLink" class="tw-text-center">
|
||||
<div class="divider gt-my-0"/>
|
||||
<div class="ui borderless pagination menu narrow gt-my-3">
|
||||
<a
|
||||
class="item navigation gt-py-2" :class="{'disabled': page === 1}"
|
||||
@click="changePage(1)" :title="textFirstPage"
|
||||
|
@ -466,7 +467,7 @@ export default sfc; // activate the IDE's Vue plugin
|
|||
<svg-icon name="octicon-plus"/>
|
||||
</a>
|
||||
</h4>
|
||||
<div v-if="organizations.length" class="ui attached table segment gt-rounded-bottom">
|
||||
<div v-if="organizations.length" class="ui attached table segment tw-rounded-b">
|
||||
<ul class="repo-owner-name-list">
|
||||
<li class="gt-df gt-ac gt-py-3" v-for="org in organizations" :key="org.name">
|
||||
<a class="repo-list-link muted" :href="subUrl + '/' + encodeURIComponent(org.name)">
|
||||
|
|
|
@ -204,7 +204,7 @@ export default {
|
|||
</button>
|
||||
<div class="menu left transition" id="diff-commit-selector-menu" :class="{visible: menuVisible}" v-show="menuVisible" v-cloak :aria-expanded="menuVisible ? 'true': 'false'">
|
||||
<div class="loading-indicator is-loading" v-if="isLoading"/>
|
||||
<div v-if="!isLoading" class="vertical item gt-df gt-fc gt-gap-2" id="diff-commit-list-show-all" role="menuitem" @keydown.enter="showAllChanges()" @click="showAllChanges()">
|
||||
<div v-if="!isLoading" class="vertical item" id="diff-commit-list-show-all" role="menuitem" @keydown.enter="showAllChanges()" @click="showAllChanges()">
|
||||
<div class="gt-ellipsis">
|
||||
{{ locale.show_all_commits }}
|
||||
</div>
|
||||
|
@ -215,7 +215,7 @@ export default {
|
|||
<!-- only show the show changes since last review if there is a review AND we are commits ahead of the last review -->
|
||||
<div
|
||||
v-if="lastReviewCommitSha != null" role="menuitem"
|
||||
class="vertical item gt-df gt-fc gt-gap-2 gt-border-secondary-top"
|
||||
class="vertical item"
|
||||
:class="{disabled: commitsSinceLastReview === 0}"
|
||||
@keydown.enter="changesSinceLastReviewClick()"
|
||||
@click="changesSinceLastReviewClick()"
|
||||
|
@ -227,10 +227,10 @@ export default {
|
|||
{{ commitsSinceLastReview }} commits
|
||||
</div>
|
||||
</div>
|
||||
<span v-if="!isLoading" class="info gt-border-secondary-top text light-2">{{ locale.select_commit_hold_shift_for_range }}</span>
|
||||
<span v-if="!isLoading" class="info text light-2">{{ locale.select_commit_hold_shift_for_range }}</span>
|
||||
<template v-for="commit in commits" :key="commit.id">
|
||||
<div
|
||||
class="vertical item gt-df gt-gap-2 gt-border-secondary-top" role="menuitem"
|
||||
class="vertical item" role="menuitem"
|
||||
:class="{selection: commit.selected, hovered: commit.hovered}"
|
||||
@keydown.enter.exact="commitClicked(commit.id)"
|
||||
@keydown.enter.shift.exact="commitClickedShift(commit)"
|
||||
|
@ -285,10 +285,14 @@ export default {
|
|||
width: 350px;
|
||||
}
|
||||
|
||||
#diff-commit-selector-menu .item {
|
||||
#diff-commit-selector-menu .item,
|
||||
#diff-commit-selector-menu .info {
|
||||
display: flex !important;
|
||||
flex-direction: row;
|
||||
line-height: 1.4;
|
||||
padding: 7px 14px !important;
|
||||
border-top: 1px solid var(--color-secondary) !important;
|
||||
gap: 0.25em;
|
||||
}
|
||||
|
||||
#diff-commit-selector-menu .item:focus {
|
||||
|
|
|
@ -148,7 +148,7 @@ export default {
|
|||
{{ isLoading ? locale.loadingTitle : errorText ? locale.loadingTitleFailed: `Code frequency over the history of ${repoLink.slice(1)}` }}
|
||||
</div>
|
||||
<div class="gt-df ui segment main-graph">
|
||||
<div v-if="isLoading || errorText !== ''" class="gt-tc gt-m-auto">
|
||||
<div v-if="isLoading || errorText !== ''" class="gt-tc tw-m-auto">
|
||||
<div v-if="isLoading">
|
||||
<SvgIcon name="octicon-sync" class="gt-mr-3 job-status-rotate"/>
|
||||
{{ locale.loadingInfo }}
|
||||
|
|
|
@ -353,7 +353,7 @@ export default {
|
|||
</div>
|
||||
</div>
|
||||
<div class="gt-df ui segment main-graph">
|
||||
<div v-if="isLoading || errorText !== ''" class="gt-tc gt-m-auto">
|
||||
<div v-if="isLoading || errorText !== ''" class="gt-tc tw-m-auto">
|
||||
<div v-if="isLoading">
|
||||
<SvgIcon name="octicon-sync" class="gt-mr-3 job-status-rotate"/>
|
||||
{{ locale.loadingInfo }}
|
||||
|
|
|
@ -125,7 +125,7 @@ export default {
|
|||
{{ isLoading ? locale.loadingTitle : errorText ? locale.loadingTitleFailed: "Number of commits in the past year" }}
|
||||
</div>
|
||||
<div class="gt-df ui segment main-graph">
|
||||
<div v-if="isLoading || errorText !== ''" class="gt-tc gt-m-auto">
|
||||
<div v-if="isLoading || errorText !== ''" class="gt-tc tw-m-auto">
|
||||
<div v-if="isLoading">
|
||||
<SvgIcon name="octicon-sync" class="gt-mr-3 job-status-rotate"/>
|
||||
{{ locale.loadingInfo }}
|
||||
|
|
|
@ -39,7 +39,7 @@ function addLink(parent, href, text, tooltip) {
|
|||
link.href = href;
|
||||
link.textContent = text;
|
||||
if (tooltip) {
|
||||
link.classList.add('gt-border-secondary', 'gt-rounded');
|
||||
link.classList.add('tw-border', 'tw-border-secondary', 'tw-rounded');
|
||||
link.setAttribute('data-tooltip-content', tooltip);
|
||||
}
|
||||
parent.append(link);
|
||||
|
|
Loading…
Reference in New Issue