mirror of
https://github.com/go-gitea/gitea
synced 2024-11-19 02:19:28 +01:00
4c0fce8f7b
Introduce a separate .eslintrc in the Vue components folder to selectively enable vue-eslint-parser there, so that the rest of the files can use eslint's core parser which can deal with hashbangs. The fact that the eslint-disable comments worked in HTML was a unintended side-effect of the files being parsed via vue-eslint-parser, so I had to disable the parsing of these files in .eslintrc.yaml to make it work, and finally decided to remove eslint-plugin-html as it causes more issues than it solves.
49 lines
2.2 KiB
Handlebars
49 lines
2.2 KiB
Handlebars
{{/*
|
|
==== 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 = {
|
|
appVer: '{{AppVer}}',
|
|
appUrl: '{{AppUrl}}',
|
|
appSubUrl: '{{AppSubUrl}}',
|
|
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>
|