This commit is contained in:
2026-06-29 11:46:10 +08:00
parent 31d2a0d6cd
commit f4a6be6e39
8 changed files with 63 additions and 44 deletions
File diff suppressed because one or more lines are too long
+8 -1
View File
@@ -57,7 +57,14 @@ const AdminSettings: React.FC = () => {
// Update local state
setConfigs(prev => prev.map(c => c.key === configKey ? { ...c, value: res.url } : c));
form.setFieldsValue({ [configKey]: res.url });
message.success('PDF上传成功');
// Find the config and update to database
const config = configs.find(c => c.key === configKey);
if (config) {
await updateSystemConfig(config.id, res.url);
}
message.success('PDF上传成功并已保存');
} catch {
message.error('上传失败');
} finally {
+6 -1
View File
@@ -188,12 +188,17 @@ async def _seed_data():
existing = await db.execute(
select(SystemConfig).where(SystemConfig.key == key).limit(1)
)
if not existing.scalar_one_or_none():
existing_config = existing.scalar_one_or_none()
if not existing_config:
db.add(
SystemConfig(
id=generate_id(), key=key, value=value, description=desc
)
)
elif not existing_config.description and desc:
# Update description if not set
existing_config.description = desc
db.add(existing_config)
# Seed video engine
existing_engine = await db.execute(
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -28,8 +28,8 @@
}
})();
</script>
<script type="module" crossorigin src="/assets/index-DfeTf28z.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-kgalXG5i.css">
<script type="module" crossorigin src="/assets/index-DqXiP0qO.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-Dpio-rCr.css">
</head>
<body>
<div id="root"></div>
+11 -6
View File
@@ -183,27 +183,32 @@
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
justify-content: center;
z-index: 1;
padding: 32px 16px 32px;
overflow-y: auto;
padding: 16px 16px 60px;
position: relative;
}
.login-right-section-inner {
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
width: 100%;
max-width: 440px;
}
.login-copyright {
.login-copyright-wrapper {
position: absolute;
bottom: 24px;
left: 0;
right: 0;
text-align: center;
}
.login-copyright {
color: rgba(255,255,255,0.7);
font-size: 12px;
letter-spacing: 0.5px;
padding-top: 8px;
}
@media (min-width: 900px) {
+5 -3
View File
@@ -482,12 +482,14 @@ const LoginPage: React.FC = () => {
)}
</div>
</Card>
{siteCopyright && (
</div>
{siteCopyright && (
<div className="login-copyright-wrapper">
<div className="login-copyright">
{siteCopyright}
</div>
)}
</div>
</div>
)}
</div>
</div>
);