style(web): format code

This commit is contained in:
QuentinHsu
2025-04-04 12:00:38 +08:00
parent 424424c160
commit 6b79b89dc0
74 changed files with 6413 additions and 3548 deletions

View File

@@ -40,19 +40,19 @@ const Home = () => {
setHomePageContent(content);
localStorage.setItem('home_page_content', content);
// 如果内容是 URL则发送主题模式
if (data.startsWith('https://')) {
const iframe = document.querySelector('iframe');
if (iframe) {
const theme = localStorage.getItem('theme-mode') || 'light';
// 测试是否正确传递theme-mode给iframe
// console.log('Sending theme-mode to iframe:', theme);
iframe.onload = () => {
iframe.contentWindow.postMessage({ themeMode: theme }, '*');
iframe.contentWindow.postMessage({ lang: i18n.language }, '*');
};
}
// 如果内容是 URL则发送主题模式
if (data.startsWith('https://')) {
const iframe = document.querySelector('iframe');
if (iframe) {
const theme = localStorage.getItem('theme-mode') || 'light';
// 测试是否正确传递theme-mode给iframe
// console.log('Sending theme-mode to iframe:', theme);
iframe.onload = () => {
iframe.contentWindow.postMessage({ themeMode: theme }, '*');
iframe.contentWindow.postMessage({ lang: i18n.language }, '*');
};
}
}
} else {
showError(message);
setHomePageContent('加载首页内容失败...');
@@ -99,7 +99,9 @@ const Home = () => {
</span>
}
>
<p>{t('名称')}{statusState?.status?.system_name}</p>
<p>
{t('名称')}{statusState?.status?.system_name}
</p>
<p>
{t('版本')}
{statusState?.status?.version
@@ -126,7 +128,9 @@ const Home = () => {
Apache-2.0 License
</a>
</p>
<p>{t('启动时间')}{getStartTimeString()}</p>
<p>
{t('启动时间')}{getStartTimeString()}
</p>
</Card>
</Col>
<Col span={12}>
@@ -158,8 +162,8 @@ const Home = () => {
<p>
{t('OIDC 身份验证')}
{statusState?.status?.oidc === true
? t('已启用')
: t('未启用')}
? t('已启用')
: t('未启用')}
</p>
<p>
{t('微信身份验证')}