diff --git a/app/config/locale/en-US.json b/app/config/locale/en-US.json index e90e5d67..f8b84aae 100644 --- a/app/config/locale/en-US.json +++ b/app/config/locale/en-US.json @@ -193,7 +193,8 @@ "fileNotExist": "{name} file does not exist!", "importYaml": "Import the YAML file", "templateMatchError": "The {type} in the configuration does not match the current login account/host", - "uploadSuccessfully": "Upload files successfully." + "uploadSuccessfully": "Upload files successfully.", + "fileSizeLimit": "The file is too large and exceeds the upload limit({size}), please modify the MaxBytes in the startup configuration file and restart the service" }, "schema": { "spaceList": "Graph Space List", @@ -315,7 +316,7 @@ "selectSpace": "Select Space", "noCurrentSketch": "No schema sketch selected", "noCurrentSketchTips": "Please select a schema sketch first", - "sketchInvalid": "The schema sketch is invalid, please check", + "sketchInvalid": "Please complete the current Schema information", "saveSuccess": "Save successfully", "saveReminder": "The current sketch has been modified but not saved, whether to continue to switch sketches?", "saveTip": "The current sketch has been modified but not saved, please save first.", diff --git a/app/config/locale/zh-CN.json b/app/config/locale/zh-CN.json index 55b1f6cb..2431a980 100644 --- a/app/config/locale/zh-CN.json +++ b/app/config/locale/zh-CN.json @@ -193,7 +193,8 @@ "fileNotExist": "文件 {name} 不存在", "importYaml": "导入 YAML 文件", "templateMatchError": "配置中的{type}与当前登录账号/地址不匹配", - "uploadSuccessfully": "上传文件成功" + "uploadSuccessfully": "上传文件成功", + "fileSizeLimit": "文件过大,超过上传限制({size}),请修改启动配置文件中的 MaxBytes 并重启服务" }, "schema": { "spaceList": "图空间列表", @@ -315,7 +316,7 @@ "selectSpace": "选择图空间", "noCurrentSketch": "当前没有选中草图", "noCurrentSketchTips": "请在左侧列表中选择草图", - "sketchInvalid": "当前草图数据格式错误,请检查", + "sketchInvalid": "请完善当前 Schema 信息。", "saveSuccess": "保存成功", "saveReminder": "当前草图有修改未保存,是否继续切换草图?", "saveTip": "当前草图有修改未保存, 请先保存。", diff --git a/app/config/service.ts b/app/config/service.ts index c3903f84..75dac4bd 100644 --- a/app/config/service.ts +++ b/app/config/service.ts @@ -48,7 +48,7 @@ const service = { return get('/api/files')(); }, uploadFiles: (params?, config?) => { - put('/api/files')(params, { ...config, headers: { 'Content-Type': 'multipart/form-data' } }); + return put('/api/files')(params, { ...config, headers: { 'Content-Type': 'multipart/form-data' } }); }, initSketch: (params, config?) => { return post(`/api/sketches/sketch`)(params, config); diff --git a/app/global.d.ts b/app/global.d.ts index e922feec..b7d80b16 100644 --- a/app/global.d.ts +++ b/app/global.d.ts @@ -7,3 +7,8 @@ declare module '*.bmp'; declare module '*.tiff'; declare module '*.less'; +interface Window { + gConfig: { + maxBytes: number + }; +} diff --git a/app/index.html b/app/index.html index f3c75434..4e9900d0 100644 --- a/app/index.html +++ b/app/index.html @@ -1,3 +1,5 @@ +<% var initProps=htmlWebpackPlugin.options.pageInitialProps %> + @@ -8,6 +10,13 @@