Moving the namespace and some functions from user-management to user package
This commit is contained in:
parent
65ee016efc
commit
08fc0100f8
1
Packages/ohif-user-management/client/handlers.js
Normal file
1
Packages/ohif-user-management/client/handlers.js
Normal file
@ -0,0 +1 @@
|
||||
import { Accounts } from 'meteor/accounts-base';
|
||||
@ -1,4 +1,5 @@
|
||||
import './active-entry';
|
||||
import './components';
|
||||
import './lib';
|
||||
import './handlers';
|
||||
import './subscriptions';
|
||||
|
||||
@ -1,4 +1,2 @@
|
||||
import './audit';
|
||||
import './changePassword';
|
||||
import './getName';
|
||||
import './logout';
|
||||
|
||||
@ -1,9 +0,0 @@
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { Router } from 'meteor/iron:router';
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
OHIF.user.logout = () => {
|
||||
Meteor.logout(function() {
|
||||
Router.go('/entrySignIn');
|
||||
});
|
||||
};
|
||||
@ -23,11 +23,9 @@ Package.onUse(function(api) {
|
||||
// Our custom packages
|
||||
api.use('ohif:design');
|
||||
api.use('ohif:core');
|
||||
api.use('ohif:user');
|
||||
api.use('ohif:study-list');
|
||||
|
||||
// Main module
|
||||
api.mainModule('main.js', ['client', 'server']);
|
||||
|
||||
// Load icons
|
||||
api.addAssets('assets/user-menu-icons.svg', 'client');
|
||||
|
||||
|
||||
@ -1,2 +1,3 @@
|
||||
import './components';
|
||||
import './lib';
|
||||
import './routes';
|
||||
|
||||
2
Packages/ohif-user/client/lib/index.js
Normal file
2
Packages/ohif-user/client/lib/index.js
Normal file
@ -0,0 +1,2 @@
|
||||
import './getName';
|
||||
import './logout';
|
||||
11
Packages/ohif-user/client/lib/logout.js
Normal file
11
Packages/ohif-user/client/lib/logout.js
Normal file
@ -0,0 +1,11 @@
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
OHIF.user.logout = () => Meteor.logout(error => {
|
||||
if (error) {
|
||||
OHIF.ui.showDialog('dialogInfo', {
|
||||
title: 'Error',
|
||||
message: error.reason
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -24,6 +24,9 @@ Package.onUse(function(api) {
|
||||
api.use('ohif:design');
|
||||
api.use('ohif:core');
|
||||
|
||||
// Main module
|
||||
api.mainModule('main.js', ['client', 'server']);
|
||||
|
||||
// Client imports
|
||||
api.addFiles('client/index.js', 'client');
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user