From c274a27dfbf5d1f728484fd7a67bccc9ed66277a Mon Sep 17 00:00:00 2001 From: Caleb James DeLisle Date: Fri, 4 Aug 2017 11:33:28 +0200 Subject: [PATCH] Fix a merge conflict which I accidentally let through and then fix a few unused variables in template.js --- customize.dist/pages.js | 66 +++++---------- customize.dist/template.js | 98 +--------------------- customize.dist/translations/messages.es.js | 14 +--- 3 files changed, 28 insertions(+), 150 deletions(-) diff --git a/customize.dist/pages.js b/customize.dist/pages.js index e5977ff8a..e8a64d1ce 100644 --- a/customize.dist/pages.js +++ b/customize.dist/pages.js @@ -76,6 +76,29 @@ define([ ]); }; + var infopageTopbar = function () { + return h('div.cp-topbar', + h('div', + h('a.navbar-brand', { href: 'index.html'}, [ + h( 'img', { src: '/customize/CryptPad-white-logo.svg' }) + ]) + ), + h('div.navbar.navbar-toggleable-md.navbar-light.navbar-inverse', + h('button.navbar-toggler.navbar-toggler-right', {'type':'button'}, {'data-toggle':'collapse'}, {'data-target':'#menuCollapse'}, {'aria-controls': 'menuCollapse'}, {'aria-expanded':'false'}, {'aria-label':'Toggle navigation'}, + [h('i.fa.fa-bars ') + ]), + h('div.collapse.navbar-collapse.justify-content-end.flex-column#menuCollapse', [ + h('a.nav-item.nav-link', { href: '/what-is-cryptpad.html'}, Msg.topbar_whatIsCryptpad), + h('a.nav-item.nav-link', { href: 'https://blog.cryptpad.fr/'}, Msg.blog), + h('a.nav-item.nav-link', { href: '/contact.html'}, Msg.contact), + h('a.nav-item.nav-link', { href: '/about.html'}, Msg.about), + h('a.cp-login-btn', { href: '/login'}, Msg.login_login), + h('a.cp-register-btn', { href: '/register'}, Msg.login_register) + ]) + ) + ); + }; + Pages['/about.html'] = function () { return h('div#cp-main.cp-page-about', [ infopageTopbar(), @@ -214,49 +237,6 @@ define([ ]); }; - var appButton = function (alt, h2, img, p, url, btn, id) { - return h('div.app', [ - h('center', [ - h('h2', h2), - h('img', { - alt: 'Rich Text application', - src: img, - }) - ]), - setHTML(h('p'), p), - h('p.buttons', [ - h('a#' + id, { - href: url, - }, [ - h('button.btn.btn-secondary', btn), - ]) - ]) - ]); - }; - - var infopageTopbar = function () { - return h('div.cp-topbar', - h('div', - h('a.navbar-brand', { href: 'index.html'}, [ - h( 'img', { src: '/customize/CryptPad-white-logo.svg' }) - ]) - ), - h('div.navbar.navbar-toggleable-md.navbar-light.navbar-inverse', - h('button.navbar-toggler.navbar-toggler-right', {'type':'button'}, {'data-toggle':'collapse'}, {'data-target':'#menuCollapse'}, {'aria-controls': 'menuCollapse'}, {'aria-expanded':'false'}, {'aria-label':'Toggle navigation'}, - [h('i.fa.fa-bars ') - ]), - h('div.collapse.navbar-collapse.justify-content-end.flex-column#menuCollapse', [ - h('a.nav-item.nav-link', { href: '/what-is-cryptpad.html'}, Msg.topbar_whatIsCryptpad), - h('a.nav-item.nav-link', { href: 'https://blog.cryptpad.fr/'}, Msg.blog), - h('a.nav-item.nav-link', { href: '/contact.html'}, Msg.contact), - h('a.nav-item.nav-link', { href: '/about.html'}, Msg.about), - h('a.cp-login-btn', { href: '/login'}, Msg.login_login), - h('a.cp-register-btn', { href: '/register'}, Msg.login_register) - ]) - ) - ); - }; - Pages['/'] = Pages['/index.html'] = function () { var showingMore = false; return [ diff --git a/customize.dist/template.js b/customize.dist/template.js index 340ec11d1..e8d7db2fe 100644 --- a/customize.dist/template.js +++ b/customize.dist/template.js @@ -3,50 +3,15 @@ define([ '/common/hyperscript.js', '/common/cryptpad-common.js', '/customize/pages.js', - '/api/config', 'css!/bower_components/components-font-awesome/css/font-awesome.min.css', -], function ($, h, Cryptpad, Pages, Config) { +], function ($, h, Cryptpad, Pages) { $(function () { - var urlArgs = Config.requireConf.urlArgs; - var Messages = Cryptpad.Messages; var $body = $('body'); var isMainApp = function () { return /^\/(pad|code|slide|poll|whiteboard|file|media|contacts|drive|settings|profile|todo)\/$/.test(location.pathname); }; - var rightLink = function (ref, loc, txt) { - return h('span.link.right', [ - h('a', { href: ref, 'data-localization': loc}, txt) - ]); - }; - - var $topbar = $(h('div#cryptpadTopBar', [ - h('span', [ - h('a.gotoMain', {href: '/'}, [ - h('img.cryptpad-logo', { - src: '/customize/cryptofist_mini.png?' + urlArgs, - alt: '', - }), - 'CryptPad' - ]) - ]), - h('span#user-menu.right.dropdown-bar'), - h('span#language-selector.right.dropdown-bar'), - - rightLink('/about.html', 'about', 'About'), - rightLink('/privacy.html', 'privacy', 'Privacy'), - rightLink('/terms.html', 'terms', 'ToS'), - rightLink('/contact.html', 'contact', 'Contact'), - rightLink('https://blog.cryptpad.fr/', 'blog', 'Blog'), - h('span.link.right', [ - h('button#upgrade.upgrade.btn.buttonSuccess', { - style: { display: 'none' } - }) - ]) - ] - )); - var infoPage = function () { return h('div#mainBlock.hidden', typeof(Pages[location.pathname]) === 'function'? Pages[location.pathname](): [h('div#container')]); @@ -54,67 +19,6 @@ $(function () { var $main = $(infoPage()); - var footerCol = function (title, L, literal) { - return h('div.col', [ - h('ul.list-unstyled', [ - h('li.title', { - 'data-localization': title, - }, title? Messages[title]: literal ) - ].concat(L.map(function (l) { - return h('li', [ l ]); - })) - ) - ]); - }; - - var footLink = function (ref, loc, text) { - var attrs = { - href: ref, - }; - if (!/^\//.test(ref)) { - attrs.target = '_blank'; - attrs.rel = 'noopener noreferrer'; - } - if (loc) { - attrs['data-localization'] = loc; - text = Messages[loc]; - } - return h('a', attrs, text); - }; - - var $footer = $(h('footer', [ - h('div.container', [ - h('div.row', [ - footerCol(null, [ - footLink('/about.html', 'about'), - footLink('/terms.html', 'terms'), - footLink('/privacy.html', 'privacy'), - ], 'CryptPad'), - footerCol('footer_applications', [ - footLink('/drive/', 'main_drive'), - footLink('/pad/', 'main_richText'), - footLink('/code/', 'main_code'), - footLink('/slide/', 'main_slide'), - footLink('/poll/', 'main_poll'), - footLink('/whiteboard/', null, Messages.type.whiteboard) - ]), - footerCol('footer_aboutUs', [ - footLink('https://blog.cryptpad.fr', 'blog'), - footLink('https://labs.xwiki.com', null, 'XWiki Labs'), - footLink('http://www.xwiki.com', null, 'XWiki SAS'), - footLink('https://www.open-paas.org', null, 'OpenPaaS') - ]), - footerCol('footer_contact', [ - footLink('https://riot.im/app/#/room/#cryptpad:matrix.org', null, 'Chat'), - footLink('https://twitter.com/cryptpad', null, 'Twitter'), - footLink('https://github.com/xwiki-labs/cryptpad', null, 'GitHub'), - footLink('/contact.html', null, 'Email') - ]) - ]) - ]), - h('div.version-footer', "CryptPad v1.12.0 (Minotaur)") - ])); - var pathname = location.pathname; if (isMainApp()) { diff --git a/customize.dist/translations/messages.es.js b/customize.dist/translations/messages.es.js index 10b722f4a..900a4dd46 100644 --- a/customize.dist/translations/messages.es.js +++ b/customize.dist/translations/messages.es.js @@ -104,11 +104,7 @@ define(function () { out.main_p2 = 'Este proyecto utiliza el editor de texto visual CKEditor, CodeMirror, y el motor en tiempo real ChainPad.'; out.main_howitworks = '¿Cómo funciona?'; out.main_howitworks_p1 = "CryptPad utiliza una variante del algoritmo de transformación operacional (página en inglés) que es capaz de encontrar un consenso distribuido usando un Blockchain Nakamoto (página en inglés), popularizado por Bitcoin. De esta manera el algoritmo puede evitar la necesidad de un servidor central para resolver conflictos de edición de la transformación operacional y sin necesidad de resolver conflictos, el servidor puede mantenerse inconsciente del contenido que se está editando en el pad."; -<<<<<<< HEAD out.main_about_p2 = 'Si tienes preguntas o comentarios, puedes enviarnos un tweet, abrir un issue en GitHub. saludarnos en nuestro canal Matrix o en IRC (#cryptpad on irc.freenode.net), o envianos un email.'; -======= - out.main_about_p2 = 'Si tienes preguntas o comentarios, puedes enviarnos un tweet, abrir un issue en GitHub, saludarnos en nuestro canal IRC (irc.freenode.net), o envíanos un email.'; ->>>>>>> fb13e656b7b3ee611bf195a1f1ccf7475f2f1ee4 out.button_newpad = 'Crear nuevo pad de texto enriquecido'; out.button_newcode = 'Crear nuevo pad de código'; @@ -546,11 +542,6 @@ define(function () { out.settings_logoutEverywhereButton = "Cerrar sesión"; out.upload_title = "Subir archivo"; -<<<<<<< HEAD - // 1.13.0 - Naiad - out.topbar_whatIsCryptpad = "Qué es CryptPad"; - -======= // 1.12.0 - Minotaur out.userlist_pending = "Pendiente..."; out.contacts_typeHere = "Escribe un mensaje aquí..."; @@ -563,6 +554,9 @@ define(function () { out.todo_markAsCompleteTitle = "Marcar esta tarea como completa"; out.todo_markAsIncompleteTitle = "Marcar esta tarea como incompleta"; out.todo_removeTaskTitle = "Borrar esta tarea de la lista"; ->>>>>>> fb13e656b7b3ee611bf195a1f1ccf7475f2f1ee4 + + // 1.13.0 - Naiad + out.topbar_whatIsCryptpad = "Qué es CryptPad"; + return out; });