gitea

Development moved to Codeberg

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
  42. 42
  43. 43
  44. 44
  45. 45
  46. 46
  47. 47
  48. 48
{{/*
==== DO NOT EDIT ====
If you are customizing Gitea, please do not change this file.
If you introduce mistakes in it, Gitea JavaScript code wouldn't run correctly.
*/}}
<script>
	window.addEventListener('error', function(e) {window._globalHandlerErrors=window._globalHandlerErrors||[]; window._globalHandlerErrors.push(e);});
	window.config = {
		appUrl: '{{AppUrl}}',
		appSubUrl: '{{AppSubUrl}}',
		assetVersionEncoded: encodeURIComponent('{{AssetVersion}}'), // will be used in URL construction directly
		assetUrlPrefix: '{{AssetUrlPrefix}}',
		runModeIsProd: {{.RunModeIsProd}},
		customEmojis: {{CustomEmojis}},
		useServiceWorker: {{UseServiceWorker}},
		csrfToken: '{{.CsrfToken}}',
		pageData: {{.PageData}},
		requireTribute: {{.RequireTribute}},
		notificationSettings: {{NotificationSettings}}, {{/*a map provided by NewFuncMap in helper.go*/}}
		enableTimeTracking: {{EnableTimetracking}},
		{{if .RequireTribute}}
		tributeValues: Array.from(new Map([
			{{range .Participants}}
			['{{.Name}}', {key: '{{.Name}} {{.FullName}}', value: '{{.Name}}',
			name: '{{.Name}}', fullname: '{{.FullName}}', avatar: '{{.AvatarLink}}'}],
			{{end}}
			{{range .Assignees}}
			['{{.Name}}', {key: '{{.Name}} {{.FullName}}', value: '{{.Name}}',
			name: '{{.Name}}', fullname: '{{.FullName}}', avatar: '{{.AvatarLink}}'}],
			{{end}}
			{{range .MentionableTeams}}
				['{{$.MentionableTeamsOrg}}/{{.Name}}', {key: '{{$.MentionableTeamsOrg}}/{{.Name}}', value: '{{$.MentionableTeamsOrg}}/{{.Name}}',
				name: '{{$.MentionableTeamsOrg}}/{{.Name}}', avatar: '{{$.MentionableTeamsOrgAvatar}}'}],
			{{end}}
		]).values()),
		{{end}}
		mermaidMaxSourceCharacters: {{MermaidMaxSourceCharacters}},
		{{/* 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: {
			copy_success: '{{.locale.Tr "copy_success"}}',
			copy_error: '{{.locale.Tr "copy_error"}}',
			error_occurred: '{{.locale.Tr "error.occurred"}}',
			network_error: '{{.locale.Tr "error.network_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>