@@ -15,13 +15,13 @@ import LockIcon from "@mui/icons-material/Lock";
1515import { FormattedMessage , useIntl } from "react-intl" ;
1616import PawIconWithText from "./PawIconWithText" ;
1717
18- type VersionType = "cloud" | "community" | "enterprise" ;
18+ type EditionType = "cloud" | "community" | "enterprise" ;
1919
2020interface Config {
2121 email : string ;
2222 password : string ;
2323 backendUrl : string ;
24- version ?: VersionType ;
24+ edition ?: EditionType ;
2525}
2626
2727interface ConfigFormProps {
@@ -91,8 +91,8 @@ const ConfigForm: React.FC<ConfigFormProps> = ({
9191 let newState = { ...prev , [ name ] : value } ;
9292
9393 // 根据版本类型设置默认值和字段状态
94- if ( name === "version " ) {
95- switch ( value as VersionType ) {
94+ if ( name === "edition " ) {
95+ switch ( value as EditionType ) {
9696 case "cloud" :
9797 newState . backendUrl = "https://www.pawsql.com" ;
9898 newState . email = "" ;
@@ -164,25 +164,25 @@ const ConfigForm: React.FC<ConfigFormProps> = ({
164164 < TextField
165165 select
166166 fullWidth
167- name = "version "
168- label = { formatMessage ( { id : "form.config.version .label" } ) }
167+ name = "edition "
168+ label = { formatMessage ( { id : "form.config.edition .label" } ) }
169169 variant = "outlined"
170170 margin = "normal"
171- value = { formState . version }
171+ value = { formState . edition }
172172 onChange = { handleInputChange }
173173 SelectProps = { {
174174 native : true ,
175175 } }
176176 sx = { { mb : 2 } }
177177 >
178178 < option value = "cloud" >
179- { formatMessage ( { id : "form.config.version .cloud" } ) }
179+ { formatMessage ( { id : "form.config.edition .cloud" } ) }
180180 </ option >
181181 < option value = "community" >
182- { formatMessage ( { id : "form.config.version .community" } ) }
182+ { formatMessage ( { id : "form.config.edition .community" } ) }
183183 </ option >
184184 < option value = "enterprise" >
185- { formatMessage ( { id : "form.config.version .enterprise" } ) }
185+ { formatMessage ( { id : "form.config.edition .enterprise" } ) }
186186 </ option >
187187 </ TextField >
188188
@@ -194,7 +194,7 @@ const ConfigForm: React.FC<ConfigFormProps> = ({
194194 margin = "normal"
195195 value = { formState . backendUrl }
196196 onChange = { handleInputChange }
197- disabled = { formState . version === "cloud" }
197+ disabled = { formState . edition === "cloud" }
198198 InputProps = { {
199199 startAdornment : (
200200 < InputAdornment position = "start" >
@@ -213,7 +213,7 @@ const ConfigForm: React.FC<ConfigFormProps> = ({
213213 margin = "normal"
214214 value = { formState . email }
215215 onChange = { handleInputChange }
216- disabled = { formState . version === "community" }
216+ disabled = { formState . edition === "community" }
217217 InputProps = { {
218218 startAdornment : (
219219 < InputAdornment position = "start" >
@@ -232,7 +232,7 @@ const ConfigForm: React.FC<ConfigFormProps> = ({
232232 margin = "normal"
233233 value = { formState . password }
234234 onChange = { handleInputChange }
235- disabled = { formState . version === "community" }
235+ disabled = { formState . edition === "community" }
236236 InputProps = { {
237237 startAdornment : (
238238 < InputAdornment position = "start" >
@@ -272,7 +272,7 @@ const ConfigForm: React.FC<ConfigFormProps> = ({
272272 fullWidth
273273 onClick = { ( ) =>
274274 openExternalLink (
275- formState . version === "community"
275+ formState . edition === "community"
276276 ? "https://pawsql.com/community"
277277 : "https://www.pawsql.com"
278278 )
@@ -290,7 +290,7 @@ const ConfigForm: React.FC<ConfigFormProps> = ({
290290 transition : "all 0.3s ease" ,
291291 } }
292292 >
293- { formState . version === "community" ? (
293+ { formState . edition === "community" ? (
294294 < FormattedMessage id = "form.config.joinPawSQL.community" />
295295 ) : (
296296 < FormattedMessage id = "form.config.joinPawSQL" />
0 commit comments