TagSpaces is an offline, open source, document manager with tagging support
chore: cleaning-up old perspective code
Ilian Sapundshiev22670d1745f5
diff --git a/app/components/LocationManager.tsx b/app/components/LocationManager.tsxindex 994382ee1..1d3230564 100644--- a/app/components/LocationManager.tsx+++ b/app/components/LocationManager.tsx@@ -58,7 +58,7 @@ interface Props {classes?: any;style?: any;locations: Array<TS.Location>;- hideDrawer: () => void;+ hideDrawer?: () => void;openURLExternally: (path: string) => void;toggleOpenLinkDialog: () => void;setDefaultLocations: () => void;diff --git a/app/components/MobileNavigation.tsx b/app/components/MobileNavigation.tsxindex bea800c2a..9c52ec909 100644--- a/app/components/MobileNavigation.tsx+++ b/app/components/MobileNavigation.tsx@@ -45,7 +45,6 @@ import {isLocationManagerPanelOpened,isTagLibraryPanelOpened,isSearchPanelOpened,- isPerspectivesPanelOpened,isHelpFeedbackPanelOpened,isReadOnlyMode,getDirectoryPath@@ -90,8 +89,6 @@ interface Props {openTagLibraryPanel: () => void;isSearchPanelOpened: boolean;openSearchPanel: () => void;- isPerspectivesPanelOpened: boolean;- // openPerspectivesPanel: () => void,isHelpFeedbackPanelOpened: boolean;openHelpFeedbackPanel: () => void;closeAllVerticalPanels: () => void;@@ -143,7 +140,6 @@ const MobileNavigation = (props: Props) => {)}{props.isTagLibraryPanelOpened && <TagLibrary />}{props.isSearchPanelOpened && <Search hideDrawer={hideDrawer} />}- {/* {isPerspectivesPanelOpened && <PerspectiveManager />} */}{props.isHelpFeedbackPanelOpened && (<HelpFeedbackPanelopenURLExternally={openURLExternally}@@ -265,7 +261,6 @@ function mapStateToProps(state) {isLocationManagerPanelOpened: isLocationManagerPanelOpened(state),isTagLibraryPanelOpened: isTagLibraryPanelOpened(state),isSearchPanelOpened: isSearchPanelOpened(state),- isPerspectivesPanelOpened: isPerspectivesPanelOpened(state),isHelpFeedbackPanelOpened: isHelpFeedbackPanelOpened(state),isReadOnlyMode: isReadOnlyMode(state),directoryPath: getDirectoryPath(state),@@ -284,7 +279,6 @@ function mapActionCreatorsToProps(dispatch) {openLocationManagerPanel: AppActions.openLocationManagerPanel,openTagLibraryPanel: AppActions.openTagLibraryPanel,openSearchPanel: AppActions.openSearchPanel,- openPerspectivesPanel: AppActions.openPerspectivesPanel,openHelpFeedbackPanel: AppActions.openHelpFeedbackPanel,openURLExternally: AppActions.openURLExternally,showNotification: AppActions.showNotification,diff --git a/app/components/VerticalNavigation.tsx b/app/components/VerticalNavigation.tsxindex 30f533967..4e14ce761 100644--- a/app/components/VerticalNavigation.tsx+++ b/app/components/VerticalNavigation.tsx@@ -25,7 +25,6 @@ import NewFileIcon from '@material-ui/icons/Add';import LocationsIcon from '@material-ui/icons/WorkOutline';import TagLibraryIcon from '@material-ui/icons/LocalOfferOutlined';import SearchIcon from '@material-ui/icons/SearchOutlined';-// import PerspectivesIcon from '@material-ui/icons/MapOutlined';import SettingsIcon from '@material-ui/icons/Settings';import ThemingIcon from '@material-ui/icons/InvertColors';import UpgradeIcon from '@material-ui/icons/FlightTakeoff';@@ -50,7 +49,6 @@ import {isLocationManagerPanelOpened,isTagLibraryPanelOpened as isTagLibraryOpened,isSearchPanelOpened as isSearchOpened,- isPerspectivesPanelOpened as isPerspectivesOpened,isHelpFeedbackPanelOpened as isHelpFeedbackOpened,isReadOnlyMode,getProgress,@@ -118,14 +116,12 @@ interface Props {toggleSettingsDialog: () => void;toggleUploadDialog: () => void;isSettingsDialogOpened: () => void;- isLocationManagerPanelOpened: boolean;+ isLocationMngrPanelOpened: boolean;openLocationManagerPanel: () => void;isTagLibraryPanelOpened: boolean;openTagLibraryPanel: () => void;isSearchPanelOpened: boolean;openSearchPanel: () => void;- isPerspectivesPanelOpened: boolean;- // openPerspectivesPanel: () => void,isHelpFeedbackPanelOpened: boolean;openHelpFeedbackPanel: () => void;closeAllVerticalPanels: () => void;@@ -156,6 +152,7 @@ const VerticalNavigation = (props: Props) => {const {classes,+ isLocationMngrPanelOpened,isTagLibraryPanelOpened,isSearchPanelOpened,isHelpFeedbackPanelOpened,@@ -239,14 +236,14 @@ const VerticalNavigation = (props: Props) => {<IconButtonid="verticalNavButton"onClick={() => {- if (props.isLocationManagerPanelOpened) {+ if (props.isLocationMngrPanelOpened) {closeAllVerticalPanels();} else {openLocationManagerPanel();}}}className={- props.isLocationManagerPanelOpened+ props.isLocationMngrPanelOpened? [classes.button, classes.selectedButton].join(' '): classes.button}@@ -293,25 +290,6 @@ const VerticalNavigation = (props: Props) => {><SearchIcon className={classes.buttonIcon} /></IconButton>- {/* <IconButton- title={i18n.t('core:perspectiveManager')}- data-tid="perspectiveManager"- onClick={() => {- if (isPerspectivePanelOpened) {- closeAllVerticalPanels();- } else {- openPerspectivesPanel();- }- }}- disabled={false}- style={- isPerspectivePanelOpened- ? { ...classes.button, ...classes.selectedButton }- : classes.button- }- >- <PerspectivesIcon style={classes.buttonIcon} />- </IconButton> */}<IconButtonid="verticalNavButton"title={i18n.t('core:helpFeedback')}@@ -388,7 +366,7 @@ const VerticalNavigation = (props: Props) => {</IconButton></div><div className={classes.panel}>- {props.isLocationManagerPanelOpened && <LocationManager />}+ {isLocationMngrPanelOpened && <LocationManager />}{isTagLibraryPanelOpened && <TagLibrary />}{isSearchPanelOpened && <Search />}{isHelpFeedbackPanelOpened && (@@ -436,10 +414,9 @@ function mapStateToProps(state) {return {isFirstRun: isFirstRun(state),isSettingsDialogOpened: isSettingsDialogOpened(state),- isLocationManagerPanelOpened: isLocationManagerPanelOpened(state),+ isLocationMngrPanelOpened: isLocationManagerPanelOpened(state),isTagLibraryPanelOpened: isTagLibraryOpened(state),isSearchPanelOpened: isSearchOpened(state),- isPerspectivesPanelOpened: isPerspectivesOpened(state),isHelpFeedbackPanelOpened: isHelpFeedbackOpened(state),isReadOnlyMode: isReadOnlyMode(state),directoryPath: getDirectoryPath(state),@@ -460,7 +437,6 @@ function mapActionCreatorsToProps(dispatch) {openLocationManagerPanel: AppActions.openLocationManagerPanel,openTagLibraryPanel: AppActions.openTagLibraryPanel,openSearchPanel: AppActions.openSearchPanel,- openPerspectivesPanel: AppActions.openPerspectivesPanel,openHelpFeedbackPanel: AppActions.openHelpFeedbackPanel,openURLExternally: AppActions.openURLExternally,closeAllVerticalPanels: AppActions.closeAllVerticalPanels,diff --git a/app/containers/MainPage.tsx b/app/containers/MainPage.tsxindex 7b4f50069..b47980ed6 100644--- a/app/containers/MainPage.tsx+++ b/app/containers/MainPage.tsx@@ -54,7 +54,6 @@ import {isLocationManagerPanelOpened,isTagLibraryPanelOpened,isSearchPanelOpened,- isPerspectivesPanelOpened,isHelpFeedbackPanelOpened,isEditTagDialogOpened,isCreateDirectoryOpened,@@ -178,7 +177,6 @@ interface Props {openLocationManagerPanel: () => void;openTagLibraryPanel: () => void;openSearchPanel: () => void;- openPerspectivesPanel: () => void;openHelpFeedbackPanel: () => void;closeAllVerticalPanels: () => void;leftSplitSize: number;@@ -190,7 +188,6 @@ interface Props {isOpenLinkDialogOpened: boolean;isTagLibraryPanelOpened: boolean;isSearchPanelOpened: boolean;- isPerspectivesPanelOpened: boolean;isHelpFeedbackPanelOpened: boolean;directoryPath: string;showNotification: (@@ -290,10 +287,10 @@ const OpenLinkDialogAsync = props => (</React.Suspense>);-/* let showVerticalPanel = true;-if (window.ExtDefaultVerticalPanel === 'none') {- showVerticalPanel = false;-} */+// let showVerticalPanel = true;+// if (window.ExtDefaultVerticalPanel === 'none') {+// showVerticalPanel = false;+// }const MainPage = (props: Props) => {// useTraceUpdate(props);@@ -304,9 +301,9 @@ const MainPage = (props: Props) => {const setSelectedDirectoryPath = (path: string) => {selectedDirectoryPath.current = path;};- /* const [isManagementPanelVisible, setManagementPanelVisible] = useState<- boolean- >(window.ExtDefaultVerticalPanel !== 'none' && !props.isEntryInFullWidth); */+ // const [isManagementPanelVisible, setManagementPanelVisible] = useState<+ // boolean+ // >(showVerticalPanel || !props.isEntryInFullWidth);// const [mainSplitSize, setMainSplitSize] = useState<any>('100%');// const [isDrawerOpened, setDrawerOpened] = useState<boolean>(true);const width =@@ -364,7 +361,6 @@ const MainPage = (props: Props) => {props.isLocationManagerPanelOpened ||props.isTagLibraryPanelOpened ||props.isSearchPanelOpened ||- props.isPerspectivesPanelOpened ||props.isHelpFeedbackPanelOpened;useEventListener('resize', () => {@@ -501,9 +497,6 @@ const MainPage = (props: Props) => {} = props;const { FILE } = NativeTypes;- /* if (this.state.width < 400) {- this.setManagementPanelVisibility(false);- } */return (<HotKeys handlers={keyBindingHandlers} keyMap={keyMap}>{props.isAboutDialogOpened && (@@ -735,7 +728,6 @@ function mapStateToProps(state) {isLocationManagerPanelOpened: isLocationManagerPanelOpened(state),isTagLibraryPanelOpened: isTagLibraryPanelOpened(state),isSearchPanelOpened: isSearchPanelOpened(state),- isPerspectivesPanelOpened: isPerspectivesPanelOpened(state),isHelpFeedbackPanelOpened: isHelpFeedbackPanelOpened(state),directoryPath: getDirectoryPath(state),isDeleteMultipleEntriesDialogOpened: isDeleteMultipleEntriesDialogOpened(@@ -784,7 +776,6 @@ function mapDispatchToProps(dispatch) {openLocationManagerPanel: AppActions.openLocationManagerPanel,openTagLibraryPanel: AppActions.openTagLibraryPanel,openSearchPanel: AppActions.openSearchPanel,- openPerspectivesPanel: AppActions.openPerspectivesPanel,openHelpFeedbackPanel: AppActions.openHelpFeedbackPanel,closeAllVerticalPanels: AppActions.closeAllVerticalPanels,toggleDeleteMultipleEntriesDialog:@@ -815,7 +806,6 @@ const areEqual = (prevProp, nextProp) =>prevProp.isLocationManagerPanelOpened &&nextProp.isOnboardingDialogOpened === prevProp.isOnboardingDialogOpened &&nextProp.isOpenLinkDialogOpened === prevProp.isOpenLinkDialogOpened &&- nextProp.isPerspectivesPanelOpened === prevProp.isPerspectivesPanelOpened &&nextProp.isProgressDialogOpened === prevProp.isProgressDialogOpened &&nextProp.isReadOnlyMode === prevProp.isReadOnlyMode &&nextProp.isSearchPanelOpened === prevProp.isSearchPanelOpened &&diff --git a/app/reducers/app.ts b/app/reducers/app.tsindex 702300b29..164ef5f6a 100644--- a/app/reducers/app.ts+++ b/app/reducers/app.ts@@ -110,7 +110,6 @@ export const types = {OPEN_LOCATIONMANAGER_PANEL: 'APP/OPEN_LOCATIONMANAGER_PANEL',OPEN_TAGLIBRARY_PANEL: 'APP/OPEN_TAGLIBRARY_PANEL',OPEN_SEARCH_PANEL: 'APP/OPEN_SEARCH_PANEL',- OPEN_PERSPECTIVES_PANEL: 'APP/OPEN_PERSPECTIVES_PANEL',OPEN_HELPFEEDBACK_PANEL: 'APP/OPEN_HELPFEEDBACK_PANEL',CLOSE_ALLVERTICAL_PANELS: 'APP/CLOSE_ALLVERTICAL_PANELS',REFLECT_DELETE_ENTRY: 'APP/REFLECT_DELETE_ENTRY',@@ -218,7 +217,6 @@ export const initialState = {locationManagerPanelOpened: showLocations,tagLibraryPanelOpened: showTagLibrary,searchPanelOpened: showSearch,- perspectivesPanelOpened: false,helpFeedbackPanelOpened: false};@@ -659,7 +657,6 @@ export default (state: any = initialState, action: any) => {locationManagerPanelOpened: true,tagLibraryPanelOpened: false,searchPanelOpened: false,- perspectivesPanelOpened: false,helpFeedbackPanelOpened: false};}@@ -669,7 +666,6 @@ export default (state: any = initialState, action: any) => {locationManagerPanelOpened: false,tagLibraryPanelOpened: true,searchPanelOpened: false,- perspectivesPanelOpened: false,helpFeedbackPanelOpened: false};}@@ -679,17 +675,6 @@ export default (state: any = initialState, action: any) => {locationManagerPanelOpened: false,tagLibraryPanelOpened: false,searchPanelOpened: true,- perspectivesPanelOpened: false,- helpFeedbackPanelOpened: false- };- }- case types.OPEN_PERSPECTIVES_PANEL: {- return {- ...state,- locationManagerPanelOpened: false,- tagLibraryPanelOpened: false,- searchPanelOpened: false,- perspectivesPanelOpened: true,helpFeedbackPanelOpened: false};}@@ -699,7 +684,6 @@ export default (state: any = initialState, action: any) => {locationManagerPanelOpened: false,tagLibraryPanelOpened: false,searchPanelOpened: false,- perspectivesPanelOpened: false,helpFeedbackPanelOpened: true};}@@ -709,7 +693,6 @@ export default (state: any = initialState, action: any) => {locationManagerPanelOpened: false,tagLibraryPanelOpened: false,searchPanelOpened: false,- perspectivesPanelOpened: false,helpFeedbackPanelOpened: false};}@@ -880,7 +863,6 @@ export const actions = {openLocationManagerPanel: () => ({ type: types.OPEN_LOCATIONMANAGER_PANEL }),openTagLibraryPanel: () => ({ type: types.OPEN_TAGLIBRARY_PANEL }),openSearchPanel: () => ({ type: types.OPEN_SEARCH_PANEL }),- openPerspectivesPanel: () => ({ type: types.OPEN_PERSPECTIVES_PANEL }),openHelpFeedbackPanel: () => ({ type: types.OPEN_HELPFEEDBACK_PANEL }),closeAllVerticalPanels: () => ({ type: types.CLOSE_ALLVERTICAL_PANELS }),loadParentDirectoryContent: () => (@@ -2186,7 +2168,5 @@ export const isLocationManagerPanelOpened = (state: any) =>export const isTagLibraryPanelOpened = (state: any) =>state.app.tagLibraryPanelOpened;export const isSearchPanelOpened = (state: any) => state.app.searchPanelOpened;-export const isPerspectivesPanelOpened = (state: any) =>- state.app.perspectivesPanelOpened;export const isHelpFeedbackPanelOpened = (state: any) =>state.app.helpFeedbackPanelOpened;