303 Commits (5c984250c8d86e84983ed555118b3bb4eb532e26)

Author SHA1 Message Date
Opliko 72e7b9f7d8
docs: explain what export routes actually do in OpenAPI documentation (#10836) 2 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ı be6bbabd0e feat: ability to mute users
new mute privilege
3 years ago
Julian Lam 9b912db71e docs: openapi spec for new route 3 years ago
Julian Lam d098e26f82
User Email and email validation API (#10160)
* feat: wip user emails api

* fix: allow admins with manage-users access to email confirmation api as well

* fix: wrong route path

* docs: openapi spec
3 years ago
Julian Lam 2fe53cf849 feat: `GET /api/v3/chats/:roomId/messages` 3 years ago
Julian Lam aaa6f752d0 refactor: put message api calls behind `/messages` prefix, #10097 3 years ago
Julian Lam 47ab952639 docs: fix description for route 3 years ago
Julian Lam 0aa25f20d5 docs: roomId is number 3 years ago
Julian Lam 16ba16cdc4 fix: deprecate chats.leave 3 years ago
Julian Lam fe17c94c35 feat: `DELETE /api/v3/chats/:roomId/users` and `DELETE /api/v3/chats/:roomId/users/:uid` 3 years ago
Julian Lam d62ee84637 feat: `POST /chats/:roomId/users` 3 years ago
Julian Lam 6eea6451d2 feat: `GET /chats/:roomId/users` [breaking] 3 years ago
Julian Lam d5fd098ecf feat: `POST /chats/:roomId/:mid` and `DELETE /chats/:roomId/:mid` 3 years ago
Julian Lam 9a4fd5dc7e feat: `PUT /api/v3/chats/:roomId` 3 years ago
Julian Lam eeffb9d978 feat: `POST /api/v3/chats/:roomId` 3 years ago
Julian Lam 09cf9c7770 feat: `GET /api/v3/chats/:roomId` 3 years ago
Julian Lam 55e68e2fd5 docs: openAPI documentation for routes 3 years ago
Julian Lam 40b4544e70 feat: `POST /api/v3/chats`, chat room creation, plus openAPI docs update 3 years ago
Barış Soner Uşaklı c4042c70de feat: #9506, allow seeing and editing your queued posts
allow regular users access to post queue
allow regular users to edit their queued post/topic title
allow regular users to remove their post from post queue
ability to send a notification to user without removing from post queue
allow accessing single post queue items from notifications
3 years ago
Julian Lam bc7707aa88 fix: #9484 show user history only to admins and gmods 3 years ago
Barış Soner Uşaklı cc3f82bc83 breaking: remove socket.emit('admin.categories.setPrivilege') and socket.emit('admin.categories.getPrivilegeSettings') 3 years ago
Julian Lam 5b42b6b369
API route for returning tracked analytics keys (#10019)
* feat: track metrics saved by NodeBB (and assoc. plugins), #9949

* feat: route to retrieve analytics keys, closes #9949
3 years ago
Julian Lam 591424cea1 chore: fix type.yaml example and summary 3 years ago
Julian Lam 0ee85d5a0b fix: #9950, rename account export routes to remove `uid/` prefix 3 years ago
Barış Soner Uşaklı f4cf482a87 feat: show popular searches 3 years ago
Julian Lam 7ef5214ef9 test: fix broken openapi3 schema 3 years ago
Julian Lam 806a1e50d2 feat: utilities login API route now starts an actual login session, if requested 3 years ago
Julian Lam 94c4f87b2f docs: update verbiage re: login API route 3 years ago
Julian Lam 0a41741b7e refactor: deprecate picture update socket call, new API routes for picture update 3 years ago
gasoved 3df79683f5
feat: create folders in ACP uploads #9638 (#9750)
* feat: create folders in ACP uploads #9638

* fix: openapi

* test: missing tests

* fix: eslint

* fix: tests
3 years ago
Barış Soner Uşaklı 358ad74054 feat: closes #9684, allow event deletion
fix: topic events appearing before necro messages
feat: add move topic event
feat: add ability to delete specific topic events via events.purge
3 years ago
Julian Lam 81611ae1c4 fix(emails): broken test for api/user/email/:email
+ fixed broken tests due to unexpected behaviour for email confirmation
4 years ago
Julian Lam ab9b671693 fix(emails): broken test due to sticky registration interstitial 4 years ago
Julian Lam 69c96dd23c refactor(emails): more work in update email interstitial, interstitial skipping, email change on confirmation, deprecation of requireEmailConfirmation 4 years ago
Julian Lam cc6cbfcdc4
Flags API (#9666)
* feat: new routes for flags API

+ flag get
+ flag creation, migration from socket method
+ flag update, migration from socket method
* fixed bug where you could not unassign someone from a flag

* feat: tests for new flags API

added missing files for schema update

* fix: flag tests to use Write API instead of sockets

* feat: flag notes API + tests

* chore: remove debug line

* test: fix breaking test on mongo
4 years ago
Barış Soner Uşaklı 39e1359142 fix: schema 4 years ago
psychobunny 2db77b0cd2 docs: add undoTimeout 4 years ago
Julian Lam d2960aeb09 feat: added GET user route for api v3 4 years ago
Julian Lam 6ef0c8e950 docs: update API docs to better outline authentication options 4 years ago
Julian Lam d08d0c42e9 docs: update API authentication verbiage 4 years ago
gasoved 8faa6e4515
feat: filter flags by username #8489 (#9451)
* feat: filter flags by username #8489

* feat: toggle flag filter text
4 years ago
Barış Soner Uşaklı d09cdc0436 fix: spec 4 years ago
gasoved 077330b764
feat: scheduled topics (#9399)
* feat: scheduled topics

* refactor: linting fixes

* fix: tests

* fix(test): race condition

* fix: make a single request
4 years ago
Barış Soner Uşaklı e42b152f16 fix: #9414, use posts:view_deleted 4 years ago
Barış Soner Uşaklı 1e1127bd20 fix: spec 4 years ago
Julian Lam 2a939aad8d fix: regression via c1b3079d93
Also refactored privilege render logic so that it no longer needs a server-side hack to render column count
4 years ago
Julian Lam e755067387 docs: fixed typo 4 years ago
Julian Lam c1b3079d93 feat: category privilege API routes
closes #9342
4 years ago
Julian Lam 0804d54759 spec: schema docs for new ACP dashboard subpage routes 4 years ago
Julian Lam d3a9e76ae2 test(user): added additional tests for icon background colour 4 years ago
Julian Lam 4c078084dc test: fix spec for topic thumbs 4 years ago
Julian Lam 1d9ade4c36 test: added missing properties to topicObject 4 years ago
Julian Lam b31f6dd24a test: added missing test file 4 years ago
Julian Lam ad54b174a4 test: topic reordering tests 4 years ago
Barış Soner Uşaklı ab0ef44289 fix: spec 4 years ago
Barış Soner Uşaklı 47299ea587
Categories refactor (#9257)
* feat: wip categories pagination

* feat: add subCategoriesPerPage setting

* feat: add load more sub categories button to category page

* fix: openapi spec

* feat: show sub categories left on category page

hide button when no more categories left

* breaking: rename categories to allCategories on /search

categories contains the search results

* fix: spec

* refactor: remove cidsPerPage

* fix: tests

* feat: use component for subcategories

* fix: prevent negative subCategoriesLeft

* feat: new category filter/search WIP

* feat: remove categories from /tag

* fix: dont load all categories when showing move modal

* feat: allow adding custom categories to list

* breaking: dont load entire category tree on post queue

removed unused code
add hooks to filter/selector
add options to filter/selector

* feat: make selector modal work again

* feat: replace old search module

* fix: topic move selector

* feat: dont load all categories on create category modal

* fix: fix more categorySelectors

* feat: dont load entire category tree on group details page

* feat: dont load all categories on home page and user settings page

* feat: add pagination to /user/:userslug/categories

* fix: update schemas

* fix: more tests

* fix: test

* feat: flags page, dont return entire category tree

* fix: flag test

* feat: categories manage page

dont load all categories
allow changing root category
clear caches properly

* fix: spec

* feat: admins&mods page

dont load all categories

* fix: spec

* fix: dont load all children when opening dropdown

* fix: on search results dont return all children

* refactor: pass all options, rename options.cids to options.selectedCids

* fix: #9266

* fix: index 0

* fix: spec

* feat: #9265, add setObjectBulk

* refactor: shoter updateOrder

* feat: selectors on categories/category

* fix: tests and search filter

* fix: category update test

* feat: pagination on acp categories page

show order in set order modal

* fix: allow drag&drop on pages > 1 in /admin/manage/categories

* fix: teasers for deep nested categories

fix sub category display on /category page

* fix: spec

* refactor: use eslint-disable-next-line

* refactor: shorter
4 years ago
gasoved cabec378f4 fix: openapi test specs 4 years ago
gasoved 72b050b4a8 test: post diff deletion tests 4 years ago
Barış Soner Uşaklı 833c73e81b fix: example 4 years ago
Barış Soner Uşaklı cc560ca3f9 feat: doc add description 4 years ago
Barış Soner Uşaklı ed11e17129 feat: add doc for query param 4 years ago
Barış Soner Uşaklı d1364c3130
Categories refactor (#9233)
* feat: wip categories pagination

* feat: add subCategoriesPerPage setting

* feat: add load more sub categories button to category page

* fix: openapi spec

* feat: show sub categories left on category page

hide button when no more categories left

* breaking: rename categories to allCategories on /search

categories contains the search results

* fix: spec

* refactor: remove cidsPerPage

* fix: tests

* feat: use component for subcategories

* fix: prevent negative subCategoriesLeft
4 years ago
Barış Soner Uşaklı 4c12e0aaf8 fix: update docs 4 years ago
Barış Soner Uşaklı faeb637353 fix: tests remove old routes 4 years ago
Julian Lam dc84559d0b feat(topic-events): topic events GET route in write API 4 years ago
Julian Lam ab2e1ecb40 feat(topic-events): work in progress topic events logic and client-side implementation 4 years ago
Julian Lam 8b72479f62 fix: remove 'filters' and 'categories' from flag details API return [breaking]
These options were originally used when the flag filters were shown in the sidebar. This has seen been removed, and so the information is now superfluous
4 years ago
Julian Lam 966c4117ec refactor(api): post move to write API 4 years ago
Julian Lam e118e59ce0 refactor(api): post diffs to use write API 4 years ago
Julian Lam 0da2843281 feat(api): schema definition for new credential checking route 4 years ago
Julian Lam 87a7d85e89 fix: missing breadcrumbs in schema 4 years ago
Julian Lam edb8da1ef9 feat(api): closes #9123 category and topic routes migrated to Write API 4 years ago
Julian Lam fb3f3f729f refactor(openapi): update TopicObject component to reference TopicObjectSlim in its schema 4 years ago
Julian Lam 3959a7bd9c fix(api): failing test due to missing file 4 years ago
Julian Lam 32e36f7b2e feat(api): group ownership API route, switch client-side to use API route 4 years ago
Julian Lam 98550d61d7 feat(api): add schema for groups update route 4 years ago
Julian Lam 4fc1337762 feat(api): added schema for email unsubscribe token 4 years ago
Julian Lam f416dc177a fix: all tests, wrap up work 4 years ago
Julian Lam 9c2de86a6e fix: two more routes 4 years ago
Julian Lam cb32e32ae3 feat: fix more tests, add more routes, update api test suite 4 years ago
Julian Lam 14c51e3c60 feat: add registration/complete route, fix some other tests 4 years ago
Julian Lam b9a61d2d45 fix: api tests 4 years ago
Julian Lam 9de35ec5a3 feat: add missing schemas for various ACP settings routes 4 years ago
Julian Lam c079051b19 fix: errors in write-api schema 4 years ago
Julian Lam 8e5a413e4e chore: minor reordering of lines 4 years ago
Julian Lam 990f107736 fix: broken tests from last round of fixes 4 years ago
Julian Lam d6de925348 feat: add missing schema for category update and deletion
Deleted CategoryObj component, since CategoryObject is used more
4 years ago
Julian Lam eef052c1bf fix: add missing token generation route to write api spec 4 years ago
Julian Lam d85181e031 feat: add schema for api ping routes 4 years ago
Julian Lam 878ee06715 refactor: schema backreference test to use map instead of reduce, properly check write-api routes 4 years ago
Julian Lam df8d62ba06 feat: normalize paths before comparison 4 years ago
Julian Lam 2170c40007 fix: iteration logic bug 4 years ago
Julian Lam ae9439748d fix: spec 4 years ago
Julian Lam d31aae167e fix(spec): broken link to status component 4 years ago
Julian Lam 340387c18a fix: #9055, non-standard API response from addThumbs route
Also removed old thumb upload router handler, and updated uploadPost handling in composer to match new response schema
4 years ago
Julian Lam 5950683316 feat: closes #9048, tests for topic thumbs routes, write API schema 4 years ago
Julian Lam 1949d20a87 fix: spec 4 years ago
Barış Soner Uşaklı 5f0f476b57 feat: #9005, use timestamp in profile/cover images
delete current one if keepAllUserImages is turned off
fix typo in data
4 years ago
psychobunny 69864b8746 fix(openapi): spec for c1a7968d23 4 years ago