remove references to removed pages and notes that have been addressed

This commit is contained in:
ansuz 2022-05-13 15:50:38 +05:30
parent 633b8e062f
commit 958b3e4376
8 changed files with 30 additions and 52 deletions

View File

@ -105,7 +105,7 @@ define([
var l = Msg._getLanguage();
['imprint', 'privacy', 'terms', 'roadmap', 'source'].forEach(function (k) {
var value = AppConfig[k];
console.log('links', k, value);
//console.log('links', k, value);
if (value === false) { return; }
if (value === true) {
customURLs[k] = defaultURLs[k];

View File

@ -8,13 +8,12 @@ define([
], function (Config, $, h, UI, Msg, Pages) {
return function () {
document.title = Msg.register_header;
//var urlArgs = Config.requireConf.urlArgs;
var tos = $(UI.createCheckbox('accept-terms')).find('.cp-checkmark-label').append(Msg.register_acceptTerms).parent()[0];
var termsLink = Pages.customURLs.terms;
$(tos).find('a').attr({
href: termsLink, // '/terms.html',
href: termsLink,
target: '_blank',
tabindex: '-1',
});
@ -25,7 +24,6 @@ define([
Pages.infopageTopbar(),
h('div.container.cp-container', [
h('div.row.cp-page-title', h('h1', Msg.register_header)),
//h('div.row.cp-register-det', content),
].concat(content)),
Pages.infopageFooter(),
]),

View File

@ -43,8 +43,11 @@ PROVIDE_AGGREGATE_STATISTICS
REMOVE_DONATE_BUTTON
BLOCK_DAILY_CHECK
// Customized instance info
SET_INSTANCE_JURISDICTION
SET_INSTANCE_DESCRIPTION
SET_INSTANCE_NAME
SET_INSTANCE_NOTICE
NOT IMPLEMENTED:
@ -230,7 +233,7 @@ commands.SET_INSTANCE_NAME = makeTranslation('instanceName');
// CryptPad_AsyncStore.rpc.send('ADMIN', [ 'ADMIN_DECREE', ['SET_INSTANCE_DESCRIPTION', ['A personal instance, hosted for me and nobody else']]], console.log)
// CryptPad_AsyncStore.rpc.send('ADMIN', [ 'ADMIN_DECREE', ['SET_INSTANCE_DESCRIPTION', [{default:'A personal server, not intended for public usage', fr: 'Un serveur personnel, non destiné à un usage public'}]]], console.log)
commands.SET_INSTANCE_DESCRIPTION = makeTranslation('instanceDescription'); // XXX support translation
commands.SET_INSTANCE_DESCRIPTION = makeTranslation('instanceDescription');
// CryptPad_AsyncStore.rpc.send('ADMIN', [ 'ADMIN_DECREE', ['SET_INSTANCE_NOTICE', ['Our hosting costs have increased during the pandemic. Please consider donating!']]], console.log)
// CryptPad_AsyncStore.rpc.send('ADMIN', [ 'ADMIN_DECREE', ['SET_INSTANCE_NOTICE', [{default:'Our hosting costs have increased during the pandemic. Please consider donating!',fr:'Nos coûts d'hébergement ont augmenté pendant la pandémie. Veuillez envisager de faire un don !']]], console.log)

View File

@ -56,7 +56,6 @@ Default.httpHeaders = function (Env) {
};
};
// XXX check links to terms.html
Default.mainPages = function () {
return [
'index',

View File

@ -73,7 +73,7 @@ module.exports.create = function (config) {
fileHost: config.fileHost || undefined,
NO_SANDBOX: NO_SANDBOX,
httpSafePort: httpSafePort,
accounts_api: config.accounts_api || undefined, // XXX
accounts_api: config.accounts_api || undefined, // this simplifies integration with an accounts page
shouldUpdateNode: !isRecentVersion(),
@ -207,7 +207,7 @@ module.exports.create = function (config) {
maxWorkers: config.maxWorkers,
disableIntegratedTasks: config.disableIntegratedTasks || false,
disableIntegratedEviction: typeof(config.disableIntegratedEviction) === 'undefined'? true: config.disableIntegratedEviction, // XXX 4.11.0 false,
disableIntegratedEviction: typeof(config.disableIntegratedEviction) === 'undefined'? true: config.disableIntegratedEviction,
lastEviction: +new Date(),
evictionReport: {},
commandTimers: {},

View File

@ -49,7 +49,7 @@
"unused-translations": "node ./scripts/translations/unused-translations.js",
"test": "node scripts/TestSelenium.js",
"test-rpc": "cd scripts/tests && node test-rpc",
"template": "cd customize.dist/src && for page in ../index.html ../privacy.html ../terms.html ../contact.html ../what-is-cryptpad.html ../features.html ../../www/login/index.html ../../www/register/index.html ../../www/user/index.html;do echo $page; cp template.html $page; done;",
"template": "cd customize.dist/src && for page in ../index.html ../contact.html ../features.html ../../www/login/index.html ../../www/register/index.html ../../www/user/index.html;do echo $page; cp template.html $page; done;",
"evict-inactive": "node scripts/evict-inactive.js"
}
}

View File

@ -39,9 +39,7 @@
}
}
.cp-admin-setlimit-form,
.cp-admin-setjurisdiction-form,
.cp-admin-setnotice-form, // XXX not great
.cp-admin-setdescription-form {
.cp-admin-setter {
+ button {
margin-top: 5px !important;
}
@ -209,11 +207,6 @@
input.cp-admin-inval {
border-color: red !important;
}
input[type="text"], textarea {
&.cp-listing-info[disabled] {
border: 1px solid transparent !important; //1px solid transparent !imprortant;;//none !important;
}
}
.cp-admin-nopassword {
.cp-admin-pw {

View File

@ -390,7 +390,6 @@ define([
},
});
// XXX remove emailButton
create['email'] = function () {
var key = 'email';
var $div = makeBlock(key, true); // Msg.admin_emailHint, Msg.admin_emailTitle
@ -401,7 +400,7 @@ define([
value: ApiConfig.adminEmail || ''
});
var $input = $(input);
var innerDiv = h('div.cp-admin-setlimit-form', input);
var innerDiv = h('div.cp-admin-setter.cp-admin-setlimit-form', input);
var spinner = UI.makeSpinner($(innerDiv));
$button.click(function () {
@ -434,24 +433,24 @@ define([
var val = APP.instanceStatus[attr];
var type = typeof(val);
switch (type) {
case 'string': return val;
case 'object': return val.default;
default: return;
case 'string': return val || '';
case 'object': return val.default || '';
default: return '';
}
};
create['jurisdiction'] = function () { // XXX make translateable
create['jurisdiction'] = function () { // TODO make translateable
var key = 'jurisdiction';
var $div = makeBlock(key, true); // Msg.admin_jurisdictionHint, Msg.admin_jurisdictionTitle, Msg.admin_jurisdictionButton
var $button = $div.find('button').addClass('cp-listing-action').text(Messages.settings_save);
var input = h('input.cp-listing-info', {
var input = h('input', {
type: 'text',
value: getInstanceString('instanceJurisdiction') || '', // XXX
value: getInstanceString('instanceJurisdiction'),
placeholder: Messages.owner_unknownUser || '',
});
var $input = $(input);
var innerDiv = h('div.cp-admin-setjurisdiction-form', input);
var innerDiv = h('div.cp-admin-setter', input);
var spinner = UI.makeSpinner($(innerDiv));
$button.click(function () {
@ -480,19 +479,19 @@ define([
};
create['notice'] = function () { // XXX make translateable
create['notice'] = function () { // TODO make translateable
var key = 'notice';
var $div = makeBlock(key, true);
var $button = $div.find('button').addClass('cp-listing-action').text(Messages.settings_save);
var input = h('input.cp-listing-info', {
var input = h('input', {
type: 'text',
value: getInstanceString('instanceNotice') || '', // XXX
value: getInstanceString('instanceNotice'),
placeholder: '',
});
var $input = $(input);
var innerDiv = h('div.cp-admin-setnotice-form', input);
var innerDiv = h('div.cp-admin-setter', input);
var spinner = UI.makeSpinner($(innerDiv));
$button.click(function () {
@ -529,20 +528,20 @@ define([
));
};
create['name'] = function () { // XXX make translateable
create['name'] = function () { // TODO make translateable
var key = 'name';
var $div = makeBlock(key, true);
// Msg.admin_nameHint, Msg.admin_nameTitle, Msg.admin_nameButton
var $button = $div.find('button').addClass('cp-listing-action').text(Messages.settings_save);
var input = h('input.cp-listing-info', {
var input = h('input', {
type: 'text',
value: getInstanceString('instanceName') || ApiConfig.httpUnsafeOrigin || '',
placeholder: ApiConfig.httpUnsafeOrigin,
style: 'margin-bottom: 5px;',
});
var $input = $(input);
var innerDiv = h('div.cp-admin-setname-form', input);
var innerDiv = h('div.cp-admin-setter', input);
var spinner = UI.makeSpinner($(innerDiv));
$button.click(function () {
@ -570,19 +569,19 @@ define([
return $div;
};
create['description'] = function () { // XXX support translation
create['description'] = function () { // TODO support translation
var key = 'description';
var $div = makeBlock(key, true); // Msg.admin_descriptionHint
var textarea = h('textarea.cp-admin-description-text.cp-listing-info', {
var textarea = h('textarea.cp-admin-description-text', {
placeholder: Messages.home_host || '',
}, getInstanceString('instanceDescription') || '');
}, getInstanceString('instanceDescription'));
var $button = $div.find('button').text(Messages.settings_save);
$button.addClass('cp-listing-action');
var innerDiv = h('div.cp-admin-setdescription-form', [
var innerDiv = h('div.cp-admin-setter', [
textarea,
]);
$button.before(innerDiv);
@ -1470,7 +1469,7 @@ define([
};
create['broadcast'] = function () { // XXX
create['broadcast'] = function () {
var key = 'broadcast';
var $div = makeBlock(key); // Msg.admin_broadcastHint, admin_broadcastTitle
@ -2341,20 +2340,6 @@ define([
if (!Array.isArray(data)) { return void cb('EINVAL'); }
APP.instanceStatus = data[0];
console.log("Status", APP.instanceStatus);
/*
var isListed = Boolean(APP.instanceStatus.listMyInstance);
var $actions = $('.cp-listing-action');
var $fields = $('.cp-listing-info');
if (isListed) {
$actions.removeAttr('disabled');
$fields.removeAttr('disabled');
} else {
$actions.attr('disabled', 'disabled');
$fields.attr('disabled', 'disabled');
}
*/
cb();
});
};