2022-01-05 17:55:46 -08:00
|
|
|
import registerEvents from "utilities/registerEvents";
|
|
|
|
import { muteDocumentHandler } from "./mute";
|
|
|
|
import { profileHeaderChangeHandler, profilePictureChangeHandler } from "./crop";
|
|
|
|
import { themeDocumentHandler, themeSubmitHandler } from "./theme";
|
|
|
|
import { userSubmitHandler } from "./password";
|
2022-06-23 11:03:11 -07:00
|
|
|
import { unblockAnonymousHandler } from "./block";
|
2021-12-22 16:20:47 -08:00
|
|
|
|
|
|
|
export default (): void => {
|
2022-01-05 17:55:46 -08:00
|
|
|
muteDocumentHandler();
|
|
|
|
themeDocumentHandler();
|
2021-12-22 16:20:47 -08:00
|
|
|
|
2022-01-05 17:55:46 -08:00
|
|
|
registerEvents([
|
2022-06-26 06:01:27 -07:00
|
|
|
{ type: 'submit', target: document.querySelector('form.edit_theme, form.new_theme'), handler: themeSubmitHandler },
|
2022-01-05 17:55:46 -08:00
|
|
|
{ type: 'submit', target: document.querySelector('#edit_user'), handler: userSubmitHandler },
|
|
|
|
{ type: 'change', target: document.querySelector('#user_profile_picture[type=file]'), handler: profilePictureChangeHandler },
|
2022-06-23 11:03:11 -07:00
|
|
|
{ type: 'change', target: document.querySelector('#user_profile_header[type=file]'), handler: profileHeaderChangeHandler },
|
|
|
|
{ type: 'click', target: document.querySelectorAll('[data-action="anon-unblock"]'), handler: unblockAnonymousHandler }
|
2022-01-05 17:55:46 -08:00
|
|
|
]);
|
2021-12-22 16:20:47 -08:00
|
|
|
}
|