app-tutor-ai-consumer 1.19.0 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
# [1.20.0](https://github.com/Hotmart-Org/app-tutor-ai-consumer/compare/v1.19.0...v1.20.0) (2025-07-29)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
- add generic error page ([2ac19d0](https://github.com/Hotmart-Org/app-tutor-ai-consumer/commit/2ac19d0d033731508580778dcf679fb9c71ca24f))
|
|
6
|
+
|
|
1
7
|
# [1.19.0](https://github.com/Hotmart-Org/app-tutor-ai-consumer/compare/v1.18.2...v1.19.0) (2025-07-29)
|
|
2
8
|
|
|
3
9
|
### Features
|
package/package.json
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<svg width="160" height="160" viewBox="0 0 160 160" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<circle opacity="0.5" cx="80" cy="80" r="80" fill="#282C2F"/>
|
|
3
|
+
<g filter="url(#filter0_d_22198_69476)">
|
|
4
|
+
<path d="M32.8 47.9999C32.8 47.1162 33.5164 46.3999 34.4 46.3999H125.6C126.484 46.3999 127.2 47.1162 127.2 47.9999V55.9999H32.8V47.9999Z" fill="#464B52"/>
|
|
5
|
+
<path d="M32.8 56H127.2V112C127.2 112.884 126.484 113.6 125.6 113.6H34.4001C33.5164 113.6 32.8 112.884 32.8 112V56Z" fill="white"/>
|
|
6
|
+
<rect width="11.2" height="3.2" rx="1.6" transform="matrix(1 0 0 -1 74.3999 91.2)" fill="#C9CED4"/>
|
|
7
|
+
<rect width="4" height="4" rx="2" transform="matrix(1 0 0 -1 68 81.6001)" fill="#C9CED4"/>
|
|
8
|
+
<rect width="4" height="4" rx="2" transform="matrix(1 0 0 -1 88 81.6001)" fill="#C9CED4"/>
|
|
9
|
+
</g>
|
|
10
|
+
<rect width="3.2" height="3.2" rx="1.6" transform="matrix(1 0 0 -1 36 52.8)" fill="#E37570"/>
|
|
11
|
+
<rect width="3.2" height="3.2" rx="1.6" transform="matrix(1 0 0 -1 41.6001 52.8)" fill="#EFBA0F"/>
|
|
12
|
+
<rect width="3.2" height="3.2" rx="1.6" transform="matrix(1 0 0 -1 47.2 52.8)" fill="#4ACC82"/>
|
|
13
|
+
<path d="M141.143 46.1714C141.143 53.9981 134.798 60.3429 126.971 60.3429C119.145 60.3429 112.8 53.9981 112.8 46.1714C112.8 38.3447 119.145 32 126.971 32C134.798 32 141.143 38.3447 141.143 46.1714Z" fill="#5981E3"/>
|
|
14
|
+
<path d="M128.297 49.5064H125.566L124.993 38.562H128.87L128.297 49.5064ZM124.947 53.3381C124.947 52.6345 125.138 52.145 125.52 51.8697C125.903 51.579 126.369 51.4337 126.92 51.4337C127.455 51.4337 127.914 51.579 128.297 51.8697C128.679 52.145 128.87 52.6345 128.87 53.3381C128.87 54.0111 128.679 54.5006 128.297 54.8065C127.914 55.0971 127.455 55.2425 126.92 55.2425C126.369 55.2425 125.903 55.0971 125.52 54.8065C125.138 54.5006 124.947 54.0111 124.947 53.3381Z" fill="white"/>
|
|
15
|
+
<defs>
|
|
16
|
+
<filter id="filter0_d_22198_69476" x="24.8" y="44.7999" width="110.4" height="83.2002" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
17
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
18
|
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
19
|
+
<feMorphology radius="4.8" operator="erode" in="SourceAlpha" result="effect1_dropShadow_22198_69476"/>
|
|
20
|
+
<feOffset dy="6.4"/>
|
|
21
|
+
<feGaussianBlur stdDeviation="6.4"/>
|
|
22
|
+
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12 0"/>
|
|
23
|
+
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_22198_69476"/>
|
|
24
|
+
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_22198_69476" result="shape"/>
|
|
25
|
+
</filter>
|
|
26
|
+
</defs>
|
|
27
|
+
</svg>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<svg width="160" height="160" viewBox="0 0 160 160" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<circle opacity="0.5" cx="80" cy="80" r="80" fill="#E6E9ED"/>
|
|
3
|
+
<g filter="url(#filter0_d_22198_92633)">
|
|
4
|
+
<path d="M32.8 47.9999C32.8 47.1162 33.5164 46.3999 34.4 46.3999H125.6C126.484 46.3999 127.2 47.1162 127.2 47.9999V55.9999H32.8V47.9999Z" fill="#464B52"/>
|
|
5
|
+
<path d="M32.8 56H127.2V112C127.2 112.884 126.484 113.6 125.6 113.6H34.4001C33.5164 113.6 32.8 112.884 32.8 112V56Z" fill="white"/>
|
|
6
|
+
<rect width="11.2" height="3.2" rx="1.6" transform="matrix(1 0 0 -1 74.3999 91.2002)" fill="#C9CED4"/>
|
|
7
|
+
<rect width="4" height="4" rx="2" transform="matrix(1 0 0 -1 68 81.6001)" fill="#C9CED4"/>
|
|
8
|
+
<rect width="4" height="4" rx="2" transform="matrix(1 0 0 -1 88 81.6001)" fill="#C9CED4"/>
|
|
9
|
+
</g>
|
|
10
|
+
<rect width="3.2" height="3.2" rx="1.6" transform="matrix(1 0 0 -1 36 52.7998)" fill="#E37570"/>
|
|
11
|
+
<rect width="3.2" height="3.2" rx="1.6" transform="matrix(1 0 0 -1 41.6001 52.7998)" fill="#EFBA0F"/>
|
|
12
|
+
<rect width="3.2" height="3.2" rx="1.6" transform="matrix(1 0 0 -1 47.2 52.7998)" fill="#4ACC82"/>
|
|
13
|
+
<path d="M141.143 46.1714C141.143 53.9981 134.798 60.3429 126.971 60.3429C119.145 60.3429 112.8 53.9981 112.8 46.1714C112.8 38.3447 119.145 32 126.971 32C134.798 32 141.143 38.3447 141.143 46.1714Z" fill="#5981E3"/>
|
|
14
|
+
<path d="M128.297 49.5064H125.566L124.993 38.562H128.87L128.297 49.5064ZM124.947 53.3381C124.947 52.6345 125.138 52.145 125.52 51.8697C125.903 51.579 126.369 51.4337 126.92 51.4337C127.455 51.4337 127.914 51.579 128.297 51.8697C128.679 52.145 128.87 52.6345 128.87 53.3381C128.87 54.0111 128.679 54.5006 128.297 54.8065C127.914 55.0971 127.455 55.2425 126.92 55.2425C126.369 55.2425 125.903 55.0971 125.52 54.8065C125.138 54.5006 124.947 54.0111 124.947 53.3381Z" fill="white"/>
|
|
15
|
+
<defs>
|
|
16
|
+
<filter id="filter0_d_22198_92633" x="24.8" y="44.7999" width="110.4" height="83.2002" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
17
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
18
|
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
19
|
+
<feMorphology radius="4.8" operator="erode" in="SourceAlpha" result="effect1_dropShadow_22198_92633"/>
|
|
20
|
+
<feOffset dy="6.4"/>
|
|
21
|
+
<feGaussianBlur stdDeviation="6.4"/>
|
|
22
|
+
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12 0"/>
|
|
23
|
+
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_22198_92633"/>
|
|
24
|
+
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_22198_92633" result="shape"/>
|
|
25
|
+
</filter>
|
|
26
|
+
</defs>
|
|
27
|
+
</svg>
|
|
@@ -1,12 +1,67 @@
|
|
|
1
|
+
import clsx from 'clsx'
|
|
1
2
|
import { useTranslation } from 'react-i18next'
|
|
2
3
|
|
|
4
|
+
import ErrorDarkSVG from '@/public/assets/svg/error-dark.svg?url'
|
|
5
|
+
import ErrorLightSVG from '@/public/assets/svg/error-light.svg?url'
|
|
6
|
+
import { Button } from '@/src/lib/components'
|
|
7
|
+
import { PageLayout, TutorWidgetEvents, useWidgetSettingsAtom } from '@/src/modules/widget'
|
|
8
|
+
import { WidgetHeader } from '@/src/modules/widget/components/header'
|
|
9
|
+
|
|
3
10
|
function GenericError() {
|
|
4
11
|
const { t } = useTranslation()
|
|
12
|
+
const [settings] = useWidgetSettingsAtom()
|
|
13
|
+
const isDarkMode = settings?.config?.theme === 'dark'
|
|
5
14
|
|
|
6
15
|
return (
|
|
7
|
-
<
|
|
8
|
-
<
|
|
9
|
-
|
|
16
|
+
<PageLayout className='p-5'>
|
|
17
|
+
<WidgetHeader enabledButtons={['close']} showContent={false} />
|
|
18
|
+
|
|
19
|
+
<div className='flex h-full flex-col items-center justify-center p-10'>
|
|
20
|
+
<div className='mb-8 flex flex-col items-center gap-1 text-center'>
|
|
21
|
+
<img
|
|
22
|
+
alt={t('generic_error.image_alt')}
|
|
23
|
+
className='mb-4'
|
|
24
|
+
src={isDarkMode ? ErrorDarkSVG : ErrorLightSVG}
|
|
25
|
+
width={200}
|
|
26
|
+
height={200}
|
|
27
|
+
/>
|
|
28
|
+
|
|
29
|
+
<h2
|
|
30
|
+
className={clsx('text-xl font-bold', {
|
|
31
|
+
'text-white': isDarkMode,
|
|
32
|
+
'text-gray-800': !isDarkMode
|
|
33
|
+
})}>
|
|
34
|
+
{t('generic_error.title')}
|
|
35
|
+
</h2>
|
|
36
|
+
|
|
37
|
+
<p
|
|
38
|
+
className={clsx('text-sm', {
|
|
39
|
+
'text-gray-400': isDarkMode,
|
|
40
|
+
'text-gray-500': !isDarkMode
|
|
41
|
+
})}>
|
|
42
|
+
{t('generic_error.description')}
|
|
43
|
+
</p>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<div className='flex w-full flex-col gap-4'>
|
|
47
|
+
<Button
|
|
48
|
+
variant='brand'
|
|
49
|
+
className='w-full rounded-lg py-2'
|
|
50
|
+
onClick={() => window.location.reload()}
|
|
51
|
+
aria-label='Retry Button'>
|
|
52
|
+
<span className='font-light'>{t('general.buttons.try_again')}</span>
|
|
53
|
+
</Button>
|
|
54
|
+
|
|
55
|
+
<Button
|
|
56
|
+
variant='secondary'
|
|
57
|
+
className='w-full rounded-lg py-2'
|
|
58
|
+
onClick={() => TutorWidgetEvents['c3po-app-widget-hide'].dispatch()}
|
|
59
|
+
aria-label='Close Button'>
|
|
60
|
+
<span className='font-light'>{t('general.buttons.close')}</span>
|
|
61
|
+
</Button>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</PageLayout>
|
|
10
65
|
)
|
|
11
66
|
}
|
|
12
67
|
|