mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-07-05 17:31:22 +02:00
Add backer link
This commit is contained in:
@@ -17,6 +17,7 @@ import { MediaHeaderBottom } from '../Media/MediaHeaderBottom';
|
||||
import { Tabs } from './Tabs';
|
||||
import { CustomScript } from '../../../models';
|
||||
import { ArrowTopRightOnSquareIcon, BoltIcon, PlusIcon } from '@heroicons/react/24/outline';
|
||||
import { HeartIcon } from '@heroicons/react/24/solid';
|
||||
import { useLocation, useNavigate } from 'react-router-dom';
|
||||
import { routePaths } from '../..';
|
||||
import { useEffect, useMemo } from 'react';
|
||||
@@ -31,6 +32,7 @@ import * as l10n from '@vscode/l10n';
|
||||
import { LocalizationKey } from '../../../localization';
|
||||
import { SettingsLink } from '../SettingsView/SettingsLink';
|
||||
import { Link } from '../Common/Link';
|
||||
import { SPONSOR_LINK } from '../../../constants';
|
||||
|
||||
export interface IHeaderProps {
|
||||
header?: React.ReactNode;
|
||||
@@ -147,13 +149,13 @@ export const Header: React.FunctionComponent<IHeaderProps> = ({
|
||||
<div className={`mb-0 border-b flex justify-between bg-[var(--vscode-editor-background)] text-[var(--vscode-editor-foreground)] border-[var(--frontmatter-border)]`}>
|
||||
<Tabs onNavigate={updateView} />
|
||||
|
||||
<div className='flex items-center'>
|
||||
<div className='flex items-center space-x-2 pr-4'>
|
||||
<ProjectSwitcher />
|
||||
|
||||
{
|
||||
settings?.websiteUrl && (
|
||||
<Link
|
||||
className='inline-flex items-center mr-2'
|
||||
className='inline-flex items-center'
|
||||
href={settings?.websiteUrl}
|
||||
title={settings?.websiteUrl}>
|
||||
<span>{settings?.websiteUrl}</span>
|
||||
@@ -163,6 +165,19 @@ export const Header: React.FunctionComponent<IHeaderProps> = ({
|
||||
)
|
||||
}
|
||||
|
||||
{
|
||||
!settings?.isBacker && (
|
||||
<Link
|
||||
className='inline-flex items-center text-[var(--vscode-badge-background)]'
|
||||
title={l10n.t(LocalizationKey.commonSupport)}
|
||||
href={SPONSOR_LINK}
|
||||
>
|
||||
<span className='sr-only'>{l10n.t(LocalizationKey.commonSupport)}</span>
|
||||
<HeartIcon className='w-4 h-4' aria-hidden="true" />
|
||||
</Link>
|
||||
)
|
||||
}
|
||||
|
||||
<SettingsLink onNavigate={updateView} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user