feat: avatar moderation — ученик загружает фото, учитель/админ подтверждает или отклоняет
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -649,23 +649,27 @@ const _prefsCache = {};
|
||||
let _prefsDirty = false;
|
||||
let _prefsTimer = null;
|
||||
|
||||
async function _prefsLoad() {
|
||||
if (!isLoggedIn()) return;
|
||||
try {
|
||||
const data = await apiFetch('/api/preferences', { method: 'GET' });
|
||||
Object.assign(_prefsCache, data);
|
||||
} catch (e) {}
|
||||
}
|
||||
// SYNC DISABLED (debug mode) — раскомментировать для включения синхронизации
|
||||
async function _prefsLoad() { /* disabled */ }
|
||||
function _prefsFlush() { /* disabled */ }
|
||||
|
||||
function _prefsFlush() {
|
||||
if (!_prefsDirty) return;
|
||||
_prefsDirty = false;
|
||||
if (!isLoggedIn()) return;
|
||||
apiFetch('/api/preferences', {
|
||||
method: 'PATCH',
|
||||
body: JSON.stringify(_prefsCache),
|
||||
}).catch(() => {});
|
||||
}
|
||||
// async function _prefsLoad() {
|
||||
// if (!isLoggedIn()) return;
|
||||
// try {
|
||||
// const data = await apiFetch('/api/preferences', { method: 'GET' });
|
||||
// Object.assign(_prefsCache, data);
|
||||
// } catch (e) {}
|
||||
// }
|
||||
//
|
||||
// function _prefsFlush() {
|
||||
// if (!_prefsDirty) return;
|
||||
// _prefsDirty = false;
|
||||
// if (!isLoggedIn()) return;
|
||||
// apiFetch('/api/preferences', {
|
||||
// method: 'PATCH',
|
||||
// body: JSON.stringify(_prefsCache),
|
||||
// }).catch(() => {});
|
||||
// }
|
||||
|
||||
const lsPrefs = {
|
||||
get(key, def) {
|
||||
|
||||
Reference in New Issue
Block a user