-
Groups is fully removed: No homepage navigation, Account feature, tier setting, API, or client code. Legacy group tables, entitlements, messages, voice files, and config are purged automatically. New cache-busted client: cyberchat-app.js?v=20260609.3. Browser and SQLite migration tests passed with no console errors.
This commit is contained in:
@@ -19,6 +19,11 @@
|
||||
};
|
||||
let root;
|
||||
let wakeListenersBound = false;
|
||||
const displayedFeatures = new Set([
|
||||
'voice_messages', 'recording_status', 'auto_voice_send', 'auto_voice_play',
|
||||
'username_color', 'text_archive_days', 'text_export', 'voice_archive',
|
||||
'voice_export', 'email_2fa'
|
||||
]);
|
||||
const $ = (s, c) => (c || root).querySelector(s);
|
||||
const $$ = (s, c) => Array.from((c || root).querySelectorAll(s));
|
||||
const esc = value => String(value == null ? '' : value)
|
||||
@@ -27,8 +32,8 @@
|
||||
|
||||
function base() {
|
||||
if (window.CYBERCHAT_BASE != null) return String(window.CYBERCHAT_BASE).replace(/\/$/, '');
|
||||
const script = Array.from(document.scripts).find(item => item.src.includes('cyberchat-v4.js'));
|
||||
return script ? script.src.replace(/\/assets\/js\/cyberchat-v4\.js.*$/, '') : '';
|
||||
const script = Array.from(document.scripts).find(item => item.src.includes('cyberchat-app.js'));
|
||||
return script ? script.src.replace(/\/assets\/js\/cyberchat-app\.js.*$/, '') : '';
|
||||
}
|
||||
function apiUrl(file, query = '') { return base() + '/api/' + file + (query ? '?' + query : ''); }
|
||||
function publicUrl(path) {
|
||||
@@ -54,6 +59,10 @@
|
||||
return state.user?.features && Object.prototype.hasOwnProperty.call(state.user.features, key)
|
||||
? state.user.features[key] : fallback;
|
||||
}
|
||||
function visibleFeatures() {
|
||||
return Object.entries(state.user?.features || {})
|
||||
.filter(([key]) => displayedFeatures.has(String(key).toLowerCase()));
|
||||
}
|
||||
function toast(message, type = 'error') {
|
||||
const area = $('#cc-toasts');
|
||||
if (!area) return;
|
||||
@@ -681,7 +690,7 @@
|
||||
</section></div>
|
||||
${showBilling ? billingHtml(billing) : ''}
|
||||
<section class="cc-card cc-feature-card"><h3>CURRENT FEATURES</h3><div class="cc-feature-list">
|
||||
${Object.entries(state.user.features).map(([key, value]) => `<span><b>${esc(key.replace(/_/g, ' '))}</b> ${esc(String(value))}</span>`).join('')}</div></section>
|
||||
${visibleFeatures().map(([key, value]) => `<span><b>${esc(key.replace(/_/g, ' '))}</b> ${esc(String(value))}</span>`).join('')}</div></section>
|
||||
</div>`;
|
||||
$('#logout').addEventListener('click', () => logout(true));
|
||||
$('#email-send').addEventListener('click', requestEmail);
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user