From 4c14ce86ef3f5a894951edcc315f5aa963187667 Mon Sep 17 00:00:00 2001 From: jullia <152446623+jullia02@users.noreply.github.com> Date: Tue, 24 Sep 2024 22:43:18 +0300 Subject: [PATCH] Added project 1 refactored code - Jullia. (#21) * Added refactored code and fixed errors for lint. --------- Co-authored-by: jullia andrei --- dump.rdb | Bin 0 -> 53518 bytes public/src/client/account/settings.js | 51 ++++++++++++++++---------- 2 files changed, 32 insertions(+), 19 deletions(-) create mode 100644 dump.rdb diff --git a/dump.rdb b/dump.rdb new file mode 100644 index 0000000000000000000000000000000000000000..a26bcc66885c33e30761144e6d49228b7e261d67 GIT binary patch literal 53518 zcmdUY31A!7dFC5jBmo`(?@PiEBt=ppNP?#b%g&J0Y3s5i+p%Q{7yttj5(pp|KoT9N zfvx*KEFX%Uls@7dZPGN^I!&4bHrs8|?$OPrX*Zj0MozYMn>2M2cGG0H)&B3j8DKC1 zAj*oQGzu&mGjH(bz5oB;e|`VIW8K?BM+zAKan z3ucKugf2*E$i6PZ`@%xNhM3a=1Z^_Fs_VFCl(4UxW*dCU`#1un8ht^Pr#4C9Xe*Q>6>3Pdo4yi zvsks`ODT)dz$|`9_`25uKWiPh*>_#w{(fS>KA<9mPh&#REL1BYgzHyo6{Q82&N&RU z-~w8Jj~70Y!Ieu3s|hVUkxL8hzlCXG^j2x%57}q3v{0I%1@@p& z-9|cz`A16~M`CX_Q3w1knH%bJn7f0O zDe@#YY?OJs?0&qTtvB4yTFTq{T;67%L%`dH<5+mHbJ-m&&fPZQfDi!&#v+HTn#*p7 z_c0*gl#0KT7XWxgwHT|iOj1NtQc1SJNfT}MHWhz-JddDkPzy>ra0O+JUMePgfi>jM zd@nkcDlt*-pIaN-N;X}r?VTWl5hXxI{9X6;v;-`E`g8w7(XrG zQw^jXJ{M)KSVZ56(vt*E71Z@CJ$GuDYu2T41wA4cxF6gsSI~h)xFUBwm)%yzIG0_| z;?kutyPmQJ<(r#=^I@>2hA>HX2^ruC3qCqPq+pFgUT^i;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#0Cg3LWbwG*ogcT_k{7I*o-vMAk { - alerts.success('[[success:settings-saved]]'); - let languageChanged = false; - for (const key in newSettings) { - if (newSettings.hasOwnProperty(key)) { - if (key === 'userLang' && config.userLang !== newSettings.userLang) { - languageChanged = true; - } - if (key === 'bootswatchSkin') { - savedSkin = newSettings.bootswatchSkin; - config.bootswatchSkin = savedSkin === 'noskin' ? '' : savedSkin; - } else if (config.hasOwnProperty(key)) { - config[key] = newSettings[key]; - } - } - } + console.log('Logging Jullia Montejo'); + api.put(`/users/${ajaxify.data.uid}/settings`, { settings }).then(handleNewSettings); + } + + // Alerts the user that the settings have been saved and updates the configuration. + function handleNewSettings(newSettings) { + alerts.success('[[success:settings-saved]]'); + processNewSettings(newSettings); + } - if (languageChanged && parseInt(app.user.uid, 10) === parseInt(ajaxify.data.theirid, 10)) { - window.location.reload(); + // Processes the new settings and updates the configuration accordingly. + function processNewSettings(newSettings) { + for (const key in newSettings) { + if (newSettings.hasOwnProperty(key)) { + checkAndUpdateConfig(key, newSettings); } - }); + } + } + + // Updates the configuration based on the provided key and new settings. + function checkAndUpdateConfig(key, newSettings) { + if (key === 'userLang' && config.userLang !== newSettings.userLang) { + window.location.reload(); + } else if (key === 'bootswatchSkin') { + updateSkin(newSettings.bootswatchSkin); + } else if (config.hasOwnProperty(key)) { + config[key] = newSettings[key]; + } + } + + // Updates the saved skin with the new skin. + function updateSkin(skin) { + savedSkin = skin; + config.bootswatchSkin = skin === 'noskin' ? '' : skin; } function toggleCustomRoute() {