diff options
author | crupest <crupest@outlook.com> | 2021-06-15 22:28:43 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-06-15 22:28:43 +0800 |
commit | fba00c4e7c12a843f155b5a3ecc84209d27e900f (patch) | |
tree | 16188f9968cde8946cc6c5b91d6150f51583ff72 /FrontEnd | |
parent | 230793fbea7140ca8e5466dafeee4eb874ac6f14 (diff) | |
download | timeline-fba00c4e7c12a843f155b5a3ecc84209d27e900f.tar.gz timeline-fba00c4e7c12a843f155b5a3ecc84209d27e900f.tar.bz2 timeline-fba00c4e7c12a843f155b5a3ecc84209d27e900f.zip |
...
Diffstat (limited to 'FrontEnd')
4 files changed, 9 insertions, 17 deletions
diff --git a/FrontEnd/src/index.css b/FrontEnd/src/index.css index bcced69a..f64bbdf4 100644 --- a/FrontEnd/src/index.css +++ b/FrontEnd/src/index.css @@ -47,6 +47,10 @@ small { font-size: 1.6rem;
}
+.icon-button.primary-enhance {
+ color: var(--tl-primary-enhance-color)
+}
+
.cursor-pointer {
cursor: pointer;
}
diff --git a/FrontEnd/src/views/timeline-common/TimelinePagedPostListView.tsx b/FrontEnd/src/views/timeline-common/TimelinePagedPostListView.tsx index 2cb32481..69a5607c 100644 --- a/FrontEnd/src/views/timeline-common/TimelinePagedPostListView.tsx +++ b/FrontEnd/src/views/timeline-common/TimelinePagedPostListView.tsx @@ -1,14 +1,12 @@ import React from "react"; -import { HttpTimelineInfo, HttpTimelinePostInfo } from "@/http/timeline"; +import { HttpTimelinePostInfo } from "@/http/timeline"; import useScrollToTop from "@/utilities/useScrollToTop"; import TimelinePostListView from "./TimelinePostListView"; export interface TimelinePagedPostListViewProps { - className?: string; - style?: React.CSSProperties; posts: HttpTimelinePostInfo[]; onReload: () => void; } @@ -16,7 +14,7 @@ export interface TimelinePagedPostListViewProps { const TimelinePagedPostListView: React.FC<TimelinePagedPostListViewProps> = ( props ) => { - const { className, style, posts, onReload } = props; + const { posts, onReload } = props; const [lastViewCount, setLastViewCount] = React.useState<number>(10); @@ -30,14 +28,7 @@ const TimelinePagedPostListView: React.FC<TimelinePagedPostListViewProps> = ( setLastViewCount(lastViewCount + 10); }, lastViewCount < posts.length); - return ( - <TimelinePostListView - className={className} - style={style} - posts={viewingPosts} - onReload={onReload} - /> - ); + return <TimelinePostListView posts={viewingPosts} onReload={onReload} />; }; export default TimelinePagedPostListView; diff --git a/FrontEnd/src/views/timeline-common/TimelinePostListView.tsx b/FrontEnd/src/views/timeline-common/TimelinePostListView.tsx index 43c61ea8..f6649e9e 100644 --- a/FrontEnd/src/views/timeline-common/TimelinePostListView.tsx +++ b/FrontEnd/src/views/timeline-common/TimelinePostListView.tsx @@ -1,5 +1,4 @@ import React, { Fragment } from "react"; -import classnames from "classnames"; import { HttpTimelinePostInfo } from "@/http/timeline"; @@ -15,14 +14,12 @@ function dateEqual(left: Date, right: Date): boolean { } export interface TimelinePostListViewProps { - className?: string; - style?: React.CSSProperties; posts: HttpTimelinePostInfo[]; onReload: () => void; } const TimelinePostListView: React.FC<TimelinePostListViewProps> = (props) => { - const { className, style, posts, onReload } = props; + const { posts, onReload } = props; const groupedPosts = React.useMemo< { diff --git a/FrontEnd/src/views/timeline-common/TimelinePostView.tsx b/FrontEnd/src/views/timeline-common/TimelinePostView.tsx index 5572c5c3..6d0d1f2e 100644 --- a/FrontEnd/src/views/timeline-common/TimelinePostView.tsx +++ b/FrontEnd/src/views/timeline-common/TimelinePostView.tsx @@ -64,7 +64,7 @@ const TimelinePostView: React.FC<TimelinePostViewProps> = (props) => { > {post.editable ? ( <i - className="bi-chevron-down text-info icon-button float-end" + className="bi-chevron-down icon-button primary-enhance float-end" onClick={(e) => { setOperationMaskVisible(true); e.stopPropagation(); |