Some falukant fixes, added undeground ui - no save right now, changed menu (and verification)

This commit is contained in:
Torsten Schulz
2025-07-17 14:28:52 +02:00
parent fceea5b7fb
commit 89cf12a7a8
33 changed files with 1010 additions and 423 deletions

View File

@@ -58,6 +58,8 @@ class FalukantController {
this.renovate = this.renovate.bind(this);
this.renovateAll = this.renovateAll.bind(this);
this.createBranch = this.createBranch.bind(this);
this.getUndergroundTypes = this.getUndergroundTypes.bind(this);
this.getNotifications = this.getNotifications.bind(this);
}
async getUser(req, res) {
@@ -806,6 +808,28 @@ class FalukantController {
console.log(error);
}
}
async getUndergroundTypes(req, res) {
try {
const { userid: hashedUserId } = req.headers;
const result = await FalukantService.getUndergroundTypes(hashedUserId);
res.status(200).json(result);
} catch (error) {
res.status(500).json({ error: error.message });
console.log(error);
}
}
async getNotifications(req, res) {
try {
const { userid: hashedUserId } = req.headers;
const result = await FalukantService.getNotifications(hashedUserId);
res.status(200).json(result);
} catch (error) {
res.status(500).json({ error: error.message });
console.log(error);
}
}
}
export default FalukantController;

View File

@@ -56,6 +56,19 @@ const menuStructure = {
diary: {
visible: ["all"],
path: "/socialnetwork/diary"
},
erotic: {
visible: ["over18"],
children: {
pictures: {
visible: ["over18"],
path: "/socialnetwork/erotic/pictures"
},
videos: {
visible: ["over18"],
path: "/socialnetwork/erotic/videos"
}
}
}
}
},
@@ -70,6 +83,10 @@ const menuStructure = {
randomChat: {
visible: ["over12"],
action: "openRanomChat"
},
eroticChat: {
visible: ["over18"],
action: "openEroticChat"
}
}
},
@@ -248,6 +265,8 @@ class NavigationController {
if (value.visible.includes("all")
|| value.visible.some(v => rights.includes(v) || (value.visible.includes("anyadmin") && rights.length > 0))
|| (value.visible.includes("over14") && age >= 14)
|| (value.visible.includes("over12") && age >= 12)
|| (value.visible.includes("over18") && age >= 18)
|| (value.visible.includes('nofalukantaccount') && !hasFalukantAccount)
|| (value.visible.includes('hasfalukantaccount') && hasFalukantAccount)) {
const { visible, ...itemWithoutVisible } = value;