Standardize settings file naming and relocate documentation files Fix code quality violations from rsx:check Reorganize user_management directory into logical subdirectories Move Quill Bundle to core and align with Tom Select pattern Simplify Site Settings page to focus on core site information Complete Phase 5: Multi-tenant authentication with login flow and site selection Add route query parameter rule and synchronize filename validation logic Fix critical bug in UpdateNpmCommand causing missing JavaScript stubs Implement filename convention rule and resolve VS Code auto-rename conflict Implement js-sanitizer RPC server to eliminate 900+ Node.js process spawns Implement RPC server architecture for JavaScript parsing WIP: Add RPC server infrastructure for JS parsing (partial implementation) Update jqhtml terminology from destroy to stop, fix datagrid DOM preservation Add JQHTML-CLASS-01 rule and fix redundant class names Improve code quality rules and resolve violations Remove legacy fatal error format in favor of unified 'fatal' error type Filter internal keys from window.rsxapp output Update button styling and comprehensive form/modal documentation Add conditional fly-in animation for modals Fix non-deterministic bundle compilation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
95 lines
13 KiB
JavaScript
Executable File
95 lines
13 KiB
JavaScript
Executable File
/* Compiled from: rsx/theme/components/_archived/unfinished/comment_thread.jqhtml */ (function() {
|
|
'use strict';
|
|
|
|
const template_Comment_Thread = {
|
|
_jqhtml_version: '2.2.185',
|
|
name: 'Comment_Thread',
|
|
tag: 'div',
|
|
defaultAttributes: {"class": "card"},
|
|
render: function render(data, args, content, jqhtml) { let _output = []; const _cid = this._cid; const that = this;
|
|
_output.push(" ");_output.push({tag: ["div", {"class": "card-header d-flex justify-content-between align-items-center"}, false]});
|
|
_output.push(" ");_output.push({tag: ["h5", {"class": "mb-0"}, false]}); _output.push("Comments (");_output.push({tag: ["span", {"id": "comment_count" + ":" + this._cid, "data-id": "comment_count"}, false]}); (() => { const result = (this.data.comments || []).length ; if (Array.isArray(result)) { if (result.length === 2 && Array.isArray(result[0])) { _output.push(...result[0]); } else { _output.push(...result); } } else { _output.push(jqhtml.escape_html(result)); } })(); _output.push("</span>"); _output.push(")"); _output.push("</h5>");
|
|
_output.push(" "); _output.push("</div>");
|
|
_output.push({tag: ["div", {"class": "card-body"}, false]});
|
|
_output.push(" ");_output.push({tag: ["div", {"id": "comments" + ":" + this._cid, "data-id": "comments"}, false]});
|
|
_output.push(" "); if (Object.keys(this.data).length === 0) {
|
|
_output.push(" ");_output.push({tag: ["div", {"class": "text-center py-4"}, false]});
|
|
_output.push(" "); _output.push({comp: ["Spinner", {}]});
|
|
_output.push(" "); _output.push("</div>");
|
|
} else if (this.data.comments && this.data.comments.length === 0) {
|
|
_output.push(" "); _output.push({comp: ["Empty_State", {"data-icon": "chat-left-text", "data-title": "No comments yet", "data-message": "Be the first to comment"}]});
|
|
|
|
|
|
|
|
|
|
_output.push(" "); } else {
|
|
_output.push(" "); for (let comment of this.data.comments || []) {
|
|
_output.push(" ");_output.push({tag: ["div", {"class": "d-flex gap-3 mb-4", "data-comment-id": (comment.id)}, false]});
|
|
_output.push(" "); _output.push({comp: ["Avatar", {"data-src": comment.avatar, "data-name": comment.user_name, "data-size": "sm"}]});
|
|
_output.push(" ");_output.push({tag: ["div", {"class": "flex-grow-1"}, false]});
|
|
_output.push(" ");_output.push({tag: ["div", {"class": "bg-light rounded p-3"}, false]});
|
|
_output.push(" ");_output.push({tag: ["div", {"class": "d-flex justify-content-between align-items-start mb-2"}, false]});
|
|
_output.push(" ");_output.push({tag: ["strong", {}, false]}); (() => { const result = comment.user_name ; if (Array.isArray(result)) { if (result.length === 2 && Array.isArray(result[0])) { _output.push(...result[0]); } else { _output.push(...result); } } else { _output.push(jqhtml.escape_html(result)); } })(); _output.push("</strong>");
|
|
_output.push(" ");_output.push({tag: ["small", {"class": "text-muted"}, false]}); (() => { const result = comment.time_ago ; if (Array.isArray(result)) { if (result.length === 2 && Array.isArray(result[0])) { _output.push(...result[0]); } else { _output.push(...result); } } else { _output.push(jqhtml.escape_html(result)); } })(); _output.push("</small>");
|
|
_output.push(" "); _output.push("</div>");
|
|
_output.push({tag: ["div", {}, false]}); (() => { const result = comment.text ; if (Array.isArray(result)) { if (result.length === 2 && Array.isArray(result[0])) { _output.push(...result[0]); } else { _output.push(...result); } } else { _output.push(jqhtml.escape_html(result)); } })(); _output.push("</div>");
|
|
_output.push(" "); _output.push("</div>");
|
|
_output.push({tag: ["div", {"class": "mt-2"}, false]});
|
|
_output.push(" ");_output.push({tag: ["button", {"class": "btn btn-link btn-sm p-0 me-3 reply-btn"}, false]}); _output.push("Reply"); _output.push("</button>");
|
|
_output.push(" "); if (comment.can_edit) {
|
|
_output.push(" ");_output.push({tag: ["button", {"class": "btn btn-link btn-sm p-0 me-3 edit-btn"}, false]}); _output.push("Edit"); _output.push("</button>");
|
|
_output.push(" "); }
|
|
_output.push(" "); if (comment.can_delete) {
|
|
_output.push(" ");_output.push({tag: ["button", {"class": "btn btn-link btn-sm p-0 text-danger delete-btn"}, false]}); _output.push("Delete"); _output.push("</button>");
|
|
_output.push(" "); }
|
|
_output.push(" "); _output.push("</div>");
|
|
if (comment.replies && comment.replies.length > 0) {
|
|
_output.push(" ");_output.push({tag: ["div", {"class": "ms-4 mt-3"}, false]});
|
|
_output.push(" "); for (let reply of comment.replies) {
|
|
_output.push(" ");_output.push({tag: ["div", {"class": "d-flex gap-3 mb-3", "data-comment-id": (reply.id)}, false]});
|
|
_output.push(" "); _output.push({comp: ["Avatar", {"data-src": reply.avatar, "data-name": reply.user_name, "data-size": "xs"}]});
|
|
_output.push(" ");_output.push({tag: ["div", {"class": "flex-grow-1"}, false]});
|
|
_output.push(" ");_output.push({tag: ["div", {"class": "bg-light rounded p-2"}, false]});
|
|
_output.push(" ");_output.push({tag: ["div", {"class": "d-flex justify-content-between align-items-start mb-1"}, false]});
|
|
_output.push(" ");_output.push({tag: ["strong", {"class": "small"}, false]}); (() => { const result = reply.user_name ; if (Array.isArray(result)) { if (result.length === 2 && Array.isArray(result[0])) { _output.push(...result[0]); } else { _output.push(...result); } } else { _output.push(jqhtml.escape_html(result)); } })(); _output.push("</strong>");
|
|
_output.push(" ");_output.push({tag: ["small", {"class": "text-muted"}, false]}); (() => { const result = reply.time_ago ; if (Array.isArray(result)) { if (result.length === 2 && Array.isArray(result[0])) { _output.push(...result[0]); } else { _output.push(...result); } } else { _output.push(jqhtml.escape_html(result)); } })(); _output.push("</small>");
|
|
_output.push(" "); _output.push("</div>");
|
|
_output.push({tag: ["div", {"class": "small"}, false]}); (() => { const result = reply.text ; if (Array.isArray(result)) { if (result.length === 2 && Array.isArray(result[0])) { _output.push(...result[0]); } else { _output.push(...result); } } else { _output.push(jqhtml.escape_html(result)); } })(); _output.push("</div>");
|
|
_output.push(" "); _output.push("</div>");
|
|
_output.push("</div>");
|
|
_output.push("</div>");
|
|
}
|
|
_output.push(" "); _output.push("</div>");
|
|
}
|
|
_output.push(" "); _output.push("</div>");
|
|
_output.push("</div>");
|
|
}
|
|
_output.push(" "); }
|
|
_output.push(" "); _output.push("</div>");
|
|
|
|
_output.push("<!-- New comment form -->");
|
|
_output.push(" ");_output.push({tag: ["div", {"class": "mt-4 pt-4 border-top", "id": "new_comment_form" + ":" + this._cid, "data-id": "new_comment_form"}, false]});
|
|
_output.push(" ");_output.push({tag: ["div", {"class": "d-flex gap-3"}, false]});
|
|
_output.push(" "); _output.push({comp: ["Avatar", {"data-src": this.args.current_user_avatar, "data-name": this.args.current_user_name, "data-size": "sm"}]});
|
|
_output.push(" ");_output.push({tag: ["div", {"class": "flex-grow-1"}, false]});
|
|
_output.push(" ");_output.push({tag: ["textarea", {"class": "form-control mb-2", "rows": "3", "placeholder": "Write a comment...", "id": "comment_input" + ":" + this._cid, "data-id": "comment_input"}, false]}); _output.push("</textarea>");
|
|
_output.push(" "); _output.push({comp: ["Button_Primary", {"id": "submit_btn" + ":" + this._cid, "data-id": "submit_btn"}, function(Button_Primary) { let _output = []; _output.push("Post Comment"); return [_output, this]; }.bind(this)]});
|
|
_output.push(" "); _output.push("</div>");
|
|
_output.push("</div>");
|
|
_output.push("</div>");
|
|
_output.push("</div>");
|
|
return [_output, this]; },
|
|
dependencies: []
|
|
};
|
|
|
|
// Self-register with jqhtml runtime
|
|
// Must use window.jqhtml since we're in bundle scope
|
|
if (!window.jqhtml) {
|
|
throw new Error('FATAL: window.jqhtml is not defined. The jqhtml runtime must be loaded before registering templates.');
|
|
}
|
|
|
|
// Auto-register following standard jqhtml pattern
|
|
window.jqhtml.register_template(template_Comment_Thread);
|
|
})();
|
|
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbW1lbnRfdGhyZWFkLmpxaHRtbCJdLCJzb3VyY2VzQ29udGVudCI6WyI8RGVmaW5lOkNvbW1lbnRfVGhyZWFkIGNsYXNzPVwiY2FyZFwiPlxuICA8ZGl2IGNsYXNzPVwiY2FyZC1oZWFkZXIgZC1mbGV4IGp1c3RpZnktY29udGVudC1iZXR3ZWVuIGFsaWduLWl0ZW1zLWNlbnRlclwiPlxuICAgIDxoNSBjbGFzcz1cIm1iLTBcIj5Db21tZW50cyAoPHNwYW4gJGlkPVwiY29tbWVudF9jb3VudFwiPjwlPSAodGhpcy5kYXRhLmNvbW1lbnRzIHx8IFtdKS5sZW5ndGggJT48L3NwYW4+KTwvaDU+XG4gIDwvZGl2PlxuICA8ZGl2IGNsYXNzPVwiY2FyZC1ib2R5XCI+XG4gICAgPGRpdiAkaWQ9XCJjb21tZW50c1wiPlxuICAgICAgPCUgaWYgKE9iamVjdC5rZXlzKHRoaXMuZGF0YSkubGVuZ3RoID09PSAwKSB7ICU+XG4gICAgICAgIDxkaXYgY2xhc3M9XCJ0ZXh0LWNlbnRlciBweS00XCI+XG4gICAgICAgICAgPFNwaW5uZXIgLz5cbiAgICAgICAgPC9kaXY+XG4gICAgICA8JSB9IGVsc2UgaWYgKHRoaXMuZGF0YS5jb21tZW50cyAmJiB0aGlzLmRhdGEuY29tbWVudHMubGVuZ3RoID09PSAwKSB7ICU+XG4gICAgICAgIDxFbXB0eV9TdGF0ZVxuICAgICAgICAgICRpY29uPVwiY2hhdC1sZWZ0LXRleHRcIlxuICAgICAgIC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0wIG1lLTMgcmVwbHktYnRuXCI+UmVwbHk8L2J1dHRvbj5cbiAgICAgICAgICAgICAgICA8JSBpZiAoY29tbWVudC5jYW5fZWRpdCkgeyAlPlxuICAgICAgICAgICAgICAgICAgPGJ1dHRvbiBjbGFzcz1cImJ0biBidG4tbGluayBidG4tc20gcC0wIG1lLTMgZWRpdC1idG5cIj5FZGl0PC9idXR0b24+XG4gICAgICAgICAgICAgICAgPCUgfSAlPlxuICAgICAgICAgICAgICAgIDwlIGlmIChjb21tZW50LmNhbl9kZWxldGUpIHsgJT5cbiAgICAgICAgICAgICAgICAgIDxidXR0b24gY2xhc3M9XCJidG4gYnRuLWxpbmsgYnRuLXNtIHAtMCB0ZXh0LWRhbmdlciBkZWxldGUtYnRuXCI+RGVsZXRlPC9idXR0b24+XG4gICAgICAgICAgICAgICAgPCUgfSAlPlxuICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgPCUgaWYgKGNvbW1lbnQucmVwbGllcyAmJiBjb21tZW50LnJlcGxpZXMubGVuZ3RoID4gMCkgeyAlPlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJtcy00IG10LTNcIj5cbiAgICAgICAgICAgICAgICAgIDwlIGZvciAobGV0IHJlcGx5IG9mIGNvbW1lbnQucmVwbGllcykgeyAlPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiZC1mbGV4IGdhcC0zIG1iLTNcIiBkYXRhLWNvbW1lbnQtaWQ9XCI8JT0gcmVwbHkuaWQgJT5cIj5cbiAgICAgICAgICAgICAgICAgICAgICA8QXZhdGFyICRzcmM9cmVwbHkuYXZhdGFyICRuYW1lPXJlcGx5LnVzZXJfbmFtZSAkc2l6ZT1cInhzXCIgLz5cbiAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiZmxleC1ncm93LTFcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJiZy1saWdodCByb3VuZGVkIHAtMlwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiZC1mbGV4IGp1c3RpZnktY29udGVudC1iZXR3ZWVuIGFsaWduLWl0ZW1zLXN0YXJ0IG1iLTFcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3Ryb25nIGNsYXNzPVwic21hbGxcIj48JT0gcmVwbHkudXNlcl9uYW1lICU+PC9zdHJvbmc+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPHNtYWxsIGNsYXNzPVwidGV4dC1tdXRlZFwiPjwlPSByZXBseS50aW1lX2FnbyAlPjwvc21hbGw+XG4gICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwic21hbGxcIj48JT0gcmVwbHkudGV4dCAlPjwvZGl2PlxuICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgICAgPCUgfSAlPlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICA8JSB9ICU+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgPCUgfSAlPlxuICAgICAgPCUgfSAlPlxuICAgIDwvZGl2PlxuXG4gICAgPCEtLSBOZXcgY29tbWVudCBmb3JtIC0tPlxuICAgIDxkaXYgY2xhc3M9XCJtdC00IHB0LTQgYm9yZGVyLXRvcFwiICRpZD1cIm5ld19jb21tZW50X2Zvcm1cIj5cbiAgICAgIDxkaXYgY2xhc3M9XCJkLWZsZXggZ2FwLTNcIj5cbiAgICAgICAgPEF2YXRhciAkc3JjPXRoaXMuYXJncy5jdXJyZW50X3VzZXJfYXZhdGFyICRuYW1lPXRoaXMuYXJncy5jdXJyZW50X3VzZXJfbmFtZSAkc2l6ZT1cIn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