added heading forum

This commit is contained in:
Sukhamjot Singh 2022-07-13 22:27:00 +05:30
parent 89d3a7285a
commit ba89e00ecf
2 changed files with 13 additions and 2 deletions

View File

@ -50,7 +50,7 @@ async function parseFile(file, type) {
const reader = new FileReader();
const blob = await _file.slice(_offset, length + _offset);
reader.onload = readEventHandler;
await reader.readAsText(blob);
await reader.readAsDataURL(blob);
};
// read with the first block

View File

@ -3,7 +3,17 @@ const rs = require('rswebui');
const util = require('forums/forums_util');
const ThreadView = () => {
return {
let thread = {};
return {
oninit: (v) => {
if (
util.Data.ParentThreads[v.attrs.forumId] &&
util.Data.ParentThreads[v.attrs.forumId][v.attrs.msgId]
) {
thread = util.Data.ParentThreads[v.attrs.forumId][v.attrs.msgId];
}
},
view: (v) =>
m('.widget', { key: v.attrs.msgId }, [
m(
@ -17,6 +27,7 @@ const ThreadView = () => {
},
m('i.fas.fa-arrow-left')
),
m('h3', thread.mMsgName),
]),
};
};