Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Merge index.js#34963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
wxiaoguang merged 3 commits intogo-gitea:mainfromwxiaoguang:fix-js-load
Jul 6, 2025
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
fine tune
  • Loading branch information
@wxiaoguang
wxiaoguang committedJul 5, 2025
commitc33b45960d11afdb19a4b7df8d850c40dd5bcf52
4 changes: 1 addition & 3 deletionsweb_src/fomantic/build/fomantic.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
// Hard-forked from Fomantic UI 2.8.7, patches are commented with "GITEA-PATCH"
import jquery from 'jquery';
import './components/api.js';
import './components/dropdown.js';
import './components/modal.js';
import './components/search.js';

window.$ = window.jQuery = jquery;
// Hard-forked from Fomantic UI 2.8.7, patches are commented with "GITEA-PATCH"
4 changes: 4 additions & 0 deletionsweb_src/js/bootstrap.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,6 +20,10 @@ function shouldIgnoreError(err: Error) {

export function showGlobalErrorMessage(msg: string, msgType: Intent = 'error') {
const msgContainer = document.querySelector('.page-content') ?? document.body;
if (!msgContainer) {
alert(`${msgType}: ${msg}`);
return;
}
const msgCompact = msg.replace(/\W/g, '').trim(); // compact the message to a data attribute to avoid too many duplicated messages
let msgDiv = msgContainer.querySelector<HTMLDivElement>(`.js-global-error[data-global-error-msg-compact="${msgCompact}"]`);
if (!msgDiv) {
Expand Down
2 changes: 2 additions & 0 deletionsweb_src/js/globals.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
import jquery from 'jquery';
window.$ = window.jQuery = jquery; // only for Fomantic UI
1 change: 1 addition & 0 deletionsweb_src/js/index-domready.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
import './globals.ts';
import '../fomantic/build/fomantic.js';
import '../../node_modules/easymde/dist/easymde.min.css'; // TODO: lazy load in "switchToEasyMDE"

Expand Down
2 changes: 1 addition & 1 deletionweb_src/js/index.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,7 +5,7 @@ import {onDomReady} from './utils/dom.ts';

// TODO: There is a bug in htmx, it incorrectly checks "readyState === 'complete'" when the DOM tree is ready and won't trigger DOMContentLoaded
// Then importing the htmx in our onDomReady will make htmx skip its initialization.
// If the bug would be fixed, then we canmove thisimportto "onDomReady"
// If the bug would be fixed (https://github.com/bigskysoftware/htmx/pull/3365), then we canonlyimporthtmx in "onDomReady"
import 'htmx.org';

onDomReady(async () => {
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp