fix(user-preferences): Fix the issues with saving/retrieving user preferences in OHIFViewer
This commit is contained in:
parent
5017fd13af
commit
a4b8f2c5ed
3
OHIFViewer/client/body.html
Normal file
3
OHIFViewer/client/body.html
Normal file
@ -0,0 +1,3 @@
|
||||
<body>
|
||||
<div id="notificationArea" class="notification-area"></div>
|
||||
</body>
|
||||
2
OHIFViewer/client/body.styl
Normal file
2
OHIFViewer/client/body.styl
Normal file
@ -0,0 +1,2 @@
|
||||
body
|
||||
background-color: black
|
||||
@ -36,7 +36,7 @@ export class HotkeysManager {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (this.storeFunction) {
|
||||
this.storeFunction.call(this, storageKey, definitions).then(resolve).catch(reject);
|
||||
} else if (Meteor.userId()) {
|
||||
} else if (OHIF.user.userLoggedIn()) {
|
||||
OHIF.user.setData(storageKey, definitions).then(resolve).catch(reject);
|
||||
} else {
|
||||
Session.setPersistent(storageKey, definitions);
|
||||
@ -50,7 +50,7 @@ export class HotkeysManager {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (this.retrieveFunction) {
|
||||
this.retrieveFunction(contextName).then(resolve).catch(reject);
|
||||
} else if (OHIF.user) {
|
||||
} else if (OHIF.user.userLoggedIn()) {
|
||||
try {
|
||||
resolve(OHIF.user.getData(storageKey));
|
||||
} catch(error) {
|
||||
|
||||
@ -153,7 +153,7 @@ class WindowLevelPresetsManager {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (this.retrieveFunction) {
|
||||
this.retrieveFunction.call(this).then(resolve).catch(reject);
|
||||
} else if (OHIF.user) {
|
||||
} else if (OHIF.user.userLoggedIn()) {
|
||||
try {
|
||||
resolve(OHIF.user.getData(WL_STORAGE_KEY));
|
||||
} catch(error) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user