|
92 | 92 | background: rgba(45, 140, 240, 0.2); |
93 | 93 | } |
94 | 94 |
|
| 95 | + /* BOTÃO GPT ASSISTANT - ROXO */ |
| 96 | + .tab-gpt { |
| 97 | + background: transparent; |
| 98 | + border: 1px solid #9c27b0; |
| 99 | + color: #9c27b0; |
| 100 | + padding: 12px 25px; |
| 101 | + border-radius: 20px; |
| 102 | + cursor: pointer; |
| 103 | + transition: .3s; |
| 104 | + font-size: 1rem; |
| 105 | + } |
| 106 | + .tab-gpt:hover { |
| 107 | + background: rgba(156, 39, 176, 0.1); |
| 108 | + } |
| 109 | + .tab-gpt.active { |
| 110 | + background: rgba(156, 39, 176, 0.2); |
| 111 | + } |
| 112 | + |
95 | 113 | /* Conteúdo principal */ |
96 | 114 | .content { |
97 | 115 | background: #111; |
@@ -438,6 +456,8 @@ <h1>🌍 Painel de Autoridade — Terra Dourada</h1> |
438 | 456 | <button class="tab-perfil" onclick="showTab('perfil')">👤 Editar Perfil</button> |
439 | 457 | <!-- BOTÃO P2P SOCIAL --> |
440 | 458 | <button class="tab-p2p" onclick="irParaRedeSocial()">🌐 P2P Social</button> |
| 459 | + <!-- NOVO BOTÃO: GPT ASSISTANT --> |
| 460 | + <button class="tab-gpt" onclick="irParaGPTAssistant()">🤖 GPT Assistant</button> |
441 | 461 | </div> |
442 | 462 |
|
443 | 463 | <!-- CONTEÚDO PRINCIPAL --> |
@@ -604,6 +624,19 @@ <h3 id="confirmationElectionName" style="color: #d4af37; margin: 10px 0 20px;">< |
604 | 624 | window.location.href = `rede_social.html?user_id=${userId}`; |
605 | 625 | } |
606 | 626 |
|
| 627 | +// NOVA FUNÇÃO: Ir para GPT Assistant |
| 628 | +function irParaGPTAssistant() { |
| 629 | + if (!usuarioLogado) { |
| 630 | + alert('Erro: Usuário não identificado. Faça login novamente.'); |
| 631 | + window.location.href = 'login.html'; |
| 632 | + return; |
| 633 | + } |
| 634 | + |
| 635 | + // Passar o email do usuário como parâmetro para manter o login |
| 636 | + const userId = encodeURIComponent(usuarioLogado.email); |
| 637 | + window.location.href = `index_gpt.html?user_id=${userId}`; |
| 638 | +} |
| 639 | + |
607 | 640 | // FUNÇÃO: Identificar usuário logado |
608 | 641 | async function identificarUsuarioLogado() { |
609 | 642 | try { |
@@ -641,6 +674,7 @@ <h3 id="confirmationElectionName" style="color: #d4af37; margin: 10px 0 20px;">< |
641 | 674 | document.querySelectorAll('.tab').forEach(t => t.classList.remove('active')); |
642 | 675 | document.querySelectorAll('.tab-p2p').forEach(t => t.classList.remove('active')); |
643 | 676 | document.querySelectorAll('.tab-perfil').forEach(t => t.classList.remove('active')); |
| 677 | + document.querySelectorAll('.tab-gpt').forEach(t => t.classList.remove('active')); |
644 | 678 | document.querySelectorAll('[id^="tab-"]').forEach(c => c.style.display = 'none'); |
645 | 679 |
|
646 | 680 | // Ativar aba atual |
|
0 commit comments