From e8e0112df0287fef63e38ffca1121ac2c07fa21b Mon Sep 17 00:00:00 2001 From: Adam Coldrick Date: Sat, 9 May 2020 20:28:42 +0100 Subject: [PATCH] Add more detail to StoryListItem.vue It is useful to see more than just the story name and tags on story lists. This commit extends the StoryListItem component to also include creation and modified timestamps, as well as the story status. --- src/components/StoryListItem.vue | 132 ++++++++++++++++++++++++++---- src/components/UserTabStories.vue | 4 +- 2 files changed, 117 insertions(+), 19 deletions(-) diff --git a/src/components/StoryListItem.vue b/src/components/StoryListItem.vue index d416aa3..2275d23 100644 --- a/src/components/StoryListItem.vue +++ b/src/components/StoryListItem.vue @@ -1,16 +1,64 @@ @@ -23,18 +71,68 @@ export default { background-color: #fff; } - h3 { - margin-top: 0; - font-size: 1.25em; - font-weight: 300; + .header { + display: flex; + justify-content: space-between; + align-items: center; + + h3 { + margin: 0; + font-size: 1.25em; + font-weight: 300; + } + + .story-status-badge { + padding: 6px 12px; + margin: 0 5px; + color: #f7f6f4; + border-radius: 20px; + width: 60px; + text-align: center; + + &.merged { + background-color: #5cb85c; + } + + &.active { + background-color: #5bc0de; + } + + &.invalid { + background-color: #777; + } + } + } + + .metadata { + display: flex; + align-items: center; + + .text-muted { + color: #999; + } + + p { + margin: 0.5em 1em 0 1em; + } + } + + .tags { + margin: 0.5em 0.5em 0 0.5em; + + .tag { + display: inline-block; + padding: 6px 12px; + margin: 0 5px; + background-color: #f0ad4e; + color: #f7f6f4; + border-radius: 20px; + } + } + + .details-wide { + display: flex; + align-items: center; } } - -.tag { - padding: 6px 12px; - margin: 0 5px; - background-color: #f0ad4e; - color: #f7f6f4; - border-radius: 20px; -} diff --git a/src/components/UserTabStories.vue b/src/components/UserTabStories.vue index 034811d..6c2ed0e 100644 --- a/src/components/UserTabStories.vue +++ b/src/components/UserTabStories.vue @@ -2,11 +2,11 @@

Created by {{ user.full_name }}

- +

Assigned to {{ user.full_name }}

- +