mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 21:06:42 +07:00
added saga for boris load stats
This commit is contained in:
parent
f8b2b3707b
commit
29c3b8a26f
8 changed files with 83 additions and 7 deletions
|
@ -14,15 +14,18 @@ import { NodeCommentForm } from '~/components/node/NodeCommentForm';
|
|||
import * as NODE_ACTIONS from '~/redux/node/actions';
|
||||
import * as AUTH_ACTIONS from '~/redux/auth/actions';
|
||||
import * as MODAL_ACTIONS from '~/redux/modal/actions';
|
||||
import * as BORIS_ACTIONS from '~/redux/boris/actions';
|
||||
import isBefore from 'date-fns/isBefore';
|
||||
import { Card } from '~/components/containers/Card';
|
||||
import { Footer } from '~/components/main/Footer';
|
||||
import { Filler } from '~/components/containers/Filler';
|
||||
import { Sticky } from '~/components/containers/Sticky';
|
||||
import { Placeholder } from '~/components/placeholders/Placeholder';
|
||||
import { selectBorisStats } from '~/redux/boris/selectors';
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
node: selectNode(state),
|
||||
user: selectUser(state),
|
||||
stats: selectBorisStats(state),
|
||||
});
|
||||
|
||||
const mapDispatchToProps = {
|
||||
|
@ -32,6 +35,7 @@ const mapDispatchToProps = {
|
|||
nodeLoadMoreComments: NODE_ACTIONS.nodeLoadMoreComments,
|
||||
authSetUser: AUTH_ACTIONS.authSetUser,
|
||||
modalShowPhotoswipe: MODAL_ACTIONS.modalShowPhotoswipe,
|
||||
borisLoadStats: BORIS_ACTIONS.borisLoadStats,
|
||||
};
|
||||
|
||||
type IProps = ReturnType<typeof mapStateToProps> &
|
||||
|
@ -50,6 +54,8 @@ const BorisLayoutUnconnected: FC<IProps> = ({
|
|||
nodeLoadMoreComments,
|
||||
modalShowPhotoswipe,
|
||||
authSetUser,
|
||||
borisLoadStats,
|
||||
stats,
|
||||
}) => {
|
||||
const title = getRandomPhrase('BORIS_TITLE');
|
||||
|
||||
|
@ -67,6 +73,10 @@ const BorisLayoutUnconnected: FC<IProps> = ({
|
|||
nodeLoadNode(id, 'DESC');
|
||||
}, [nodeLoadNode, id]);
|
||||
|
||||
useEffect(() => {
|
||||
borisLoadStats();
|
||||
}, [borisLoadStats]);
|
||||
|
||||
return (
|
||||
<div className={styles.wrap}>
|
||||
<div className={styles.cover} />
|
||||
|
@ -111,7 +121,30 @@ const BorisLayoutUnconnected: FC<IProps> = ({
|
|||
<p>Здесь мы сидим и слушаем всё, что вас беспокоит.</p>
|
||||
<p>А потом чиним долгими дождливыми вечерами.</p>
|
||||
</div>
|
||||
|
||||
{/*
|
||||
<div className={styles.stats__title}>Контент</div>
|
||||
|
||||
<Placeholder width="35%" />
|
||||
<Placeholder width="40%" />
|
||||
<Placeholder width="35%" />
|
||||
<Placeholder width="20%" />
|
||||
|
||||
<div className={styles.stats__title}>Хранилище</div>
|
||||
|
||||
<Placeholder width="35%" />
|
||||
<Placeholder width="35%" />
|
||||
<Placeholder width="40%" />
|
||||
*/}
|
||||
|
||||
<div className={styles.stats__title}>Изменения</div>
|
||||
|
||||
<Placeholder width="50%" />
|
||||
<Placeholder width="100%" />
|
||||
<Placeholder width="50%" />
|
||||
<Placeholder width="70%" />
|
||||
<Placeholder width="60%" />
|
||||
<Placeholder width="100%" />
|
||||
</Group>
|
||||
</Sticky>
|
||||
</Group>
|
||||
|
|
|
@ -6,10 +6,9 @@
|
|||
}
|
||||
|
||||
.content {
|
||||
flex: 4;
|
||||
flex: 3;
|
||||
z-index: 2;
|
||||
border-radius: $radius 0 0 $radius;
|
||||
// flex: 0 1 $limited_width;
|
||||
border-radius: $radius;
|
||||
padding: 0;
|
||||
background: $node_bg;
|
||||
box-shadow: inset transparentize(mix($wisegreen, white, 60%), 0.6) 0 1px;
|
||||
|
@ -117,6 +116,7 @@
|
|||
z-index: 2;
|
||||
align-self: stretch;
|
||||
flex-direction: column;
|
||||
padding-top: 10px;
|
||||
|
||||
&__container {
|
||||
background: darken($content_bg, 4%);
|
||||
|
@ -132,7 +132,6 @@
|
|||
text-transform: uppercase;
|
||||
opacity: 0.3;
|
||||
margin-top: 16px !important;
|
||||
display: none;
|
||||
}
|
||||
|
||||
&__about {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue