suppress 'convert' from new pad modal

and make it easy to configure what's displayed via a list in appconfig
pull/1/head
ansuz 4 years ago
parent 575269e5a1
commit 7d634ab54b

@ -22,6 +22,12 @@ define(function() {
*/
AppConfig.registeredOnlyTypes = ['file', 'contacts', 'notifications', 'support'];
// XXX to prevent apps that aren't officially supported from showing up
// in the document creation modal
AppConfig.hiddenTypes = ['drive', 'teams', 'contacts', 'todo', 'file', 'accounts', 'calendar', 'poll', 'convert',
//'doc', 'presentation'
];
/* CryptPad is available is multiple languages, but only English and French are maintained
* by the developers. The other languages may be outdated, and any missing string for a langauge
* will use the english version instead. You can customize the langauges you want to be available

@ -2075,15 +2075,9 @@ define([
var $container = $('<div>');
var i = 0;
var types = AppConfig.availablePadTypes.filter(function (p) {
if (p === 'drive') { return; }
if (p === 'teams') { return; }
if (p === 'contacts') { return; }
if (p === 'todo') { return; }
if (p === 'file') { return; }
if (p === 'accounts') { return; }
if (p === 'calendar') { return; }
if (p === 'poll') { return; } // Replaced by forms
if (AppConfig.hiddenTypes.indexOf(p) !== -1) { return; }
if (!common.isLoggedIn() && AppConfig.registeredOnlyTypes &&
AppConfig.registeredOnlyTypes.indexOf(p) !== -1) { return; }
return true;

@ -3082,6 +3082,7 @@ define([
}
// Pads
getNewPadTypes().forEach(function (type) {
if (AppConfig.hiddenTypes.indexOf(type) !== -1) { return; }
var $element = $('<li>', {
'class': 'cp-app-drive-new-doc cp-app-drive-element-row ' +
'cp-app-drive-element-grid'

Loading…
Cancel
Save