From d0da0989f7b51cfc766e8e1ceb2efefbfd0f6afa Mon Sep 17 00:00:00 2001 From: SunRyK <108290923+SmallK111407@users.noreply.github.com> Date: Mon, 6 Feb 2023 02:09:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A9`#=E5=96=B5=E5=96=B5=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?`=E5=8F=AF=E9=85=8D=E7=BD=AE`#=E5=9C=A3=E9=81=97=E7=89=A9?= =?UTF-8?q?=E5=88=97=E8=A1=A8`=E5=86=85=E5=9C=A3=E9=81=97=E7=89=A9?= =?UTF-8?q?=E6=95=B0=E9=87=8F=EF=BC=8C=E5=8F=AF=E9=80=89=E5=80=BC4~100?= =?UTF-8?q?=EF=BC=8C=E9=BB=98=E8=AE=A428=20(#438)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/profile/ProfileArtis.js | 5 +++-- config/cfg_default.js | 5 ++++- config/system/cfg_system.js | 10 +++++++++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/apps/profile/ProfileArtis.js b/apps/profile/ProfileArtis.js index a844e314..80c41032 100644 --- a/apps/profile/ProfileArtis.js +++ b/apps/profile/ProfileArtis.js @@ -3,7 +3,7 @@ * * */ import lodash from 'lodash' -import { Profile, Common } from '../../components/index.js' +import { Cfg, Profile, Common } from '../../components/index.js' import { getTargetUid, profileHelp, autoGetProfile } from './ProfileCommon.js' import { Artifact, Character, ProfileArtis } from '../../models/index.js' @@ -93,7 +93,8 @@ export async function profileArtisList (e) { } artis = lodash.sortBy(artis, '_mark') artis = artis.reverse() - artis = artis.slice(0, 28) + let number = Cfg.get('artisNumber', 28) + artis = artis.slice(0, `${number}`) let artisKeyTitle = ProfileArtis.getArtisKeyTitle() // 渲染图像 diff --git a/config/cfg_default.js b/config/cfg_default.js index 3d1418cb..8e0e0de9 100644 --- a/config/cfg_default.js +++ b/config/cfg_default.js @@ -8,9 +8,12 @@ export const avatarProfile = true // 群面板排名 export const groupRank = false -// 可选值5~30,建议15。设置高排名人数会导致渲染图片速度加长,发送缓慢 +// 可选值5~30,建议15。设置高排名人数会提高图片的长度,图片较大可能会影响渲染与发送速度 export const rankNumber = 15 +// 可选值4~100,建议28,最终圣遗物数量取决于面板内圣遗物数量。设置高圣遗物数量会提高图片的长度,图片较大可能会影响渲染与发送速度 +export const artisNumber = 28 + // 使用【#上传深渊】功能取代【#深渊】功能,默认关闭 export const uploadAbyssData = false diff --git a/config/system/cfg_system.js b/config/system/cfg_system.js index e20329a6..e06fa023 100644 --- a/config/system/cfg_system.js +++ b/config/system/cfg_system.js @@ -41,7 +41,15 @@ export const cfgSchema = { type: 'num', def: 15, input: (n) => Math.min(30, Math.max(5, (n * 1 || 15))), - desc: '可选值5~30,建议15。设置高排名人数会导致渲染图片速度加长,发送缓慢' + desc: '可选值5~30,建议15。设置高排名人数会提高图片的长度,图片较大可能会影响渲染与发送速度' + }, + artisNumber: { + title: '圣遗物列表数量', + key: '圣遗物数量', + type: 'num', + def: 28, + input: (n) => Math.min(100, Math.max(4, (n * 1 || 28))), + desc: '可选值4~100,建议28,最终圣遗物数量取决于面板内圣遗物数量。设置高圣遗物数量会提高图片的长度,图片较大可能会影响渲染与发送速度' }, uploadAbyssData: { title: '上传深渊',