Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion core/client/ui/levels.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ Template.levels.helpers({
levelVisitCount(level) { return level.visit || 0; },
loading() { return Template.instance().loading.get(); },
showList() { return Template.instance().tab.get() === listMode; },
showCreate() { return Template.instance().tab.get() !== listMode; },
showCreate() {
return (Template.instance().tab.get() !== listMode) && (Meteor?.settings?.public?.features?.createLevel?.enabled !== false);
},
restrictedLevelCreation() {
const { permissions } = Meteor.settings.public;
if (!permissions) return false;
Expand Down
2 changes: 1 addition & 1 deletion core/client/ui/user-panel.hbs.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<button class="button video {{#if currentUser.profile.shareVideo}}active{{/if}}" type="button"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M17,10.5V7A1,1 0 0,0 16,6H4A1,1 0 0,0 3,7V17A1,1 0 0,0 4,18H16A1,1 0 0,0 17,17V13.5L21,17.5V6.5L17,10.5Z" /></svg></button>
<button class="button screen {{#if currentUser.profile.shareScreen}}active{{/if}}" type="button"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M9,6H5V10H7V8H9M19,10H17V12H15V14H19M21,16H3V4H21M21,2H3C1.89,2 1,2.89 1,4V16A2,2 0 0,0 3,18H10V20H8V22H16V20H14V18H21A2,2 0 0,0 23,16V4C23,2.89 22.1,2 21,2" /></svg></button>
<span class="separator">|</span>
<button class="button js-show-messaging-interface" type="button">
<button class="button js-show-messaging-interface {{#if hidden}}displaynone{{/if}}" type="button">
<svg style="width:24px;height:24px" viewBox="0 0 24 24">
<path fill="currentColor" d="M17,11H15V9H17M13,11H11V9H13M9,11H7V9H9M20,2H4A2,2 0 0,0 2,4V22L6,18H20A2,2 0 0,0 22,16V4C22,2.89 21.1,2 20,2Z" /></svg>
</button>
Expand Down
1 change: 1 addition & 0 deletions core/client/ui/user-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Template.userPanel.helpers({
avatarURL() { return talking() && Template.instance().avatarURL.get(); },
screenSharing() { return Meteor.user({ fields: { 'profile.shareScreen': 1 } })?.profile.shareScreen; },
videoActive() { return talking() && Meteor.user({ fields: { 'profile.shareVideo': 1 } })?.profile.shareVideo; },
hidden() { return Meteor?.settings?.public?.features?.useMessaging?.enabled === false; },
});

Template.userPanel.events({
Expand Down
4 changes: 4 additions & 0 deletions core/client/ui/user-panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -214,3 +214,7 @@
}
}
}

.displaynone {
display: none !important;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { guestAllowed } from '../../../lib/misc';
const permissionType = 'useMessaging';

window.addEventListener('load', () => {
if (Meteor?.settings?.public?.features?.useMessaging?.enabled === false) return;
registerModules(['textualCommunicationTools']);
registerUserListModules(['userListMessageButton']);

Expand Down