Skip to content

Commit

Permalink
Merge branch 'development' of github.com:TogetherCrew/frontend into d…
Browse files Browse the repository at this point in the history
…evelopment
  • Loading branch information
mehdi-torabiv committed Jan 9, 2025
2 parents afcd7b8 + 77e6574 commit 7e8e990
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,27 @@ function TcDiscordIntegrationSettingsDialog({
onClick={() => handlePatchDiscordIntegrationSettings()}
/>
</div>
<Typography variant='body1' pt={2} color='textSecondary'>
Need help? View our{' '}
<a
href='https://togethercrew.gitbook.io/onboarding/fundamentals/adding-platforms/discord'
target='_blank'
rel='noreferrer'
className='text-secondary underline'
>
documentation
</a>{' '}
or contact our{' '}
<a
href='https://www.togethercrew.com/contact-us'
target='_blank'
rel='noreferrer'
className='text-secondary underline'
>
support team
</a>
.
</Typography>
</div>
</TcDialog>
<TcDialog
Expand Down
53 changes: 38 additions & 15 deletions src/components/communitySettings/communityPlatforms/TcDiscourse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,20 +261,43 @@ function TcDiscourse({
)}
</div>
{!activePlatform && (
<div className='flex items-center justify-between px-5'>
<TcButton
className='w-1/3'
text='Cancel'
variant='outlined'
onClick={() => setIsOpen(false)}
/>
<TcButton
className='w-1/3'
text={isCreatePlatformLoading ? 'Confirming...' : 'Confirm'}
variant='contained'
disabled={!!urlError || !url || isCreatePlatformLoading}
onClick={handleCreateNewPlatform}
/>
<div className='px-5'>
<div className='flex items-center justify-between'>
<TcButton
className='w-1/3'
text='Cancel'
variant='outlined'
onClick={() => setIsOpen(false)}
/>
<TcButton
className='w-1/3'
text={isCreatePlatformLoading ? 'Confirming...' : 'Confirm'}
variant='contained'
disabled={!!urlError || !url || isCreatePlatformLoading}
onClick={handleCreateNewPlatform}
/>
</div>
<Typography variant='body1' pt={2} color='textSecondary'>
Need help? View our{' '}
<a
href='https://togethercrew.gitbook.io/onboarding/fundamentals/adding-platforms/discourse'
target='_blank'
rel='noreferrer'
className='text-secondary underline'
>
documentation
</a>{' '}
or contact our{' '}
<a
href='https://www.togethercrew.com/contact-us'
target='_blank'
rel='noreferrer'
className='text-secondary underline'
>
support team
</a>
.
</Typography>
</div>
)}
</div>
Expand Down Expand Up @@ -303,7 +326,7 @@ function TcDiscourse({
<div className='mx-auto text-center md:w-4/5'>
<TcText text='Are you sure you want to disconnect?' variant='h6' />
</div>
<div className='flex flex-col justify-between space-y-4 pb-8 md:flex-row md:space-y-0 md:space-x-5 md:py-12'>
<div className='flex flex-col justify-between space-y-4 pb-8 md:flex-row md:space-x-5 md:space-y-0 md:py-12'>
<div className='space-y-4 rounded-md px-4 py-6 shadow-xl'>
<TcText
text='Disconnect and delete data'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { StorageService } from '@/services/StorageService';
import { IntegrationPlatform } from '@/utils/enums';

import TcCommunityPlatformIcon from '../TcCommunityPlatformIcon';
import { isProduction } from '@/rainbowKitConfig';

interface TcTelegramIntegrationDialogProps {
isOpen: boolean;
Expand Down Expand Up @@ -166,32 +167,44 @@ const TcTelegramIntegrationDialog: React.FC<
<DialogContent>
<Stack spacing={2}>
<Stack spacing={1}>
<Alert severity='warning' sx={{ borderRadius: 1 }}>
<b>Note:</b> Activity in your telegram group will be analysed from
the moment you complete this setup. Previous activity can not be
analysed.
</Alert>
<Typography variant='body1' className='font-bold'>
Step 1: Add the bot
</Typography>
<Alert
severity='info'
sx={{
borderRadius: 1,
}}
>
To add the bot, you must have the <b>"Add New Admins"</b>{' '}
privilege.
</Alert>
<Stack pl={2}>
<ol className='list-decimal'>
<li>
Add <b className='text-secondary'>@TogetherCrewBot</b> to your
group or channel.
Add{' '}
<b className='text-secondary'>
{isProduction
? '@TogetherCrewBot'
: '@TogetherCrewStagingBot'}
</b>{' '}
to your telegram group or channel.
</li>
<li>
Enable <b>Admin Rights</b> and disable other privileges.
Find the bot in your list of members and right click then
select <b>promote to admin</b>, then remove all permissions.
</li>
<li>
Press <b>Add Bot as Admin</b> and confirm.
In the chat of your telegram group, copy the command below to
verify the bot.
</li>
</ol>
</Stack>
<Alert
severity='info'
sx={{
borderRadius: 1,
}}
>
<b>Note:</b> To add the bot, you must have the "Add New Admins"
privilege.
</Alert>
</Stack>
<Stack spacing={1}>
<Typography variant='body1' className='font-bold'>
Expand Down Expand Up @@ -276,11 +289,21 @@ const TcTelegramIntegrationDialog: React.FC<
)}
<Typography variant='body1' color='textSecondary'>
Need help? View our{' '}
<a href='/documentation' className='text-secondary underline'>
<a
href='https://togethercrew.gitbook.io/onboarding/fundamentals/adding-platforms/telegram'
target='_blank'
rel='noreferrer'
className='text-secondary underline'
>
documentation
</a>{' '}
or contact our{' '}
<a href='/support' className='text-secondary underline'>
<a
href='https://www.togethercrew.com/contact-us'
target='_blank'
rel='noreferrer'
className='text-secondary underline'
>
support team
</a>
.
Expand Down
2 changes: 1 addition & 1 deletion src/rainbowKitConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { http } from 'wagmi';

import { conf } from './configs';

const isProduction = conf.IS_MAINNET === 'true';
export const isProduction = conf.IS_MAINNET === 'true';

export const SUPPORTED_CHAINS: Chain[] = isProduction
? [arbitrum]
Expand Down

0 comments on commit 7e8e990

Please sign in to comment.