Browse Source

W2.2: add accounts-ui / accounts-password.

Frederic G. MARAND 9 years ago
parent
commit
5d6218cee9
8 changed files with 47 additions and 7 deletions
  1. 4 1
      .eslintrc.js
  2. 2 0
      .meteor/packages
  3. 13 0
      .meteor/versions
  4. 5 0
      textcircle.css
  5. 7 0
      textcircle.css.map
  6. 6 2
      textcircle.html
  7. 3 2
      textcircle.js
  8. 7 2
      textcircle.scss

+ 4 - 1
.eslintrc.js

@@ -20,7 +20,10 @@ module.exports = {
     "Session": true,
     "Template": true,
     "Tinytest": true,
-    "check": true
+    "check": true,
+
+    // Project-specific.
+    "Documents": true
   },
 
   "plugins": ["react"],

+ 2 - 0
.meteor/packages

@@ -23,3 +23,5 @@ ejson
 spacebars
 check
 ecmascript
+accounts-password
+accounts-ui

+ 13 - 0
.meteor/versions

@@ -1,3 +1,7 @@
+accounts-base@1.2.2
+accounts-password@1.1.4
+accounts-ui@1.1.6
+accounts-ui-unstyled@1.1.8
 autopublish@1.0.4
 autoupdate@1.2.4
 babel-compiler@5.8.24_1
@@ -16,12 +20,14 @@ coffeescript@1.0.11
 ddp@1.2.2
 ddp-client@1.2.1
 ddp-common@1.2.2
+ddp-rate-limiter@1.0.0
 ddp-server@1.2.2
 deps@1.0.9
 diff-sequence@1.0.1
 ecmascript@0.1.6
 ecmascript-runtime@0.2.6
 ejson@1.0.7
+email@1.0.8
 fastclick@1.0.7
 geojson-utils@1.0.4
 handlebars@1.0.4
@@ -33,7 +39,9 @@ id-map@1.0.4
 insecure@1.0.4
 jquery@1.11.4
 launch-screen@1.0.4
+less@2.5.1
 livedata@1.0.15
+localstorage@1.0.5
 logging@1.0.8
 meteor@1.1.10
 meteor-base@1.0.1
@@ -46,19 +54,24 @@ mobile-status-bar@1.0.6
 mongo@1.1.3
 mongo-id@1.0.1
 mongo-livedata@1.0.9
+npm-bcrypt@0.7.8_2
 npm-mongo@1.4.39_1
 observe-sequence@1.0.7
 ordered-dict@1.0.4
 promise@0.5.1
 random@1.0.5
+rate-limit@1.0.0
 reactive-dict@1.1.3
 reactive-var@1.0.6
 reload@1.1.4
 retry@1.0.4
 routepolicy@1.0.6
+service-configuration@1.0.5
 session@1.1.1
+sha@1.0.4
 spacebars@1.0.7
 spacebars-compiler@1.0.7
+srp@1.0.4
 standard-minifiers@1.0.2
 templating@1.1.5
 templating-tools@1.0.0

+ 5 - 0
textcircle.css

@@ -6,4 +6,9 @@ body {
 .top-margin {
   margin-top: 50px; }
 
+#viewer_iframe {
+  border: 1px solid gray;
+  resize: both;
+  width: 100%; }
+
 /*# sourceMappingURL=textcircle.css.map */

+ 7 - 0
textcircle.css.map

@@ -0,0 +1,7 @@
+{
+"version": 3,
+"mappings": "AAAA,8BAA8B;AAE9B,WAAY;EACX,UAAU,EAAE,IAAI;;AAGjB,cAAe;EACd,MAAM,EAAE,cAAc;EACtB,MAAM,EAAE,IAAI;EACZ,KAAK,EAAE,IAAI",
+"sources": ["textcircle.scss"],
+"names": [],
+"file": "textcircle.css"
+}

+ 6 - 2
textcircle.html

@@ -6,6 +6,9 @@
   <nav class="navbar navbar-default navbar-fixed-top">
     <div class="container">
       <a class="navbar-brand" href="#">TextCircle</a><!-- nav title -->
+      <p class="navbar-text navbar-right">
+        {{> loginButtons align="right" }}
+      </p>
     </div><!-- /nav container -->
   </nav><!-- /nav -->
 
@@ -22,10 +25,11 @@
 </body>
 
 <template name="editor">
-<h2>doc id: {{ docid }}</h2>
+  <h2>doc id: {{ docid }}</h2>
   {{> sharejsCM docid=docid onRender=config id="editor" }}
 </template>
 
 <template name="viewer">
-  <iframe id="viewer_iframe"></iframe>
+  <iframe id="viewer_iframe">
+  </iframe>
 </template>

+ 3 - 2
textcircle.js

@@ -3,8 +3,9 @@ this.Documents = new Mongo.Collection("documents");
 
 if (Meteor.isClient) {
   Template.editor.helpers({
+    // Return the id of the first document you can find.
     docid: function () {
-      let doc = Documents.findOne();
+      const doc = Documents.findOne();
       return doc ? doc._id : undefined;
     },
     config: function () {
@@ -21,7 +22,7 @@ if (Meteor.isClient) {
 
 if (Meteor.isServer) {
   Meteor.startup(function () {
-    // startup code that creates a document in case there isn't one yet.
+    // Insert a document if there isn't one already.
     if (!Documents.findOne()) {
       Documents.insert({ title: "my new document" });
     }

+ 7 - 2
textcircle.scss

@@ -1,11 +1,16 @@
 /* Workaround BS3 fixed navbar height
 body {
-	padding-top: 70px;
+  padding-top: 70px;
 }
 */
 
 $topMargin: 50px;
 
 .top-margin{
-	margin-top: $topMargin;
+  margin-top: $topMargin;
+
+#viewer_iframe {
+  border: 1px solid gray;
+  resize: both;
+  width: 100%;
 }