Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@ import SideNavigator from './SideNavigator'
import Router from './Router'
import GlobalStyle from './GlobalStyle'
import { ThemeProvider } from 'styled-components'
import { defaultTheme } from '../lib/styled/themes/default'
import { darkTheme } from '../lib/styled/themes/dark'
import { lightTheme } from '../lib/styled/themes/light'
import { sepiaTheme } from '../lib/styled/themes/sepia'
import { solarizedDarkTheme } from '../lib/styled/themes/solarizedDark'
import { defaultTheme } from 'Lib/styled/themes/default'
import { darkTheme } from 'Lib/styled/themes/dark'
import { lightTheme } from 'Lib/styled/themes/light'
import { sepiaTheme } from 'Lib/styled/themes/sepia'
import { solarizedDarkTheme } from 'Lib/styled/themes/solarizedDark'
import { StyledAppContainer } from './styled'
import ContextMenu from './ContextMenu'
import Dialog from './Dialog/Dialog'
import { useDb } from '../lib/db'
import { useDb } from 'Lib/db'
import TwoPaneLayout from './atoms/TwoPaneLayout'
import PreferencesModal from './PreferencesModal/PreferencesModal'
import { useGlobalKeyDownHandler, isWithGeneralCtrlKey } from '../lib/keyboard'
import { usePreferences } from '../lib/preferences'
import '../lib/i18n'
import '../lib/analytics'
import { useGlobalKeyDownHandler, isWithGeneralCtrlKey } from 'Lib/keyboard'
import { usePreferences } from 'Lib/preferences'
import 'Lib/i18n'
import 'Lib/analytics'
import CodeMirrorStyle from './CodeMirrorStyle'
import { useGeneralStatus } from '../lib/generalStatus'
import { useGeneralStatus } from 'Lib/generalStatus'
import Modal from './Modal'
import ToastList from './Toast'
import { useToast } from '../lib/toast'
import { useUsers } from '../lib/accounts'
import styled from '../lib/styled'
import { useToast } from 'Lib/toast'
import { useUsers } from 'Lib/accounts'
import styled from 'Lib/styled'

export const LoadingText = styled.div`
margin: 30px;
Expand Down
12 changes: 6 additions & 6 deletions src/components/AttachmentsPage/AttachmentList.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React, { useMemo } from 'react'
import styled from '../../lib/styled'
import { NoteStorage, Attachment } from '../../lib/db/types'
import { useContextMenu, MenuTypes } from '../../lib/contextMenu'
import { downloadBlob } from '../../lib/download'
import { useDialog, DialogIconTypes } from '../../lib/dialog'
import { useDb } from '../../lib/db'
import styled from 'Lib/styled'
import { NoteStorage, Attachment } from 'Lib/db/types'
import { useContextMenu, MenuTypes } from 'Lib/contextMenu'
import { downloadBlob } from 'Lib/download'
import { useDialog, DialogIconTypes } from 'Lib/dialog'
import { useDb } from 'Lib/db'

const ListContainer = styled.div`
display: flex;
Expand Down
10 changes: 5 additions & 5 deletions src/components/AttachmentsPage/AttachmentsPage.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react'
import { StorageAttachmentsRouteParams, useRouteParams } from '../../lib/router'
import { useDb } from '../../lib/db'
import styled from '../../lib/styled'
import { getFileList } from '../../lib/dnd'
import { borderBottom } from '../../lib/styled/styleFunctions'
import { StorageAttachmentsRouteParams, useRouteParams } from 'Lib/router'
import { useDb } from 'Lib/db'
import styled from 'Lib/styled'
import { getFileList } from 'Lib/dnd'
import { borderBottom } from 'Lib/styled/styleFunctions'
import AttachmentList from './AttachmentList'

const Container = styled.div`
Expand Down
2 changes: 1 addition & 1 deletion src/components/CodeMirrorStyle.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { usePreferences } from '../lib/preferences'
import { usePreferences } from 'Lib/preferences'
import isElectron from 'is-electron'

interface ThemeLinkProps {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ContextMenu/ContextMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
useContextMenu,
MenuTypes,
ContextMenuContext
} from '../../lib/contextMenu'
} from 'Lib/contextMenu'

interface ContextMenuProps {
contextMenu: ContextMenuContext
Expand Down
6 changes: 3 additions & 3 deletions src/components/ContextMenu/styled.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import styled from '../../lib/styled'
import styled from 'Lib/styled'
import {
menuHeight,
menuVerticalPadding,
menuZIndex
} from '../../lib/contextMenu'
} from 'Lib/contextMenu'
import {
uiTextColor,
contextMenuShadow,
borderColor,
backgroundColor,
activeBackgroundColor
} from '../../lib/styled/styleFunctions'
} from 'Lib/styled/styleFunctions'

export const StyledContextMenu = styled.div`
min-width: 130px;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Dialog/Dialog.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react'
import { useDialog } from '../../lib/dialog'
import { useDialog } from 'Lib/dialog'
import DialogIcon from './DialogIcon'
import PromptDialogBody from './PromptDialogBody'
import { DialogTypes, DialogData } from '../../lib/dialog/types'
import { DialogTypes, DialogData } from 'Lib/dialog/types'
import { StyledDialog, StyledDialogBackground } from './styled'
import MessageBoxDialogBody from './MessageBoxDialogBody'

Expand Down
2 changes: 1 addition & 1 deletion src/components/Dialog/DialogIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { DialogIconTypes } from '../../lib/dialog/types'
import { DialogIconTypes } from 'Lib/dialog/types'
import { StyledIcon } from './styled'

type DialogIconProps = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dialog/MessageBoxDialogBody.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { ChangeEventHandler, KeyboardEventHandler } from 'react'
import { MessageBoxDialogData } from '../../lib/dialog/types'
import { MessageBoxDialogData } from 'Lib/dialog/types'
import {
StyledDialogBody,
StyledDialogTitle,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dialog/PromptDialogBody.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { ChangeEventHandler, KeyboardEventHandler } from 'react'
import { PromptDialogOptions } from '../../lib/dialog/types'
import { PromptDialogOptions } from 'Lib/dialog/types'
import {
StyledDialogBody,
StyledDialogTitle,
Expand Down
4 changes: 2 additions & 2 deletions src/components/Dialog/styled.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import styled from '../../lib/styled'
import styled from 'Lib/styled'
import {
border,
backgroundColor,
inputStyle,
secondaryButtonStyle
} from '../../lib/styled/styleFunctions'
} from 'Lib/styled/styleFunctions'

const dialogZIndex = 8000

Expand Down
6 changes: 3 additions & 3 deletions src/components/GlobalStyle.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createGlobalStyle } from 'styled-components'
import { backgroundColor, textColor } from '../lib/styled/styleFunctions'
import { BaseTheme } from '../lib/styled/themes/types'
import { backgroundColor, textColor } from 'Lib/styled/styleFunctions'
import { BaseTheme } from 'Lib/styled/themes/types'

export default createGlobalStyle<BaseTheme>`
body {
Expand Down Expand Up @@ -30,7 +30,7 @@ export default createGlobalStyle<BaseTheme>`
a {
color: inherit;
}

/* total width */
::-webkit-scrollbar {
background-color: transparent;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Modal/contents/styled.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled from '../../../lib/styled'
import { textColor } from '../../../lib/styled/styleFunctions'
import styled from 'Lib/styled'
import { textColor } from 'Lib/styled/styleFunctions'

export const ModalContainer = styled.div`
width: 100%;
Expand Down
6 changes: 3 additions & 3 deletions src/components/Modal/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React, { useMemo, useCallback } from 'react'
import { useGlobalKeyDownHandler } from '../../lib/keyboard'
import { useModal } from '../../lib/modal/store'
import { useGlobalKeyDownHandler } from 'Lib/keyboard'
import { useModal } from 'Lib/modal/store'
import {
StyledModalsBackground,
StyledModalsContainer,
StyledModalsSkipButton
} from './styled'
import { usePreferences } from '../../lib/preferences'
import { usePreferences } from 'Lib/preferences'
import DownloadOurAppModal from './contents/DownloadOurAppModal'
import { IconArrowSingleRight } from '../icons'

Expand Down
4 changes: 2 additions & 2 deletions src/components/Modal/styled.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import styled from '../../lib/styled'
import styled from 'Lib/styled'
import {
border,
backgroundColor,
contextMenuShadow,
iconColor
} from '../../lib/styled/styleFunctions'
} from 'Lib/styled/styleFunctions'

const zIndexModalsBackground = 8001

Expand Down
14 changes: 7 additions & 7 deletions src/components/NotePage/NoteDetail/NoteDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import {
NoteDocEditibleProps,
Attachment,
PopulatedNoteDoc
} from '../../../lib/db/types'
import { isTagNameValid } from '../../../lib/db/utils'
} from 'Lib/db/types'
import { isTagNameValid } from 'Lib/db/utils'
import TagList from './TagList'
import styled from '../../../lib/styled'
import styled from 'Lib/styled'
import CustomizedCodeEditor from '../../atoms/CustomizedCodeEditor'
import CustomizedMarkdownPreviewer from '../../atoms/CustomizedMarkdownPreviewer'
import ToolbarIconButton from '../../atoms/ToolbarIconButton'
Expand All @@ -21,10 +21,10 @@ import {
borderRight,
uiTextColor,
PrimaryTextColor
} from '../../../lib/styled/styleFunctions'
} from 'Lib/styled/styleFunctions'
import ToolbarExportButton from '../../atoms/ToolbarExportButton'
import { getFileList } from '../../../lib/dnd'
import { ViewModeType } from '../../../lib/generalStatus'
import { getFileList } from 'Lib/dnd'
import { ViewModeType } from 'Lib/generalStatus'
import { BreadCrumbs } from '../NotePage'
import cc from 'classcat'
import {
Expand All @@ -37,7 +37,7 @@ import {
import {
listenNoteDetailFocusTitleInputEvent,
unlistenNoteDetailFocusTitleInputEvent
} from '../../../lib/events'
} from 'Lib/events'

export const StyledNoteDetailContainer = styled.div`
${secondaryBackgroundColor}
Expand Down
4 changes: 2 additions & 2 deletions src/components/NotePage/NoteDetail/TagList.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useCallback } from 'react'
import ButtonIcon from '../../atoms/ButtonIcon'
import styled from '../../../lib/styled'
import { iconColor, noteListIconColor, inputStyle } from '../../../lib/styled/styleFunctions'
import styled from 'Lib/styled'
import { iconColor, noteListIconColor, inputStyle } from 'Lib/styled/styleFunctions'
import { IconTag, IconClose } from '../../icons'

interface TagListItemProps {
Expand Down
18 changes: 9 additions & 9 deletions src/components/NotePage/NoteList/NoteItem.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import React, { useMemo, useCallback } from 'react'
import { Link } from '../../../lib/router'
import styled from '../../../lib/styled/styled'
import { Link } from 'Lib/router'
import styled from 'Lib/styled/styled'
import {
borderBottom,
uiTextColor,
secondaryBackgroundColor,
inputStyle
} from '../../../lib/styled/styleFunctions'
} from 'Lib/styled/styleFunctions'
import cc from 'classcat'
import { setTransferrableNoteData } from '../../../lib/dnd'
import { setTransferrableNoteData } from 'Lib/dnd'
import HighlightText from '../../atoms/HighlightText'
import { formatDistanceToNow } from 'date-fns'
import { scaleAndTransformFromLeft } from '../../../lib/styled'
import { PopulatedNoteDoc } from '../../../lib/db/types'
import { useContextMenu, MenuTypes, MenuItem } from '../../../lib/contextMenu'
import { useDb } from '../../../lib/db'
import { useDialog, DialogIconTypes } from '../../../lib/dialog'
import { scaleAndTransformFromLeft } from 'Lib/styled'
import { PopulatedNoteDoc } from 'Lib/db/types'
import { useContextMenu, MenuTypes, MenuItem } from 'Lib/contextMenu'
import { useDb } from 'Lib/db'
import { useDialog, DialogIconTypes } from 'Lib/dialog'
import { useTranslation } from 'react-i18next'

export const StyledNoteListItem = styled.div`
Expand Down
10 changes: 5 additions & 5 deletions src/components/NotePage/NoteList/NoteList.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import React, { useCallback, useRef, ChangeEventHandler } from 'react'
import NoteItem from './NoteItem'
import { PopulatedNoteDoc } from '../../../lib/db/types'
import styled from '../../../lib/styled'
import { PopulatedNoteDoc } from 'Lib/db/types'
import styled from 'Lib/styled'
import {
borderBottom,
inputStyle,
iconColor,
noteListIconColor,
selectTabStyle
} from '../../../lib/styled/styleFunctions'
} from 'Lib/styled/styleFunctions'
import { IconEdit, IconLoupe, IconArrowSingleDown } from '../../icons'
import { useTranslation } from 'react-i18next'
import {
useGlobalKeyDownHandler,
isWithGeneralCtrlKey
} from '../../../lib/keyboard'
} from 'Lib/keyboard'
import { NoteListSortOptions } from '../NotePage'
import { osName } from '../../../lib/utils'
import { osName } from 'Lib/utils'

export const StyledNoteListContainer = styled.div`
display: flex;
Expand Down
18 changes: 9 additions & 9 deletions src/components/NotePage/NotePage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useMemo, useCallback, useState, useEffect } from 'react'
import NoteList from './NoteList'
import styled from '../../lib/styled'
import styled from 'Lib/styled'
import NoteDetail from './NoteDetail'
import {
useRouteParams,
Expand All @@ -11,19 +11,19 @@ import {
usePathnameWithoutNoteId,
useRouter,
StorageBookmarkNotes
} from '../../lib/router'
import { useDb } from '../../lib/db'
} from 'Lib/router'
import { useDb } from 'Lib/db'
import TwoPaneLayout from '../atoms/TwoPaneLayout'
import { PopulatedNoteDoc, NoteStorage, ObjectMap } from '../../lib/db/types'
import { useGeneralStatus, ViewModeType } from '../../lib/generalStatus'
import { useDialog, DialogIconTypes } from '../../lib/dialog'
import { escapeRegExp } from '../../lib/regex'
import { PopulatedNoteDoc, NoteStorage, ObjectMap } from 'Lib/db/types'
import { useGeneralStatus, ViewModeType } from 'Lib/generalStatus'
import { useDialog, DialogIconTypes } from 'Lib/dialog'
import { escapeRegExp } from 'Lib/regex'
import { useTranslation } from 'react-i18next'
import {
useGlobalKeyDownHandler,
isWithGeneralCtrlKey
} from '../../lib/keyboard'
import { dispatchNoteDetailFocusTitleInputEvent } from '../../lib/events'
} from 'Lib/keyboard'
import { dispatchNoteDetailFocusTitleInputEvent } from 'Lib/events'

export const StyledNoteDetailNoNote = styled.div`
text-align: center;
Expand Down
4 changes: 2 additions & 2 deletions src/components/PreferencesModal/AboutTab.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React, { useCallback } from 'react'
import styled from '../../lib/styled'
import styled from 'Lib/styled'
import {
Section,
SectionHeader,
SectionSubtleText,
PrimaryAnchor
} from './styled'
import { openNew } from '../../lib/utils/platform'
import { openNew } from 'Lib/utils/platform'
import Image from '../atoms/Image'
import AppLink from '../atoms/AppLink'
import { useTranslation } from 'react-i18next'
Expand Down
8 changes: 4 additions & 4 deletions src/components/PreferencesModal/BillingTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import {
SectionSecondaryButton,
SectionTable
} from './styled'
import styled from '../../lib/styled'
import { usePreferences } from '../../lib/preferences'
import { getSubscription, Subscription } from '../../lib/accounts'
import styled from 'Lib/styled'
import { usePreferences } from 'Lib/preferences'
import { getSubscription, Subscription } from 'Lib/accounts'
import LoginButton from '../atoms/LoginButton'
import { openNew } from '../../lib/utils/platform'
import { openNew } from 'Lib/utils/platform'
import { useTranslation } from 'react-i18next'

const BillingContent = styled.div`
Expand Down
Loading