mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-07 05:55:44 +01:00
implemented git repository type configuration
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
import { binder } from "@scm-manager/ui-extensions";
|
||||
import ProtocolInformation from "./ProtocolInformation";
|
||||
import GitAvatar from "./GitAvatar";
|
||||
import GitConfigurationNavLink from "./GitConfigurationNavLink";
|
||||
import GitConfigurationRoute from "./GitConfigurationRoute";
|
||||
|
||||
// repository
|
||||
|
||||
const gitPredicate = (props: Object) => {
|
||||
return props.repository && props.repository.type === "git";
|
||||
@@ -9,3 +13,12 @@ const gitPredicate = (props: Object) => {
|
||||
|
||||
binder.bind("repos.repository-details.information", ProtocolInformation, gitPredicate);
|
||||
binder.bind("repos.repository-avatar", GitAvatar, gitPredicate);
|
||||
|
||||
// global config
|
||||
|
||||
const gitConfigPredicate = (props: Object) => {
|
||||
return props.links && props.links["gitConfig"];
|
||||
};
|
||||
|
||||
binder.bind("config.navigation", GitConfigurationNavLink, gitConfigPredicate);
|
||||
binder.bind("config.route", GitConfigurationRoute, gitConfigPredicate);
|
||||
|
||||
Reference in New Issue
Block a user