872 Commits (7672194c7ce513817cf5971a5b5f11017d380268)

Author SHA1 Message Date
Barış Soner Uşaklı b6f8e2fd05 fix: #10692 3 years ago
Barış Soner Uşaklı 5e7d366f55 fix: #10584, dont show backlinks if you dont have read privilege 3 years ago
Barış Soner Uşaklı ea01ba0152 fix: #10569, fix category move event text 3 years ago
Barış Soner Uşaklı d20b07cfea
Webpack5 (#10311)
* feat: webpack 5 part 1

* fix: gruntfile fixes

* fix: fix taskbar warning

add app.importScript
copy public/src/modules to build folder

* refactor: remove commented old code

* feat: reenable admin

* fix: acp settings pages, fix sortable on manage categories

embedded require in html not allowed

* fix: bundle serialize/deserizeli so plugins dont break

* test: fixe util tests

* test: fix require path

* test: more test fixes

* test: require correct utils module

* test: require correct utils

* test: log stack

* test: fix db require blowing up tests

* test: move and disable bundle test

* refactor: add aliases

* test: disable testing route

* fix: move webpack modules necessary for build, into `dependencies`

* test: fix one more test

remove 500-embed.tpl

* fix: restore use of assets/nodebb.min.js, at least for now

* fix: remove unnecessary line break

* fix: point to proper ACP bundle

* test: maybe fix build test

* test: composer

* refactor: dont need dist

* refactor: more cleanup

use everything from build/public folder

* get rid of conditional import in app.js

* fix: ace

* refactor: cropper alias

* test: lint and test fixes

* lint: fix

* refactor: rename function to app.require

* refactor: go back to using app.require

* chore: use github branch

* chore: use webpack branch

* feat: webpack webinstaller

* feat: add chunkFile name with contenthash

* refactor: move hooks to top

* refactor: get rid of template500Function

* fix(deps): use webpack5 branch of 2factor plugin

* chore: tagging v2.0.0-beta.0 pre-release version 💥 :shipit: 🎉 🚀

* refactor: disable cache on templates

loadTemplate is called once by benchpress and the result is cache internally

* refactor: add server side helpers.js

* feat: deprecate /plugins shorthand route, closes #10343

* refactor: use build/public for webpack

* test: fix filename

* fix: more specific selector

* lint: ignore

* refactor: fix comments

* test: add debug for random failing test

* refactor: cleanup

remove test page, remove dupe functions in utils.common

* lint: use relative path  for now

* chore: bump prerelease version

* feat: add translateKeys

* fix: optional params

* fix: get rid of extra timeago files

* refactor: cleanup, require timeago locale earlier

remove translator.prepareDOM, it is in header.tpl html tag

* refactor: privileges system to use a Map in the backend instead of separate objects for keys and labels (#10378)

* refactor: privileges system to use a Map in the backend instead of separate objects for keys and labels

- Existing hooks are preserved (to be deprecated at a later date, possibly)
- New init hooks are called on NodeBB start, and provide a one-stop shop to add new privileges, instead of having to add to four different hooks

* docs: fix typo in comment

* test: spec changes

* refactor: privileges system to use a Map in the backend instead of separate objects for keys and labels (#10378)

* refactor: privileges system to use a Map in the backend instead of separate objects for keys and labels

- Existing hooks are preserved (to be deprecated at a later date, possibly)
- New init hooks are called on NodeBB start, and provide a one-stop shop to add new privileges, instead of having to add to four different hooks

* docs: fix typo in comment

* test: spec changes

* feat: allow app.require('bootbox'/'benchpressjs')

* refactor: require server side utils

* test: jquery ready

* change istaller to use build/public

* test: use document.addEventListener

* refactor: closes #10301

* refactor: generateTopicClass

* fix: column counts for other privileges

* fix: #10443, regression where sorted-list items did not render into the DOM in the predicted order [breaking]

* fix: typo in hook name

* refactor: introduce a generic autocomplete.init() method that can be called to add nodebb-style autocompletion but using different data sources (e.g. not user/groups/tags)

* fix: crash if `delay` not passed in (as it cannot be destructured)

* refactor: replace substr

* feat: set --panel-offset style in html element based on stored value in localStorage

* refactor: addDropupHandler() logic to be less naive

- Take into account height of the menu
- Don't apply dropUp logic if there's nothing in the dropdown
- Remove 'hidden' class (added by default in Persona for post tools) when menu items are added

closes #10423

* refactor: simplify utils.params [breaking]

Retrospective analysis of the usage of this method suggests that the options passed in are superfluous, and that only `url` is required. Using a browser built-in makes more sense to accomplish what this method sets out to do.

* feat: add support for returning full URLSearchParams for utils.params

* fix: utils.params() fallback handling

* fix: default empty obj for params()

* fix: remove \'loggedin\' and \'register\' qs parameters once they have been used, delay invocation of messages until ajaxify.end

* fix: utils.params() not allowing relative paths to be passed in

* refactor(DRY): new assertPasswordValidity utils method

* fix: incorrect error message returned on insufficient privilege on flag edit

* fix: read/update/delete access to flags API should be limited for moderators to only post flags in categories they moderate

- added failing tests and patched up middleware.assert.flags to fix

* refactor: flag api v3 tests to create new post and flags on every round

* fix: missing error:no-flag language key

* refactor: flags.canView to check flag existence, simplify middleware.assert.flag

* feat: flag deletion API endpoint, #10426

* feat: UI for flag deletion, closes #10426

* chore: update plugin versions

* chore: up emoji

* chore: update markdown

* chore: up emoji-android

* fix: regression caused by utils.params() refactor, supports arrays and pipes all values through utils.toType, adjusts tests to type check

Co-authored-by: Julian Lam <julian@nodebb.org>
3 years ago
Barış Soner Uşaklı a8e642ade2 refactor: skip content length check if submitting from post-queue 3 years ago
Barış Soner Uşaklı 767973717b
perf: WIP #10449, allow array of pids for posts.purge (#10465)
* perf: WIP #10449, allow array of pids for posts.purge

* refactor: deletePostDiffs

* perf: deletePostFromReplies/deletePostFromGroups

* refactor: upload

* refactor: deleteFromCategoryRecentPosts

deleteFromUsersBookmarks
deleteFromUsersVotes

* feat: closes #10468, add incrObjectFieldByBulk

* refactor: allow nids for notifications.rescind

* refactor: allow uids array for user.updatePostCount

* refactor: rewrite deleteFromTopicUserNotification to work with an array

* feat: deprecate action:post.purge as well

* lint: add missing comma
3 years ago
Barış Soner Uşaklı 799e94e02e feat: #10460, add cutoff to suggested topics 3 years ago
Barış Soner Uşaklı 3935a86b83 fix: topic events if there is a blocked user in topic 3 years ago
Barış Soner Uşaklı 2808c952c5 fix: topic events disappearing if there are queued posts 3 years ago
Julian Lam fb78570c13 test: fix topic thumb tests and topic thumbs to work properly with post upload assoc. 3 years ago
Julian Lam 6489e9fd9e refactor: change the post uploads' hash seeds to have the `files/` prefix 3 years ago
Julian Lam 0f788b8eaa fix: #10257, topic thumbs not deleting on topic deletion 3 years ago
Barış Soner Uşaklı 079c487dcb fix: controversial posts/bests posts not showing anything
fix upgrade script so posts with negative votes are stored, a post can have 10 upvotes and 2 downvotes
fix missing negative votes checks
remove unnecessary pids flters since the cids are only already filtered by topics:read
3 years ago
Magnus 7bd3e31dec
Fullname in notifications (#10157)
* init - fullname notifications setting

* fullname in topic reply

* fullname for group-request-membership

* fullname for group-leave notification

* fullname for new-post-flag & new-user-flag

* removed log

* fullname for user follow

* fullname in message notification

* fullname in follow

* fullname for sendNotificationToPostOwner

* fullname in sendNotificationToTopicOwner

* fullname in doExport

* shorthand name set

* shorter name set

* fullname in notifications

* displayname for notifications

* removed unused require
3 years ago
Barış Soner Uşaklı f9279b636b fix: post indices if there is a blocked user in topic 3 years ago
Barış Soner Uşaklı 3b72ff8742 fix: dont add duplicate link backs 3 years ago
Barış Soner Uşaklı b06c6329e4 fix: #10175, fix topic linkbacks duplicating on post edit 3 years ago
Barış Soner Uşaklı 4799efc790 fix: #10167, fix regression prevent guest post 3 years ago
Barış Soner Uşaklı a75a043b61 feat: allow % in tags, #10135 3 years ago
Barış Soner Uşaklı 0d9ec9d30e test: fix restore test 3 years ago
Barış Soner Uşaklı f918a38164 breaking: remove socket.emit('topics.follow')
remove socket.emit('topics.changeWatching')
3 years ago
Barış Soner Uşaklı 6ad0472106 breaking: remove socket.emit('topics.post')
remove socket.emit('topics.search')
remove socket.emit('topics.getTopic')
3 years ago
Julian Lam 45c9dde319 fix: no need to pass 'img' to teaser tags stripping as images are already converted to alt text 3 years ago
Barış Soner Uşaklı a20abdce02 lint: remove unused 3 years ago
Barış Soner Uşaklı 36eb47d9a0 refactor: change var name 3 years ago
Barış Soner Uşaklı 170e5dd941 breaking: remove getTopicPosts(tid, ...) usage 3 years ago
Barış Soner Uşaklı 906dc5675e fix: handle start=0 stop=0 for topics.getTopicPosts
add more tests
3 years ago
Barış Soner Uşaklı a29535833f fix: #10052, dont use spaces in tag class name 3 years ago
Barış Soner Uşaklı 1cdb0b1e19 fix: don't crash if tid is falsy 3 years ago
Barış Soner Uşaklı 1e53552874 feat: closes #10018 3 years ago
Baris Usakli 06bfec8840 feat: #10018 add href 3 years ago
Baris Usakli 0f14f23b2a feat: #10018 , wip 3 years ago
Barış Soner Uşaklı fb363957d1 refactor: tab rules 3 years ago
Barış Soner Uşaklı d5bfd51267 fix: #10010, handle reverse sorting for topic events
dont add events to dom if sort is most votes
if sorting is reverse add new events after the main post or at the top instead of bottom
3 years ago
Barış Soner Uşaklı 258f368e32 refactor: add filter:topic.getPosts
this hook only fires when loading the posts of a topic cold load + infinite scroll
do not remove posts if they have index =-1
use topics.getTopicPosts instead of getMainPostAndReplies
3 years ago
Barış Soner Uşaklı 8379c11b22 refactor: setObjectBulk to match sortedSetAddBulk 3 years ago
Barış Soner Uşaklı d196409580 refactor: remove more async.eachSeries/mapSeries 3 years ago
Barış Soner Uşaklı 28dd31a8e7 fix: #9976 3 years ago
Barış Soner Uşaklı 3d611ab70e fix: events for just topic with main post 3 years ago
Barış Soner Uşaklı 89399c0ed5 fix: #9954, get next post timestamp
fixes topic events being inserted in after first page but at the wrong spot
3 years ago
Barış Soner Uşaklı 4333d217a1 fix: #9917, show topics as unread for guests 3 years ago
Barış Soner Uşaklı 6c25b9dbaa test: remove escape 3 years ago
Barış Soner Uşaklı 4f9717fb08 fix: escape thumbs, allow robots meta tag 3 years ago
Julian Lam be43cd2597
Topic Linkbacks (#9825)
* feat: WIP topic linkbacks, + failing tests

* test: don't accidentally comment out all of the post tests

* fix: rename to "backlinks"

* feat: more stub code, more failing tests

* feat: backend methods and passing tests for topic backlinks

* test: uncomment test/posts.js again

* fix: missing quotation mark in topic event helper

* fix: superfluous usage of Promise.all

* test: fix broken test -- used hardcoded (and incorrect) url

* test: parseInt shenanigans
3 years ago
Barış Soner Uşaklı 6399b42826 feat: closes #9845, sort by views 3 years ago
Julian Lam ce8ea6ea42 fix: bad uid reference 3 years ago
Julian Lam f194809f06 feat: move filter:topic.post hook to top of method 3 years ago
Julian Lam 7777812e62 fix: update Topics.post and Topics.reply so that plugins can modify uid (or redirect a reply to a different topic)
/cc @antosik
3 years ago
Barış Soner Uşaklı 2657804c1f fix: #9790, fix sorting of more than one page of pinned topics 3 years ago
psychobunny ae793b4a44 chore: found some hooks that don't play well docgen 3 years ago