feature: connect card operation icon to quick card editor
This commit is contained in:
parent
b95cc6859e
commit
609baa98aa
@ -134,10 +134,9 @@ export const ListCardOperation = styled.span`
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
right: 2px;
|
right: 2px;
|
||||||
top: 2px;
|
top: 2px;
|
||||||
z-index: 10;
|
z-index: 100;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: ${props => mixin.darken('#262c49', 0.45)};
|
background-color: ${props => mixin.darken('#262c49', .25)};
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import React, { useState, useRef, useEffect } from 'react';
|
import React, {useState, useRef, useEffect} from 'react';
|
||||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||||
import TaskAssignee from 'shared/components/TaskAssignee';
|
import TaskAssignee from 'shared/components/TaskAssignee';
|
||||||
import { faPencilAlt, faList } from '@fortawesome/free-solid-svg-icons';
|
import {faPencilAlt, faList} from '@fortawesome/free-solid-svg-icons';
|
||||||
import { faClock, faCheckSquare, faEye } from '@fortawesome/free-regular-svg-icons';
|
import {faClock, faCheckSquare, faEye} from '@fortawesome/free-regular-svg-icons';
|
||||||
import {
|
import {
|
||||||
EditorTextarea,
|
EditorTextarea,
|
||||||
EditorContent,
|
EditorContent,
|
||||||
@ -132,7 +132,12 @@ const Card = React.forwardRef(
|
|||||||
>
|
>
|
||||||
<ListCardInnerContainer ref={$innerCardRef}>
|
<ListCardInnerContainer ref={$innerCardRef}>
|
||||||
{isActive && (
|
{isActive && (
|
||||||
<ListCardOperation>
|
<ListCardOperation onClick={e => {
|
||||||
|
e.stopPropagation();
|
||||||
|
if (onContextMenu) {
|
||||||
|
onContextMenu($innerCardRef, taskID, taskGroupID);
|
||||||
|
}
|
||||||
|
}}>
|
||||||
<FontAwesomeIcon onClick={onOperationClick} color="#c2c6dc" size="xs" icon={faPencilAlt} />
|
<FontAwesomeIcon onClick={onOperationClick} color="#c2c6dc" size="xs" icon={faPencilAlt} />
|
||||||
</ListCardOperation>
|
</ListCardOperation>
|
||||||
)}
|
)}
|
||||||
@ -164,11 +169,11 @@ const Card = React.forwardRef(
|
|||||||
/>
|
/>
|
||||||
</EditorContent>
|
</EditorContent>
|
||||||
) : (
|
) : (
|
||||||
<CardTitle>
|
<CardTitle>
|
||||||
{complete && <CompleteIcon width={16} height={16} />}
|
{complete && <CompleteIcon width={16} height={16} />}
|
||||||
{title}
|
{title}
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
)}
|
)}
|
||||||
<ListCardBadges>
|
<ListCardBadges>
|
||||||
{watched && (
|
{watched && (
|
||||||
<ListCardBadge>
|
<ListCardBadge>
|
||||||
|
Loading…
Reference in New Issue
Block a user