update scm-hg-plugin to use Image from ui-components and types from ui-types

This commit is contained in:
Sebastian Sdorra
2018-09-05 14:41:44 +02:00
parent c64a5a74d6
commit b7610ef025
5 changed files with 49 additions and 9 deletions

View File

@@ -1,5 +1,6 @@
//@flow
import React from 'react';
import React from "react";
import { Image } from "@scm-manager/ui-components";
type Props = {
};
@@ -7,8 +8,7 @@ type Props = {
class HgAvatar extends React.Component<Props> {
render() {
// TODO we have to use Image from ui-components
return <img src="/scm/images/hg-logo.png" alt="Mercurial Logo" />;
return <Image src="/scm/images/hg-logo.png" alt="Mercurial Logo" />;
}
}

View File

@@ -1,9 +1,9 @@
//@flow
import React from 'react';
import React from "react";
import type { Repository } from "@scm-manager/ui-types";
// TODO flow types ???
type Props = {
repository: Object
repository: Repository
}
class ProtocolInformation extends React.Component<Props> {

View File

@@ -1,6 +1,7 @@
// @flow
import { binder } from "@scm-manager/ui-extensions";
import ProtocolInformation from './ProtocolInformation';
import HgAvatar from './HgAvatar';
import ProtocolInformation from "./ProtocolInformation";
import HgAvatar from "./HgAvatar";
const hgPredicate = (props: Object) => {
return props.repository && props.repository.type === "hg";