2026-10-12 16:32:48 +00:00
|
|
|
// Module ID: 7095
|
|
|
|
|
// Function ID: 7096
|
2026-09-18 19:45:33 +00:00
|
|
|
// Name: UserSettingsAccountStore
|
2026-10-12 16:32:48 +00:00
|
|
|
// Dependencies: [1390, 1085, 504, 584, 2]
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-10-12 16:32:48 +00:00
|
|
|
// Module 7095 (UserSettingsAccountStore)
|
2026-10-01 14:13:23 +00:00
|
|
|
import get_initializedDefault from "get initialized" /* 504 */;
|
2026-10-07 22:43:51 +00:00
|
|
|
import DispatcherDefault from "Dispatcher" /* 584 */;
|
|
|
|
|
import Constants from "Constants" /* 1085 */;
|
2026-10-12 16:32:48 +00:00
|
|
|
import UserStore from "UserStore" /* 1390 */;
|
2026-10-01 14:13:23 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
2026-09-18 19:45:33 +00:00
|
|
|
|
|
|
|
|
function handleFormClose() {
|
2026-10-01 14:13:23 +00:00
|
|
|
CLOSED = FormStates.CLOSED;
|
2026-09-18 19:45:33 +00:00
|
|
|
closure_3 = {};
|
|
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
const FormStates = Constants.FormStates;
|
|
|
|
|
let CLOSED = FormStates.CLOSED;
|
2026-09-18 19:45:33 +00:00
|
|
|
let closure_3 = {};
|
|
|
|
|
let obj = null;
|
2026-10-01 14:13:23 +00:00
|
|
|
const Store = get_initializedDefault.Store;
|
2026-09-18 19:45:33 +00:00
|
|
|
class UserSettingsAccountStore extends Store {
|
2026-10-01 14:13:23 +00:00
|
|
|
initialize() {
|
|
|
|
|
this.waitFor(UserStore);
|
|
|
|
|
}
|
|
|
|
|
getErrors() {
|
|
|
|
|
return closure_3;
|
|
|
|
|
}
|
|
|
|
|
getSubmitting() {
|
|
|
|
|
return CLOSED === FormStates.SUBMITTING;
|
|
|
|
|
}
|
|
|
|
|
getSettings() {
|
|
|
|
|
return obj;
|
|
|
|
|
}
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
|
|
|
|
const prototype = UserSettingsAccountStore.prototype;
|
|
|
|
|
UserSettingsAccountStore.displayName = "UserSettingsAccountStore";
|
|
|
|
|
obj = {
|
|
|
|
|
USER_SETTINGS_MODAL_OPEN: function handleFormOpen() {
|
|
|
|
|
const currentUser = UserStore.getCurrentUser();
|
|
|
|
|
if (null == currentUser) {
|
2026-10-01 14:13:23 +00:00
|
|
|
CLOSED = FormStates.CLOSED;
|
2026-09-18 19:45:33 +00:00
|
|
|
closure_3 = {};
|
|
|
|
|
} else {
|
2026-10-01 14:13:23 +00:00
|
|
|
CLOSED = FormStates.OPEN;
|
2026-09-18 19:45:33 +00:00
|
|
|
closure_3 = {};
|
2026-10-01 14:13:23 +00:00
|
|
|
const user = { userId: null, username: null, discriminator: null, email: null, avatar: null, password: "", newPassword: null, claimed: currentUser.isClaimed() };
|
2026-09-18 19:45:33 +00:00
|
|
|
({ id: obj2.userId, username: obj2.username, discriminator: obj2.discriminator, email: obj2.email, avatar: obj2.avatar } = currentUser);
|
|
|
|
|
const merged = Object.assign(user);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
USER_SETTINGS_MODAL_INIT: function handleFormInit() {
|
|
|
|
|
const currentUser = UserStore.getCurrentUser();
|
|
|
|
|
if (null == currentUser) {
|
2026-10-01 14:13:23 +00:00
|
|
|
CLOSED = FormStates.CLOSED;
|
2026-09-18 19:45:33 +00:00
|
|
|
closure_3 = {};
|
|
|
|
|
} else {
|
2026-10-01 14:13:23 +00:00
|
|
|
CLOSED = FormStates.OPEN;
|
2026-09-18 19:45:33 +00:00
|
|
|
closure_3 = {};
|
2026-10-01 14:13:23 +00:00
|
|
|
const user = { userId: null, username: null, discriminator: null, email: null, avatar: null, password: "", newPassword: null, claimed: currentUser.isClaimed() };
|
2026-09-18 19:45:33 +00:00
|
|
|
({ id: obj2.userId, username: obj2.username, discriminator: obj2.discriminator, email: obj2.email, avatar: obj2.avatar } = currentUser);
|
|
|
|
|
const merged = Object.assign(user);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
USER_SETTINGS_MODAL_CLOSE: handleFormClose,
|
|
|
|
|
LOGOUT: handleFormClose,
|
|
|
|
|
USER_SETTINGS_MODAL_SUBMIT: function handleFormSubmit() {
|
2026-10-01 14:13:23 +00:00
|
|
|
CLOSED = FormStates.SUBMITTING;
|
2026-09-18 19:45:33 +00:00
|
|
|
},
|
|
|
|
|
USER_SETTINGS_MODAL_SUBMIT_FAILURE: function handleFormSubmitFailure(errors) {
|
2026-10-01 14:13:23 +00:00
|
|
|
if (CLOSED !== FormStates.SUBMITTING) {
|
2026-09-18 19:45:33 +00:00
|
|
|
return false;
|
|
|
|
|
} else {
|
2026-10-01 14:13:23 +00:00
|
|
|
CLOSED = tmp.OPEN;
|
2026-09-18 19:45:33 +00:00
|
|
|
errors = errors.errors;
|
|
|
|
|
if (errors == null) {
|
|
|
|
|
errors = {};
|
|
|
|
|
}
|
|
|
|
|
closure_3 = errors;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
USER_SETTINGS_MODAL_UPDATE_ACCOUNT: function handleUpdateAccount(settings) {
|
2026-10-01 14:13:23 +00:00
|
|
|
settings = settings.settings;
|
2026-09-18 19:45:33 +00:00
|
|
|
if (null == obj) {
|
|
|
|
|
obj = {};
|
|
|
|
|
}
|
|
|
|
|
obj = {};
|
|
|
|
|
const merged = Object.assign(obj);
|
2026-10-01 14:13:23 +00:00
|
|
|
const merged1 = Object.assign(settings);
|
2026-09-18 19:45:33 +00:00
|
|
|
},
|
|
|
|
|
USER_SETTINGS_MODAL_SUBMIT_COMPLETE: function handleFormSubmitComplete() {
|
2026-10-01 14:13:23 +00:00
|
|
|
CLOSED = FormStates.OPEN;
|
2026-09-18 19:45:33 +00:00
|
|
|
closure_3 = {};
|
|
|
|
|
},
|
|
|
|
|
USER_SETTINGS_MODAL_RESET: function handleFormReset() {
|
|
|
|
|
const currentUser = UserStore.getCurrentUser();
|
2026-10-01 14:13:23 +00:00
|
|
|
CLOSED = FormStates.OPEN;
|
2026-09-18 19:45:33 +00:00
|
|
|
closure_3 = {};
|
|
|
|
|
if (null != currentUser) {
|
2026-10-01 14:13:23 +00:00
|
|
|
const user = { userId: null, username: null, discriminator: null, email: null, avatar: null, password: "", newPassword: null, claimed: currentUser.isClaimed() };
|
2026-09-18 19:45:33 +00:00
|
|
|
({ id: obj2.userId, username: obj2.username, discriminator: obj2.discriminator, email: obj2.email, avatar: obj2.avatar } = currentUser);
|
|
|
|
|
const merged = Object.assign(user);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
const userSettingsAccountStore = new UserSettingsAccountStore(DispatcherDefault, obj);
|
|
|
|
|
const result = size.fileFinishedImporting("stores/UserSettingsAccountStore.tsx");
|
|
|
|
|
|
|
|
|
|
export default userSettingsAccountStore;
|