mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-12 19:49:59 +05:00
Merge cd31ee75d3 into 04df22a4f8
This commit is contained in:
commit
7b9b81e9d9
@ -157,6 +157,8 @@ define(req, function(AppConfig, Default, Language) {
|
||||
}
|
||||
};
|
||||
|
||||
Messages.admin_logoType_error = 'The logo image file type is not allowed'; // XXX
|
||||
|
||||
return Messages;
|
||||
|
||||
});
|
||||
|
||||
@ -1064,9 +1064,13 @@ define([
|
||||
|
||||
Util.onClickEnter($button, function () {
|
||||
let files = input.files;
|
||||
let fileTypes = ['image/png', 'image/svg+xml', 'image/jpeg'];
|
||||
if (files.length !== 1) {
|
||||
UI.warn(Messages.error);
|
||||
return;
|
||||
} else if (!fileTypes.includes(files[0].type)) {
|
||||
UI.warn(Messages.admin_logoType_error);
|
||||
return;
|
||||
}
|
||||
spinner.spin();
|
||||
$button.attr('disabled', 'disabled');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user