diff --git a/customize.dist/src/fragments/appscript.html b/customize.dist/src/fragments/appscript.html new file mode 100644 index 000000000..66cc0acea --- /dev/null +++ b/customize.dist/src/fragments/appscript.html @@ -0,0 +1,3 @@ + + + diff --git a/customize.dist/src/fragments/empty.html b/customize.dist/src/fragments/empty.html new file mode 100644 index 000000000..05fd6a0cb --- /dev/null +++ b/customize.dist/src/fragments/empty.html @@ -0,0 +1,2 @@ + +
diff --git a/customize.dist/src/fragments/script.html b/customize.dist/src/fragments/script.html new file mode 100644 index 000000000..99ea023b5 --- /dev/null +++ b/customize.dist/src/fragments/script.html @@ -0,0 +1,2 @@ + + diff --git a/www/settings/index.html b/www/settings/index.html new file mode 100644 index 000000000..5ff8e6529 --- /dev/null +++ b/www/settings/index.html @@ -0,0 +1,117 @@ + + + + Cryptpad: Zero Knowledge, Collaborative Real Time Editing + + + + + + + + + + + + + + + + +
+ + + CryptPad + + + + + + + + About + + + Privacy + + + ToS + + + Contact + +
+ + +
+
+
+ +
+
+ + + + + + + + + + diff --git a/www/settings/main.css b/www/settings/main.css new file mode 100644 index 000000000..c10ea0d6b --- /dev/null +++ b/www/settings/main.css @@ -0,0 +1,23 @@ +.cp #mainBlock { + z-index: 1; + width: 1000px; + max-width: 90%; + margin: auto; +} +.cp #mainBlock #container .infoBlock { + padding: 15px; + border: 1px solid #555; + background: #cccccc; +} +.cp #mainBlock #container .infoBlock .label { + font-weight: bold; + text-decoration: underline; + margin-right: 5px; +} +.cp #mainBlock #container .displayName input, +.cp #mainBlock #container .displayName button { + vertical-align: middle; +} +.cp #mainBlock #container > div { + margin: 10px 0; +} diff --git a/www/settings/main.js b/www/settings/main.js new file mode 100644 index 000000000..cdea74874 --- /dev/null +++ b/www/settings/main.js @@ -0,0 +1,156 @@ +define([ + '/common/cryptpad-common.js', + '/bower_components/jquery/dist/jquery.min.js', +], function (Cryptpad) { + var $ = window.jQuery; + + var USERNAME_KEY = 'cryptpad.username'; + + var APP = { + Cryptpad: Cryptpad, + _onRefresh: [] + }; + + var redirectToMain = function () { + window.location.href = '/'; + }; + + // Manage changes in the realtime object made from another page + var onRefresh = function (h) { + if (typeof(h) !== "function") { return; } + if (APP._onRefresh.indexOf(h) !== -1) { return; } + APP._onRefresh.push(h); + }; + var refresh = APP.refresh = function () { + console.log('chnge'); + APP._onRefresh.forEach(function (h) { + h(); + }); + }; + + // Title block + var createTitle = function () { + return $('

').text('Settings'); //XXX + }; + + var createInfoBlock = function (store) { + var obj = store.proxy; + var $div = $('
', {'class': 'infoBlock'}); + + var accountName = obj.login_name; + if (!accountName) { return; } + var $label = $('', {'class': 'label'}).text('Account name:'); // XXX + var $name = $('').text(accountName); + $div.append($label).append($name); + + return $div; + }; + + // Create the block containing the display name field + var createDisplayNameInput = function (store) { + var obj = store.proxy; + var $div = $('
', {'class': 'displayName'}); + var $label = $('