mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-02 03:25:56 +01:00
34 lines
937 B
TypeScript
34 lines
937 B
TypeScript
import React from "react";
|
|
import { WithTranslation, withTranslation } from "react-i18next";
|
|
import ArrayConfigTable from "./ArrayConfigTable";
|
|
|
|
type Props = WithTranslation & {
|
|
proxyExcludes: string[];
|
|
onChange: (p1: boolean, p2: any, p3: string) => void;
|
|
disabled: boolean;
|
|
};
|
|
|
|
type State = {};
|
|
|
|
class ProxyExcludesTable extends React.Component<Props, State> {
|
|
render() {
|
|
const { proxyExcludes, disabled, t } = this.props;
|
|
return (
|
|
<ArrayConfigTable
|
|
items={proxyExcludes}
|
|
label={t("proxy-settings.proxy-excludes")}
|
|
removeLabel={t("proxy-settings.remove-proxy-exclude-button")}
|
|
onRemove={this.removeEntry}
|
|
disabled={disabled}
|
|
helpText={t("help.proxyExcludesHelpText")}
|
|
/>
|
|
);
|
|
}
|
|
|
|
removeEntry = (newExcludes: string[]) => {
|
|
this.props.onChange(true, newExcludes, "proxyExcludes");
|
|
};
|
|
}
|
|
|
|
export default withTranslation("config")(ProxyExcludesTable);
|