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
6 changes: 3 additions & 3 deletions src/components/NotePage/NoteDetail/NoteDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const StyledNoteDetailContainer = styled.div`
width: 100%;
height: 25px;
font-size: 14px;
padding: 5px 10px;
padding: 10px 20px;
overflow: hidden;

.wrapper {
Expand Down Expand Up @@ -86,15 +86,15 @@ export const StyledNoteDetailContainer = styled.div`
}
.titleSection {
display: flex;
height: 50px;
height: 60px;
border-width: 0 0 1px;
${borderBottom}

input {
font-size: 24px;
border: none;
height: 100%;
padding: 0 12px;
padding: 0 20px;
flex: 1;
background-color: transparent;
${textColor}
Expand Down
17 changes: 13 additions & 4 deletions src/components/NotePage/NoteList/NoteList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,15 @@ export const StyledNoteListContainer = styled.div`
overflow-y: auto;
}

.empty {
text-align: center;
margin-top: 20px;
color: rgba(255, 255, 255, 0.5);
font-weight: bold;
}

.control {
height: 50px;
height: 60px;
display: flex;
padding: 8px;
align-items: center;
Expand All @@ -45,10 +52,11 @@ export const StyledNoteListContainer = styled.div`
flex: 1;
position: relative;
height: 32px;
padding: 0 8px;
.icon {
position: absolute;
top: 8px;
left: 10px;
left: 18px;
font-size: 20px;
z-index: 0;
pointer-events: none;
Expand All @@ -71,7 +79,7 @@ export const StyledNoteListContainer = styled.div`
height: 25px;
display: flex;
align-items: center;
padding-left: 13px;
padding: 20px 13px;
.filterIcon {
font-size: 10px;
margin-right: 5px;
Expand All @@ -86,13 +94,14 @@ export const StyledNoteListContainer = styled.div`
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
outline: none;
}
}

.newNoteButton {
width: 35px;
height: 30px;
font-size: 24px;
font-size: 20px;
background: transparent;
border: none;
${noteListIconColor}
Expand Down
121 changes: 60 additions & 61 deletions src/components/PreferencesModal/EditorTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import {
SectionHeader,
SectionControl,
SectionSelect,
SectionInput
SectionInput,
SplitContainer
} from './styled'
import { useTranslation } from 'react-i18next'
import {
Expand Down Expand Up @@ -132,67 +133,74 @@ const EditorTab = () => {
return (
<div>
<Section>
<SectionHeader>{t('preferences.editorTheme')}</SectionHeader>
<SectionControl>
<SectionSelect
value={preferences['editor.theme']}
onChange={selectEditorTheme}
>
<option value='default'>Default</option>
{themes.map(theme => (
<option value={theme} key={theme}>
{capitalize(theme)}
</option>
))}
</SectionSelect>
</SectionControl>
</Section>
<Section>
<SectionHeader>{t('preferences.editorFontSize')}</SectionHeader>
<SectionControl>
<SectionInput
type='number'
value={fontSize}
onChange={updateFontSize}
/>{' '}
&emsp;px
</SectionControl>
</Section>
<Section>
<SectionHeader>{t('preferences.editorFontFamily')}</SectionHeader>
<SectionControl>
<SectionInput
type='value'
value={fontFamily}
onChange={updateFontFamily}
<SectionHeader>{t('preferences.editorPreview')}</SectionHeader>
<SectionControl onKeyDown={codeEditorKeydownInterceptor}>
<CustomizedCodeEditor
value={previewContent}
onChange={newValue => setPreviewContent(newValue)}
/>
</SectionControl>
</Section>
<Section>
<SectionHeader>{t('preferences.editorIndentType')}</SectionHeader>
<SectionControl>
<SectionSelect
value={preferences['editor.indentType']}
onChange={selectEditorIndentType}
>
<option value='spaces'>{t('preferences.spaces')}</option>
<option value='tab'>{t('preferences.tab')}</option>
</SectionSelect>
</SectionControl>
</Section>
<Section>
<SectionHeader>{t('preferences.editorIndentSize')}</SectionHeader>
<SectionHeader>{t('preferences.editorTheme')}</SectionHeader>
<SectionControl>
<SectionSelect
value={preferences['editor.indentSize']}
onChange={selectEditorIndentSize}
value={preferences['editor.theme']}
onChange={selectEditorTheme}
>
<option value={2}>2</option>
<option value={4}>4</option>
<option value={8}>8</option>
{themes.map(theme => (<option value={theme}>{capitalize(theme)}</option>))}
</SectionSelect>
</SectionControl>
</Section>
<SplitContainer>
<Section className='split'>
<SectionHeader>{t('preferences.editorFontSize')}</SectionHeader>
<SectionControl>
<SectionInput
type='number'
value={fontSize}
onChange={updateFontSize}
/>{' '}
</SectionControl>
</Section>
<Section className='split'>
<SectionHeader>{t('preferences.editorFontFamily')}</SectionHeader>
<SectionControl>
<SectionInput
type='value'
value={fontFamily}
onChange={updateFontFamily}
/>
</SectionControl>
</Section>
</SplitContainer>
<SplitContainer>
<Section className='split'>
<SectionHeader>{t('preferences.editorIndentType')}</SectionHeader>
<SectionControl>
<SectionSelect
value={preferences['editor.indentType']}
onChange={selectEditorIndentType}
>
<option value='spaces'>{t('preferences.spaces')}</option>
<option value='tab'>{t('preferences.tab')}</option>
</SectionSelect>
</SectionControl>
</Section>
<Section className='split'>
<SectionHeader>{t('preferences.editorIndentSize')}</SectionHeader>
<SectionControl>
<SectionSelect
value={preferences['editor.indentSize']}
onChange={selectEditorIndentSize}
>
<option value={2}>2</option>
<option value={4}>4</option>
<option value={8}>8</option>
</SectionSelect>
</SectionControl>
</Section>
</SplitContainer>
<Section>
<SectionHeader>{t('preferences.editorKeymap')}</SectionHeader>
<SectionControl>
Expand All @@ -206,15 +214,6 @@ const EditorTab = () => {
</SectionSelect>
</SectionControl>
</Section>
<Section>
<SectionHeader>{t('preferences.editorPreview')}</SectionHeader>
<SectionControl onKeyDown={codeEditorKeydownInterceptor}>
<CustomizedCodeEditor
value={previewContent}
onChange={newValue => setPreviewContent(newValue)}
/>
</SectionControl>
</Section>
</div>
)
}
Expand Down
13 changes: 7 additions & 6 deletions src/components/PreferencesModal/PreferencesModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,28 @@ const Header = styled.h1`

const TabNav = styled.nav`
width: 200px;
margin-left: 30px;
margin-left: 20%;
`

const TabContent = styled.div`
flex: 1;
overflow-y: auto;
padding-left: 4px;
padding-top: 4em;
padding-right: 30px;
padding-right: 25%;
`

const CloseButton = styled.button`
position: absolute;
top: 0;
right: 12px;
top: 20px;
right: calc(25% - 50px);
width: 40px;
height: 40px;
background-color: transparent;
border: none;
font-size: 24px;
${closeIconColor}
font-size: 20px;
cursor: pointer;
${closeIconColor};
`

const PreferencesModal = () => {
Expand Down
14 changes: 9 additions & 5 deletions src/components/PreferencesModal/TabButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,29 @@ interface TabButtonProps {

const StyledButton = styled.button`
width: 100%;
height: 40px;
height: 30px;
margin-bottom: 10px
background-color: transparent;
border: none;
cursor: pointer;
display: flex;
align-items: center
padding: 0;
outline: none
.border {
width: 2px;
height: 16px;
width: 4px;
height: 30px;
}
.label {
margin-left: 18px;
margin-left: 15px;
flex: 1;
color: ${({ theme }) => theme.uiTextColor};
text-align: left;
font-size: 14px;
font-size: 16px;
}
&.active {
color: ${({ theme }) => theme.textColor};
font-weight: bold;

.border {
background-color: ${({ theme }) => theme.primaryColor};
Expand Down
21 changes: 17 additions & 4 deletions src/components/PreferencesModal/styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ export const SectionHeader2 = styled.h3`
`

export const SectionHeader = styled.h3`
font-size: 18px;
font-weight: 500;
font-size: 12px;
font-weight: bold;
text-transform: uppercase;
`

export const SectionSubtleText = styled.p`
Expand Down Expand Up @@ -57,7 +58,7 @@ export const SectionControl = styled.div`
export const SectionSelect = styled.select`
${selectStyle}
padding: 0 16px;
width: 200px;
width: 100%;
height: 40px;
border-radius: 2px;

Expand Down Expand Up @@ -88,7 +89,7 @@ export const SectionSecondaryButton = styled.button`
export const SectionInput = styled.input`
${inputStyle}
padding: 0 16px;
width: 200px;
width: 100%;
height: 40px;
border-radius: 2px;
`
Expand All @@ -114,3 +115,15 @@ export const DeleteStorageButton = styled.button`
vertical-align: middle;
align-items: center;
`

export const SplitContainer = styled.div`
width: 100%;
display: flex;
.split {
width: 50%;
padding-right: 20px;
}
.split:last-child {
padding-right: 0px;
}
`
13 changes: 8 additions & 5 deletions src/components/SideNavigator/SideNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@ import {
import { getStorageItemId } from '../../lib/nav'

const Description = styled.nav`
margin-left: 15px;
margin-left: 10px;
margin-bottom: 10px;
font-size: 18px;
font-size: 16px;
font-weight: bold;
height: 24px
line-height: 24px;
${sideBarDefaultTextColor}
`

Expand Down Expand Up @@ -203,11 +206,10 @@ export default () => {
active={currentPathname === `/app/bookmarks`}
onClick={() => push(`/app/bookmarks`)}
/>

<Description>
Storages
STORAGES
<CreateStorageButton onClick={() => push('/app/storages')}>
<IconAddRound size='1.7em' />
<IconAddRound size='1.5em' />
</CreateStorageButton>
</Description>

Expand Down Expand Up @@ -425,6 +427,7 @@ export default () => {
{storageEntries.length === 0 && (
<div className='empty'>{t('storage.noStorage')}</div>
)}

{preferences['general.tutorials'] === 'display' && (
<TutorialsNavigator />
)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/SideNavigator/SideNavigatorItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ const SideNaviagtorItem = ({
)}
<ClickableContainer
style={{
paddingLeft: `${10 * depth + 30}px`,
paddingLeft: `${10 * depth + 34}px`,
cursor: onClick ? 'pointer' : 'initial',
fontSize: '15px'
}}
Expand Down
Loading