mirror of
https://github.com/amark/gun.git
synced 2026-03-07 09:31:47 +00:00
MetaMask start, AXE start, SEA refactor, etc.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
<input id="pass" type="password" placeholder="passphrase">
|
||||
<input id="in" type="submit" value="sign in">
|
||||
<input id="up" type="button" value="sign up">
|
||||
<input id="mask" type="button" value="MetaMask Login">
|
||||
</form>
|
||||
|
||||
<ul></ul>
|
||||
@@ -23,13 +24,14 @@ var gun = Gun(); //Gun(['http://localhost:8765/gun', 'https://guntest.herokuapp.
|
||||
var user = gun.user().recall({sessionStorage: true});
|
||||
|
||||
$('#up').on('click', function(e){
|
||||
user.create($('#alias').val(), $('#pass').val());
|
||||
user.create($('#alias').val(), $('#pass').val(), login);
|
||||
});
|
||||
|
||||
$('#sign').on('submit', function(e){
|
||||
e.preventDefault();
|
||||
function login(e){
|
||||
user.auth($('#alias').val(), $('#pass').val());
|
||||
});
|
||||
return false; // e.preventDefault();
|
||||
};
|
||||
$('#sign').on('submit', login);
|
||||
$('#mask').on('click', login);
|
||||
|
||||
gun.on('auth', function(){
|
||||
$('#sign').hide();
|
||||
@@ -38,7 +40,7 @@ gun.on('auth', function(){
|
||||
|
||||
$('#said').on('submit', function(e){
|
||||
e.preventDefault();
|
||||
if(!user.is){ return }
|
||||
//if(!user.is){ return }
|
||||
user.get('said').set($('#say').val());
|
||||
$('#say').val("");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user