mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 17:43:47 +00:00
Update Support.tsx
This commit is contained in:
@@ -271,14 +271,20 @@ export default function Support() {
|
|||||||
if (supportConfig && !supportConfig.tickets_enabled) {
|
if (supportConfig && !supportConfig.tickets_enabled) {
|
||||||
const getSupportMessage = () => {
|
const getSupportMessage = () => {
|
||||||
if (supportConfig.support_type === 'profile') {
|
if (supportConfig.support_type === 'profile') {
|
||||||
|
const supportUsername = supportConfig.support_username || '@support'
|
||||||
return {
|
return {
|
||||||
title: t('support.ticketsDisabled'),
|
title: t('support.ticketsDisabled'),
|
||||||
message: t('support.useProfile'),
|
message: t('support.contactSupport', { username: supportUsername }),
|
||||||
buttonText: t('support.goToProfile'),
|
buttonText: t('support.contactUs'),
|
||||||
buttonAction: () => {
|
buttonAction: () => {
|
||||||
const webApp = window.Telegram?.WebApp
|
const webApp = window.Telegram?.WebApp
|
||||||
if (webApp?.close) {
|
const url = supportUsername.startsWith('@')
|
||||||
webApp.close()
|
? `https://t.me/${supportUsername.slice(1)}`
|
||||||
|
: `https://t.me/${supportUsername}`
|
||||||
|
if (webApp?.openTelegramLink) {
|
||||||
|
webApp.openTelegramLink(url)
|
||||||
|
} else {
|
||||||
|
window.open(url, '_blank')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user