@@ -39,7 +39,7 @@ import {
39
39
Typography ,
40
40
TelemetryPixel ,
41
41
} from '@superset-ui/core/components' ;
42
- import type { MenuItem } from '@superset-ui/core/components/Menu' ;
42
+ import type { ItemType , MenuItem } from '@superset-ui/core/components/Menu' ;
43
43
import { ensureAppRoot } from 'src/utils/pathUtils' ;
44
44
import { findPermission } from 'src/utils/findPermission' ;
45
45
import { isUserAdmin } from 'src/dashboard/util/permissionUtils' ;
@@ -63,14 +63,6 @@ import {
63
63
64
64
const extensionsRegistry = getExtensionsRegistry ( ) ;
65
65
66
- const versionInfoStyles = ( theme : SupersetTheme ) => css `
67
- padding : ${ theme . sizeUnit * 1.5 } px ${ theme . sizeUnit * 4 } px
68
- ${ theme . sizeUnit * 4 } px ${ theme . sizeUnit * 7 } px;
69
- color : ${ theme . colorText } ;
70
- font-size : ${ theme . fontSizeSM } px;
71
- white-space : nowrap;
72
- ` ;
73
-
74
66
const StyledDiv = styled . div < { align : string } > `
75
67
display: flex;
76
68
height: 100%;
@@ -520,42 +512,42 @@ const RightMenu = ({
520
512
if ( navbarRight . version_string || navbarRight . version_sha ) {
521
513
items . push ( { type : 'divider' , key : 'version-info-divider' } ) ;
522
514
523
- items . push ( {
515
+ const aboutItem : ItemType = {
524
516
type : 'group' ,
525
517
label : t ( 'About' ) ,
526
518
key : 'about-section' ,
527
519
children : [
528
520
{
529
521
key : 'about-info' ,
522
+ style : { height : 'auto' , minHeight : 'auto' } ,
530
523
label : (
531
- < div className = "about-section" >
532
- { navbarRight . show_watermark && (
533
- < div css = { versionInfoStyles } >
534
- { t ( 'Powered by Apache Superset' ) }
535
- </ div >
536
- ) }
537
- { navbarRight . version_string && (
538
- < div css = { versionInfoStyles } >
539
- { t ( 'Version' ) } : { navbarRight . version_string }
540
- </ div >
541
- ) }
542
- { navbarRight . version_sha && (
543
- < div css = { versionInfoStyles } >
544
- { t ( 'SHA' ) } : { navbarRight . version_sha }
545
- </ div >
546
- ) }
547
- { navbarRight . build_number && (
548
- < div css = { versionInfoStyles } >
549
- { t ( 'Build' ) } : { navbarRight . build_number }
550
- </ div >
551
- ) }
524
+ < div
525
+ css = { ( theme : SupersetTheme ) => css `
526
+ font-size : ${ theme . fontSizeSM } px;
527
+ color : ${ theme . colorTextSecondary || theme . colorText } ;
528
+ white-space : pre-wrap;
529
+ padding : ${ theme . sizeUnit } px ${ theme . sizeUnit * 2 } px;
530
+ ` }
531
+ >
532
+ { [
533
+ navbarRight . show_watermark &&
534
+ t ( 'Powered by Apache Superset' ) ,
535
+ navbarRight . version_string &&
536
+ `${ t ( 'Version' ) } : ${ navbarRight . version_string } ` ,
537
+ navbarRight . version_sha &&
538
+ `${ t ( 'SHA' ) } : ${ navbarRight . version_sha } ` ,
539
+ navbarRight . build_number &&
540
+ `${ t ( 'Build' ) } : ${ navbarRight . build_number } ` ,
541
+ ]
542
+ . filter ( Boolean )
543
+ . join ( '\n' ) }
552
544
</ div >
553
545
) ,
554
546
} ,
555
547
] ,
556
- } ) ;
548
+ } ;
549
+ items . push ( aboutItem ) ;
557
550
}
558
-
559
551
return items ;
560
552
} ;
561
553
0 commit comments