Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging

pull/1/head
yflory 8 years ago
commit 555d0a09f8

@ -1,9 +1,11 @@
define([ define([
'/api/config',
'/common/hyperscript.js', '/common/hyperscript.js',
'/common/cryptpad-common.js', '/common/cryptpad-common.js',
], function (h, Cryptpad) { ], function (Config, h, Cryptpad) {
var Pages = {}; var Pages = {};
var Msg = Cryptpad.Messages; var Msg = Cryptpad.Messages;
var urlArgs = Config.requireConf.urlArgs;
var setHTML = function (e, html) { var setHTML = function (e, html) {
e.innerHTML = html; e.innerHTML = html;
@ -21,7 +23,7 @@ define([
h('div.info-container', [ h('div.info-container', [
h('div.left.image', [ h('div.left.image', [
h('img', { h('img', {
src: '/customize/images/zeroknowledge_small.png', src: '/customize/images/zeroknowledge_small.png?' + urlArgs ,
alt: 'Zero Knowledge' alt: 'Zero Knowledge'
}) })
]), ]),
@ -40,7 +42,7 @@ define([
h('div.right.image', [ h('div.right.image', [
h('img', { h('img', {
alt: "User account", alt: "User account",
src: '/customize/images/realtime_small.png', src: '/customize/images/realtime_small.png?' + urlArgs,
}) })
]) ])
]) ])
@ -49,7 +51,7 @@ define([
h('div.info-container', [ h('div.info-container', [
h('div.left.image', [ h('div.left.image', [
h('img', { h('img', {
src: '/customize/images/key_small.png', src: '/customize/images/key_small.png?' + urlArgs,
alt: 'User account' alt: 'User account'
}) })
]), ]),
@ -67,7 +69,7 @@ define([
]), ]),
h('div.right.image', [ h('div.right.image', [
h('img', { h('img', {
src: '/customize/images/organize.png', src: '/customize/images/organize.png?' + urlArgs,
alt: 'User account' alt: 'User account'
}) })
]) ])
@ -204,28 +206,28 @@ define([
h('div.app-row', [ h('div.app-row', [
appButton("Rich Text application", appButton("Rich Text application",
Msg.main_richText, Msg.main_richText,
'/customize/images/pad.png', '/customize/images/pad.png?' + urlArgs,
Msg.main_richText_p, Msg.main_richText_p,
'/pad/', '/pad/',
Msg.button_newpad, Msg.button_newpad,
'create-pad'), 'create-pad'),
appButton('Code application', appButton('Code application',
Msg.main_code, Msg.main_code,
'/customize/images/code.png', '/customize/images/code.png?' + urlArgs,
Msg.main_code_p, Msg.main_code_p,
'/code/', '/code/',
Msg.button_newcode, Msg.button_newcode,
'create-code'), 'create-code'),
appButton('Slide application', appButton('Slide application',
Msg.main_slide, Msg.main_slide,
'/customize/images/slide.png', '/customize/images/slide.png?' + urlArgs,
Msg.main_slide_p, Msg.main_slide_p,
'/slide/', '/slide/',
Msg.button_newslide, Msg.button_newslide,
'create-slide'), 'create-slide'),
appButton('Poll application', appButton('Poll application',
Msg.main_poll, Msg.main_poll,
'/customize/images/poll.png', '/customize/images/poll.png?' + urlArgs,
Msg.main_poll_p, Msg.main_poll_p,
'/poll/', '/poll/',
Msg.button_newpoll, Msg.button_newpoll,
@ -266,7 +268,7 @@ define([
return h('div#loading', return h('div#loading',
h('div.loadingContainer', [ h('div.loadingContainer', [
h('img.cryptofist', { h('img.cryptofist', {
src: '/customize/cryptofist_small.png' src: '/customize/cryptofist_small.png?' + urlArgs
}), }),
h('div.spinnerContainer', h('div.spinnerContainer',
h('span.fa.fa-spinner.fa-pulse.fa-4x.fa-fw')), h('span.fa.fa-spinner.fa-pulse.fa-4x.fa-fw')),

@ -3,10 +3,12 @@ define([
'/common/hyperscript.js', '/common/hyperscript.js',
'/common/cryptpad-common.js', '/common/cryptpad-common.js',
'/customize/pages.js', '/customize/pages.js',
'/api/config',
'css!/bower_components/components-font-awesome/css/font-awesome.min.css', 'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
], function ($, h, Cryptpad, Pages) { ], function ($, h, Cryptpad, Pages, Config) {
$(function () { $(function () {
var urlArgs = Config.requireConf.urlArgs;
var Messages = Cryptpad.Messages; var Messages = Cryptpad.Messages;
var $body = $('body'); var $body = $('body');
var isMainApp = function () { var isMainApp = function () {
@ -24,7 +26,7 @@ $(function () {
h('span', [ h('span', [
h('a.gotoMain', {href: '/'}, [ h('a.gotoMain', {href: '/'}, [
h('img.cryptpad-logo', { h('img.cryptpad-logo', {
src: '/customize/cryptofist_mini.png', src: '/customize/cryptofist_mini.png?' + urlArgs,
alt: '', alt: '',
}), }),
'CryptPad' 'CryptPad'

@ -4,6 +4,8 @@ define([
'/api/config' '/api/config'
], function ($, Config, ApiConfig) { ], function ($, Config, ApiConfig) {
var urlArgs = ApiConfig.requireConf.urlArgs;
var Messages = {}; var Messages = {};
var Bar = { var Bar = {
@ -443,7 +445,7 @@ define([
'class': "cryptpad-link" 'class': "cryptpad-link"
}).appendTo($topContainer); }).appendTo($topContainer);
var $imgTag = $('<img>', { var $imgTag = $('<img>', {
src: "/customize/cryptofist_mini.png", src: "/customize/cryptofist_mini.png?" + urlArgs,
alt: "Cryptpad" alt: "Cryptpad"
}); });

@ -1,4 +1,5 @@
define([ define([
'/api/config',
'jquery', 'jquery',
'/bower_components/chainpad-crypto/crypto.js', '/bower_components/chainpad-crypto/crypto.js',
'/bower_components/chainpad-netflux/chainpad-netflux.js', '/bower_components/chainpad-netflux/chainpad-netflux.js',
@ -9,7 +10,8 @@ define([
'/file/file-crypto.js', '/file/file-crypto.js',
'/bower_components/tweetnacl/nacl-fast.min.js', '/bower_components/tweetnacl/nacl-fast.min.js',
'/bower_components/file-saver/FileSaver.min.js', '/bower_components/file-saver/FileSaver.min.js',
], function ($, Crypto, realtimeInput, Toolbar, Cryptpad, Visible, Notify, FileCrypto) { ], function (Config, $, Crypto, realtimeInput, Toolbar, Cryptpad, Visible, Notify, FileCrypto) {
var urlArgs = Config.requireConf.urlArgs;
var Nacl = window.nacl; var Nacl = window.nacl;
$(function () { $(function () {
@ -71,7 +73,7 @@ define([
}; };
var andThen = function () { var andThen = function () {
var src = '/customize/cryptofist_mini.png'; var src = '/customize/cryptofist_mini.png?' + urlArgs;
Cryptpad.fetch(src, function (e, file) { Cryptpad.fetch(src, function (e, file) {
console.log('original file is %s uint8s', file.length); console.log('original file is %s uint8s', file.length);
upload(file, { upload(file, {

Loading…
Cancel
Save