mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
fixed for nextjs, but it won't work
This commit is contained in:
parent
33e9e01f29
commit
4b79b06106
39 changed files with 64 additions and 63 deletions
5
pages/index.tsx
Normal file
5
pages/index.tsx
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
import App from "../src/containers/App";
|
||||||
|
|
||||||
|
const HomePage = () => (<App />)
|
||||||
|
|
||||||
|
export default HomePage
|
|
@ -3,11 +3,11 @@ import styles from './styles.module.scss';
|
||||||
import { Icon } from '~/components/input/Icon';
|
import { Icon } from '~/components/input/Icon';
|
||||||
import { PLAYER_STATES } from '~/redux/player/constants';
|
import { PLAYER_STATES } from '~/redux/player/constants';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import pick from 'ramda/es/pick';
|
import { pick } from 'ramda';
|
||||||
import { selectPlayer } from '~/redux/player/selectors';
|
import { selectPlayer } from '~/redux/player/selectors';
|
||||||
import * as PLAYER_ACTIONS from '~/redux/player/actions';
|
import * as PLAYER_ACTIONS from '~/redux/player/actions';
|
||||||
import { IPlayerProgress, Player } from '~/utils/player';
|
import { IPlayerProgress, Player } from '~/utils/player';
|
||||||
import path from 'ramda/es/path';
|
import { path } from 'ramda';
|
||||||
import { IFile } from '~/redux/types';
|
import { IFile } from '~/redux/types';
|
||||||
|
|
||||||
const mapStateToProps = state => pick(['status', 'file'], selectPlayer(state));
|
const mapStateToProps = state => pick(['status', 'file'], selectPlayer(state));
|
||||||
|
|
|
@ -4,7 +4,7 @@ import styles from './styles.module.scss';
|
||||||
import { getPrettyDate } from '~/utils/dom';
|
import { getPrettyDate } from '~/utils/dom';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
data: IStatGitRow;
|
data: Partial<IStatGitRow>;
|
||||||
}
|
}
|
||||||
|
|
||||||
const BorisStatsGitCard: FC<IProps> = ({ data: { timestamp, subject } }) => {
|
const BorisStatsGitCard: FC<IProps> = ({ data: { timestamp, subject } }) => {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import styles from './styles.module.scss';
|
||||||
import { Card } from '../Card';
|
import { Card } from '../Card';
|
||||||
import { IUser } from '~/redux/auth/types';
|
import { IUser } from '~/redux/auth/types';
|
||||||
import { getURL } from '~/utils/dom';
|
import { getURL } from '~/utils/dom';
|
||||||
import path from 'ramda/es/path';
|
import { path } from 'ramda';
|
||||||
import { PRESETS } from '~/constants/urls';
|
import { PRESETS } from '~/constants/urls';
|
||||||
|
|
||||||
type IProps = HTMLAttributes<HTMLDivElement> & {
|
type IProps = HTMLAttributes<HTMLDivElement> & {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import styles from './styles.module.scss';
|
||||||
import { createPortal } from 'react-dom';
|
import { createPortal } from 'react-dom';
|
||||||
import { selectNode } from '~/redux/node/selectors';
|
import { selectNode } from '~/redux/node/selectors';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import pick from 'ramda/es/pick';
|
import { pick } from 'ramda';
|
||||||
import { getURL } from '~/utils/dom';
|
import { getURL } from '~/utils/dom';
|
||||||
import { PRESETS } from '~/constants/urls';
|
import { PRESETS } from '~/constants/urls';
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,8 @@ import { IFileWithUUID, INode, IFile } from '~/redux/types';
|
||||||
import uuid from 'uuid4';
|
import uuid from 'uuid4';
|
||||||
import { UPLOAD_SUBJECTS, UPLOAD_TARGETS, UPLOAD_TYPES } from '~/redux/uploads/constants';
|
import { UPLOAD_SUBJECTS, UPLOAD_TARGETS, UPLOAD_TYPES } from '~/redux/uploads/constants';
|
||||||
import * as UPLOAD_ACTIONS from '~/redux/uploads/actions';
|
import * as UPLOAD_ACTIONS from '~/redux/uploads/actions';
|
||||||
import assocPath from 'ramda/es/assocPath';
|
import { assocPath } from 'ramda';
|
||||||
import append from 'ramda/es/append';
|
import { append } from 'ramda';
|
||||||
import { selectUploads } from '~/redux/uploads/selectors';
|
import { selectUploads } from '~/redux/uploads/selectors';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { NODE_SETTINGS } from '~/redux/node/constants';
|
import { NODE_SETTINGS } from '~/redux/node/constants';
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { IFileWithUUID } from '~/redux/types';
|
||||||
import uuid from 'uuid4';
|
import uuid from 'uuid4';
|
||||||
import styles from './styles.module.scss';
|
import styles from './styles.module.scss';
|
||||||
import { UPLOAD_SUBJECTS, UPLOAD_TARGETS, UPLOAD_TYPES } from '~/redux/uploads/constants';
|
import { UPLOAD_SUBJECTS, UPLOAD_TARGETS, UPLOAD_TYPES } from '~/redux/uploads/constants';
|
||||||
import path from 'ramda/es/path';
|
import { path } from 'ramda';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import * as UPLOAD_ACTIONS from '~/redux/uploads/actions';
|
import * as UPLOAD_ACTIONS from '~/redux/uploads/actions';
|
||||||
import { selectUploads } from '~/redux/uploads/selectors';
|
import { selectUploads } from '~/redux/uploads/selectors';
|
||||||
|
|
|
@ -2,7 +2,7 @@ import React, { FC, useCallback } from 'react';
|
||||||
import { INode } from '~/redux/types';
|
import { INode } from '~/redux/types';
|
||||||
import styles from './styles.module.scss';
|
import styles from './styles.module.scss';
|
||||||
import { Textarea } from '~/components/input/Textarea';
|
import { Textarea } from '~/components/input/Textarea';
|
||||||
import path from 'ramda/es/path';
|
import { path } from 'ramda';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
data: INode;
|
data: INode;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { FC, useCallback, useMemo } from 'react';
|
import React, { FC, useCallback, useMemo } from 'react';
|
||||||
import { INode } from '~/redux/types';
|
import { INode } from '~/redux/types';
|
||||||
import styles from './styles.module.scss';
|
import styles from './styles.module.scss';
|
||||||
import path from 'ramda/es/path';
|
import { path } from 'ramda';
|
||||||
import { InputText } from '~/components/input/InputText';
|
import { InputText } from '~/components/input/InputText';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import { getYoutubeThumb } from '~/utils/dom';
|
import { getYoutubeThumb } from '~/utils/dom';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import React, { FC } from 'react';
|
import React, { FC, Fragment } from 'react';
|
||||||
import { Cell } from '~/components/flow/Cell';
|
import { Cell } from '~/components/flow/Cell';
|
||||||
|
|
||||||
import { IFlowState } from '~/redux/flow/reducer';
|
import { IFlowState } from '~/redux/flow/reducer';
|
||||||
|
@ -14,7 +14,7 @@ type IProps = Partial<IFlowState> & {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const FlowGrid: FC<IProps> = ({ user, nodes, onSelect, onChangeCellView }) => (
|
export const FlowGrid: FC<IProps> = ({ user, nodes, onSelect, onChangeCellView }) => (
|
||||||
<>
|
<Fragment>
|
||||||
{nodes.map(node => (
|
{nodes.map(node => (
|
||||||
<Cell
|
<Cell
|
||||||
key={node.id}
|
key={node.id}
|
||||||
|
@ -24,5 +24,5 @@ export const FlowGrid: FC<IProps> = ({ user, nodes, onSelect, onChangeCellView }
|
||||||
onChangeCellView={onChangeCellView}
|
onChangeCellView={onChangeCellView}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</>
|
</Fragment>
|
||||||
);
|
);
|
||||||
|
|
|
@ -8,8 +8,8 @@ import { Filler } from '~/components/containers/Filler';
|
||||||
import { selectUser, selectAuthUpdates } from '~/redux/auth/selectors';
|
import { selectUser, selectAuthUpdates } from '~/redux/auth/selectors';
|
||||||
import { Group } from '~/components/containers/Group';
|
import { Group } from '~/components/containers/Group';
|
||||||
import { DIALOGS } from '~/redux/modal/constants';
|
import { DIALOGS } from '~/redux/modal/constants';
|
||||||
import pick from 'ramda/es/pick';
|
import { pick } from 'ramda';
|
||||||
import path from 'ramda/es/path';
|
import { path } from 'ramda';
|
||||||
import { UserButton } from '../UserButton';
|
import { UserButton } from '../UserButton';
|
||||||
import { Notifications } from '../Notifications';
|
import { Notifications } from '../Notifications';
|
||||||
import { URLS } from '~/constants/urls';
|
import { URLS } from '~/constants/urls';
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { Icon } from '~/components/input/Icon';
|
||||||
import styles from './styles.module.scss';
|
import styles from './styles.module.scss';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { selectAuthUpdates, selectAuthUser } from '~/redux/auth/selectors';
|
import { selectAuthUpdates, selectAuthUser } from '~/redux/auth/selectors';
|
||||||
import pick from 'ramda/es/pick';
|
import { pick } from 'ramda';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import * as AUTH_ACTIONS from '~/redux/auth/actions';
|
import * as AUTH_ACTIONS from '~/redux/auth/actions';
|
||||||
import { NotificationBubble } from '../../notifications/NotificationBubble';
|
import { NotificationBubble } from '../../notifications/NotificationBubble';
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import React, { FC, useMemo, memo, createElement, useCallback, useState } from 'react';
|
import React, { FC, useMemo, memo, createElement, useCallback, Fragment } from 'react';
|
||||||
import { IComment, IFile } from '~/redux/types';
|
import { IComment, IFile } from '~/redux/types';
|
||||||
import path from 'ramda/es/path';
|
import { path } from 'ramda';
|
||||||
import { formatCommentText, getURL, getPrettyDate } from '~/utils/dom';
|
import { formatCommentText, getURL, getPrettyDate } from '~/utils/dom';
|
||||||
import { Group } from '~/components/containers/Group';
|
import { Group } from '~/components/containers/Group';
|
||||||
import styles from './styles.module.scss';
|
import styles from './styles.module.scss';
|
||||||
import { UPLOAD_TYPES } from '~/redux/uploads/constants';
|
import { UPLOAD_TYPES } from '~/redux/uploads/constants';
|
||||||
import assocPath from 'ramda/es/assocPath';
|
import { assocPath } from 'ramda';
|
||||||
import append from 'ramda/es/append';
|
import { append } from 'ramda';
|
||||||
import reduce from 'ramda/es/reduce';
|
import reduce from 'ramda/es/reduce';
|
||||||
import { AudioPlayer } from '~/components/media/AudioPlayer';
|
import { AudioPlayer } from '~/components/media/AudioPlayer';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
|
@ -84,7 +84,7 @@ const CommentContent: FC<IProps> = memo(
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{groupped.audio && groupped.audio.length > 0 && (
|
{groupped.audio && groupped.audio.length > 0 && (
|
||||||
<>
|
<Fragment>
|
||||||
{groupped.audio.map(file => (
|
{groupped.audio.map(file => (
|
||||||
<div className={classnames(styles.block, styles.block_audio)} key={file.id}>
|
<div className={classnames(styles.block, styles.block_audio)} key={file.id}>
|
||||||
{menu}
|
{menu}
|
||||||
|
@ -94,7 +94,7 @@ const CommentContent: FC<IProps> = memo(
|
||||||
<div className={styles.date}>{getPrettyDate(comment.created_at)}</div>
|
<div className={styles.date}>{getPrettyDate(comment.created_at)}</div>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</>
|
</Fragment>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { Textarea } from '~/components/input/Textarea';
|
||||||
import styles from './styles.module.scss';
|
import styles from './styles.module.scss';
|
||||||
import { Filler } from '~/components/containers/Filler';
|
import { Filler } from '~/components/containers/Filler';
|
||||||
import { Button } from '~/components/input/Button';
|
import { Button } from '~/components/input/Button';
|
||||||
import assocPath from 'ramda/es/assocPath';
|
import { assocPath } from 'ramda';
|
||||||
import { IFile, IFileWithUUID, InputHandler } from '~/redux/types';
|
import { IFile, IFileWithUUID, InputHandler } from '~/redux/types';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import * as NODE_ACTIONS from '~/redux/node/actions';
|
import * as NODE_ACTIONS from '~/redux/node/actions';
|
||||||
|
|
|
@ -2,7 +2,7 @@ import React, { FC, useMemo } from 'react';
|
||||||
import { INode } from '~/redux/types';
|
import { INode } from '~/redux/types';
|
||||||
import styles from './styles.module.scss';
|
import styles from './styles.module.scss';
|
||||||
import { UPLOAD_TYPES } from '~/redux/uploads/constants';
|
import { UPLOAD_TYPES } from '~/redux/uploads/constants';
|
||||||
import path from 'ramda/es/path';
|
import { path } from 'ramda';
|
||||||
import { getURL } from '~/utils/dom';
|
import { getURL } from '~/utils/dom';
|
||||||
import { PRESETS } from '~/constants/urls';
|
import { PRESETS } from '~/constants/urls';
|
||||||
import { INodeComponentProps } from '~/redux/node/constants';
|
import { INodeComponentProps } from '~/redux/node/constants';
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { CommentWrapper } from '~/components/containers/CommentWrapper';
|
||||||
import styles from './styles.module.scss';
|
import styles from './styles.module.scss';
|
||||||
import { Filler } from '~/components/containers/Filler';
|
import { Filler } from '~/components/containers/Filler';
|
||||||
import { Button } from '~/components/input/Button';
|
import { Button } from '~/components/input/Button';
|
||||||
import assocPath from 'ramda/es/assocPath';
|
import { assocPath } from 'ramda';
|
||||||
import { InputHandler, IFileWithUUID, IFile } from '~/redux/types';
|
import { InputHandler, IFileWithUUID, IFile } from '~/redux/types';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import * as NODE_ACTIONS from '~/redux/node/actions';
|
import * as NODE_ACTIONS from '~/redux/node/actions';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React, { FC } from 'react';
|
import React, { FC } from 'react';
|
||||||
import { INode } from '~/redux/types';
|
import { INode } from '~/redux/types';
|
||||||
import path from 'ramda/es/path';
|
import { path } from 'ramda';
|
||||||
import { formatTextParagraphs } from '~/utils/dom';
|
import { formatTextParagraphs } from '~/utils/dom';
|
||||||
import styles from './styles.module.scss';
|
import styles from './styles.module.scss';
|
||||||
import { INodeComponentProps } from '~/redux/node/constants';
|
import { INodeComponentProps } from '~/redux/node/constants';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React, { FC, useMemo } from 'react';
|
import React, { FC, useMemo } from 'react';
|
||||||
import styles from './styles.module.scss';
|
import styles from './styles.module.scss';
|
||||||
import path from 'ramda/es/path';
|
import { path } from 'ramda';
|
||||||
import { INodeComponentProps } from '~/redux/node/constants';
|
import { INodeComponentProps } from '~/redux/node/constants';
|
||||||
|
|
||||||
interface IProps extends INodeComponentProps {}
|
interface IProps extends INodeComponentProps {}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { Button } from '~/components/input/Button';
|
||||||
import { Group } from '~/components/containers/Group';
|
import { Group } from '~/components/containers/Group';
|
||||||
import { Filler } from '~/components/containers/Filler';
|
import { Filler } from '~/components/containers/Filler';
|
||||||
import { InputText } from '~/components/input/InputText';
|
import { InputText } from '~/components/input/InputText';
|
||||||
import reject from 'ramda/es/reject';
|
import { reject } from 'ramda';
|
||||||
import * as AUTH_ACTIONS from '~/redux/auth/actions';
|
import * as AUTH_ACTIONS from '~/redux/auth/actions';
|
||||||
import { ERROR_LITERAL } from '~/constants/errors';
|
import { ERROR_LITERAL } from '~/constants/errors';
|
||||||
import { ProfileAccounts } from '~/components/profile/ProfileAccounts';
|
import { ProfileAccounts } from '~/components/profile/ProfileAccounts';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { FC, HTMLAttributes, useCallback, useEffect, useMemo, useState } from 'react';
|
import React, { FC, HTMLAttributes, useCallback, useEffect, useMemo, useState } from 'react';
|
||||||
import { TagField } from '~/components/containers/TagField';
|
import { TagField } from '~/components/containers/TagField';
|
||||||
import { ITag } from '~/redux/types';
|
import { ITag } from '~/redux/types';
|
||||||
import uniq from 'ramda/es/uniq';
|
import { uniq } from 'ramda';
|
||||||
import { Tag } from '~/components/tags/Tag';
|
import { Tag } from '~/components/tags/Tag';
|
||||||
import { TagInput } from '~/components/tags/TagInput';
|
import { TagInput } from '~/components/tags/TagInput';
|
||||||
import { separateTags } from '~/utils/tag';
|
import { separateTags } from '~/utils/tag';
|
||||||
|
|
|
@ -14,7 +14,7 @@ import styles from './styles.module.scss';
|
||||||
import * as ACTIONS from '~/redux/auth/actions';
|
import * as ACTIONS from '~/redux/auth/actions';
|
||||||
import * as MODAL_ACTIONS from '~/redux/modal/actions';
|
import * as MODAL_ACTIONS from '~/redux/modal/actions';
|
||||||
import { ISocialProvider } from '~/redux/auth/types';
|
import { ISocialProvider } from '~/redux/auth/types';
|
||||||
import pick from 'ramda/es/pick';
|
import { pick } from 'ramda';
|
||||||
import { LoginDialogButtons } from '~/containers/dialogs/LoginDialogButtons';
|
import { LoginDialogButtons } from '~/containers/dialogs/LoginDialogButtons';
|
||||||
import { IOAuthEvent, OAUTH_EVENT_TYPES } from '~/redux/types';
|
import { IOAuthEvent, OAUTH_EVENT_TYPES } from '~/redux/types';
|
||||||
import { DialogTitle } from '~/components/dialogs/DialogTitle';
|
import { DialogTitle } from '~/components/dialogs/DialogTitle';
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { ProfileMessages } from '~/containers/profile/ProfileMessages';
|
||||||
import { ProfileDescription } from '~/components/profile/ProfileDescription';
|
import { ProfileDescription } from '~/components/profile/ProfileDescription';
|
||||||
import * as AUTH_ACTIONS from '~/redux/auth/actions';
|
import * as AUTH_ACTIONS from '~/redux/auth/actions';
|
||||||
import { IAuthState } from '~/redux/auth/types';
|
import { IAuthState } from '~/redux/auth/types';
|
||||||
import pick from 'ramda/es/pick';
|
import { pick } from 'ramda';
|
||||||
import { CoverBackdrop } from '~/components/containers/CoverBackdrop';
|
import { CoverBackdrop } from '~/components/containers/CoverBackdrop';
|
||||||
import { ProfileSettings } from '~/components/profile/ProfileSettings';
|
import { ProfileSettings } from '~/components/profile/ProfileSettings';
|
||||||
import { ProfileAccounts } from '~/components/profile/ProfileAccounts';
|
import { ProfileAccounts } from '~/components/profile/ProfileAccounts';
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { Button } from '~/components/input/Button';
|
||||||
import styles from './styles.module.scss';
|
import styles from './styles.module.scss';
|
||||||
|
|
||||||
import * as AUTH_ACTIONS from '~/redux/auth/actions';
|
import * as AUTH_ACTIONS from '~/redux/auth/actions';
|
||||||
import pick from 'ramda/es/pick';
|
import { pick } from 'ramda';
|
||||||
import { selectAuthRestore } from '~/redux/auth/selectors';
|
import { selectAuthRestore } from '~/redux/auth/selectors';
|
||||||
import { ERROR_LITERAL, ERRORS } from '~/constants/errors';
|
import { ERROR_LITERAL, ERRORS } from '~/constants/errors';
|
||||||
import { Icon } from '~/components/input/Icon';
|
import { Icon } from '~/components/input/Icon';
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { Button } from '~/components/input/Button';
|
||||||
import styles from './styles.module.scss';
|
import styles from './styles.module.scss';
|
||||||
|
|
||||||
import * as AUTH_ACTIONS from '~/redux/auth/actions';
|
import * as AUTH_ACTIONS from '~/redux/auth/actions';
|
||||||
import pick from 'ramda/es/pick';
|
import { pick } from 'ramda';
|
||||||
import { selectAuthRestore } from '~/redux/auth/selectors';
|
import { selectAuthRestore } from '~/redux/auth/selectors';
|
||||||
import { ERROR_LITERAL } from '~/constants/errors';
|
import { ERROR_LITERAL } from '~/constants/errors';
|
||||||
import { Icon } from '~/components/input/Icon';
|
import { Icon } from '~/components/input/Icon';
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { FlowGrid } from '~/components/flow/FlowGrid';
|
||||||
import { selectFlow } from '~/redux/flow/selectors';
|
import { selectFlow } from '~/redux/flow/selectors';
|
||||||
import * as NODE_ACTIONS from '~/redux/node/actions';
|
import * as NODE_ACTIONS from '~/redux/node/actions';
|
||||||
import * as FLOW_ACTIONS from '~/redux/flow/actions';
|
import * as FLOW_ACTIONS from '~/redux/flow/actions';
|
||||||
import pick from 'ramda/es/pick';
|
import { pick } from 'ramda';
|
||||||
import { selectUser } from '~/redux/auth/selectors';
|
import { selectUser } from '~/redux/auth/selectors';
|
||||||
import { FlowHero } from '~/components/flow/FlowHero';
|
import { FlowHero } from '~/components/flow/FlowHero';
|
||||||
import styles from './styles.module.scss';
|
import styles from './styles.module.scss';
|
||||||
|
|
|
@ -3,7 +3,7 @@ import styles from './styles.module.scss';
|
||||||
import { PlayerBar } from '~/components/bars/PlayerBar';
|
import { PlayerBar } from '~/components/bars/PlayerBar';
|
||||||
import { SubmitBar } from '~/components/bars/SubmitBar';
|
import { SubmitBar } from '~/components/bars/SubmitBar';
|
||||||
import { selectUser } from '~/redux/auth/selectors';
|
import { selectUser } from '~/redux/auth/selectors';
|
||||||
import pick from 'ramda/es/pick';
|
import { pick } from 'ramda';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
const mapStateToProps = state => pick(['is_user'], selectUser(state));
|
const mapStateToProps = state => pick(['is_user'], selectUser(state));
|
||||||
|
|
|
@ -14,7 +14,7 @@ import { NodeComments } from '~/components/node/NodeComments';
|
||||||
import { NodeTags } from '~/components/node/NodeTags';
|
import { NodeTags } from '~/components/node/NodeTags';
|
||||||
import { INodeComponentProps, NODE_COMPONENTS, NODE_HEADS, NODE_INLINES, } from '~/redux/node/constants';
|
import { INodeComponentProps, NODE_COMPONENTS, NODE_HEADS, NODE_INLINES, } from '~/redux/node/constants';
|
||||||
import { selectUser } from '~/redux/auth/selectors';
|
import { selectUser } from '~/redux/auth/selectors';
|
||||||
import pick from 'ramda/es/pick';
|
import { pick } from 'ramda';
|
||||||
import { NodeRelatedPlaceholder } from '~/components/node/NodeRelated/placeholder';
|
import { NodeRelatedPlaceholder } from '~/components/node/NodeRelated/placeholder';
|
||||||
import { NodeDeletedBadge } from '~/components/node/NodeDeletedBadge';
|
import { NodeDeletedBadge } from '~/components/node/NodeDeletedBadge';
|
||||||
import { NodeCommentForm } from '~/components/node/NodeCommentForm';
|
import { NodeCommentForm } from '~/components/node/NodeCommentForm';
|
||||||
|
|
|
@ -2,18 +2,14 @@ import React, { FC, useCallback, useEffect, useState } from "react";
|
||||||
import styles from "./styles.module.scss";
|
import styles from "./styles.module.scss";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { getURL } from "~/utils/dom";
|
import { getURL } from "~/utils/dom";
|
||||||
import pick from "ramda/es/pick";
|
import { pick } from "ramda";
|
||||||
import { selectAuthUser, selectAuthProfile } from "~/redux/auth/selectors";
|
import { selectAuthProfile, selectAuthUser } from "~/redux/auth/selectors";
|
||||||
import { PRESETS } from "~/constants/urls";
|
import { PRESETS } from "~/constants/urls";
|
||||||
import { selectUploads } from "~/redux/uploads/selectors";
|
import { selectUploads } from "~/redux/uploads/selectors";
|
||||||
import { IFileWithUUID } from "~/redux/types";
|
import { IFileWithUUID } from "~/redux/types";
|
||||||
import uuid from "uuid4";
|
import uuid from "uuid4";
|
||||||
import {
|
import { UPLOAD_SUBJECTS, UPLOAD_TARGETS, UPLOAD_TYPES } from "~/redux/uploads/constants";
|
||||||
UPLOAD_SUBJECTS,
|
import { path } from 'ramda';
|
||||||
UPLOAD_TARGETS,
|
|
||||||
UPLOAD_TYPES
|
|
||||||
} from "~/redux/uploads/constants";
|
|
||||||
import path from "ramda/es/path";
|
|
||||||
import * as UPLOAD_ACTIONS from "~/redux/uploads/actions";
|
import * as UPLOAD_ACTIONS from "~/redux/uploads/actions";
|
||||||
import * as AUTH_ACTIONS from "~/redux/auth/actions";
|
import * as AUTH_ACTIONS from "~/redux/auth/actions";
|
||||||
import { Icon } from "~/components/input/Icon";
|
import { Icon } from "~/components/input/Icon";
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { selectAuthProfile, selectAuthUser } from '~/redux/auth/selectors';
|
||||||
import styles from './styles.module.scss';
|
import styles from './styles.module.scss';
|
||||||
import * as AUTH_ACTIONS from '~/redux/messages/actions';
|
import * as AUTH_ACTIONS from '~/redux/messages/actions';
|
||||||
import { Message } from '~/components/profile/Message';
|
import { Message } from '~/components/profile/Message';
|
||||||
import pick from 'ramda/es/pick';
|
import { pick } from 'ramda';
|
||||||
import { NodeNoComments } from '~/components/node/NodeNoComments';
|
import { NodeNoComments } from '~/components/node/NodeNoComments';
|
||||||
import { selectMessages } from '~/redux/messages/selectors';
|
import { selectMessages } from '~/redux/messages/selectors';
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ export type IStatBackend = {
|
||||||
|
|
||||||
export type IBorisState = Readonly<{
|
export type IBorisState = Readonly<{
|
||||||
stats: {
|
stats: {
|
||||||
git: IStatGitRow[];
|
git: Partial<IStatGitRow>[];
|
||||||
backend: IStatBackend;
|
backend: IStatBackend;
|
||||||
is_loading: boolean;
|
is_loading: boolean;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import assocPath from 'ramda/es/assocPath';
|
import { assocPath } from 'ramda';
|
||||||
import { FLOW_ACTIONS } from './constants';
|
import { FLOW_ACTIONS } from './constants';
|
||||||
import {
|
import {
|
||||||
flowSetNodes,
|
flowSetNodes,
|
||||||
|
|
|
@ -17,7 +17,7 @@ import { selectFlowNodes, selectFlow } from './selectors';
|
||||||
import { reqWrapper } from '../auth/sagas';
|
import { reqWrapper } from '../auth/sagas';
|
||||||
import { postCellView, getSearchResults } from './api';
|
import { postCellView, getSearchResults } from './api';
|
||||||
import { IFlowState } from './reducer';
|
import { IFlowState } from './reducer';
|
||||||
import uniq from 'ramda/es/uniq';
|
import { uniq } from 'ramda';
|
||||||
|
|
||||||
function hideLoader() {
|
function hideLoader() {
|
||||||
document.getElementById('main_loader').style.display = 'none';
|
document.getElementById('main_loader').style.display = 'none';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import assocPath from 'ramda/es/assocPath';
|
import { assocPath } from 'ramda';
|
||||||
import { NODE_ACTIONS } from './constants';
|
import { NODE_ACTIONS } from './constants';
|
||||||
import {
|
import {
|
||||||
nodeSetSaveErrors,
|
nodeSetSaveErrors,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { takeLatest, call, put, select, delay, all, takeLeading } from 'redux-saga/effects';
|
import { takeLatest, call, put, select, delay, all, takeLeading } from 'redux-saga/effects';
|
||||||
import { push } from 'connected-react-router';
|
import { push } from 'connected-react-router';
|
||||||
import omit from 'ramda/es/omit';
|
import { omit } from 'ramda';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
NODE_ACTIONS,
|
NODE_ACTIONS,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { PLAYER_ACTIONS } from './constants';
|
import { PLAYER_ACTIONS } from './constants';
|
||||||
import assocPath from 'ramda/es/assocPath';
|
import { assocPath } from 'ramda';
|
||||||
import { playerSetFile, playerSetStatus, playerSet } from './actions';
|
import { playerSetFile, playerSetStatus, playerSet } from './actions';
|
||||||
|
|
||||||
const setFile = (state, { file }: ReturnType<typeof playerSetFile>) =>
|
const setFile = (state, { file }: ReturnType<typeof playerSetFile>) =>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import assocPath from 'ramda/es/assocPath';
|
import { assocPath } from 'ramda';
|
||||||
import omit from 'ramda/es/omit';
|
import { omit } from 'ramda';
|
||||||
|
|
||||||
import { UPLOAD_ACTIONS, EMPTY_UPLOAD_STATUS } from './constants';
|
import { UPLOAD_ACTIONS, EMPTY_UPLOAD_STATUS } from './constants';
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import curry from 'ramda/es/curry';
|
import { curry } from 'ramda';
|
||||||
import insert from 'ramda/es/insert';
|
import { insert } from 'ramda';
|
||||||
import nth from 'ramda/es/nth';
|
import { nth } from 'ramda';
|
||||||
import remove from 'ramda/es/remove';
|
import { remove } from 'ramda';
|
||||||
import { ICommentGroup, IComment } from '~/redux/types';
|
import { ICommentGroup, IComment } from '~/redux/types';
|
||||||
import path from 'ramda/es/path';
|
import { path } from 'ramda';
|
||||||
|
|
||||||
export const moveArrItem = curry((at, to, list) => insert(to, nth(at, list), remove(at, 1, list)));
|
export const moveArrItem = curry((at, to, list) => insert(to, nth(at, list), remove(at, 1, list)));
|
||||||
export const objFromArray = (array: any[], key: string) =>
|
export const objFromArray = (array: any[], key: string) =>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { USER_ROLES } from '~/redux/auth/constants';
|
import { USER_ROLES } from '~/redux/auth/constants';
|
||||||
import { ICommentGroup, INode } from '~/redux/types';
|
import { ICommentGroup, INode } from '~/redux/types';
|
||||||
import { IUser } from '~/redux/auth/types';
|
import { IUser } from '~/redux/auth/types';
|
||||||
import path from 'ramda/es/path';
|
import { path } from 'ramda';
|
||||||
import { NODE_TYPES } from '~/redux/node/constants';
|
import { NODE_TYPES } from '~/redux/node/constants';
|
||||||
|
|
||||||
export const canEditNode = (node: Partial<INode>, user: Partial<IUser>): boolean =>
|
export const canEditNode = (node: Partial<INode>, user: Partial<IUser>): boolean =>
|
||||||
|
|
|
@ -17,7 +17,7 @@ export interface IPlayerProgress {
|
||||||
|
|
||||||
export class PlayerClass {
|
export class PlayerClass {
|
||||||
public constructor() {
|
public constructor() {
|
||||||
this.element.addEventListener('timeupdate', () => {
|
this.element?.addEventListener('timeupdate', () => {
|
||||||
const { duration: total, currentTime: current } = this.element;
|
const { duration: total, currentTime: current } = this.element;
|
||||||
const progress = parseFloat(((current / total) * 100).toFixed(2));
|
const progress = parseFloat(((current / total) * 100).toFixed(2));
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ export class PlayerClass {
|
||||||
|
|
||||||
public total: number = 0;
|
public total: number = 0;
|
||||||
|
|
||||||
public element: HTMLAudioElement = new Audio();
|
public element: HTMLAudioElement = typeof Audio !== 'undefined' ? new Audio() : null;
|
||||||
|
|
||||||
public duration: number = 0;
|
public duration: number = 0;
|
||||||
|
|
||||||
|
@ -45,11 +45,11 @@ export class PlayerClass {
|
||||||
};
|
};
|
||||||
|
|
||||||
public on = (type: string, callback) => {
|
public on = (type: string, callback) => {
|
||||||
this.element.addEventListener(type, callback);
|
this.element?.addEventListener(type, callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
public off = (type: string, callback) => {
|
public off = (type: string, callback) => {
|
||||||
this.element.removeEventListener(type, callback);
|
this.element?.removeEventListener(type, callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
public load = () => {
|
public load = () => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue