-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #456 from MicroPad/next-dev
v4.5
- Loading branch information
Showing
19 changed files
with
192 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="typecheck" type="js.build_tools.npm" nameIsGenerated="true"> | ||
<package-json value="$PROJECT_DIR$/package.json" /> | ||
<command value="run" /> | ||
<scripts> | ||
<script value="typecheck" /> | ||
</scripts> | ||
<node-interpreter value="project" /> | ||
<envs /> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
app/src/app/components/explorer/due-date-list/DueDateListComponent.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.due-date-list > span > a { | ||
padding-left: 5px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
app/src/app/components/explorer/due-date-list/DueDateOptionsComponent.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.due-date-opts__content > * { | ||
color: var(--mp-theme-explorerContent); | ||
} |
47 changes: 47 additions & 0 deletions
47
app/src/app/components/explorer/due-date-list/DueDateOptionsComponent.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { connect, ConnectedProps } from 'react-redux'; | ||
import { Checkbox, Icon } from 'react-materialize'; | ||
import { DEFAULT_MODAL_OPTIONS } from '../../../util'; | ||
import React from 'react'; | ||
import SingletonModalComponent from '../../singleton-modal/SingletonModalContainer'; | ||
import { ModalId } from '../../../types/ModalIds'; | ||
import { IStoreState } from '../../../types'; | ||
import { ThemeValues } from '../../../ThemeValues'; | ||
import { actions } from '../../../actions'; | ||
import './DueDateOptionsComponent.css'; | ||
|
||
const MODAL_ID: ModalId = 'due-date-options-modal'; | ||
|
||
type Props = ConnectedProps<typeof dueDateOptionsConnector> | ||
export const DueDateOptionsComponent = (props: Props) => { | ||
return (<SingletonModalComponent | ||
id={MODAL_ID} | ||
key={MODAL_ID} | ||
header={`Options for upcoming due dates`} | ||
trigger={<a href="#!" className="due-date-opts-trigger" style={{ color: props.colour }} onContextMenu={e => { | ||
e.preventDefault(); | ||
(e.target as Node).parentElement?.querySelector<HTMLAnchorElement>('.due-date-opts-trigger')?.click(); | ||
return false; | ||
}}><Icon tiny={true} className="due-date-opts-trigger">settings</Icon></a>} | ||
options={DEFAULT_MODAL_OPTIONS}> | ||
<div className="due-date-opts__content"> | ||
<Checkbox | ||
label="Show historical due dates" | ||
value="1" | ||
checked={props.showHistoricalDueDates} | ||
onChange={() => props.setShowHistoricalDueDates(!props.showHistoricalDueDates)} | ||
filledIn | ||
/> | ||
</div> | ||
</SingletonModalComponent>); | ||
} | ||
|
||
export const dueDateOptionsConnector = connect( | ||
(state: IStoreState) => ({ | ||
colour: ThemeValues[state.app.theme].explorerContent, | ||
showHistoricalDueDates: state.dueDateSettings.showHistoricalDueDates ?? false, | ||
}), | ||
{ | ||
setShowHistoricalDueDates: actions.setShowHistoricalDueDates, | ||
} | ||
); | ||
export default dueDateOptionsConnector(DueDateOptionsComponent); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { createSlice, SliceCaseReducers } from '@reduxjs/toolkit'; | ||
import { actions } from '../actions'; | ||
|
||
export type DueDateSettingsState = { | ||
showHistoricalDueDates: boolean | null, | ||
}; | ||
|
||
export const dueDateSettingsSlice = createSlice<DueDateSettingsState, SliceCaseReducers<DueDateSettingsState>, 'dueDateSettings'>({ | ||
name: 'dueDateSettings', | ||
initialState: { | ||
showHistoricalDueDates: null, | ||
}, | ||
reducers: {}, | ||
extraReducers: builder => builder | ||
.addCase(actions.setShowHistoricalDueDates, (state, action) => ({ | ||
...state, | ||
showHistoricalDueDates: action.payload | ||
})) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export const enum SettingsStorageKeys { | ||
SHOULD_WORD_WRAP = 'shouldWordWrap', | ||
SHOULD_SPELL_CHECK = 'shouldSpellCheck', | ||
DUE_DATE_OPTS = 'dueDateOpts', | ||
OLD_MINOR_VERSION = 'oldMinorVersion', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters