This repository was archived by the owner on Mar 6, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import EmojiDataPlugin from './plugins/EmojiDataPlugin';
1818import TooltipsPlugin from './plugins/TooltipsPlugin' ;
1919import GuestPlugin from './plugins/GuestPlugin' ;
2020import SocketEventsPlugin from './plugins/SocketEventsPlugin' ;
21+ import WaitlistEventsPlugin from './plugins/WaitlistEventsPlugin' ;
2122
2223import * as _package from './package' ;
2324
@@ -87,7 +88,8 @@ const ExtPlug = Plugin.extend({
8788 new UserClassesPlugin ( 'extplug:user-classes' , this ) ,
8889 new EmojiDataPlugin ( 'extplug:emoji-data' , this ) ,
8990 new TooltipsPlugin ( 'extplug:tooltips' , this ) ,
90- new SocketEventsPlugin ( 'extplug:socket-events' , this )
91+ new SocketEventsPlugin ( 'extplug:socket-events' , this ) ,
92+ new WaitlistEventsPlugin ( 'extplug:waitlist-events' , this )
9193 ] ;
9294
9395 this . _guest = new GuestPlugin ( 'extplug:guest' , this ) ;
Original file line number Diff line number Diff line change 1- import * as waitlistHook from './waitlist' ;
21import * as apiEarlyHook from './api-early' ;
32import * as playbackHook from './playback' ;
43import * as settingsHook from './settings' ;
54import * as popoutStyleHook from './popout-style' ;
65
76export default [
8- waitlistHook ,
97 apiEarlyHook ,
108 playbackHook ,
119 settingsHook ,
Original file line number Diff line number Diff line change 1+ import Plugin from '../Plugin' ;
12import booth from 'plug/models/booth' ;
23import waitlist from 'plug/collections/waitlist' ;
34import users from 'plug/collections/users' ;
@@ -22,14 +23,21 @@ function onChange() {
2223 } ) ;
2324}
2425
25- export function install ( ) {
26- booth . on ( 'change:waitingDJs' , onChange ) ;
27- extend ( API , events ) ;
28- } ;
26+ const WaitlistEvents = Plugin . extend ( {
27+ name : 'Waitlist Events' ,
28+ description : 'Adds events for when users join or leave the waitlist.' ,
2929
30- export function uninstall ( ) {
31- booth . off ( 'change:waitingDJs' , onChange ) ;
32- Object . keys ( events ) . forEach ( n => {
33- delete API [ n ] ;
34- } ) ;
35- } ;
30+ enable ( ) {
31+ booth . on ( 'change:waitingDJs' , onChange ) ;
32+ extend ( API , events ) ;
33+ } ,
34+
35+ disable ( ) {
36+ booth . off ( 'change:waitingDJs' , onChange ) ;
37+ Object . keys ( events ) . forEach ( n => {
38+ delete API [ n ] ;
39+ } ) ;
40+ }
41+ } ) ;
42+
43+ export default WaitlistEvents ;
You can’t perform that action at this time.
0 commit comments