fix(frontend): reformat source files

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2022-11-30 22:10:23 +01:00 committed by David Mehren
parent e260b77760
commit e390c0dd15
669 changed files with 1741 additions and 2354 deletions

View file

@ -3,12 +3,11 @@
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import React from 'react'
import Head from 'next/head'
import { useAppTitle } from '../../hooks/common/use-app-title'
import { FavIcon } from './fav-icon'
import { useBaseUrl } from '../../hooks/common/use-base-url'
import { FavIcon } from './fav-icon'
import Head from 'next/head'
import React from 'react'
/**
* Sets basic browser meta tags.

View file

@ -3,7 +3,6 @@
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import React, { Fragment } from 'react'
/**

View file

@ -3,11 +3,10 @@
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { useAppTitle } from '../../hooks/common/use-app-title'
import { useNoteTitle } from '../../hooks/common/use-note-title'
import Head from 'next/head'
import React, { useMemo } from 'react'
import { useNoteTitle } from '../../hooks/common/use-note-title'
import { useAppTitle } from '../../hooks/common/use-app-title'
/**
* Sets the note and app title for the browser window

View file

@ -3,14 +3,13 @@
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import React from 'react'
import { ListGroup } from 'react-bootstrap'
import { useTranslation } from 'react-i18next'
import { SettingLine } from '../utils/setting-line'
import { LigatureSettingButtonGroup } from './ligature-setting-button-group'
import { SmartPasteSettingButtonGroup } from './smart-paste-setting-button-group'
import { SyncScrollSettingButtonGroup } from './sync-scroll-setting-button-group'
import React from 'react'
import { ListGroup } from 'react-bootstrap'
import { useTranslation } from 'react-i18next'
/**
* Shows the editor specific settings.

View file

@ -3,11 +3,10 @@
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import React from 'react'
import { OnOffButtonGroup } from '../utils/on-off-button-group'
import { useApplicationState } from '../../../../hooks/common/use-application-state'
import { setEditorLigatures } from '../../../../redux/editor/methods'
import { OnOffButtonGroup } from '../utils/on-off-button-group'
import React from 'react'
/**
* Allows to change if ligatures should be used or not in the editor.

View file

@ -3,11 +3,10 @@
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import React from 'react'
import { OnOffButtonGroup } from '../utils/on-off-button-group'
import { useApplicationState } from '../../../../hooks/common/use-application-state'
import { setEditorSmartPaste } from '../../../../redux/editor/methods'
import { OnOffButtonGroup } from '../utils/on-off-button-group'
import React from 'react'
/**
* Allows to change if smart paste should be used in the editor.

View file

@ -3,11 +3,10 @@
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import React from 'react'
import { OnOffButtonGroup } from '../utils/on-off-button-group'
import { useApplicationState } from '../../../../hooks/common/use-application-state'
import { setEditorSyncScroll } from '../../../../redux/editor/methods'
import { OnOffButtonGroup } from '../utils/on-off-button-group'
import React from 'react'
/**
* Allows to change if editor and rendering should scroll in sync.

View file

@ -3,13 +3,12 @@
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import React, { useCallback } from 'react'
import { ToggleButtonGroup } from 'react-bootstrap'
import { useApplicationState } from '../../../../hooks/common/use-application-state'
import { SettingsToggleButton } from '../utils/settings-toggle-button'
import { setDarkModePreference } from '../../../../redux/dark-mode/methods'
import { DarkModePreference } from '../../../../redux/dark-mode/types'
import { SettingsToggleButton } from '../utils/settings-toggle-button'
import React, { useCallback } from 'react'
import { ToggleButtonGroup } from 'react-bootstrap'
/**
* Allows to change if the app should enforce dark mode, light mode or let the browser decide.

View file

@ -3,12 +3,11 @@
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import React from 'react'
import { DarkModeSettingButtonGroup } from './dark-mode-setting-button-group'
import { ListGroup } from 'react-bootstrap'
import { LanguagePicker } from './language-picker'
import { SettingLine } from '../utils/setting-line'
import { DarkModeSettingButtonGroup } from './dark-mode-setting-button-group'
import { LanguagePicker } from './language-picker'
import React from 'react'
import { ListGroup } from 'react-bootstrap'
/**
* Contains global settings that influence every page of the app.

View file

@ -3,13 +3,12 @@
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { cypressId } from '../../../../utils/cypress-attribute'
import { Logger } from '../../../../utils/logger'
import { Settings } from 'luxon'
import React, { useCallback, useMemo } from 'react'
import { Form } from 'react-bootstrap'
import { useTranslation } from 'react-i18next'
import { Logger } from '../../../../utils/logger'
import { cypressId } from '../../../../utils/cypress-attribute'
const log = new Logger('LanguagePicker')
const languages = {

View file

@ -3,13 +3,12 @@
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import React, { Fragment } from 'react'
import { useBooleanState } from '../../../hooks/common/use-boolean-state'
import { cypressId } from '../../../utils/cypress-attribute'
import { IconButton } from '../../common/icon-button/icon-button'
import { SettingsModal } from './settings-modal'
import React, { Fragment } from 'react'
import type { ButtonProps } from 'react-bootstrap'
import { cypressId } from '../../../utils/cypress-attribute'
export type SettingsButtonProps = Omit<ButtonProps, 'onClick'>
/**

View file

@ -3,14 +3,13 @@
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import React from 'react'
import type { CommonModalProps } from '../../common/modals/common-modal'
import { CommonModal } from '../../common/modals/common-modal'
import { Modal, Tab, Tabs } from 'react-bootstrap'
import { t } from 'i18next'
import { GlobalSettingsTabContent } from './global/global-settings-tab-content'
import { EditorSettingsTabContent } from './editor/editor-settings-tab-content'
import { GlobalSettingsTabContent } from './global/global-settings-tab-content'
import { t } from 'i18next'
import React from 'react'
import { Modal, Tab, Tabs } from 'react-bootstrap'
/**
* Shows global and scope specific settings

View file

@ -3,10 +3,9 @@
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { act, render, screen } from '@testing-library/react'
import { OnOffButtonGroup } from './on-off-button-group'
import { mockI18n } from '../../../markdown-renderer/test-utils/mock-i18n'
import { OnOffButtonGroup } from './on-off-button-group'
import { act, render, screen } from '@testing-library/react'
describe('Settings On-Off Button Group', () => {
beforeAll(mockI18n)

View file

@ -3,11 +3,10 @@
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { testId } from '../../../../utils/test-id'
import { SettingsToggleButton } from './settings-toggle-button'
import React, { useCallback, useMemo } from 'react'
import { ToggleButtonGroup } from 'react-bootstrap'
import { SettingsToggleButton } from './settings-toggle-button'
import { testId } from '../../../../utils/test-id'
enum OnOffState {
ON,

View file

@ -3,7 +3,6 @@
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import type { PropsWithChildren } from 'react'
import React from 'react'
import { Col, ListGroup, Row } from 'react-bootstrap'

View file

@ -3,12 +3,11 @@
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import type { PropsWithDataTestId } from '../../../../utils/test-id'
import React, { useCallback, useMemo } from 'react'
import type { ButtonProps } from 'react-bootstrap'
import { Button } from 'react-bootstrap'
import { Trans, useTranslation } from 'react-i18next'
import type { PropsWithDataTestId } from '../../../../utils/test-id'
type DarkModeToggleButtonProps = Omit<ButtonProps, 'onSelect'> &
PropsWithDataTestId & {