Commit Graph

1473 Commits

Author SHA1 Message Date
Julian Lam
135fe55bed feat: client-side hooks for navigator scroll action 2022-09-19 14:29:03 -04:00
Julian Lam
664bc5f54d fix: update nav thumb on setIndex call (thx @barisusakli) 2022-09-19 14:29:03 -04:00
Julian Lam
b7287c1eb8 fix: do not call navigator.update() when scrollToElement is explicitly passed a new index value 2022-09-19 14:29:03 -04:00
Julian Lam
fa643eb808 fix: race condition where navigator.update was called when it should not be 2022-09-19 14:29:03 -04:00
Julian Lam
9f9a835fcb feat: a couple utility methods in navigator module to get and set count and index 2022-09-19 14:29:03 -04:00
Julian Lam
881c7c4d18 fix: automatically remove lang parameter if it matches the forum default 2022-09-12 13:01:19 -04:00
Opliko
bcb94edeb4 feat: add event type to topic event component 2022-08-15 14:18:43 -04:00
Barış Soner Uşaklı
70ad4a5222 fix: clear dragging on mouseup as well
dragging a modal wasn't firing dragend
2022-05-11 19:38:00 -04:00
Julian Lam
5aca106b81 chore: add note re: sort module 2022-05-11 14:02:57 -04:00
Barış Soner Uşaklı
dc320c897a feat: closes #10601, ability to prevent alerts on topic list 2022-05-11 11:08:50 -04:00
Barış Soner Uşaklı
e904f43857 feat: add sorted-list.parse 2022-05-06 23:33:53 -04:00
Barış Soner Uşaklı
8faa6f2382 feat: add new hook that fires when sorted-set list modal is shown 2022-05-06 21:24:12 -04:00
Barış Soner Uşaklı
d2e6f31717 refactor: not used anymore 2022-05-01 23:04:57 -04:00
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>
2022-04-29 21:39:33 -04:00
Julian Lam
21dbd47688 fix: typo in hook name 2022-04-26 11:31:46 -04:00
Julian Lam
46fbe15665 fix: #10443, regression where sorted-list items did not render into the DOM in the predicted order [breaking] 2022-04-26 11:31:42 -04:00
Julian Lam
b88bb3cfbb feat: allow client-side hook registration chaining 2022-03-23 16:35:59 -04:00
Barış Soner Uşaklı
f76c0e8952 refactor: shorter generateTopicClass 2022-03-16 17:24:25 -04:00
Julian Lam
935704a83c feat: collect hook logs in order to reduce console noise, flush on ajaxify loadScript completion 2022-03-15 16:30:05 -04:00
Julian Lam
4b79dfd29d feat: add support for PATCH method in api module 2022-03-14 17:22:09 -04:00
Barış Soner Uşaklı
e9a86cb912 fix: optional params 2022-03-08 14:44:53 -05:00
Barış Soner Uşaklı
e841d59a67 feat: add translateKeys 2022-03-08 11:40:12 -05:00
Barış Soner Uşaklı
70e613f814 fix: #10374, use quick search in setting 2022-03-08 09:17:31 -05:00
Julian Lam
1c8d1d231e fix(sorted-list): call loadItem hook on add/edit items as well as on item retrieval, refactor edit to call parse() 2022-02-22 13:26:30 -05:00
Julian Lam
914733e44b fix: allow calls to api module without a defined payload 2022-02-22 11:41:33 -05:00
Julian Lam
92d613e420 feat(sorted-list): add new client-side hook filter:settings.sorted-list.loadItem 2022-02-22 10:39:54 -05:00
Julian Lam
fb4f89f391 fix(sorted-list): only call .stripHTMLTags() on string values 2022-02-22 10:30:52 -05:00
Julian Lam
1fa4134201 fix: #10329, select elements in sorted-list not showing proper values 2022-02-18 14:49:28 -05:00
Barış Soner Uşaklı
3acd2ac850 refactor: wrap around if at end
remove debug log
dont focus input on mobile
2022-02-17 11:19:43 -05:00
Barış Soner Uşaklı
b517b376ac feat: ability to go through your posts in a topic
because I am 👴 useful for large topics
2022-02-16 22:07:52 -05:00
Barış Soner Uşaklı
58b5781cea feat: closes #10296
asset_base_url in nconf
keep assetBaseUrl in config for backwards compat
2022-02-15 19:22:34 -05:00
Barış Soner Uşaklı
cf5c096806 feat: add upload helper module for drag&drop, paste, closes #6388
fix chat input not getting focused
2022-02-01 20:03:15 -05:00
Barış Soner Uşaklı
93d18383ee fix: don't crash if quick search doesn't return posts 2022-01-28 20:10:21 -05:00
Julian Lam
89b559a2a3 refactor: sorted-list .get() to be async fn
+ plugin hook `filter:settings.sorted-list.load` to allow modification of params prior to template parsing
2022-01-28 10:07:54 -05:00
Julian Lam
eeffb9d978 feat: POST /api/v3/chats/:roomId 2021-12-22 10:59:36 -05:00
Barış Soner Uşaklı
621c142f8e refactor: alerts 2021-12-06 16:24:09 -05:00
Barış Soner Uşaklı
0a6eeb933e lint: fix 2021-12-06 15:25:10 -05:00
Barış Soner Uşaklı
cba78aee16 refactor: use alerts.error/success 2021-12-06 14:31:35 -05:00
Barış Soner Uşaklı
4f4236101b fix: wrong usage of is ACP 2021-12-06 14:27:43 -05:00
Barış Soner Uşaklı
dd02c49f43 refactor: use lang keys, fix typo 2021-12-06 12:50:59 -05:00
Barış Soner Uşaklı
1980feed46 refactor: use alerts module 2021-12-06 12:45:35 -05:00
Barış Soner Uşaklı
36aa60346b breaking: remove action:category.loaded, use action:topics.loading
action:category.loaded will not fire on infintite load of topics
2021-11-27 14:58:03 -05:00
Barış Soner Uşaklı
242f8e95ad fix: #10020, /api/post/upload returns v3 style response 2021-11-21 19:45:04 -05:00
Barış Soner Uşaklı
fb363957d1 refactor: tab rules 2021-11-18 16:42:18 -05:00
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
2021-11-17 23:34:01 -05:00
Barış Soner Uşaklı
4359e5c97c refactor: remove tabs after declaration 2021-11-16 16:24:17 -05:00
Barış Soner Uşaklı
7f8783555b Revert "perf: remove createUserTooltips"
This reverts commit facc10e40f.
2021-11-13 20:16:24 -05:00
Baris Usakli
facc10e40f perf: remove createUserTooltips 2021-11-12 11:18:44 -05:00
Barış Soner Uşaklı
96f13e4f5d feat: #9992, hooks.one 2021-11-09 19:29:29 -05:00
Barış Soner Uşaklı
0428912c6d refactor: deprecate app.alert functions user alerts module directly 2021-11-09 13:34:59 -05:00