@abtnode/ux 1.16.48 → 1.16.49-beta-20250812-040454-05aece54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -940,6 +940,7 @@ function BlockletBranding({
940
940
  blocklet,
941
941
  onUpdate = () => {},
942
942
  hasPermission = false,
943
+ showFields = [],
943
944
  ...rest
944
945
  }) {
945
946
  const {
@@ -1031,27 +1032,29 @@ function BlockletBranding({
1031
1032
  };
1032
1033
  return /*#__PURE__*/_jsxs(Div, {
1033
1034
  ...rest,
1034
- children: [/*#__PURE__*/_jsxs(Box, {
1035
- children: [/*#__PURE__*/_jsx(Typography, {
1036
- variant: "h6",
1037
- sx: {
1038
- fontWeight: 600
1039
- },
1040
- children: t('blocklet.config.baseInfo')
1041
- }), /*#__PURE__*/_jsx(Typography, {
1042
- variant: "body2",
1035
+ children: [(!showFields.length || showFields.includes('base-info-title')) && /*#__PURE__*/_jsxs(_Fragment, {
1036
+ children: [/*#__PURE__*/_jsxs(Box, {
1037
+ children: [/*#__PURE__*/_jsx(Typography, {
1038
+ variant: "h6",
1039
+ sx: {
1040
+ fontWeight: 600
1041
+ },
1042
+ children: t('blocklet.config.baseInfo')
1043
+ }), /*#__PURE__*/_jsx(Typography, {
1044
+ variant: "body2",
1045
+ sx: {
1046
+ color: 'text.secondary'
1047
+ },
1048
+ children: t('blocklet.config.baseInfoDesc')
1049
+ })]
1050
+ }), /*#__PURE__*/_jsx(Box, {
1051
+ className: "config-form",
1052
+ component: Divider,
1043
1053
  sx: {
1044
- color: 'text.secondary'
1045
- },
1046
- children: t('blocklet.config.baseInfoDesc')
1054
+ my: 3
1055
+ }
1047
1056
  })]
1048
- }), /*#__PURE__*/_jsx(Box, {
1049
- className: "config-form",
1050
- component: Divider,
1051
- sx: {
1052
- my: 3
1053
- }
1054
- }), configurableEnvs.map(item => /*#__PURE__*/_jsxs(_Fragment, {
1057
+ }), (showFields.length ? configurableEnvs.filter(item => showFields.includes(item.key)) : configurableEnvs).map(item => /*#__PURE__*/_jsxs(_Fragment, {
1055
1058
  children: [/*#__PURE__*/_jsx(Section, {
1056
1059
  title: item.title,
1057
1060
  desc: item.description,
@@ -1072,237 +1075,323 @@ function BlockletBranding({
1072
1075
  my: 3
1073
1076
  }
1074
1077
  })]
1075
- })), /*#__PURE__*/_jsx(Section, {
1076
- title: t('blocklet.config.languages'),
1077
- desc: t('blocklet.config.languagesDesc'),
1078
- children: /*#__PURE__*/_jsx(FormAutocompleteInput, {
1079
- style: {
1080
- marginTop: 0
1081
- },
1082
- disabled: disabled,
1083
- loading: state.loading,
1084
- options: languages,
1085
- noEmpty: true,
1086
- initialValue: customLanguages ? customLanguages.value.split(',') : ['en', 'zh'],
1087
- onSubmit: value => onSubmitConfig('BLOCKLET_APP_LANGUAGES', value),
1088
- helperText: t('blocklet.config.selectLanguagesTip'),
1089
- placeholder: t('blocklet.config.languagesSearch'),
1090
- filterKeys: languagesFilterKeys,
1091
- renderLabel: (code, item) => {
1092
- if (item.name === item.enName) {
1093
- return `${item.name} (${code.toUpperCase()})`;
1078
+ })), (!showFields.length || showFields.includes(BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LANGUAGES)) && /*#__PURE__*/_jsxs(_Fragment, {
1079
+ children: [/*#__PURE__*/_jsx(Section, {
1080
+ title: t('blocklet.config.languages'),
1081
+ desc: t('blocklet.config.languagesDesc'),
1082
+ children: /*#__PURE__*/_jsx(FormAutocompleteInput, {
1083
+ style: {
1084
+ marginTop: 0
1085
+ },
1086
+ disabled: disabled,
1087
+ loading: state.loading,
1088
+ options: languages,
1089
+ noEmpty: true,
1090
+ initialValue: customLanguages ? customLanguages.value.split(',') : ['en', 'zh'],
1091
+ onSubmit: value => onSubmitConfig('BLOCKLET_APP_LANGUAGES', value),
1092
+ helperText: t('blocklet.config.selectLanguagesTip'),
1093
+ placeholder: t('blocklet.config.languagesSearch'),
1094
+ filterKeys: languagesFilterKeys,
1095
+ renderLabel: (code, item) => {
1096
+ if (item.name === item.enName) {
1097
+ return `${item.name} (${code.toUpperCase()})`;
1098
+ }
1099
+ return `${item.name}, ${item.enName} (${code.toUpperCase()})`;
1094
1100
  }
1095
- return `${item.name}, ${item.enName} (${code.toUpperCase()})`;
1096
- }
1097
- })
1098
- }), /*#__PURE__*/_jsxs(Box, {
1099
- sx: {
1100
- mt: 6
1101
- },
1102
- children: [/*#__PURE__*/_jsx(Typography, {
1103
- variant: "h6",
1101
+ })
1102
+ }), /*#__PURE__*/_jsx(Box, {
1103
+ className: "config-form",
1104
+ component: Divider,
1104
1105
  sx: {
1105
- fontWeight: 600
1106
- },
1107
- children: t('blocklet.config.logoSettings')
1108
- }), /*#__PURE__*/_jsx(Typography, {
1109
- variant: "body2",
1106
+ my: 3
1107
+ }
1108
+ })]
1109
+ }), (!showFields.length || showFields.includes('logo-settings-title')) && /*#__PURE__*/_jsxs(_Fragment, {
1110
+ children: [/*#__PURE__*/_jsxs(Box, {
1110
1111
  sx: {
1111
- color: 'text.secondary'
1112
+ mt: 6
1112
1113
  },
1113
- children: t('blocklet.config.logoSettingsDesc')
1114
- }), /*#__PURE__*/_jsx(Typography, {
1115
- variant: "body2",
1114
+ children: [/*#__PURE__*/_jsx(Typography, {
1115
+ variant: "h6",
1116
+ sx: {
1117
+ fontWeight: 600
1118
+ },
1119
+ children: t('blocklet.config.logoSettings')
1120
+ }), /*#__PURE__*/_jsx(Typography, {
1121
+ variant: "body2",
1122
+ sx: {
1123
+ color: 'text.secondary'
1124
+ },
1125
+ children: t('blocklet.config.logoSettingsDesc')
1126
+ }), /*#__PURE__*/_jsx(Typography, {
1127
+ variant: "body2",
1128
+ sx: {
1129
+ color: 'warning.main'
1130
+ },
1131
+ children: t('blocklet.config.changeImageTip')
1132
+ })]
1133
+ }), /*#__PURE__*/_jsx(Box, {
1134
+ className: "config-form",
1135
+ component: Divider,
1116
1136
  sx: {
1117
- color: 'warning.main'
1118
- },
1119
- children: t('blocklet.config.changeImageTip')
1137
+ my: 3
1138
+ }
1120
1139
  })]
1121
- }), /*#__PURE__*/_jsx(Box, {
1122
- className: "config-form",
1123
- component: Divider,
1124
- sx: {
1125
- my: 3
1126
- }
1127
1140
  }), /*#__PURE__*/_jsxs(Form, {
1128
- children: [/*#__PURE__*/_jsx(Section, {
1129
- title: t('blocklet.config.logoSquare'),
1130
- desc: `${t('blocklet.config.logoSquareDesc')}\n${t('blocklet.config.logoDesc', {
1131
- width: 512,
1132
- height: 512,
1133
- maxSize: 5
1134
- })}`,
1135
- link: "https://www.didwallet.io/",
1136
- children: /*#__PURE__*/_jsxs(Box, {
1137
- sx: {
1138
- display: 'flex',
1139
- gap: 3,
1140
- flexWrap: 'wrap'
1141
- },
1142
- children: [/*#__PURE__*/_jsxs(Box, {
1141
+ children: [(!showFields.length || showFields.includes(BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO)) && /*#__PURE__*/_jsxs(_Fragment, {
1142
+ children: [/*#__PURE__*/_jsx(Section, {
1143
+ title: t('blocklet.config.logoSquare'),
1144
+ desc: `${t('blocklet.config.logoSquareDesc')}\n${t('blocklet.config.logoDesc', {
1145
+ width: 512,
1146
+ height: 512,
1147
+ maxSize: 5
1148
+ })}`,
1149
+ link: "https://www.didwallet.io/",
1150
+ children: /*#__PURE__*/_jsxs(Box, {
1143
1151
  sx: {
1144
- alignSelf: 'flex-start',
1145
1152
  display: 'flex',
1146
- flexDirection: 'column',
1147
- gap: 3
1153
+ gap: 3,
1154
+ flexWrap: 'wrap'
1148
1155
  },
1149
- children: [/*#__PURE__*/_jsx(Typography, {
1150
- variant: "body2",
1151
- children: t('common.lightMode')
1152
- }), /*#__PURE__*/_jsx(Box, {
1156
+ children: [/*#__PURE__*/_jsxs(Box, {
1153
1157
  sx: {
1154
- width: 307,
1155
- height: 173,
1156
- position: 'relative',
1157
- borderRadius: '4px',
1158
- overflow: 'hidden'
1158
+ alignSelf: 'flex-start',
1159
+ display: 'flex',
1160
+ flexDirection: 'column',
1161
+ gap: 3
1159
1162
  },
1160
- children: /*#__PURE__*/_jsx(AppLogoCard, {
1161
- name: blocklet.environments.find(x => x.key === 'BLOCKLET_APP_NAME').value,
1162
- icon: logoUrl,
1163
- did: blocklet.meta.did
1164
- })
1165
- }), /*#__PURE__*/_jsx(LogoUploader, {
1166
- did: blocklet.meta.did,
1167
- width: 80,
1168
- type: "square",
1169
- prefix: prefix,
1170
- url: logoUrl,
1171
- enabled: hasPermission,
1172
- headers: getSessionInHeader,
1173
- aspectRatio: 1,
1174
- children: /*#__PURE__*/_jsx(Button, {
1175
- variant: "outlined",
1176
- color: "primary",
1177
- children: t('common.upload')
1178
- })
1179
- })]
1180
- }), /*#__PURE__*/_jsxs(Box, {
1181
- sx: {
1182
- alignSelf: 'flex-start',
1183
- display: 'flex',
1184
- flexDirection: 'column',
1185
- gap: 3
1186
- },
1187
- children: [/*#__PURE__*/_jsx(Typography, {
1188
- variant: "body2",
1189
- children: t('common.darkMode')
1190
- }), /*#__PURE__*/_jsx(Box, {
1163
+ children: [/*#__PURE__*/_jsx(Typography, {
1164
+ variant: "body2",
1165
+ children: t('common.lightMode')
1166
+ }), /*#__PURE__*/_jsx(Box, {
1167
+ sx: {
1168
+ width: 307,
1169
+ height: 173,
1170
+ position: 'relative',
1171
+ borderRadius: '4px',
1172
+ overflow: 'hidden'
1173
+ },
1174
+ children: /*#__PURE__*/_jsx(AppLogoCard, {
1175
+ name: blocklet.environments.find(x => x.key === 'BLOCKLET_APP_NAME').value,
1176
+ icon: logoUrl,
1177
+ did: blocklet.meta.did
1178
+ })
1179
+ }), /*#__PURE__*/_jsx(LogoUploader, {
1180
+ did: blocklet.meta.did,
1181
+ width: 80,
1182
+ type: "square",
1183
+ prefix: prefix,
1184
+ url: logoUrl,
1185
+ enabled: hasPermission,
1186
+ headers: getSessionInHeader,
1187
+ aspectRatio: 1,
1188
+ children: /*#__PURE__*/_jsx(Button, {
1189
+ variant: "outlined",
1190
+ color: "primary",
1191
+ children: t('common.upload')
1192
+ })
1193
+ })]
1194
+ }), /*#__PURE__*/_jsxs(Box, {
1191
1195
  sx: {
1192
- width: 307,
1193
- height: 173,
1194
- position: 'relative',
1195
- borderRadius: '4px',
1196
- overflow: 'hidden'
1196
+ alignSelf: 'flex-start',
1197
+ display: 'flex',
1198
+ flexDirection: 'column',
1199
+ gap: 3
1197
1200
  },
1198
- children: /*#__PURE__*/_jsx(AppLogoCard, {
1199
- dark: true,
1200
- name: blocklet.environments.find(x => x.key === 'BLOCKLET_APP_NAME').value,
1201
- icon: logoDarkUrl,
1202
- did: blocklet.meta.did
1203
- })
1204
- }), /*#__PURE__*/_jsx(LogoUploader, {
1205
- did: blocklet.meta.did,
1206
- width: 80,
1207
- type: "square-dark",
1208
- prefix: prefix,
1209
- url: logoDarkUrl,
1210
- enabled: hasPermission,
1211
- headers: getSessionInHeader,
1212
- aspectRatio: 1,
1213
- children: /*#__PURE__*/_jsx(Button, {
1214
- variant: "outlined",
1215
- color: "primary",
1216
- children: t('common.upload')
1217
- })
1201
+ children: [/*#__PURE__*/_jsx(Typography, {
1202
+ variant: "body2",
1203
+ children: t('common.darkMode')
1204
+ }), /*#__PURE__*/_jsx(Box, {
1205
+ sx: {
1206
+ width: 307,
1207
+ height: 173,
1208
+ position: 'relative',
1209
+ borderRadius: '4px',
1210
+ overflow: 'hidden'
1211
+ },
1212
+ children: /*#__PURE__*/_jsx(AppLogoCard, {
1213
+ dark: true,
1214
+ name: blocklet.environments.find(x => x.key === 'BLOCKLET_APP_NAME').value,
1215
+ icon: logoDarkUrl,
1216
+ did: blocklet.meta.did
1217
+ })
1218
+ }), /*#__PURE__*/_jsx(LogoUploader, {
1219
+ did: blocklet.meta.did,
1220
+ width: 80,
1221
+ type: "square-dark",
1222
+ prefix: prefix,
1223
+ url: logoDarkUrl,
1224
+ enabled: hasPermission,
1225
+ headers: getSessionInHeader,
1226
+ aspectRatio: 1,
1227
+ children: /*#__PURE__*/_jsx(Button, {
1228
+ variant: "outlined",
1229
+ color: "primary",
1230
+ children: t('common.upload')
1231
+ })
1232
+ })]
1218
1233
  })]
1219
- })]
1220
- })
1221
- }), /*#__PURE__*/_jsx(Box, {
1222
- className: "config-form",
1223
- component: Divider,
1224
- sx: {
1225
- my: 3
1226
- }
1227
- }), /*#__PURE__*/_jsx(Section, {
1228
- title: t('blocklet.config.logoRect'),
1229
- desc: `${t('blocklet.config.logoRectDesc')}`,
1230
- children: /*#__PURE__*/_jsxs(Box, {
1234
+ })
1235
+ }), /*#__PURE__*/_jsx(Box, {
1236
+ className: "config-form",
1237
+ component: Divider,
1231
1238
  sx: {
1232
- display: 'flex',
1233
- gap: 3,
1234
- flexWrap: 'wrap'
1235
- },
1236
- children: [/*#__PURE__*/_jsxs(Box, {
1239
+ my: 3
1240
+ }
1241
+ })]
1242
+ }), (!showFields.length || showFields.includes(BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT)) && /*#__PURE__*/_jsxs(_Fragment, {
1243
+ children: [/*#__PURE__*/_jsx(Section, {
1244
+ title: t('blocklet.config.logoRect'),
1245
+ desc: `${t('blocklet.config.logoRectDesc')}`,
1246
+ children: /*#__PURE__*/_jsxs(Box, {
1237
1247
  sx: {
1238
- alignSelf: 'flex-start',
1239
1248
  display: 'flex',
1240
- flexDirection: 'column',
1241
- gap: 3
1249
+ gap: 3,
1250
+ flexWrap: 'wrap'
1242
1251
  },
1243
- children: [/*#__PURE__*/_jsx(Typography, {
1244
- variant: "body2",
1245
- children: t('common.lightMode')
1246
- }), /*#__PURE__*/_jsxs(Box, {
1252
+ children: [/*#__PURE__*/_jsxs(Box, {
1247
1253
  sx: {
1248
- width: 307,
1249
- height: 173,
1250
- position: 'relative',
1251
- borderRadius: '4px',
1252
- overflow: 'hidden'
1254
+ alignSelf: 'flex-start',
1255
+ display: 'flex',
1256
+ flexDirection: 'column',
1257
+ gap: 3
1253
1258
  },
1254
- children: [rectLogoUrl ? /*#__PURE__*/_jsx(HeaderLogo, {
1255
- viewBox: "0 0 384 216",
1256
- sx: {
1257
- width: '100%',
1258
- height: '100%'
1259
- }
1260
- }) : /*#__PURE__*/_jsx(HeaderLogoEmpty, {
1261
- viewBox: "0 0 384 216",
1259
+ children: [/*#__PURE__*/_jsx(Typography, {
1260
+ variant: "body2",
1261
+ children: t('common.lightMode')
1262
+ }), /*#__PURE__*/_jsxs(Box, {
1262
1263
  sx: {
1263
- width: '100%',
1264
- height: '100%'
1265
- }
1266
- }), rectLogoUrl && /*#__PURE__*/_jsx(Box, {
1267
- component: "img",
1268
- src: rectLogoUrl,
1269
- alt: "app-logo",
1264
+ width: 307,
1265
+ height: 173,
1266
+ position: 'relative',
1267
+ borderRadius: '4px',
1268
+ overflow: 'hidden'
1269
+ },
1270
+ children: [rectLogoUrl ? /*#__PURE__*/_jsx(HeaderLogo, {
1271
+ viewBox: "0 0 384 216",
1272
+ sx: {
1273
+ width: '100%',
1274
+ height: '100%'
1275
+ }
1276
+ }) : /*#__PURE__*/_jsx(HeaderLogoEmpty, {
1277
+ viewBox: "0 0 384 216",
1278
+ sx: {
1279
+ width: '100%',
1280
+ height: '100%'
1281
+ }
1282
+ }), rectLogoUrl && /*#__PURE__*/_jsx(Box, {
1283
+ component: "img",
1284
+ src: rectLogoUrl,
1285
+ alt: "app-logo",
1286
+ sx: {
1287
+ position: 'absolute',
1288
+ top: 112,
1289
+ left: 64,
1290
+ maxHeight: 40,
1291
+ maxWidth: 120
1292
+ }
1293
+ })]
1294
+ }), /*#__PURE__*/_jsx(LogoUploader, {
1295
+ did: blocklet.meta.did,
1296
+ width: 80,
1297
+ height: "auto",
1298
+ type: "rect",
1299
+ prefix: prefix,
1300
+ url: rectLogoUrl,
1301
+ enabled: hasPermission,
1302
+ headers: getSessionInHeader,
1303
+ aspectRatio: NaN,
1304
+ minWidth: 80,
1305
+ minHeight: 120,
1306
+ children: /*#__PURE__*/_jsx(Button, {
1307
+ variant: "outlined",
1308
+ children: t('common.upload')
1309
+ })
1310
+ })]
1311
+ }), /*#__PURE__*/_jsxs(Box, {
1312
+ sx: {
1313
+ alignSelf: 'flex-start',
1314
+ display: 'flex',
1315
+ flexDirection: 'column',
1316
+ gap: 3
1317
+ },
1318
+ children: [/*#__PURE__*/_jsx(Typography, {
1319
+ variant: "body2",
1320
+ children: t('common.darkMode')
1321
+ }), /*#__PURE__*/_jsxs(Box, {
1270
1322
  sx: {
1271
- position: 'absolute',
1272
- top: 112,
1273
- left: 64,
1274
- maxHeight: 40,
1275
- maxWidth: 120
1276
- }
1323
+ width: 307,
1324
+ height: 173,
1325
+ position: 'relative',
1326
+ borderRadius: '4px',
1327
+ overflow: 'hidden'
1328
+ },
1329
+ children: [rectLogoDarkUrl ? /*#__PURE__*/_jsx(HeaderLogoDark, {
1330
+ viewBox: "0 0 384 216",
1331
+ sx: {
1332
+ width: '100%',
1333
+ height: '100%'
1334
+ }
1335
+ }) : /*#__PURE__*/_jsx(HeaderLogoEmptyDark, {
1336
+ viewBox: "0 0 384 216",
1337
+ sx: {
1338
+ width: '100%',
1339
+ height: '100%'
1340
+ }
1341
+ }), rectLogoDarkUrl && /*#__PURE__*/_jsx(Box, {
1342
+ component: "img",
1343
+ src: rectLogoDarkUrl,
1344
+ alt: "app-logo",
1345
+ sx: {
1346
+ position: 'absolute',
1347
+ top: 112,
1348
+ left: 64,
1349
+ maxHeight: 40,
1350
+ maxWidth: 120
1351
+ }
1352
+ })]
1353
+ }), /*#__PURE__*/_jsx(LogoUploader, {
1354
+ did: blocklet.meta.did,
1355
+ width: 80,
1356
+ height: "auto",
1357
+ type: "rect-dark",
1358
+ prefix: prefix,
1359
+ url: rectLogoDarkUrl,
1360
+ enabled: hasPermission,
1361
+ headers: getSessionInHeader,
1362
+ aspectRatio: NaN,
1363
+ minWidth: 80,
1364
+ minHeight: 120,
1365
+ children: /*#__PURE__*/_jsx(Button, {
1366
+ variant: "outlined",
1367
+ children: t('common.upload')
1368
+ })
1277
1369
  })]
1278
- }), /*#__PURE__*/_jsx(LogoUploader, {
1279
- did: blocklet.meta.did,
1280
- width: 80,
1281
- height: "auto",
1282
- type: "rect",
1283
- prefix: prefix,
1284
- url: rectLogoUrl,
1285
- enabled: hasPermission,
1286
- headers: getSessionInHeader,
1287
- aspectRatio: NaN,
1288
- minWidth: 80,
1289
- minHeight: 120,
1290
- children: /*#__PURE__*/_jsx(Button, {
1291
- variant: "outlined",
1292
- children: t('common.upload')
1293
- })
1294
1370
  })]
1295
- }), /*#__PURE__*/_jsxs(Box, {
1371
+ })
1372
+ }), /*#__PURE__*/_jsx(Box, {
1373
+ className: "config-form",
1374
+ component: Divider,
1375
+ sx: {
1376
+ my: 3
1377
+ }
1378
+ })]
1379
+ }), (!showFields.length || showFields.includes(BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_FAVICON)) && /*#__PURE__*/_jsxs(_Fragment, {
1380
+ children: [/*#__PURE__*/_jsx(Section, {
1381
+ title: t('blocklet.config.logoFavicon'),
1382
+ desc: `${t('blocklet.config.logoFaviconDesc')}\n${t('blocklet.config.logoDesc', {
1383
+ width: 512,
1384
+ height: 512,
1385
+ maxSize: 5
1386
+ })}`,
1387
+ children: /*#__PURE__*/_jsxs(Box, {
1296
1388
  sx: {
1297
1389
  alignSelf: 'flex-start',
1298
1390
  display: 'flex',
1299
1391
  flexDirection: 'column',
1300
1392
  gap: 3
1301
1393
  },
1302
- children: [/*#__PURE__*/_jsx(Typography, {
1303
- variant: "body2",
1304
- children: t('common.darkMode')
1305
- }), /*#__PURE__*/_jsxs(Box, {
1394
+ children: [/*#__PURE__*/_jsxs(Box, {
1306
1395
  sx: {
1307
1396
  width: 307,
1308
1397
  height: 173,
@@ -1310,175 +1399,107 @@ function BlockletBranding({
1310
1399
  borderRadius: '4px',
1311
1400
  overflow: 'hidden'
1312
1401
  },
1313
- children: [rectLogoDarkUrl ? /*#__PURE__*/_jsx(HeaderLogoDark, {
1402
+ children: [/*#__PURE__*/_jsx(Favicon, {
1314
1403
  viewBox: "0 0 384 216",
1315
1404
  sx: {
1316
1405
  width: '100%',
1317
1406
  height: '100%'
1318
1407
  }
1319
- }) : /*#__PURE__*/_jsx(HeaderLogoEmptyDark, {
1320
- viewBox: "0 0 384 216",
1321
- sx: {
1322
- width: '100%',
1323
- height: '100%'
1324
- }
1325
- }), rectLogoDarkUrl && /*#__PURE__*/_jsx(Box, {
1408
+ }), faviconUrl && /*#__PURE__*/_jsx(Box, {
1326
1409
  component: "img",
1327
- src: rectLogoDarkUrl,
1410
+ src: faviconUrl,
1328
1411
  alt: "app-logo",
1329
1412
  sx: {
1330
1413
  position: 'absolute',
1331
- top: 112,
1332
- left: 64,
1333
- maxHeight: 40,
1334
- maxWidth: 120
1414
+ top: 62,
1415
+ left: 146,
1416
+ width: 44,
1417
+ height: 44,
1418
+ borderRadius: '12px'
1335
1419
  }
1336
1420
  })]
1337
1421
  }), /*#__PURE__*/_jsx(LogoUploader, {
1338
1422
  did: blocklet.meta.did,
1339
1423
  width: 80,
1340
- height: "auto",
1341
- type: "rect-dark",
1424
+ type: "favicon",
1342
1425
  prefix: prefix,
1343
- url: rectLogoDarkUrl,
1426
+ url: faviconUrl,
1344
1427
  enabled: hasPermission,
1345
1428
  headers: getSessionInHeader,
1346
- aspectRatio: NaN,
1347
- minWidth: 80,
1348
- minHeight: 120,
1429
+ aspectRatio: 1,
1349
1430
  children: /*#__PURE__*/_jsx(Button, {
1350
1431
  variant: "outlined",
1351
1432
  children: t('common.upload')
1352
1433
  })
1353
1434
  })]
1354
- })]
1355
- })
1356
- }), /*#__PURE__*/_jsx(Box, {
1357
- className: "config-form",
1358
- component: Divider,
1359
- sx: {
1360
- my: 3
1361
- }
1362
- }), /*#__PURE__*/_jsx(Section, {
1363
- title: t('blocklet.config.logoFavicon'),
1364
- desc: `${t('blocklet.config.logoFaviconDesc')}\n${t('blocklet.config.logoDesc', {
1365
- width: 512,
1366
- height: 512,
1367
- maxSize: 5
1368
- })}`,
1369
- children: /*#__PURE__*/_jsxs(Box, {
1370
- sx: {
1371
- alignSelf: 'flex-start',
1372
- display: 'flex',
1373
- flexDirection: 'column',
1374
- gap: 3
1375
- },
1376
- children: [/*#__PURE__*/_jsxs(Box, {
1377
- sx: {
1378
- width: 307,
1379
- height: 173,
1380
- position: 'relative',
1381
- borderRadius: '4px',
1382
- overflow: 'hidden'
1383
- },
1384
- children: [/*#__PURE__*/_jsx(Favicon, {
1385
- viewBox: "0 0 384 216",
1386
- sx: {
1387
- width: '100%',
1388
- height: '100%'
1389
- }
1390
- }), faviconUrl && /*#__PURE__*/_jsx(Box, {
1391
- component: "img",
1392
- src: faviconUrl,
1393
- alt: "app-logo",
1394
- sx: {
1395
- position: 'absolute',
1396
- top: 62,
1397
- left: 146,
1398
- width: 44,
1399
- height: 44,
1400
- borderRadius: '12px'
1401
- }
1402
- })]
1403
- }), /*#__PURE__*/_jsx(LogoUploader, {
1404
- did: blocklet.meta.did,
1405
- width: 80,
1406
- type: "favicon",
1407
- prefix: prefix,
1408
- url: faviconUrl,
1409
- enabled: hasPermission,
1410
- headers: getSessionInHeader,
1411
- aspectRatio: 1,
1412
- children: /*#__PURE__*/_jsx(Button, {
1413
- variant: "outlined",
1414
- children: t('common.upload')
1415
- })
1416
- })]
1417
- })
1418
- }), /*#__PURE__*/_jsx(Box, {
1419
- className: "config-form",
1420
- component: Divider,
1421
- sx: {
1422
- my: 3
1423
- }
1424
- }), /*#__PURE__*/_jsx(Section, {
1425
- title: t('blocklet.config.splashPortrait'),
1426
- desc: t('blocklet.config.splashDesc'),
1427
- link: "https://www.arcsphere.io/",
1428
- children: /*#__PURE__*/_jsxs(Box, {
1435
+ })
1436
+ }), /*#__PURE__*/_jsx(Box, {
1437
+ className: "config-form",
1438
+ component: Divider,
1429
1439
  sx: {
1430
- display: 'flex',
1431
- gap: 3,
1432
- alignSelf: 'flex-start',
1433
- '.uploader-wrapper': {
1434
- borderRadius: 0
1435
- },
1436
- flexWrap: 'wrap'
1437
- },
1438
- children: [/*#__PURE__*/_jsx(LogoUploader, {
1439
- did: blocklet.meta.did,
1440
- height: 400,
1441
- width: 225,
1442
- type: "splash-portrait",
1443
- prefix: prefix,
1444
- url: splashPortraitUrl,
1445
- enabled: hasPermission,
1446
- headers: getSessionInHeader,
1447
- aspectRatio: 9 / 16,
1448
- minWidth: 900,
1449
- minHeight: 1000,
1450
- allowSVG: false
1451
- }), /*#__PURE__*/_jsx(Box, {
1440
+ my: 3
1441
+ }
1442
+ })]
1443
+ }), (!showFields.length || showFields.includes(BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPLASH_PORTRAIT)) && /*#__PURE__*/_jsxs(_Fragment, {
1444
+ children: [/*#__PURE__*/_jsx(Section, {
1445
+ title: t('blocklet.config.splashPortrait'),
1446
+ desc: t('blocklet.config.splashDesc'),
1447
+ link: "https://www.arcsphere.io/",
1448
+ children: /*#__PURE__*/_jsxs(Box, {
1452
1449
  sx: {
1453
- width: '100%',
1454
- maxWidth: 400,
1455
- aspectRatio: '16 / 9',
1456
- // 保持比例
1457
- position: 'relative'
1450
+ display: 'flex',
1451
+ gap: 3,
1452
+ alignSelf: 'flex-start',
1453
+ '.uploader-wrapper': {
1454
+ borderRadius: 0
1455
+ },
1456
+ flexWrap: 'wrap'
1458
1457
  },
1459
- children: /*#__PURE__*/_jsx(LogoUploader, {
1458
+ children: [/*#__PURE__*/_jsx(LogoUploader, {
1460
1459
  did: blocklet.meta.did,
1461
- height: "100%",
1462
- width: "100%",
1463
- type: "splash-landscape",
1460
+ height: 400,
1461
+ width: 225,
1462
+ type: "splash-portrait",
1464
1463
  prefix: prefix,
1465
- url: splashLandscapeUrl,
1464
+ url: splashPortraitUrl,
1466
1465
  enabled: hasPermission,
1467
1466
  headers: getSessionInHeader,
1468
- aspectRatio: 16 / 9,
1469
- minWidth: 1600,
1470
- minHeight: 900,
1467
+ aspectRatio: 9 / 16,
1468
+ minWidth: 900,
1469
+ minHeight: 1000,
1471
1470
  allowSVG: false
1472
- })
1473
- })]
1474
- })
1475
- }), /*#__PURE__*/_jsx(Box, {
1476
- className: "config-form",
1477
- component: Divider,
1478
- sx: {
1479
- my: 3
1480
- }
1481
- }), /*#__PURE__*/_jsx(Section, {
1471
+ }), /*#__PURE__*/_jsx(Box, {
1472
+ sx: {
1473
+ width: '100%',
1474
+ maxWidth: 400,
1475
+ aspectRatio: '16 / 9',
1476
+ // 保持比例
1477
+ position: 'relative'
1478
+ },
1479
+ children: /*#__PURE__*/_jsx(LogoUploader, {
1480
+ did: blocklet.meta.did,
1481
+ height: "100%",
1482
+ width: "100%",
1483
+ type: "splash-landscape",
1484
+ prefix: prefix,
1485
+ url: splashLandscapeUrl,
1486
+ enabled: hasPermission,
1487
+ headers: getSessionInHeader,
1488
+ aspectRatio: 16 / 9,
1489
+ minWidth: 1600,
1490
+ minHeight: 900,
1491
+ allowSVG: false
1492
+ })
1493
+ })]
1494
+ })
1495
+ }), /*#__PURE__*/_jsx(Box, {
1496
+ className: "config-form",
1497
+ component: Divider,
1498
+ sx: {
1499
+ my: 3
1500
+ }
1501
+ })]
1502
+ }), (!showFields.length || showFields.includes(BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPLASH_LANDSCAPE)) && /*#__PURE__*/_jsx(Section, {
1482
1503
  title: t('blocklet.config.ogImage'),
1483
1504
  desc: t('blocklet.config.ogImageDesc'),
1484
1505
  children: /*#__PURE__*/_jsx(Box, {
@@ -1530,7 +1551,8 @@ export default function BlockletBrandingWithPermission(props) {
1530
1551
  BlockletBranding.propTypes = {
1531
1552
  blocklet: PropTypes.object.isRequired,
1532
1553
  onUpdate: PropTypes.func,
1533
- hasPermission: PropTypes.bool
1554
+ hasPermission: PropTypes.bool,
1555
+ showFields: PropTypes.array
1534
1556
  };
1535
1557
  const Div = styled(Box)`
1536
1558
  max-width: 1536px;