From 2d7b82ab904dc1221c499b35c1405b699489f309 Mon Sep 17 00:00:00 2001 From: duckietm Date: Wed, 17 Apr 2024 14:14:23 +0200 Subject: [PATCH] Updates: small updates --- src/assets/images/fusion/background.png | Bin 1930 -> 0 bytes src/assets/images/fusion/cards/card-close.png | Bin 2417 -> 0 bytes src/assets/images/fusion/cards/yellow-bg.png | Bin 1930 -> 0 bytes src/assets/images/fusion/friends/online.png | Bin 294 -> 0 bytes src/assets/images/fusion/friends/search.png | Bin 1399 -> 0 bytes src/common/Button.tsx | 9 ++++-- src/common/card/tabs/NitroCardTabsView.tsx | 2 +- .../draggable-window/DraggableWindow.tsx | 26 +++++++++++------- .../layout/LayoutNotificationAlertView.tsx | 5 ++-- src/components/friends/FriendsView.scss | 20 +++++++++++++- .../views/friends-bar/FriendBarItemView.tsx | 6 ++-- 11 files changed, 48 insertions(+), 20 deletions(-) delete mode 100644 src/assets/images/fusion/background.png delete mode 100644 src/assets/images/fusion/cards/card-close.png delete mode 100644 src/assets/images/fusion/cards/yellow-bg.png delete mode 100644 src/assets/images/fusion/friends/online.png delete mode 100644 src/assets/images/fusion/friends/search.png diff --git a/src/assets/images/fusion/background.png b/src/assets/images/fusion/background.png deleted file mode 100644 index 01ad341ca14855099de02d6d98d3a4c45c12216a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1930 zcmcIkZA{!`94})ELU@VHsdIC+Xg1Ay?X`DYTR2{J$KV2G2)B)WAo9>YJsR%Xt}Sq& z34{fsF}fEsU&vS((JgMq5lsL!b0(TC0T&XZ%mg)rsX@0nqJEf*QJ=!yZ800+i%r@- zFTdya|NUQ{|BLl?RXJH3vM>zG2~`Ih&_4~mYckiM@A}J+8EC#m4Fu{N#rkk18Njfu zhmIU5uKBEGUHSBb88rjAXW?e-qjlSl%nz34SG+y8>2UPo{+q+08^8UzFn=K5_fOxi zxw*N2_vQA_{jk$0IJ$8ovG(Mb?9j8%Pn~Uv3PZauH4TJDcJ+=w(LDY7)R}P8@g1*T zd-{z?-I?*cgKvet=w18VxkBvwU+PYN4c(`}3D07>XN1eE_@>-=hs~K^KidC6?f!|3 zZQiTn6(#9EO)Ng#a_>MdcEa>;{(MWz%gxgn>7Qn0jbk+z_G}m)QW`s$(wXCw`sX3uZ>YH-oMk=-2^f1cI$UPqC;yOVOVy7 z^QK{gM<2qld#mQ#Za8>pb zd%Pko8Ufg*R`-~&v8OI9^|VX8Oq7-4C2;`}#GnoEcr2<}LflU*@d{|{EK>x&1hL!w zM1^AzZxZYAfNny($VHP9O*6QUce#r^Y!ST;XK03|XohmLB<&VxpTID9;vtYVQ&xnA z;EseXH1iW}wrvO$)z#JI>SA5G8KK-f&pR9pLm~ueb!#?=lbThSWC%h_GF8J?bq#kI zL951C*h zDnSM|SRGiGRi%41P*D^@nq>n`f}xAq=(~*NZ|Hzq}R6&iUoSm30Ymq+%qreTbJ~Bn~h< z;FToXPE$p92SjgYbyUfSQBhch;XDkgc}SBU;N!?vhLuT~mwYUw6_)j|1TIU0qMI>* zDn*Tf2&4=xLg2U51oWtGin@$qj?lN(L#RQTx}rwWMxs$V<&KOaC#zKp<+eLZ9%^ z-vXU0i(g%3{IB8@p_STz7J;a{QiS6U<@BND#8Cgu+0x!^Ju3-EjnEmUIxw1~dN|Y& ywTU|P1+E|mb@%*Gup*rKrZiV~Z1RsQmmk5h!|C5ul^l;btv^&*7kqDfOaH&rdxLub diff --git a/src/assets/images/fusion/cards/card-close.png b/src/assets/images/fusion/cards/card-close.png deleted file mode 100644 index e3b32a9610a93d1e5adddf4cf6cfb9b3c32c265e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2417 zcmcIle^?Xe9lsP2ivzUKRjbTflz}`R_am2(9EK1HmJ||G2#QZdIWCuQBgw_P0|K&| z;pl9gN~NqFfIln$7w`ROIuK5Clb;vrT#6Uk9GJ8PmaUYI36of)t5dW~MFQVzXx< znGlrpM&tIhoR5p+GWws3$f<+LYmYo9;+8cIH>J-q?mZU2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OO0#f1m&W diff --git a/src/assets/images/fusion/friends/search.png b/src/assets/images/fusion/friends/search.png deleted file mode 100644 index 81deba3ecaee5ec58bdd6ea13e0c1c0d6b65f1d5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1399 zcmb7EZA{!`94{Q418)Y=$T&&v~iaO0)Dj!QU34&p9zA@thkxO!Y$+ad>< z31Jc0G`hqk+>9o~n7I#VaB<*EqFW3DvN(-XbjA-(r|~r^A2t&g@hRgN9~Kguw9oVW zpa1XofA5j*uDv@e-IWM}?2L8r3Ak3%_{cx$ZqDiYqOIyRD0gyIXO93>N z69+&7i1Nr2%b*!S9A}i?q?L?!vXYkbinfk7pVJ{4L7H3gx+rCVg{HuOqDHVk-v1Co z6*+?K55&p1&Vh{5F=~LG(XL);G%GPO*0Kj}&a;pp2P_fI=LS`i%}20xUKZ|cF@d4$ zDpodv-E=A$??ySz0BF!l;u1*)(GcUMg8opz*ND<2O%WtbPyw8x*Z|E^K6K;3pfy8I zvk6|f_J(Z5jTqRtXk-Dbq96{MVErN1cH<# zV|-h0{_E6@wY3&U0J+m!AqYZyki?qC%cttUJ6X~{H#b8byz$HT^ZK<5m+JoIj??s* zOXjb;PuI6DBwrbS=#xpYYNGx~7OigiprP~1w{m~sf$`L?PhG-H-{HDa|MbWK*TF*< z`kWIlW~at}=)-EArJX-boc*Zm@f}T%IJn&MUb=rvbLJIn5woZVF!`pWU_uW!|sy^!jkUPnq$Fd*5-&OKUa0dcXHe^xdN+SKWnLo$K#~^KuVm*%xd7&r9<;4?O$Om+Qq-w-aq~y D8j03C diff --git a/src/common/Button.tsx b/src/common/Button.tsx index e93039d..0fe8695 100644 --- a/src/common/Button.tsx +++ b/src/common/Button.tsx @@ -12,13 +12,16 @@ export interface ButtonProps extends FlexProps export const Button: FC = props => { - const { variant = 'primary', size = 'sm', active = false, disabled = false, classNames = [], ...rest } = props; + const { variant = 'primary', size = 'sm', active = false, disabled = false, classNames = [], outline = false, tp = false, ...rest } = props; const getClassNames = useMemo(() => { const newClassNames: string[] = [ 'btn' ]; - if(variant) newClassNames.push('btn-' + variant); + if(outline && variant) newClassNames.push('btn-outline-' + variant) + else if (variant) newClassNames.push('btn-' + variant); + + if (tp) newClassNames.push('btn-transparent'); if(size) newClassNames.push('btn-' + size); @@ -29,7 +32,7 @@ export const Button: FC = props => if(classNames.length) newClassNames.push(...classNames); return newClassNames; - }, [ variant, size, active, disabled, classNames ]); + }, [ variant, size, active, disabled, classNames, outline ]); return ; } diff --git a/src/common/card/tabs/NitroCardTabsView.tsx b/src/common/card/tabs/NitroCardTabsView.tsx index a365872..ddc89a6 100644 --- a/src/common/card/tabs/NitroCardTabsView.tsx +++ b/src/common/card/tabs/NitroCardTabsView.tsx @@ -3,7 +3,7 @@ import { Flex, FlexProps } from '../..'; export const NitroCardTabsView: FC = props => { - const { justifyContent = 'center', gap = 1, classNames = [], children = null, ...rest } = props; + const { justifyContent = 'start', gap = 1, classNames = [], children = null, ...rest } = props; const getClassNames = useMemo(() => { diff --git a/src/common/draggable-window/DraggableWindow.tsx b/src/common/draggable-window/DraggableWindow.tsx index 286d51d..076f67e 100644 --- a/src/common/draggable-window/DraggableWindow.tsx +++ b/src/common/draggable-window/DraggableWindow.tsx @@ -2,10 +2,11 @@ import { MouseEventType, TouchEventType } from '@nitrots/nitro-renderer'; import { CSSProperties, FC, Key, MouseEvent as ReactMouseEvent, ReactNode, TouchEvent as ReactTouchEvent, useCallback, useEffect, useRef, useState } from 'react'; import { createPortal } from 'react-dom'; import { Base } from '..'; -import { GetLocalStorage, SetLocalStorage, WindowSaveOptions } from '../../api'; +import { GetLocalStorage, WindowSaveOptions } from '../../api'; import { DraggableWindowPosition } from './DraggableWindowPosition'; const CURRENT_WINDOWS: HTMLElement[] = []; +const POS_MEMORY: Map = new Map(); const BOUNDS_THRESHOLD_TOP: number = 0; const BOUNDS_THRESHOLD_LEFT: number = 0; @@ -138,15 +139,9 @@ export const DraggableWindow: FC = props => setOffset({ x: offsetX, y: offsetY }); setIsDragging(false); - if(uniqueKey !== null) - { - const newStorage = { ...GetLocalStorage(`nitro.windows.${ uniqueKey }`) } as WindowSaveOptions; - - newStorage.offset = { x: offsetX, y: offsetY }; - - SetLocalStorage(`nitro.windows.${ uniqueKey }`, newStorage); - } - }, [ dragHandler, delta, offset, uniqueKey ]); + if(uniqueKey !== null) POS_MEMORY.set(uniqueKey, { + x: offsetX, y: offsetY }); + }, [ dragHandler, delta, offset, uniqueKey ]); const onDragMouseUp = useCallback((event: MouseEvent) => { @@ -193,6 +188,17 @@ export const DraggableWindow: FC = props => element.style.left = 50 + offsetLeft + 'px'; break; } + + if(uniqueKey !== null) + { + const memory = POS_MEMORY.get(uniqueKey); + + if(memory) + { + offsetX = memory.x; + offsetY = memory.y; + } + } setDelta({ x: 0, y: 0 }); setOffset({ x: offsetX, y: offsetY }); diff --git a/src/common/layout/LayoutNotificationAlertView.tsx b/src/common/layout/LayoutNotificationAlertView.tsx index 8db771a..1671b00 100644 --- a/src/common/layout/LayoutNotificationAlertView.tsx +++ b/src/common/layout/LayoutNotificationAlertView.tsx @@ -1,4 +1,4 @@ -import { FC, useMemo } from 'react'; +import { FC, ReactNode, useMemo } from 'react'; import { NotificationAlertType } from '../../api'; import { NitroCardContentView, NitroCardHeaderView, NitroCardView, NitroCardViewProps } from '../card'; @@ -11,7 +11,7 @@ export interface LayoutNotificationAlertViewProps extends NitroCardViewProps export const LayoutNotificationAlertView: FC = props => { - const { title = '', onClose = null, classNames = [], children = null,type = NotificationAlertType.DEFAULT, ...rest } = props; + const { title = '', onClose = null, classNames = [], children = null,type = NotificationAlertType.DEFAULT, options = null, ...rest } = props; const getClassNames = useMemo(() => { @@ -30,6 +30,7 @@ export const LayoutNotificationAlertView: FC = { children } + { options } ); } diff --git a/src/components/friends/FriendsView.scss b/src/components/friends/FriendsView.scss index b4f69e1..6c355eb 100644 --- a/src/components/friends/FriendsView.scss +++ b/src/components/friends/FriendsView.scss @@ -124,9 +124,10 @@ position: relative; padding-left:38px; text-align: left; + pointer-events: all; &.friend-bar-item-active { - margin-bottom:21px; + } &.friend-bar-search-item-active { @@ -177,6 +178,23 @@ } } +.friends-myinfo { + > :first-child { + border-bottom: 1px dashed white; + } + + .myinfo-avatar { + height: 60px; + width: 60px; + display: flex; + justify-content: center; + + .avatar-image { + margin-top: -17px; + } + } +} + .nitro-friends-messenger { width: $messenger-width; height: $messenger-height; diff --git a/src/components/friends/views/friends-bar/FriendBarItemView.tsx b/src/components/friends/views/friends-bar/FriendBarItemView.tsx index 4d0f485..c5db1e3 100644 --- a/src/components/friends/views/friends-bar/FriendBarItemView.tsx +++ b/src/components/friends/views/friends-bar/FriendBarItemView.tsx @@ -49,10 +49,10 @@ export const FriendBarItemView: FC<{ friend: MessengerFriend }> = props => return (
setVisible(prevValue => !prevValue) }>
0 ? 'avatar': 'group' }` }> - { (friend.id > 0) && } - 0) && } + 0 ? friend.figure : (friend.id <= 0 && friend.figure === 'ADM') ? 'ha-3409-1413-70.lg-285-89.ch-3032-1334-109.sh-3016-110.hd-185-1359.ca-3225-110-62.wa-3264-62-62.fa-1206-90.hr-3322-1403' : friend.figure - } isgroup={friend.id <= 0 ? 1 : 0} direction={friend.id > 0 ? 2 : 3} /> + } isgroup={friend.id <= 0 ? 1 : 0} direction={isVisible ? 2 : 3} />
{ friend.name }