nodebb-theme-harmony
Advanced tools
Comparing version 0.0.12 to 0.0.13
@@ -15,2 +15,3 @@ 'use strict'; | ||
stickyToolbar: 'on', | ||
openSidebars: 'off', | ||
}; | ||
@@ -103,2 +104,3 @@ | ||
config.stickyToolbar = themeConfig.stickyToolbar === 'on'; | ||
config.openSidebars = themeConfig.openSidebars === 'on'; | ||
config.openDraftsOnPageLoad = false; | ||
@@ -120,3 +122,5 @@ return config; | ||
Object.keys(defaults).forEach((key) => { | ||
hookData.settings[key] = hookData.data[key] || undefined; | ||
if (hookData.data.hasOwnProperty(key)) { | ||
hookData.settings[key] = hookData.data[key] || undefined; | ||
} | ||
}); | ||
@@ -123,0 +127,0 @@ return hookData; |
{ | ||
"name": "nodebb-theme-harmony", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"nbbpm": { | ||
@@ -5,0 +5,0 @@ "compatibility": "^3.0.0" |
@@ -38,5 +38,15 @@ 'use strict'; | ||
function setupMobileMenu() { | ||
$('[component="sidebar/toggle"]').on('click', function () { | ||
$('.sidebar').toggleClass('open'); | ||
$(window).trigger('action:sidebar.toggle'); | ||
require(['api'], function (api) { | ||
$('[component="sidebar/toggle"]').on('click', async function () { | ||
const sidebarEl = $('.sidebar'); | ||
sidebarEl.toggleClass('open'); | ||
if (app.user.uid) { | ||
await api.put(`/users/${app.user.uid}/settings`, { | ||
settings: { | ||
openSidebars: sidebarEl.hasClass('open') ? 'on' : 'off', | ||
}, | ||
}); | ||
} | ||
$(window).trigger('action:sidebar.toggle'); | ||
}); | ||
}); | ||
@@ -83,3 +93,2 @@ } | ||
const draftItems = drafts.listAvailable(); | ||
console.log('harmony sees', draftItems); | ||
if (!draftItems.length) { | ||
@@ -94,3 +103,3 @@ draftListEl.find('.no-drafts').removeClass('hidden'); | ||
}); | ||
console.log(draftItems); | ||
const html = await app.parseAndTranslate('partials/sidebar/drafts', 'drafts', { drafts: draftItems }); | ||
@@ -97,0 +106,0 @@ draftListEl.find('.no-drafts').addClass('hidden'); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
257570
369
5