Commit f504fc77 authored by Eric Eastwood's avatar Eric Eastwood

Use computed property for issue_token state classes

parent d056bcee
......@@ -47,6 +47,12 @@ export default {
hasState() {
return this.state && this.state.length > 0;
},
isOpen() {
return this.state === 'opened' || this.state === 'reopened';
},
isClosed() {
return this.state === 'closed';
},
hasTitle() {
return this.title.length > 0;
},
......@@ -101,8 +107,8 @@ export default {
v-if="hasState"
class="fa"
:class="{
'issue-token-state-icon-open fa-circle-o': state === 'opened' || state === 'reopened',
'issue-token-state-icon-closed fa-minus': state === 'closed',
'issue-token-state-icon-open fa-circle-o': isOpen,
'issue-token-state-icon-closed fa-minus': isClosed,
}"
:aria-label="state">
</i>
......
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