decord/source/stores/UserSettingsAccountStore.tsx

114 lines
3.9 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 6126
// Function ID: 6127
2026-07-29 08:29:29 +00:00
// Name: handleFormClose
2026-08-11 06:20:06 +00:00
// Dependencies: [1922, 676, 589, 709, 2]
2026-07-23 10:11:24 +00:00
2026-08-25 06:04:03 +00:00
// Module 6126 (handleFormClose)
2026-08-24 06:08:38 +00:00
import initializeDefault from "initialize" /* 589 */;
import dispatcherDefault from "dispatcher" /* 709 */;
import closure_0 from "mergeGuildAvatar" /* 1922 */;
import { FormStates } from "ME" /* 676 */;
2026-07-20 16:05:17 +00:00
function handleFormClose() {
2026-08-24 06:08:38 +00:00
CLOSED = FormStates.CLOSED;
c4 = null;
closure_3 = {};
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
let CLOSED = FormStates.CLOSED;
2026-07-29 08:29:29 +00:00
let closure_3 = {};
let c4 = null;
2026-08-24 06:08:38 +00:00
const Store = initializeDefault.Store;
2026-07-29 08:29:29 +00:00
class UserSettingsAccountStore extends Store {
}
const prototype = UserSettingsAccountStore.prototype;
prototype["initialize"] = function initialize() {
2026-08-24 06:08:38 +00:00
this.waitFor(closure_0);
2026-07-29 08:29:29 +00:00
};
prototype["getErrors"] = function getErrors() {
return closure_3;
};
prototype["getSubmitting"] = function getSubmitting() {
return CLOSED === FormStates.SUBMITTING;
};
prototype["getSettings"] = function getSettings() {
return c4;
};
UserSettingsAccountStore.displayName = "UserSettingsAccountStore";
2026-08-24 06:08:38 +00:00
const userSettingsAccountStore = new UserSettingsAccountStore(dispatcherDefault, {
2026-07-29 08:29:29 +00:00
USER_SETTINGS_MODAL_OPEN: function handleFormOpen() {
const currentUser = authStore.getCurrentUser();
if (null == currentUser) {
let OPEN = FormStates.CLOSED;
let obj = null;
2026-08-24 06:08:38 +00:00
closure_3 = {};
2026-07-29 08:29:29 +00:00
} else {
OPEN = FormStates.OPEN;
closure_3 = {};
obj = { userId: null, username: null, discriminator: null, email: null, avatar: null, password: "", newPassword: null, claimed: null };
({ id: obj2[0], username: obj2[1], discriminator: obj2[2], email: obj2[3], avatar: obj2[4] } = currentUser);
obj[7] = currentUser.isClaimed();
obj = {};
const merged = Object.assign(obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
},
USER_SETTINGS_MODAL_INIT: function handleFormInit() {
const currentUser = authStore.getCurrentUser();
if (null == currentUser) {
let OPEN = FormStates.CLOSED;
let obj = null;
2026-08-24 06:08:38 +00:00
closure_3 = {};
2026-07-29 08:29:29 +00:00
} else {
OPEN = FormStates.OPEN;
closure_3 = {};
obj = { userId: null, username: null, discriminator: null, email: null, avatar: null, password: "", newPassword: null, claimed: null };
({ id: obj2[0], username: obj2[1], discriminator: obj2[2], email: obj2[3], avatar: obj2[4] } = currentUser);
obj[7] = currentUser.isClaimed();
obj = {};
const merged = Object.assign(obj);
2026-07-20 16:05:17 +00:00
}
},
USER_SETTINGS_MODAL_CLOSE: handleFormClose,
LOGOUT: handleFormClose,
USER_SETTINGS_MODAL_SUBMIT: function handleFormSubmit() {
2026-07-23 10:11:24 +00:00
const SUBMITTING = FormStates.SUBMITTING;
2026-07-20 16:05:17 +00:00
},
USER_SETTINGS_MODAL_SUBMIT_FAILURE: function handleFormSubmitFailure(errors) {
2026-07-23 10:11:24 +00:00
if (OPEN !== FormStates.SUBMITTING) {
2026-07-20 16:05:17 +00:00
return false;
} else {
2026-07-29 08:29:29 +00:00
OPEN = tmp.OPEN;
2026-07-20 16:05:17 +00:00
errors = errors.errors;
2026-07-29 08:29:29 +00:00
if (errors == null) {
2026-07-20 16:05:17 +00:00
errors = {};
}
}
},
USER_SETTINGS_MODAL_UPDATE_ACCOUNT: function handleUpdateAccount(settings) {
2026-07-23 10:11:24 +00:00
if (null == obj) {
obj = {};
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
obj = {};
const merged = Object.assign(obj);
2026-07-20 16:05:17 +00:00
const merged1 = Object.assign(settings.settings);
},
2026-07-29 08:29:29 +00:00
USER_SETTINGS_MODAL_SUBMIT_COMPLETE: function handleFormSubmitComplete() {
const OPEN = FormStates.OPEN;
2026-08-24 06:08:38 +00:00
closure_3 = {};
2026-07-29 08:29:29 +00:00
},
2026-07-20 16:05:17 +00:00
USER_SETTINGS_MODAL_RESET: function handleFormReset() {
const currentUser = authStore.getCurrentUser();
2026-07-29 08:29:29 +00:00
const OPEN = FormStates.OPEN;
2026-08-24 06:08:38 +00:00
closure_3 = {};
2026-07-20 16:05:17 +00:00
if (null != currentUser) {
2026-07-29 08:29:29 +00:00
let obj = { userId: null, username: null, discriminator: null, email: null, avatar: null, password: "", newPassword: null, claimed: null };
({ id: obj2[0], username: obj2[1], discriminator: obj2[2], email: obj2[3], avatar: obj2[4] } = currentUser);
obj[7] = currentUser.isClaimed();
2026-07-20 16:05:17 +00:00
obj = {};
const merged = Object.assign(obj);
}
}
});
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("stores/UserSettingsAccountStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default userSettingsAccountStore;