mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 15:35:49 +01:00
update scm-hg-plugin to use Image from ui-components and types from ui-types
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@scm-manager/scm-hg-plugin",
|
"name": "@scm-manager/scm-hg-plugin",
|
||||||
"main": "src/main/js/index.js",
|
"main": "src/main/js/index.js",
|
||||||
|
"license" : "BSD-3-Clause",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "ui-bundler plugin"
|
"build": "ui-bundler plugin"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -67,7 +67,45 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.github.sdorra</groupId>
|
||||||
|
<artifactId>buildfrontend-maven-plugin</artifactId>
|
||||||
|
<version>2.1.0</version>
|
||||||
|
<configuration>
|
||||||
|
<node>
|
||||||
|
<version>8.11.4</version>
|
||||||
|
</node>
|
||||||
|
<pkgManager>
|
||||||
|
<type>YARN</type>
|
||||||
|
<version>1.9.4</version>
|
||||||
|
</pkgManager>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>link-ui-types</id>
|
||||||
|
<phase>process-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>install-link</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<pkg>@scm-manager/ui-types</pkg>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>link-ui-components</id>
|
||||||
|
<phase>process-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>install-link</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<pkg>@scm-manager/ui-components</pkg>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
//@flow
|
//@flow
|
||||||
import React from 'react';
|
import React from "react";
|
||||||
|
import { Image } from "@scm-manager/ui-components";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
};
|
};
|
||||||
@@ -7,8 +8,7 @@ type Props = {
|
|||||||
class HgAvatar extends React.Component<Props> {
|
class HgAvatar extends React.Component<Props> {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
// TODO we have to use Image from ui-components
|
return <Image src="/scm/images/hg-logo.png" alt="Mercurial Logo" />;
|
||||||
return <img src="/scm/images/hg-logo.png" alt="Mercurial Logo" />;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
//@flow
|
//@flow
|
||||||
import React from 'react';
|
import React from "react";
|
||||||
|
import type { Repository } from "@scm-manager/ui-types";
|
||||||
|
|
||||||
// TODO flow types ???
|
|
||||||
type Props = {
|
type Props = {
|
||||||
repository: Object
|
repository: Repository
|
||||||
}
|
}
|
||||||
|
|
||||||
class ProtocolInformation extends React.Component<Props> {
|
class ProtocolInformation extends React.Component<Props> {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
|
// @flow
|
||||||
import { binder } from "@scm-manager/ui-extensions";
|
import { binder } from "@scm-manager/ui-extensions";
|
||||||
import ProtocolInformation from './ProtocolInformation';
|
import ProtocolInformation from "./ProtocolInformation";
|
||||||
import HgAvatar from './HgAvatar';
|
import HgAvatar from "./HgAvatar";
|
||||||
|
|
||||||
const hgPredicate = (props: Object) => {
|
const hgPredicate = (props: Object) => {
|
||||||
return props.repository && props.repository.type === "hg";
|
return props.repository && props.repository.type === "hg";
|
||||||
|
|||||||
Reference in New Issue
Block a user