Skip to content

Commit

Permalink
Поправил редактор
Browse files Browse the repository at this point in the history
  • Loading branch information
YarikMix committed May 24, 2024
1 parent f4c3337 commit f57c903
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion public/src/components/NoteEditor/NoteEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ export class NoteEditor extends ScReact.Component<NoteEditorProps, NoteEditorTyp

render() {
const isSubNote = this.state.selectedNote?.parent != "00000000-0000-0000-0000-000000000000" ? "hidden" : ""
const isAuth = AppUserStore.state.isAuth
const isOwner = this.state.selectedNote?.owner_id == AppUserStore.state.user_id
const isEditable = this.state.selectedNote?.collaborators.includes(AppUserStore.state.user_id) || isOwner

Expand Down Expand Up @@ -432,7 +433,7 @@ export class NoteEditor extends ScReact.Component<NoteEditorProps, NoteEditorTyp
<Collaborators/>
</div>

<div className={!isOwner || isSubNote ? "hidden" : ""}>
<div className={!isAuth || isSubNote ? "hidden" : ""}>
<Tooltip
hoverTooltip={this.state.selectedNote?.favorite ? "Удалить из избранного" : "В избранное"}
showHoverTooltip={true}
Expand Down
2 changes: 1 addition & 1 deletion public/src/components/NoteMenu/NoteMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export class NoteMenu extends ScReact.Component<any, any> {
}

{isAuth ?
<div className="options-item" onclick={this.toggleFavorite}>
<div className="options-item mobile-option" onclick={this.toggleFavorite}>
<Img src={this.props.note?.favorite ? "star-filled.svg" : "star.svg"} className="icon"/>
<span>{this.props.note?.favorite ? "Удалить из избранного" : "В избранное"}</span>
</div> : ""
Expand Down

0 comments on commit f57c903

Please sign in to comment.