fix(style): use --app-banner-height in scroller container

This commit is contained in:
jialin
2026-05-21 19:58:16 +08:00
committed by jialin
parent e7a376db70
commit 6f896b4f94
11 changed files with 68 additions and 32 deletions
+1 -1
View File
@@ -6,6 +6,7 @@
html { html {
--page-header-height: 56px; --page-header-height: 56px;
--page-content-padding: 8px; --page-content-padding: 8px;
--app-banner-height: 0px;
--color-text-light-1: rgba(255, 255, 255, 90%); --color-text-light-1: rgba(255, 255, 255, 90%);
--color-fill-1: var(--ant-color-bg-container); --color-fill-1: var(--ant-color-bg-container);
--color-scrollbar-thumb: rgba(193, 193, 193, 80%); --color-scrollbar-thumb: rgba(193, 193, 193, 80%);
@@ -237,7 +238,6 @@ body {
// ============== new theme style start =============== // ============== new theme style start ===============
.ant-pro-layout { .ant-pro-layout {
background-color: var(--color-fill-1);
height: 100%; height: 100%;
.ant-pro-sider-footer { .ant-pro-sider-footer {
+26 -17
View File
@@ -425,24 +425,33 @@ export default (props: any) => {
{...runtimeConfig} {...runtimeConfig}
ErrorBoundary={ErrorBoundary} ErrorBoundary={ErrorBoundary}
> >
<PluginExtraFields name="GlobalLicenseBanner" /> <div
<Exception style={{
route={matchedRoute} display: 'flex',
notFound={runtimeConfig?.notFound} flexDirection: 'column',
noFound={runtimeConfig?.noFound} height: '100vh',
unAccessible={runtimeConfig?.unAccessible} overflow: 'hidden'
noAccessible={runtimeConfig?.noAccessible} }}
> >
{isNoContainerPage ? ( <PluginExtraFields name="GlobalLicenseBanner" />
<Outlet /> <Exception
) : ( route={matchedRoute}
<PageContainerInner> notFound={runtimeConfig?.notFound}
<div> noFound={runtimeConfig?.noFound}
<Outlet /> unAccessible={runtimeConfig?.unAccessible}
</div> noAccessible={runtimeConfig?.noAccessible}
</PageContainerInner> >
)} {isNoContainerPage ? (
</Exception> <Outlet />
) : (
<PageContainerInner>
<div>
<Outlet />
</div>
</PageContainerInner>
)}
</Exception>
</div>
{NoResourceModal} {NoResourceModal}
{contextHolder} {contextHolder}
</ProLayout> </ProLayout>
+22 -1
View File
@@ -1,4 +1,9 @@
.containerWrapper { .containerWrapper {
display: flex;
flex-direction: column;
flex: 1;
min-height: 0;
:global { :global {
.ant-affix { .ant-affix {
top: 0 !important; top: 0 !important;
@@ -17,8 +22,24 @@
font-size: 16px; font-size: 16px;
} }
.ant-pro-page-container {
display: flex;
flex-direction: column;
min-height: 0;
}
.ant-pro-grid-content,
.ant-pro-grid-content-children {
display: flex;
flex-direction: column;
flex: 1;
min-height: 0;
}
.ant-pro-page-container-children-container { .ant-pro-page-container-children-container {
height: calc(100vh - 16px); flex: 1;
min-height: 0;
height: auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
border: 1px solid var(--color-border-container); border: 1px solid var(--color-border-container);
+1 -1
View File
@@ -60,7 +60,7 @@ const FilterFormContent: React.FC<FilterFormContentProps> = forwardRef(
<FilterForm <FilterForm
ref={filterRef} ref={filterRef}
width={232} width={232}
contentHeight={'calc(100vh - 122px)'} contentHeight={'calc(100vh - var(--app-banner-height, 0px) - 122px)'}
open={open} open={open}
onClose={onClose} onClose={onClose}
onClear={onClear} onClear={onClear}
@@ -331,7 +331,9 @@ const ClusterCreate: React.FC<{
)} )}
<ColumnWrapper <ColumnWrapper
maxHeight={ maxHeight={
isAddWorkerStep ? 'calc(100vh - 200px)' : 'calc(100vh - 150px)' isAddWorkerStep
? 'calc(100vh - var(--app-banner-height, 0px) - 200px)'
: 'calc(100vh - var(--app-banner-height, 0px) - 150px)'
} }
styles={{ styles={{
container: { paddingTop: 16, paddingBottom: 16 } container: { paddingTop: 16, paddingBottom: 16 }
+1 -1
View File
@@ -50,7 +50,7 @@ const FilterFormContent: React.FC<FilterFormContentProps> = forwardRef(
<FilterForm <FilterForm
ref={filterRef} ref={filterRef}
width={232} width={232}
contentHeight={'calc(100vh - 74px)'} contentHeight={'calc(100vh - var(--app-banner-height, 0px) - 74px)'}
open={open} open={open}
onClose={onClose} onClose={onClose}
onClear={onClear} onClear={onClear}
@@ -39,7 +39,7 @@ const MultiCompare: React.FC<MultiCompareProps> = ({ modelList, loaded }) => {
const modelsCounterMap = useRef<Record<string, number>>({}); const modelsCounterMap = useRef<Record<string, number>>({});
const modelRefs = useRef<any>({}); const modelRefs = useRef<any>({});
const chatListScrollRef = useRef<any>(null); const chatListScrollRef = useRef<any>(null);
const boxHeight = `calc(100vh - ${HEADER_HEIGHT}px - 2px - var(--page-header-height) - var(--page-content-padding) - var(--page-content-padding))`; const boxHeight = `calc(100vh - var(--app-banner-height, 0px) - ${HEADER_HEIGHT}px - 2px - var(--page-header-height) - var(--page-content-padding) - var(--page-content-padding))`;
const [actions, setActions] = useState<MessageItemAction[]>([ const [actions, setActions] = useState<MessageItemAction[]>([
'upload', 'upload',
'delete', 'delete',
+1 -1
View File
@@ -300,7 +300,7 @@ const GroundSTT: React.FC<MessageProps> = forwardRef((props, ref) => {
<div <div
className="ground-left-wrapper" className="ground-left-wrapper"
style={{ style={{
height: `calc(100vh - ${HEADER_HEIGHT}px)` height: `calc(100vh - var(--app-banner-height, 0px) - ${HEADER_HEIGHT}px)`
}} }}
> >
<div className="ground-left"> <div className="ground-left">
+3 -2
View File
@@ -10,8 +10,9 @@
flex-direction: column; flex-direction: column;
position: relative; position: relative;
height: calc( height: calc(
100vh - @HEADER_HEIGHT - 4px - var(--page-content-padding) - 100vh - var(--app-banner-height, 0px) - @HEADER_HEIGHT - 4px -
var(--page-content-padding) - var(--page-header-height) var(--page-content-padding) - var(--page-content-padding) -
var(--page-header-height)
); );
width: calc(100% - 390px); width: calc(100% - 390px);
@@ -6,8 +6,9 @@
border-left: 1px solid var(--ant-color-split); border-left: 1px solid var(--ant-color-split);
transition: width 0.3s ease; transition: width 0.3s ease;
height: calc( height: calc(
100vh - @HEADER_HEIGHT - 2px - var(--page-content-padding) - 100vh - var(--app-banner-height, 0px) - @HEADER_HEIGHT - 2px -
var(--page-content-padding) - var(--page-header-height) var(--page-content-padding) - var(--page-content-padding) -
var(--page-header-height)
); );
padding-top: 16px; padding-top: 16px;
display: flex; display: flex;
+6 -4
View File
@@ -40,8 +40,9 @@
.params { .params {
overflow: hidden; overflow: hidden;
height: calc( height: calc(
100vh - var(--page-header-height) - var(--page-content-padding) - 100vh - var(--app-banner-height, 0px) - var(--page-header-height) -
var(--page-content-padding) - @HEADER_HEIGHT var(--page-content-padding) - var(--page-content-padding) -
@HEADER_HEIGHT
); );
.collapse { .collapse {
@@ -74,8 +75,9 @@
.ant-divider { .ant-divider {
margin: 0; margin: 0;
height: calc( height: calc(
100vh - var(--page-header-height) - 2px - var(--page-content-padding) - 100vh - var(--app-banner-height, 0px) - var(--page-header-height) -
var(--page-content-padding) - @HEADER_HEIGHT 2px - var(--page-content-padding) - var(--page-content-padding) -
@HEADER_HEIGHT
); );
} }
} }