diff --git a/package-lock.json b/package-lock.json
index d3660ba4..b242bf97 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "nodebb-theme-harmony",
- "version": "2.2.72",
+ "version": "3.0.0-beta.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "nodebb-theme-harmony",
- "version": "2.2.72",
+ "version": "3.0.0-beta.2",
"license": "MIT",
"dependencies": {
"@fontsource/inter": "5.2.8",
diff --git a/package.json b/package.json
index e9fafd6e..3fe956f3 100644
--- a/package.json
+++ b/package.json
@@ -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",
diff --git a/public/harmony.js b/public/harmony.js
index b414b98b..5681ca8a 100644
--- a/public/harmony.js
+++ b/public/harmony.js
@@ -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() {
@@ -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, '
');
+ 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');
@@ -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) {
diff --git a/scss/groups.scss b/scss/groups.scss
deleted file mode 100644
index 1c81dd78..00000000
--- a/scss/groups.scss
+++ /dev/null
@@ -1,20 +0,0 @@
-.template-groups-details #panel {
- margin-top: 0px!important;
-}
-
-.group-hover-bg {
- $hover-color: mix($body-bg, $body-color, 90%);
- $border-color: mix($body-bg, $body-color, 90%);
- border-color: $border-color!important;
- &:hover {
- background-color: $hover-color;
- }
-}
-
-.groups.details {
- margin-top: 200px;
-
- @include media-breakpoint-up(md) {
- margin-top: 300px;
- }
-}
diff --git a/scss/harmony.scss b/scss/harmony.scss
index 6c55152f..792eee35 100644
--- a/scss/harmony.scss
+++ b/scss/harmony.scss
@@ -10,7 +10,6 @@
@import "mobilebar";
@import "status";
@import "account";
-@import "groups";
@import "world";
@import "modals";
@@ -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";
diff --git a/scss/modules/cover.scss b/scss/modules/cover.scss
deleted file mode 100644
index 33c65712..00000000
--- a/scss/modules/cover.scss
+++ /dev/null
@@ -1,104 +0,0 @@
-// used in group and account pages
-.cover {
- background-size: cover;
- background-repeat: no-repeat;
- height: 200px;
- position: absolute;
- background-origin: content-box;
- width: 100%;
- top: var(--panel-offset)!important;
- left: auto;
- right: 0px;
-
- &:hover .controls, .controls:focus-within {
- opacity: 1;
- }
-
- .controls {
- height: 200px;
- line-height: 200px;
- opacity: 0;
- @include transition(opacity .15s linear);
- cursor: pointer;
- pointer-events: none;
-
- > * {
- pointer-events: all;
- }
- }
-
- &.active {
- &:hover {
- cursor: move;
- }
-
- .controls {
- > * {
- display: none;
- }
- }
-
- .save {
- display: inline-block;
- }
- }
-
- &.saving {
- .save {
- display: none;
- }
-
- .indicator {
- display: inline-block;
- }
- }
-
- .save, .indicator {
- display: inline-block;
- position: absolute;
- bottom: 1em;
- left: 50%;
- transform: translateX(-50%);
- opacity: 1;
- padding: 0.5em;
- font-weight: bold;
-
- &:hover {
- cursor: pointer;
- }
- }
-
- .save {
- display: none;
- }
-
- .indicator {
- display: none;
- }
-}
-
-.cover > .container {
- height: 200px;
- position: relative;
- pointer-events: none;
- .save {
- pointer-events: all;
- }
- .controls {
- pointer-events: none;
- > * {
- pointer-events: all;
- }
- }
-}
-
-@include media-breakpoint-up(md) {
- .cover, .cover > .container {
- height: 300px;
-
- .controls {
- height: 300px;
- line-height: 300px;
- }
- }
-}
\ No newline at end of file
diff --git a/templates/account/blocks.tpl b/templates/account/blocks.tpl
index fb7a60aa..3827411c 100644
--- a/templates/account/blocks.tpl
+++ b/templates/account/blocks.tpl
@@ -17,7 +17,7 @@
[[user:consent.right-to-data-portability-description]]
- [[user:info.banned-reason-label]]: {./reason} + [[user:info.banned-reason-label]]: {tx(./reason)}
{{{ if ./until }}} @@ -192,7 +192,7 @@
- [[user:info.banned-reason-label]]: {./reason} + [[user:info.banned-reason-label]]: {tx(./reason)}
{{{ if ./until }}} @@ -240,7 +240,7 @@
[[user:digest-description]]
@@ -189,7 +189,7 @@- [[category:handle.description, {txEscape(handleFull)}]] + [[category:handle.description, {handleFull}]]
{{{ end }}} diff --git a/templates/groups/details.tpl b/templates/groups/details.tpl deleted file mode 100644 index 2d76a18e..00000000 --- a/templates/groups/details.tpl +++ /dev/null @@ -1,92 +0,0 @@ -| - - - | -
|
-
-
-
- {{{ if group.isOwner }}}
-
- {{{ end }}}
-
- |
-
|
-
-
-
- |
-