文件操作 - Branding.tsx
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/grafana/public/app/core/components/Branding/Branding.tsx
编辑文件内容
import React, { FC } from 'react'; import { css, cx } from 'emotion'; import { useTheme } from '@grafana/ui'; export interface BrandComponentProps { className?: string; children?: JSX.Element | JSX.Element[]; } const LoginLogo: FC<BrandComponentProps> = ({ className }) => { return <img className={className} src="public/img/grafana_icon.svg" alt="Grafana" />; }; const LoginBackground: FC<BrandComponentProps> = ({ className, children }) => { const theme = useTheme(); const background = css` background: url(public/img/login_background_${theme.isDark ? 'dark' : 'light'}.svg); background-size: cover; `; return <div className={cx(background, className)}>{children}</div>; }; const MenuLogo: FC<BrandComponentProps> = ({ className }) => { return <img className={className} src="public/img/grafana_icon.svg" alt="Grafana" />; }; const LoginBoxBackground = () => { const theme = useTheme(); return css` background: ${theme.isLight ? 'rgba(6, 30, 200, 0.1 )' : 'rgba(18, 28, 41, 0.65)'}; background-size: cover; `; }; export class Branding { static LoginLogo = LoginLogo; static LoginBackground = LoginBackground; static MenuLogo = MenuLogo; static LoginBoxBackground = LoginBoxBackground; static AppTitle = 'Grafana'; static LoginTitle = 'Welcome to Grafana'; static GetLoginSubTitle = () => { const slogans = [ "Don't get in the way of the data", 'Your single pane of glass', 'Built better together', 'Democratising data', ]; const count = slogans.length; return slogans[Math.floor(Math.random() * count)]; }; }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件