Tryton Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(429)

Issue 36911002: sao: Store session on browser storage

Can't Edit
Can't Publish+Mail
Start Review
Created:
5 months ago by pokoli
Modified:
1 week, 2 days ago
Reviewers:
ced, reviewbot
Visibility:
Public.

Description

Patch Set 1 #

Patch Set 2 : Update to tip #

Patch Set 3 : Store credentials on localstorage #

Total comments: 2

Patch Set 4 : Update to tip and fix comments #

Total comments: 7

Patch Set 5 : Use better prefix and store data as dict #

Total comments: 7

Patch Set 6 : Fix ced remarks #

Total comments: 3

Patch Set 7 : Merge restore_session into init and simplify api #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -2 lines) Patch
M CHANGELOG View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M src/session.js View 1 2 3 4 5 6 5 chunks +32 lines, -2 lines 4 comments Download

Messages

Total messages: 21
pokoli
5 months ago (2017-12-18 12:12:51 UTC) #1
reviewbot
flake8 OK URL: https://codereview.tryton.org/36911002
5 months ago (2017-12-18 12:49:28 UTC) #2
pokoli
Update to tip
3 months, 3 weeks ago (2018-01-29 13:14:59 UTC) #3
reviewbot
flake8 OK URL: https://codereview.tryton.org/36911002
3 months, 3 weeks ago (2018-01-29 13:26:04 UTC) #4
pokoli
Store credentials on localstorage
3 months, 3 weeks ago (2018-01-29 16:29:37 UTC) #5
reviewbot
flake8 OK URL: https://codereview.tryton.org/36911002
3 months, 3 weeks ago (2018-01-29 16:50:33 UTC) #6
ced
https://codereview.tryton.org/36911002/diff/40001/src/session.js File src/session.js (right): https://codereview.tryton.org/36911002/diff/40001/src/session.js#newcode40 src/session.js:40: localStorage.setItem(storage_prefix + key, this[key]); I do not see the ...
1 month ago (2018-04-18 17:15:33 UTC) #7
pokoli
Update to tip and fix comments
3 weeks, 2 days ago (2018-04-27 08:33:31 UTC) #8
reviewbot
flake8 OK URL: https://codereview.tryton.org/36911002
3 weeks, 2 days ago (2018-04-27 09:00:56 UTC) #9
ced
https://codereview.tryton.org/36911002/diff/60001/src/session.js File src/session.js (left): https://codereview.tryton.org/36911002/diff/60001/src/session.js#oldcode10 src/session.js:10: Not in this patch. https://codereview.tryton.org/36911002/diff/60001/src/session.js File src/session.js (right): https://codereview.tryton.org/36911002/diff/60001/src/session.js#newcode38 ...
1 week, 6 days ago (2018-05-07 13:28:23 UTC) #10
pokoli
Use better prefix and store data as dict
1 week, 3 days ago (2018-05-10 08:02:30 UTC) #11
pokoli
https://codereview.tryton.org/36911002/diff/60001/src/session.js File src/session.js (right): https://codereview.tryton.org/36911002/diff/60001/src/session.js#newcode38 src/session.js:38: localStorage.setItem(this.database + key, this[key]); On 2018/05/07 13:28:23, ced wrote: ...
1 week, 3 days ago (2018-05-10 08:02:39 UTC) #12
reviewbot
flake8 OK URL: https://codereview.tryton.org/36911002
1 week, 3 days ago (2018-05-10 08:09:18 UTC) #13
ced
https://codereview.tryton.org/36911002/diff/80001/src/session.js File src/session.js (right): https://codereview.tryton.org/36911002/diff/80001/src/session.js#newcode37 src/session.js:37: var data = { Is session not a better ...
1 week, 3 days ago (2018-05-10 15:32:39 UTC) #14
pokoli
Fix ced remarks
1 week, 3 days ago (2018-05-10 15:56:52 UTC) #15
pokoli
https://codereview.tryton.org/36911002/diff/80001/src/session.js File src/session.js (right): https://codereview.tryton.org/36911002/diff/80001/src/session.js#newcode42 src/session.js:42: data = JSON.stringify(data); On 2018/05/10 15:32:38, ced wrote: > ...
1 week, 3 days ago (2018-05-10 15:57:06 UTC) #16
reviewbot
flake8 OK URL: https://codereview.tryton.org/36911002
1 week, 3 days ago (2018-05-10 16:07:39 UTC) #17
ced
https://codereview.tryton.org/36911002/diff/100001/src/session.js File src/session.js (right): https://codereview.tryton.org/36911002/diff/100001/src/session.js#newcode88 src/session.js:88: _store_session: function() { I do not think it makes ...
1 week, 3 days ago (2018-05-10 16:18:03 UTC) #18
pokoli
Merge restore_session into init and simplify api
1 week, 2 days ago (2018-05-11 08:13:19 UTC) #19
reviewbot
flake8 OK URL: https://codereview.tryton.org/36911002
1 week, 2 days ago (2018-05-11 08:36:39 UTC) #20
ced
1 week, 2 days ago (2018-05-11 23:11:30 UTC) #21
https://codereview.tryton.org/36911002/diff/120001/src/session.js
File src/session.js (right):

https://codereview.tryton.org/36911002/diff/120001/src/session.js#newcode29
src/session.js:29: if (!Sao.Session.current_session && this.login) {
I do not understand why?

https://codereview.tryton.org/36911002/diff/120001/src/session.js#newcode155
src/session.js:155: var saved_session = new Sao.Session(database, null);
I think it can be named just session like below.

https://codereview.tryton.org/36911002/diff/120001/src/session.js#newcode156
src/session.js:156: if (saved_session.session !== null) {
Just: if (saved_session.session)

https://codereview.tryton.org/36911002/diff/120001/src/session.js#newcode181
src/session.js:181: var session = new Sao.Session(database, login);
I think you could reuse the first session instance.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld bc8b922