mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 07:25:44 +01:00
apply eslint and prettier rules
This commit is contained in:
@@ -15,27 +15,15 @@ class BranchButtonGroup extends React.Component<Props> {
|
||||
render() {
|
||||
const { repository, branch, t } = this.props;
|
||||
|
||||
const changesetLink = `/repo/${repository.namespace}/${
|
||||
repository.name
|
||||
}/branch/${encodeURIComponent(branch.name)}/changesets/`;
|
||||
const sourcesLink = `/repo/${repository.namespace}/${
|
||||
repository.name
|
||||
}/sources/${encodeURIComponent(branch.name)}/`;
|
||||
const changesetLink = `/repo/${repository.namespace}/${repository.name}/branch/${encodeURIComponent(
|
||||
branch.name
|
||||
)}/changesets/`;
|
||||
const sourcesLink = `/repo/${repository.namespace}/${repository.name}/sources/${encodeURIComponent(branch.name)}/`;
|
||||
|
||||
return (
|
||||
<ButtonAddons>
|
||||
<Button
|
||||
link={changesetLink}
|
||||
icon="exchange-alt"
|
||||
label={t("branch.commits")}
|
||||
reducedMobile={true}
|
||||
/>
|
||||
<Button
|
||||
link={sourcesLink}
|
||||
icon="code"
|
||||
label={t("branch.sources")}
|
||||
reducedMobile={true}
|
||||
/>
|
||||
<Button link={changesetLink} icon="exchange-alt" label={t("branch.commits")} reducedMobile={true} />
|
||||
<Button link={sourcesLink} icon="code" label={t("branch.sources")} reducedMobile={true} />
|
||||
</ButtonAddons>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -18,8 +18,7 @@ class BranchDetail extends React.Component<Props> {
|
||||
return (
|
||||
<div className="media">
|
||||
<div className="media-content subtitle">
|
||||
<strong>{t("branch.name")}</strong> {branch.name}{" "}
|
||||
<DefaultBranchTag defaultBranch={branch.defaultBranch} />
|
||||
<strong>{t("branch.name")}</strong> {branch.name} <DefaultBranchTag defaultBranch={branch.defaultBranch} />
|
||||
</div>
|
||||
<div className="media-right">
|
||||
<BranchButtonGroup repository={repository} branch={branch} />
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
import React from "react";
|
||||
import { translate } from "react-i18next";
|
||||
import { Repository, Branch, BranchRequest } from "@scm-manager/ui-types";
|
||||
import {
|
||||
Select,
|
||||
InputField,
|
||||
SubmitButton,
|
||||
validation as validator
|
||||
} from "@scm-manager/ui-components";
|
||||
import { Select, InputField, SubmitButton, validation as validator } from "@scm-manager/ui-components";
|
||||
import { orderBranches } from "../util/orderBranches";
|
||||
|
||||
type Props = {
|
||||
@@ -41,11 +36,7 @@ class BranchForm extends React.Component<Props, State> {
|
||||
|
||||
isValid = () => {
|
||||
const { source, name } = this.state;
|
||||
return !(
|
||||
this.state.nameValidationError ||
|
||||
this.isFalsy(source) ||
|
||||
this.isFalsy(name)
|
||||
);
|
||||
return !(this.state.nameValidationError || this.isFalsy(source) || this.isFalsy(name));
|
||||
};
|
||||
|
||||
submit = (event: Event) => {
|
||||
|
||||
Reference in New Issue
Block a user