Merged in feature/css_fix_table_styling (pull request #236)

feature/css_fix_table_styling
This commit is contained in:
Sebastian Sdorra
2019-04-18 06:08:41 +00:00
4 changed files with 66 additions and 72 deletions

View File

@@ -40,21 +40,15 @@ class ProfileInfo extends React.Component<Props> {
<table className="table content">
<tbody>
<tr>
<th>
{t("profile.username")}
</th>
<th>{t("profile.username")}</th>
<td>{me.name}</td>
</tr>
<tr>
<th>
{t("profile.displayName")}
</th>
<th>{t("profile.displayName")}</th>
<td>{me.displayName}</td>
</tr>
<tr>
<th>
{t("profile.mail")}
</th>
<th>{t("profile.mail")}</th>
<td>
<MailLink address={me.mail} />
</td>

View File

@@ -1,55 +1,55 @@
//@flow
import React from "react";
import type { Repository } from "@scm-manager/ui-types";
import { MailLink, DateFromNow } from "@scm-manager/ui-components";
import { translate } from "react-i18next";
type Props = {
repository: Repository,
// context props
t: string => string
};
class RepositoryDetailTable extends React.Component<Props> {
render() {
const { repository, t } = this.props;
return (
<table className="table">
<tbody>
<tr>
<td className="has-text-weight-semibold">{t("repository.name")}</td>
<td>{repository.name}</td>
</tr>
<tr>
<td className="has-text-weight-semibold">{t("repository.type")}</td>
<td>{repository.type}</td>
</tr>
<tr>
<td className="has-text-weight-semibold">{t("repository.contact")}</td>
<td>
<MailLink address={repository.contact} />
</td>
</tr>
<tr>
<td className="has-text-weight-semibold">{t("repository.description")}</td>
<td>{repository.description}</td>
</tr>
<tr>
<td className="has-text-weight-semibold">{t("repository.creationDate")}</td>
<td>
<DateFromNow date={repository.creationDate} />
</td>
</tr>
<tr>
<td className="has-text-weight-semibold">{t("repository.lastModified")}</td>
<td>
<DateFromNow date={repository.lastModified} />
</td>
</tr>
</tbody>
</table>
);
}
}
export default translate("repos")(RepositoryDetailTable);
//@flow
import React from "react";
import type { Repository } from "@scm-manager/ui-types";
import { MailLink, DateFromNow } from "@scm-manager/ui-components";
import { translate } from "react-i18next";
type Props = {
repository: Repository,
// context props
t: string => string
};
class RepositoryDetailTable extends React.Component<Props> {
render() {
const { repository, t } = this.props;
return (
<table className="table">
<tbody>
<tr>
<th>{t("repository.name")}</th>
<td>{repository.name}</td>
</tr>
<tr>
<th>{t("repository.type")}</th>
<td>{repository.type}</td>
</tr>
<tr>
<th>{t("repository.contact")}</th>
<td>
<MailLink address={repository.contact} />
</td>
</tr>
<tr>
<th>{t("repository.description")}</th>
<td>{repository.description}</td>
</tr>
<tr>
<th>{t("repository.creationDate")}</th>
<td>
<DateFromNow date={repository.creationDate} />
</td>
</tr>
<tr>
<th>{t("repository.lastModified")}</th>
<td>
<DateFromNow date={repository.lastModified} />
</td>
</tr>
</tbody>
</table>
);
}
}
export default translate("repos")(RepositoryDetailTable);

View File

@@ -16,37 +16,37 @@ class Details extends React.Component<Props> {
<table className="table">
<tbody>
<tr>
<td className="has-text-weight-semibold">{t("user.name")}</td>
<th>{t("user.name")}</th>
<td>{user.name}</td>
</tr>
<tr>
<td className="has-text-weight-semibold">{t("user.displayName")}</td>
<th>{t("user.displayName")}</th>
<td>{user.displayName}</td>
</tr>
<tr>
<td className="has-text-weight-semibold">{t("user.mail")}</td>
<th>{t("user.mail")}</th>
<td>
<MailLink address={user.mail} />
</td>
</tr>
<tr>
<td className="has-text-weight-semibold">{t("user.active")}</td>
<th>{t("user.active")}</th>
<td>
<Checkbox checked={user.active} />
</td>
</tr>
<tr>
<td className="has-text-weight-semibold">{t("user.type")}</td>
<th>{t("user.type")}</th>
<td>{user.type}</td>
</tr>
<tr>
<td className="has-text-weight-semibold">{t("user.creationDate")}</td>
<th>{t("user.creationDate")}</th>
<td>
<DateFromNow date={user.creationDate} />
</td>
</tr>
<tr>
<td className="has-text-weight-semibold">{t("user.lastModified")}</td>
<th>{t("user.lastModified")}</th>
<td>
<DateFromNow date={user.lastModified} />
</td>

View File

@@ -165,7 +165,7 @@ $fa-font-path: "webfonts";
// tables
.table {
width: 100%;
td {
td, th {
border-color: #eee;
padding: 1rem;
}