Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
acee686
wrap helpers that return html with {{}]
barisusakli Jun 10, 2026
204867c
dropdowncontent is html
barisusakli Jun 10, 2026
a4e1dc0
fix: dont escape post content
barisusakli Jun 10, 2026
923beea
descriptionParsed is also html
barisusakli Jun 10, 2026
ddbfd1f
refactor: move topic meta tags to core
barisusakli Jun 11, 2026
ca0394b
fix about me and deleted topic titles via new helper
barisusakli Jun 11, 2026
821d0f9
fix helper name
barisusakli Jun 11, 2026
b542a30
temp: link
barisusakli Jun 11, 2026
ccb9a6b
back to normal browserTitle
barisusakli Jun 11, 2026
98cb140
fix topic event
barisusakli Jun 11, 2026
ea63f75
use tx
barisusakli Jun 11, 2026
4c5fbea
fix necro post
barisusakli Jun 12, 2026
a37a44c
fix breadcrumbs up compat
barisusakli Jun 12, 2026
70a3b41
3.0.0-beta.1
barisusakli Jun 12, 2026
f22f067
fix more escapes
barisusakli Jun 12, 2026
26f2fb3
fix drafts
barisusakli Jun 12, 2026
65faeae
remove manual escape
barisusakli Jun 12, 2026
4ce5576
fix profile links
barisusakli Jun 12, 2026
10229d3
remove generateTopicTitle
barisusakli Jun 12, 2026
49696fa
more tx fixes
barisusakli Jun 12, 2026
d98a3d7
fix mobile nav
barisusakli Jun 12, 2026
5e56604
some more fixes
barisusakli Jun 14, 2026
859e0cb
fix icon for fa7
barisusakli Jun 14, 2026
735b6d5
remove span
barisusakli Jun 15, 2026
fbc5909
Merge branch 'main' into benchpress-escape
barisusakli Jun 15, 2026
47ae319
move group tpls to core
barisusakli Jun 15, 2026
447ad49
move cover toast to core
barisusakli Jun 15, 2026
1eca90a
remove txEscape
barisusakli Jun 15, 2026
be93aed
show category label for drafts
barisusakli Jun 16, 2026
0e48d98
fix escapes
barisusakli Jun 16, 2026
b9bcf42
move groups to core
barisusakli Jun 16, 2026
378cb81
3.0.0-beta.2
barisusakli Jun 16, 2026
5572cf0
txEscape post list item
barisusakli Jun 16, 2026
11873ea
txescape post content
barisusakli Jun 16, 2026
ba4ef0f
account info
barisusakli Jun 16, 2026
d0ed5b1
fix noItemsFoundKey
barisusakli Jun 17, 2026
61a8980
more fixes
barisusakli Jun 17, 2026
ca2311c
use modals lib
barisusakli Jun 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "nodebb-theme-harmony",
"version": "2.2.72",
"version": "3.0.0-beta.2",
"nbbpm": {
"compatibility": "^4.12.0"
"compatibility": "^4.14.0"
},
"description": "Harmony theme for NodeBB",
"main": "library.js",
Expand Down
22 changes: 10 additions & 12 deletions public/harmony.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ $(document).ready(function () {
}

function setupDrafts() {
require(['composer/drafts', 'bootbox'], function (drafts, bootbox) {
require(['composer/drafts', 'modals', 'api'], function (drafts, modals, api) {
const draftsEl = $('[component="sidebar/drafts"]');
const bottomBarDraftsEl = $('[component="bottombar"] [component="sidebar/drafts"]');
function updateBadgeCount() {
Expand All @@ -159,17 +159,15 @@ $(document).ready(function () {
draftListEl.find('.draft-item-container').html('');
return;
}
draftItems.reverse().forEach((draft) => {
if (draft) {
if (draft.title) {
draft.title = utils.escapeHTML(String(draft.title));
}
draft.text = utils.escapeHTML(
draft.text
).replace(/(?:\r\n|\r|\n)/g, '<br>');
draftItems.reverse();
await Promise.all(draftItems.map(async (item) => {
const cid = String(item.cid);
if (item && item.action === 'topics.post' && cid !== '0') {
const categoryUrl = cid !== '-1' ?
`/api/category/${encodeURIComponent(cid)}` : `/api/world`;
item.category = await api.get(categoryUrl, {});
}
});

}));
const html = await app.parseAndTranslate('partials/sidebar/drafts', 'drafts', { drafts: draftItems });
draftListEl.find('.no-drafts').addClass('hidden');
draftListEl.find('.placeholder-wave').addClass('hidden');
Expand All @@ -185,7 +183,7 @@ $(document).ready(function () {

draftsEl.on('click', '[component="drafts/delete"]', function () {
const save_id = $(this).attr('data-save-id');
bootbox.confirm({
modals.confirm({
title: '[[modules:bootbox.confirm]]',
message: '[[modules:composer.discard-draft-confirm]]',
callback: function (ok) {
Expand Down
20 changes: 0 additions & 20 deletions scss/groups.scss

This file was deleted.

2 changes: 0 additions & 2 deletions scss/harmony.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
@import "mobilebar";
@import "status";
@import "account";
@import "groups";
@import "world";
@import "modals";

Expand All @@ -19,7 +18,6 @@
@import "modules/user-menu";
@import "modules/topic-navigator";
@import "modules/topics-list";
@import "modules/cover";
@import "modules/nprogress";
@import "modules/paginator";
@import "modules/filters";
Expand Down
104 changes: 0 additions & 104 deletions scss/modules/cover.scss

This file was deleted.

2 changes: 1 addition & 1 deletion templates/account/blocks.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<li component="blocks/search/match">
<div class="dropdown-item rounded-1 d-flex flex-nowrap gap-4 justify-content-between align-items-center" role="menuitem">
<div class="text-truncate">
<a href="{config.relative_path}/uid/{./uid}" class="text-decoration-none">{buildAvatar(edit, "24px", true)} {./username}</a>
<a href="{config.relative_path}/uid/{./uid}" class="text-decoration-none">{{buildAvatar(edit, "24px", true)}} {./username}</a>
</div>

<button class="btn btn-sm btn-outline-danger text-nowrap {{{ if ./isBlocked }}}hidden{{{ end }}}" data-uid="{./uid}" data-action="block">[[user:block-user]]</button>
Expand Down
2 changes: 1 addition & 1 deletion templates/account/categories.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<div class="d-flex justify-content-between align-items-center mb-3">
<div class="d-flex gap-1">
<h3 class="fw-semibold fs-5 mb-0">{title}</h3>
<h3 class="fw-semibold fs-5 mb-0">{tx(title)}</h3>
</div>

<div class="d-flex gap-1">
Expand Down
3 changes: 2 additions & 1 deletion templates/account/consent.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@
<p>[[user:consent.right-to-data-portability-description]]</p>

<hr />

{{{ if canExport }}}
<div class="btn-group-vertical d-grid">
<div class="d-grid gap-2">
<a data-action="export-profile" class="btn btn-outline-secondary">
<i class="fa fa-download"></i> [[user:consent.export-profile]]
</a>
Expand Down
18 changes: 9 additions & 9 deletions templates/account/info.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<div class="mb-4 pb-3 border-bottom">
<h6>[[user:info.invited-by]]</h6>
<div class="d-flex align-items-center gap-2">
<a href="">{buildAvatar(invitedBy, "24px", true)}</a>
<a href="">{{buildAvatar(invitedBy, "24px", true)}}</a>
<a href="">{invitedBy.username}</a>
</div>
</div>
Expand Down Expand Up @@ -43,7 +43,7 @@
<div>
{{{ if ./byUid }}}
<a class="lh-1" href="{{{ if ./byUser.userslug }}}{config.relative_path}/user/{./byUser.userslug}{{{ else }}}#{{{ end }}}">
{buildAvatar(./byUser, "18px", true)}</a>
{{buildAvatar(./byUser, "18px", true)}}</a>
{{{ end }}}
<span class="timeago text-sm text-secondary lh-1 align-middle" title="{./timestampISO}"></span>
</div>
Expand All @@ -63,7 +63,7 @@
<div>
{{{ if ./byUid }}}
<a class="lh-1" href="{{{ if ./byUser.userslug }}}{config.relative_path}/user/{./byUser.userslug}{{{ else }}}#{{{ end }}}">
{buildAvatar(./byUser, "18px", true)}</a>
{{buildAvatar(./byUser, "18px", true)}}</a>
{{{ end }}}
<span class="timeago text-sm text-secondary lh-1 align-middle" title="{./timestampISO}"></span>
</div>
Expand Down Expand Up @@ -107,7 +107,7 @@
<span class="text-sm">[[user:info.reported-by]]</span>
<div class="d-flex text-nowrap">
{{{ each ./reports }}}
<a style="width: 18px; z-index: 3;" class="text-decoration-none" href="{config.relative_path}/user/{./reporter.userslug}">{buildAvatar(./reporter, "24px", true)}</a>
<a style="width: 18px; z-index: 3;" class="text-decoration-none" href="{config.relative_path}/user/{./reporter.userslug}">{{buildAvatar(./reporter, "24px", true)}}</a>
{{{ end }}}
</div>
</div>
Expand Down Expand Up @@ -138,7 +138,7 @@
<li class="mb-4 border-bottom">
<div class="mb-1 d-flex align-items-center justify-content-between">
<div>
<a href="{config.relative_path}/user/{./user.userslug}">{buildAvatar(./user, "24px", true)}</a>
<a href="{config.relative_path}/user/{./user.userslug}">{{buildAvatar(./user, "24px", true)}}</a>
<strong>
<a href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}" itemprop="author" data-username="{./user.username}" data-uid="{./user.uid}">{./user.username}</a>
</strong>
Expand All @@ -151,7 +151,7 @@
{{{ end }}}
</div>
<p class="mb-1">
<span class="reason">[[user:info.banned-reason-label]]: <strong>{./reason}</strong></span>
<span class="reason">[[user:info.banned-reason-label]]: <strong>{tx(./reason)}</strong></span>
</p>
<p>
{{{ if ./until }}}
Expand Down Expand Up @@ -192,7 +192,7 @@
<li class="mb-4 border-bottom">
<div class="mb-1 d-flex align-items-center justify-content-between">
<div>
<a href="{config.relative_path}/user/{./user.userslug}">{buildAvatar(./user, "24px", true)}</a>
<a href="{config.relative_path}/user/{./user.userslug}">{{buildAvatar(./user, "24px", true)}}</a>
<strong>
<a href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}" itemprop="author" data-username="{./user.username}" data-uid="{./user.uid}">{./user.username}</a>
</strong>
Expand All @@ -205,7 +205,7 @@
{{{ end }}}
</div>
<p class="mb-1">
<span class="reason">[[user:info.banned-reason-label]]: <strong>{./reason}</strong></span>
<span class="reason">[[user:info.banned-reason-label]]: <strong>{tx(./reason)}</strong></span>
</p>
<p>
{{{ if ./until }}}
Expand Down Expand Up @@ -240,7 +240,7 @@

<div data-id="{./id}">
<div class="d-flex align-items-baseline gap-1 mb-1">
<a href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}">{buildAvatar(./user, "24px", true)}</a>
<a href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}">{{buildAvatar(./user, "24px", true)}}</a>

<a href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}" class="fw-bold" itemprop="author" data-username="{./user.username}" data-uid="{./user.uid}">{./user.username}</a>

Expand Down
2 changes: 1 addition & 1 deletion templates/account/posts.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</div>

{{{ if !posts.length }}}
<div class="alert alert-warning text-center">{noItemsFoundKey}</div>
<div class="alert alert-warning text-center">{tx(noItemsFoundKey)}</div>
{{{ end }}}

<div>
Expand Down
8 changes: 4 additions & 4 deletions templates/account/profile.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
{{{ if widgets.profile-aboutme-before.length }}}
<div data-widget-area="profile-aboutme-before">
{{{each widgets.profile-aboutme-before}}}
{./html}
{{./html}}
{{{end}}}
</div>
{{{ end }}}

{{{ if aboutme }}}
<div component="aboutme" class="text-sm text-break">
{aboutmeParsed}
{{txEscape(aboutmeParsed)}}
</div>
{{{ end }}}

{{{ if widgets.profile-aboutme-after.length }}}
<div data-widget-area="profile-aboutme-after">
{{{each widgets.profile-aboutme-after}}}
{./html}
{{./html}}
{{{end}}}
</div>
{{{ end }}}
Expand Down Expand Up @@ -76,7 +76,7 @@
{{{ if ./value }}}
<div class="stat">
<div class="align-items-center justify-content-center card card-header p-3 border-0 rounded-1 h-100 gap-2">
<span class="stat-label text-xs fw-semibold"><span><i class="text-muted {./icon}"></i> {./name}</span></span>
<span class="stat-label text-xs fw-semibold"><span><i class="text-muted {./icon}"></i> {tx(./name)}</span></span>
{{{ if (./type == "input-link") }}}
<a class="text-center text-break w-100 px-2 ff-secondary text-underline text-reset" href="{./value}" rel="nofollow noreferrer">{./linkValue}</a>
{{{ else }}}
Expand Down
Loading