mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-23 05:42:33 +09:00
- Adds a copy button to each action step header that copies the step's rendered log output to clipboard. - Extract a shared `copyToClipboard(target, content)` helper in `clipboard.ts` that adds SVG success/failure feedback. - `is-loading` height for the new helper is sourced from `--loading-size`. - Change actions log timestamp format to include seconds. The indented-markdown code-block fix has moved to #37748. <img width="244" height="165" alt="copystep" src="https://github.com/user-attachments/assets/ce286b51-f77b-4d82-b161-ca0aa7ec4fdc" /> <img width="187" height="150" alt="copybt" src="https://github.com/user-attachments/assets/5366b290-b776-496d-8dd4-58d5fa60be92" /> Fixes: https://github.com/go-gitea/gitea/issues/26116 --- This PR was written with the help of Claude Opus 4.7 --------- Signed-off-by: silverwind <me@silverwind.io> Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Nicolas <bircni@icloud.com>
35 lines
1.9 KiB
Handlebars
35 lines
1.9 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 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 "js/eventsource.sharedworker.js"}}',
|
|
{{/* 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 "js/iife.js"}}
|