Better card informations display

This commit is contained in:
wpetit 2019-12-05 17:09:11 +01:00
parent b9ebf29711
commit d510116c4b
5 changed files with 37 additions and 10 deletions

View File

@ -43,9 +43,34 @@ export class BoardPage extends React.Component {
<div className="kanboard-card"> <div className="kanboard-card">
<div className="box"> <div className="box">
<div className="media"> <div className="media">
{
card.issue.assignee ?
<div class="media-left">
<figure class="image is-64x64">
<img src={card.issue.assignee.avatar_url} alt="Image" />
<small>{`@${card.issue.assignee.login}`}</small>
</figure>
</div>
: null
}
<div className="media-content"> <div className="media-content">
<div className="content"> <div className="content">
<h5 className="is-size-5 is-marginless">{card.title}</h5> <p>
<strong>{`#${card.issue.number}`}</strong>&nbsp;
{ card.issue.milestone ? <small>{`- ${card.issue.milestone.title}`}</small> : null }
<br />
<span className="is-size-6">{card.issue.title}</span>
</p>
<div className="level is-mobile">
<div className="level-left"></div>
<div className="level-right">
<a className="level-item" target="_blank" href={card.issue.url.replace('/api/v1/repos', '')}>
<span className="icon is-small has-text-info">
<i className="fas fa-search" aria-hidden="true"></i>
</span>
</a>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -8,9 +8,13 @@ export class BoardCard extends React.PureComponent {
<div className="media"> <div className="media">
<div className="media-content"> <div className="media-content">
<div className="content"> <div className="content">
<p>
<a href={`#/boards/${board.id}`}> <a href={`#/boards/${board.id}`}>
<h3 className="is-size-3">{board.title}</h3> <strong className="is-size-4">{board.title}</strong>
</a> </a>
<br />
{board.description}
</p>
</div> </div>
</div> </div>
</div> </div>

View File

@ -3,7 +3,7 @@ import React from 'react';
export class Navbar extends React.Component { export class Navbar extends React.Component {
render() { render() {
return ( return (
<nav className="navbar" role="navigation" aria-label="main navigation"> <nav className="navbar" role="navigation" aria-label="main navigation" style={{marginBottom: '1.5rem'}}>
<div className="container is-fluid"> <div className="container is-fluid">
<div className="navbar-brand"> <div className="navbar-brand">
<a className="navbar-item" href="#/"> <a className="navbar-item" href="#/">

View File

@ -1,5 +1,6 @@
html, body { html, body {
height: 100%; height: 100%;
background-color: #f7f7f7;
} }
.is-fullheight { .is-fullheight {

View File

@ -64,12 +64,9 @@ function createCards(projects, issues, lane) {
if (hasLabel) { if (hasLabel) {
projectCards.push({ projectCards.push({
id: issue.id, id: issue.id,
title: `#${issue.number} - ${issue.title}`, title: issue.title,
description: "",
project: p, project: p,
labels: issue.labels, issue: issue,
assignee: issue.assignee,
number: issue.number
}); });
} }