mirror of
https://github.com/fazo96/homework.git
synced 2025-01-26 14:44:20 +01:00
added disclaimer: beta
This commit is contained in:
parent
2108fc369d
commit
f39a2752df
@ -1,6 +1,8 @@
|
|||||||
# Homework - Client Side
|
# Homework - Client Side
|
||||||
notes = new Meteor.Collection "notes"
|
notes = new Meteor.Collection "notes"
|
||||||
Deps.autorun -> Meteor.subscribe "my-notes" unless not Meteor.userId()
|
Deps.autorun -> Meteor.subscribe "my-notes" unless not Meteor.userId()
|
||||||
|
# Loading (Spinning Cog)
|
||||||
|
UI.registerHelper "loggingIn", -> Meteor.loggingIn()
|
||||||
|
|
||||||
# User Interface
|
# User Interface
|
||||||
Template.userInfo.events {
|
Template.userInfo.events {
|
||||||
@ -67,7 +69,7 @@ pressLogin = (template) ->
|
|||||||
mail = template.find('#mail').value; pass = template.find('#pass').value
|
mail = template.find('#mail').value; pass = template.find('#pass').value
|
||||||
Meteor.loginWithPassword mail, pass, (err) ->
|
Meteor.loginWithPassword mail, pass, (err) ->
|
||||||
errCallback err
|
errCallback err
|
||||||
Template.auth.working = -> Meteor.loggingIn()
|
|
||||||
Template.auth.events {
|
Template.auth.events {
|
||||||
'keypress .login': (e,template) ->
|
'keypress .login': (e,template) ->
|
||||||
if e.keyCode is 13 then pressLogin template
|
if e.keyCode is 13 then pressLogin template
|
||||||
|
@ -40,10 +40,8 @@
|
|||||||
<div align="center">
|
<div align="center">
|
||||||
<p>Register a new Account or login</p>
|
<p>Register a new Account or login</p>
|
||||||
{{> notifications }}
|
{{> notifications }}
|
||||||
{{#if working}}
|
{{#if loggingIn}}
|
||||||
<div align="center" class="spinning-cog">
|
{{> loading}}
|
||||||
<i class="fa fa-cog fa-spin fa-3x"></i>
|
|
||||||
</div>
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<input type="text" id="mail" class="form-control login" placeholder="Email">
|
<input type="text" id="mail" class="form-control login" placeholder="Email">
|
||||||
<input type="password" id="pass" class="form-control login" placeholder="Password">
|
<input type="password" id="pass" class="form-control login" placeholder="Password">
|
||||||
@ -58,6 +56,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template name="userInfo"><hr>
|
<template name="userInfo"><hr>
|
||||||
|
{{#if loggingIn}} {{> loading}} {{/if}}
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<p>{{in}}</p>
|
<p>{{in}}</p>
|
||||||
<button type="button" id="logout" class="btn btn-danger">Logout</button>
|
<button type="button" id="logout" class="btn btn-danger">Logout</button>
|
||||||
@ -95,7 +94,7 @@
|
|||||||
<template name="footer">
|
<template name="footer">
|
||||||
<hr>
|
<hr>
|
||||||
<p>This app is <a href="https://en.wikipedia.org/wiki/Free_software">Free Software</a>, under the <a href="http://opensource.org/licenses/MIT">MIT License</a></p>
|
<p>This app is <a href="https://en.wikipedia.org/wiki/Free_software">Free Software</a>, under the <a href="http://opensource.org/licenses/MIT">MIT License</a></p>
|
||||||
<p>Built by Enrico Fasoli</p>
|
<p>Built by Enrico Fasoli as a prototype.<br><u>Not ready for daily usage yet!</u></p>
|
||||||
<a class="custom-link" href="http://www.linkedin.com/profile/view?id=292450419"><i class="fa fa-linkedin fa-2x"></i></a>
|
<a class="custom-link" href="http://www.linkedin.com/profile/view?id=292450419"><i class="fa fa-linkedin fa-2x"></i></a>
|
||||||
<a href="http://twitter.com/fazo96"><i class="fa fa-twitter fa-2x footer-center-icon"></i></a>
|
<a href="http://twitter.com/fazo96"><i class="fa fa-twitter fa-2x footer-center-icon"></i></a>
|
||||||
<a class="custom-link" href="http://github.com/fazo96"><i class="fa fa-github fa-2x"></i></a>
|
<a class="custom-link" href="http://github.com/fazo96"><i class="fa fa-github fa-2x"></i></a>
|
||||||
@ -108,3 +107,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template name="loading">
|
||||||
|
<div align="center" class="spinning-cog">
|
||||||
|
<i class="fa fa-cog fa-spin fa-3x"></i>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
Loading…
Reference in New Issue
Block a user