Add cropping support when modifying the user/org/repo avatar (#33498)
Fixed #33321 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
parent
943cc4f989
commit
40426addfa
11 changed files with 35 additions and 28 deletions
|
@ -1,7 +1,8 @@
|
|||
import $ from 'jquery';
|
||||
import {checkAppUrl} from '../common-page.ts';
|
||||
import {hideElem, showElem, toggleElem} from '../../utils/dom.ts';
|
||||
import {hideElem, queryElems, showElem, toggleElem} from '../../utils/dom.ts';
|
||||
import {POST} from '../../modules/fetch.ts';
|
||||
import {initAvatarUploaderWithCropper} from '../comp/Cropper.ts';
|
||||
|
||||
const {appSubUrl} = window.config;
|
||||
|
||||
|
@ -258,4 +259,6 @@ export function initAdminCommon(): void {
|
|||
window.location.href = this.getAttribute('data-redirect');
|
||||
});
|
||||
}
|
||||
|
||||
queryElems(document, '.avatar-file-with-cropper', initAvatarUploaderWithCropper);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue