style: body and side menu scrollbar style

This commit is contained in:
jialin
2024-10-21 11:36:54 +08:00
parent 33a21f2aaa
commit 57386eeb55
5 changed files with 66 additions and 14 deletions
+15
View File
@@ -34,6 +34,21 @@
justify-content: flex-start;
font-size: var(--font-size-middle);
}
.dev.val {
display: flex;
flex-direction: column;
.item {
display: flex;
}
.tl {
display: flex;
justify-content: flex-start;
width: 60px;
}
}
}
.upgrade {
+30 -8
View File
@@ -10,6 +10,11 @@ const VersionInfo: React.FC<{ intl: any }> = ({ intl }) => {
const latestVersion = getAtomStorage(UpdateCheckAtom).latest_version;
const currentVersion = getAtomStorage(GPUStackVersionAtom)?.version;
const isProd =
document.documentElement.getAttribute('data-env') === 'production';
const uiVersion = document.documentElement.getAttribute('data-version');
return (
<div className="version-box">
<div className="img">
@@ -17,14 +22,31 @@ const VersionInfo: React.FC<{ intl: any }> = ({ intl }) => {
</div>
<div className="ver">
<span className="label">
{' '}
{intl.formatMessage({ id: 'common.footer.version' })}
</span>
<span className="val">
{getAtomStorage(GPUStackVersionAtom)?.version ||
getAtomStorage(GPUStackVersionAtom)?.git_commit}
</span>
{isProd && (
<span className="label">
{intl.formatMessage({ id: 'common.footer.version' })}
</span>
)}
{isProd ? (
<span className="val">
{getAtomStorage(GPUStackVersionAtom)?.version ||
getAtomStorage(GPUStackVersionAtom)?.git_commit}
</span>
) : (
<span className="val dev">
<span className="item">
<span className="tl">
{' '}
{intl.formatMessage({ id: 'common.footer.version.server' })}
</span>
{getAtomStorage(GPUStackVersionAtom)?.git_commit}
</span>
<span className="item">
<span className="tl">UI</span>
{uiVersion}
</span>
</span>
)}
</div>
{getAtomStorage(userAtom)?.is_admin && (
<div className="upgrade">