mirror of
https://github.com/irislib/iris-messenger.git
synced 2024-10-19 06:33:32 +00:00
autologin fix
This commit is contained in:
parent
809f1d9633
commit
b71f38ce17
@ -1,8 +1,7 @@
|
|||||||
import { Helmet } from 'react-helmet';
|
import { Helmet } from 'react-helmet';
|
||||||
import { createHashHistory } from 'history';
|
|
||||||
import iris from 'iris-lib';
|
import iris from 'iris-lib';
|
||||||
import AsyncRoute from 'preact-async-route';
|
import AsyncRoute from 'preact-async-route';
|
||||||
import { CustomHistory, Router, RouterOnChangeArgs } from 'preact-router';
|
import { Router, RouterOnChangeArgs } from 'preact-router';
|
||||||
|
|
||||||
import '@fontsource/lato';
|
import '@fontsource/lato';
|
||||||
|
|
||||||
@ -47,7 +46,7 @@ type ReactState = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// need to add initChannels: true to here and login() to get channels to load. disabled to test performance
|
// need to add initChannels: true to here and login() to get channels to load. disabled to test performance
|
||||||
iris.session.init({ autologin: window.location.hash.length > 2, autofollow: false });
|
iris.session.init({ autologin: window.location.href.length > 1, autofollow: false });
|
||||||
Nostr.init();
|
Nostr.init();
|
||||||
|
|
||||||
class Main extends Component<Props, ReactState> {
|
class Main extends Component<Props, ReactState> {
|
||||||
|
@ -78,10 +78,7 @@ class Footer extends Component<Props, State> {
|
|||||||
<a href="/global" class={`btn ${activeRoute === '/global' ? 'active' : ''}`}>
|
<a href="/global" class={`btn ${activeRoute === '/global' ? 'active' : ''}`}>
|
||||||
{Icons.global}
|
{Icons.global}
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a href={`/${key}`} class={`${activeRoute === `/${key}` ? 'active' : ''} my-profile`}>
|
||||||
href={`/${key}`}
|
|
||||||
class={`${activeRoute === `/${key}` ? 'active' : ''} my-profile`}
|
|
||||||
>
|
|
||||||
<Identicon str={key} width={34} />
|
<Identicon str={key} width={34} />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -216,7 +216,7 @@ class Login extends Component {
|
|||||||
<div id="existing-account-login">
|
<div id="existing-account-login">
|
||||||
<p>
|
<p>
|
||||||
<a href="#" id="show-create-account" onClick={(e) => this.showCreateAccount(e)}>
|
<a href="#" id="show-create-account" onClick={(e) => this.showCreateAccount(e)}>
|
||||||
{t('back')}
|
{t('back')}
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
{this.renderExistingAccountLogin()}
|
{this.renderExistingAccountLogin()}
|
||||||
|
Loading…
Reference in New Issue
Block a user