$$('#signout')['on']('click', function() {

    console.log('app signout ready')    

    localStorage.clear();

    app.views.main.router.navigate('/signin/');

    window.location.reload();

});



$$('.logout')['on']('click', function() {

    console.log('app logout ready')    

    localStorage.clear();

    app.views.main.router.navigate('/signin/');

    window.location.reload();

});

/*



$(document).on('click', '#signout', async function (e) {

    e.preventDefault();

    console.log('app signout ready')    

    localStorage.clear();

    app.views.main.router.navigate('/signin/');

    /*

    resolve({redirect: '/signin/'});

    resolve({url: '/signin/'});

    resolve({path: '/signin/'});

    /*

    app.views.main.router.navigate('/');

    app.views.current.router.

    

    app.views.current.router.navigate('/signin/',{

      transition: 'fade', // Optional: Add a transition effect

    })

    

    app.router.navigate("/signin/", {

      transition: 'fade', // Optional: Add a transition effect

    });

    

    $('.toolbar-bottom').hide();  

})

/*

$(document).on('click', '.logout_btn', async function (e) {

    e.preventDefault();

    localStorage.removeItem('t01_user')

    localStorage.removeItem('t01_data');

    app.views.main.router.navigate('/intro/');  

})



$(document).on('click', '#signout', async function (e) {

    e.preventDefault();

    localStorage.removeItem('t01_user')

    localStorage.removeItem('t01_data');

    app.views.main.router.navigate('/intro/');  

    //window.location.reload()

})





$$(document).on('page:init', '.page[data-name="account"]', function(e) {

  $(document).off("click", "#signout").on("click", "#signout", function(e) {

  console.log('app signout ready')

    e.preventDefault();

    localStorage.removeItem('t01_user')

    localStorage.removeItem('t01_data');

    app.views.main.router.navigate('/intro/');  

    window.location.reload()

  });

})

*/