|
|
@@ -11,40 +11,52 @@ import AdminAppContainer from '../../../services/AdminAppContainer';
|
|
|
|
|
|
function GcsSetting(props) {
|
|
|
const { t, adminAppContainer } = props;
|
|
|
- const { gcsUseOnlyEnvVars } = adminAppContainer.state;
|
|
|
+ const { gcsIsEnabledInternalStreamSystem, gcsUseOnlyEnvVars } = adminAppContainer.state;
|
|
|
|
|
|
return (
|
|
|
<>
|
|
|
|
|
|
<div className="row form-group my-3">
|
|
|
- <label
|
|
|
- className="text-left text-md-right col-md-3 col-form-label"
|
|
|
- >
|
|
|
- {t('admin:app_setting.file_read_method')}
|
|
|
+ <label className="text-left text-md-right col-md-3 col-form-label">
|
|
|
+ {t('admin:app_setting.file_delivery_method')}
|
|
|
</label>
|
|
|
- <div className="col-md-6 py-1">
|
|
|
- <div className="custom-control custom-checkbox custom-checkbox-info">
|
|
|
- <input
|
|
|
- type="checkbox"
|
|
|
- id="cbGcsIsEnabledInternalStreamSystem"
|
|
|
- className="custom-control-input"
|
|
|
- name="cbGcsIsEnabledInternalStreamSystem"
|
|
|
- checked={adminAppContainer.state.gcsIsEnabledInternalStreamSystem}
|
|
|
- onChange={(e) => {
|
|
|
- adminAppContainer.changeGcsIsEnabledInternalStreamSystem(e.target.checked);
|
|
|
- }}
|
|
|
- />
|
|
|
- <label
|
|
|
- className="custom-control-label"
|
|
|
- htmlFor="cbGcsIsEnabledInternalStreamSystem"
|
|
|
+
|
|
|
+ <div className="col-md-6">
|
|
|
+ <div className="dropdown">
|
|
|
+ <button
|
|
|
+ className="btn btn-outline-secondary dropdown-toggle"
|
|
|
+ type="button"
|
|
|
+ id="ddGcsIsEnabledInternalStreamSystem"
|
|
|
+ data-toggle="dropdown"
|
|
|
+ aria-haspopup="true"
|
|
|
+ aria-expanded="true"
|
|
|
>
|
|
|
- {t('admin:app_setting.use_gcs_internal_stream_system')}
|
|
|
- </label>
|
|
|
- </div>
|
|
|
+ {gcsIsEnabledInternalStreamSystem && t('admin:app_setting.file_delivery_method_relay')}
|
|
|
+ {!gcsIsEnabledInternalStreamSystem && t('admin:app_setting.file_delivery_method_redirect')}
|
|
|
+ </button>
|
|
|
+ <div className="dropdown-menu" aria-labelledby="ddGcsIsEnabledInternalStreamSystem">
|
|
|
+ <button
|
|
|
+ className="dropdown-item"
|
|
|
+ type="button"
|
|
|
+ onClick={() => { adminAppContainer.changeGcsIsEnabledInternalStreamSystem(true) }}
|
|
|
+ >
|
|
|
+ {t('admin:app_setting.file_delivery_method_relay')}
|
|
|
+ </button>
|
|
|
+ <button
|
|
|
+ className="dropdown-item"
|
|
|
+ type="button"
|
|
|
+ onClick={() => { adminAppContainer.changeGcsIsEnabledInternalStreamSystem(false) }}
|
|
|
+ >
|
|
|
+ { t('admin:app_setting.file_delivery_method_redirect')}
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
|
|
|
- <p className="form-text text-muted">
|
|
|
- {t('admin:app_setting.use_internal_stream_system_info')}
|
|
|
- </p>
|
|
|
+ <p className="form-text text-muted small">
|
|
|
+ {t('admin:app_setting.file_delivery_method_redirect_info')}
|
|
|
+ <br />
|
|
|
+ {t('admin:app_setting.file_delivery_method_relay_info')}
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|