diff --git a/public/client.js b/public/client.js index 6ee3230..c60467d 100644 --- a/public/client.js +++ b/public/client.js @@ -280,7 +280,7 @@ export default class ClientList { }, value: item.name ?? item.id, type: 'text', - placeholder: '请设置你的名字', + placeholder: '请设置你的昵称', onchange: event => { localStorage.setItem('username', event.target.value) window.location.reload() // 简单刷新页面 diff --git a/public/index.html b/public/index.html index 5be072e..8afaa6b 100644 --- a/public/index.html +++ b/public/index.html @@ -228,17 +228,24 @@ // 延迟1500ms //await new Promise((resolve) => setTimeout(resolve, 100)) - + // 设置自己的主机名 const nameInput = document.createElement('input') nameInput.type = 'text' - nameInput.placeholder = '请设置你的名字' + nameInput.placeholder = '请设置你的昵称' nameInput.value = name nameInput.onchange = event => { localStorage.setItem('username', event.target.value) window.location.reload() // 简单刷新页面 } document.body.appendChild(nameInput) + + if (localStorage.getItem('avatar')) { + const favicon = document.createElement('link') + favicon.rel = 'icon' + favicon.href = localStorage.getItem('avatar') + document.head.appendChild(favicon) + }