mirror of
https://github.com/zadam/trilium.git
synced 2025-11-04 21:49:04 +01:00
chore(react/collections/table): reintroduce icon while editing
This commit is contained in:
parent
1ce42d1301
commit
228a1ad0da
@ -154,6 +154,8 @@
|
|||||||
.board-view-container .board-note.editing {
|
.board-view-container .board-note.editing {
|
||||||
box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.35);
|
box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.35);
|
||||||
border-color: var(--main-text-color);
|
border-color: var(--main-text-color);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.board-view-container .board-note.editing input {
|
.board-view-container .board-note.editing input {
|
||||||
|
|||||||
@ -373,6 +373,7 @@ function Card({
|
|||||||
isDragging: boolean
|
isDragging: boolean
|
||||||
}) {
|
}) {
|
||||||
const { branchIdToEdit } = useContext(BoardViewContext);
|
const { branchIdToEdit } = useContext(BoardViewContext);
|
||||||
|
const isEditing = branch.branchId === branchIdToEdit;
|
||||||
const colorClass = note.getColorClass() || '';
|
const colorClass = note.getColorClass() || '';
|
||||||
|
|
||||||
const handleDragStart = useCallback((e: DragEvent) => {
|
const handleDragStart = useCallback((e: DragEvent) => {
|
||||||
@ -391,17 +392,15 @@ function Card({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`board-note ${colorClass} ${isDragging ? 'dragging' : ''}`}
|
className={`board-note ${colorClass} ${isDragging ? 'dragging' : ''} ${isEditing ? "editing" : ""}`}
|
||||||
draggable="true"
|
draggable="true"
|
||||||
onDragStart={handleDragStart}
|
onDragStart={handleDragStart}
|
||||||
onDragEnd={handleDragEnd}
|
onDragEnd={handleDragEnd}
|
||||||
onContextMenu={handleContextMenu}
|
onContextMenu={handleContextMenu}
|
||||||
>
|
>
|
||||||
{branch.branchId !== branchIdToEdit ? (
|
|
||||||
<>
|
|
||||||
<span class={`icon ${note.getIcon()}`} />
|
<span class={`icon ${note.getIcon()}`} />
|
||||||
{note.title}
|
{!isEditing ? (
|
||||||
</>
|
<>{note.title}</>
|
||||||
) : (
|
) : (
|
||||||
<FormTextBox
|
<FormTextBox
|
||||||
value={note.title}
|
value={note.title}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user