Commit Graph

5262 Commits

Author SHA1 Message Date
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
Julian Lam
900f0a0b78 fix: #7118, invoking autoLocale middleware on logout
Also:
- firing client-side hook on header update
- updating bootbox locale on header update
2018-12-20 14:01:42 -05:00
Andrew Rodrigues
7fb29f4272 fix: closes #6784 (#7137)
* fix: closes #6784

* #6784 also fix homepage + subfolder installs

* #6784 fixes suburls as well (ex. /tags/x and /groups/y)

* #6784 more elegant solution @pitaj

and the last time I touch this function, lol

* #6784 regis, final answer

I lied in that last commit
2018-12-19 16:16:35 -05:00
Barış Soner Uşaklı
ab81cca735 fix: 7100 2018-12-19 12:09:36 -05:00
Barış Soner Uşaklı
7e828404f6 fix: #7116
dont save relative_path in db for group covers
2018-12-18 19:43:28 -05:00
Barış Soner Uşaklı
29a85aecc7 fix: #7138 2018-12-18 19:20:51 -05:00
Baris Usakli
b47f939bfc fix: lint 2018-12-18 14:04:57 -05:00
Baris Usakli
69e0dbbf4a fix: #7091, #7093 2018-12-18 14:02:54 -05:00
Baris Usakli
0c1ac4d6a2 feat: #7032 2018-12-18 13:44:03 -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ı
eb7ae54f81 Category watch state (#7109)
* feat: wip, category watch change

* feat: pass data to client

* feat: allow changing state

* fix: account page categories

* fix: show in unread if topic is followed or category is watched

* feat: add default watch state to acp

* feat: save user category watch state

* feat: update unread recent pages

* fix: remove dupe code

* fix: flip conditions

* fix: handle empty arrays

* fix: ignore/watch on others profile

* feat: upgrade script for category states

if there are any users ignoring categories set their state in new zset and delete cid:<cid>:ignorers

* fix: upgrade

* fix: tests

* fix: redis count

* fix: more tests
2018-12-14 16:24:17 -05:00
Barış Soner Uşaklı
f103390aa5 fix: #7103
update counter when user navigates to /unread
fix new topic alert on /unread
moved unread code from footer to unread
2018-12-12 19:43:35 -05:00
Barış Soner Uşaklı
74d0e88df3 fix: don't explode if there is no css el 2018-12-12 11:16:49 -05:00
Barış Soner Uşaklı
555c092f65 fix: dont send empty strings 2018-12-08 19:53:19 -05:00
Julian Lam
ed46c5e24b fix: refreshing settings page on save if language changed 2018-12-07 14:25:10 -05:00
Julian Lam
5f3d1c76c8 fix: #7038, autoLocale logic not playing nicely with no-refresh auths (#7059)
* fix: #7038, autoLocale logic not playing nicely with no-refresh auths

- on login, req.query.lang is deleted (since it seems to be left over)
- on logout, the middleware.autoLocale is executed, which resets
  req.query.lang
- middleware.autoLocale is new, just refactored existing logic in
  webserver.js into new middleware method.

* style: tests, use lodash

* fix: timeago strings not switching languages on login or out
2018-12-07 11:29:20 -05:00
Barış Soner Uşaklı
2604cf6356 fix: #7074 2018-12-06 20:54:45 -05:00
Julian Lam
6df5668e64 fix: #7063, logout code should do hard page nav to / or data.next 2018-12-05 13:11:55 -05:00
Barış Soner Uşaklı
41357abb59 Merge branch 'master' of https://github.com/NodeBB/NodeBB 2018-12-04 14:32:49 -05:00
Barış Soner Uşaklı
f581c052ee feat: #7023
- add category selector to privileges and category create modals
- allow category selector to work for multiple selectors on same page
2018-12-04 14:32:43 -05:00
Julian Lam
28a1fa780a fix: skin not changing after login or logout, #7038 2018-12-04 12:06:21 -05:00
Baris Usakli
cd02e03f7b don't crash if meta.config is undefined 2018-12-03 11:14:18 -05:00
Peter Jaszkowiak
ba619c7ec8 style(eslint): match operator-linebreak preferences 2018-11-30 13:38:59 -05:00
Peter Jaszkowiak
89c025d102 feat: close #7002, console message if mismatched origins 2018-11-30 13:38:59 -05:00
Barış Soner Uşaklı
58d4376f7e fix: #7030 2018-11-29 11:26:57 -05:00
Barış Soner Uşaklı
e78aea1e86 close #7024
show error instead showing crop modal
2018-11-29 10:17:52 -05:00
Barış Soner Uşaklı
ed1bf9a16f add more info to advanced db page 2018-11-28 19:24:54 -05:00
Barış Soner Uşaklı
27c016d68d fix alert 2018-11-28 12:06:03 -05:00
Julian Lam
f6b92c1d3e fix: #7013, add cache buster to js-enabled.css 2018-11-27 11:56:45 -05:00
Baris Usakli
e3bf21a3a0 closes #6993 2018-11-23 13:02:34 -05:00
Barış Soner Uşaklı
5c48793543 handle quoted strings 2018-11-22 22:38:17 -05:00
Barış Soner Uşaklı
dc670a7bb5 closes #6983
after first pass of timeago, title contains "21 lis 2018, 10:30" which is invalid for new Date(), check before passing it to format
2018-11-22 15:05:22 -05:00
Barış Soner Uşaklı
625516e046 if there is no search el return
aka if theme doesnt support it
2018-11-21 15:52:47 -05:00
Barış Soner Uşaklı
63c0a9a3b7 closes #6928 2018-11-21 15:32:12 -05:00
Barış Soner Uşaklı
169a6680d5 #6928 2018-11-21 13:40:47 -05:00
Julian Lam
98c14e0e68 fix: removal of scroll anchoring code in favour of browser handling
closes #6150
2018-11-20 16:56:54 -05:00
Baris Usakli
1454fdceff closes #6874 2018-11-20 15:08:06 -05:00
Barış Soner Uşaklı
f4a00f0b5f only init unread topics for loggedin users
dont call isFollowed
2018-11-19 15:03:53 -05:00
Barış Soner Uşaklı
33986f38e3 closes #6954 2018-11-18 16:03:31 -05:00
Barış Soner Uşaklı
1ce15e69ab dont require search and moustrap on topic page until needed 2018-11-18 10:32:08 -05:00
Barış Soner Uşaklı
c0a75d735b fix requires 2018-11-17 20:56:35 -05:00
Barış Soner Uşaklı
c02d584b53 reduce initial js payload/requests 2018-11-17 20:50:07 -05:00
Baris Usakli
0fd5210d37 really fix pagination on mobile 2018-11-17 14:47:05 -05:00
Baris Usakli
2624e302ab fix navigator on mobile 2018-11-17 14:43:33 -05:00
Baris Usakli
c1ab753bc3 use paginationBlock 2018-11-17 14:22:33 -05:00
Baris Usakli
c343b93a37 optimize ajaxify
- do not call $.timeago twice on topic load and for widgets
- do not use toLocaleString for each timeago string, use a single
Intl.DateTimeFormat instance instead
- do not call format for empty timeago strings, ie a post that isnt
edited doesnt have a timeago string
- do not call isTouchDevice for every element
- remove app.replaceSelfLinks, this is superceded with /me route
- store references to jquery objects in navigator instead of creating
them on every scroll
2018-11-17 14:07:56 -05:00
Barış Soner Uşaklı
ac549f8bc7 closes #6957 2018-11-14 16:33:22 -05:00
Barış Soner Uşaklı
f0dead7aba more tooltip work 2018-11-14 13:53:35 -05:00
Barış Soner Uşaklı
4b6b3d5436 set duration to 0 2018-11-14 00:57:41 -05:00