index.tsx 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. import { useTranslation } from 'react-i18next'
  2. import s from './style.module.css'
  3. import Button from '@/app/components/base/button'
  4. import { Grid01 } from '@/app/components/base/icons/src/vender/solid/layout'
  5. import { Container, Database01 } from '@/app/components/base/icons/src/vender/line/development'
  6. import { ImagePlus } from '@/app/components/base/icons/src/vender/line/images'
  7. import { useProviderContext } from '@/context/provider-context'
  8. import { Plan } from '@/app/components/billing/type'
  9. const CustomAppHeaderBrand = () => {
  10. const { t } = useTranslation()
  11. const { plan } = useProviderContext()
  12. return (
  13. <div className='py-3'>
  14. <div className='mb-2 text-sm font-medium text-gray-900'>{t('custom.app.title')}</div>
  15. <div className='relative mb-4 rounded-xl bg-gray-100 border-[0.5px] border-black/8 shadow-xs'>
  16. <div className={`${s.mask} absolute inset-0 rounded-xl`}></div>
  17. <div className='flex items-center pl-5 h-14 rounded-t-xl'>
  18. <div className='relative flex items-center mr-[199px] w-[120px] h-10 bg-[rgba(217,45,32,0.12)]'>
  19. <div className='ml-[1px] mr-[3px] w-[34px] h-[34px] border-8 border-black/[0.16] rounded-full'></div>
  20. <div className='text-[13px] font-bold text-black/[0.24]'>YOUR LOGO</div>
  21. <div className='absolute top-0 bottom-0 left-0.5 w-[0.5px] bg-[#F97066] opacity-50'></div>
  22. <div className='absolute top-0 bottom-0 right-0.5 w-[0.5px] bg-[#F97066] opacity-50'></div>
  23. <div className='absolute left-0 right-0 top-0.5 h-[0.5px] bg-[#F97066] opacity-50'></div>
  24. <div className='absolute left-0 right-0 bottom-0.5 h-[0.5px] bg-[#F97066] opacity-50'></div>
  25. </div>
  26. <div className='flex items-center mr-3 px-3 h-7 rounded-xl bg-white shadow-xs'>
  27. <Grid01 className='shrink-0 mr-2 w-4 h-4 text-[#155eef]' />
  28. <div className='w-12 h-1.5 rounded-[5px] bg-[#155eef] opacity-80'></div>
  29. </div>
  30. <div className='flex items-center mr-3 px-3 h-7'>
  31. <Container className='shrink-0 mr-2 w-4 h-4 text-gray-500' />
  32. <div className='w-[50px] h-1.5 rounded-[5px] bg-gray-300'></div>
  33. </div>
  34. <div className='flex items-center px-3 h-7'>
  35. <Database01 className='shrink-0 mr-2 w-4 h-4 text-gray-500' />
  36. <div className='w-14 h-1.5 rounded-[5px] bg-gray-300 opacity-80'></div>
  37. </div>
  38. </div>
  39. <div className='h-8 border-t border-t-gray-200 rounded-b-xl'></div>
  40. </div>
  41. <div className='flex items-center mb-2'>
  42. <Button
  43. disabled={plan.type === Plan.sandbox}
  44. >
  45. <ImagePlus className='mr-2 w-4 h-4' />
  46. {t('custom.upload')}
  47. </Button>
  48. <div className='mx-2 h-5 w-[1px] bg-black/5'></div>
  49. <Button
  50. disabled={plan.type === Plan.sandbox}
  51. >
  52. {t('custom.restore')}
  53. </Button>
  54. </div>
  55. <div className='text-xs text-gray-500'>{t('custom.app.changeLogoTip')}</div>
  56. </div>
  57. )
  58. }
  59. export default CustomAppHeaderBrand