Подсказки
This commit is contained in:
parent
1cf75c8a29
commit
60226aea76
3 changed files with 179 additions and 2 deletions
|
|
@ -205,4 +205,28 @@ document.getElementById("logoutBtn").onclick = () => {
|
|||
|
||||
document.getElementById("closeModal").onclick = hideModal;
|
||||
|
||||
tryAutoLogin();
|
||||
tryAutoLogin();
|
||||
|
||||
// Переключение инструкций по платформам
|
||||
document.querySelectorAll('.tab-btn').forEach(btn => {
|
||||
btn.addEventListener('click', () => {
|
||||
// Убираем active у всех кнопок
|
||||
document.querySelectorAll('.tab-btn').forEach(b => b.classList.remove('active'));
|
||||
btn.classList.add('active');
|
||||
|
||||
// Скрываем все инструкции
|
||||
document.querySelectorAll('.instructions').forEach(el => el.classList.add('hidden'));
|
||||
|
||||
// Показываем нужную
|
||||
const platform = btn.dataset.platform;
|
||||
const target = document.getElementById(`${platform}-instructions`);
|
||||
if (target) {
|
||||
target.classList.remove('hidden');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Показываем Android по умолчанию при загрузке (если нужно)
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
// можно оставить как есть — первая вкладка уже active в HTML
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue