Skip to content

Commit

Permalink
Добавил в редактор отображение информации о владельце заметки
Browse files Browse the repository at this point in the history
  • Loading branch information
YarikMix committed May 27, 2024
1 parent 24acc71 commit 3611099
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
1 change: 0 additions & 1 deletion public/src/components/Note/Note.sass
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
height: 14px
filter: invert(70%)


.note-tags-container
display: flex
gap: 5px
Expand Down
13 changes: 8 additions & 5 deletions public/src/components/NoteEditor/NoteEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -451,11 +451,14 @@ export class NoteEditor extends ScReact.Component<NoteEditorProps, NoteEditorTyp
/>
</div>

<Tooltip
hoverTooltip="Владелец: user91"
showHoverTooltip={true}
icon="info_circle.svg"
/>
{
!isOwner ?
<Tooltip
hoverTooltip="Владелец: user91"
showHoverTooltip={true}
icon="info_circle.svg"
/> : ""
}

<NoteMenu
note={this.state.selectedNote}
Expand Down
7 changes: 3 additions & 4 deletions public/src/components/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class Tooltip extends ScReact.Component<TooltipProps, any> {
onclick={() => this.props.onClick && this.props.onClick() }
>

<div className="open-btn" onclick={this.toggleOpen} ref={ref => this.openBtnRef = ref}>
<div className="open-btn" onclick={this.props.content && this.toggleOpen} ref={ref => this.openBtnRef = ref}>

<div className="open-btn__icon-container">
{this.props.iconFromUnicode ? String.fromCodePoint(parseInt(this.props.icon, 16)) : <Img src={this.props.icon} className="icon"/>}
Expand All @@ -61,10 +61,9 @@ export class Tooltip extends ScReact.Component<TooltipProps, any> {
{this.props.showHoverTooltip ?
<div className={"tooltip-container"}>
<span>{this.props.hoverTooltip}</span>
</div>
:
""
</div> : ""
}

</div>

<div className="tooltip-wrapper__content" ref={ref => this.tooltipContentRef = ref}>
Expand Down

0 comments on commit 3611099

Please sign in to comment.