OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)
This commit is contained in:
40
app/Domain/Users/Js/usersRepository.js
Normal file
40
app/Domain/Users/Js/usersRepository.js
Normal file
@@ -0,0 +1,40 @@
|
||||
leantime.usersRepository = (function () {
|
||||
|
||||
//Functions
|
||||
|
||||
var saveUserPhoto = function (photo) {
|
||||
var formData = new FormData();
|
||||
formData.append('file', photo);
|
||||
jQuery.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
url: leantime.appUrl + '/users/profileImage',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function (resp) {
|
||||
|
||||
jQuery('#save-picture').removeClass('running');
|
||||
|
||||
location.reload();
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
var updateUserViewSettings = function (module, value) {
|
||||
|
||||
leantime.rpc('Users.Users.updateUserSettings', { category: 'views', setting: module, value: value })
|
||||
.catch(function (e) { console.error('Could not save view setting', e); });
|
||||
|
||||
};
|
||||
|
||||
// Make public what you want to have public, everything else is private
|
||||
return {
|
||||
saveUserPhoto: saveUserPhoto,
|
||||
updateUserViewSettings:updateUserViewSettings
|
||||
};
|
||||
})();
|
||||
Reference in New Issue
Block a user