Commit e029c224 authored by Phil Hughes's avatar Phil Hughes

Fades out the other boards when marking as done

parent 91500adf
...@@ -7,6 +7,7 @@ Board = Vue.extend ...@@ -7,6 +7,7 @@ Board = Vue.extend
clearSearch: -> clearSearch: ->
this.query = '' this.query = ''
computed: computed:
newDone: -> BoardsStore.state.done
isPreset: -> isPreset: ->
typeof this.board.id != 'number' typeof this.board.id != 'number'
ready: -> ready: ->
......
...@@ -5,11 +5,10 @@ BoardList = Vue.extend ...@@ -5,11 +5,10 @@ BoardList = Vue.extend
filters: Object filters: Object
issues: Array issues: Array
query: String query: String
done: Object
data: -> data: ->
scrollOffset: 20 scrollOffset: 20
loadMore: false loadMore: false
computed:
newDone: -> BoardsStore.state.done
methods: methods:
listHeight: -> this.$els.list.getBoundingClientRect().height listHeight: -> this.$els.list.getBoundingClientRect().height
scrollHeight: -> this.$els.list.scrollHeight scrollHeight: -> this.$els.list.scrollHeight
...@@ -19,6 +18,11 @@ BoardList = Vue.extend ...@@ -19,6 +18,11 @@ BoardList = Vue.extend
setTimeout => setTimeout =>
this.loadMore = false this.loadMore = false
, 2000 , 2000
doneFilter: (issue) ->
if this.boardId is 'done' and this.done?.issue?
issue.id is this.done.issue.id
else
issue
customFilter: (issue) -> customFilter: (issue) ->
returnIssue = issue returnIssue = issue
if this.filters.author?.id if this.filters.author?.id
......
...@@ -37,6 +37,10 @@ ...@@ -37,6 +37,10 @@
height: 100%; height: 100%;
padding-right: ($gl-padding / 2); padding-right: ($gl-padding / 2);
padding-left: ($gl-padding / 2); padding-left: ($gl-padding / 2);
&.is-faded {
opacity: .4;
}
} }
.board-inner { .board-inner {
......
%board{ "inline-template" => true, "v-cloak" => true, "v-for" => "board in state.boards | orderBy 'index'", ":board" => "board" } %board{ "inline-template" => true, "v-cloak" => true, "v-for" => "board in state.boards | orderBy 'index'", ":board" => "board" }
.board{ ":class" => "{ 'is-draggable': !isPreset }" } .board{ ":class" => "{ 'is-draggable': !isPreset, 'is-faded': board.id != 'done' && newDone.issue }" }
.board-inner .board-inner
%header.board-inner-container.board-header{ ":class" => "{ 'has-border': board.label }", ":style" => "{ borderTopColor: board.label.backgroundColor }" } %header.board-inner-container.board-header{ ":class" => "{ 'has-border': board.label }", ":style" => "{ borderTopColor: board.label.backgroundColor }" }
%h3.board-title %h3.board-title
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
%span.sr-only %span.sr-only
Clear search Clear search
= icon("times", class: "board-search-clear") = icon("times", class: "board-search-clear")
%board-list{ "inline-template" => true, ":board-id" => "board.id", ":issues" => "board.issues", ":disabled" => "#{current_user.nil?}", ":query" => "query", ":filters" => "filters" } %board-list{ "inline-template" => true, ":board-id" => "board.id", ":issues" => "board.issues", ":disabled" => "#{current_user.nil?}", ":query" => "query", ":filters" => "filters", ":done" => "newDone" }
%ul.board-list{ "v-el:list" => true, ":data-board" => "boardId", ":class" => "{ 'is-marking-done': boardId == 'done' && newDone.board }" } %ul.board-list{ "v-el:list" => true, ":data-board" => "boardId", ":class" => "{ 'is-marking-done': boardId == 'done' && done.board }" }
= render "projects/boards/components/card" = render "projects/boards/components/card"
%issue-done{ "inline-template" => true, ":done" => "newDone", "v-if" => "boardId == 'done' && newDone.board" } %issue-done{ "inline-template" => true, ":done" => "done", "v-if" => "boardId == 'done' && done.board" }
.board-done .board-done
%p %p
This issue is currently in the following lists: This issue is currently in the following lists:
......
%li.card{ ":data-issue" => "issue.id", "v-for" => "issue in issues | filterBy query in 'title' | filterBy customFilter" } %li.card{ ":data-issue" => "issue.id", "v-for" => "issue in issues | filterBy query in 'title' | filterBy customFilter | filterBy doneFilter" }
%h4.card-title %h4.card-title
%a{ href: "#", ":title" => "issue.title" } %a{ href: "#", ":title" => "issue.title" }
{{ issue.title }} {{ issue.title }}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment