@@ -6,97 +6,26 @@ function getIsSensitive(key: SettingKeyType): boolean {
66 return DEFAULT_SETTING_METADATA [ key ] ?. isSensitive ?? false
77}
88
9- export const SETTING_UI_SCHEMA_VERSION = '1.2 .0'
9+ export const SETTING_UI_SCHEMA_VERSION = '1.1 .0'
1010
1111export const SETTING_UI_SCHEMA : SettingUiSchema = {
1212 version : SETTING_UI_SCHEMA_VERSION ,
1313 title : '系统设置' ,
14- description : '管理 Memora 平台的全局行为与第三方服务接入 。' ,
14+ description : '管理 AFilmory 系统的全局行为与第三方服务接入 。' ,
1515 sections : [
16- {
17- type : 'section' ,
18- id : 'ai' ,
19- title : 'AI 与智能功能' ,
20- description : '配置 OpenAI 以及嵌入式模型以启用智能特性。' ,
21- icon : 'i-lucide-brain-circuit' ,
22- children : [
23- {
24- type : 'group' ,
25- id : 'ai-openai' ,
26- title : 'OpenAI 接入' ,
27- description : '为 API 请求配置服务端所需的 OpenAI 凭据。' ,
28- icon : 'i-lucide-bot' ,
29- children : [
30- {
31- type : 'field' ,
32- id : 'ai.openai.apiKey' ,
33- title : 'API Key' ,
34- description : '用于调用 OpenAI 接口的密钥,通常以 “sk-” 开头。' ,
35- helperText : '出于安全考虑仅在受信环境中填写,提交后会进行加密存储。' ,
36- key : 'ai.openai.apiKey' ,
37- isSensitive : getIsSensitive ( 'ai.openai.apiKey' ) ,
38- component : {
39- type : 'secret' ,
40- placeholder : 'sk-********************************' ,
41- autoComplete : 'off' ,
42- revealable : true ,
43- } ,
44- } ,
45- {
46- type : 'field' ,
47- id : 'ai.openai.baseUrl' ,
48- title : '自定义 Base URL' ,
49- description : '可选,若你使用自建代理,填写代理的完整 URL。' ,
50- key : 'ai.openai.baseUrl' ,
51- helperText : '例如 https://api.openai.com/v1,末尾无需斜杠。' ,
52- isSensitive : getIsSensitive ( 'ai.openai.baseUrl' ) ,
53- component : {
54- type : 'text' ,
55- inputType : 'url' ,
56- placeholder : 'https://api.openai.com/v1' ,
57- autoComplete : 'off' ,
58- } ,
59- } ,
60- ] ,
61- } ,
62- {
63- type : 'group' ,
64- id : 'ai-embedding' ,
65- title : '向量嵌入模型' ,
66- description : '用于语义搜索或文本向量化的模型。' ,
67- icon : 'i-lucide-fingerprint' ,
68- children : [
69- {
70- type : 'field' ,
71- id : 'ai.embedding.model' ,
72- title : 'Embedding 模型标识' ,
73- description : '例如 text-embedding-3-large、text-embedding-3-small 等。' ,
74- key : 'ai.embedding.model' ,
75- helperText : '填写完整的模型名称,留空将导致相关功能不可用。' ,
76- isSensitive : getIsSensitive ( 'ai.embedding.model' ) ,
77- component : {
78- type : 'text' ,
79- placeholder : 'text-embedding-3-large' ,
80- autoComplete : 'off' ,
81- } ,
82- } ,
83- ] ,
84- } ,
85- ] ,
86- } ,
8716 {
8817 type : 'section' ,
8918 id : 'auth' ,
9019 title : '登录与认证' ,
9120 description : '配置第三方 OAuth 登录用于后台访问控制。' ,
92- icon : 'i-lucide- shield-check' ,
21+ icon : 'shield-check' ,
9322 children : [
9423 {
9524 type : 'group' ,
9625 id : 'auth-google' ,
9726 title : 'Google OAuth' ,
9827 description : '在 Google Cloud Console 中创建 OAuth 应用后填写以下信息。' ,
99- icon : 'i-lucide- badge-check' ,
28+ icon : 'badge-check' ,
10029 children : [
10130 {
10231 type : 'field' ,
@@ -133,7 +62,7 @@ export const SETTING_UI_SCHEMA: SettingUiSchema = {
13362 id : 'auth-github' ,
13463 title : 'GitHub OAuth' ,
13564 description : '在 GitHub OAuth Apps 中创建应用后填写。' ,
136- icon : 'i-lucide- github' ,
65+ icon : 'github' ,
13766 children : [
13867 {
13968 type : 'field' ,
@@ -172,14 +101,14 @@ export const SETTING_UI_SCHEMA: SettingUiSchema = {
172101 id : 'http' ,
173102 title : 'HTTP 与安全' ,
174103 description : '控制跨域访问等 Web 层配置。' ,
175- icon : 'i-lucide- globe-2' ,
104+ icon : 'globe-2' ,
176105 children : [
177106 {
178107 type : 'group' ,
179108 id : 'http-cors' ,
180109 title : '跨域策略 (CORS)' ,
181110 description : '配置允许访问后台接口的来源列表。' ,
182- icon : 'i-lucide- shield-alert' ,
111+ icon : 'shield-alert' ,
183112 children : [
184113 {
185114 type : 'field' ,
@@ -200,39 +129,6 @@ export const SETTING_UI_SCHEMA: SettingUiSchema = {
200129 } ,
201130 ] ,
202131 } ,
203- {
204- type : 'section' ,
205- id : 'services' ,
206- title : '地图与定位' ,
207- description : '配置地图底图与地理编码等服务。' ,
208- icon : 'i-lucide-map' ,
209- children : [
210- {
211- type : 'group' ,
212- id : 'services-amap' ,
213- title : '高德地图接入' ,
214- description : '填写高德地图 Web 服务 Key 以启用后台地图选点与地理搜索能力。' ,
215- icon : 'i-lucide-map-pinned' ,
216- children : [
217- {
218- type : 'field' ,
219- id : 'services.amap.apiKey' ,
220- title : '高德地图 Key' ,
221- description : '前往高德开发者控制台创建 Web 服务 Key,并授权所需的 IP/域名后填入。' ,
222- helperText : '提交后将加密存储,仅后台调用地图与地理编码接口。' ,
223- key : 'services.amap.apiKey' ,
224- isSensitive : getIsSensitive ( 'services.amap.apiKey' ) ,
225- component : {
226- type : 'secret' ,
227- placeholder : '****************' ,
228- autoComplete : 'off' ,
229- revealable : true ,
230- } ,
231- } ,
232- ] ,
233- } ,
234- ] ,
235- } ,
236132 ] ,
237133} satisfies SettingUiSchema
238134
0 commit comments