Files
SCM-Manager/scm-plugins/scm-hg-plugin/src/main/js/index.js

33 lines
841 B
JavaScript
Raw Normal View History

// @flow
import { binder } from "@scm-manager/ui-extensions";
import ProtocolInformation from "./ProtocolInformation";
import HgAvatar from "./HgAvatar";
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";
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
);
binder.bind("repos.repository-avatar", HgAvatar, hgPredicate);
// bind global configuration
2019-04-01 13:47:41 +02:00
cfgBinder.bindGlobal(
"/hg",
"scm-hg-plugin.config.link",
"hgConfig",
HgGlobalConfiguration
);