Commit 05e8404b authored by Phil Hughes's avatar Phil Hughes

Fixed issue with dragging opening the issue sidebar

Added indicator when issue detail is visible
parent 6b3e3aeb
...@@ -12,6 +12,21 @@ ...@@ -12,6 +12,21 @@
disabled: Boolean, disabled: Boolean,
index: Number index: Number
}, },
data () {
return {
showDetail: false,
detailIssue: Store.detail
};
},
computed: {
issueDetailVisible () {
if (this.detailIssue.issue && this.detailIssue.issue.id === this.issue.id) {
return true;
} else {
return false;
}
}
},
methods: { methods: {
filterByLabel (label, e) { filterByLabel (label, e) {
let labelToggleText = label.title; let labelToggleText = label.title;
...@@ -38,8 +53,19 @@ ...@@ -38,8 +53,19 @@
Store.updateFiltersUrl(); Store.updateFiltersUrl();
}, },
mouseDown () {
this.showDetail = true;
},
mouseMove () {
if (this.showDetail) {
this.showDetail = false;
}
},
showIssue () { showIssue () {
Store.detail.issue = this.issue; if (this.showDetail) {
this.showDetail = false;
Vue.set(Store.detail, 'issue', this.issue);
}
} }
} }
}); });
......
...@@ -194,6 +194,10 @@ lex ...@@ -194,6 +194,10 @@ lex
margin-bottom: 5px; margin-bottom: 5px;
} }
&.is-active {
background-color: $row-hover;
}
.label { .label {
border: 0; border: 0;
outline: 0; outline: 0;
......
...@@ -7,9 +7,11 @@ ...@@ -7,9 +7,11 @@
":issue-link-base" => "issueLinkBase", ":issue-link-base" => "issueLinkBase",
":disabled" => "disabled", ":disabled" => "disabled",
"track-by" => "id" } "track-by" => "id" }
%li.card{ ":class" => "{ 'user-can-drag': !disabled && issue.id, 'is-disabled': disabled || !issue.id }", %li.card{ ":class" => "{ 'user-can-drag': !disabled && issue.id, 'is-disabled': disabled || !issue.id, 'is-active': issueDetailVisible }",
":index" => "index", ":index" => "index",
"@click" => "showIssue" } "@mousedown" => "mouseDown",
"@mouseMove" => "mouseMove",
"@mouseup" => "showIssue" }
%h4.card-title %h4.card-title
= icon("eye-slash", class: "confidential-icon", "v-if" => "issue.confidential") = icon("eye-slash", class: "confidential-icon", "v-if" => "issue.confidential")
%a{ ":href" => "issueLinkBase + '/' + issue.id", %a{ ":href" => "issueLinkBase + '/' + issue.id",
......
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