fix: removed welcome page redirect code
This commit is contained in:
parent
fae6ba4264
commit
9c49b28070
@ -3,14 +3,14 @@ import { createResource } from 'frappe-ui'
|
|||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
|
||||||
const baseEndpoint = ref('https://frappecloud.com')
|
const baseEndpoint = ref('https://frappecloud.com')
|
||||||
const isPaymentModeAdded = ref(false)
|
const siteName = ref('')
|
||||||
|
|
||||||
export const currentSiteInfo = createResource({
|
export const currentSiteInfo = createResource({
|
||||||
url: 'frappe.integrations.frappe_providers.frappecloud_billing.current_site_info',
|
url: 'frappe.integrations.frappe_providers.frappecloud_billing.current_site_info',
|
||||||
cache: 'currentSiteInfo',
|
cache: 'currentSiteInfo',
|
||||||
onSuccess: (data) => {
|
onSuccess: (data) => {
|
||||||
isPaymentModeAdded.value = data.is_payment_method_added
|
|
||||||
baseEndpoint.value = data.base_url
|
baseEndpoint.value = data.base_url
|
||||||
|
siteName.value = data.site_name
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -38,13 +38,8 @@ export const confirmLoginToFrappeCloud = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const loginToFrappeCloud = () => {
|
const loginToFrappeCloud = () => {
|
||||||
let redirectRoute = ''
|
window.open(
|
||||||
|
`${baseEndpoint.value}/dashboard/sites/${siteName.value}`,
|
||||||
if (isPaymentModeAdded.value) {
|
'_blank',
|
||||||
redirectRoute = '/dashboard'
|
)
|
||||||
} else {
|
|
||||||
redirectRoute = '/dashboard/welcome'
|
|
||||||
}
|
|
||||||
|
|
||||||
window.open(`${baseEndpoint.value}${redirectRoute}`, '_blank')
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user