feat(navigation): enhance adult verification handling and notifications

- Updated navigationController to simplify the eroticChat menu structure.
- Enhanced adminService to notify users of adult verification status changes, including previous status.
- Improved AppNavigation and related components to register and unregister socket listeners for adult verification updates.
- Added localized messages for adult verification notifications in English, German, and Spanish.
- Introduced a verification hint in the EroticAccessView to guide users on document submission.
This commit is contained in:
Torsten Schulz (local)
2026-03-27 13:23:44 +01:00
parent 82223676a6
commit 07604cc9fa
8 changed files with 175 additions and 35 deletions

View File

@@ -96,9 +96,7 @@ const menuStructure = {
},
eroticChat: {
visible: ["over18"],
action: "openEroticChat",
view: "window",
class: "eroticChatWindow"
action: "openEroticChat"
}
}
},

View File

@@ -35,6 +35,7 @@ import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
import { getAdultVerificationBaseDir, getLegacyAdultVerificationBaseDir } from '../utils/storagePaths.js';
import { notifyUser } from '../utils/socket.js';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
@@ -385,6 +386,8 @@ class AdminService {
where: { userId: user.id, paramTypeId: paramType.id }
});
const previousStatus = existing?.value || 'none';
if (existing) {
await existing.update({ value: status });
} else {
@@ -395,6 +398,12 @@ class AdminService {
});
}
await notifyUser(targetHashedId, 'reloadmenu', {});
await notifyUser(targetHashedId, 'adultVerificationChanged', {
status,
previousStatus
});
return { success: true };
}