Files
forge/templates/base/head_script.tmpl
zeekayandHanzo Dev 3ea73962ff rebrand: complete white-label leak sweep of Hanzo-served surfaces
Finishes the residual pass: the bulk of served leaks remained (28 locale
files, most templates, all raster/source assets, Chinese READMEs). Imports,
identifiers, and wire contracts are left intact.

- locale: 28 files, all "Gitea" -> "Hanzo Git"; docs/blog/about.gitea.* +
  gitea.com/.io + go-gitea help URLs -> docs.hanzo.ai / git.hanzo.ai /
  github.com/hanzoai/git (keys with lowercase "gitea" preserved)
- templates: footer, swagger UI title + generated OpenAPI specs (stale
  gitea.dev x-go-package -> github.com/hanzoai/git), webhook usernames,
  OAuth-source labels, package/help doc links, example org/team identifiers
- Go served defaults: RSS feed author/description, git commit user.name +
  fallback email, WWW-Authenticate realms (OAuth2/packages/container),
  500/error pages, MS Teams card, built-in OAuth provider label, CLI --help,
  SSH + push-rejection messages, startup/index/redis/doctor logs, test-mail
  subject + X-Mailer
- config: app.example.ini APP_NAME default
- assets: source assets/*.svg, gitea.svg, gitea-gitea sprite, and all PNGs
  (logo/favicon/apple-touch/avatar_default) regenerated as the committed
  black-tile Hanzo mark; --color-logo #609926 -> monochrome; favicon-status
  test realigned to the new mark (viewBox 64)
- README.zh-tw + README.zh-cn rewritten as Hanzo Git
- render field CommitParticipant.GiteaUser -> User

Preserved (imports / identifiers / external contracts): code.gitea.io,
module github.com/hanzoai/git, gitea.dev/sdk dep, X-Gitea-* webhook + email
headers, WWW-Authenticate realm="Gitea" in git-HTTP (Git Credential Manager
OAuth2 detection), GitServiceType "Gitea" migration-source name, theme id
gitea-auto, .gitea-* classes / svg symbol ids, Go/JS identifiers, "The Gitea
Authors" copyright headers, outbound User-Agent headers.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-22 17:44:02 -07:00

35 lines
1.9 KiB
Handlebars

{{/* ==== DO NOT EDIT ====
If you are customizing Hanzo Git, please do not change this file.
If you introduce mistakes in it, Hanzo Git JavaScript code wouldn't run correctly.
*/}}
<script nonce="{{ctx.CspScriptNonce}}">
{{/* before our JS code gets loaded, use arrays to store errors, then the arrays will be switched to our error handler later */}}
window.addEventListener('error', function(e) {window._globalHandlerErrors=window._globalHandlerErrors||[]; window._globalHandlerErrors.push(e);});
window.addEventListener('unhandledrejection', function(e) {window._globalHandlerErrors=window._globalHandlerErrors||[]; window._globalHandlerErrors.push(e);});
window.config = {
appUrl: '{{ctx.AppFullLink "/"}}',
appSubUrl: '{{AppSubUrl}}',
assetUrlPrefix: '{{AssetUrlPrefix}}',
runModeIsProd: {{.RunModeIsProd}},
customEmojis: {{CustomEmojis}},
pageData: {{.PageData}},
notificationSettings: {{NotificationSettings}}, {{/*a map provided by NewFuncMap in helper.go*/}}
enableTimeTracking: {{EnableTimetracking}},
mermaidMaxSourceCharacters: {{MermaidMaxSourceCharacters}},
sharedWorkerUri: '{{AssetURI "web_src/js/eventsource.sharedworker.ts"}}',
{{/* this global i18n object should only contain general texts. for specialized texts, it should be provided inside the related modules by: (1) API response (2) HTML data-attribute (3) PageData */}}
i18n: {
error_occurred: {{ctx.Locale.Tr "error.occurred"}},
remove_label_str: {{ctx.Locale.Tr "remove_label_str"}},
modal_confirm: {{ctx.Locale.Tr "modal.confirm"}},
modal_cancel: {{ctx.Locale.Tr "modal.cancel"}},
more_items: {{ctx.Locale.Tr "more_items"}},
copy_success: {{ctx.Locale.Tr "copy_success"}},
copy_error: {{ctx.Locale.Tr "copy_error"}},
},
};
{{/* in case some pages don't render the pageData, we make sure it is an object to prevent null access */}}
window.config.pageData = window.config.pageData || {};
</script>
{{ctx.ScriptImport "web_src/js/iife.ts"}}