File tree Expand file tree Collapse file tree 5 files changed +9
-4
lines changed
Expand file tree Collapse file tree 5 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 1- // Hard-forked from Fomantic UI 2.8.7, patches are commented with "GITEA-PATCH"
2- import jquery from 'jquery' ;
31import './components/api.js' ;
42import './components/dropdown.js' ;
53import './components/modal.js' ;
64import './components/search.js' ;
75
8- window . $ = window . jQuery = jquery ;
6+ // Hard-forked from Fomantic UI 2.8.7, patches are commented with "GITEA-PATCH"
Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ function shouldIgnoreError(err: Error) {
2020
2121export function showGlobalErrorMessage ( msg : string , msgType : Intent = 'error' ) {
2222 const msgContainer = document . querySelector ( '.page-content' ) ?? document . body ;
23+ if ( ! msgContainer ) {
24+ alert ( `${ msgType } : ${ msg } ` ) ;
25+ return ;
26+ }
2327 const msgCompact = msg . replace ( / \W / g, '' ) . trim ( ) ; // compact the message to a data attribute to avoid too many duplicated messages
2428 let msgDiv = msgContainer . querySelector < HTMLDivElement > ( `.js-global-error[data-global-error-msg-compact="${ msgCompact } "]` ) ;
2529 if ( ! msgDiv ) {
Original file line number Diff line number Diff line change 1+ import jquery from 'jquery' ;
2+ window . $ = window . jQuery = jquery ; // only for Fomantic UI
Original file line number Diff line number Diff line change 1+ import './globals.ts' ;
12import '../fomantic/build/fomantic.js' ;
23import '../../node_modules/easymde/dist/easymde.min.css' ; // TODO: lazy load in "switchToEasyMDE"
34
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import {onDomReady} from './utils/dom.ts';
55
66// TODO: There is a bug in htmx, it incorrectly checks "readyState === 'complete'" when the DOM tree is ready and won't trigger DOMContentLoaded
77// Then importing the htmx in our onDomReady will make htmx skip its initialization.
8- // If the bug would be fixed, then we can move this import to "onDomReady"
8+ // If the bug would be fixed (https://github.com/bigskysoftware/htmx/pull/3365) , then we can only import htmx in "onDomReady"
99import 'htmx.org' ;
1010
1111onDomReady ( async ( ) => {
You can’t perform that action at this time.
0 commit comments