feat: 支持配置系统图标
This commit is contained in:
@@ -4,6 +4,7 @@ import { PrismaService } from '../prisma/prisma.service';
|
||||
|
||||
const EDITABLE_KEYS = [
|
||||
'appName',
|
||||
'appIconUrl',
|
||||
'logRetentionDays',
|
||||
'operationLogRetentionDays',
|
||||
'watermarkText',
|
||||
@@ -26,6 +27,7 @@ export class SettingsService {
|
||||
const rows = await this.prisma.systemSetting.findMany();
|
||||
const map: Record<string, string> = {
|
||||
appName: this.config.get<string>('appName') || '',
|
||||
appIconUrl: '/app-icon.svg',
|
||||
logRetentionDays: String(this.config.get<number>('logRetentionDays') || 365),
|
||||
operationLogRetentionDays: '365',
|
||||
watermarkText: this.config.get<string>('watermarkText') || '仅供溯源核验使用',
|
||||
@@ -39,6 +41,7 @@ export class SettingsService {
|
||||
for (const r of rows) {
|
||||
map[r.key] = r.key === 'appName' && r.value === '艺术品可信溯源与认证平台' ? '艺术品溯源平台' : r.value;
|
||||
}
|
||||
if (!map.appIconUrl) map.appIconUrl = '/app-icon.svg';
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user