mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-05-07 17:17:02 +02:00
remove the repository directory from the config ui components
This commit is contained in:
@@ -33,29 +33,19 @@ class GitConfigurationForm extends React.Component<Props, State> {
|
||||
this.state = { ...props.initialConfiguration };
|
||||
}
|
||||
|
||||
isValid = () => {
|
||||
return !!this.state.repositoryDirectory;
|
||||
};
|
||||
|
||||
handleChange = (value: any, name: string) => {
|
||||
this.setState({
|
||||
[name]: value
|
||||
}, () => this.props.onConfigurationChange(this.state, this.isValid()));
|
||||
}, () => this.props.onConfigurationChange(this.state, true));
|
||||
};
|
||||
|
||||
render() {
|
||||
const { repositoryDirectory, gcExpression, disabled } = this.state;
|
||||
const { gcExpression, disabled } = this.state;
|
||||
const { readOnly, t } = this.props;
|
||||
|
||||
return (
|
||||
<>
|
||||
<InputField name="repositoryDirectory"
|
||||
label={t("scm-git-plugin.config.directory")}
|
||||
helpText={t("scm-git-plugin.config.directoryHelpText")}
|
||||
value={repositoryDirectory}
|
||||
onChange={this.handleChange}
|
||||
disabled={readOnly}
|
||||
/>
|
||||
<InputField name="gcExpression"
|
||||
label={t("scm-git-plugin.config.gcExpression")}
|
||||
helpText={t("scm-git-plugin.config.gcExpressionHelpText")}
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
"config": {
|
||||
"link": "Git",
|
||||
"title": "Git Configuration",
|
||||
"directory": "Repository Directory",
|
||||
"directoryHelpText": "Location of the Git repositories.",
|
||||
"gcExpression": "GC Cron Expression",
|
||||
"gcExpressionHelpText": "Use Quartz Cron Expressions (SECOND MINUTE HOUR DAYOFMONTH MONTH DAYOFWEEK) to run git gc in intervals.",
|
||||
"disabled": "Disabled",
|
||||
|
||||
@@ -8,7 +8,6 @@ type Configuration = {
|
||||
"hgBinary": string,
|
||||
"pythonBinary": string,
|
||||
"pythonPath"?: string,
|
||||
"repositoryDirectory": string,
|
||||
"encoding": string,
|
||||
"useOptimizedBytecode": boolean,
|
||||
"showRevisionInId": boolean,
|
||||
@@ -39,7 +38,7 @@ class HgConfigurationForm extends React.Component<Props, State> {
|
||||
|
||||
updateValidationStatus = () => {
|
||||
const requiredFields = [
|
||||
"hgBinary", "pythonBinary", "repositoryDirectory", "encoding"
|
||||
"hgBinary", "pythonBinary", "encoding"
|
||||
];
|
||||
|
||||
const validationErrors = [];
|
||||
@@ -99,7 +98,6 @@ class HgConfigurationForm extends React.Component<Props, State> {
|
||||
{this.inputField("hgBinary")}
|
||||
{this.inputField("pythonBinary")}
|
||||
{this.inputField("pythonPath")}
|
||||
{this.inputField("repositoryDirectory")}
|
||||
{this.inputField("encoding")}
|
||||
{this.checkbox("useOptimizedBytecode")}
|
||||
{this.checkbox("showRevisionInId")}
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
"pythonBinaryHelpText": "Location of Python binary.",
|
||||
"pythonPath": "Python Module Search Path",
|
||||
"pythonPathHelpText": "Python Module Search Path (PYTHONPATH).",
|
||||
"repositoryDirectory": "Repository directory",
|
||||
"repositoryDirectoryHelpText": "Location of Mercurial repositories.",
|
||||
"encoding": "Encoding",
|
||||
"encodingHelpText": "Repository Encoding.",
|
||||
"useOptimizedBytecode": "Optimized Bytecode (.pyo)",
|
||||
|
||||
@@ -5,7 +5,6 @@ import { translate } from "react-i18next";
|
||||
import { InputField, Checkbox, Select } from "@scm-manager/ui-components";
|
||||
|
||||
type Configuration = {
|
||||
repositoryDirectory: string,
|
||||
compatibility: string,
|
||||
enabledGZip: boolean,
|
||||
disabled: boolean,
|
||||
@@ -31,14 +30,11 @@ class HgConfigurationForm extends React.Component<Props, State> {
|
||||
this.state = { ...props.initialConfiguration, validationErrors: [] };
|
||||
}
|
||||
|
||||
isValid = () => {
|
||||
return !!this.state.repositoryDirectory;
|
||||
};
|
||||
|
||||
handleChange = (value: any, name: string) => {
|
||||
this.setState({
|
||||
[name]: value
|
||||
}, () => this.props.onConfigurationChange(this.state, this.isValid()));
|
||||
}, () => this.props.onConfigurationChange(this.state, true));
|
||||
};
|
||||
|
||||
compatibilityOptions = (values: string[]) => {
|
||||
@@ -64,16 +60,6 @@ class HgConfigurationForm extends React.Component<Props, State> {
|
||||
|
||||
return (
|
||||
<>
|
||||
<InputField
|
||||
name="repositoryDirectory"
|
||||
label={t("scm-svn-plugin.config.directory")}
|
||||
helpText={t("scm-svn-plugin.config.directoryHelpText")}
|
||||
value={this.state.repositoryDirectory}
|
||||
errorMessage={t("scm-svn-plugin.config.required")}
|
||||
validationError={!this.state.repositoryDirectory}
|
||||
onChange={this.handleChange}
|
||||
disabled={readOnly}
|
||||
/>
|
||||
<Select
|
||||
name="compatibility"
|
||||
label={t("scm-svn-plugin.config.compatibility")}
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
"config": {
|
||||
"link": "Subversion",
|
||||
"title": "Subversion Configuration",
|
||||
"directory": "Repository Directory",
|
||||
"directoryHelpText": "Location of Subversion repositories.",
|
||||
"compatibility": "Version Compatibility",
|
||||
"compatibilityHelpText": "Specifies with which subversion version repositories are compatible.",
|
||||
"compatibility-values": {
|
||||
|
||||
Reference in New Issue
Block a user