Merge with 2.0.0-m3

This commit is contained in:
René Pfeuffer
2018-11-01 12:03:49 +01:00
77 changed files with 1421 additions and 5168 deletions

View File

@@ -48,6 +48,14 @@ class ApiClient {
return this.httpRequestWithJSONBody("PUT", url, contentType, payload);
}
head(url: string) {
let options: RequestOptions = {
method: "HEAD"
};
options = Object.assign(options, fetchOptions);
return fetch(createUrl(url), options).then(handleStatusCode);
}
delete(url: string): Promise<Response> {
let options: RequestOptions = {
method: "DELETE"

View File

@@ -0,0 +1,25 @@
//@flow
import React from "react";
import Button, { type ButtonProps } from "./Button";
import type {File} from "@scm-manager/ui-types";
type Props = {
displayName: string,
url: string
};
class DownloadButton extends React.Component<Props> {
render() {
const {displayName, url} = this.props;
return (
<a className="button is-large is-info" href={url}>
<span className="icon is-medium">
<i className="fas fa-arrow-circle-down" />
</span>
<span>{displayName}</span>
</a>
);
}
}
export default DownloadButton;

View File

@@ -7,4 +7,4 @@ export { default as DeleteButton } from "./DeleteButton.js";
export { default as EditButton } from "./EditButton.js";
export { default as RemoveEntryOfTableButton } from "./RemoveEntryOfTableButton.js";
export { default as SubmitButton } from "./SubmitButton.js";
export {default as DownloadButton} from "./DownloadButton.js";