itizawa пре 5 година
родитељ
комит
3c198aa478

+ 2 - 0
resource/locales/en_US/admin/admin.json

@@ -46,6 +46,8 @@
     "fixed_by_env_var": "This is fixed by the env var <code>FILE_UPLOAD={{fileUploadType}}</code>.",
     "gcp_label": "GCP",
     "aws_label": "AWS",
+    "local_label": "Local",
+    "gridfs_label": "GridFS",
     "file_upload": "This is for uploading file settings. If you complete file upload settings, file upload function, profile picture function etc will be enabled.",
     "ses_settings":"SES settings",
     "test_connection": "Test connection to mail",

+ 2 - 0
resource/locales/ja_JP/admin/admin.json

@@ -45,6 +45,8 @@
     "file_upload_method":"ファイルアップロード方法",
     "gcp_label": "GCP",
     "aws_label": "AWS",
+    "local_label": "Local",
+    "gridfs_label": "GridFS",
     "fixed_by_env_var": "環境変数 <code>FILE_UPLOAD={{fileUploadType}}</code> により固定されています。",
     "file_upload": "ファイルをアップロードするための設定を行います。ファイルアップロードの設定を完了させると、ファイルアップロード機能、プロフィール写真機能などが有効になります。",
     "ses_settings":"SES設定",

+ 2 - 0
resource/locales/zh_CN/admin/admin.json

@@ -45,6 +45,8 @@
     "file_upload_method":"文件上传方法",
     "gcp_label": "GCP",
     "aws_label": "AWS",
+    "local_label": "Local",
+    "gridfs_label": "GridFS",
 		"fixed_by_env_var": "这是由env var<code>FILE_UPLOAD={{fileUploadType}}</code>修复的。",
     "file_upload": "这是文件上传设定。完成了文件上传设定以后,文件上传功能、档案头像功能将会被开启。",
     "ses_settings":"SES设置",

+ 1 - 10
src/client/js/components/Admin/App/FileUploadSetting.jsx

@@ -16,7 +16,7 @@ function FileUploadSetting(props) {
 
   const { t, adminAppContainer } = props;
   const { fileUploadType } = adminAppContainer.state;
-  const fileUploadTypes = ['aws', 'gcp'];
+  const fileUploadTypes = ['aws', 'gcp', 'local', 'gridfs'];
 
   async function submitHandler() {
     const { t } = props;
@@ -57,7 +57,6 @@ function FileUploadSetting(props) {
                     name="file-upload-type"
                     id={`file-upload-type-radio-${type}`}
                     checked={adminAppContainer.state.fileUploadType === type}
-                    disabled={adminAppContainer.state.isFixedFileUploadByEnvVar}
                     onChange={(e) => {
                     adminAppContainer.changeFileUploadType(type);
                   }}
@@ -67,14 +66,6 @@ function FileUploadSetting(props) {
               );
             })}
         </div>
-        {adminAppContainer.state.isFixedFileUploadByEnvVar && (
-          <p className="alert alert-warning mt-2 text-left offset-3 col-6">
-            <i className="icon-exclamation icon-fw">
-            </i><b>FIXED</b><br />
-            {/* eslint-disable-next-line react/no-danger */}
-            <b dangerouslySetInnerHTML={{ __html: t('admin:app_setting.fixed_by_env_var', { fileUploadType: adminAppContainer.state.envFileUploadType }) }} />
-          </p>
-        )}
       </div>
 
       {fileUploadType === 'aws' && <AwsSetting />}