Commit Graph

157 Commits

Author SHA1 Message Date
Julian Lam
d27815a8c0 fix: #9149, incorrect client-side disableChatMessageEditing value for admins/gmods 2020-12-28 09:51:28 -05:00
Julian Lam
a30c8ab5c8 feat: clent-side modal for managing topic thumbs
closes #9087
2020-12-09 10:42:41 -05:00
Julian Lam
6e2da9966e refactor: move plugin hook methods to plugin.hooks.* 2020-11-20 16:32:39 -05:00
Barış Soner Uşaklı
a05905f196 performance improvements (#8795)
* perf: nconf/winston/render

cache nconf.get calls
modify middleware.pageView to call next earlier
don't call winston.verbose on every hook see https://github.com/winstonjs/winston/issues/1669
translate header/footer separately and cache results for guests

* fix: copy paste fail

* refactor: style and fire hook only log in dev mode

* fix: cache key, header changes based on template

* perf: change replace

* fix: add missing await

* perf: category

* perf: lodash clone

* perf: remove escapeRegexChars
2020-10-26 10:43:18 -04:00
Julian Lam
9adaccd036 feat: +assetBaseUrl, -l10BaseUrl, -requireBaseUrl
Additional base URLs were necessary for benchpress and translator,
and in order to not clutter the API response with needless one-
time use base URLs, I decided to use a single base that is used
by all of the services, assetBaseUrl.
2020-08-10 10:23:52 -04:00
Julian Lam
def16f9e97 feat: introduce overridable l10nBaseUrl config value 2020-08-06 10:49:15 -04:00
Barış Soner Uşaklı
c4829fd8c2 feat: allow changing requirejs base url 2020-07-29 14:14:45 -04:00
Barış Soner Uşaklı
fd4c3cda42 fix: #4695, remove new notif alert 2020-07-27 21:34:21 -04:00
Barış Soner Uşaklı
5781a2dc65 feat: fix session mismatch errors by clearing cookie on logout (#8338)
* feat: fix session mismatch errors by clearing cookie on logout

* feat: remove app.upateHeader

ported from 2.0

* feat: handle if user doesn't click button and just refreshes page
2020-05-27 12:15:02 -04:00
Julian Lam
6f504c4142 Remove allowFileUploads ACP option (#8324)
* feat: allow awaitable upgrade scripts

* feat: allowFileUploads removal upgrade script

* refactor: remove unnecessary ACP option `allowFileUploads`

* fix: updated upgrade script template to not use callback arg

* fix: upgrade script as per @baris

* fix: add missing await

* fix: add missing await
2020-05-21 16:06:35 -04:00
Barış Soner Uşaklı
e06c1bfcd2 fix: escape config.userLang/acpLang, don't allow invalid language codes 2020-01-13 12:27:50 -05:00
Barış Soner Uşaklı
4eaa630b1c refactor: async/await controllers/api 2019-08-18 19:06:51 -04:00
Barış Soner Uşaklı
25ea634787 fix: #7659 add option to change cookie link url 2019-06-13 11:54:39 -04:00
Julian Lam
eafe76debb feat: add vote status to getPostData API call 2019-02-19 11:41:23 -05:00
Julian Lam
cee47f78b2 fix: #7289 timeago shorthand toggle fails on non-existant language
- Exposing timeagoCodes to frontend
- Timeago language and shorthand toggling will fall back to 'en'
  if the requested language does not exist
2019-01-21 16:35:42 -05:00
Julian Lam
d81e0a5f5b fix: #7146 Better RTL handling on (de-)authentication
- RTL is applied (or unapplied) on login and logout depending on
  user language/guest-detected language.
- config is automatically saved into res.locals.config whenever
  loadConfig is called
- On login/logout, buildHeader is called instead of getting config
- On logout, req.uid is deleted instead of set to 0
2018-12-21 11:49:11 -05:00
Barış Soner Uşaklı
9f5062682d fix: unread badge
- only increase unread badge if topic or category is watched
- fix logic for "there are new posts/topics" on /unread and /recent
2018-12-15 16:38:30 -05:00
Barış Soner Uşaklı
989879a6b5 fix: #7115 2018-12-14 21:18:42 -05:00
Peter Jaszkowiak
89c025d102 feat: close #7002, console message if mismatched origins 2018-11-30 13:38:59 -05:00
Baris Usakli
b83e50f286 remove delayImageLoading from api @julianlam 2018-11-20 17:20:07 -05:00
Julian Lam
501b3a79ca Refactor skins to be built on server-side (#6849)
* WIP

* using bootswatch from npm instead of bootswatch CDN url

* feat: on-demand client css building for skins

* added ability for client-side to select a skin

* updated loading and saving logic of bootstrapSkin on client side user settings

* fix: broken test for #6849
2018-11-07 13:44:35 -05:00
Barış Soner Uşaklı
ac39112271 remove more parseInts 2018-10-21 19:33:46 -04:00
Barış Soner Uşaklı
9c022afae1 Parse int (#6853)
* Store config fields as JSON in the db

Fewer parseInts

* Remove unnecessary parseInts

* remove some dupe code add tests

* remove console.log

* remove more parseInts

* WIP: read meta.configs defaults from defaults.json

remove more parseInts

* more work

* add log for failing test

* update admin pwd

* fix tests, dont require posts/cache before configs are initialized

* handle saves

* Test boolean conditions

* remove more parseInts

* Fix boolean values

* remove lots more parseInts

* removed json parsing

* renamed var to number

* categories dont have timestamp
2018-10-21 16:47:51 -04:00
Barış Soner Uşaklı
95f1a82884 closes #6591 2018-06-26 13:42:35 -04:00
Barış Soner Uşaklı
a7267df404 closes #6464 2018-05-28 11:29:41 -04:00
Barış Soner Uşaklı
cc3569bf51 closes #6491 2018-05-08 13:33:30 -04:00
Barış Soner Uşaklı
501d02220c closes #6456 2018-04-13 17:09:46 -04:00
Julian Lam
c1aa46c663 added new option to disable post diffs /cc @BenLubar 2018-04-02 10:04:54 -04:00
Julian Lam
1ce448f2a1 Merge remote-tracking branch 'origin/master' into develop 2018-02-16 21:23:25 -05:00
Barış Soner Uşaklı
7b6282f530 closes #6308 2018-02-12 17:12:24 -05:00
Barış Soner Uşaklı
ac1f7eefe5 closes #2304 2018-01-31 15:20:17 -05:00
Julian Lam
5c3155f145 firing hook on chat message load and exposing upload_url to client-side 2018-01-26 13:22:11 -05:00
Julian Lam
3d74fc8220 some changes to fix class names used, character countdown support, etc. 2017-12-20 12:58:59 -05:00
Julian Lam
6bd8740342 removing hasImageUploadPlugin from config api 2017-12-15 13:31:14 -05:00
Barış Soner Uşaklı
cb4930dac8 remove version and environment from config 2017-11-30 10:26:14 -05:00
Barış Soner Uşaklı
923bd86662 Widgets refactor (#5817)
* widgets refactor

render widgets server side
widgets can use all the data the template can use

* fix tests
2017-07-10 12:54:45 -04:00
Baris Usakli
e0de922ede Revert "widgets refactor"
This reverts commit 9e94edb5aa.
2017-07-07 15:35:06 -04:00
Baris Usakli
9e94edb5aa widgets refactor
render widgets server side
widgets can use all the data the template can use
2017-07-07 15:33:16 -04:00
Baris Usakli
dc0971c122 up composer 2017-05-29 13:13:16 -04:00
Peter Jaszkowiak
1ed571189c Make utils and translator easier to require
Move utils.walk to file.walk, backwards compatible
2017-04-08 20:27:52 -06:00
Julian Lam
a49e647de3 fixes #5545 again 2017-03-24 14:46:51 -04:00
Julian Lam
31b6d47f88 fixes #5545 2017-03-24 14:36:54 -04:00
psychobunny
f2eb4b8083 closes #5439 2017-03-10 14:03:07 -05:00
barisusakli
992e3128bd closes #5499 2017-03-07 13:09:19 +03:00
barisusakli
e85e35cf0c closes #5497 2017-03-05 00:46:18 +03:00
barisusakli
b1b87d339f more refactors 2017-03-02 16:11:11 +03:00
Peter Jaszkowiak
896c8c7343 ESlint object-curly-spacing 2017-02-18 12:30:49 -07:00
Peter Jaszkowiak
1493afee2a ESlint indent 2017-02-18 02:38:03 -07:00
Peter Jaszkowiak
a038c66549 ESlint quotes 2017-02-18 01:56:23 -07:00
Peter Jaszkowiak
bc1d70c126 ESlint comma-dangle 2017-02-17 19:31:21 -07:00