mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
use array map
This commit is contained in:
parent
1b863a5927
commit
0fd35fd1f8
@ -6,8 +6,6 @@ import PostCard from "components/PostCard"
|
|||||||
import PlaylistTimelineEntry from "components/Music/PlaylistTimelineEntry"
|
import PlaylistTimelineEntry from "components/Music/PlaylistTimelineEntry"
|
||||||
import LoadMore from "components/LoadMore"
|
import LoadMore from "components/LoadMore"
|
||||||
|
|
||||||
import { For } from "million/react"
|
|
||||||
|
|
||||||
import PostModel from "models/post"
|
import PostModel from "models/post"
|
||||||
|
|
||||||
import "./index.less"
|
import "./index.less"
|
||||||
@ -77,7 +75,20 @@ const PostList = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
<For
|
{
|
||||||
|
props.list.map((data) => {
|
||||||
|
return <Entry
|
||||||
|
key={data._id}
|
||||||
|
data={data}
|
||||||
|
onLikePost={props.onLikePost}
|
||||||
|
onSavePost={props.onSavePost}
|
||||||
|
onDeletePost={props.onDeletePost}
|
||||||
|
onEditPost={props.onEditPost}
|
||||||
|
/>
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
{/* <For
|
||||||
each={props.list}
|
each={props.list}
|
||||||
style={{
|
style={{
|
||||||
height: `100%`,
|
height: `100%`,
|
||||||
@ -95,7 +106,7 @@ const PostList = (props) => {
|
|||||||
onEditPost={props.onEditPost}
|
onEditPost={props.onEditPost}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
</For>
|
</For> */}
|
||||||
</LoadMore>
|
</LoadMore>
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,6 +171,7 @@ export class PostsListsComponent extends React.Component {
|
|||||||
|
|
||||||
let payload = {
|
let payload = {
|
||||||
trim: this.state.list.length,
|
trim: this.state.list.length,
|
||||||
|
limit: app.cores.settings.get("feed_max_fetch"),
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.props.loadFromModelProps) {
|
if (this.props.loadFromModelProps) {
|
||||||
|
@ -73,55 +73,36 @@ html {
|
|||||||
//margin: auto;
|
//margin: auto;
|
||||||
z-index: 150;
|
z-index: 150;
|
||||||
|
|
||||||
slot {
|
.post_card {
|
||||||
slot {
|
border-radius: 0;
|
||||||
.post_card {
|
border-bottom: 2px solid var(--border-color);
|
||||||
border-radius: 0;
|
|
||||||
border-bottom: 2px solid var(--border-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.playlistTimelineEntry {
|
|
||||||
border-radius: 0;
|
|
||||||
border-bottom: 2px solid var(--border-color);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
slot {
|
border-radius: 8px;
|
||||||
.post_card {
|
|
||||||
border-radius: 8px;
|
|
||||||
|
|
||||||
border-bottom-left-radius: 0px;
|
border-bottom-left-radius: 0px;
|
||||||
border-bottom-right-radius: 0px;
|
border-bottom-right-radius: 0px;
|
||||||
}
|
|
||||||
|
|
||||||
.playlistTimelineEntry {
|
|
||||||
border-radius: 8px;
|
|
||||||
|
|
||||||
border-bottom-left-radius: 0px;
|
|
||||||
border-bottom-right-radius: 0px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
slot {
|
border-top-left-radius: 0px;
|
||||||
.post_card {
|
border-top-right-radius: 0px;
|
||||||
border-top-left-radius: 0px;
|
|
||||||
border-top-right-radius: 0px;
|
|
||||||
|
|
||||||
border-bottom-left-radius: 8px;
|
border-bottom-left-radius: 8px;
|
||||||
border-bottom-right-radius: 8px;
|
border-bottom-right-radius: 8px;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.playlistTimelineEntry {
|
.playlistTimelineEntry {
|
||||||
border-top-left-radius: 0px;
|
border-radius: 0;
|
||||||
border-top-right-radius: 0px;
|
border-bottom: 2px solid var(--border-color);
|
||||||
|
|
||||||
border-bottom-left-radius: 8px;
|
&:last-child {
|
||||||
border-bottom-right-radius: 8px;
|
border-top-left-radius: 0px;
|
||||||
}
|
border-top-right-radius: 0px;
|
||||||
}
|
|
||||||
|
border-bottom-left-radius: 8px;
|
||||||
|
border-bottom-right-radius: 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user