@@ -21,6 +21,7 @@ import useSWR from 'swr';
2121import { InternalChannels } from '@gitroom/frontend/components/launches/internal.channels' ;
2222import { createPortal } from 'react-dom' ;
2323import clsx from 'clsx' ;
24+ import Image from 'next/image' ;
2425
2526class Empty {
2627 @IsOptional ( )
@@ -91,7 +92,7 @@ export const withProvider = function <T extends object>(params: {
9192 dummy,
9293 setChars,
9394 setComments,
94- setHide
95+ setHide,
9596 } = useLaunchStore (
9697 useShallow ( ( state ) => ( {
9798 date : state . date ,
@@ -141,7 +142,9 @@ export const withProvider = function <T extends object>(params: {
141142 }
142143
143144 if ( current ) {
144- setComments ( typeof params . comments === 'undefined' ? true : params . comments ) ;
145+ setComments (
146+ typeof params . comments === 'undefined' ? true : params . comments
147+ ) ;
145148 setEditor ( selectedIntegration ?. integration . editor ) ;
146149 setPostComment ( postComment ) ;
147150 setTotalChars (
@@ -258,7 +261,12 @@ export const withProvider = function <T extends object>(params: {
258261 } }
259262 >
260263 < FormProvider { ...form } >
261- < div className = { clsx ( 'border border-borderPreview rounded-[12px] shadow-previewShadow' , ! current && 'hidden' ) } >
264+ < div
265+ className = { clsx (
266+ 'border border-borderPreview rounded-[12px] shadow-previewShadow' ,
267+ ! current && 'hidden'
268+ ) }
269+ >
262270 { current &&
263271 ( tab === 0 ||
264272 ( ! SettingsComponent && ! data ?. internalPlugs ?. length ) ) &&
@@ -303,19 +311,45 @@ export const withProvider = function <T extends object>(params: {
303311 ) ) }
304312 { ( SettingsComponent || ! ! data ?. internalPlugs ?. length ) &&
305313 createPortal (
306- < div data-id = { props . id } className = "hidden" >
314+ < div data-id = { props . id } className = { isGlobal ? 'bg-newSettings pb-[12px] px-[12px]' : 'hidden bg-newSettings px-[12px] pb-[12px]' } >
315+ { isGlobal && (
316+ < style > { `#wrapper-settings {display: flex !important} #social-empty {display: block !important;}` } </ style >
317+ ) }
318+ { isGlobal && (
319+ < div className = "flex py-[20px] items-center gap-[15px]" >
320+ < div className = "relative" >
321+ < Image
322+ alt = { selectedIntegration ?. integration . name ! }
323+ width = { 42 }
324+ height = { 42 }
325+ className = "min-w-[42px] min-h-[42px] w-[42px] h-[42px] rounded-full"
326+ src = { selectedIntegration ?. integration . picture }
327+ />
328+ < Image
329+ alt = { selectedIntegration ?. integration . identifier }
330+ width = { 16 }
331+ height = { 16 }
332+ className = "rounded-[16px] min-w-[16px] min-h-[16px] w-[16px] h-[16px] absolute bottom-0 end-0"
333+ src = { `/icons/platforms/${ selectedIntegration ?. integration . identifier } .png` }
334+ />
335+ </ div >
336+ < div className = "text-[20px]" > { selectedIntegration ?. integration . name } </ div >
337+ </ div >
338+ ) }
307339 < SettingsComponent />
308340 { ! ! data ?. internalPlugs ?. length && ! dummy && (
309341 < InternalChannels plugs = { data ?. internalPlugs } />
310342 ) }
311343 </ div > ,
312- document . querySelector ( '#social-settings' ) || document . createElement ( 'div' )
344+ document . querySelector ( '#social-settings' ) ||
345+ document . createElement ( 'div' )
313346 ) }
314347 { current &&
315348 ! SettingsComponent &&
316349 createPortal (
317350 < style > { `#wrapper-settings {display: none !important;} #social-empty {display: block !important;}` } </ style > ,
318- document . querySelector ( '#social-settings' ) || document . createElement ( 'div' )
351+ document . querySelector ( '#social-settings' ) ||
352+ document . createElement ( 'div' )
319353 ) }
320354 </ div >
321355 </ FormProvider >
0 commit comments