aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/features/common-page.ts
diff options
context:
space:
mode:
Diffstat (limited to 'web_src/js/features/common-page.ts')
-rw-r--r--web_src/js/features/common-page.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/web_src/js/features/common-page.ts b/web_src/js/features/common-page.ts
index 6aabfc5d4f..5a02ee7a6a 100644
--- a/web_src/js/features/common-page.ts
+++ b/web_src/js/features/common-page.ts
@@ -3,6 +3,7 @@ import {showGlobalErrorMessage} from '../bootstrap.ts';
import {fomanticQuery} from '../modules/fomantic/base.ts';
import {queryElems} from '../utils/dom.ts';
import {registerGlobalInitFunc, registerGlobalSelectorFunc} from '../modules/observer.ts';
+import {initAvatarUploaderWithCropper} from './comp/Cropper.ts';
const {appUrl} = window.config;
@@ -80,6 +81,10 @@ export function initGlobalTabularMenu() {
fomanticQuery('.ui.menu.tabular:not(.custom) .item').tab();
}
+export function initGlobalAvatarUploader() {
+ registerGlobalInitFunc('initAvatarUploader', initAvatarUploaderWithCropper);
+}
+
// for performance considerations, it only uses performant syntax
function attachInputDirAuto(el: Partial<HTMLInputElement | HTMLTextAreaElement>) {
if (el.type !== 'hidden' &&