mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
radiuses
This commit is contained in:
parent
87112cd985
commit
2f11bb80aa
10 changed files with 21 additions and 18 deletions
|
@ -31,13 +31,13 @@ const HeaderUnconnected: FC<IProps> = ({ username, is_user, showDialog }) => {
|
||||||
<Filler />
|
<Filler />
|
||||||
|
|
||||||
<div className={style.plugs}>
|
<div className={style.plugs}>
|
||||||
<Link to="/">flow</Link>
|
|
||||||
<Link to="/examples/image">image</Link>
|
|
||||||
<div onClick={onOpenEditor}>editor</div>
|
<div onClick={onOpenEditor}>editor</div>
|
||||||
|
<Link to="/">flow</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{is_user && (
|
{is_user && (
|
||||||
<Group horizontal className={style.user_button}>
|
<Group horizontal className={style.user_button}>
|
||||||
|
<div>{username}</div>
|
||||||
<div className={style.user_avatar} />
|
<div className={style.user_avatar} />
|
||||||
</Group>
|
</Group>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -27,8 +27,8 @@ const Comment: FC<IProps> = ({ comment, is_empty, is_loading, className, photo,
|
||||||
{comment.files && comment.files.length > 0 && (
|
{comment.files && comment.files.length > 0 && (
|
||||||
<div className={styles.images}>
|
<div className={styles.images}>
|
||||||
{comment.files.map(file => (
|
{comment.files.map(file => (
|
||||||
<div>
|
<div key={file.id}>
|
||||||
<img src={getURL(file.url)} />
|
<img src={getURL(file.url)} alt={file.name} />
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -15,6 +15,6 @@
|
||||||
@include flexbin(150px, 10px);
|
@include flexbin(150px, 10px);
|
||||||
|
|
||||||
img {
|
img {
|
||||||
border-radius: 4px;
|
border-radius: $radius;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,16 +2,19 @@ import React, { FC } from 'react';
|
||||||
import * as styles from './styles.scss';
|
import * as styles from './styles.scss';
|
||||||
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 {Icon} from "~/components/input/Icon";
|
import { Icon } from '~/components/input/Icon';
|
||||||
|
import { INode } from '~/redux/types';
|
||||||
|
|
||||||
interface IProps {}
|
interface IProps {
|
||||||
|
node: INode;
|
||||||
|
}
|
||||||
|
|
||||||
const NodePanel: FC<IProps> = () => (
|
const NodePanel: FC<IProps> = ({ node: { title, user } }) => (
|
||||||
<div className={styles.wrap}>
|
<div className={styles.wrap}>
|
||||||
<Group horizontal className={styles.panel}>
|
<Group horizontal className={styles.panel}>
|
||||||
<Filler>
|
<Filler>
|
||||||
<div className={styles.title}>Node title</div>
|
<div className={styles.title}>{title || '...'}</div>
|
||||||
<div className={styles.name}>~author</div>
|
{user && user.username && <div className={styles.name}>~ {user.username}</div>}
|
||||||
</Filler>
|
</Filler>
|
||||||
</Group>
|
</Group>
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
font: $font_12_regular;
|
font: $font_14_regular;
|
||||||
color: transparentize(white, 0.5);
|
color: transparentize(white, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -111,7 +111,7 @@
|
||||||
|
|
||||||
.children {
|
.children {
|
||||||
background: $content_bg;
|
background: $content_bg;
|
||||||
border-radius: $radius;
|
border-radius: $radius $radius 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.top_cap {
|
.top_cap {
|
||||||
|
@ -124,7 +124,7 @@
|
||||||
|
|
||||||
&::after {
|
&::after {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
content: " ";
|
content: ' ';
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: $radius;
|
height: $radius;
|
||||||
background: linear-gradient($content_bg, transparentize($content_bg, 1));
|
background: linear-gradient($content_bg, transparentize($content_bg, 1));
|
||||||
|
|
|
@ -58,7 +58,7 @@ const NodeLayoutUnconnected: FC<IProps> = ({
|
||||||
<Card className={styles.node} seamless>
|
<Card className={styles.node} seamless>
|
||||||
{block && createElement(block, { node, is_loading })}
|
{block && createElement(block, { node, is_loading })}
|
||||||
|
|
||||||
<NodePanel />
|
<NodePanel node={node} />
|
||||||
|
|
||||||
<Group>
|
<Group>
|
||||||
<Padder>
|
<Padder>
|
||||||
|
|
|
@ -31,7 +31,7 @@ export const EMPTY_BLOCK: IBlock = {
|
||||||
export const EMPTY_NODE: INode = {
|
export const EMPTY_NODE: INode = {
|
||||||
id: null,
|
id: null,
|
||||||
|
|
||||||
user_id: null,
|
user: null,
|
||||||
|
|
||||||
title: '',
|
title: '',
|
||||||
files: [],
|
files: [],
|
||||||
|
|
|
@ -93,7 +93,7 @@ export interface IBlock {
|
||||||
|
|
||||||
export interface INode {
|
export interface INode {
|
||||||
id?: number;
|
id?: number;
|
||||||
user_id: UUID;
|
user: Partial<IUser>;
|
||||||
|
|
||||||
title: string;
|
title: string;
|
||||||
files: IFile[];
|
files: IFile[];
|
||||||
|
|
|
@ -7,7 +7,7 @@ $gap: 10px;
|
||||||
$spc: $gap * 2;
|
$spc: $gap * 2;
|
||||||
|
|
||||||
$radius: 6px;
|
$radius: 6px;
|
||||||
$cell_radius: 4px;
|
$cell_radius: 6px;
|
||||||
$panel_radius: $radius;
|
$panel_radius: $radius;
|
||||||
|
|
||||||
$input_height: 36px;
|
$input_height: 36px;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue