From 8c9a8f14dc0ffed8f3a2426c84dfc950961124c6 Mon Sep 17 00:00:00 2001 From: axpoems <145597137+axpoems@users.noreply.github.com> Date: Mon, 17 Jun 2024 08:39:18 +0200 Subject: [PATCH 01/18] Introduce StandardButton --- .../components/controls/StandardButton.java | 53 +++++++++++++++++++ .../src/main/resources/css/controls.css | 19 +++++++ 2 files changed, 72 insertions(+) create mode 100644 apps/desktop/desktop/src/main/java/bisq/desktop/components/controls/StandardButton.java diff --git a/apps/desktop/desktop/src/main/java/bisq/desktop/components/controls/StandardButton.java b/apps/desktop/desktop/src/main/java/bisq/desktop/components/controls/StandardButton.java new file mode 100644 index 0000000000..2dd220a9c1 --- /dev/null +++ b/apps/desktop/desktop/src/main/java/bisq/desktop/components/controls/StandardButton.java @@ -0,0 +1,53 @@ +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.desktop.components.controls; + +import bisq.desktop.common.utils.ImageUtil; +import javafx.scene.control.Button; +import javafx.scene.image.ImageView; + +public class StandardButton extends Button { + private final ImageView defaultIcon, activeIcon; + private ImageView buttonIcon; + + public StandardButton(String text, String defaultIconId, String activeIconId) { + defaultIcon = ImageUtil.getImageViewById(defaultIconId); + activeIcon = ImageUtil.getImageViewById(activeIconId); + buttonIcon = defaultIcon; + + setText(text); + setGraphic(buttonIcon); + setGraphicTextGap(10); + getStyleClass().add("standard-button"); + + attachListeners(); + } + + private void attachListeners() { + setOnMouseExited(e -> updateIcon(defaultIcon)); + setOnMouseEntered(e -> updateIcon(activeIcon)); + } + + private void updateIcon(ImageView newIcon) { + if (buttonIcon != newIcon) { + getChildren().remove(buttonIcon); + buttonIcon = newIcon; + getChildren().add(buttonIcon); + } + } +} diff --git a/apps/desktop/desktop/src/main/resources/css/controls.css b/apps/desktop/desktop/src/main/resources/css/controls.css index 30470427cc..8dc44a37a4 100644 --- a/apps/desktop/desktop/src/main/resources/css/controls.css +++ b/apps/desktop/desktop/src/main/resources/css/controls.css @@ -889,6 +889,25 @@ -fx-font-family: "IBM Plex Sans"; } +/******************************************************************************* + * * + * Standard Button * + * * + ******************************************************************************/ + +.standard-button { + -fx-padding: 0; + -fx-border-width: 0; + -fx-background-color: transparent; + -fx-cursor: hand; + -fx-text-fill: -fx-mid-text-color; +} + +.standard-button:hover { + -fx-background-color: transparent; + -fx-text-fill: -fx-light-text-color; +} + /******************************************************************************* * * From c139d05896d17613141a3aa2c95bc82c66ea6e20 Mon Sep 17 00:00:00 2001 From: axpoems <145597137+axpoems@users.noreply.github.com> Date: Mon, 17 Jun 2024 08:43:27 +0200 Subject: [PATCH 02/18] Use StandardButton for send private msg --- .../main/content/chat/sidebar/UserProfileSidebar.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java index 60638308ae..50019e351b 100644 --- a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java +++ b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java @@ -32,6 +32,7 @@ import bisq.desktop.components.containers.Spacer; import bisq.desktop.components.controls.BisqIconButton; import bisq.desktop.components.controls.BisqTooltip; +import bisq.desktop.components.controls.StandardButton; import bisq.desktop.main.content.components.ReportToModeratorWindow; import bisq.desktop.main.content.components.ReputationScoreDisplay; import bisq.i18n.Res; @@ -232,7 +233,8 @@ public static class View extends bisq.desktop.common.view.View Date: Mon, 17 Jun 2024 08:48:23 +0200 Subject: [PATCH 03/18] Add mention icon --- .../desktop/src/main/resources/css/images.css | 13 +++++++++++++ .../images/chat/mention/mention-green.png | Bin 0 -> 467 bytes .../images/chat/mention/mention-green@2x.png | Bin 0 -> 835 bytes .../images/chat/mention/mention-grey.png | Bin 0 -> 462 bytes .../images/chat/mention/mention-grey@2x.png | Bin 0 -> 827 bytes .../images/chat/mention/mention-white.png | Bin 0 -> 463 bytes .../images/chat/mention/mention-white@2x.png | Bin 0 -> 799 bytes 7 files changed, 13 insertions(+) create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/mention/mention-green.png create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/mention/mention-green@2x.png create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/mention/mention-grey.png create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/mention/mention-grey@2x.png create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/mention/mention-white.png create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/mention/mention-white@2x.png diff --git a/apps/desktop/desktop/src/main/resources/css/images.css b/apps/desktop/desktop/src/main/resources/css/images.css index f131e64405..65b14cf9fc 100644 --- a/apps/desktop/desktop/src/main/resources/css/images.css +++ b/apps/desktop/desktop/src/main/resources/css/images.css @@ -857,6 +857,19 @@ -fx-image: url("/images/chat/grey-small-dot.png"); } +#mention-green { + -fx-image: url("/images/chat/mention/mention-green.png"); +} + +#mention-grey { + -fx-image: url("/images/chat/mention/mention-grey.png"); +} + +#mention-white { + -fx-image: url("/images/chat/mention/mention-white.png"); +} + + /* ------------------------------------------------------------------------------------ */ /* Markets */ /* ------------------------------------------------------------------------------------ */ diff --git a/apps/desktop/desktop/src/main/resources/images/chat/mention/mention-green.png b/apps/desktop/desktop/src/main/resources/images/chat/mention/mention-green.png new file mode 100644 index 0000000000000000000000000000000000000000..395ad7bfb0613c7cc29b7e95b41637911156cae5 GIT binary patch literal 467 zcmV;^0WAKBP)O zdyqk0krbg;H%f}oMy*(qoX=!YDSD=tI(m|EB|8kyF`rPu=qrb2JyazZEl| zi~ttF6HgxCOtR{92e0bUA$CaK>78Nx0MHGTN{B_JonDghC4g%D)_w$_LRh%Ro&mb{ zSX>668M6~(QK?~Z-XX4-(cWWM$isR>cpG@^J92T5OU$9B04!OeKaxD0Dh+Jh8$gZ% zm@?1Z`{c_A(F|ma6z~G5;5|wYIyk*(wh(LPy+TNVN&v?hKzVX3Ett^e z!IVwV3I^9~?2&OrkvZ5=OIUH!y+;dFVoPkNJ}+_I3nSd z0Op1~lz6dVRO0d?b%GIK$f!l)M^5H}gY10?+)32bwXG1|CF{rMka+5LEBuNb^&*(L z%n{&WjsPQ}qGtn8`2cinrRp;lO(IdwLiiyP487R;rXzGV@5PcMB!Ej{^1|`VC(b<2 zEVMuxTZj*qt}(Pf`pz0-k)h+%>@+ukQEc~gXKAJHilky6b7>7;=|TSO^hopp&A;z9 zKiRvl#>EUq9e<0p^31d z9{3ivTHk|vj_ZxVi@7N`U{I5TIlnaG3m+_-qY)wnh;> zL0=hR+cY`#hBXIOY&}T&WHR=Sx+T0A!3)vEt(VtL*~Q%d4e?)q0RZKo&JXUR(2xKC N002ovPDHLkV1n;@f@=T( literal 0 HcmV?d00001 diff --git a/apps/desktop/desktop/src/main/resources/images/chat/mention/mention-grey.png b/apps/desktop/desktop/src/main/resources/images/chat/mention/mention-grey.png new file mode 100644 index 0000000000000000000000000000000000000000..fffe3102c7b24bc40e1ff61e5c91e2a138f8ecc6 GIT binary patch literal 462 zcmV;<0WtoGP)QtvvMKAib%qG526n=>n%|R#~c~Wo5GCo0Tx{jHnT!#X+jn?WGSN4gG}m< zqzJWoP*Q|8D#e!MyeErN(JQso(UpudIih)v32n5&U}#@KK43$GTU25e9R}NkpaS7Q zS4tE48FN=d-%vyc9QXy@Vz5UT4s;_%N;!`@u3@uVP3e$k4ac17>oyvfB%J8NmmoPo zS3Ej46E=q@+?U`-a1qQasO~+moPI~qr3QVB75@SZ0HQKz_JKfLNdN!<07*qoM6N<$ Ef&p~BWdHyG literal 0 HcmV?d00001 diff --git a/apps/desktop/desktop/src/main/resources/images/chat/mention/mention-grey@2x.png b/apps/desktop/desktop/src/main/resources/images/chat/mention/mention-grey@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..7d4577d9e71fbb8fad8aa44658a3f5f1e49f18c7 GIT binary patch literal 827 zcmV-B1H}A^P)Ype(U}Rph8%<$6f%s@mO32pc%6h zV^OJLao!=WnbE;xcgVwLLU>zv>^E|8lv~W9<^Zf%qCb&5oGUGCJQ_ew0+=$-J^JL! z1kns+j1=$!sNg+H4?4KKXyh_2MCDT?87gg%4|qp{j&o|`TQUaJTfTo<=k>@c-8^aZuZ%9iuhBzYOl>p|3Jd}8` zWK`nvB6WfhV92ON;zv&AfrIRQ3EWB4)U}-u-ZksT*N}Mbb}Rge9rY?$xGWLiX^8+M zp`sT9Q279KZKawk7EK~i&PwCVuw70aeBt9wgR)SU7r+KP21I(p6q zIOYupS$ZCXzGXMl8bI#IJ&XEjfD|NeaR=~OjRH!b>bn8b3!lQkXIm7}GxVJiwoQ{u zZ&-6sMd3lx7n7-X)E(i)2wsS0ZoRy2%5IkaZ-`F;1^@yd&JSMfNO%AM002ovPDHLk FV1n^LY0Urt literal 0 HcmV?d00001 diff --git a/apps/desktop/desktop/src/main/resources/images/chat/mention/mention-white.png b/apps/desktop/desktop/src/main/resources/images/chat/mention/mention-white.png new file mode 100644 index 0000000000000000000000000000000000000000..5c7967ddf9f3577e03318081c3c328eba198fbfe GIT binary patch literal 463 zcmV;=0WkiFP)d!CnX00rv_IIFo#P`5Xb`P4Ww2|9m?$JF~lap4~J}Zp8|r z1Zq*}@%?3ap1YeBp}o)u4=eLu!V&zio$=6P(JTJng-#gopS(@;C!tF7>Y-D?aU2t! zFblm<(YU1)0@lVfu39WuV}UO88)8hvo+b%$$m;g3@JLB-kk104D>de8gdecC;E)e| z5@<1|4CWga(p0Ke22Uz{Tl&|;pM@7();+wj7Fi>sdUL2TJ|G~>G}kT&2C9&YptaJR zo@{V`*qWesSK69jFsazGg7;)56u*#5Z(7nuQseR>3kI{HMO)oLyu*eA`uGVg8qx3V z#VOQbL3Nh8q@ean?YIX6jUT!7xKs4RH{rvC=8-3Rb-6ne{PQNeEk1^@tNdEMUQGFbos002ovPDHLk FV1jDd%vk^c literal 0 HcmV?d00001 diff --git a/apps/desktop/desktop/src/main/resources/images/chat/mention/mention-white@2x.png b/apps/desktop/desktop/src/main/resources/images/chat/mention/mention-white@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..757aba6bd5acb9b4e82689abfbe66b1690e80d47 GIT binary patch literal 799 zcmV+)1K|9LP)`tvjtcZG9(QE|-6hHkk6w z4FOm&mp0&EHPXEXu3fP?4Yec%xUfvNW8gk8QFR0VYRvIY#-0#3qG$k9=8kubFC!&m zAlIP4Un03ULjDR#dN6m&!<0fN1XfF3{3yJX6L2S3PLmkcNSGT-Y_h*kX>(+j{KR#L z|E0@(~I6Sy-`Q`5GJdqZ{}-$T|uCyAExCYMDpbD1N+ zW{v=j64A2(82JEnl~UCmgC@~Z&O*6iES;HpZaQ3Nv))=Wga$BF7B3zD`NFvez?=n0 zZF6yBIW_v@k3RE)F(aHfmC()QjBgq177JHJU6NuztE8`sfA{3pK`G4+0J>shiL0x- z0{ZDFFndz(lzx};H6f81dOX{@y1JU3v85%Vjip*SkOf;@H_BIrEpIzrC4a)obX(cq z2ZIql8fj4-SyGpG1Oc(7zw$CO^V*3F47 do~!&8U;r&;2K00chb903002ovPDHLkV1m#IX!!sD literal 0 HcmV?d00001 From 989feded73f955265042b8a81b4cef88547c1503 Mon Sep 17 00:00:00 2001 From: axpoems <145597137+axpoems@users.noreply.github.com> Date: Mon, 17 Jun 2024 08:52:52 +0200 Subject: [PATCH 04/18] Add StandardButton for mention --- .../main/content/chat/sidebar/UserProfileSidebar.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java index 50019e351b..401a4ab1ee 100644 --- a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java +++ b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java @@ -233,8 +233,8 @@ public static class View extends bisq.desktop.common.view.View Date: Mon, 17 Jun 2024 08:54:50 +0200 Subject: [PATCH 05/18] Add report icon --- .../desktop/src/main/resources/css/images.css | 12 ++++++++++++ .../resources/images/chat/report/report-green.png | Bin 0 -> 386 bytes .../images/chat/report/report-green@2x.png | Bin 0 -> 689 bytes .../resources/images/chat/report/report-grey.png | Bin 0 -> 386 bytes .../images/chat/report/report-grey@2x.png | Bin 0 -> 684 bytes .../resources/images/chat/report/report-white.png | Bin 0 -> 396 bytes .../images/chat/report/report-white@2x.png | Bin 0 -> 674 bytes 7 files changed, 12 insertions(+) create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/report/report-green.png create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/report/report-green@2x.png create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/report/report-grey.png create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/report/report-grey@2x.png create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/report/report-white.png create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/report/report-white@2x.png diff --git a/apps/desktop/desktop/src/main/resources/css/images.css b/apps/desktop/desktop/src/main/resources/css/images.css index 65b14cf9fc..054e315725 100644 --- a/apps/desktop/desktop/src/main/resources/css/images.css +++ b/apps/desktop/desktop/src/main/resources/css/images.css @@ -869,6 +869,18 @@ -fx-image: url("/images/chat/mention/mention-white.png"); } +#report-green { + -fx-image: url("/images/chat/report/report-green.png"); +} + +#report-grey { + -fx-image: url("/images/chat/report/report-grey.png"); +} + +#report-white { + -fx-image: url("/images/chat/report/report-white.png"); +} + /* ------------------------------------------------------------------------------------ */ /* Markets */ diff --git a/apps/desktop/desktop/src/main/resources/images/chat/report/report-green.png b/apps/desktop/desktop/src/main/resources/images/chat/report/report-green.png new file mode 100644 index 0000000000000000000000000000000000000000..6fc9c6efb33cde299adc8c60b73afebc8eedafb7 GIT binary patch literal 386 zcmV-|0e$|7P)PblcLVV)C|>}GgMj!95MRP& z;2$Wh55y~g_$Uyw0dW8jr$8|}n2RiqZlE}n=0!4`0U8XMK>QwvouQUofx1`-*#H&> z;(#nDh=JG<6l6%^AOpFO6*3WN;CUeaN{m8cUAPX2C5cf;tP4T0nL~*S*`YCQ2*kgk zUgjsqz?V?^3l_DYSbqq_n}PTfH0D9zGd?eKK_iwzWY%BK@UL&KKbN}K_Uu)Z=#Z95wxWJqB6A95Y*bB z*6*S3z-8GT?~a#opgHhiE_2V``Ockl?>RFYOsCTUFWW)8&fAaMuH(=H9)XFB?qU!D zf50k8ITbN{bKIFg*eD2tE1(Np0F9slRDnVuk6<0V2G77G7;|L?VF!3D1y6JM1VIUJ zLg)i;!4QA*3T!I=5#DGkZ}tfobSiKgM6;a#1>S=Vj&Tf}Q2I}SyF`2z!4}0yUrh0B z--|%YQhaRlWCpBd_?!n3S8oa?W`6gKrc81+CU4a14W9T#Oq6N zhBN=$guns~pOcI~p#t>t{9#bW#U^6DF+}DlFknJpP{U_kX~)4=wts?8S^OiWW=7XO zDD9|*f7)$8%5&M}>A;MT~V%fE8*2#C9NwU?5n`0TTkZG{mW^S-8UmC3RvsIKpuxHWyeE8jC@v z8RrG@OfEKVzCd4~FVGk03-ks4=K`&_v#?hMhVuBOBB!tX^cR8PQzz#suboZ=ghT!S`7`xuB#@d;}hH9Er_k)`Z4l&}zn6Adbn! z#?2Mz3Umd!0$qWw!2eue=Fky<&)Rv2^>oQ_-3s>^=I7RO-^3d`){AT zD*YV0NMjRa3~+`X`nZ(cUz-6j>*{rB2l_Tya~Rbcwq;aa@MK>-*Hey4kIvm9PT9Hs q0~a4Swff9uk4;)2 zD_nvuxZwJ|UMuA_cdAmsIi1)mj>18>4cp)BCjNvvLWdB7?X3gcfh>bKjGs#c#PZUq$_Q>itgdT?3!wjWMF2b>Fd5jg~RRVugu=apw0MLTpu zr#=hH#f+(@;SqwPl?qO&5)K+|suTA>jjC#so9|Ti_@%07*qo IM6N<$f+Ykh$^ZZW literal 0 HcmV?d00001 From 7d9baeaeec907a2824047ec6bc379bbb3fc61b48 Mon Sep 17 00:00:00 2001 From: axpoems <145597137+axpoems@users.noreply.github.com> Date: Mon, 17 Jun 2024 08:57:00 +0200 Subject: [PATCH 06/18] Use StandardButton for report to moderator --- .../main/content/chat/sidebar/UserProfileSidebar.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java index 401a4ab1ee..c30502a1b8 100644 --- a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java +++ b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java @@ -233,8 +233,8 @@ public static class View extends bisq.desktop.common.view.View statementTriple = getInfoBox(Res.get("chat.sideBar.userProfile.statement")); statementBox = statementTriple.getThird(); From 557171f9010f9bc3d7d487188fa1af61bacfc72e Mon Sep 17 00:00:00 2001 From: axpoems <145597137+axpoems@users.noreply.github.com> Date: Mon, 17 Jun 2024 09:10:59 +0200 Subject: [PATCH 07/18] Use StandardButton for ignore and undo ignore --- .../chat/sidebar/UserProfileSidebar.java | 29 +++++++++---------- .../desktop/src/main/resources/css/chat.css | 6 ---- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java index c30502a1b8..3e8a1f072f 100644 --- a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java +++ b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java @@ -53,7 +53,6 @@ import javafx.geometry.Insets; import javafx.geometry.Pos; import javafx.scene.control.Button; -import javafx.scene.control.Hyperlink; import javafx.scene.control.Label; import javafx.scene.control.TextArea; import javafx.scene.control.ContentDisplay; @@ -114,7 +113,6 @@ private static class Controller implements bisq.desktop.common.view.Controller { private final Runnable closeHandler; private final BannedUserService bannedUserService; - private Controller(ServiceProvider serviceProvider, UserProfile userProfile, ChatChannel selectedChannel, @@ -144,7 +142,6 @@ public void onActivate() { model.addressByTransport.set(userProfile.getAddressByTransportDisplayString(26)); model.addressByTransportTooltip.set(userProfile.getAddressByTransportDisplayString()); - model.ignoreButtonText.set(Res.get("chat.sideBar.userProfile.ignore")); model.statement.set(userProfile.getStatement()); model.terms.set(userProfile.getTerms()); @@ -176,10 +173,8 @@ void onToggleIgnoreUser() { model.ignoreUserSelected.set(!model.ignoreUserSelected.get()); if (model.ignoreUserSelected.get()) { userProfileService.ignoreUserProfile(model.userProfile); - model.ignoreButtonText.set(Res.get("chat.sideBar.userProfile.undoIgnore")); } else { userProfileService.undoIgnoreUserProfile(model.userProfile); - model.ignoreButtonText.set(Res.get("chat.sideBar.userProfile.ignore")); } model.ignoreUserStateHandler.ifPresent(Runnable::run); } @@ -218,7 +213,6 @@ private static class Model implements bisq.desktop.common.view.Model { private final StringProperty profileAge = new SimpleStringProperty(); private final StringProperty lastSeen = new SimpleStringProperty(); private final BooleanProperty ignoreUserSelected = new SimpleBooleanProperty(); - private final StringProperty ignoreButtonText = new SimpleStringProperty(); private final BooleanProperty isPeer = new SimpleBooleanProperty(); private Model(ChatService chatService, UserProfile userProfile, ChatChannel selectedChannel) { @@ -233,8 +227,7 @@ public static class View extends bisq.desktop.common.view.View statementTriple = getInfoBox(Res.get("chat.sideBar.userProfile.statement")); statementBox = statementTriple.getThird(); statement = statementTriple.getSecond(); @@ -328,7 +319,7 @@ private View(Model model, Controller controller) { Region separator = Layout.hLine(); VBox.setMargin(separator, new Insets(20, -20, 10, -20)); - optionsVBox = new VBox(5, separator, privateMsg, mention, ignore, report); + optionsVBox = new VBox(5, separator, privateMsg, mention, ignore, undoIgnore, report); optionsVBox.setAlignment(Pos.CENTER_LEFT); VBox.setMargin(header, new Insets(0, -20, 0, 0)); @@ -357,7 +348,10 @@ protected void onViewAttached() { termsBox.managedProperty().bind(model.terms.isEmpty().not()); profileAge.textProperty().bind(model.profileAge); lastSeen.textProperty().bind(model.lastSeen); - ignore.textProperty().bind(model.ignoreButtonText); + ignore.visibleProperty().bind(model.ignoreUserSelected.not()); + ignore.managedProperty().bind(model.ignoreUserSelected.not()); + undoIgnore.visibleProperty().bind(model.ignoreUserSelected); + undoIgnore.managedProperty().bind(model.ignoreUserSelected); optionsVBox.visibleProperty().bind(model.isPeer); optionsVBox.managedProperty().bind(model.isPeer); privateMsg.visibleProperty().bind(model.isPeer); @@ -390,6 +384,7 @@ protected void onViewAttached() { privateMsg.setOnAction(e -> controller.onSendPrivateMessage()); mention.setOnAction(e -> controller.onMentionUser()); ignore.setOnAction(e -> controller.onToggleIgnoreUser()); + undoIgnore.setOnAction(e -> controller.onToggleIgnoreUser()); report.setOnAction(e -> controller.onReportUser()); closeButton.setOnAction(e -> controller.onClose()); } @@ -411,7 +406,10 @@ protected void onViewDetached() { terms.managedProperty().unbind(); profileAge.textProperty().unbind(); lastSeen.textProperty().unbind(); - ignore.textProperty().unbind(); + ignore.visibleProperty().unbind(); + ignore.managedProperty().unbind(); + undoIgnore.visibleProperty().unbind(); + undoIgnore.managedProperty().unbind(); optionsVBox.visibleProperty().unbind(); optionsVBox.managedProperty().unbind(); privateMsg.visibleProperty().unbind(); @@ -432,6 +430,7 @@ protected void onViewDetached() { privateMsg.setOnAction(null); mention.setOnAction(null); ignore.setOnAction(null); + undoIgnore.setOnAction(null); report.setOnAction(null); closeButton.setOnAction(null); } diff --git a/apps/desktop/desktop/src/main/resources/css/chat.css b/apps/desktop/desktop/src/main/resources/css/chat.css index f3b4d7e5c4..a420b08395 100644 --- a/apps/desktop/desktop/src/main/resources/css/chat.css +++ b/apps/desktop/desktop/src/main/resources/css/chat.css @@ -380,12 +380,6 @@ -fx-font-size: 1em; } -.chat-side-bar-user-profile-small-hyperlink { - /* -fx-font-size: 1em; - -fx-font-family: "IBM Plex Light";*/ - -fx-text-fill: -fx-light-text-color; -} - .chat-side-bar-user-profile.text-area { -fx-font-size: 1em; -fx-background-color: rgba(255, 255, 255, 0.05); From 6e39bd879a88c711b51242008173025bdab45183 Mon Sep 17 00:00:00 2001 From: axpoems <145597137+axpoems@users.noreply.github.com> Date: Mon, 17 Jun 2024 09:15:37 +0200 Subject: [PATCH 08/18] Add ignore icon --- .../desktop/src/main/resources/css/images.css | 12 ++++++++++++ .../images/chat/ignore/ignore-green.png | Bin 0 -> 531 bytes .../images/chat/ignore/ignore-green@2x.png | Bin 0 -> 1176 bytes .../resources/images/chat/ignore/ignore-grey.png | Bin 0 -> 527 bytes .../images/chat/ignore/ignore-grey@2x.png | Bin 0 -> 1177 bytes .../images/chat/ignore/ignore-white.png | Bin 0 -> 507 bytes .../images/chat/ignore/ignore-white@2x.png | Bin 0 -> 1139 bytes 7 files changed, 12 insertions(+) create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/ignore/ignore-green.png create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/ignore/ignore-green@2x.png create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/ignore/ignore-grey.png create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/ignore/ignore-grey@2x.png create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/ignore/ignore-white.png create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/ignore/ignore-white@2x.png diff --git a/apps/desktop/desktop/src/main/resources/css/images.css b/apps/desktop/desktop/src/main/resources/css/images.css index 054e315725..8b9a2e91b1 100644 --- a/apps/desktop/desktop/src/main/resources/css/images.css +++ b/apps/desktop/desktop/src/main/resources/css/images.css @@ -881,6 +881,18 @@ -fx-image: url("/images/chat/report/report-white.png"); } +#ignore-green { + -fx-image: url("/images/chat/ignore/ignore-green.png"); +} + +#ignore-grey { + -fx-image: url("/images/chat/ignore/ignore-grey.png"); +} + +#ignore-white { + -fx-image: url("/images/chat/ignore/ignore-white.png"); +} + /* ------------------------------------------------------------------------------------ */ /* Markets */ diff --git a/apps/desktop/desktop/src/main/resources/images/chat/ignore/ignore-green.png b/apps/desktop/desktop/src/main/resources/images/chat/ignore/ignore-green.png new file mode 100644 index 0000000000000000000000000000000000000000..733d04acdc97f28a11cb03c4a98dc61ec7cb88d9 GIT binary patch literal 531 zcmV+u0_^>XP)l;?Gq9{Spgfy{|X$0dB;h4LSPa9)2SMuTZ27rvF#+Br1@LCJZA2-*ALA zyj14xXuv*_t_%1E6R6V{vz1k~0!HBg#>!bq8oFL@&i<^OM#xL znnhj1FP()q5x1}U^#!Mn2dvq_sMUKby$n^bIs2>o-eu+XSS;J^9Ip|r5sAk(UZ{*9 z&8E%bM|{UG^{rMjIfeYor<|d2*up235r`Nam>ozx(v+!f+O179ulwn})lffC7Na`V zF$~}_RbDL1Pd%Tf=iZ^f=l=ij#_OK|0{|*o VYHVR#_+S74002ovPDHLkV1j9R`uqR@ literal 0 HcmV?d00001 diff --git a/apps/desktop/desktop/src/main/resources/images/chat/ignore/ignore-green@2x.png b/apps/desktop/desktop/src/main/resources/images/chat/ignore/ignore-green@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..4a4a95d00b75f0f27cedea7b2ee7a6ce3f5c3115 GIT binary patch literal 1176 zcmV;J1ZVq+P)JrNka3w%9@{{R2UYv4jeVZ6r#Q3bE9lAl4>mOM=kGzQj!FV&ADPh}f5)VuZea zPkf&Ia(nN4&-erJPV$-Gd+*-+yWe|$=bYcUlN1hzLvOR?3%%u*5SS2{5csYOEMR}S zu4^Cp-cU>s{l%p>EpAnpO)msG_PuB-j*8)8NsKu@5e*p2i4R1sxF@cPGvbiA@LC>p zteaRY+A(&)o7bFkT8o~-++Hfq``Gmx#Y(a3bp+Z|cR-YRv!ggJz7|EqSW&?_-#oNW z92DooZQ{DTs4QxTdVJ0VJ8zO$mKT9$wmB~p+nA)e_{llGSF8{lcp%pbi^pP*=l4qD z3(-r|5lcmu7$ttmYZhCQT=D#NUrZPC5tk~aikm#xKa7{fccKv2T@*7#UC~MWE;4w? z#d#5EL4TfDvt=91q{YP=v0U^Jckx2HI3~7>Q{p2rj@bL$Gxx8eiReQ@WfCeM$1AY5 z_*+yITglG(+-MAw_GFn0iWwqJ)Dmq(b*?eb6cgDT^V$!hEXO}3HtWO^m_b=ETOisZ z$n3e8;_*nBWq#_DY?f$4`Mxv28Fz?rdzd7Wt$L6^i5Tpk0N@2IKqv* zHkV~DDf&hUwf@{QgoaeFKohlA6eX*MMVYK0qj|TnI7yb8mu8d6u8m;q6QiQoJ%1J{ zVv|?kD2lTsM&~G#q#(w!_PW?lW=>(bZAlL!Jmm3olQ{PN?#yYs*$`J?ea4&^6BJ~8 z;QW?L@>p!1r2^PIlSMM;JY!6bqc&$VHg^S1W&BE1i*oUO1XcDqW@YFz;w~SB*u2pQ zVGqTV7~<;E1B58%F9q(S$|vyzg`!Ndh4VW49DB?%x2DkBR`(mnHWLOxX0>!TpC?4( z(2a=|Y;9@8QA)r>k!+h6dU)8eVB&tyB; zr^_QG$lJLjREVX`V9B!_(IJ|NGlednBk#O!Dq(nEO1g1m~)?s1J}cJFQ1 zED92lWdECS-bsQii@=TS5~m1*Y~nD;(r5shvML$;{*+d$6|V^o*m0J)neO*a5@fbh z%%X(!rB;6H9KXeT#~q4!I!RQ*GtXJN7^?)2=w>3X7>fvjer_WiufRxFPJ@P2`W9?q z>EKrv_u%E-6m!2 zwj{H)$|lJ=7&Qk{4suy3+N{$a)+R)0PEM3I`O_Y@b>Kouq(u&Di}HV6b}6;Al-RXa zaxnXT>NEA*2^Vv4*l)d>-^_e}&-Zzr@Avm}2ZKRZB!|Zp;c@>1Mg;=vwvV7!#KM(pyRp|A5e)k)F2s~IK&maD92m8L+@=RFQQ&ISlXYEf+76GHcFIv zAKGz*+?xV6U;(YVu?)ZQMgbq;7%$O-G<0DFufj{NMn9h7i+=lqUr1Enrj_}Q7XGR> zO{ql}_-FyUmBlkhuy|x57Jj_P3>qj-j0bqE4YLht!*gY7i;ikh|4olx6SD9`S<5}(p?S@ya{qrH-g*2LU;sH7X;ylO RQ_%nb002ovPDHLkV1n`B>R12( literal 0 HcmV?d00001 diff --git a/apps/desktop/desktop/src/main/resources/images/chat/ignore/ignore-grey@2x.png b/apps/desktop/desktop/src/main/resources/images/chat/ignore/ignore-grey@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..0020c9cb99062454fbdb9cd90314a230216c3feb GIT binary patch literal 1177 zcmV;K1ZMk*P)6 z-nrg9R3Uy8C&fkLx}E4Ox{H2%&IY?~so2sGfo8TjuNQlnWQ6$GIsc8=CW?6>*B%kq zM7ig9NAaR~RrC>?MV`nNpEWd#ElJLJj$Ib-i6X?Mie=(FFLssj53xujbKh@bmFO#; z7vG8uUUFkY1X|FaBGzo#-eA(^;#09zydwU_3+dvx*e9yQlj0p>ZWuDK(ciUC(z>MdoElnUJtYUqZum^ zJyRUxL0((OvbPjj5khSS&kUd;)hp0M?G#PPs@V}Ho6cz79V~t!OU+Ab$Yj^%Fiwk7 zQS6zYh!nBgD=?ShY>Dwggh^5mV_Ex`I80_1vfQ?$M-d+IczQ?-d;cWnwB0Pn71*D# zEXo9ljQ=>t>PQ}o%^E6z&GW8E;+mU`Nio#sQpORkz-5e6#4{0YzKo#GKIg0q^(O8b zQHaeOgAn$wxE@7ZUwVK5#r&SY3aWepZ;%{elCQXKywAC7EORD>-nP1focoe62xnGH zOZdDv6o+n1Y-4LnBaTwSOcctt_ai*)0JYD$p~f8RiC{l#MXaV$dl!bQgH{T5Q8+E0 zp7xn+Kl^k$goN{U9SId+X){>zJV$hZW}+IAWmJcVJBe-TJH!)gTT^|m8B3QlQk)ZW zNwf|$y>rR(QFx{`E0jd?l#xt1gjZ9RbajETMFq!tKW?r2U<1UL$7TrXf9ocPz-e`0O5M zS!VaycF%_T^n0k68i1kPm%;HHv|7({zLFhhlQ+|w1Y$GW zDOOWLvZ$5$&iM=c?x>}hr;|jFdFH91i?K>@g>EMF6JrA*Fx_p0V-*<6%8;i9Qt3ys zg{6aET`b4TB@}bNpBULR!Y1@1xACZtK-a#5Vyb_81g26#uF&XOvHn5)9AT~?Ufhcp r=es8p;{P9v3ycel3;dr8yd%H>5F7(;Ku&Mw00000NkvXXu0mjff_W}b literal 0 HcmV?d00001 diff --git a/apps/desktop/desktop/src/main/resources/images/chat/ignore/ignore-white.png b/apps/desktop/desktop/src/main/resources/images/chat/ignore/ignore-white.png new file mode 100644 index 0000000000000000000000000000000000000000..ce1de50d9f96d6767c48373986ad0c1dd7da4f3b GIT binary patch literal 507 zcmVJNRCwC#)JrIYQ53-OnTaq9gvbU_ zl0;KNY)}fxMm9twtSl_lC>tvaQIbR!BC(Q`jb~DdydOJ?Jd3aqgI1E|~J{T z{d5ds4_l}}D0Xp$HzXhq=jcYyPfK1wEsD^JX@p}KcQ`<<&b${bxQ6Y!g!NcLvwpD< zk7(3{QMf@3x)6yDY@qHli!2%Ca3M+G#Wv1xf_xo|)wp;=T#AlWerz8fojPDM1O?$) z`*}FV00J?I5kss=Cn7o8WXWkd*-gXpeRa9gW{@lufgOE@c$~$aKC>;lUvj!Hh5*@Y zEA0Ayk18~vKu_Fih=0YnLx~WEt)|QmUDKfQW0<<=z7W=S_2Q4kT*5oQmjECaZ zu6xn1?|vA*MFwAT08vNZkJg;68;*qGcn8hLHFokIB;|Tu9!Wq_)>UmQS^#)Xw_2D zilw!rQc+StEfrKG_~MI3EtLo=p;SU76hSni#FAE!kl=#^p{=E~&ysldt*KH$8fz_8 zO&9w7Px7DSn#|05S_$HvcN*aFc(lLST4;Z{`33p~`UU>$0$a+T zhK2_Hd>F_Cso?pa7Uys{v;Zm8ia-|_0jj`Ku+PgFeZWv2yMqp(4txX^pcLE&<-bc{ zILHMPd48JSe5Kr%2xfvwAk4>S$^B=*VQ{fI0>uI-YAa|5K7fV%y$VDqeZ@m=a0@&E z?-|!UKrb*54B>Cxq~Auczo`Os>&Zb94DDCJA#jq@s9GCPV=>lLkPKp#ms<`_*$K4E zVo8#hhPF>23+$#iC)fhs0@-zZ+F~f7FdMEcpmRj^n7sFB$>o^fb$>(%&`fz zR6bLq2B%S=h&m2}nN>?{2Ajv@1jgheW~q2-J2P3eWjxOIQdQ)cM?hPUXH1e6oW7@^ zx6L4Ob2YQJGutG{*Mf8q2+F`LW~y%Acui>ZBGk>=xfn^ZQ}oWYAe8H*_&E}f!O+si_2W%~^UdO9~6VJtVggEoNGzq;Mh zxVt`}?B|YhH{(|N=&QtNdR^+|C2){+Rke5uNmANmX`N>FiQ$Vt-7*-s`YKVvFeqjm zT3IOffAXR;7>63yZrN&$<7Yw@SDbxnrvHjSy~w7~TgK#h$E{K&i+Lv|QAb0+GR{ag zJ#GBN$mdd8(G-EI4P&L3BpJ>i*DUJd6?(bIu>7f?7;_mq!JL(Z<_gp;n$ Date: Mon, 17 Jun 2024 09:19:18 +0200 Subject: [PATCH 09/18] Add undo ignore icon --- .../desktop/src/main/resources/css/images.css | 12 ++++++++++++ .../chat/undo-ignore/undo-ignore-green.png | Bin 0 -> 473 bytes .../chat/undo-ignore/undo-ignore-green@2x.png | Bin 0 -> 1011 bytes .../images/chat/undo-ignore/undo-ignore-grey.png | Bin 0 -> 473 bytes .../chat/undo-ignore/undo-ignore-grey@2x.png | Bin 0 -> 1007 bytes .../chat/undo-ignore/undo-ignore-white.png | Bin 0 -> 478 bytes .../chat/undo-ignore/undo-ignore-white@2x.png | Bin 0 -> 995 bytes 7 files changed, 12 insertions(+) create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/undo-ignore/undo-ignore-green.png create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/undo-ignore/undo-ignore-green@2x.png create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/undo-ignore/undo-ignore-grey.png create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/undo-ignore/undo-ignore-grey@2x.png create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/undo-ignore/undo-ignore-white.png create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/undo-ignore/undo-ignore-white@2x.png diff --git a/apps/desktop/desktop/src/main/resources/css/images.css b/apps/desktop/desktop/src/main/resources/css/images.css index 8b9a2e91b1..7dee31efc3 100644 --- a/apps/desktop/desktop/src/main/resources/css/images.css +++ b/apps/desktop/desktop/src/main/resources/css/images.css @@ -893,6 +893,18 @@ -fx-image: url("/images/chat/ignore/ignore-white.png"); } +#undo-ignore-green { + -fx-image: url("/images/chat/undo-ignore/undo-ignore-green.png"); +} + +#undo-ignore-grey { + -fx-image: url("/images/chat/undo-ignore/undo-ignore-grey.png"); +} + +#undo-ignore-white { + -fx-image: url("/images/chat/undo-ignore/undo-ignore-white.png"); +} + /* ------------------------------------------------------------------------------------ */ /* Markets */ diff --git a/apps/desktop/desktop/src/main/resources/images/chat/undo-ignore/undo-ignore-green.png b/apps/desktop/desktop/src/main/resources/images/chat/undo-ignore/undo-ignore-green.png new file mode 100644 index 0000000000000000000000000000000000000000..fe56973deacc7065a754f88b9c530fd4338283ee GIT binary patch literal 473 zcmV;~0Ve*5P)ZkS3S${nzi+^fE=} z;NYoGZ~f=(nP>UWI0J!zBb?!KggO3x!iZXLb*RtcPzN_sVTOH$Rm|h%Cl$710|Q9L z4X%-gA#9@UI|++$k4_9C1s?ctf+|%$hF;vEAXLKEpsLa_gL75u)7b->F@iKzyM>mI z8R}V&apdDbXWKZ_46W$LDb{hME|#$aKW0tBVRWD{C|NwR5o;TX`GO_%sR$FhDrDcx z*tA?6RFM^tcn-0!TO``ftU@YX8uT^6WS`LvdHYOfVH3q&Pp21Kt2Rb$nsl47LMr&h-N91rxvm zPzl2Ml1Hov6sK?E8@F*46IA}Q2)yGe1c7>R4K#ouU<-Y3nriNgAQr4*K&8-CLd^<{ z1W&;*u9`&WIgLP(&pbgM2n6H7Y!JaQvNC-@1)r(y7#PIoqv)Gat^|fNEr=cBs&%OP z_<}NC%PORUc2%Di2Gx4rm+LHsjEm>XI2ddZdIH5?s@O3ftkc>4G>$vLRWPywZhHVo zc99|Sd0j={{!5^P!QjuRN;8;jHQNl6=_y^Y+D0b-^AvZeR4q^(eGUU-p}{1+Oc@fj zttJK5fu9TvSEY3+r~z>xRVgrr?JXA*c(VQIX7%~O*2_fS3bye|fjMkffH4MxKQL&* z+z{tYVV}S^7kwp9Zs2vHQeZW6o`Y}TZ7@k0`^`5ga0%N|CUHHJTzZq&JDh%~^ob(Y zN6Bdq>2F%*jJ5+N1?I8cZ_p>0zUs%^yHzg_N-8+d#MuZ&YfN?>T;+kF++el6*f)SB zP0zohSxJJ~C&5)Ek)nPY3}o3_snJIw{t=h~UW1JcG^sw5dEd&~UB|MhWvO&8e{Sh? zv$Z%0WbsMYnjQo`&XLV=RUdUAE-p!*Ws2am0OZFJbb58484 hfwsW^T;Oj31^{nk&R=j6wE3wC6IVxg3x6s5_+in0(XxlCcjLRl%rPI9+#OHs&eLYi#G_pRUPbT~z3 zVd1Gyr`|a|^IYB;cPJEcMKV0D2*=+~80GW%oIXoH9lS_~8TJ)cF^89*RM?IU^dl8F zxJCg6v5B_tBrL%_Ix&DW_z}PfYE=0sdU1y$r-ZGRsxmQ+b5$GA*#nv}j0{z~g_e&Q z>RFF56yiW<+c?tZNR z{K?MFHamY5n9Ozv=np!;d(Z-&fLid}%;FA*A<2xNlI;Jn!&k!Q!j87g-f%mmZGK`Q4Da={xQr;aado56PA%e7vByb zk>Dv9POC|Dp4A8xx#tb?K@gY#W`hXM5zF)i6?~?aV_-0!kEU-%xl=HlX+h)=t=6F$ z;|I#v7b~QLcGZ{`2Gs^$m%A{A%!}vC*cfaPt`ro1sp7x_u-?V?r*Ym1T0u_=x$S`< z*-eHhV84pK{g;9^215X&DotmxHEc5srl)j;we>`P^AvZeRIQ*m`WyzvLY+nYm@*`4 zTMa5$2Yxaz+?Cd4pa#T&RHcG3Y;U?*z?kz9I%{T)s}RQg0Q z>!akfhx9isaYow#g9_%e-LEqyn7-=I+`G+H9+XsYj)}7ojL}%^8o0s(LAj2#eKlM@74*YAqLv^Y z0OB|=ocF);C3beziF!BK$Ks#NTgJ^(iokrGg$poLf`pDm*uv9EF zeF96Eov6imx-O^BRhs&$Ga>g#3A29)6_h;Ilh%=g?n`hVJU08;XtVx5XenqZXes!g dEBIT00RY>!%LmC@my`ei002ovPDHLkV1n`4*$n^y literal 0 HcmV?d00001 diff --git a/apps/desktop/desktop/src/main/resources/images/chat/undo-ignore/undo-ignore-white.png b/apps/desktop/desktop/src/main/resources/images/chat/undo-ignore/undo-ignore-white.png new file mode 100644 index 0000000000000000000000000000000000000000..da1d8f9a46bedc47fe743a488985b861d8ae4676 GIT binary patch literal 478 zcmV<40U`d0P)ZI4} zjait5g3%!mH+X5+eI>uZQ_F=^li(*%D`K65L zMTz#7w8kx(^cZQ_(O%rbA@(#;F)sCGwmaW)P}|`~cOb_|MJbjsiE*?b53AY*(u>VM zHFgEoP>oX@=q-tA89H=lXXw!#CcG&gJz^IckuBF0uQ<|Xe{j8e|Nn=-9$x|s030Zs UxLiqqSO5S307*qoM6N<$f<~RstN;K2 literal 0 HcmV?d00001 diff --git a/apps/desktop/desktop/src/main/resources/images/chat/undo-ignore/undo-ignore-white@2x.png b/apps/desktop/desktop/src/main/resources/images/chat/undo-ignore/undo-ignore-white@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..46c13238a95cda95eb6fd1e76550a0d116ab8f23 GIT binary patch literal 995 zcmV<9104K`P)`-<|(G_nvd_==Aw~j;?GjM;A9+pe@iAXbb$u)?NOz zwY7!%d_0)Mb|~lvet^&59e4>Ifx1uz4+{(XB``>v1D1n%V4%fk-h(UPG`JPampSFA zvlziOAP>YU?@5HJz(eo~G;-Sv1989&lG*p0_-zMAtwhj@z-+J!jO6Qk;1sybWmK&v z_@*(&2(Sp`fCO^D3GZmq_k zy+AX!z)En;V1;slhvFsUJ9PXGE0Y-qUTEz>*)Nq8=g|=-wt?bKnurtI2W~P_t4u0{ zhy6nL?J18qTIwW1!j0%=&Tr= zscelIEZ$NlZ-e8ktEx@m6)T&s>-lWS-`oeqHiIp^?>Sh8&N1Ul4W1jo`=3m7DbIQ_ zFEh2EGcK&^reDt)2PRJgkH97t^Jpef{{X*Qu84<`c66pd)h4sj&jeFJZyi4=(03W- zGG0`J`q31sK))rhUdA$Nkvwl(SpVMgWOyFxuR5pw|3O=zEzlPDp9}mczyO6Bm(ID- RhqeF!002ovPDHLkV1n;h$)o@P literal 0 HcmV?d00001 From d9247abd50488c9e8122bb9ed5509f43adca8aab Mon Sep 17 00:00:00 2001 From: axpoems <145597137+axpoems@users.noreply.github.com> Date: Mon, 17 Jun 2024 09:22:13 +0200 Subject: [PATCH 10/18] Use ignore and undo ingore icon in buttons --- .../main/content/chat/sidebar/UserProfileSidebar.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java index 3e8a1f072f..d9b733cab5 100644 --- a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java +++ b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java @@ -299,8 +299,10 @@ private View(Model model, Controller controller) { "channels-private-chats-grey", "channels-private-chats-white"); mention = new StandardButton(Res.get("chat.sideBar.userProfile.mention"), "mention-grey", "mention-white"); - ignore = new StandardButton(Res.get("chat.sideBar.userProfile.ignore"), "", ""); - undoIgnore = new StandardButton(Res.get("chat.sideBar.userProfile.undoIgnore"), "", ""); + ignore = new StandardButton(Res.get("chat.sideBar.userProfile.ignore"), + "ignore-grey", "ignore-white"); + undoIgnore = new StandardButton(Res.get("chat.sideBar.userProfile.undoIgnore"), + "undo-ignore-grey", "undo-ignore-white"); report = new StandardButton(Res.get("chat.sideBar.userProfile.report"), "report-grey", "report-white"); @@ -319,7 +321,7 @@ private View(Model model, Controller controller) { Region separator = Layout.hLine(); VBox.setMargin(separator, new Insets(20, -20, 10, -20)); - optionsVBox = new VBox(5, separator, privateMsg, mention, ignore, undoIgnore, report); + optionsVBox = new VBox(10, separator, privateMsg, mention, ignore, undoIgnore, report); optionsVBox.setAlignment(Pos.CENTER_LEFT); VBox.setMargin(header, new Insets(0, -20, 0, 0)); From 1d59689915e2009da1b909984d158582521071c5 Mon Sep 17 00:00:00 2001 From: axpoems <145597137+axpoems@users.noreply.github.com> Date: Mon, 17 Jun 2024 09:38:17 +0200 Subject: [PATCH 11/18] Refactor: Sort instantiations by UI column position --- .../chat/sidebar/UserProfileSidebar.java | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java index d9b733cab5..78ce096451 100644 --- a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java +++ b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java @@ -243,6 +243,7 @@ private View(Model model, Controller controller) { root.setMinWidth(260); root.setMaxWidth(260); + // Header Label headline = new Label(Res.get("chat.sideBar.userProfile.headline")); headline.setId("chat-sidebar-headline"); @@ -251,6 +252,7 @@ private View(Model model, Controller controller) { HBox.setMargin(closeButton, new Insets(10, 10, 0, 0)); HBox header = new HBox(headline, Spacer.fillHBox(), closeButton); + // Nickname, name and reputation nickName = new Label(); nickName.getStyleClass().add("chat-side-bar-user-profile-nickname"); if (controller.isUserProfileBanned()) { @@ -261,6 +263,11 @@ private View(Model model, Controller controller) { catIconImageView.setFitWidth(100); catIconImageView.setFitHeight(100); + reputationScoreDisplay = new ReputationScoreDisplay(); + reputationScoreDisplay.setAlignment(Pos.CENTER); + VBox.setMargin(reputationScoreDisplay, new Insets(0, 0, 5, 0)); + + // User profile details Pair botIdLabelAndButton = createAndGetProfileDetailsLabelAndButton(); botId = botIdLabelAndButton.getFirst(); botIdCopyButton = botIdLabelAndButton.getSecond(); @@ -276,13 +283,6 @@ private View(Model model, Controller controller) { VBox userProfileDetailsBox = new VBox(5, botId, userProfileId, addressByTransport); - Label reputationHeadline = new Label(Res.get("chat.sideBar.userProfile.reputation").toUpperCase()); - reputationHeadline.getStyleClass().add("chat-side-bar-user-profile-small-headline"); - reputationScoreDisplay = new ReputationScoreDisplay(); - reputationScoreDisplay.setAlignment(Pos.CENTER_LEFT); - VBox.setMargin(reputationScoreDisplay, new Insets(0, 0, 5, 0)); - VBox reputationBox = new VBox(5, reputationHeadline, reputationScoreDisplay); - Triple totalReputationScoreTriple = getInfoBox(Res.get("chat.sideBar.userProfile.totalReputationScore")); VBox totalReputationScoreBox = totalReputationScoreTriple.getThird(); totalReputationScore = totalReputationScoreTriple.getSecond(); @@ -295,17 +295,6 @@ private View(Model model, Controller controller) { VBox lastSeenBox = lastSeenTriple.getThird(); lastSeen = lastSeenTriple.getSecond(); - privateMsg = new StandardButton(Res.get("chat.sideBar.userProfile.sendPrivateMessage"), - "channels-private-chats-grey", "channels-private-chats-white"); - mention = new StandardButton(Res.get("chat.sideBar.userProfile.mention"), - "mention-grey", "mention-white"); - ignore = new StandardButton(Res.get("chat.sideBar.userProfile.ignore"), - "ignore-grey", "ignore-white"); - undoIgnore = new StandardButton(Res.get("chat.sideBar.userProfile.undoIgnore"), - "undo-ignore-grey", "undo-ignore-white"); - report = new StandardButton(Res.get("chat.sideBar.userProfile.report"), - "report-grey", "report-white"); - Triple statementTriple = getInfoBox(Res.get("chat.sideBar.userProfile.statement")); statementBox = statementTriple.getThird(); statement = statementTriple.getSecond(); @@ -319,6 +308,18 @@ private View(Model model, Controller controller) { terms.getStyleClass().add("chat-side-bar-user-profile"); termsBox = new VBox(7.5, termsHeadline, terms); + // Options + privateMsg = new StandardButton(Res.get("chat.sideBar.userProfile.sendPrivateMessage"), + "channels-private-chats-grey", "channels-private-chats-white"); + mention = new StandardButton(Res.get("chat.sideBar.userProfile.mention"), + "mention-grey", "mention-white"); + ignore = new StandardButton(Res.get("chat.sideBar.userProfile.ignore"), + "ignore-grey", "ignore-white"); + undoIgnore = new StandardButton(Res.get("chat.sideBar.userProfile.undoIgnore"), + "undo-ignore-grey", "undo-ignore-white"); + report = new StandardButton(Res.get("chat.sideBar.userProfile.report"), + "report-grey", "report-white"); + Region separator = Layout.hLine(); VBox.setMargin(separator, new Insets(20, -20, 10, -20)); optionsVBox = new VBox(10, separator, privateMsg, mention, ignore, undoIgnore, report); @@ -326,10 +327,9 @@ private View(Model model, Controller controller) { VBox.setMargin(header, new Insets(0, -20, 0, 0)); VBox.setMargin(nickName, new Insets(10, 0, 0, 0)); - VBox.setMargin(reputationBox, new Insets(4, 0, 0, 0)); root.getChildren().addAll(header, - nickName, catIconImageView, userProfileDetailsBox, - reputationBox, totalReputationScoreBox, profileAgeBox, lastSeenBox, statementBox, termsBox, + nickName, catIconImageView, reputationScoreDisplay, userProfileDetailsBox, + totalReputationScoreBox, profileAgeBox, lastSeenBox, statementBox, termsBox, optionsVBox); } From 38bd172a5c5ddbea8d089bb9266ba49c8e63695b Mon Sep 17 00:00:00 2001 From: axpoems <145597137+axpoems@users.noreply.github.com> Date: Mon, 17 Jun 2024 19:53:52 +0200 Subject: [PATCH 12/18] Use the same style for all the fields in user profile --- .../chat/sidebar/UserProfileSidebar.java | 102 ++++++++---------- .../desktop/src/main/resources/css/chat.css | 7 -- i18n/src/main/resources/chat.properties | 16 +-- 3 files changed, 56 insertions(+), 69 deletions(-) diff --git a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java index 78ce096451..94f01646d6 100644 --- a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java +++ b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java @@ -22,7 +22,6 @@ import bisq.chat.ChatChannelDomain; import bisq.chat.ChatMessage; import bisq.chat.ChatService; -import bisq.common.data.Pair; import bisq.common.data.Triple; import bisq.desktop.ServiceProvider; import bisq.desktop.common.Layout; @@ -31,7 +30,6 @@ import bisq.desktop.components.cathash.CatHash; import bisq.desktop.components.containers.Spacer; import bisq.desktop.components.controls.BisqIconButton; -import bisq.desktop.components.controls.BisqTooltip; import bisq.desktop.components.controls.StandardButton; import bisq.desktop.main.content.components.ReportToModeratorWindow; import bisq.desktop.main.content.components.ReputationScoreDisplay; @@ -53,16 +51,16 @@ import javafx.geometry.Insets; import javafx.geometry.Pos; import javafx.scene.control.Button; +import javafx.scene.control.ContentDisplay; import javafx.scene.control.Label; +import javafx.scene.control.ScrollPane; import javafx.scene.control.TextArea; -import javafx.scene.control.ContentDisplay; import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.layout.HBox; import javafx.scene.layout.Pane; import javafx.scene.layout.Region; import javafx.scene.layout.VBox; -import javafx.scene.text.TextAlignment; import lombok.Getter; import lombok.extern.slf4j.Slf4j; import org.fxmisc.easybind.EasyBind; @@ -135,12 +133,11 @@ public void onActivate() { String nickName = userProfile.getNickName(); model.nickName.set(isUserProfileBanned() ? Res.get("user.userProfile.userName.banned", nickName) : nickName); - model.nym.set(Res.get("chat.sideBar.userProfile.nym", userProfile.getNym())); - model.userProfileIdString.set(Res.get("chat.sideBar.userProfile.id", userProfile.getId())); + model.nym.set(userProfile.getNym()); + model.userProfileIdString.set(userProfile.getId()); model.catHashNode.set(CatHash.getImage(userProfile)); model.addressByTransport.set(userProfile.getAddressByTransportDisplayString(26)); - model.addressByTransportTooltip.set(userProfile.getAddressByTransportDisplayString()); model.statement.set(userProfile.getStatement()); model.terms.set(userProfile.getTerms()); @@ -205,7 +202,6 @@ private static class Model implements bisq.desktop.common.view.Model { private final StringProperty nickName = new SimpleStringProperty(); private final StringProperty nym = new SimpleStringProperty(); private final StringProperty addressByTransport = new SimpleStringProperty(); - private final StringProperty addressByTransportTooltip = new SimpleStringProperty(); private final StringProperty userProfileIdString = new SimpleStringProperty(); private final StringProperty statement = new SimpleStringProperty(); private final StringProperty terms = new SimpleStringProperty(); @@ -225,23 +221,24 @@ private Model(ChatService chatService, UserProfile userProfile, ChatChannel { private final ImageView catIconImageView; - private final Label nickName, botId, userProfileId, addressByTransport, statement, totalReputationScore, + private final Label nickName, botId, userId, addressByTransport, statement, totalReputationScore, profileAge, lastSeen; private final StandardButton privateMsg, mention, ignore, undoIgnore, report; private final VBox statementBox, termsBox, optionsVBox; private final ReputationScoreDisplay reputationScoreDisplay; private final TextArea terms; - private final BisqIconButton botIdCopyButton, userProfileIdCopyButton, addressByTransportCopyButton; + private final BisqIconButton botIdCopyButton, userIdCopyButton, addressByTransportCopyButton; private final Button closeButton; private Subscription catHashNodeSubscription; private View(Model model, Controller controller) { super(new VBox(15), model, controller); + double width = 260; root.setPadding(new Insets(0, 20, 20, 20)); root.setAlignment(Pos.TOP_CENTER); - root.setMinWidth(260); - root.setMaxWidth(260); + root.setMinWidth(width); + root.setMaxWidth(width); // Header Label headline = new Label(Res.get("chat.sideBar.userProfile.headline")); @@ -267,21 +264,24 @@ private View(Model model, Controller controller) { reputationScoreDisplay.setAlignment(Pos.CENTER); VBox.setMargin(reputationScoreDisplay, new Insets(0, 0, 5, 0)); - // User profile details - Pair botIdLabelAndButton = createAndGetProfileDetailsLabelAndButton(); - botId = botIdLabelAndButton.getFirst(); - botIdCopyButton = botIdLabelAndButton.getSecond(); - - Pair userProfileIdLabelAndButton = createAndGetProfileDetailsLabelAndButton(); - userProfileId = userProfileIdLabelAndButton.getFirst(); - userProfileIdCopyButton = userProfileIdLabelAndButton.getSecond(); - - Pair addressByTransportLabelAndButton = createAndGetProfileDetailsLabelAndButton(); - addressByTransport = addressByTransportLabelAndButton.getFirst(); - addressByTransport.setWrapText(true); - addressByTransportCopyButton = addressByTransportLabelAndButton.getSecond(); - - VBox userProfileDetailsBox = new VBox(5, botId, userProfileId, addressByTransport); + // User details + Triple botIdTriple = getInfoBox(Res.get("chat.sideBar.userProfile.nym")); + VBox botIdBox = botIdTriple.getThird(); + botIdCopyButton = createAndGetCopyButton(); + botId = botIdTriple.getSecond(); + botId.setGraphic(botIdCopyButton); + + Triple userIdTriple = getInfoBox(Res.get("chat.sideBar.userProfile.id")); + VBox userIdBox = userIdTriple.getThird(); + userIdCopyButton = createAndGetCopyButton(); + userId = userIdTriple.getSecond(); + userId.setGraphic(userIdCopyButton); + + Triple addressByTransportTriple = getInfoBox(Res.get("chat.sideBar.userProfile.transportAddress")); + VBox addressByTransportBox = addressByTransportTriple.getThird(); + addressByTransportCopyButton = createAndGetCopyButton(); + addressByTransport = addressByTransportTriple.getSecond(); + addressByTransport.setGraphic(addressByTransportCopyButton); Triple totalReputationScoreTriple = getInfoBox(Res.get("chat.sideBar.userProfile.totalReputationScore")); VBox totalReputationScoreBox = totalReputationScoreTriple.getThird(); @@ -308,6 +308,13 @@ private View(Model model, Controller controller) { terms.getStyleClass().add("chat-side-bar-user-profile"); termsBox = new VBox(7.5, termsHeadline, terms); + VBox content = new VBox(15, botIdBox, userIdBox, addressByTransportBox, + totalReputationScoreBox, profileAgeBox, lastSeenBox, statementBox, termsBox); + content.setMaxWidth(width - 15); // Remove the scrollbar + content.setPadding(new Insets(0, 10, 0, 20)); + ScrollPane scrollPane = new ScrollPane(content); + scrollPane.setMinWidth(width); + // Options privateMsg = new StandardButton(Res.get("chat.sideBar.userProfile.sendPrivateMessage"), "channels-private-chats-grey", "channels-private-chats-white"); @@ -321,27 +328,21 @@ private View(Model model, Controller controller) { "report-grey", "report-white"); Region separator = Layout.hLine(); - VBox.setMargin(separator, new Insets(20, -20, 10, -20)); + VBox.setMargin(separator, new Insets(-15, -20, 10, -20)); optionsVBox = new VBox(10, separator, privateMsg, mention, ignore, undoIgnore, report); optionsVBox.setAlignment(Pos.CENTER_LEFT); VBox.setMargin(header, new Insets(0, -20, 0, 0)); VBox.setMargin(nickName, new Insets(10, 0, 0, 0)); - root.getChildren().addAll(header, - nickName, catIconImageView, reputationScoreDisplay, userProfileDetailsBox, - totalReputationScoreBox, profileAgeBox, lastSeenBox, statementBox, termsBox, - optionsVBox); + root.getChildren().addAll(header, nickName, catIconImageView, reputationScoreDisplay, scrollPane, optionsVBox); } @Override protected void onViewAttached() { nickName.textProperty().bind(model.nickName); botId.textProperty().bind(model.nym); - botId.getTooltip().textProperty().bind(model.nym); - userProfileId.textProperty().bind(model.userProfileIdString); - userProfileId.getTooltip().textProperty().bind(model.userProfileIdString); + userId.textProperty().bind(model.userProfileIdString); addressByTransport.textProperty().bind(model.addressByTransport); - addressByTransport.getTooltip().textProperty().bind(model.addressByTransportTooltip); statement.textProperty().bind(model.statement); statementBox.visibleProperty().bind(model.statement.isEmpty().not()); statementBox.managedProperty().bind(model.statement.isEmpty().not()); @@ -375,9 +376,9 @@ protected void onViewAttached() { botId.setOnMouseEntered(e -> botIdCopyButton.setVisible(true)); botId.setOnMouseExited(e -> botIdCopyButton.setVisible(false)); botIdCopyButton.setOnMouseClicked(e -> ClipboardUtil.copyToClipboard(model.getUserProfile().getNym())); - userProfileId.setOnMouseEntered(e -> userProfileIdCopyButton.setVisible(true)); - userProfileId.setOnMouseExited(e -> userProfileIdCopyButton.setVisible(false)); - userProfileIdCopyButton.setOnMouseClicked(e -> ClipboardUtil.copyToClipboard(model.getUserProfile().getId())); + userId.setOnMouseEntered(e -> userIdCopyButton.setVisible(true)); + userId.setOnMouseExited(e -> userIdCopyButton.setVisible(false)); + userIdCopyButton.setOnMouseClicked(e -> ClipboardUtil.copyToClipboard(model.getUserProfile().getId())); addressByTransport.setOnMouseEntered(e -> addressByTransportCopyButton.setVisible(true)); addressByTransport.setOnMouseExited(e -> addressByTransportCopyButton.setVisible(false)); addressByTransportCopyButton.setOnMouseClicked(e -> @@ -395,11 +396,8 @@ protected void onViewAttached() { protected void onViewDetached() { nickName.textProperty().unbind(); botId.textProperty().unbind(); - botId.getTooltip().textProperty().unbind(); - userProfileId.textProperty().unbind(); - userProfileId.getTooltip().textProperty().unbind(); + userId.textProperty().unbind(); addressByTransport.textProperty().unbind(); - addressByTransport.getTooltip().textProperty().unbind(); statement.textProperty().unbind(); statementBox.visibleProperty().unbind(); statementBox.managedProperty().unbind(); @@ -422,9 +420,9 @@ protected void onViewDetached() { botId.setOnMouseEntered(null); botId.setOnMouseExited(null); botIdCopyButton.setOnMouseClicked(null); - userProfileId.setOnMouseEntered(null); - userProfileId.setOnMouseExited(null); - userProfileIdCopyButton.setOnMouseClicked(null); + userId.setOnMouseEntered(null); + userId.setOnMouseExited(null); + userIdCopyButton.setOnMouseClicked(null); addressByTransport.setOnMouseEntered(null); addressByTransport.setOnMouseExited(null); addressByTransportCopyButton.setOnMouseClicked(null); @@ -443,22 +441,16 @@ private static Triple getInfoBox(String title) { Label value = new Label(); value.setWrapText(true); value.getStyleClass().add("chat-side-bar-user-profile-small-value"); + value.setContentDisplay(ContentDisplay.RIGHT); VBox vBox = new VBox(2.5, headline, value); return new Triple<>(headline, value, vBox); } - private static Pair createAndGetProfileDetailsLabelAndButton() { - Label label = new Label(); - label.getStyleClass().add("chat-side-bar-user-profile-details"); - label.setTooltip(new BisqTooltip()); - label.setAlignment(Pos.CENTER_LEFT); - label.setTextAlignment(TextAlignment.LEFT); - label.setContentDisplay(ContentDisplay.RIGHT); + private static BisqIconButton createAndGetCopyButton() { BisqIconButton copyButton = new BisqIconButton(); copyButton.setIcon(AwesomeIcon.COPY); copyButton.setVisible(false); - label.setGraphic(copyButton); - return new Pair<>(label, copyButton); + return copyButton; } } } diff --git a/apps/desktop/desktop/src/main/resources/css/chat.css b/apps/desktop/desktop/src/main/resources/css/chat.css index a420b08395..80832563f7 100644 --- a/apps/desktop/desktop/src/main/resources/css/chat.css +++ b/apps/desktop/desktop/src/main/resources/css/chat.css @@ -359,13 +359,6 @@ -fx-text-fill: -fx-light-text-color; } -.chat-side-bar-user-profile-details { - -fx-fill: -fx-mid-text-color; - -fx-text-fill: -fx-mid-text-color; - -fx-font-family: "IBM Plex Sans Light"; - -fx-font-size: 0.9em; -} - .chat-side-bar-user-profile-small-headline { -fx-fill: -fx-mid-text-color; -fx-text-fill: -fx-mid-text-color; diff --git a/i18n/src/main/resources/chat.properties b/i18n/src/main/resources/chat.properties index e0ce012eb6..eb0f8b6e3e 100644 --- a/i18n/src/main/resources/chat.properties +++ b/i18n/src/main/resources/chat.properties @@ -155,24 +155,26 @@ chat.chatRules.content=\ By participating in the chat, you agree to follow these rules.\n\ Severe rule violations may lead to a ban from the Bisq network. + #################################################################### # Sidebar / user profile #################################################################### chat.sideBar.userProfile.headline=User profile -chat.sideBar.userProfile.nym=Bot ID: {0} -chat.sideBar.userProfile.id=ID: {0} -chat.sideBar.userProfile.sendPrivateMessage=Send private message -chat.sideBar.userProfile.reputation=Reputation +chat.sideBar.userProfile.nym=Bot id +chat.sideBar.userProfile.id=User id +chat.sideBar.userProfile.transportAddress=Transport address chat.sideBar.userProfile.totalReputationScore=Total reputation score chat.sideBar.userProfile.profileAge=Profile age chat.sideBar.userProfile.lastSeen=Last seen +chat.sideBar.userProfile.statement=Statement +chat.sideBar.userProfile.terms=Trade terms +chat.sideBar.userProfile.sendPrivateMessage=Send private message chat.sideBar.userProfile.mention=Mention chat.sideBar.userProfile.ignore=Ignore -chat.sideBar.userProfile.report=Report to moderator chat.sideBar.userProfile.undoIgnore=Undo ignore -chat.sideBar.userProfile.statement=Statement -chat.sideBar.userProfile.terms=Trade terms +chat.sideBar.userProfile.report=Report to moderator + #################################################################### # Sidebar / channel info From aaac2ec02f977d785ce83fd1c43b8a01ed5ab75a Mon Sep 17 00:00:00 2001 From: axpoems <145597137+axpoems@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:00:14 +0200 Subject: [PATCH 13/18] Add private chat icon --- .../content/chat/sidebar/UserProfileSidebar.java | 2 +- .../desktop/src/main/resources/css/images.css | 12 ++++++++++++ .../chat/private-chat/private-chat-green.png | Bin 0 -> 378 bytes .../chat/private-chat/private-chat-green@2x.png | Bin 0 -> 606 bytes .../chat/private-chat/private-chat-grey.png | Bin 0 -> 366 bytes .../chat/private-chat/private-chat-grey@2x.png | Bin 0 -> 584 bytes .../chat/private-chat/private-chat-white.png | Bin 0 -> 369 bytes .../chat/private-chat/private-chat-white@2x.png | Bin 0 -> 583 bytes 8 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/private-chat/private-chat-green.png create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/private-chat/private-chat-green@2x.png create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/private-chat/private-chat-grey.png create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/private-chat/private-chat-grey@2x.png create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/private-chat/private-chat-white.png create mode 100644 apps/desktop/desktop/src/main/resources/images/chat/private-chat/private-chat-white@2x.png diff --git a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java index 94f01646d6..e2d78feb63 100644 --- a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java +++ b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java @@ -317,7 +317,7 @@ private View(Model model, Controller controller) { // Options privateMsg = new StandardButton(Res.get("chat.sideBar.userProfile.sendPrivateMessage"), - "channels-private-chats-grey", "channels-private-chats-white"); + "private-chat-grey", "private-chat-white"); mention = new StandardButton(Res.get("chat.sideBar.userProfile.mention"), "mention-grey", "mention-white"); ignore = new StandardButton(Res.get("chat.sideBar.userProfile.ignore"), diff --git a/apps/desktop/desktop/src/main/resources/css/images.css b/apps/desktop/desktop/src/main/resources/css/images.css index 7dee31efc3..f44e3758bb 100644 --- a/apps/desktop/desktop/src/main/resources/css/images.css +++ b/apps/desktop/desktop/src/main/resources/css/images.css @@ -905,6 +905,18 @@ -fx-image: url("/images/chat/undo-ignore/undo-ignore-white.png"); } +#private-chat-green { + -fx-image: url("/images/chat/private-chat/private-chat-green.png"); +} + +#private-chat-grey { + -fx-image: url("/images/chat/private-chat/private-chat-grey.png"); +} + +#private-chat-white { + -fx-image: url("/images/chat/private-chat/private-chat-white.png"); +} + /* ------------------------------------------------------------------------------------ */ /* Markets */ diff --git a/apps/desktop/desktop/src/main/resources/images/chat/private-chat/private-chat-green.png b/apps/desktop/desktop/src/main/resources/images/chat/private-chat/private-chat-green.png new file mode 100644 index 0000000000000000000000000000000000000000..a69b8b5805f802f03dfbd3b788e6a6c9922794ce GIT binary patch literal 378 zcmV-=0fqjFP)_hzMWr z38K`2xE+XAqE10I1q0E;$J{~jYI>rp?YnB_$AE1l|cLfh)v1# z=@}qi0mP0l1C4=LkAk2J1>y_Hk@6LYzffQxNbh%K1OEXr2L%RlK+T|jvZ0xQj6nQ@ z0&{-A%z_!n1;jiQ7zonKiEQ9`AYMg*fgru-;8_op`+)ce5MPDnlr_-A4g!8a+zG^2 z@Z=PbIX=h+zJv<20dWwN4Kh#wh!+DfGc;Rb12=)V0%`^WBdGXdWMqWPhOP5}m1hP( zd;*A11F`+8pdAFuIgnZSlFbFE>+C>kDM^PguN44s8d>Eb8YqDlXA{YZZboWX0RRC8 Y0D(S0j3I>7ApigX07*qoM6N<$f=gJ94FCWD literal 0 HcmV?d00001 diff --git a/apps/desktop/desktop/src/main/resources/images/chat/private-chat/private-chat-green@2x.png b/apps/desktop/desktop/src/main/resources/images/chat/private-chat/private-chat-green@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..7600bf0d4cb5cbc3944c2721c3c5cb036b9e871c GIT binary patch literal 606 zcmV-k0-^nhP)!Tz@q9@!2Lqr9ctNH~`QO1UH~@3t zL4L8`d=xGi60Kkf$a41j-4zh9qFlEE_FaZwf(616~? zncJ%p%;5NJqu_JM)$Ke<96?9W5p)Fqo1mPvWZUTD37N=#6TIVCVWVI<#~YR4A;%#b z1!eC2Z#@ZO0rYY5IHH;p%059A5j{;JF~ZzWU{O`Ud(aKUQo|(oq8hkOteBfQ0?et? z;a*ii7aNu~u*|*jM|`hEsa_t2M+2r>-9I%=QnHwb_zJwn+A8FVl92lZ*I_h-hqV z1X1ch+z!ObB${y#h|7WaR(*Xv#6Tbr2jVS2{0oS$k!YYcRIe=%zl0gM5{N$lu_>88 zJp;rmfY=dcpfM2ZQ4n;YKzso?QoaK57YYmn>HUsu;6EVdpuj*5s2S8xHZ(Jk5r}_K zV9pPiSug{+fS88@13`K@kqtZ##H%PU5Ty4UJnI2LI1nEJ;;Yb{vId&iLBJ1)JAwEL zo}2fcP{J z+e5`EN;VguuCpW7FkA-0yjB3jX=Ig$XrKgIoJ}Mrx*4fm1povX0DovW#W6ZPbXFRCwC#n7vEGKp2Nxkt)@bhGq6*2zV`&@-jz)IaNAjN~$`BC|Jh9 zE_)L!y6!ee)CwL=SZYPe6-}CC7nl9F;JM5Xcm6@{9o&I6<~%a2i;E)5!YRgcqaCIJ zaKd9z-;RQGwLGXNzy+(pE6S$LzDa*8xB&J+BiI8YCftLj2zoeyR(ZY%Cc&HKdovZr zIS7CkiXGUtc~oHpIDtgndTqzk`=^2_7WiqGO;PDR*vk!`K|AF>-we(sdaVn72rvK` Wj9c;}LH8g40000_i1_{c zH;7UP;&vcbCee(0KwJ*Qw^&(O85luc1{x?16gUFJzkv7}i3Vyz9cBwO@FmQ^13&?8 zAT}k_r)PlpGtfXsn1P>x0(wAvpG*T4f%pQ@Kz>-Hd zHG}%ehGqsb0`U(D%=rN`3uYh}5c5!AAV@DKvVrG;cohW(g7lsPdlg4cSp&o?p^E*0 zxD$x4kdjkidASXU1E22@r!KX(Bn%%}DJk03g5s5{z4zR0Q@c P00000NkvXXu0mjfHW-A3 literal 0 HcmV?d00001 diff --git a/apps/desktop/desktop/src/main/resources/images/chat/private-chat/private-chat-white@2x.png b/apps/desktop/desktop/src/main/resources/images/chat/private-chat/private-chat-white@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..b314004957dacde11c21e27453053f372fb456f6 GIT binary patch literal 583 zcmV-N0=WH&P)lB1n2c z#8%Kk8_~kTOPVycYVEC+D0nNq6xM1bf(l|xVs<5Jk{f7*nkO$iFa&6U^#f zV%UL?2}yCjIWuQ7XLZvwwQ3%9T9uDLu;vBptq+AlLH@oC%z_x`0u3(3&x1Q~0k*)C z^+PBW`kHmCiY37~*aOWTC+h`FgHu_sbc==DG3CUnhJYa!;t~d9h*&L*9hZgV3`Q~C zQ*H^Ydz`^#umWB|2Qv6rn!$O>C4G<+V-=+6Fr%vCG0xjQ7VReIm}-kfMTNP7oKJ!V zw>Xb2ZY&kF{*-l}AAKgPSP%Y50>MBq5DWzWncy4eCLeta=_310@PTu$kAgj%(<;Ff z=LH`Ht=Q)(!5!Wt#zDddxddYihh3Fm7EJLrvBp&lf{2S!5ynU|rb&ma>OLs`UGQTDeZ zAmhZ|muoxij0tc>xogU1oIa$#6|K=cg;HBj!Q5A z-YItE_QTO`k!Y+m(YM~XDP|Rk-3+GL;Ab?CMx|%4n=g3!y_753;^4wstAd{b3; literal 0 HcmV?d00001 From 43c0586c0bac840341802a012b07b2edec7e558f Mon Sep 17 00:00:00 2001 From: axpoems <145597137+axpoems@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:16:16 +0200 Subject: [PATCH 14/18] Use common style for terms --- .../chat/sidebar/UserProfileSidebar.java | 25 +++++++------------ 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java index e2d78feb63..2325ee5c06 100644 --- a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java +++ b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java @@ -54,13 +54,9 @@ import javafx.scene.control.ContentDisplay; import javafx.scene.control.Label; import javafx.scene.control.ScrollPane; -import javafx.scene.control.TextArea; import javafx.scene.image.Image; import javafx.scene.image.ImageView; -import javafx.scene.layout.HBox; -import javafx.scene.layout.Pane; -import javafx.scene.layout.Region; -import javafx.scene.layout.VBox; +import javafx.scene.layout.*; import lombok.Getter; import lombok.extern.slf4j.Slf4j; import org.fxmisc.easybind.EasyBind; @@ -222,11 +218,10 @@ private Model(ChatService chatService, UserProfile userProfile, ChatChannel { private final ImageView catIconImageView; private final Label nickName, botId, userId, addressByTransport, statement, totalReputationScore, - profileAge, lastSeen; + profileAge, lastSeen, terms; private final StandardButton privateMsg, mention, ignore, undoIgnore, report; private final VBox statementBox, termsBox, optionsVBox; private final ReputationScoreDisplay reputationScoreDisplay; - private final TextArea terms; private final BisqIconButton botIdCopyButton, userIdCopyButton, addressByTransportCopyButton; private final Button closeButton; private Subscription catHashNodeSubscription; @@ -239,6 +234,7 @@ private View(Model model, Controller controller) { root.setAlignment(Pos.TOP_CENTER); root.setMinWidth(width); root.setMaxWidth(width); + VBox.setVgrow(root, Priority.ALWAYS); // Header Label headline = new Label(Res.get("chat.sideBar.userProfile.headline")); @@ -299,21 +295,18 @@ private View(Model model, Controller controller) { statementBox = statementTriple.getThird(); statement = statementTriple.getSecond(); - Label termsHeadline = new Label(Res.get("chat.sideBar.userProfile.terms").toUpperCase()); - termsHeadline.getStyleClass().add("chat-side-bar-user-profile-small-headline"); - terms = new TextArea(); - terms.setMaxWidth(root.getMaxWidth() - 40); - terms.setMaxHeight(100); - terms.setWrapText(true); - terms.getStyleClass().add("chat-side-bar-user-profile"); - termsBox = new VBox(7.5, termsHeadline, terms); + Triple termsTriple = getInfoBox(Res.get("chat.sideBar.userProfile.terms")); + termsBox = termsTriple.getThird(); + terms = termsTriple.getSecond(); VBox content = new VBox(15, botIdBox, userIdBox, addressByTransportBox, totalReputationScoreBox, profileAgeBox, lastSeenBox, statementBox, termsBox); content.setMaxWidth(width - 15); // Remove the scrollbar - content.setPadding(new Insets(0, 10, 0, 20)); + content.setPadding(new Insets(0, 10, 20, 20)); ScrollPane scrollPane = new ScrollPane(content); scrollPane.setMinWidth(width); + VBox.setVgrow(content, Priority.ALWAYS); + VBox.setVgrow(scrollPane, Priority.ALWAYS); // Options privateMsg = new StandardButton(Res.get("chat.sideBar.userProfile.sendPrivateMessage"), From c97c9ab988d7e0d186f687b5a60177afd1b83f67 Mon Sep 17 00:00:00 2001 From: axpoems <145597137+axpoems@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:17:17 +0200 Subject: [PATCH 15/18] Refactor: rename StandardButton to MenuItem --- .../{StandardButton.java => MenuItem.java} | 4 ++-- .../content/chat/sidebar/UserProfileSidebar.java | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) rename apps/desktop/desktop/src/main/java/bisq/desktop/components/controls/{StandardButton.java => MenuItem.java} (92%) diff --git a/apps/desktop/desktop/src/main/java/bisq/desktop/components/controls/StandardButton.java b/apps/desktop/desktop/src/main/java/bisq/desktop/components/controls/MenuItem.java similarity index 92% rename from apps/desktop/desktop/src/main/java/bisq/desktop/components/controls/StandardButton.java rename to apps/desktop/desktop/src/main/java/bisq/desktop/components/controls/MenuItem.java index 2dd220a9c1..a7cbe478ad 100644 --- a/apps/desktop/desktop/src/main/java/bisq/desktop/components/controls/StandardButton.java +++ b/apps/desktop/desktop/src/main/java/bisq/desktop/components/controls/MenuItem.java @@ -21,11 +21,11 @@ import javafx.scene.control.Button; import javafx.scene.image.ImageView; -public class StandardButton extends Button { +public class MenuItem extends Button { private final ImageView defaultIcon, activeIcon; private ImageView buttonIcon; - public StandardButton(String text, String defaultIconId, String activeIconId) { + public MenuItem(String text, String defaultIconId, String activeIconId) { defaultIcon = ImageUtil.getImageViewById(defaultIconId); activeIcon = ImageUtil.getImageViewById(activeIconId); buttonIcon = defaultIcon; diff --git a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java index 2325ee5c06..7713c06625 100644 --- a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java +++ b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java @@ -30,7 +30,7 @@ import bisq.desktop.components.cathash.CatHash; import bisq.desktop.components.containers.Spacer; import bisq.desktop.components.controls.BisqIconButton; -import bisq.desktop.components.controls.StandardButton; +import bisq.desktop.components.controls.MenuItem; import bisq.desktop.main.content.components.ReportToModeratorWindow; import bisq.desktop.main.content.components.ReputationScoreDisplay; import bisq.i18n.Res; @@ -219,7 +219,7 @@ public static class View extends bisq.desktop.common.view.View Date: Mon, 17 Jun 2024 20:30:45 +0200 Subject: [PATCH 16/18] Fix paddings --- .../desktop/main/content/chat/sidebar/UserProfileSidebar.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java index 7713c06625..a6ac012695 100644 --- a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java +++ b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/chat/sidebar/UserProfileSidebar.java @@ -230,7 +230,7 @@ private View(Model model, Controller controller) { super(new VBox(15), model, controller); double width = 260; - root.setPadding(new Insets(0, 20, 20, 20)); + root.setPadding(new Insets(0, 20, 0, 20)); root.setAlignment(Pos.TOP_CENTER); root.setMinWidth(width); root.setMaxWidth(width); @@ -324,6 +324,7 @@ private View(Model model, Controller controller) { VBox.setMargin(separator, new Insets(-15, -20, 10, -20)); optionsVBox = new VBox(10, separator, privateMsg, mention, ignore, undoIgnore, report); optionsVBox.setAlignment(Pos.CENTER_LEFT); + optionsVBox.setPadding(new Insets(0, 0, 20, 0)); VBox.setMargin(header, new Insets(0, -20, 0, 0)); VBox.setMargin(nickName, new Insets(10, 0, 0, 0)); From eebe8f22ae1d1719227e91f379f1b3aa42169faf Mon Sep 17 00:00:00 2001 From: axpoems <145597137+axpoems@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:32:54 +0200 Subject: [PATCH 17/18] Rename css comments with MenuItem --- apps/desktop/desktop/src/main/resources/css/controls.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/desktop/desktop/src/main/resources/css/controls.css b/apps/desktop/desktop/src/main/resources/css/controls.css index 8dc44a37a4..6381a794cc 100644 --- a/apps/desktop/desktop/src/main/resources/css/controls.css +++ b/apps/desktop/desktop/src/main/resources/css/controls.css @@ -891,7 +891,7 @@ /******************************************************************************* * * - * Standard Button * + * Menu Item * * * ******************************************************************************/ From f2d182451a1260995ab2ff9092efda2bd819d186 Mon Sep 17 00:00:00 2001 From: axpoems <145597137+axpoems@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:49:16 +0200 Subject: [PATCH 18/18] Rename css class --- .../main/java/bisq/desktop/components/controls/MenuItem.java | 2 +- apps/desktop/desktop/src/main/resources/css/controls.css | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/desktop/desktop/src/main/java/bisq/desktop/components/controls/MenuItem.java b/apps/desktop/desktop/src/main/java/bisq/desktop/components/controls/MenuItem.java index a7cbe478ad..07742302d3 100644 --- a/apps/desktop/desktop/src/main/java/bisq/desktop/components/controls/MenuItem.java +++ b/apps/desktop/desktop/src/main/java/bisq/desktop/components/controls/MenuItem.java @@ -33,7 +33,7 @@ public MenuItem(String text, String defaultIconId, String activeIconId) { setText(text); setGraphic(buttonIcon); setGraphicTextGap(10); - getStyleClass().add("standard-button"); + getStyleClass().add("menu-item"); attachListeners(); } diff --git a/apps/desktop/desktop/src/main/resources/css/controls.css b/apps/desktop/desktop/src/main/resources/css/controls.css index 6381a794cc..c94a2a1e3b 100644 --- a/apps/desktop/desktop/src/main/resources/css/controls.css +++ b/apps/desktop/desktop/src/main/resources/css/controls.css @@ -895,7 +895,7 @@ * * ******************************************************************************/ -.standard-button { +.button.menu-item { -fx-padding: 0; -fx-border-width: 0; -fx-background-color: transparent; @@ -903,7 +903,7 @@ -fx-text-fill: -fx-mid-text-color; } -.standard-button:hover { +.button.menu-item:hover { -fx-background-color: transparent; -fx-text-fill: -fx-light-text-color; }