fix(user-preferences): Fix the issues with saving/retrieving user preferences in OHIFViewer
This commit is contained in:
1 parent
5017fd13af
commit
a4b8f2c5ed
4 files changed
+8
-3
No files matched your search
@@ -0,0 +1,3 @@
|
|||||||
|
<body>
|
||||||
|
<div id="notificationArea" class="notification-area"></div>
|
||||||
|
</body>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
body
|
||||||
|
background-color: black
|
||||||
@@ -36,7 +36,7 @@ export class HotkeysManager {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
if (this.storeFunction) {
|
if (this.storeFunction) {
|
||||||
this.storeFunction.call(this, storageKey, definitions).then(resolve).catch(reject);
|
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);
|
OHIF.user.setData(storageKey, definitions).then(resolve).catch(reject);
|
||||||
} else {
|
} else {
|
||||||
Session.setPersistent(storageKey, definitions);
|
Session.setPersistent(storageKey, definitions);
|
||||||
@@ -50,7 +50,7 @@ export class HotkeysManager {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
if (this.retrieveFunction) {
|
if (this.retrieveFunction) {
|
||||||
this.retrieveFunction(contextName).then(resolve).catch(reject);
|
this.retrieveFunction(contextName).then(resolve).catch(reject);
|
||||||
} else if (OHIF.user) {
|
} else if (OHIF.user.userLoggedIn()) {
|
||||||
try {
|
try {
|
||||||
resolve(OHIF.user.getData(storageKey));
|
resolve(OHIF.user.getData(storageKey));
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ class WindowLevelPresetsManager {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
if (this.retrieveFunction) {
|
if (this.retrieveFunction) {
|
||||||
this.retrieveFunction.call(this).then(resolve).catch(reject);
|
this.retrieveFunction.call(this).then(resolve).catch(reject);
|
||||||
} else if (OHIF.user) {
|
} else if (OHIF.user.userLoggedIn()) {
|
||||||
try {
|
try {
|
||||||
resolve(OHIF.user.getData(WL_STORAGE_KEY));
|
resolve(OHIF.user.getData(WL_STORAGE_KEY));
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
|
|||||||
Reference in new issue
Block a user