45 Commits (55a197a7d79037a08cec9c71bb6b9e66f09f94f8)

Author SHA1 Message Date
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ı 6b22d0e15f fix: #10334, use the correct env vars for web install 3 years ago
gasoved 3acaac4c7c
fix: html attributes (#9877)
* fix: some empty xml tag bodies

* fix: missing/wrong attributing of label tags

* fix: attribute fixes

* fix: misassociated label

* fix: missing alt attributes

* fix: some more missing associated labels
4 years ago
Barış Soner Uşaklı dfdc0c420c fix: benchpress warnings 5 years ago
Andrew Rodrigues 962b7f73d3 fix: #7472 6 years ago
Ben Lubar 33228bb7fe PostgreSQL database driver (#5861)
* [test/database/list] Fix test list 4 being used in two different tests

* [database/postgres] PostgreSQL database driver

* [database/postgres] Make transactions work based on continuation scope.

* [database/postgres] Implement nested transactions

* eslint --fix

* Add database changes from earlier this week to the PostgreSQL driver.

* Fix typo

* Fix postgres.incrObjectFieldBy returning undefined instead of null when given NaN

* [database/postgres] Fix sortedSetsCard returning an array of strings.

* Update socket.io postgres adapter

* Fix PostgreSQL erroring when multiple updates are made to the same sorted set entry in a single operation.

Add a test case to catch this error.

* Fix lint errors.

* Only prune sessions on one instance in a cluster to avoid deadlocks.

They're caught and handled by the database server, but they spam the logs.

* Fix arguments.slice.
7 years ago
Barış Soner Uşaklı fc56347c22 closes #6520 7 years ago
Barış Soner Uşaklı e50302505b dont show form if installing 7 years ago
Barış Soner Uşaklı 4e495adcd7 add installing notice and refresh 7 years ago
Barış Soner Uşaklı a48c0a4c3d if installing show working icon on refresh 7 years ago
Barış Soner Uşaklı c2f088cb61 dont install multiple times 7 years ago
Julian Lam 943d33ed09 closes #6502, also fixed issue with type: 'literal' in config.json 7 years ago
Peter Jaszkowiak c731661a39 Remove external sources from installer page (#6101)
* Remove external sources from installer page

* Remove bootstrap.min.css

* Make spinner display consistently cross-platform

* Change spinner to look better
8 years ago
Julian Lam 766f94745f updated bootstrap and bootswatch css on installer template, closes #6033 8 years ago
psychobunny 66d8c29d25 use different path for installer files 9 years ago
Anil Mandepudi 619ca48403 remove shims for IE8 (#5157) 9 years ago
phit 2342d59e6f fix mixed content warning on 503 status page and installer 9 years ago
barisusakli e55043e5ab closes #4867 9 years ago
Julian Lam 84cbdc1358 changed the password confirmation form field in the web installer so that it doesn't clobber some env vars, and allowed admin username and email to be set via env var 10 years ago
Julian Lam 275a9ef476 Reverted the last update to web installer, and updated it so environment variables always take precedence over form input, and form is hidden if database value is passed in 10 years ago
Julian Lam 5487da9030 updated web installer to auto-select the database if passed in via env var 10 years ago
Julian Lam 67eef3653b updated the web install form to populate the database fields if a value is passed in 10 years ago
psychobunny ddd5c49461 installer ux fixes 10 years ago
psychobunny 7488fa0416 cleanup; fixes 10 years ago
psychobunny d72d1a1641 save values from form 10 years ago
psychobunny 45e216edef installer: database error messages 10 years ago
psychobunny 8556ddd9a0 installation spinner; started launch page 10 years ago
psychobunny 220dec5711 installer: validate before sending form 10 years ago
psychobunny 2646b38dd2 woops, added too many namespaces 10 years ago
psychobunny 20a1ab185c small refactor to install/web.js 10 years ago
psychobunny a386974585 installer: database switcher 10 years ago
psychobunny bf13b6160f load database questions 10 years ago
psychobunny a11652ead1 cleanup installer.less 10 years ago
psychobunny 8a7aaf8f76 installer: validate email 10 years ago
psychobunny ab2272b6b5 installer: confirm password 10 years ago
psychobunny fe40d0f9e8 installer: password validation 10 years ago
psychobunny 9fba76dc43 fixed header links for installer 10 years ago
psychobunny 22d2ba5d6b mobile optimization for installer 10 years ago
psychobunny 50b9a7096e minor ux 10 years ago
psychobunny 25e2e72366 got username validation working 10 years ago
psychobunny 1f2bd9390d compiling JS as well now 10 years ago
psychobunny 005c95277b using less for web installer 10 years ago
psychobunny 2ffdec5386 styled active clas 10 years ago
psychobunny ee94d72c59 themed installer, started form 10 years ago
psychobunny 60d655e32b installer - got the basics in 10 years ago