mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
eslint fix
This commit is contained in:
parent
dfaac877fb
commit
fa4d51360b
81 changed files with 741 additions and 972 deletions
|
@ -1,7 +1,7 @@
|
|||
import * as React from 'react';
|
||||
|
||||
interface IGodRaysProps {
|
||||
raised?: boolean,
|
||||
raised?: boolean;
|
||||
}
|
||||
|
||||
export class GodRays extends React.Component<IGodRaysProps> {
|
||||
|
@ -30,22 +30,26 @@ export class GodRays extends React.Component<IGodRaysProps> {
|
|||
return setTimeout(() => window.requestAnimationFrame(this.draw), 1000);
|
||||
}
|
||||
|
||||
const { width, height, rays, particles } = this.state;
|
||||
const {
|
||||
width, height, rays, particles
|
||||
} = this.state;
|
||||
|
||||
const ctx = this.canvas.getContext('2d');
|
||||
|
||||
ctx.globalCompositeOperation = "luminosity";
|
||||
ctx.globalCompositeOperation = 'luminosity';
|
||||
ctx.clearRect(0, 0, width, height + 100); // clear canvas
|
||||
ctx.save();
|
||||
|
||||
rays.map(({ angle, iterator, weight, speed, pulsar, opacity }, index) => {
|
||||
rays.map(({
|
||||
angle, iterator, weight, speed, pulsar, opacity
|
||||
}, index) => {
|
||||
const gradient = ctx.createLinearGradient(0, 0, 0, height * 1.3);
|
||||
gradient.addColorStop(0.2, `rgba(255, 60, 40, ${opacity * 0.1})`);
|
||||
gradient.addColorStop(1, `rgba(255, 60, 40, 0)`);
|
||||
gradient.addColorStop(1, 'rgba(255, 60, 40, 0)');
|
||||
|
||||
const gradient2 = ctx.createLinearGradient(0, 0, 0, height * 1.3);
|
||||
gradient2.addColorStop(0.2, `rgba(255, 40, 100, ${opacity * 0.2})`);
|
||||
gradient2.addColorStop(1, "rgba(255, 40, 100, 0)");
|
||||
gradient2.addColorStop(1, 'rgba(255, 40, 100, 0)');
|
||||
|
||||
ctx.save();
|
||||
ctx.translate(width / 2, -900);
|
||||
|
@ -106,7 +110,7 @@ export class GodRays extends React.Component<IGodRaysProps> {
|
|||
this.init();
|
||||
}
|
||||
|
||||
render(){
|
||||
render() {
|
||||
const { width, height } = this.state;
|
||||
|
||||
return (
|
||||
|
@ -119,7 +123,8 @@ export class GodRays extends React.Component<IGodRaysProps> {
|
|||
zIndex: -1,
|
||||
opacity: 1,
|
||||
pointerEvents: 'none',
|
||||
}}>
|
||||
}}
|
||||
>
|
||||
<canvas
|
||||
width={width}
|
||||
height={height + 100}
|
||||
|
@ -128,12 +133,13 @@ export class GodRays extends React.Component<IGodRaysProps> {
|
|||
position: 'relative',
|
||||
top: -100,
|
||||
}}
|
||||
ref={el => { this.canvas = el; }}
|
||||
ref={(el) => { this.canvas = el; }}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
canvas: HTMLCanvasElement;
|
||||
|
||||
inc;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import * as React from "react";
|
||||
import { Logo } from "~/components/main/Logo";
|
||||
import { connect } from "react-redux";
|
||||
import { push as historyPush } from "connected-react-router";
|
||||
import * as React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { push as historyPush } from 'connected-react-router';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Logo } from '~/components/main/Logo';
|
||||
|
||||
import * as style from "./style.scss";
|
||||
import { Filler } from "~/components/containers/Filler";
|
||||
import { Link } from "react-router-dom";
|
||||
import {selectUser} from "~/redux/auth/selectors";
|
||||
import {Group} from "~/components/containers/Group";
|
||||
import * as style from './style.scss';
|
||||
import { Filler } from '~/components/containers/Filler';
|
||||
import { selectUser } from '~/redux/auth/selectors';
|
||||
import { Group } from '~/components/containers/Group';
|
||||
|
||||
const mapStateToProps = selectUser;
|
||||
|
||||
|
@ -20,31 +20,29 @@ type IProps = ReturnType<typeof mapStateToProps> & typeof mapDispatchToProps & {
|
|||
const HeaderUnconnected: React.FunctionComponent<IProps> = ({
|
||||
username,
|
||||
is_user
|
||||
}) => {
|
||||
return (
|
||||
<div className="default_container head_container">
|
||||
<div className={style.container}>
|
||||
<Logo />
|
||||
}) => (
|
||||
<div className="default_container head_container">
|
||||
<div className={style.container}>
|
||||
<Logo />
|
||||
|
||||
<Filler />
|
||||
<Filler />
|
||||
|
||||
<div className={style.plugs}>
|
||||
<Link to="/">flow</Link>
|
||||
<Link to="/examples/image">image</Link>
|
||||
<Link to="/examples/edit">editor</Link>
|
||||
<Link to="/examples/horizontal">horizontal</Link>
|
||||
</div>
|
||||
|
||||
<Filler />
|
||||
|
||||
<Group horizontal className={style.user_button}>
|
||||
<div>username</div>
|
||||
<div className={style.user_avatar}/>
|
||||
</Group>
|
||||
<div className={style.plugs}>
|
||||
<Link to="/">flow</Link>
|
||||
<Link to="/examples/image">image</Link>
|
||||
<Link to="/examples/edit">editor</Link>
|
||||
<Link to="/examples/horizontal">horizontal</Link>
|
||||
</div>
|
||||
|
||||
<Filler />
|
||||
|
||||
<Group horizontal className={style.user_button}>
|
||||
<div>username</div>
|
||||
<div className={style.user_avatar} />
|
||||
</Group>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
</div>
|
||||
);
|
||||
|
||||
const Header = connect(
|
||||
mapStateToProps,
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
import React, { FC, LegacyRef, ReactChild, useCallback, useEffect, useState } from 'react';
|
||||
import * as styles from './styles.scss';
|
||||
import React, {
|
||||
FC, LegacyRef, ReactChild, useCallback, useEffect, useState
|
||||
} from 'react';
|
||||
import classNames from 'classnames';
|
||||
import {Group} from "~/components/containers/Group";
|
||||
import * as styles from './styles.scss';
|
||||
import { Group } from '~/components/containers/Group';
|
||||
|
||||
interface IProps {
|
||||
}
|
||||
|
@ -28,8 +30,8 @@ export const SidePane: FC<IProps> = ({
|
|||
return () => {
|
||||
window.removeEventListener('resize', moveThis);
|
||||
document.removeEventListener('DOMContentLoaded', moveThis);
|
||||
}
|
||||
}, []);
|
||||
};
|
||||
}, [moveThis]);
|
||||
|
||||
return (
|
||||
<div className={styles.pane} style={{ transform: `translate(${left}px, 0px)` }}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue