Skip to content

Commit

Permalink
docs(links): update cloud trial link
Browse files Browse the repository at this point in the history
  • Loading branch information
Red-Asuka committed Dec 11, 2024
1 parent 66155f8 commit a685ce9
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions packages/ui/src/composables/useLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,25 @@ export default function useLinks() {
return 'https://emqx.com/en'
})

const forumSite = computed(() => locale.value === 'zh' ? 'https://askemq.com/c/tools/11' : 'https://github.com/emqx/MQTTX/discussions')
const authSite = computed(() => {
if (['ja'].includes(locale.value)) {
return `https://accounts.emqx.com/${locale.value}`
}
if (locale.value === 'zh') {
return 'https://accounts-zh.emqx.com'
}
return 'https://accounts.emqx.com'
})

const utm = '?utm_source=mqttx&utm_medium=referral&utm_campaign='

const cloudTrial = computed(() => {
const query = `${utm}mqttx-to-cloud&continue=https%3A%2F%2Fcloud.emqx.com%2Fconsole%2Fdeployments%2Fnew`
return `${authSite.value}/signup${query}`
})

const forumSite = computed(() => locale.value === 'zh' ? 'https://askemq.com/c/tools/11' : 'https://github.com/emqx/MQTTX/discussions')

const leftBarLogo = computed(() => `${MQTTXSite.value}${utm}logo-to-homepage`)

const empty = computed(() => ({
Expand All @@ -31,7 +46,7 @@ export default function useLinks() {
faq: `${MQTTXSite.value}/docs/faq${utm}about-to-faq`,
MQTTX: `${MQTTXSite.value}${utm}about-to-mqttx`,
EMQ: `${EMQSite.value}${utm}mqttx-to-homepage`,
EMQXCloud: `${EMQSite.value}/cloud${utm}mqttx-to-cloud`,
EMQXCloud: cloudTrial.value,
}))

const help = computed(() => ({
Expand All @@ -46,6 +61,8 @@ export default function useLinks() {
return {
MQTTXSite,
EMQSite,
authSite,
cloudTrial,
forumSite,
leftBarLogo,
empty,
Expand Down

0 comments on commit a685ce9

Please sign in to comment.