mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-15 10:16:12 +01:00
Acp redesign (#11639)
* acp sidebar
* gap in nav
* remove shadow
* label fixes
* color fixes
* feat: settings page wip
* feat: scroll spy 👓
move social into general, store social in meta.config like other settings
write upgrade script
* remove social
* rermove openapi routes
* cleanup, highlight selected nav item
* more cleanup
* advanced margin top
* derp
* match design
* bring back version alert
fix homepage js, since it moved to general settings
* remove unused tpls
these moved to general settings
* remove more css
* offcanvas for mobile
fix search
* add timeout
* add new props
* manage categories
* small fixes
* category-edit
* feat category page fixes
* add title to settings pages
add user settings page
* small fixes
* some more settings pages
* fix: plugin page titles
* more settings pages
* more padding
* more pages, add acp paginator.tpl
so it doesn't change when active theme changes
* remove placeholder
* dashboard table
* fix: openapi
* fix: controller tests
* use fonts from core
* some small fixes
* fix rep page
* refactor: fix name of upgrade script
* create category modal
group edit
* group/groups pages
* admins mods
* privs
* uploads
* missing margin
* more acp pages
* more pages
* plugins/rewards/widgets
* wrap rewards
* fix widgets
* fix widget clone button
* fix group acp edit link
* update search dropdown
* remove display block from tbody
* use less css
* remove some derp links
* remove striped tables
* remove p tags from lang files
* update email settings
* Update api.tpl
* move tag-whitelist
This commit is contained in:
committed by
GitHub
parent
6d4ab1d0c1
commit
c3afe44686
@@ -3,6 +3,7 @@
|
||||
const _ = require('lodash');
|
||||
const plugins = require('./plugins');
|
||||
const db = require('./database');
|
||||
const meta = require('./meta');
|
||||
|
||||
const social = module.exports;
|
||||
|
||||
@@ -26,9 +27,8 @@ social.getPostSharing = async function () {
|
||||
},
|
||||
];
|
||||
networks = await plugins.hooks.fire('filter:social.posts', networks);
|
||||
const activated = await db.getSetMembers('social:posts.activated');
|
||||
networks.forEach((network) => {
|
||||
network.activated = activated.includes(network.id);
|
||||
network.activated = parseInt(meta.config[`post-sharing-${network.id}`], 10) === 1;
|
||||
});
|
||||
|
||||
social.postSharing = networks;
|
||||
@@ -41,12 +41,16 @@ social.getActivePostSharing = async function () {
|
||||
};
|
||||
|
||||
social.setActivePostSharingNetworks = async function (networkIDs) {
|
||||
// keeping for 1.0.0 upgrade script that uses this function
|
||||
social.postSharing = null;
|
||||
await db.delete('social:posts.activated');
|
||||
if (!networkIDs.length) {
|
||||
return;
|
||||
}
|
||||
await db.setAdd('social:posts.activated', networkIDs);
|
||||
const data = {};
|
||||
networkIDs.forEach((id) => {
|
||||
data[`post-sharing-${id}`] = 1;
|
||||
});
|
||||
await db.setObject('config', data);
|
||||
};
|
||||
|
||||
require('./promisify')(social);
|
||||
|
||||
Reference in New Issue
Block a user