mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 03:37:56 +01:00
Add setting to manage visibility of vote count, vote button and decide root page (#197)
This commit is contained in:
committed by
GitHub
parent
d4242dd78e
commit
e7335f5622
@@ -7,6 +7,7 @@ import PostList from './PostList';
|
||||
import Sidebar from '../common/Sidebar';
|
||||
|
||||
import IBoard from '../../interfaces/IBoard';
|
||||
import ITenantSetting from '../../interfaces/ITenantSetting';
|
||||
|
||||
import { PostsState } from '../../reducers/postsReducer';
|
||||
import { PostStatusesState } from '../../reducers/postStatusesReducer';
|
||||
@@ -14,6 +15,8 @@ import { PostStatusesState } from '../../reducers/postStatusesReducer';
|
||||
interface Props {
|
||||
board: IBoard;
|
||||
isLoggedIn: boolean;
|
||||
isPowerUser: boolean;
|
||||
tenantSetting: ITenantSetting;
|
||||
authenticityToken: string;
|
||||
posts: PostsState;
|
||||
postStatuses: PostStatusesState;
|
||||
@@ -63,6 +66,8 @@ class BoardP extends React.Component<Props> {
|
||||
const {
|
||||
board,
|
||||
isLoggedIn,
|
||||
isPowerUser,
|
||||
tenantSetting,
|
||||
authenticityToken,
|
||||
posts,
|
||||
postStatuses,
|
||||
@@ -97,6 +102,8 @@ class BoardP extends React.Component<Props> {
|
||||
|
||||
<PostList
|
||||
posts={posts.items}
|
||||
showLikeCount={isPowerUser || tenantSetting.show_vote_count}
|
||||
showLikeButtons={tenantSetting.show_vote_button_in_board}
|
||||
postStatuses={postStatuses.items}
|
||||
areLoading={posts.areLoading}
|
||||
error={posts.error}
|
||||
|
||||
Reference in New Issue
Block a user