Commit Graph

91 Commits

Author SHA1 Message Date
Julian Lam
a41769e61c feat: update meta tags on ajaxify (#7580), fixes #7544
* feat: wip -- refresh meta tags on ajaxify

* feat: wrapped up meta tags update on ajaxify feature

* fix: removed commented-out line

* fix: removed another commented-out line
2019-05-16 09:41:56 -04:00
Aziz Khoury
3fbb6faf28 feat: update unban logic/invocation and refactor User.bans module
* auto unban when User.getUsersFields is called and the user is banned but has expired

* cleanups and removal of expiry_readable

* expiry_readable make an alias for backward compatibility

* User.bans.func vs User.*ban*Func

* console.log cleanups, plus todo message added

* use code util.deprecate

* fix: remove ununsed winston require
2019-04-05 14:14:48 -04:00
Barış Soner Uşaklı
c72da5595a fix: #6806
3 new global privileges
view:users
view:tags
view:groups
2019-02-05 12:08:18 -05:00
Julian Lam
f122fc44d0 fix: #7266 body does not contain skin class
A regression was identified where the skin was not shown in the
body class. This resolves the issue and adds a workaround so that
the fix does not become breaking for custom themes.
2019-01-19 12:03:12 -05:00
Barış Soner Uşaklı
ed5d2d6d15 feat: get rid of disk access 2019-01-18 15:32:34 -05:00
Julian Lam
c831ff0de3 fix: removal of timeago fallback middleware (#7259)
* fix: removal of timeago fallback middleware

Instead of loading English fallback on missing language, we opt
to not send a script tag for a missing language to begin with.

Timeago already loads with English as default, so it will just
continue to use English.

* fix: check userLang against supported language codes

* fix: cleaned up code as per @pitaj

* fix: added comments

* fix: more fixes as per @pitaj

* feat: added addl. test for timeago locales, fixed broken test
2019-01-17 12:25:53 -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ı
b2a74b4172 fix: remove cache 2018-12-17 17:54:33 -05:00
Barış Soner Uşaklı
0cb9bba4da feat: header 2018-12-17 17:11:35 -05:00
Barış Soner Uşaklı
4650a76036 fix: #7124 2018-12-16 00:09:13 -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ı
99e0895e99 fix: move the check to get methods
all .post methods will have csrf
2018-12-14 23:38:05 -05:00
Barış Soner Uşaklı
9d28b935fd dont load uid 0, -1 from db 2018-11-22 21:57:56 -05:00
Barış Soner Uşaklı
b6771836cf closes #6937 2018-11-10 20:51:07 -05:00
renovate[bot]
64b9dabff8 chore(deps): update dependency eslint-config-airbnb-base to v13 (#6599)
* chore(deps): update dependency eslint-config-airbnb-base to v13

* chore: #6599, linting 😬
2018-11-07 15:53:14 -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
Julian Lam
84433f29ab Do not require a full refresh on login/logout (#6841)
* no-refresh login as well, plus lots of fixes for missing config on login

* replace config with new set on logout as well

* passing new payload data into new action:app.loggedIn hook, and old action:app.loggedOut hook

* fixed issues with socket.io not properly representing uid on server

* some light refactoring and cleanup

* minor cleanup, fixed spa logout not working after login

* have reconnection handler for socket.io wait 2s to confirm disconnection before reporting -- stops flicker if reconnecting immediately

* Dynamically replace chat and slideout menu on updateHeader()

... instead of just the menu items.

* more efficient calls to Benchpress and translator /cc @pitaj

* fix: chats and notification handlers not working after login

* fix: accidentally calling cb multiple times
2018-11-07 12:34:12 -05:00
Barış Soner Uşaklı
f3a679e268 remove parseInts 2018-10-25 17:02:59 -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ı
702be3f6de https://github.com/NodeBB/nodebb-theme-persona/issues/363 2018-10-10 22:46:36 -04:00
Barış Soner Uşaklı
cf75c79611 Unread changes closes #6781 (#6783)
* WIP

* more unread work

* faster teaser block handling

if user doesn't have anyone blocked don't check

* much faster filtering of blocked posts

* add missing uid

* add tidsByFilter to return

* dont load all pids to find previous non-blocked teaser

* fix unread filters

they no longer use unread/new unread/watched etc they are query strings now

* shorter nav item code

* add unreplied to filters

fix icons not clearing to 0
dont increment unread counters if there is a reply in a topic where you ignored the topic creator
2018-09-24 12:58:59 -04:00
Julian Lam
3522ad0e05 Revert "closes #6664"
This reverts commit f27a0d252c.
2018-07-24 16:05:05 -04:00
Julian Lam
f27a0d252c closes #6664 2018-07-24 15:43:54 -04:00
Barış Soner Uşaklı
0070f5c1b2 Merge remote-tracking branch 'refs/remotes/origin/master' into develop 2018-04-05 12:34:38 -04:00
Baris Usakli
52ab0a00d9 use the acp config for homePageTitle 2018-03-12 13:24:16 -04:00
Barış Soner Uşaklı
245e1a9159 closes #6334 2018-02-28 16:32:39 -05:00
Barış Soner Uşaklı
5069892b97 pass correct uid to client side
-1 spider,0 guest, >0 regular user
2018-02-23 15:34:31 -05:00
Julian Lam
1ce448f2a1 Merge remote-tracking branch 'origin/master' into develop 2018-02-16 21:23:25 -05:00
Barış Soner Uşaklı
d16667a5fb closes #6304 2018-02-05 10:04:19 -05:00
Barış Soner Uşaklı
ac1f7eefe5 closes #2304 2018-01-31 15:20:17 -05:00
Barış Soner Uşaklı
ff6c6a54c1 make upload permissions global
give upload image permission to registered users on install
add global privileges to app.user.privileges for client side use
2018-01-03 13:27:34 -05:00
Barış Soner Uşaklı
2b6410f201 Merge remote-tracking branch 'refs/remotes/origin/master' into chat-permission 2018-01-03 10:51:18 -05:00
Barış Soner Uşaklı
fb97ff2265 canChat should be false if chat is globally disabled 2017-12-21 14:24:29 -05:00
Peter Jaszkowiak
be00a1c013 Support for using yarn instead of npm, include unread counts on cold load (#6179)
* Close #6178

* Support for package managers besides npm

- Also fixes issue where upgrade-plugins wouldn't work
2017-12-20 15:56:14 -05:00
Baris Usakli
4a73621dca chat privilege 2017-12-18 15:43:57 -05:00
Barış Soner Uşaklı
41fbf7117d Merge remote-tracking branch 'refs/remotes/origin/master' into develop 2017-10-25 18:21:54 -04:00
Barış Soner Uşaklı
056e4f0601 #6004 2017-10-25 09:08:03 -04:00
Barış Soner Uşaklı
ce3e1f31ab fix for #6004 2017-10-24 17:55:45 -04:00
Julian Lam
9cbf1597cd Merge remote-tracking branch 'origin/master' into develop 2017-10-12 14:01:14 -04:00
Baris Usakli
68bcfb2883 closes #5975 2017-10-12 13:54:53 -04:00
Julian Lam
cd6dcff38b Split up customJS into customHTML and customJS for better organisation (#5981)
* WIP

* fixed customJS not actually working in footer

* Moving scripts to footer, #5980

* Added upgrade scripts for #5980
2017-10-12 13:38:27 -04:00
Barış Soner Uşaklı
0498832317 closes #5888 2017-08-22 10:28:35 -04:00
Barış Soner Uşaklı
493cd16f39 closes #5848 2017-07-31 16:48:28 -04:00
Baris Usakli
dc110e2e3f closes #5818 2017-07-11 13:44:51 -04:00
Baris Usakli
7538210b07 #5772
load correct timeago settings on cold load instead of after page load
2017-07-06 14:09:59 -04:00
Barış Soner Uşaklı
b64ba40c67 closes #5772 2017-06-26 17:27:48 -04:00
Barış Soner Uşaklı
08aaabd33c closes #5642 2017-05-27 23:32:55 -04:00
Barış Soner Uşaklı
3a1eba2537 merge 2017-05-08 13:49:35 -04:00
psychobunny
b3bd70235a refactor ban messaging; add ban duration to message; use bootbox instead of alert 2017-05-05 19:31:49 -04:00
Barış Soner Uşaklı
4900f21dd5 fix crash in header 2017-04-24 13:30:01 -04:00