diff --git a/apps/dashboard/.env.example b/apps/dashboard/.env.example index ca967be8..fa226070 100644 --- a/apps/dashboard/.env.example +++ b/apps/dashboard/.env.example @@ -30,4 +30,9 @@ PRIVATE_APP_SUBDOMAINS=app LEMON_SQUEEZY_API_KEY= LEMON_SQUEEZY_STORE_ID= -LEMON_SQUEEZY_WEBHOOK_SECRET= \ No newline at end of file +LEMON_SQUEEZY_WEBHOOK_SECRET= + +## Custom Domain +TEAM_ID_VERCEL= +PROJECT_ID_VERCEL= +AUTH_BEARER_TOKEN= diff --git a/apps/dashboard/package.json b/apps/dashboard/package.json index 17d0c958..434279df 100644 --- a/apps/dashboard/package.json +++ b/apps/dashboard/package.json @@ -46,6 +46,7 @@ "form-data": "^4.0.0", "hotkeys-js": "^3.11.2", "html-to-image": "^1.11.11", + "is-valid-domain": "^0.1.6", "js-yaml": "^4.1.0", "jspdf": "^2.5.1", "jspdf-autotable": "^3.8.2", @@ -61,6 +62,7 @@ "svelte-meta-tags": "^3.1.2", "svelte-ui": "workspace:*", "sveltekit-i18n": "^2.4.2", + "tldts": "^6.1.41", "unsplash-js": "^7.0.18", "wait-on": "^7.0.1", "zod": "^3.21.4" diff --git a/apps/dashboard/src/app.postcss b/apps/dashboard/src/app.postcss index 2df30a11..ce2f08d0 100644 --- a/apps/dashboard/src/app.postcss +++ b/apps/dashboard/src/app.postcss @@ -141,6 +141,29 @@ code { overflow-y: auto; } +.shake { + animation: shake 0.85s; +} +@keyframes shake { + 10%, + 90% { + transform: translate3d(-15px, 0, 0); + } + 20%, + 80% { + transform: translate3d(15px, 0, 0); + } + 30%, + 50%, + 70% { + transform: translate3d(-15px, 0, 0); + } + 40%, + 60% { + transform: translate3d(15px, 0, 0); + } +} + .bx--list-box__menu-item__option { white-space: normal !important; } diff --git a/apps/dashboard/src/lib/components/Course/components/Lesson/Exercise/ViewMode.svelte b/apps/dashboard/src/lib/components/Course/components/Lesson/Exercise/ViewMode.svelte index 2e009185..a8565329 100644 --- a/apps/dashboard/src/lib/components/Course/components/Lesson/Exercise/ViewMode.svelte +++ b/apps/dashboard/src/lib/components/Course/components/Lesson/Exercise/ViewMode.svelte @@ -376,26 +376,4 @@ .status-text { width: fit-content; } - :global(.shake) { - animation: shake 0.85s; - } - @keyframes shake { - 10%, - 90% { - transform: translate3d(-15px, 0, 0); - } - 20%, - 80% { - transform: translate3d(15px, 0, 0); - } - 30%, - 50%, - 70% { - transform: translate3d(-15px, 0, 0); - } - 40%, - 60% { - transform: translate3d(15px, 0, 0); - } - } diff --git a/apps/dashboard/src/lib/components/Form/TextField.svelte b/apps/dashboard/src/lib/components/Form/TextField.svelte index f4ff7b4d..67805633 100644 --- a/apps/dashboard/src/lib/components/Form/TextField.svelte +++ b/apps/dashboard/src/lib/components/Form/TextField.svelte @@ -102,7 +102,7 @@ {#if errorMessage}

{errorMessage}

{:else if helperMessage} -

+

{helperMessage}

{/if} diff --git a/apps/dashboard/src/lib/components/Org/Settings/Domains.svelte b/apps/dashboard/src/lib/components/Org/Settings/Domains.svelte index d317fed4..5ed07b4f 100644 --- a/apps/dashboard/src/lib/components/Org/Settings/Domains.svelte +++ b/apps/dashboard/src/lib/components/Org/Settings/Domains.svelte @@ -1,30 +1,51 @@ @@ -80,7 +210,7 @@ >

- {$t('components.settings.domains.work_together')} + {$t('settings.organization.organization_profile.custom_domain.body')}

@@ -100,7 +230,7 @@ label={$t('components.settings.domains.update')} className="py-4" variant={VARIANTS.OUTLINED} - onClick={handleChangeDomain} + onClick={handleSaveSiteName} isDisabled={isLoading} /> @@ -110,15 +240,168 @@ - - {$t('components.settings.domains.custom')} - -
-

{$t('components.settings.domains.domain')}

- + + {$t('upgrade.domain')} + + + {$t('components.settings.domains.custom')} + + + +
+ + {#if $currentOrg.customDomain} +
+
+

+ {$currentOrg.customDomain} + + goto(`https://${$currentOrg.customDomain}`)} + > + + +

+ +
+
+ {#if $currentOrg.isCustomDomainVerified} + + {:else} + + {/if} +
+ +
+ {$t('components.settings.domains.dns_description')} +
+ +
+
+

{$t('components.settings.domains.dns_type')}

+

CNAME

+
+ +
+

{$t('components.settings.domains.dns_name')}

+

+ {getSubdomain()} +

+
+ +
+

{$t('components.settings.domains.dns_value')}

+

+ cname.vercel-dns.com + +

+
+
+ +
+ + {#if !isRefreshing} + + {/if} + {$t('components.settings.domains.refresh')} + + + + {#if !isCustomDomainLoading} + + {/if} + {$t('components.settings.domains.remove')} + +
+ {:else} + +
+

{$t('components.settings.domains.your_domain')}

+
+ + +
+ +
+ {/if}
+ +
+
+

{$t('components.settings.domains.custom_favicon')}

+ +
+ +
+ +
+
+ +
+
+

{$t('components.settings.domains.custom_code')}

+ +
+ +