4.27.1: Фикс редиректа OAuth Fitbit
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m54s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m54s
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "play-life-web",
|
"name": "play-life-web",
|
||||||
"version": "4.27.0",
|
"version": "4.27.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -202,8 +202,24 @@ function AppContent() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Проверяем URL только для глубоких табов
|
// Проверяем параметры OAuth callback от Fitbit
|
||||||
const urlParams = new URLSearchParams(window.location.search)
|
const urlParams = new URLSearchParams(window.location.search)
|
||||||
|
const integration = urlParams.get('integration')
|
||||||
|
if (integration === 'fitbit') {
|
||||||
|
setActiveTab('fitbit-integration')
|
||||||
|
setLoadedTabs(prev => ({ ...prev, 'fitbit-integration': true }))
|
||||||
|
setIsInitialized(true)
|
||||||
|
// Перезаписываем URL с tab параметром и сохраняем integration/status для компонента
|
||||||
|
const status = urlParams.get('status')
|
||||||
|
const message = urlParams.get('message')
|
||||||
|
let newUrl = '/?tab=fitbit-integration&integration=fitbit'
|
||||||
|
if (status) newUrl += `&status=${status}`
|
||||||
|
if (message) newUrl += `&message=${message}`
|
||||||
|
window.history.replaceState({}, '', newUrl)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Проверяем URL только для глубоких табов
|
||||||
const tabFromUrl = urlParams.get('tab')
|
const tabFromUrl = urlParams.get('tab')
|
||||||
const validTabs = ['current', 'priorities', 'full', 'words', 'add-words', 'dictionaries', 'test', 'tasks', 'task-form', 'wishlist', 'wishlist-form', 'wishlist-detail', 'board-form', 'board-join', 'profile', 'todoist-integration', 'telegram-integration', 'fitbit-integration', 'tracking', 'tracking-access', 'tracking-invite']
|
const validTabs = ['current', 'priorities', 'full', 'words', 'add-words', 'dictionaries', 'test', 'tasks', 'task-form', 'wishlist', 'wishlist-form', 'wishlist-detail', 'board-form', 'board-join', 'profile', 'todoist-integration', 'telegram-integration', 'fitbit-integration', 'tracking', 'tracking-access', 'tracking-invite']
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user