This commit is contained in:
@@ -7,6 +7,7 @@ module.exports = class {
|
||||
nameSuffix: "",
|
||||
modal: null,
|
||||
removed: false,
|
||||
multipart: false,
|
||||
}
|
||||
|
||||
this.updatePost(input)
|
||||
@@ -38,6 +39,9 @@ module.exports = class {
|
||||
return
|
||||
}
|
||||
|
||||
const timediff = Date.parse(input.post.time) - Date.parse(input.prev.time)
|
||||
this.state.multipart = (input.post.nick == input.prev.nick && input.prev.multipart !== false) && (Math.abs(timediff) < 60000);
|
||||
|
||||
this.updatePost(input)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
$ const multipart = (input.post.nick == input.prev.nick && input.prev.multipart !== false);
|
||||
|
||||
<div if(!state.removed) class=["post", component.kindClass("post-type"), multipart ? "multipart" : null]>
|
||||
<div if(!state.removed) class=["post", component.kindClass("post-type"), state.multipart ? "multipart" : null]>
|
||||
<div class="post-meta-row">
|
||||
<div class="options color-menu">
|
||||
<if-permitted user=input.user permission="post.move">
|
||||
@@ -26,7 +24,7 @@ $ const multipart = (input.post.nick == input.prev.nick && input.prev.multipart
|
||||
<markdown class="post-content post-scene" source=state.text />
|
||||
</div>
|
||||
<div if(input.post.kind === "action") class="post-body color-text">
|
||||
$ const prefix = (!multipart ? state.shortName + state.nameSuffix + " " : "");
|
||||
$ const prefix = (!state.multipart ? state.shortName + state.nameSuffix + " " : "");
|
||||
<markdown class="post-content post-action" source=(prefix + state.text) />
|
||||
</div>
|
||||
<div if(input.post.kind === "text") class="post-body color-text">
|
||||
|
||||
Reference in New Issue
Block a user