@blocklet/pages-kit 0.2.367 → 0.2.368

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.
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  };
21
21
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
22
  import { LoadingButton } from '@mui/lab';
23
- import { Button, Dialog, DialogActions, DialogContent, DialogTitle, FormLabel, Stack, TextField, } from '@mui/material';
23
+ import { Button, Dialog, DialogActions, DialogContent, DialogTitle, Link, Stack, TextField, Typography, } from '@mui/material';
24
24
  import { useForm } from 'react-hook-form';
25
25
  import { create } from 'zustand';
26
26
  import { immer } from 'zustand/middleware/immer';
@@ -72,5 +72,5 @@ export default function AgentSettingsDialog(_a) {
72
72
  throw error;
73
73
  }
74
74
  });
75
- return (_jsxs(Dialog, Object.assign({ fullWidth: true, maxWidth: "md" }, props, { open: isOpen, onClose: onClose, component: "form", onSubmit: form.handleSubmit(onSubmit), children: [_jsx(DialogTitle, { children: t('settings') }), _jsx(DialogContent, { children: _jsx(Stack, { gap: 1, children: agent.config.secrets.map(({ targetInput, hasValue }, index) => (_jsxs(Stack, { gap: 0.5, children: [_jsx(FormLabel, { children: targetInput.label || targetInput.key }), _jsx(TextField, Object.assign({ type: "password", fullWidth: true, hiddenLabel: true, size: "small", inputProps: { maxLength: 100 }, placeholder: hasValue ? '******' : targetInput.placeholder }, form.register(`secrets.${index}.secret`, { required: true })))] }, targetInput.id))) }) }), _jsxs(DialogActions, { children: [_jsx(Button, { onClick: onClose, children: t('cancel') }), _jsx(LoadingButton, { type: "submit", variant: "contained", loading: form.formState.isSubmitting, children: t('save') })] })] })));
75
+ return (_jsxs(Dialog, Object.assign({ fullWidth: true, maxWidth: "md" }, props, { open: isOpen, onClose: onClose, component: "form", onSubmit: form.handleSubmit(onSubmit), children: [_jsx(DialogTitle, { children: t('settings') }), _jsx(DialogContent, { children: _jsx(Stack, { gap: 1, children: agent.config.secrets.map(({ targetInput, hasValue }, index) => (_jsxs(Stack, { gap: 0.5, children: [_jsxs(Typography, { variant: "caption", children: [targetInput.label || targetInput.key, ' ', targetInput.docLink && (_jsx(Link, { href: targetInput.docLink, target: "_blank", children: t('docLink') }))] }), _jsx(TextField, Object.assign({ autoFocus: index === 0, type: "password", fullWidth: true, hiddenLabel: true, size: "small", inputProps: { maxLength: 100 }, placeholder: hasValue ? '******' : targetInput.placeholder }, form.register(`secrets.${index}.secret`, { required: true })))] }, targetInput.id))) }) }), _jsxs(DialogActions, { children: [_jsx(Button, { onClick: onClose, children: t('cancel') }), _jsx(LoadingButton, { type: "submit", variant: "contained", loading: form.formState.isSubmitting, children: t('save') })] })] })));
76
76
  }
@@ -113,6 +113,7 @@ export const translations = {
113
113
  },
114
114
  settings: 'Settings',
115
115
  setup: 'Setup',
116
+ docLink: 'Document Link',
116
117
  },
117
118
  zh: {
118
119
  by: '作者',
@@ -228,5 +229,6 @@ export const translations = {
228
229
  },
229
230
  settings: '设置',
230
231
  setup: '设置',
232
+ docLink: '文档链接',
231
233
  },
232
234
  };