summaryrefslogtreecommitdiff
path: root/public/assets/js/lib
diff options
context:
space:
mode:
Diffstat (limited to 'public/assets/js/lib')
-rw-r--r--public/assets/js/lib/views/stream/hootstream.js20
1 files changed, 14 insertions, 6 deletions
diff --git a/public/assets/js/lib/views/stream/hootstream.js b/public/assets/js/lib/views/stream/hootstream.js
index 1ab9725..cd25719 100644
--- a/public/assets/js/lib/views/stream/hootstream.js
+++ b/public/assets/js/lib/views/stream/hootstream.js
@@ -388,6 +388,10 @@ var HootStream = View.extend({
thread = thread[0];
const isViewingKeyword = query.keyword === thread.keyword;
const isViewingThread = query.thread === thread.id;
+ const isCompleteThread = !!(
+ thread.file_count === files.length + images.length &&
+ thread.comment_count === comments.length
+ );
// console.log(thread, comments, files, images);
const postedToday = +new Date() / 1000 - thread.lastmodified < 86400;
const age_opacity = get_age_opacity(thread.lastmodified);
@@ -412,15 +416,19 @@ var HootStream = View.extend({
const sortedFiles = this.sortFiles(files, thread.settings?.sort);
const actions = [
- hasAudio && { action: "play", label: "Play music" },
- !isViewingThread && { action: "expand", label: "Expand" },
- { action: "post", label: "Post" },
+ hasAudio && { action: "play", label: "play music", icon: "play" },
+ !isViewingThread &&
+ !isCompleteThread && {
+ action: "expand",
+ label: "expand",
+ icon: "expand",
+ },
+ { action: "post", label: "post", icon: "edit" },
]
.filter((action) => !!action)
.map(
- ({ action, label }) =>
- "<div>&middot;</div>" +
- `<div class="action" data-action="${action}">${label}</div>`
+ ({ action, icon, label }) =>
+ `<div class="action" data-action="${action}" title="${label}">${ICONS[icon]}</div>`
)
.join("");