Skip to content

Commit 6d28e8b

Browse files
committed
Post merge fixes, remove unused footer links
1 parent 13000fc commit 6d28e8b

1 file changed

Lines changed: 47 additions & 4 deletions

File tree

public/app/core/components/Footer/Footer.tsx

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { memo } from 'react';
33

44
import { GrafanaTheme2, LinkTarget } from '@grafana/data';
55
import { config } from '@grafana/runtime';
6-
import { IconName } from '@grafana/ui';
6+
import { IconName, useStyles2 } from '@grafana/ui';
77
import { t } from 'app/core/internationalization';
88

99
export interface FooterLink {
@@ -51,8 +51,8 @@ export function getVersionMeta(version: string) {
5151

5252
export function getVersionLinks(hideEdition?: boolean): FooterLink[] {
5353
const { buildInfo, licenseInfo } = config;
54-
const links: FooterLink[] = [];
5554
const stateInfo = licenseInfo.stateInfo ? ` (${licenseInfo.stateInfo})` : '';
55+
const links: FooterLink[] = [];
5656

5757
if (!hideEdition) {
5858
links.push({
@@ -99,11 +99,54 @@ export interface Props {
9999
hideEdition?: boolean;
100100
}
101101

102-
export const Footer = React.memo(({ customLinks, hideEdition }: Props) => {
102+
export const Footer = memo(({ customLinks, hideEdition }: Props) => {
103+
const styles = useStyles2(getStyles);
104+
const d = new Date();
105+
const year = d.getFullYear();
106+
103107
return (
104-
<footer className="footer">
108+
<footer className={styles.footer}>
109+
<div className="text-center">
110+
<ul className={styles.list}>
111+
Copyright &copy; {year} <a href="http://storpool.com" target="_blank">StorPool Storage</a>.
112+
</ul>
113+
</div>
105114
</footer>
106115
);
107116
});
108117

109118
Footer.displayName = 'Footer';
119+
120+
const getStyles = (theme: GrafanaTheme2) => ({
121+
footer: css({
122+
...theme.typography.bodySmall,
123+
color: theme.colors.text.primary,
124+
display: 'block',
125+
padding: theme.spacing(2, 0),
126+
position: 'relative',
127+
width: '98%',
128+
129+
'a:hover': {
130+
color: theme.colors.text.maxContrast,
131+
textDecoration: 'underline',
132+
},
133+
134+
[theme.breakpoints.down('md')]: {
135+
display: 'none',
136+
},
137+
}),
138+
list: css({
139+
listStyle: 'none',
140+
}),
141+
listItem: css({
142+
display: 'inline-block',
143+
'&:after': {
144+
content: "' | '",
145+
padding: theme.spacing(0, 1),
146+
},
147+
'&:last-child:after': {
148+
content: "''",
149+
paddingLeft: 0,
150+
},
151+
}),
152+
});

0 commit comments

Comments
 (0)