feat: new Tehrani brand logo, custom button audience, trim dashboard
- Replace the crown logo with logo.svg / logo_bk.svg across both frontends; regenerate favicons and PWA icons via scripts/generate-brand-icons.cjs - Custom button: admin chooses whether it shows before login or only after - Dashboard: drop the survey-majority banner, hide the custom-order row Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -24,18 +24,23 @@ export class PublicSliderController {
|
||||
return Array.isArray(value) ? value : [];
|
||||
}
|
||||
|
||||
/** Custom button on the profile dashboard (ثابتها → دکمه سفارشی). */
|
||||
/**
|
||||
* Custom button on the profile dashboard (ثابتها → دکمه سفارشی).
|
||||
* `audience`: 'all' = signed out too, 'loggedIn' = only after login. Rows
|
||||
* saved before the field existed were shown to everyone, so they read 'all'.
|
||||
*/
|
||||
@Get('custom-button')
|
||||
async getCustomButton() {
|
||||
const value = await this.misc.getConst('custom_button');
|
||||
if (!value || typeof value !== 'object' || Array.isArray(value)) {
|
||||
return { enabled: false, title: '', link: '' };
|
||||
return { enabled: false, title: '', link: '', audience: 'all' };
|
||||
}
|
||||
const row = value as Record<string, unknown>;
|
||||
return {
|
||||
enabled: Boolean(row.enabled),
|
||||
title: String(row.title ?? ''),
|
||||
link: String(row.link ?? ''),
|
||||
audience: row.audience === 'loggedIn' ? 'loggedIn' : 'all',
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user