index.tsx 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. className={`
  44. !h-8 !px-3 bg-white !text-[13px]
  45. ${plan.type === Plan.sandbox ? 'opacity-40' : ''}
  46. `}
  47. disabled={plan.type === Plan.sandbox}
  48. >
  49. <ImagePlus className='mr-2 w-4 h-4' />
  50. {t('custom.upload')}
  51. </Button>
  52. <div className='mx-2 h-5 w-[1px] bg-black/5'></div>
  53. <Button
  54. className={`
  55. !h-8 !px-3 bg-white !text-[13px]
  56. ${plan.type === Plan.sandbox ? 'opacity-40' : ''}
  57. `}
  58. disabled={plan.type === Plan.sandbox}
  59. >
  60. {t('custom.restore')}
  61. </Button>
  62. </div>
  63. <div className='text-xs text-gray-500'>{t('custom.app.changeLogoTip')}</div>
  64. </div>
  65. )
  66. }
  67. export default CustomAppHeaderBrand