Epiphanio12 commited on
Commit
9708872
·
verified ·
1 Parent(s): f289b30

ajuste a linguagem do site toda para PT-BR

Browse files
Files changed (3) hide show
  1. admin.html +40 -38
  2. index.html +15 -15
  3. script.js +11 -11
admin.html CHANGED
@@ -3,30 +3,32 @@
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Admin - TimeSync Commander</title>
7
- <link rel="stylesheet" href="style.css">
8
  <script src="https://cdn.tailwindcss.com"></script>
9
  <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
  <script src="https://unpkg.com/feather-icons"></script>
11
  </head>
12
  <body class="bg-gray-900 text-white">
13
  <div id="app" class="min-h-screen p-4 max-w-7xl mx-auto">
14
- <!-- Login Container -->
 
 
15
  <div id="login-container" class="max-w-md mx-auto mt-20">
16
  <div class="bg-gray-800 rounded-lg p-8 shadow-lg">
17
  <div class="text-center mb-6">
18
  <i data-feather="shield" class="w-12 h-12 mx-auto mb-4 text-blue-500"></i>
19
- <h1 class="text-2xl font-bold">Admin Login</h1>
20
- </div>
21
  <form id="login-form" class="space-y-4">
22
  <div>
23
- <label for="email" class="block mb-1">Email</label>
24
- <input type="email" id="email" required
25
  class="w-full bg-gray-700 border border-gray-600 rounded px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500">
26
  </div>
27
  <div>
28
- <label for="password" class="block mb-1">Password</label>
29
- <input type="password" id="password" required
30
  class="w-full bg-gray-700 border border-gray-600 rounded px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500">
31
  </div>
32
  <button type="submit"
@@ -41,10 +43,10 @@
41
  <!-- Dashboard Container -->
42
  <div id="dashboard-container" class="hidden">
43
  <header class="flex justify-between items-center mb-8">
44
- <h1 class="text-2xl font-bold">Admin Dashboard</h1>
45
  <button id="logout-button" class="bg-red-600 hover:bg-red-700 text-white px-4 py-2 rounded transition">
46
- Logout
47
- </button>
48
  </header>
49
 
50
  <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
@@ -52,70 +54,70 @@
52
  <div class="dashboard-section bg-gray-800 rounded-lg p-6 lg:col-span-2">
53
  <h2 class="text-xl font-semibold mb-4 flex items-center">
54
  <i data-feather="settings" class="mr-2"></i>
55
- Main Configuration
56
- </h2>
57
 
58
  <form id="config-form" class="space-y-4">
59
  <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
60
  <div>
61
- <label for="config-programa" class="block mb-1">Program Name</label>
62
- <input type="text" id="config-programa"
63
  class="w-full bg-gray-700 border border-gray-600 rounded px-4 py-2">
64
  </div>
65
  <div>
66
- <label for="config-tema" class="block mb-1">Current Theme</label>
67
- <input type="text" id="config-tema"
68
  class="w-full bg-gray-700 border border-gray-600 rounded px-4 py-2">
69
  </div>
70
  </div>
71
 
72
  <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
73
  <div>
74
- <label for="config-momento" class="block mb-1">Status Text</label>
75
- <input type="text" id="config-momento"
76
  class="w-full bg-gray-700 border border-gray-600 rounded px-4 py-2">
77
  </div>
78
  <div>
79
- <label for="config-falta" class="block mb-1">Time (HH:MM:SS)</label>
80
- <input type="text" id="config-falta"
81
  class="w-full bg-gray-700 border border-gray-600 rounded px-4 py-2">
82
  </div>
83
  </div>
84
 
85
  <div>
86
- <label for="config-aviso" class="block mb-1">Warning Message</label>
87
- <textarea id="config-aviso" rows="2"
88
  class="w-full bg-gray-700 border border-gray-600 rounded px-4 py-2"></textarea>
89
  <button type="button" id="btn-clear-aviso"
90
  class="mt-2 bg-yellow-600 hover:bg-yellow-700 text-white px-3 py-1 rounded text-sm transition">
91
- Clear Warning
92
- </button>
93
  </div>
94
 
95
  <div class="flex items-center">
96
  <label class="inline-flex items-center">
97
  <input type="checkbox" id="ignore-external-files" class="rounded text-blue-500">
98
- <span class="ml-2">Ignore External Files (Admin Mode)</span>
99
- </label>
100
  </div>
101
 
102
  <div class="flex flex-wrap gap-2 mt-4">
103
  <button type="button" id="btn-set-ativo"
104
  class="bg-green-600 hover:bg-green-700 text-white px-4 py-2 rounded transition">
105
- START
106
- </button>
107
  <button type="button" id="btn-set-pausado"
108
  class="bg-yellow-600 hover:bg-yellow-700 text-white px-4 py-2 rounded transition">
109
- PAUSE
110
- </button>
111
  <button type="button" id="btn-set-inativo"
112
  class="bg-red-600 hover:bg-red-700 text-white px-4 py-2 rounded transition">
113
- STOP (END)
114
- </button>
115
  <button type="submit"
116
  class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded transition">
117
- Save Configuration
118
- </button>
119
  </div>
120
  </form>
121
  </div>
@@ -124,8 +126,8 @@
124
  <div class="dashboard-section bg-gray-800 rounded-lg p-6">
125
  <h2 class="text-xl font-semibold mb-4 flex items-center">
126
  <i data-feather="clock" class="mr-2"></i>
127
- Quick Time Controls
128
- </h2>
129
 
130
  <div class="grid grid-cols-2 gap-3">
131
  <button class="time-preset" data-time="00:00:00"
 
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Admin - TimeSync Commander - Controle de Tempo</title>
7
+ <link rel="stylesheet" href="style.css">
8
  <script src="https://cdn.tailwindcss.com"></script>
9
  <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
  <script src="https://unpkg.com/feather-icons"></script>
11
  </head>
12
  <body class="bg-gray-900 text-white">
13
  <div id="app" class="min-h-screen p-4 max-w-7xl mx-auto">
14
+ <!--
15
+ Entrar
16
+ Container -->
17
  <div id="login-container" class="max-w-md mx-auto mt-20">
18
  <div class="bg-gray-800 rounded-lg p-8 shadow-lg">
19
  <div class="text-center mb-6">
20
  <i data-feather="shield" class="w-12 h-12 mx-auto mb-4 text-blue-500"></i>
21
+ <h1 class="text-2xl font-bold">Acesso Administrativo</h1>
22
+ </div>
23
  <form id="login-form" class="space-y-4">
24
  <div>
25
+ <label for="email" class="block mb-1">E-mail</label>
26
+ <input type="email" id="email" required
27
  class="w-full bg-gray-700 border border-gray-600 rounded px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500">
28
  </div>
29
  <div>
30
+ <label for="password" class="block mb-1">Senha</label>
31
+ <input type="password" id="password" required
32
  class="w-full bg-gray-700 border border-gray-600 rounded px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500">
33
  </div>
34
  <button type="submit"
 
43
  <!-- Dashboard Container -->
44
  <div id="dashboard-container" class="hidden">
45
  <header class="flex justify-between items-center mb-8">
46
+ <h1 class="text-2xl font-bold">Painel Administrativo</h1>
47
  <button id="logout-button" class="bg-red-600 hover:bg-red-700 text-white px-4 py-2 rounded transition">
48
+ Sair
49
+ </button>
50
  </header>
51
 
52
  <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
 
54
  <div class="dashboard-section bg-gray-800 rounded-lg p-6 lg:col-span-2">
55
  <h2 class="text-xl font-semibold mb-4 flex items-center">
56
  <i data-feather="settings" class="mr-2"></i>
57
+ Configuração Principal
58
+ </h2>
59
 
60
  <form id="config-form" class="space-y-4">
61
  <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
62
  <div>
63
+ <label for="config-programa" class="block mb-1">Nome do Programa</label>
64
+ <input type="text" id="config-programa"
65
  class="w-full bg-gray-700 border border-gray-600 rounded px-4 py-2">
66
  </div>
67
  <div>
68
+ <label for="config-tema" class="block mb-1">Tema Atual</label>
69
+ <input type="text" id="config-tema"
70
  class="w-full bg-gray-700 border border-gray-600 rounded px-4 py-2">
71
  </div>
72
  </div>
73
 
74
  <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
75
  <div>
76
+ <label for="config-momento" class="block mb-1">Texto de Status</label>
77
+ <input type="text" id="config-momento"
78
  class="w-full bg-gray-700 border border-gray-600 rounded px-4 py-2">
79
  </div>
80
  <div>
81
+ <label for="config-falta" class="block mb-1">Tempo (HH:MM:SS)</label>
82
+ <input type="text" id="config-falta"
83
  class="w-full bg-gray-700 border border-gray-600 rounded px-4 py-2">
84
  </div>
85
  </div>
86
 
87
  <div>
88
+ <label for="config-aviso" class="block mb-1">Mensagem de Aviso</label>
89
+ <textarea id="config-aviso" rows="2"
90
  class="w-full bg-gray-700 border border-gray-600 rounded px-4 py-2"></textarea>
91
  <button type="button" id="btn-clear-aviso"
92
  class="mt-2 bg-yellow-600 hover:bg-yellow-700 text-white px-3 py-1 rounded text-sm transition">
93
+ Limpar Aviso
94
+ </button>
95
  </div>
96
 
97
  <div class="flex items-center">
98
  <label class="inline-flex items-center">
99
  <input type="checkbox" id="ignore-external-files" class="rounded text-blue-500">
100
+ <span class="ml-2">Ignorar Arquivos Externos (Modo Admin)</span>
101
+ </label>
102
  </div>
103
 
104
  <div class="flex flex-wrap gap-2 mt-4">
105
  <button type="button" id="btn-set-ativo"
106
  class="bg-green-600 hover:bg-green-700 text-white px-4 py-2 rounded transition">
107
+ INICIAR
108
+ </button>
109
  <button type="button" id="btn-set-pausado"
110
  class="bg-yellow-600 hover:bg-yellow-700 text-white px-4 py-2 rounded transition">
111
+ PAUSAR
112
+ </button>
113
  <button type="button" id="btn-set-inativo"
114
  class="bg-red-600 hover:bg-red-700 text-white px-4 py-2 rounded transition">
115
+ PARAR (FINALIZAR)
116
+ </button>
117
  <button type="submit"
118
  class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded transition">
119
+ Salvar Configuração
120
+ </button>
121
  </div>
122
  </form>
123
  </div>
 
126
  <div class="dashboard-section bg-gray-800 rounded-lg p-6">
127
  <h2 class="text-xl font-semibold mb-4 flex items-center">
128
  <i data-feather="clock" class="mr-2"></i>
129
+ Controles Rápidos de Tempo
130
+ </h2>
131
 
132
  <div class="grid grid-cols-2 gap-3">
133
  <button class="time-preset" data-time="00:00:00"
index.html CHANGED
@@ -3,8 +3,8 @@
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>TimeSync Commander</title>
7
- <link rel="manifest" href="/manifest.json">
8
  <link rel="stylesheet" href="style.css">
9
  <script src="https://cdn.tailwindcss.com"></script>
10
  <script src="https://cdn.jsdelivr.net/npm/socket.io-client@4.7.2/dist/socket.io.min.js"></script>
@@ -19,12 +19,12 @@
19
  <div id="card-online-users-count" class="bg-gray-800 rounded-lg p-4 flex items-center justify-center">
20
  <i data-feather="users" class="mr-2"></i>
21
  <span id="online-users-count">0</span> online
22
- </div>
23
 
24
  <!-- Main Header -->
25
  <div id="cabecalho-principal" class="bg-gray-800 rounded-lg p-4 col-span-2 flex items-center justify-center">
26
- <h1 id="PROGRAMA-TITULO" class="text-2xl font-bold">Event Title</h1>
27
- </div>
28
 
29
  <!-- Clock -->
30
  <div id="card-relogio" class="bg-gray-800 rounded-lg p-4 flex items-center justify-center">
@@ -41,8 +41,8 @@
41
  <!-- Status -->
42
  <div id="card-status-tema-container" class="bg-gray-800 rounded-lg p-4 col-span-4">
43
  <div id="card-status-tema" class="text-center">
44
- <h2 id="TEMA" class="text-xl font-semibold">Current Theme</h2>
45
- <div id="MOMENTO-FALTA" class="text-4xl my-2">
46
  <span id="MOMENTO">RESTA</span> <span id="FALTA">00:00:00</span>
47
  </div>
48
  <div id="card-aviso-container" class="hidden bg-yellow-500 text-gray-900 rounded p-2 mt-2">
@@ -53,18 +53,18 @@
53
 
54
  <!-- Schedule Header -->
55
  <div id="cronograma-header" class="bg-gray-800 rounded-lg p-4 col-span-4">
56
- <h2 class="text-xl font-semibold">Schedule</h2>
57
- </div>
58
 
59
  <!-- Schedule Table -->
60
  <div id="cronograma-table" class="bg-gray-800 rounded-lg p-4 col-span-4 overflow-x-auto">
61
  <table class="w-full">
62
  <thead>
63
  <tr class="border-b border-gray-700">
64
- <th class="p-2 text-left">Start</th>
65
- <th class="p-2 text-left">Duration</th>
66
  <th class="p-2 text-left">Item</th>
67
- </tr>
68
  </thead>
69
  <tbody id="tabela-cronograma-body">
70
  <!-- Schedule items will be inserted here -->
@@ -137,9 +137,9 @@
137
  <div id="msg-inativo-card-wrapper" class="hidden fixed inset-0 bg-gray-900 bg-opacity-90 flex items-center justify-center">
138
  <div class="bg-gray-800 rounded-lg p-8 max-w-md text-center">
139
  <i data-feather="clock" class="w-16 h-16 mx-auto mb-4"></i>
140
- <h2 class="text-2xl font-bold mb-4">Timer Inactive</h2>
141
- <p id="inactive-message" class="text-gray-300">The timer is currently inactive. Please check back later.</p>
142
- </div>
143
  </div>
144
 
145
  <!-- Floating Buttons -->
 
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>TimeSync Commander - Controle de Tempo</title>
7
+ <link rel="manifest" href="/manifest.json">
8
  <link rel="stylesheet" href="style.css">
9
  <script src="https://cdn.tailwindcss.com"></script>
10
  <script src="https://cdn.jsdelivr.net/npm/socket.io-client@4.7.2/dist/socket.io.min.js"></script>
 
19
  <div id="card-online-users-count" class="bg-gray-800 rounded-lg p-4 flex items-center justify-center">
20
  <i data-feather="users" class="mr-2"></i>
21
  <span id="online-users-count">0</span> online
22
+ </div>
23
 
24
  <!-- Main Header -->
25
  <div id="cabecalho-principal" class="bg-gray-800 rounded-lg p-4 col-span-2 flex items-center justify-center">
26
+ <h1 id="PROGRAMA-TITULO" class="text-2xl font-bold">Título do Evento</h1>
27
+ </div>
28
 
29
  <!-- Clock -->
30
  <div id="card-relogio" class="bg-gray-800 rounded-lg p-4 flex items-center justify-center">
 
41
  <!-- Status -->
42
  <div id="card-status-tema-container" class="bg-gray-800 rounded-lg p-4 col-span-4">
43
  <div id="card-status-tema" class="text-center">
44
+ <h2 id="TEMA" class="text-xl font-semibold">Tema Atual</h2>
45
+ <div id="MOMENTO-FALTA" class="text-4xl my-2">
46
  <span id="MOMENTO">RESTA</span> <span id="FALTA">00:00:00</span>
47
  </div>
48
  <div id="card-aviso-container" class="hidden bg-yellow-500 text-gray-900 rounded p-2 mt-2">
 
53
 
54
  <!-- Schedule Header -->
55
  <div id="cronograma-header" class="bg-gray-800 rounded-lg p-4 col-span-4">
56
+ <h2 class="text-xl font-semibold">Cronograma</h2>
57
+ </div>
58
 
59
  <!-- Schedule Table -->
60
  <div id="cronograma-table" class="bg-gray-800 rounded-lg p-4 col-span-4 overflow-x-auto">
61
  <table class="w-full">
62
  <thead>
63
  <tr class="border-b border-gray-700">
64
+ <th class="p-2 text-left">Início</th>
65
+ <th class="p-2 text-left">Duração</th>
66
  <th class="p-2 text-left">Item</th>
67
+ </tr>
68
  </thead>
69
  <tbody id="tabela-cronograma-body">
70
  <!-- Schedule items will be inserted here -->
 
137
  <div id="msg-inativo-card-wrapper" class="hidden fixed inset-0 bg-gray-900 bg-opacity-90 flex items-center justify-center">
138
  <div class="bg-gray-800 rounded-lg p-8 max-w-md text-center">
139
  <i data-feather="clock" class="w-16 h-16 mx-auto mb-4"></i>
140
+ <h2 class="text-2xl font-bold mb-4">Temporizador Inativo</h2>
141
+ <p id="inactive-message" class="text-gray-300">O temporizador está inativo no momento. Por favor, verifique mais tarde.</p>
142
+ </div>
143
  </div>
144
 
145
  <!-- Floating Buttons -->
script.js CHANGED
@@ -37,16 +37,16 @@ setInterval(sendHeartbeat, 10000);
37
  function updateTemporizadorUI(data) {
38
  // Update all relevant elements
39
  document.querySelectorAll('#PROGRAMA-TITULO, #PROGRAMA-TITULO-mobile').forEach(el => {
40
- el.textContent = data.PROGRAMA || 'Event Title';
41
- });
42
 
43
  document.querySelectorAll('#TEMA, #TEMA-mobile').forEach(el => {
44
- el.textContent = data.TEMA || 'Current Theme';
45
- });
46
 
47
  document.querySelectorAll('#MOMENTO, #MOMENTO-mobile').forEach(el => {
48
- el.textContent = data.MOMENTO || 'RESTA';
49
- });
50
 
51
  document.querySelectorAll('#FALTA, #FALTA-mobile').forEach(el => {
52
  el.textContent = data.FALTA || '00:00:00';
@@ -68,8 +68,8 @@ function updateTemporizadorUI(data) {
68
 
69
  // Handle activation state
70
  if (data.ATIVACAO === 'INATIVO' || data.ATIVACAO === 'PAUSADO') {
71
- showTemporizadorInativoState(data.ATIVACAO === 'PAUSADO' ? 'Timer Paused' : 'Timer Inactive');
72
- } else {
73
  showTemporizadorAtivoState();
74
  }
75
  }
@@ -181,8 +181,8 @@ function updateTabelaCronogramaUI(data) {
181
  marcarLinhaAtivaNaTabela();
182
  } else {
183
  const row = document.createElement('tr');
184
- row.innerHTML = '<td colspan="3" class="p-2 text-center text-gray-400">No schedule available</td>';
185
- tbody.appendChild(row);
186
  }
187
  });
188
  }
@@ -242,7 +242,7 @@ socket.on('onlineUsersCountUpdated', (count) => {
242
  });
243
  });
244
  socket.on('encerrarTemporizador', () => {
245
- showTemporizadorInativoState('Timer Ended');
246
  });
247
 
248
  // Initialize
 
37
  function updateTemporizadorUI(data) {
38
  // Update all relevant elements
39
  document.querySelectorAll('#PROGRAMA-TITULO, #PROGRAMA-TITULO-mobile').forEach(el => {
40
+ el.textContent = data.PROGRAMA || 'Título do Evento';
41
+ });
42
 
43
  document.querySelectorAll('#TEMA, #TEMA-mobile').forEach(el => {
44
+ el.textContent = data.TEMA || 'Tema Atual';
45
+ });
46
 
47
  document.querySelectorAll('#MOMENTO, #MOMENTO-mobile').forEach(el => {
48
+ el.textContent = data.MOMENTO || 'TEMPO RESTANTE';
49
+ });
50
 
51
  document.querySelectorAll('#FALTA, #FALTA-mobile').forEach(el => {
52
  el.textContent = data.FALTA || '00:00:00';
 
68
 
69
  // Handle activation state
70
  if (data.ATIVACAO === 'INATIVO' || data.ATIVACAO === 'PAUSADO') {
71
+ showTemporizadorInativoState(data.ATIVACAO === 'PAUSADO' ? 'Temporizador Pausado' : 'Temporizador Inativo');
72
+ } else {
73
  showTemporizadorAtivoState();
74
  }
75
  }
 
181
  marcarLinhaAtivaNaTabela();
182
  } else {
183
  const row = document.createElement('tr');
184
+ row.innerHTML = '<td colspan="3" class="p-2 text-center text-gray-400">Nenhum cronograma disponível</td>';
185
+ tbody.appendChild(row);
186
  }
187
  });
188
  }
 
242
  });
243
  });
244
  socket.on('encerrarTemporizador', () => {
245
+ showTemporizadorInativoState('Temporizador Finalizado');
246
  });
247
 
248
  // Initialize