mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 03:37:56 +01:00
Add roadmap management to Site settings (#123)
This commit is contained in:
committed by
GitHub
parent
db674eaf6a
commit
e2065b2c5e
@@ -1,7 +1,6 @@
|
||||
import * as React from 'react';
|
||||
import I18n from 'i18n-js';
|
||||
|
||||
import { Draggable } from 'react-beautiful-dnd';
|
||||
import I18n from 'i18n-js';
|
||||
|
||||
import PostStatusLabel from "../../common/PostStatusLabel";
|
||||
import DragZone from '../../common/DragZone';
|
||||
@@ -71,7 +70,7 @@ class PostStatusEditable extends React.Component<Props, State> {
|
||||
<DragZone dndProvided={provided} isDragDisabled={settingsAreUpdating} />
|
||||
|
||||
{ editMode === false ?
|
||||
<React.Fragment>
|
||||
<>
|
||||
<PostStatusLabel name={name} color={color} />
|
||||
|
||||
<div className="postStatusEditableActions">
|
||||
@@ -86,9 +85,9 @@ class PostStatusEditable extends React.Component<Props, State> {
|
||||
{I18n.t('common.buttons.delete')}
|
||||
</a>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
</>
|
||||
:
|
||||
<React.Fragment>
|
||||
<>
|
||||
<PostStatusForm
|
||||
mode='update'
|
||||
id={id}
|
||||
@@ -102,7 +101,7 @@ class PostStatusEditable extends React.Component<Props, State> {
|
||||
onClick={this.toggleEditMode}>
|
||||
{I18n.t('common.buttons.cancel')}
|
||||
</a>
|
||||
</React.Fragment>
|
||||
</>
|
||||
}
|
||||
</li>
|
||||
)}
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import { DragDropContext, Droppable } from 'react-beautiful-dnd';
|
||||
import I18n from 'i18n-js';
|
||||
|
||||
import { DragDropContext, Droppable } from 'react-beautiful-dnd';
|
||||
import IPostStatus from '../../../interfaces/IPostStatus';
|
||||
|
||||
import { PostStatusesState } from "../../../reducers/postStatusesReducer";
|
||||
import { CenteredMutedText } from '../../common/CustomTexts';
|
||||
import SiteSettingsInfoBox from '../../common/SiteSettingsInfoBox';
|
||||
import PostStatusForm from './PostStatusForm';
|
||||
@@ -12,6 +9,9 @@ import PostStatusEditable from './PostStatusEditable';
|
||||
import Spinner from '../../common/Spinner';
|
||||
import Box from '../../common/Box';
|
||||
|
||||
import { PostStatusesState } from "../../../reducers/postStatusesReducer";
|
||||
import IPostStatus from '../../../interfaces/IPostStatus';
|
||||
|
||||
interface Props {
|
||||
authenticityToken: string;
|
||||
postStatuses: PostStatusesState;
|
||||
@@ -92,8 +92,8 @@ class PostStatusesSiteSettingsP extends React.Component<Props> {
|
||||
{
|
||||
postStatuses.items.length > 0 ?
|
||||
<DragDropContext onDragEnd={this.handleDragEnd}>
|
||||
<Droppable droppableId="postStatuses">
|
||||
{provided => (
|
||||
<Droppable droppableId="postStatuses">
|
||||
{provided => (
|
||||
<ul ref={provided.innerRef} {...provided.droppableProps} className="postStatusesList">
|
||||
{postStatuses.items.map((postStatus, i) => (
|
||||
<PostStatusEditable
|
||||
@@ -112,13 +112,13 @@ class PostStatusesSiteSettingsP extends React.Component<Props> {
|
||||
{provided.placeholder}
|
||||
</ul>
|
||||
)}
|
||||
</Droppable>
|
||||
</DragDropContext>
|
||||
:
|
||||
postStatuses.areLoading ?
|
||||
<Spinner />
|
||||
</Droppable>
|
||||
</DragDropContext>
|
||||
:
|
||||
<CenteredMutedText>{I18n.t('site_settings.post_statuses.empty')}</CenteredMutedText>
|
||||
postStatuses.areLoading ?
|
||||
<Spinner />
|
||||
:
|
||||
<CenteredMutedText>{I18n.t('site_settings.post_statuses.empty')}</CenteredMutedText>
|
||||
}
|
||||
</Box>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user