mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-07 05:55:44 +01:00
use global configuration abstraction to implement global configuration for git
This commit is contained in:
@@ -2,8 +2,9 @@
|
||||
import { binder } from "@scm-manager/ui-extensions";
|
||||
import ProtocolInformation from "./ProtocolInformation";
|
||||
import GitAvatar from "./GitAvatar";
|
||||
import GitConfigurationNavLink from "./GitConfigurationNavLink";
|
||||
import GitConfigurationRoute from "./GitConfigurationRoute";
|
||||
|
||||
import { ConfigurationBinder as cfgBinder } from "@scm-manager/ui-components";
|
||||
import GitGlobalConfiguration from "./GitGlobalConfiguration";
|
||||
|
||||
// repository
|
||||
|
||||
@@ -16,9 +17,4 @@ 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);
|
||||
cfgBinder.bindGlobal("/git", "scm-git-plugin.config.link", "gitConfig", GitGlobalConfiguration);
|
||||
|
||||
Reference in New Issue
Block a user