- asggiunto bottone "installa app" sulla email di conferma registrazione e anche la Guida "/guida".
- migliorato InvitaAmico
This commit is contained in:
@@ -165,11 +165,10 @@ export const Api = {
|
||||
} else {
|
||||
// Se il refresh token fallisce, logout dell'utente
|
||||
// userStore.setAuth('', '');
|
||||
const $router = useRouter();
|
||||
throw { code: toolsext.ERR_RETRY_LOGIN };
|
||||
}
|
||||
} catch (err2) {
|
||||
console.error('Errore durante il refresh token:', err2);
|
||||
console.error('Errore durante il check Token Scaduto:', err2);
|
||||
|
||||
let mystatus = err2?.code || err2?.status;
|
||||
|
||||
@@ -192,7 +191,6 @@ export const Api = {
|
||||
// || statuscode2 === serv_constants.RIS_CODE__HTTP_FORBIDDEN_INVALID_TOKEN
|
||||
) {
|
||||
userStore.setAuth('', '');
|
||||
const $router = useRouter();
|
||||
throw { status: toolsext.ERR_RETRY_LOGIN };
|
||||
}
|
||||
|
||||
|
||||
@@ -2726,7 +2726,7 @@ export const tools = {
|
||||
getEmailSupport() {
|
||||
const globalStore = useGlobalStore();
|
||||
const site = globalStore.site;
|
||||
return this.getemailto(site?.contacts.email)
|
||||
return this.getemailto(site?.contacts.email);
|
||||
},
|
||||
|
||||
visumenu(elem: IListRoutes) {
|
||||
@@ -5651,9 +5651,9 @@ export const tools = {
|
||||
const globalStore = useGlobalStore();
|
||||
const site = globalStore.site;
|
||||
if (tools.isTest() && !import.meta.env.DEV) {
|
||||
mylink = 'https://t.me/' + site.telegram_bot_name_test
|
||||
mylink = 'https://t.me/' + site.telegram_bot_name_test;
|
||||
} else {
|
||||
mylink = 'https://t.me/' + site.telegram_bot_name
|
||||
mylink = 'https://t.me/' + site.telegram_bot_name;
|
||||
}
|
||||
|
||||
let add = '';
|
||||
@@ -6397,7 +6397,7 @@ export const tools = {
|
||||
)
|
||||
.then((res: any) => {
|
||||
if (res) {
|
||||
tools.showPositiveNotif($q, t('db.trusted', {username: usernameDest}));
|
||||
tools.showPositiveNotif($q, t('db.trusted', { username: usernameDest }));
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -11273,21 +11273,37 @@ export const tools = {
|
||||
.toLowerCase()
|
||||
: undefined;
|
||||
},
|
||||
|
||||
isInTelegramWebView() {
|
||||
try {
|
||||
return /Telegram/.test(navigator.userAgent);
|
||||
// Verifica che siamo lato client
|
||||
if (typeof window === 'undefined') {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Metodo 1: Controlla oggetti globali di Telegram
|
||||
const win = window as any;
|
||||
if (win.Telegram || win.TelegramWebviewProxy || win.TelegramWebApp) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Metodo 2: User Agent (case-insensitive)
|
||||
const ua = navigator.userAgent.toLowerCase();
|
||||
if (ua.includes('telegram')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
} catch (e) {
|
||||
console.error('Errore rilevamento Telegram:', e);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
pageExist(path: string) {
|
||||
const globalStore = useGlobalStore();
|
||||
const page = globalStore.getPage(path)
|
||||
const page = globalStore.getPage(path);
|
||||
|
||||
return !!page
|
||||
}
|
||||
return !!page;
|
||||
},
|
||||
|
||||
// FINE !
|
||||
|
||||
|
||||
Reference in New Issue
Block a user