Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 32c1600

Browse filesBrowse files
author
Dan Hersam
committed
Display content for job items.
I'd like a cleaner way to toggle the 'No comments yet' message, but I don't know how (or if it's possible) to access Item.isJob() from ItemView.
1 parent 4b2a6a0 commit 32c1600
Copy full SHA for 32c1600

File tree

Expand file treeCollapse file tree

2 files changed

+10
-1
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+10
-1
lines changed

‎src/components/Item.vue

Copy file name to clipboardExpand all lines: src/components/Item.vue
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
| <a :href="'#/item/' + item.id">{{item.descendants}} {{item.descendants | pluralize 'comment'}}</a>
1818
</span>
1919
</p>
20+
<p class="jobtext" v-show="isJob" v-html="item.text"></p>
2021
</div>
2122
</template>
2223

@@ -39,6 +40,9 @@ export default {
3940
},
4041
showDomain () {
4142
return this.item.type === 'story'
43+
},
44+
isJob () {
45+
return this.item.type === 'job'
4246
}
4347
}
4448
}
@@ -69,4 +73,9 @@ export default {
6973
color $gray
7074
.subtext a:hover
7175
text-decoration underline
76+
.jobtext
77+
color $gray
78+
padding-top 5px
79+
.jobtext p
80+
margin 10px 0
7281
</style>

‎src/components/ItemView.vue

Copy file name to clipboardExpand all lines: src/components/ItemView.vue
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
:comment="comment">
1414
</comment>
1515
</ul>
16-
<p v-show="!comments.length">No comments yet.</p>
16+
<p v-show="!comments.length && item.type !== 'job'">No comments yet.</p>
1717
</div>
1818
</template>
1919

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.