Commit graph

152 commits

Author SHA1 Message Date
Matthew Taylor
7945a7eff1 only dispatch count if the user is present
this prevents a console error
2017-09-06 14:25:44 -04:00
Matthew Taylor
2bd9b184c5 Fix GH-[1505, 1507]: hide message counter on 0 (#1510)
* Hide messages counter when at 0

fixes #1507

* check for body before looking at success

fixes #1505
2017-09-06 10:05:14 -04:00
Matthew Taylor
5772eed8f7 use lodash instead of assign
this fixes #1500, since lodash works in ie11 but `assign` does not
2017-09-05 12:28:01 -04:00
Matthew Taylor
74400b0599 add comments to redux methods 2017-09-05 10:03:48 -04:00
Matthew Taylor
71b93cb207 reduce unread count on successful admin message dismiss 2017-09-01 11:07:21 -04:00
Matthew Taylor
3dee0e46d2 continue to use proxy msg count for now 2017-09-01 10:20:18 -04:00
Matthew Taylor
779c42717b I think I misunderstood the xhr docs 2017-08-31 23:39:49 -04:00
Matthew Taylor
3022a565ce json-encode body 2017-08-31 18:39:03 -04:00
Matthew Taylor
9ace64fda7 add csrf for message clear requests 2017-08-31 18:24:58 -04:00
Matthew Taylor
3dd768f2f6 GH-1361: Implement Notifications Page (#1487)
* start work on www page
committing out of paranoia.
including changing splash page endpoints

* updates from feedback

thanks @rschamp! This includes:

1. splitting out messages list into a separate component (for clarity)
2. some comment/formatting adjustments for the api calls
3. removal of an extraneous property in emoji-text

* remove duplicate string declaration

* use object.assign instead of defaults deep

we don’t need deep defaults

* fix react warnings
2017-08-31 17:05:22 -04:00
Matthew Taylor
19757ef730 Update details uri to have 2016 path 2017-02-15 08:44:28 -05:00
Matthew Taylor
cbd983baf8 Merge pull request #932 from TheGrits/patch-3
Fix gh-678: Retain Search Term
2016-12-12 22:52:38 -05:00
The_Grits
0b2c1fff1a Squish 2016-12-12 16:01:06 -05:00
The_Grits
d9df101a66 One Commit More (#23)
* Update reducer.js

* Update search.jsx
2016-11-07 11:02:33 -05:00
The_Grits
8be3e11486 Travis and Other Stuffs 2016-10-31 10:19:35 -04:00
The_Grits
9f2cda0eaa Bugs and Connections 2016-10-31 10:05:08 -04:00
Matthew Taylor
7e04ae1088 Add w/o slash to the whitelist paths
as recommended in https://github.com/LLK/scratchr2/pull/4127#issuecomment-256484893
2016-10-27 08:38:17 -04:00
The_Grits
379ac78551 Navigation Redux 2016-10-26 10:20:16 -04:00
The_Grits
f77b22b07b Update with Reducer 2016-10-20 21:30:32 -04:00
Matthew Taylor
dc48dbb34a use var not const
We’re not at es6 yet. My baaaaaaaaaaddddd
2016-10-19 15:41:56 -04:00
Matthew Taylor
e1e9455866 Don’t redirect banned user on comm. guideliens
Goes along with https://github.com/LLK/scratchr2/pull/4127.
2016-10-05 17:49:18 -04:00
The_Grits
195930bc53 Merge! 2016-09-30 13:54:34 -04:00
The_Grits
d90f62c316 Create navigation.js 2016-09-30 13:48:57 -04:00
Ray Schamp
e44e958fe0 Move permissions storage to client-side cookie
Instead of retrieving the permission from the session cookie, store permission data from /session/, and cache it in a cookie.  On subsequent page loads, the permission information will be retrieved from the cookie more quickly than the /session/ endpoint returns. When the session changes, the cookie and permissions state is updated to reflect the new state.
2016-09-08 12:53:05 -04:00
Ray Schamp
a497fed338 Remove token storage
We're not using it yet, and it won't be coming from the cookie when we do.
2016-09-08 12:48:07 -04:00
Ray Schamp
0b1f708400 Don't redirect to password reset on complete_registration 2016-07-27 10:27:31 -04:00
Ray Schamp
d83df730c8 Redirect students that must reset their password
Fixes LLK/scratchr2#3878
2016-07-26 16:40:05 -04:00
Ray Schamp
7e330bfb67 Redirect to student registration update view
Previously requests to /session/ would return a signal to redirect, but we need /session/ to complete registration. So check if we should redirect when we retrieve the session.

Also update this behavior for banned users.
2016-07-21 21:08:07 -04:00
Matthew Taylor
5cc6eb3ecb use empty string if no cookie value found
redux doesn't like getting null values for actions, so give empty ones

/cc @rschamp
2016-06-30 15:29:53 -04:00
Matthew Taylor
7bb52c25fe move permissions checks to mirror session more
thanks @rschamp!
2016-06-28 14:25:11 -04:00
Matthew Taylor
9d6fb63d18 Merge branch 'feature/teacher-registration-flow' of https://github.com/rschamp/scratch-www into feature/teacher-registration-flow
* 'feature/teacher-registration-flow' of https://github.com/rschamp/scratch-www: (46 commits)
  Add serverside email validation
  Clean up
  Move registration step to main component
  Submit the rest of the fields when registering
  This help text is redundant now
  Fix organization "other" field enablement
  Get the form creating regular accounts
  Add method to api for submitting forms
  Update language chooser for formsy
  Add missing string
  Add progress indicators
  Style pass
  Remove unused label component
  Remove unused mixin factory
  Fixup api refactor
  Add serverside username validation
  L10n pass
  Explain the GeneralError component
  Add help text when a field is not required
  L10n WIP
  ...

# Conflicts:
#	src/l10n.json
#	src/views/splash/splash.jsx
2016-06-17 15:32:49 -04:00
Ray Schamp
d7df1e980f Move api mixin to lib, remove mixin
The mixin doesn't gain us anything except complexity
2016-06-14 17:29:30 -04:00
Matthew Taylor
5b73c4192d change name to getUnsignedValue
thanks @rschamp!
2016-06-13 10:06:43 -04:00
Matthew Taylor
ac17850491 Add teacher banner to splash page
This only shows if the logged in user is a teacher, and persists for teachers.
2016-06-08 13:47:11 -04:00
Connor Hudson
8022d76aaa Merge pull request #553 from technoboy10/gh548-signout
Fix GH-548: Sign out should take effect before reload
2016-06-06 09:06:36 -04:00
Connor Hudson
75ce6378a2 remove comment 2016-06-06 08:46:28 -04:00
Connor Hudson
9c66939bc3 use defaults instead of defaultsDeep 2016-06-06 08:45:35 -04:00
Matthew Taylor
bcec3d8fc6 Merge pull request #549 from mewtaylor/bugfix/conference-schedule
[Develop] Hotfix: conference schedule bug fixes
2016-06-03 19:52:16 -04:00
Matthew Taylor
c8f6c36b1f Fix schedule formatting
1. Sort schedule by 24-hour time to handle 12-o-clock
2. Sort chunks by type AND time, since multiple chunks have the same name
2016-06-03 19:43:53 -04:00
Connor Hudson
86e4dd6ce8 Another results -> session fix 2016-06-02 10:04:54 -04:00
Connor Hudson
292a9773fc fix session.js 2016-06-01 17:23:19 -04:00
Connor Hudson
f280d1d8df Remove quotes around keys, results -> session 2016-06-01 17:22:11 -04:00
Connor Hudson
11621564f6 why hello there, travis 2016-06-01 17:11:18 -04:00
Connor Hudson
6f39466d9f Reduxified 2016-06-01 17:07:21 -04:00
Connor Hudson
4d65d478ed change to more extensible session 2016-06-01 15:28:18 -04:00
Connor Hudson
e402363576 initial pass 2016-05-31 16:37:42 -04:00
Matthew Taylor
a477be4814 Some more cleanup
1. typo with splitting token/session out
2. redefine `chunk` as `timeSlot`
3. move timeSlot sorting into its own method
2016-05-19 17:37:51 -04:00
Matthew Taylor
a860b27941 Some updates to the redux structure
1. split `auth.js` up so it's 1 reducer per file
2. consolidate the conference schedule reducers
3. make conference reducer names more descriptive
4. add error handling for `body === 'undefined'`

Thanks @rschamp for all the help!
2016-05-19 16:55:25 -04:00
Matthew Taylor
cad75217f0 Add schedule/detail components for conference 2016-05-19 11:34:59 -04:00
Matthew Taylor
b969c4e2ed Split reducers into separate files
Use a model of reducer/action files for each component that has them, and make `reducer.js` be the one that imports and configures all of them. This modeling is based on a few examples I've seen which seemed to work for our current case, but I'm totally fine with splitting actions and reducers into separate directories if we'd like too.
2016-05-19 11:34:28 -04:00
Ray Schamp
32b7d5a41b Retrieve token from session cookie 2016-03-22 14:43:07 -04:00
Ray Schamp
a5e336a175 Use redux for session handling 2016-03-18 11:51:22 -04:00