mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-21 17:26:29 -05:00
misc: remove features page buttons
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
6cc288a2ea
commit
4e3c1ede0e
5 changed files with 2 additions and 47 deletions
|
@ -26,17 +26,6 @@ describe('Intro page', () => {
|
|||
})
|
||||
})
|
||||
|
||||
describe('features button', () => {
|
||||
it('is hidden when logged in', () => {
|
||||
cy.getByCypressId('features-button').should('not.exist')
|
||||
})
|
||||
|
||||
it('is visible when logged out', () => {
|
||||
cy.logout()
|
||||
cy.getByCypressId('features-button').should('exist')
|
||||
})
|
||||
})
|
||||
|
||||
describe('sign in button', () => {
|
||||
it('is hidden when logged in', () => {
|
||||
cy.getByCypressId('sign-in-button').should('not.exist')
|
||||
|
|
|
@ -57,7 +57,6 @@
|
|||
},
|
||||
"landing": {
|
||||
"intro": {
|
||||
"exploreFeatures": "Explore all features",
|
||||
"markdownWhileLoading": "Loading...",
|
||||
"markdownLoadingError": "Error while fetching intro content"
|
||||
},
|
||||
|
@ -262,7 +261,6 @@
|
|||
},
|
||||
"documents": {
|
||||
"title": "Documents",
|
||||
"features": "Features",
|
||||
"yamlMetadata": "YAML Metadata",
|
||||
"slideExample": "Slide Example"
|
||||
}
|
||||
|
|
|
@ -71,14 +71,6 @@ export const LinksTabContent: React.FC = () => {
|
|||
</h3>
|
||||
<div>
|
||||
<ul className='list-unstyled'>
|
||||
<li>
|
||||
<TranslatedInternalLink
|
||||
i18nKey='editor.help.documents.features'
|
||||
href='/n/features'
|
||||
icon={IconDot}
|
||||
className='text-primary'
|
||||
/>
|
||||
</li>
|
||||
<li>
|
||||
<TranslatedInternalLink
|
||||
i18nKey='editor.help.documents.yamlMetadata'
|
||||
|
|
|
@ -4,19 +4,12 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
import { useApplicationState } from '../../../hooks/common/use-application-state'
|
||||
import { cypressId } from '../../../utils/cypress-attribute'
|
||||
import { ShowIf } from '../../common/show-if/show-if'
|
||||
import { SignInButton } from '../../landing-layout/navigation/sign-in-button'
|
||||
import './cover-buttons.module.scss'
|
||||
import Link from 'next/link'
|
||||
import styles from './cover-buttons.module.scss'
|
||||
import React from 'react'
|
||||
import { Button } from 'react-bootstrap'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
|
||||
export const CoverButtons: React.FC = () => {
|
||||
useTranslation()
|
||||
const userExists = useApplicationState((state) => !!state.user)
|
||||
const anyAuthProviderActivated = useApplicationState((state) => state.config.authProviders.length > 0)
|
||||
|
||||
if (userExists) {
|
||||
return null
|
||||
|
@ -24,17 +17,7 @@ export const CoverButtons: React.FC = () => {
|
|||
|
||||
return (
|
||||
<div className='mb-5'>
|
||||
<SignInButton className='cover-button' variant='success' size='lg' />
|
||||
<ShowIf condition={anyAuthProviderActivated}>
|
||||
<span className='m-2'>
|
||||
<Trans i18nKey='common.or' />
|
||||
</span>
|
||||
</ShowIf>
|
||||
<Link href='/n/features' passHref={true}>
|
||||
<Button {...cypressId('features-button')} className='cover-button' variant='primary' size='lg'>
|
||||
<Trans i18nKey='landing.intro.exploreFeatures' />
|
||||
</Button>
|
||||
</Link>
|
||||
<SignInButton className={styles['cover-button']} variant='success' size='lg' />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@ import { SignOutDropdownButton } from './sign-out-dropdown-button'
|
|||
import Link from 'next/link'
|
||||
import React from 'react'
|
||||
import { Dropdown } from 'react-bootstrap'
|
||||
import { Lightning as IconLightning } from 'react-bootstrap-icons'
|
||||
import { Person as IconPerson } from 'react-bootstrap-icons'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
|
||||
|
@ -33,12 +32,6 @@ export const UserDropdown: React.FC = () => {
|
|||
</Dropdown.Toggle>
|
||||
|
||||
<Dropdown.Menu className='text-start'>
|
||||
<Link href={'/n/features'} passHref={true} legacyBehavior={true}>
|
||||
<Dropdown.Item dir='auto' {...cypressId('user-dropdown-features-button')}>
|
||||
<UiIcon icon={IconLightning} className='mx-2' />
|
||||
<Trans i18nKey='editor.help.documents.features' />
|
||||
</Dropdown.Item>
|
||||
</Link>
|
||||
<Link href={'/profile'} passHref={true} legacyBehavior={true}>
|
||||
<Dropdown.Item dir='auto' {...cypressId('user-dropdown-profile-button')}>
|
||||
<UiIcon icon={IconPerson} className='mx-2' />
|
||||
|
|
Loading…
Reference in a new issue