Compare commits

..

No commits in common. "c279f8aab7e4a522bdaf9662b6e077e2da057783" and "aabcf2d7ad247fb0bf8131ebdf8400fcf5292828" have entirely different histories.

4 changed files with 20 additions and 23 deletions

33
.github/labeler.yml vendored
View File

@ -1,36 +1,35 @@
modifies/docs: kind/docs:
- "**/*.md" - "**/*.md"
- "docs/**" - "docs/**"
modifies/frontend: kind/ui:
- "web_src/**/*" - "web_src/**/*"
modifies/templates:
- all: ["templates/**", "!templates/swagger/v1_json.tmpl"] - all: ["templates/**", "!templates/swagger/v1_json.tmpl"]
modifies/api: kind/api:
- "routers/api/**"
- "templates/swagger/v1_json.tmpl" - "templates/swagger/v1_json.tmpl"
- "routers/api/**"
modifies/cli: kind/build:
- "cmd/**"
modifies/translation:
- "options/locale/*.ini"
modifies/migrations:
- "models/migrations/**/*"
modifies/internal:
- "Makefile" - "Makefile"
- "Dockerfile" - "Dockerfile"
- "Dockerfile.rootless" - "Dockerfile.rootless"
- "docker/**" - "docker/**"
- "webpack.config.js" - "webpack.config.js"
theme/package-registry:
- "modules/packages/**"
- "services/packages/**"
- "routers/api/packages/**"
- "routers/web/shared/packages/**"
kind/cli:
- "cmd/**"
kind/lint:
- ".eslintrc.yaml" - ".eslintrc.yaml"
- ".golangci.yml" - ".golangci.yml"
- ".markdownlint.yaml" - ".markdownlint.yaml"
- ".spectral.yaml" - ".spectral.yaml"
- ".stylelintrc.yaml" - ".stylelintrc.yaml"
- ".yamllint.yaml" - ".yamllint.yaml"
- ".github/**"

View File

@ -42,7 +42,7 @@ func handleCreateError(owner *user_model.User, err error) error {
} }
func runMigrateTask(ctx context.Context, t *admin_model.Task) (err error) { func runMigrateTask(ctx context.Context, t *admin_model.Task) (err error) {
defer func(ctx context.Context) { defer func() {
if e := recover(); e != nil { if e := recover(); e != nil {
err = fmt.Errorf("PANIC whilst trying to do migrate task: %v", e) err = fmt.Errorf("PANIC whilst trying to do migrate task: %v", e)
log.Critical("PANIC during runMigrateTask[%d] by DoerID[%d] to RepoID[%d] for OwnerID[%d]: %v\nStacktrace: %v", t.ID, t.DoerID, t.RepoID, t.OwnerID, e, log.Stack(2)) log.Critical("PANIC during runMigrateTask[%d] by DoerID[%d] to RepoID[%d] for OwnerID[%d]: %v\nStacktrace: %v", t.ID, t.DoerID, t.RepoID, t.OwnerID, e, log.Stack(2))
@ -69,7 +69,7 @@ func runMigrateTask(ctx context.Context, t *admin_model.Task) (err error) {
} }
// then, do not delete the repository, otherwise the users won't be able to see the last error // then, do not delete the repository, otherwise the users won't be able to see the last error
}(graceful.GetManager().ShutdownContext()) // even if the parent ctx is canceled, this defer-function still needs to update the task record in database }()
if err = t.LoadRepo(ctx); err != nil { if err = t.LoadRepo(ctx); err != nil {
return err return err

View File

@ -38,7 +38,7 @@
</div> </div>
<a class="ui segment language-stats show-panel toggle" data-panel=".repository-summary > .sub-menu"> <a class="ui segment language-stats show-panel toggle" data-panel=".repository-summary > .sub-menu">
{{range .LanguageStats}} {{range .LanguageStats}}
<div class="bar" style="width: {{.Percentage}}%; background-color: {{.Color}}" data-tooltip-placement="top" data-tooltip-content={{.Language}} data-tooltip-follow-cursor="horizontal"></div> <div class="bar" style="width: {{.Percentage}}%; background-color: {{.Color}}" data-tooltip-placement="top" data-tooltip-content={{.Language}}></div>
{{end}} {{end}}
</a> </a>
{{end}} {{end}}

View File

@ -1,4 +1,4 @@
import tippy, {followCursor} from 'tippy.js'; import tippy from 'tippy.js';
const visibleInstances = new Set(); const visibleInstances = new Set();
@ -35,7 +35,6 @@ export function createTippy(target, opts = {}) {
arrow: `<svg width="16" height="7"><path d="m0 7 8-7 8 7Z" class="tippy-svg-arrow-outer"/><path d="m0 8 8-7 8 7Z" class="tippy-svg-arrow-inner"/></svg>`, arrow: `<svg width="16" height="7"><path d="m0 7 8-7 8 7Z" class="tippy-svg-arrow-outer"/><path d="m0 8 8-7 8 7Z" class="tippy-svg-arrow-inner"/></svg>`,
role: 'menu', // HTML role attribute, only tooltips should use "tooltip" role: 'menu', // HTML role attribute, only tooltips should use "tooltip"
theme: other.role || 'menu', // CSS theme, we support either "tooltip" or "menu" theme: other.role || 'menu', // CSS theme, we support either "tooltip" or "menu"
plugins: [followCursor],
...other, ...other,
}); });
@ -79,7 +78,6 @@ function attachTooltip(target, content = null) {
theme: 'tooltip', theme: 'tooltip',
hideOnClick, hideOnClick,
placement: target.getAttribute('data-tooltip-placement') || 'top-start', placement: target.getAttribute('data-tooltip-placement') || 'top-start',
followCursor: target.getAttribute('data-tooltip-follow-cursor') || false,
...(target.getAttribute('data-tooltip-interactive') === 'true' ? {interactive: true, aria: {content: 'describedby', expanded: false}} : {}), ...(target.getAttribute('data-tooltip-interactive') === 'true' ? {interactive: true, aria: {content: 'describedby', expanded: false}} : {}),
}; };