mirror of
https://github.com/amark/gun.git
synced 2025-07-04 11:52:34 +00:00
SEA + GUN alpha working!!! With PANIC test too!
This commit is contained in:
parent
e0a9ef45f3
commit
a1ac8df607
@ -68,28 +68,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<script src="/jquery.js"></script>
|
<script src="/jquery.js"></script>
|
||||||
<script src="/gun.js"></script>
|
<script src="/gun.js"></script>
|
||||||
<!--
|
|
||||||
<script src="/gun/lib/cryptomodules.js" type="text/javascript"></script>
|
|
||||||
<script src="/gun/sea.js"></script>
|
|
||||||
-->
|
|
||||||
<script>
|
<script>
|
||||||
var gun = Gun(location.origin+'/gun');
|
var gun = Gun(location.origin+'/gun');
|
||||||
var user = gun.user && gun.user();
|
|
||||||
if(user){
|
|
||||||
// 1st: call create. 2nd call auth. After that, call recall
|
|
||||||
// user.create('dude', 'my secret').then(function(ack) { console.log('created ack:', ack) });
|
|
||||||
// user.recall().then(function(ack){
|
|
||||||
// if (!ack || !ack.sea){
|
|
||||||
// console.log('user.recall not bootstrapping...');
|
|
||||||
// user.auth('dude', 'my secret', {pin: 'PIN'}).then(function(user) { console.log('authenticated user:', user) });
|
|
||||||
// // user.auth('dude', 'my secret', {pin: 'PIN', newpass: 'my new secret'}).then(function(user) { console.log('authenticated user:', user) });
|
|
||||||
// } else {
|
|
||||||
// // gun.get('pub/' + ack.pub).put({ hello: 'world' });
|
|
||||||
// gun.get('pub/' + ack.pub).get('hello').val((val, key) => console.log('READ:', val, key));
|
|
||||||
// console.log('user.recall authenticated user:', ack.alias);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
}
|
|
||||||
var chat = gun.get('converse');
|
var chat = gun.get('converse');
|
||||||
chat.map().val(function(msg, field){
|
chat.map().val(function(msg, field){
|
||||||
var ul = $('ul'), last = sort(field, ul.children('li').last()), li;
|
var ul = $('ul'), last = sort(field, ul.children('li').last()), li;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user