Skip to content

Commit

Permalink
Cleanup links
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksongoode committed Mar 16, 2024
1 parent 3aa4350 commit 44a2657
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 42 deletions.
2 changes: 1 addition & 1 deletion conf/sample.ini
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ default_theme = light
;org_role = Viewer

# mask the Grafana version number for unauthenticated users
;hide_version = false
hide_version = true

#################################### GitHub Auth ##########################
[auth.github]
Expand Down
2 changes: 1 addition & 1 deletion public/app/core/components/Branding/Branding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class Branding {
static LoginBoxBackground = LoginBoxBackground;
static AppTitle = 'GridWatch';
static LoginTitle = 'Welcome to GridWatch';
static HideEdition = false;
static HideEdition = true;
static GetLoginSubTitle = (): null | string => {
return null;
};
Expand Down
81 changes: 41 additions & 40 deletions public/app/core/components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import React from 'react';

import { LinkTarget } from '@grafana/data';
import { config } from '@grafana/runtime';
import { Icon, IconName } from '@grafana/ui';
// import { Icon, IconName } from '@grafana/ui';
import { IconName } from '@grafana/ui';
import { t } from 'app/core/internationalization';

export interface FooterLink {
Expand All @@ -15,27 +16,27 @@ export interface FooterLink {

export let getFooterLinks = (): FooterLink[] => {
return [
// {
// target: '_blank',
// id: 'documentation',
// text: t('nav.help/documentation', 'Documentation'),
// icon: 'document-info',
// url: 'https://grafana.com/docs/grafana/latest/?utm_source=grafana_footer',
// },
// {
// target: '_blank',
// id: 'support',
// text: t('nav.help/support', 'Support'),
// icon: 'question-circle',
// url: 'https://grafana.com/products/enterprise/?utm_source=grafana_footer',
// },
// {
// target: '_blank',
// id: 'community',
// text: t('nav.help/community', 'Community'),
// icon: 'comments-alt',
// url: 'https://community.grafana.com/?utm_source=grafana_footer',
// },
{
target: '_blank',
id: 'documentation',
text: t('nav.help/documentation', 'Documentation'),
icon: 'document-info',
url: 'https://grafana.com/docs/grafana/latest/?utm_source=grafana_footer',
},
{
target: '_blank',
id: 'support',
text: t('nav.help/support', 'Support'),
icon: 'question-circle',
url: 'https://grafana.com/products/enterprise/?utm_source=grafana_footer',
},
{
target: '_blank',
id: 'community',
text: t('nav.help/community', 'Community'),
icon: 'comments-alt',
url: 'https://community.grafana.com/?utm_source=grafana_footer',
},
];
};

Expand Down Expand Up @@ -99,37 +100,37 @@ export interface Props {
}

export const Footer = React.memo(({ customLinks, hideEdition }: Props) => {
const links = (customLinks || getFooterLinks()).concat(getVersionLinks(hideEdition));
// const links = (customLinks || getFooterLinks()).concat(getVersionLinks(hideEdition));

return (
<footer className="footer">
<div className="text-center">
<ul>
{/* <ul>
{links.map((link) => (
<li key={link.text}>
<FooterItem item={link} />
</li>
))}
</ul>
</ul> */}
</div>
</footer>
);
});

Footer.displayName = 'Footer';

function FooterItem({ item }: { item: FooterLink }) {
const content = item.url ? (
<a href={item.url} target={item.target} rel="noopener noreferrer" id={item.id}>
{item.text}
</a>
) : (
item.text
);

return (
<>
{item.icon && <Icon name={item.icon} />} {content}
</>
);
}
// function FooterItem({ item }: { item: FooterLink }) {
// const content = item.url ? (
// <a href={item.url} target={item.target} rel="noopener noreferrer" id={item.id}>
// {item.text}
// </a>
// ) : (
// item.text
// );

// return (
// <>
// {item.icon && <Icon name={item.icon} />} {content}
// </>
// );
// }

0 comments on commit 44a2657

Please sign in to comment.