@@ -28,11 +28,11 @@ import { editProfileModal, onionPathModal } from '../../state/ducks/modalDialog'
28
28
29
29
// tslint:disable-next-line: no-import-side-effect no-submodule-imports
30
30
31
- import { ipcRenderer } from 'electron' ;
31
+ import { ipcRenderer , shell } from 'electron' ;
32
32
import { loadDefaultRooms } from '../../session/apis/open_group_api/opengroupV2/ApiUtil' ;
33
33
import { getOpenGroupManager } from '../../session/apis/open_group_api/opengroupV2/OpenGroupManagerV2' ;
34
34
import { getSwarmPollingInstance } from '../../session/apis/snode_api' ;
35
- import { UserUtils } from '../../session/utils' ;
35
+ import { ToastUtils , UserUtils } from '../../session/utils' ;
36
36
import { Avatar , AvatarSize } from '../avatar/Avatar' ;
37
37
import { ActionPanelOnionStatusLight } from '../dialog/OnionStatusPathDialog' ;
38
38
import { SessionIconButton } from '../icon' ;
@@ -75,6 +75,9 @@ const Section = (props: { type: SectionType }) => {
75
75
usePrimaryColor : true ,
76
76
dispatch,
77
77
} ) ;
78
+ } else if ( type === SectionType . Communities ) {
79
+ void shell . openExternal ( 'https://sessioncommunities.online' ) ;
80
+ ToastUtils . pushToastSuccess ( 'launch' , window . i18n ( 'launchingCommunityBrowser' ) )
78
81
} else if ( type === SectionType . PathIndicator ) {
79
82
// Show Path Indicator Modal
80
83
dispatch ( onionPathModal ( { } ) ) ;
@@ -121,6 +124,16 @@ const Section = (props: { type: SectionType }) => {
121
124
isSelected = { isSelected }
122
125
/>
123
126
) ;
127
+ case SectionType . Communities :
128
+ return (
129
+ < SessionIconButton
130
+ iconSize = "medium"
131
+ dataTestId = "communities-section"
132
+ iconType = { 'communities' }
133
+ onClick = { handleClick }
134
+ isSelected = { isSelected }
135
+ />
136
+ ) ;
124
137
case SectionType . PathIndicator :
125
138
return (
126
139
< ActionPanelOnionStatusLight
@@ -293,6 +306,7 @@ export const ActionsPanel = () => {
293
306
< Section type = { SectionType . Profile } />
294
307
< Section type = { SectionType . Message } />
295
308
< Section type = { SectionType . Settings } />
309
+ < Section type = { SectionType . Communities } />
296
310
< Section type = { SectionType . PathIndicator } />
297
311
< Section type = { SectionType . ColorMode } />
298
312
</ LeftPaneSectionContainer >
0 commit comments