From 1ba551b88b872c47d379362abb3fee459061d733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sun, 3 Apr 2022 19:27:08 +0200 Subject: [PATCH 1/4] styles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/components/ui/column/column.tsx | 8 +- .../directory/components/account_card.js | Bin 3773 -> 3774 bytes .../export_data/components/csv_exporter.js | Bin 1376 -> 1384 bytes app/soapbox/features/filters/index.js | Bin 10998 -> 10494 bytes .../import_data/components/csv_importer.js | Bin 2133 -> 1919 bytes app/soapbox/features/ui/index.js | Bin 28653 -> 28631 bytes app/styles/about.scss | 2 +- app/styles/components/directory.scss | 9 ++- app/styles/components/filters.scss | 69 +++++++++--------- app/styles/components/radio-button.scss | 15 ++-- app/styles/components/server-info.scss | 3 +- 11 files changed, 56 insertions(+), 50 deletions(-) diff --git a/app/soapbox/components/ui/column/column.tsx b/app/soapbox/components/ui/column/column.tsx index c66a57326d..c647aa1f3c 100644 --- a/app/soapbox/components/ui/column/column.tsx +++ b/app/soapbox/components/ui/column/column.tsx @@ -1,3 +1,4 @@ +import classNames from 'classnames'; import React from 'react'; import { useHistory } from 'react-router-dom'; @@ -10,10 +11,11 @@ interface IColumn { label?: string, transparent?: boolean, withHeader?: boolean, + className?: string, } const Column: React.FC = React.forwardRef((props, ref: React.ForwardedRef): JSX.Element => { - const { backHref, children, label, transparent = false, withHeader = true } = props; + const { backHref, children, label, transparent = false, withHeader = true, className } = props; const history = useHistory(); @@ -32,11 +34,11 @@ const Column: React.FC = React.forwardRef((props, ref: React.ForwardedR const renderChildren = () => { if (transparent) { - return
{children}
; + return
{children}
; } return ( - + {withHeader ? ( diff --git a/app/soapbox/features/directory/components/account_card.js b/app/soapbox/features/directory/components/account_card.js index b40d851905b7099efef2363c6236066984043df0..83a48b256b6787fd85f71785b5352af29fc5c7e2 100644 GIT binary patch delta 17 YcmdlhyH9q502fP0YDLLrVXjpy05-`5rvLx| delta 16 XcmdldyH|FD02gygX4z&Du2n1mFzE$F diff --git a/app/soapbox/features/export_data/components/csv_exporter.js b/app/soapbox/features/export_data/components/csv_exporter.js index 87ca8ba5039d363ec35571571963c97aa4d74b71..bd47b83fbd0bbe98d984c642af535c0538992dda 100644 GIT binary patch delta 326 zcmaFB^@3}{JzJ;Jl9K#99R;`iqFe~+m|T*XpI5A-5RzI^qEM@lR+OKspkADxSdf%o zp`VZAuLU6pbKibxN5loP!?Qv delta 311 zcmaFC^?+-_JkY7}yTasCllRBA^Mb9e32uW>9W*LH~ zpkPygMQcW8UWo#Tm>kHW>s5fFKB=^%BtK6f4{Q~Lqpna=Spc*c#zS%oR5gUsoxFp^ haPn&w18W<7hzP=D8+{~)*MH!sG77-NXvemh2q?9jFEeLnAf-sjubty|mISGHdS zCSta!*5}QJqE?7*)@{M9hMtUi^{f7H}Fw-5d#L<48U(ubL&5DRSF?<+0KdS7Sv5PIb z79g{B)0wa81W+oH+)X0H(rjX6sPot;!~3C>_z*WAnUK9~q#5qJkYYG7p4u1pIquc_6Zh&B68qQtmhf-`Nf$Tas}-hVHGQ!}-FSjxure|L zT10?`5M_d=#RR;Q(lAX$KNTbN2>akIjk)5#(0|w9u#}(%hr65&=@6K~1HIW62QQ^- zjPpwp7$<`SA14IQP}uDmV((RF=Sr}Sc!@OY)Ki5eb_cuZc6ZsGwGcw$ zf1vU--b_5`$peJ5(UTXW@#YEjFEDyhFaDUFUD^^8-E8vSzBk|dzV~)!eqH=_`R*^c z)Nu{IbWF^02rVgfL&XcaSs!hFozo1PIG+m&R%L6^)NO-hv5G6?jHw&4-q7Ijfx^A- zGvV=Zk-k!eD7t2e%Zf^{X~C0@w2x)rbw}>zysp}H4K15`9p!1*R>X>4H*^ha#Gg`0H=3=gGbn!n z-@;~ol!G8Aj3Xq9XmVn@P@tI!RMl-K#iCQkCf(>H3tJAP#6_YkIbE1K;b9sW*Jy5M zll#%dvrgKS6TC`bB|QS#!2o;=1$$cap5x$M7R`-Wm=M~eHD*W}R`YX|z4a8A*)PBZ z$%-YFRV>f0FH5S0H{5klj|{X{%#)S_v?%m-i><$ailZ=5CNjc39xdJMxWLX!aI-bo}s<=`s>#Nw>FKa7u1Nx5o z{31iZb~XgTp}tN>0+YQJ8G+U4Rc8%6%f{NK2%I3Wu4p%KK8Bd@%*l$SnSV#%;i>04 zGkcv#(doBz2ZUr3zaV6qcug4e@W+|`ANFj##a)ZHxF31`zwz@PZ_eZ7;bFq9@i#62 zpN9SLJJAjPWNL5LYz{&q2W!bB>+eCb$gDGq_g>7IMPR_q@6~npPJrRp1{OVR1|ALc zz~=$JS)(fzXTDQo+Vk6M_>-Y4t@D6TkzO&*t%S)OxBsY|wh7TS)V3|kZp1ZXhN;vg za}80bZRC-6G*d?;SuSa~F|vVlZC+I>H8{faJ|xom@L^CGD~j!hw#ixi>zeW^PVYQV HpE~phRS2;f diff --git a/app/soapbox/features/import_data/components/csv_importer.js b/app/soapbox/features/import_data/components/csv_importer.js index c0cc0114f994a02dbf9a982cc8e2a37b067ddc67..ff17cade40b579ccceedceb6d304215711039e65 100644 GIT binary patch delta 468 zcmZutyH3L}6cwVh2q8d%70I0pRVyz{$f;BYMkaRTByMBXj-&X7rbrdPfaJA*!6&e> zGqNK-fQ^R}S5%Se;ad0loO6%Q+tKgA)B6xz6#zQzqidZjUq=xLoti$n{t7^OB(y?zd*t(c~t<9z3argb{A|gO&YFg umFX(YhPKZfc{ipAl>nEI-<9P;v3!nQqJ8_(xxgO0=2NmkmJ&PKJ^2GS&5$tw delta 611 zcmaKq!Aiq09L5pX4vMI-!<2c5sFcY{JqcnrJWWKa=_`^fL3-^=f-!_QL(fD2601f9?{ldZ|vWtdSJKSoey90@WO!$@LA#SBakW>PW==%`aOxIhk4-LS|)f~7lE sdczGR1!IfZyp&@C`M_0`>XB{E)Pr5$2z=8}@xPciH4imr?l`&g0}WWT!2kdN diff --git a/app/soapbox/features/ui/index.js b/app/soapbox/features/ui/index.js index 8f3caa2f580ffb5d3d4df96289003dde64dcee02..400cac95a608ce6c3b1963598aae35aaa9a0108f 100644 GIT binary patch delta 64 zcmaERpYi&A#tq#(ysi}m`9&ozi6x0TTnd}#@to40%&#aqS-^^Oa+ihs Date: Sun, 3 Apr 2022 19:33:56 +0200 Subject: [PATCH 2/4] Conditionally display some hotkeys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- .../features/ui/components/hotkeys_modal.js | Bin 6728 -> 0 bytes .../features/ui/components/hotkeys_modal.tsx | 159 ++++++++++++++++++ 2 files changed, 159 insertions(+) delete mode 100644 app/soapbox/features/ui/components/hotkeys_modal.js create mode 100644 app/soapbox/features/ui/components/hotkeys_modal.tsx diff --git a/app/soapbox/features/ui/components/hotkeys_modal.js b/app/soapbox/features/ui/components/hotkeys_modal.js deleted file mode 100644 index 08dd211993c3363e5e5fe72071a898c377ef9264..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6728 zcmeHM!H(ND5WV{=2Dvyv*Xw&Dy9E{~8Wbslpg@lXC5~;z5~+x!cMW6zy+ew&*OI(( zfN?JAX)W@Re2+7nA!k)po5sPX#?=4pYP7IyOa(Z&m-xvy_+SXHQJ-Na>HwM4gqaiv&}ouADE$Qs_d&bz4*oDrC7eU~5v>&~gy)w_ zPZWV@=z-fFJ{l>?Bgh(2=jLg8T*gkl3V3{qdL=G}FCF}TT5?pB!dm##xDD=XI~_hb z)Y8HQef!Y}z&hbn0b$459h||Qnt{}~^4HVO-kUtAyI1xze)XzBc^6?uKa|GeOXSk) zqJw)T?f?z3!RGC|v_fIDb+Cst1*xBbTPu4X$k;d{jB&ov@HQ?6kVR$b1HdU);%uMw zwp+>Bm^LCeqLB-`CMPMpv-fKhQt8zg(her;%*KBuEF7_8n9iS%3nh-Tefn|enI93E zR9lEf_*+ys8%Nt&oK(TGiv@`#W4Q5Y0EvlC_p&9l1&-%!p|$BYMdqGsrr{6G*HfEN*BZ6Ky4>}ZIYZ79 zd!n}9Dt&Di_c>9n*eF-z3d-m~(y0%GcjULpG7Ri%HuiKrm#V}b`!}@Zrbd0BZbMiJ z$TzKfF^E{QiCBuQ@r`nQ8Do-Bstt8;IS#V1ZZlUed_`XmIgO2S&PF*m#uBk^#BGmf z>|)zy3b84y+(8U7hD`+>Sfs-^pdxyF%_>B&(GKJm6-p&8b5GsZT7lwbH`-HExIVp1 z06%qZdt$SnGpkjJi?xyxhtmaJSRSX;kKpLO2RW{lmhkW|Unp2}tFfr9a%!vGaN0ge z`cBvURs#1a2d3z-VH4)-!Q)k#ErPGx4# WN)y>M{sW=?eD|KJ_s^rz^XNaWqF_t_ diff --git a/app/soapbox/features/ui/components/hotkeys_modal.tsx b/app/soapbox/features/ui/components/hotkeys_modal.tsx new file mode 100644 index 0000000000..50845ea59e --- /dev/null +++ b/app/soapbox/features/ui/components/hotkeys_modal.tsx @@ -0,0 +1,159 @@ +import React from 'react'; +import { FormattedMessage } from 'react-intl'; + +import { Modal } from 'soapbox/components/ui'; +import { useAppSelector } from 'soapbox/hooks'; +import { getFeatures } from 'soapbox/utils/features'; + +interface IHotkeysModal { + onClose: () => void, +} + +const HotkeysModal: React.FC = ({ onClose }) => { + const features = useAppSelector((state) => getFeatures(state.instance)); + + return ( + } + onClose={onClose} + > +
+ + + + + + + + + + + + + + + + + + + + + + + + {features.emojiReacts && ( + + + + + )} + + + + + + + + + + + + + +
r
m
p
f
e
b
enter, o
a
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
x
h
up, k
down, j
n
alt + n
backspace
s
esc
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
g + h
g + n
g + f
g + p
g + u
g + b
g + m
g + r
?
+
+
+ ); +}; + +export default HotkeysModal; From 52ddbcdb730d78c49dff0a08514636170d3ba162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sun, 3 Apr 2022 19:39:36 +0200 Subject: [PATCH 3/4] styles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/styles/components/status.scss | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/app/styles/components/status.scss b/app/styles/components/status.scss index 331217824a..5edbe2e52d 100644 --- a/app/styles/components/status.scss +++ b/app/styles/components/status.scss @@ -406,15 +406,9 @@ } .status__content__spoiler-link { - background: var(--brand-color--med); + @apply bg-primary-100 dark:bg-primary-900 hover:bg-primary-300 dark:hover:bg-primary-600 focus:bg-primary-200 dark:focus:bg-primary-600 text-black dark:text-white hover:no-underline; transition: 0.2s; - &:hover, - &:focus { - background: hsla(var(--brand-color_hsl), 0.5); - text-decoration: none; - } - &::-moz-focus-inner { border: 0; } From 1f697dd8f26d03e5f9d414ff496e2e1f8f06d1ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sun, 3 Apr 2022 19:40:06 +0200 Subject: [PATCH 4/4] hotkeys modal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- .../features/ui/components/hotkeys_modal.tsx | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/app/soapbox/features/ui/components/hotkeys_modal.tsx b/app/soapbox/features/ui/components/hotkeys_modal.tsx index 50845ea59e..5203e0e5c8 100644 --- a/app/soapbox/features/ui/components/hotkeys_modal.tsx +++ b/app/soapbox/features/ui/components/hotkeys_modal.tsx @@ -68,14 +68,18 @@ const HotkeysModal: React.FC = ({ onClose }) => { - - x - - - - h - - + {features.spoilers && ( + + x + + + )} + {features.spoilers && ( + + h + + + )} up, k