Convert rocketchat-push-notifications to main module structure (#12778)

* Exposing popover

* Convert rocketchat-push-notifications to main module structure
pull/12799/head^2
Marcos Spessatto Defendi 7 years ago committed by Rodrigo Nascimento
parent a777718ae0
commit 48ac594b8f
  1. 4
      packages/rocketchat-push-notifications/client/index.js
  2. 1
      packages/rocketchat-push-notifications/client/tabBar.js
  3. 3
      packages/rocketchat-push-notifications/client/views/pushNotificationsFlexTab.js
  4. 17
      packages/rocketchat-push-notifications/package.js
  5. 2
      packages/rocketchat-push-notifications/server/index.js
  6. 1
      packages/rocketchat-push-notifications/server/methods/saveNotificationSettings.js
  7. 2
      packages/rocketchat-push-notifications/server/models/Subscriptions.js
  8. 2
      packages/rocketchat-ui/client/views/app/popover.js
  9. 1
      packages/rocketchat-ui/package.js

@ -0,0 +1,4 @@
import './stylesheets/pushNotifications.css';
import './views/pushNotificationsFlexTab.html';
import './views/pushNotificationsFlexTab';
import './tabBar';

@ -1,4 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { RocketChat } from 'meteor/rocketchat:lib';
Meteor.startup(function() {
RocketChat.TabBar.addButton({

@ -1,8 +1,9 @@
/* globals ChatSubscription popover */
import { Meteor } from 'meteor/meteor';
import { ReactiveVar } from 'meteor/reactive-var';
import { Session } from 'meteor/session';
import { Template } from 'meteor/templating';
import { RocketChat, handleError } from 'meteor/rocketchat:lib';
import { t, ChatSubscription, popover } from 'meteor/rocketchat:ui';
const notificationLabels = {
all: 'All_messages',

@ -9,19 +9,8 @@ Package.onUse(function(api) {
api.use([
'ecmascript',
'rocketchat:lib',
'templating',
]);
api.use('templating', 'client');
api.addFiles([
'client/stylesheets/pushNotifications.css',
'client/views/pushNotificationsFlexTab.html',
'client/views/pushNotificationsFlexTab.js',
'client/tabBar.js',
], 'client');
api.addFiles([
'server/methods/saveNotificationSettings.js',
'server/models/Subscriptions.js',
], 'server');
api.mainModule('client/index.js', 'client');
api.mainModule('server/index.js', 'server');
});

@ -0,0 +1,2 @@
import './models/Subscriptions';
import './methods/saveNotificationSettings';

@ -1,5 +1,6 @@
import { Meteor } from 'meteor/meteor';
import { check } from 'meteor/check';
import { RocketChat } from 'meteor/rocketchat:lib';
Meteor.methods({
saveNotificationSettings(roomId, field, value) {

@ -1,3 +1,5 @@
import { RocketChat } from 'meteor/rocketchat:lib';
RocketChat.models.Subscriptions.updateAudioNotificationsById = function(_id, audioNotifications) {
const query = {
_id,

@ -8,7 +8,7 @@ import _ from 'underscore';
import { hide, leave } from 'meteor/rocketchat:lib';
this.popover = {
popover = { //eslint-disable-line
renderedPopover: null,
open({ currentTarget, ...config }) {
// Popover position must be computed as soon as possible, avoiding DOM changes over currentTarget

@ -148,6 +148,7 @@ Package.onUse(function(api) {
api.export('fileUpload');
api.export('t');
api.export('modal', 'client');
api.export('popover', 'client');
api.export('fireGlobalEvent', 'client');
api.export('ChatRoom', 'client');
api.export('ChatSubscription', 'client');

Loading…
Cancel
Save