The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/app/apps/client/gameCenter/tabBar.js

31 lines
793 B

import { Meteor } from 'meteor/meteor';
import { Tracker } from 'meteor/tracker';
import { APIClient } from '../../../utils/client';
import { TabBar } from '../../../ui-utils/client';
import { settings } from '../../../settings/client';
import './gameCenter.html';
Meteor.startup(function() {
Tracker.autorun(async function() {
if (!settings.get('Apps_Game_Center_enabled')) {
return TabBar.removeButton('gameCenter');
}
const { externalComponents } = await APIClient.get('apps/externalComponents');
if (!externalComponents.length) {
return TabBar.removeButton('gameCenter');
}
TabBar.addButton({
groups: ['channel', 'group', 'direct'],
id: 'gameCenter',
i18nTitle: 'Apps_Game_Center',
icon: 'game',
template: 'GameCenter',
order: -1,
});
});
});