2018-09-05 14:41:44 +02:00
|
|
|
// @flow
|
2018-08-24 11:03:35 +02:00
|
|
|
import { binder } from "@scm-manager/ui-extensions";
|
2018-09-05 14:41:44 +02:00
|
|
|
import ProtocolInformation from "./ProtocolInformation";
|
|
|
|
|
import HgAvatar from "./HgAvatar";
|
2018-11-06 16:39:11 +01:00
|
|
|
import { ConfigurationBinder as cfgBinder } from "@scm-manager/ui-components";
|
|
|
|
|
import HgGlobalConfiguration from "./HgGlobalConfiguration";
|
2019-04-01 13:47:41 +02:00
|
|
|
import HgBranchInformation from "./HgBranchInformation";
|
2018-08-24 11:03:35 +02:00
|
|
|
|
|
|
|
|
const hgPredicate = (props: Object) => {
|
|
|
|
|
return props.repository && props.repository.type === "hg";
|
|
|
|
|
};
|
|
|
|
|
|
2019-04-01 13:47:41 +02:00
|
|
|
binder.bind(
|
|
|
|
|
"repos.repository-details.information",
|
|
|
|
|
ProtocolInformation,
|
|
|
|
|
hgPredicate
|
|
|
|
|
);
|
|
|
|
|
binder.bind(
|
|
|
|
|
"repos.branch-details.information",
|
|
|
|
|
HgBranchInformation,
|
|
|
|
|
hgPredicate
|
|
|
|
|
);
|
2018-08-24 11:03:35 +02:00
|
|
|
binder.bind("repos.repository-avatar", HgAvatar, hgPredicate);
|
2018-11-06 16:39:11 +01:00
|
|
|
|
|
|
|
|
// bind global configuration
|
|
|
|
|
|
2019-04-01 13:47:41 +02:00
|
|
|
cfgBinder.bindGlobal(
|
|
|
|
|
"/hg",
|
|
|
|
|
"scm-hg-plugin.config.link",
|
|
|
|
|
"hgConfig",
|
|
|
|
|
HgGlobalConfiguration
|
|
|
|
|
);
|