Skip to content

Commit 16604d7

Browse files
committed
Adjust document titles
Squash commits of branch feature/show_title: - Adjust document titles
1 parent e86029a commit 16604d7

File tree

5 files changed

+1286
-2404
lines changed

5 files changed

+1286
-2404
lines changed

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ dependencies {
2424
}
2525

2626
scmPlugin {
27-
scmVersion = "3.3.0"
27+
scmVersion = "3.7.0"
2828
displayName = "LDAP"
2929
description = "Authentication for SCM-Manager using LDAP"
3030
author = "Thorsten Ludewig"

gradle/changelog/show_title.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- type: added
2+
description: Descriptive document titles

package.json

+67-66
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,69 @@
11
{
2-
"name": "@scm-manager/scm-ldap-plugin",
3-
"private": true,
4-
"version": "3.0.1-SNAPSHOT",
5-
"license": "AGPL-3.0-only",
6-
"main": "./src/main/js/index.ts",
7-
"scripts": {
8-
"build": "plugin-scripts build",
9-
"watch": "plugin-scripts watch",
10-
"postinstall": "plugin-scripts postinstall"
11-
},
12-
"dependencies": {
13-
"@scm-manager/ui-components": "3.3.0",
14-
"@scm-manager/ui-extensions": "3.3.0",
15-
"@scm-manager/ui-plugins": "3.3.0",
16-
"classnames": "^2.2.6",
17-
"query-string": "6.14.1",
18-
"react": "17",
19-
"react-i18next": "11",
20-
"react-redux": "^5.0.7",
21-
"react-router-dom": "^5.3.1",
22-
"redux": "^4.0.0",
23-
"styled-components": "^5.3.5",
24-
"react-dom": "17",
25-
"react-router": "^5.3.1",
26-
"@scm-manager/ui-api": "3.3.0",
27-
"@scm-manager/ui-forms": "3.3.0",
28-
"@scm-manager/ui-buttons": "3.3.0",
29-
"@scm-manager/ui-overlays": "3.3.0",
30-
"@scm-manager/ui-layout": "3.3.0",
31-
"react-hook-form": "^7.5.1",
32-
"react-query": "^3.25.1"
33-
},
34-
"babel": {
35-
"presets": [
36-
"@scm-manager/babel-preset"
37-
]
38-
},
39-
"jest": {
40-
"preset": "@scm-manager/jest-preset"
41-
},
42-
"prettier": "@scm-manager/prettier-config",
43-
"eslintConfig": {
44-
"extends": "@scm-manager/eslint-config"
45-
},
46-
"devDependencies": {
47-
"@scm-manager/babel-preset": "^2.13.1",
48-
"@scm-manager/eslint-config": "^2.17.0",
49-
"@scm-manager/jest-preset": "^2.13.0",
50-
"@scm-manager/plugin-scripts": "^1.2.2",
51-
"@scm-manager/prettier-config": "^2.10.1",
52-
"@scm-manager/tsconfig": "^2.13.0",
53-
"@scm-manager/ui-tests": "3.3.0",
54-
"@scm-manager/ui-types": "3.3.0",
55-
"@types/classnames": "^2.2.9",
56-
"@types/enzyme": "^3.10.3",
57-
"@types/fetch-mock": "^7.3.1",
58-
"@types/i18next": "^13.0.0",
59-
"@types/jest": "^24.0.19",
60-
"@types/query-string": "5",
61-
"@types/react": "^17.0.1",
62-
"@types/react-redux": "5.0.7",
63-
"@types/react-router-dom": "^5.3.3",
64-
"@types/styled-components": "^5.1.25",
65-
"jest": "^24.9.0",
66-
"@scm-manager/ui-scripts": "^2.14.0"
67-
}
2+
"name": "@scm-manager/scm-ldap-plugin",
3+
"private": true,
4+
"version": "3.0.1-SNAPSHOT",
5+
"license": "AGPL-3.0-only",
6+
"main": "./src/main/js/index.ts",
7+
"scripts": {
8+
"build": "plugin-scripts build",
9+
"watch": "plugin-scripts watch",
10+
"postinstall": "plugin-scripts postinstall"
11+
},
12+
"dependencies": {
13+
"@scm-manager/ui-components": "3.7.0",
14+
"@scm-manager/ui-extensions": "3.7.0",
15+
"@scm-manager/ui-plugins": "3.7.0",
16+
"classnames": "^2.3.1",
17+
"query-string": "6.14.1",
18+
"react": "^17.0.1",
19+
"react-i18next": "11",
20+
"react-redux": "^5.0.7",
21+
"react-router-dom": "^5.3.1",
22+
"redux": "^4.0.0",
23+
"styled-components": "^5.3.5",
24+
"react-dom": "^17.0.1",
25+
"react-router": "^5.3.1",
26+
"@scm-manager/ui-api": "3.7.0",
27+
"@scm-manager/ui-forms": "3.7.0",
28+
"@scm-manager/ui-buttons": "3.7.0",
29+
"@scm-manager/ui-overlays": "3.7.0",
30+
"@scm-manager/ui-layout": "3.7.0",
31+
"react-hook-form": "^7.33.1",
32+
"react-query": "^3.39.2",
33+
"@scm-manager/ui-core": "3.7.0"
34+
},
35+
"babel": {
36+
"presets": [
37+
"@scm-manager/babel-preset"
38+
]
39+
},
40+
"jest": {
41+
"preset": "@scm-manager/jest-preset"
42+
},
43+
"prettier": "@scm-manager/prettier-config",
44+
"eslintConfig": {
45+
"extends": "@scm-manager/eslint-config"
46+
},
47+
"devDependencies": {
48+
"@scm-manager/babel-preset": "^2.13.1",
49+
"@scm-manager/eslint-config": "^2.17.0",
50+
"@scm-manager/jest-preset": "^2.14.1",
51+
"@scm-manager/plugin-scripts": "^1.6.1",
52+
"@scm-manager/prettier-config": "^2.12.0",
53+
"@scm-manager/tsconfig": "^2.13.0",
54+
"@scm-manager/ui-tests": "3.7.0",
55+
"@scm-manager/ui-types": "3.7.0",
56+
"@types/classnames": "^2.3.1",
57+
"@types/enzyme": "^3.10.18",
58+
"@types/fetch-mock": "^7.3.1",
59+
"@types/i18next": "^13.0.0",
60+
"@types/jest": "^26.0.24",
61+
"@types/query-string": "5",
62+
"@types/react": "^17.0.1",
63+
"@types/react-redux": "5.0.7",
64+
"@types/react-router-dom": "^5.3.3",
65+
"@types/styled-components": "^5.1.25",
66+
"jest": "^26.6.3",
67+
"@scm-manager/ui-scripts": "^2.14.0"
68+
}
6869
}

src/main/js/LdapConfiguration.tsx

+16-15
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,26 @@
1414
* along with this program. If not, see https://www.gnu.org/licenses/.
1515
*/
1616

17-
import React from "react";
17+
import React, {FC} from "react";
1818
import { Title, Configuration } from "@scm-manager/ui-components";
1919
import LdapConfigurationForm from "./LdapConfigurationForm";
20-
import { withTranslation, WithTranslation } from "react-i18next";
20+
import { useTranslation } from "react-i18next";
21+
import { useDocumentTitle } from "@scm-manager/ui-core";
2122

22-
type Props = WithTranslation & {
23+
type Props = {
2324
link: string;
2425
};
2526

26-
class LdapConfiguration extends React.Component<Props> {
27-
render(): React.ReactNode {
28-
const { t, link } = this.props;
29-
return (
30-
<>
31-
<Title title={t("scm-ldap-plugin.form.header")} />
32-
<Configuration link={link} t={t} render={props => <LdapConfigurationForm {...props} />} />
33-
</>
34-
);
35-
}
36-
}
27+
const LdapConfiguration: FC<Props> = ({ link }) => {
28+
const [t] = useTranslation("plugins");
29+
useDocumentTitle(t("scm-ldap-plugin.nav-link"));
3730

38-
export default withTranslation("plugins")(LdapConfiguration);
31+
return (
32+
<>
33+
<Title title={t("scm-ldap-plugin.form.header")} />
34+
<Configuration link={link} render={props => <LdapConfigurationForm {...props} />} />
35+
</>
36+
);
37+
};
38+
39+
export default LdapConfiguration;

0 commit comments

Comments
 (0)