add sign-in page
This commit is contained in:
parent
114503a5b6
commit
6195e50b07
|
@ -3,6 +3,7 @@
|
|||
|
||||
import Load from './page/Load/Load.svelte';
|
||||
import Greet from './page/Greet/Greet.svelte';
|
||||
import SignIn from './page/SignIn/SignIn.svelte';
|
||||
|
||||
import Titlebar from './widget/Titlebar/Titlebar.svelte';
|
||||
|
||||
|
@ -38,6 +39,7 @@
|
|||
<Router {url}>
|
||||
<Route path='/' component={Greet} />
|
||||
<Route path='/load' component={Load} />
|
||||
<Route path='/sign-in' component={SignIn} />
|
||||
</Router>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -30,13 +30,13 @@
|
|||
</button>
|
||||
</Link>
|
||||
|
||||
<Link href='/homeserver_list'>
|
||||
<Link href='/homeserver-list'>
|
||||
<button>
|
||||
Create account
|
||||
</button>
|
||||
</Link>
|
||||
<br/>
|
||||
<Link href='/homeserver_list'>
|
||||
<Link href='/homeserver-list'>
|
||||
<button>
|
||||
Explore servers
|
||||
</button>
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
<script lang="ts">
|
||||
import style from './style.module.scss';
|
||||
|
||||
import AccountStore from '../../store/AccountStore';
|
||||
|
||||
let homeserver = AccountStore.getState().homeserver;
|
||||
</script>
|
||||
|
||||
<div class={style.root}>
|
||||
<h1>Log In</h1>
|
||||
<p align='center'>
|
||||
To continue, you must choose a homeserver<br/>
|
||||
<input type='text' value={homeserver}>
|
||||
</p>
|
||||
</div>
|
|
@ -0,0 +1,7 @@
|
|||
.root {
|
||||
h1 {
|
||||
font-weight: 400;
|
||||
font-size: 20pt;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
import { configureStore } from '@reduxjs/toolkit';
|
||||
|
||||
export interface RouteState {
|
||||
homeserver: string
|
||||
}
|
||||
|
||||
export default configureStore({
|
||||
reducer: {
|
||||
homeserver: (state = 'matrix.org', action) => {
|
||||
const actions = [ 'setHomeserver' ];
|
||||
if (actions.indexOf(action.type) === -1) return state;
|
||||
return action.homeserver ?? state;
|
||||
}
|
||||
},
|
||||
})
|
Loading…
Reference in New Issue