mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
dialogs: head
This commit is contained in:
parent
09658b8126
commit
3de025b0df
3 changed files with 40 additions and 15 deletions
|
@ -9,7 +9,7 @@ module.exports = async (req, res) => {
|
||||||
path: 'routes',
|
path: 'routes',
|
||||||
select: '_id title distance owner updated_at',
|
select: '_id title distance owner updated_at',
|
||||||
options: {
|
options: {
|
||||||
limit: 20,
|
limit: 200,
|
||||||
sort: { updated_at: -1 },
|
sort: { updated_at: -1 },
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -13,21 +13,29 @@ type Props = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const Component = ({ routes, editing, routes_sorted }: Props) => (
|
const Component = ({ routes, editing, routes_sorted }: Props) => (
|
||||||
<Scroll
|
<div className="dialog-content">
|
||||||
className="dialog-content"
|
<div className="dialog-head">
|
||||||
>
|
<div className="dialog-head-title">
|
||||||
<div className="dialog-maplist">
|
Ваши маршруты
|
||||||
{
|
</div>
|
||||||
routes_sorted.map(id => (
|
<div className="small gray">
|
||||||
<RouteRow
|
({routes_sorted.length} шт.)
|
||||||
editing={editing}
|
</div>
|
||||||
{...routes[id]}
|
|
||||||
key={id}
|
|
||||||
/>
|
|
||||||
))
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
</Scroll>
|
<Scroll className="dialog-shader">
|
||||||
|
<div className="dialog-maplist">
|
||||||
|
{
|
||||||
|
routes_sorted.map(id => (
|
||||||
|
<RouteRow
|
||||||
|
editing={editing}
|
||||||
|
{...routes[id]}
|
||||||
|
key={id}
|
||||||
|
/>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</Scroll>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
const mapStateToProps = ({ user: { editing, user: { routes } } }) => ({
|
const mapStateToProps = ({ user: { editing, user: { routes } } }) => ({
|
||||||
|
|
|
@ -32,6 +32,11 @@
|
||||||
border-radius: @panel_radius;
|
border-radius: @panel_radius;
|
||||||
box-shadow: @dialog_shadow;
|
box-shadow: @dialog_shadow;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-shader {
|
||||||
&::before, &::after {
|
&::before, &::after {
|
||||||
content: ' ';
|
content: ' ';
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
@ -104,3 +109,15 @@
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dialog-head {
|
||||||
|
background: rgba(255, 255, 255, 0.1);
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: @panel_radius @panel_radius 0 0;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-head-title {
|
||||||
|
font-size: 20px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue