Support replying to a thread.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3726 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2021-12-31 19:01:53 +00:00
parent 4e359c3f5c
commit 3026443c1e
4 changed files with 15 additions and 1 deletions

View File

@@ -17,6 +17,10 @@ Vue.component('tf-message', {
var writer = new commonmark.HtmlRenderer();
return writer.render(reader.parse(md));
},
set_reply: function() {
g_data.reply_root = this.content_json.root || this.message.id;
g_data.reply_branch = this.message.id;
}
},
template: `<md-app class="md-elevation-8" style="margin: 1em" v-if="!content_json || ['pub', 'vote'].indexOf(content_json.type) == -1">
<md-app-toolbar>
@@ -30,6 +34,7 @@ Vue.component('tf-message', {
<md-menu-content>
<md-menu-item v-if="!showRaw" v-on:click="showRaw = true">View Raw</md-menu-item>
<md-menu-item v-else v-on:click="showRaw = false">View Message</md-menu-item>
<md-menu-item @click="set_reply()">Reply</md-menu-item>
</md-menu-content>
</md-menu>
</div>