yangjie #51

Open
yangqiang wants to merge 34 commits from yangjie into master
2 changed files with 12 additions and 2 deletions
Showing only changes of commit b6775f8e40 - Show all commits

View File

@ -129,7 +129,7 @@
flex-shrink: 0; flex-shrink: 0;
color: #ccc; color: #ccc;
text-align: right; text-align: right;
font-size: 16px; font-size: 14px;
} }
} }
} }

View File

@ -11,6 +11,7 @@ import { v4 as uuidv4 } from 'uuid';
import { GetCheckoutRoomNum, GetRoomInfo, GetRoomRtcToken } from '@/api/Home/Index'; import { GetCheckoutRoomNum, GetRoomInfo, GetRoomRtcToken } from '@/api/Home/Index';
import { ExclamationCircleFilled } from '@ant-design/icons'; import { ExclamationCircleFilled } from '@ant-design/icons';
import { isVersion } from '@/utils/package/public'; import { isVersion } from '@/utils/package/public';
import dayjs from 'dayjs';
const { confirm } = Modal; const { confirm } = Modal;
const Login: React.FC = () => { const Login: React.FC = () => {
const navigate = useNavigate(); const navigate = useNavigate();
@ -39,6 +40,7 @@ const Login: React.FC = () => {
nickName: '', nickName: '',
roomNum: '', roomNum: '',
}) })
const [buildTime, setBuildTime] = useState<string>('0')
const [nameModal, setNameModal] = useState(false) const [nameModal, setNameModal] = useState(false)
const [env, setEnv] = useState('') const [env, setEnv] = useState('')
useEffect(() => { useEffect(() => {
@ -50,6 +52,13 @@ const Login: React.FC = () => {
window.electron.getEnv().then(res => { window.electron.getEnv().then(res => {
setEnv(res) setEnv(res)
}) })
try {
const buildStr = document.getElementById('build-time')?.getAttribute('content');
const formattedTime = dayjs(Number(buildStr)).format('YYYYMMDDHHmm');
setBuildTime(formattedTime)
} catch {
}
if (storage.getItem('login')) { if (storage.getItem('login')) {
const login = JSON.parse(storage.getItem('login') as string); const login = JSON.parse(storage.getItem('login') as string);
const data = { const data = {
@ -319,7 +328,8 @@ const Login: React.FC = () => {
><img src={ImageUrl.icon3} alt="" /></div> ><img src={ImageUrl.icon3} alt="" /></div>
</div> </div>
<div> <div>
{version} V{version}-
<span style={{ fontSize: '12px', color: 'gray' }}>{buildTime}</span>
</div> </div>
</div> </div>
</div> </div>