-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
42 changed files
with
4,552 additions
and
3,242 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
const sessionStorageTransfer = (event) => { | ||
let $event = event; | ||
if (!$event) { | ||
$event = window.event; | ||
} // ie suq | ||
if (!$event.newValue) return; // do nothing if no value to work with | ||
if ($event.key === 'getSessionStorage') { | ||
// another tab asked for the sessionStorage -> send it | ||
localStorage.setItem('sessionStorage', JSON.stringify(sessionStorage)); | ||
// the other tab should now have it, so we're done with it. | ||
localStorage.removeItem('sessionStorage'); // <- could do short timeout as well. | ||
} else if ($event.key === 'sessionStorage' && !sessionStorage.length) { | ||
// another tab sent data <- get it | ||
const data = JSON.parse($event.newValue); | ||
Object.keys(data).forEach((key) => { | ||
sessionStorage.setItem(key, data[key]); | ||
}); | ||
} else if ($event.key === 'logout') { | ||
sessionStorage.clear(); | ||
} | ||
}; | ||
|
||
// listen for changes to localStorage | ||
if (window.addEventListener) { | ||
window.addEventListener('storage', sessionStorageTransfer, false); | ||
} else { | ||
window.addEventListener('onstorage', sessionStorageTransfer); | ||
} | ||
|
||
// Ask other tabs for session storage (this is ONLY to trigger 'storage' event) | ||
if (!sessionStorage.length) { | ||
localStorage.setItem('getSessionStorage', 'true'); | ||
localStorage.removeItem('getSessionStorage'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export default { | ||
// Suggested for replaceEmptyValueWith: 'N/A' or '-' or '' | ||
replaceEmptyValueWith: '', | ||
// Enable authenication | ||
enableAuthentication: true, | ||
// List for options for authentication empty array defaults to google | ||
authEndPoint: ['google'], // authEndPoint: [] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.