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";
|
2018-08-24 11:03:35 +02:00
|
|
|
|
|
|
|
|
const hgPredicate = (props: Object) => {
|
|
|
|
|
return props.repository && props.repository.type === "hg";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
binder.bind("repos.repository-details.information", ProtocolInformation, hgPredicate);
|
|
|
|
|
binder.bind("repos.repository-avatar", HgAvatar, hgPredicate);
|
2018-11-06 16:39:11 +01:00
|
|
|
|
|
|
|
|
// bind global configuration
|
|
|
|
|
|
|
|
|
|
cfgBinder.bindGlobal("/hg", "scm-hg-plugin.config.link", "hgConfig", HgGlobalConfiguration);
|