Compare commits
2 Commits
feat/fix_b
...
51e4189dc9
| Author | SHA1 | Date | |
|---|---|---|---|
| 51e4189dc9 | |||
| 8115eb4b6f |
@@ -1,4 +1,3 @@
|
||||
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin config")}}
|
||||
<!-- 自定义logo upload -->
|
||||
<h4 class="ui top attached header">
|
||||
{{ctx.Locale.Tr "admin.config.app_logo_config"}}
|
||||
|
||||
@@ -11,6 +11,14 @@ import {initFomanticTab} from './fomantic/tab.ts';
|
||||
export const fomanticMobileScreen = window.matchMedia('only screen and (max-width: 767.98px)');
|
||||
|
||||
export function initGiteaFomantic() {
|
||||
// Guard against race conditions where fomantic.js hasn't been fully initialized yet.
|
||||
// This can happen on pages like Settings when document.readyState is already 'interactive'
|
||||
// or 'complete' when index.js executes, causing onDomReady to fire immediately.
|
||||
if (!$.fn.dropdown || !$.fn.dropdown.settings) {
|
||||
console.warn('Fomantic UI dropdown not initialized yet, skipping initGiteaFomantic');
|
||||
return;
|
||||
}
|
||||
|
||||
// our extensions
|
||||
$.fn.fomanticExt = {};
|
||||
// By default, use "exact match" for full text search
|
||||
|
||||
Reference in New Issue
Block a user