Update index.html
Browse files- index.html +5 -4
index.html
CHANGED
|
@@ -233,7 +233,7 @@ canvas{max-height:250px;}
|
|
| 233 |
</div>
|
| 234 |
<script>
|
| 235 |
let currentUser = null;
|
| 236 |
-
let currentBoard = '
|
| 237 |
let currentSort = 'new';
|
| 238 |
let isAdmin = false;
|
| 239 |
let wakeStatusInterval = null;
|
|
@@ -309,9 +309,10 @@ document.getElementById('admin-panel').style.display='block';
|
|
| 309 |
async function loadBoards(){
|
| 310 |
const res = await fetch('/api/boards');
|
| 311 |
const boards = await res.json();
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
|
|
|
|
| 315 |
document.getElementById('board-tabs').innerHTML = html;
|
| 316 |
}
|
| 317 |
async function switchBoard(key){
|
|
|
|
| 233 |
</div>
|
| 234 |
<script>
|
| 235 |
let currentUser = null;
|
| 236 |
+
let currentBoard = 'battle'; // ๊ธฐ๋ณธ๊ฐ์ ๋ฐฐํ ์๋ ๋๋ก ์ค์
|
| 237 |
let currentSort = 'new';
|
| 238 |
let isAdmin = false;
|
| 239 |
let wakeStatusInterval = null;
|
|
|
|
| 309 |
async function loadBoards(){
|
| 310 |
const res = await fetch('/api/boards');
|
| 311 |
const boards = await res.json();
|
| 312 |
+
// ๐ฎ ๋ฐฐํ ์๋ ๋๋ฅผ ๋งจ ์(1๋ฒ์งธ)์ผ๋ก ๋ฐฐ์น
|
| 313 |
+
let html = `<button class="board-tab ${'battle'===currentBoard?'active':''}" onclick="switchBoard('battle')">๐ฎ ๋ฐฐํ ์๋ ๋</button>`;
|
| 314 |
+
// ๋๋จธ์ง ๊ฒ์ํ๋ค ์ถ๊ฐ
|
| 315 |
+
html += boards.map(b=>`<button class="board-tab ${b.key===currentBoard?'active':''}" onclick="switchBoard('${b.key}')">${b.name}</button>`).join('');
|
| 316 |
document.getElementById('board-tabs').innerHTML = html;
|
| 317 |
}
|
| 318 |
async function switchBoard(key){
|