From 11a75540df99e1358e4d0f7eeab4ab5667f39fcd Mon Sep 17 00:00:00 2001 From: YarikMix <43493788+YarikMix@users.noreply.github.com> Date: Sat, 18 May 2024 01:39:29 +0300 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D0=BE=D1=82=D0=BE=D0=B2?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BF=D0=BE=D0=B4=20=D1=88=D0=B5=D1=80=D0=B8?= =?UTF-8?q?=D0=BD=D0=B3=20=D0=B7=D0=B0=D0=BC=D0=B5=D1=82=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/src/assets/viber.png | Bin 0 -> 1717 bytes public/src/components/Modal/Modal.sass | 9 ++++++ public/src/components/Modal/Modal.tsx | 2 +- .../src/components/NoteEditor/NoteEditor.tsx | 26 ++++++++++++++++-- public/src/components/NoteMenu/NoteMenu.tsx | 24 ++++++++++------ .../src/components/SharePanel/SharePanel.tsx | 3 +- 6 files changed, 52 insertions(+), 12 deletions(-) create mode 100644 public/src/assets/viber.png diff --git a/public/src/assets/viber.png b/public/src/assets/viber.png new file mode 100644 index 0000000000000000000000000000000000000000..7f5c00dbd9753928573b67ffa17b8e4612cb1acf GIT binary patch literal 1717 zcmV;m21@yfP)7PN|DX=}D+ z<8CWE+r8B6+QbibUDGD*Hrdo|+-_EF)=QfZ6Ps=~Yh9L_CT+yjO|^)vfR~j5Yq4}4 zDhPux!pK};W_aKIFc&WKP9diKe|yh!`Tx&(pYxn^1ari$HOCV)23?g5l>$)=EC%L< z%p*WIh*m{#&ft%$Kk)gFN9U4P%;xZ7d2K;Jqxro+c?K}fQLhKVKNVTp|7K%#*L?|i z;o-V?S+D#FMeGK&b0nS#KXBM7+cN zpja(3uPB+76QJi#xYQx%O!fwhl)u5mzN28xA#D zy)dP?5;4B6Ms7;f^Q%9Uv9v5509jTT9`NAkcQfYp17I-eFeSwCU`ZMem8P?CYd&AL z*!jonEqF$KGgFqxal8WjF|qq^t}-&{MV6Im0xk0m_`CrWCAc~xgI=zk>p`d2QdpizQmT=*#@jPf$7#US z^3D78(ylef6GBa98j{kCta>yXTgMRf$J!%=RnM(pUP?RwMzfBh4Ga0nZ&$K@%L9l| zMJWoLI@XS@!@;V`Z04t__OER(um8{@X$-n5R61N(lN-|WcS<@FK0MKu{ z7a2U^wcL!rrb1Z5U2tlP3I#{A$PSOM5 z9P~uSnoivWU}VtC*Ix_*@MVh~y-`c&l>q>jt<8w|-x~^cU&}m$ssIIwBp_GKs5j~W z81n`qW9Q%R!hO$&qtC_gz@)I|(>84FLs7e9%oEaJp44F*jU>ZNR(n(!c8XLteZC8a@xkFkGt8v z_hIr^rvk8~IE4*QEkV)i)E>BkJfZOX z!3ui58YUw*5v@*Q^`kkw^Xf%LhlBqKx5?UL2+560C zK04aQUAvp+dK>>adkcW%Of&1Z!3QlP`=Qt$+emURIAN$^zIlXkL9p@T_!iK z-ofo0kIFF-kg;_*IDfK>j*ERL3S{IavSVL4mih72{q-t+|8vGz0O^3(xv9>qQ?LUj zHJ8oLF6D{sD+u@}_~gA#&iws)#Fmo(h3hksG=fuacX0MZ zXAE-OenGkb*uAOlZ4{o1<+*Ha22XBZj?3xe=u3?Nlx|+cFJ37{NYS^tp09?fKh{C# zWqXuu65`mA^FQ681yE#ZzYy{^K&R$_o^SJWK_UYaekXv0DZ%NO#_o{Pv6%53iHP&jz# zv#mD)B8|u?+ { render() { return ( -
+
this.overlayRef = ref}>

{this.props.title ? this.props.title : ""}

diff --git a/public/src/components/NoteEditor/NoteEditor.tsx b/public/src/components/NoteEditor/NoteEditor.tsx index 0104bcb6..2058d592 100644 --- a/public/src/components/NoteEditor/NoteEditor.tsx +++ b/public/src/components/NoteEditor/NoteEditor.tsx @@ -28,6 +28,7 @@ type NoteEditorType = { emojiModalOpen: boolean backgroundModalOpen: boolean fullScreen: boolean + shareModalOpen: boolean } type NoteEditorProps = { @@ -47,11 +48,10 @@ export class NoteEditor extends ScReact.Component { + this.setState(state => ({ + ...state, + shareModalOpen: true + })) + } + + closeShareModal = () => { + this.setState(state => ({ + ...state, + shareModalOpen: false + })) + } + render() { const isSubNote = this.state.selectedNote?.parent != "00000000-0000-0000-0000-000000000000" ? "hidden" : "" const isOwner = this.state.selectedNote?.owner_id == AppUserStore.state.user_id @@ -246,6 +260,13 @@ export class NoteEditor extends ScReact.Component} /> + } + /> +
@@ -380,6 +401,7 @@ export class NoteEditor extends ScReact.Component : "" } diff --git a/public/src/components/NoteMenu/NoteMenu.tsx b/public/src/components/NoteMenu/NoteMenu.tsx index dbafe1a6..a861c3e2 100644 --- a/public/src/components/NoteMenu/NoteMenu.tsx +++ b/public/src/components/NoteMenu/NoteMenu.tsx @@ -71,6 +71,10 @@ export class NoteMenu extends ScReact.Component { AppDispatcher.dispatch(NotesActions.EXPORT_TO_PDF) } + sharePanel = () => { + this.toggleMenu() + this.props.openSharePanel() + } render() { return ( @@ -81,15 +85,15 @@ export class NoteMenu extends ScReact.Component {
this.noteMenuRef = ref}> -
- - Удалить заметку +
+ + Поделиться
-
+
Скачать в pdf
-
+
Скачать в zip
@@ -97,18 +101,22 @@ export class NoteMenu extends ScReact.Component { {this.props.note.favorite ? "Удалить из избранного" : "В избранное"}
-
+
Изменить тэги
-
+
Изменить иконку
-
+
Изменить шапку
+
+ + Удалить заметку +
) diff --git a/public/src/components/SharePanel/SharePanel.tsx b/public/src/components/SharePanel/SharePanel.tsx index fd1e07dc..7a207fa0 100644 --- a/public/src/components/SharePanel/SharePanel.tsx +++ b/public/src/components/SharePanel/SharePanel.tsx @@ -21,7 +21,7 @@ export class SharePanel extends ScReact.Component { Просматривать могут все, у кого есть ссылка
- +
@@ -30,6 +30,7 @@ export class SharePanel extends ScReact.Component { +