apps/meteor/app/lib/README.md
This package contains the main libraries of Rocket.Chat.
This is an example to create settings:
settingsRegistry.addGroup('Settings_Group', function() {
this.add('SettingInGroup', 'default_value', { type: 'boolean', public: true });
this.section('Group_Section', function() {
this.add('Setting_Inside_Section', 'default_value', {
type: 'boolean',
public: true,
enableQuery: {
_id: 'SettingInGroup',
value: true
}
});
});
});
settingsRegistry.add type:
string - Stores a string value
multiline: booleanint - Stores an integer valueboolean - Stores a boolean valueselect - Creates an <select> element
values: Array of: { key: 'value', i18nLabel: 'Option_Label' }color - Creates a color pick elementaction - Executes a Method.call to value
actionText: Translatable value of the buttonasset - Creates an upload fieldsettingsRegistry.add options:
description - Description of the settingpublic - Boolean to set if the setting should be sent to client or notenableQuery - Only enable this setting if the correspondent setting has the value specifiedalert - Shows an alert message with the given textn/a
n/a
n/a