Skip to content

Commit

Permalink
Ej/revert changes to master (#729)
Browse files Browse the repository at this point in the history
* Revert "add SettingsMenu tabs component (WIP)"

This reverts commit 9a478ed.

* Revert "add settings menu tab"

This reverts commit fd8a0ba.
  • Loading branch information
lightlii committed Jun 29, 2023
1 parent 9a478ed commit b258b84
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 175 deletions.
7 changes: 0 additions & 7 deletions messages/renderer/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
"description": "MapFilter tab label",
"message": "Observations"
},
"renderer.components.Home.settings": {
"description": "Settings tab label",
"message": "Settings"
},
"renderer.components.Home.sync": {
"description": "Synchronize tab label",
"message": "Synchronize"
Expand Down Expand Up @@ -468,9 +464,6 @@
"description": "Name to show for an observation when it does not match any preset",
"message": "Observation"
},
"renderer.components.SettingsView.index.aboutMapeo": {
"message": "About Mapeo"
},
"renderer.components.SyncView.Searching.searchingHint": {
"description": "Hint on sync screen when searching on wifi for devices",
"message": "Make sure devices are turned on and connected to the same wifi network"
Expand Down
36 changes: 16 additions & 20 deletions src/renderer/components/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import LocationOn from '@material-ui/icons/LocationOn'
import MapIcon from '@material-ui/icons/Map'
import ObservationIcon from '@material-ui/icons/PhotoLibrary'
import SyncIcon from '@material-ui/icons/OfflineBolt'
import SettingsIcon from '@material-ui/icons/Settings'
import WarningIcon from '@material-ui/icons/Warning'

import LatLonDialog from './dialogs/LatLon'
Expand All @@ -18,7 +17,6 @@ import TitleBarShim from './TitleBarShim'
import { defineMessages, useIntl } from 'react-intl'
import createPersistedState from '../hooks/createPersistedState'
import SyncView from './SyncView'
import { SettingsView } from './SettingsView'
import { STATES as updateStates, UpdaterView, UpdateTab } from './UpdaterView'
import useUpdater from './UpdaterView/useUpdater'
import Loading from './Loading'
Expand Down Expand Up @@ -47,8 +45,6 @@ const m = defineMessages({
mapfilter: 'Observations',
// Synchronize tab label
sync: 'Synchronize',
// Settings tab label
settings: 'Settings',
update: 'Update Mapeo'
})

Expand Down Expand Up @@ -112,17 +108,11 @@ const MapeoIcon = styled(LocationOn)`
`

const StyledTabs = styled(Tabs)`
height: 100%;
border-right: 1px solid rgba(0, 0, 0, 0.12);
-webkit-app-region: no-drag;
.PrivateTabIndicator-root-1 {
background-color: #ff9933;
}
.MuiTabs-flexContainerVertical {
height: 100%;
}
`

const StyledTab = styled(Tab)`
Expand Down Expand Up @@ -164,6 +154,13 @@ const StyledPanel = styled.div`
}
`

const Version = styled.div`
align-self: flex-start;
margin: auto 10px 10px 10px;
font-size: 0.8rem;
color: ${buildConfig.variant === 'icca' ? '#eeeeee' : '#aaaaaa'};
`

const LoadingContainer = styled.div`
display: flex;
width: 100%;
Expand Down Expand Up @@ -272,26 +269,19 @@ export default function Home ({ onSelectLanguage }) {
orientation='vertical'
variant='scrollable'
value={tabIndex}
onChange={(e, value) => {
console.log({ value })
setTabIndex(value)
}}
onChange={(e, value) => setTabIndex(value)}
>
<StyledTab icon={<MapIcon />} label={t(m.mapeditor)} />
<StyledTab icon={<ObservationIcon />} label={t(m.mapfilter)} />
<StyledTab icon={<SyncIcon />} label={t(m.sync)} />
<StyledTab
style={{ marginTop: 'auto' }}
icon={<SettingsIcon />}
label={t(m.settings)}
/>
{hasUpdate && (
<StyledTab
icon={<WarningIcon />}
label={<UpdateTab update={update} />}
/>
)}
</StyledTabs>
<Version>Mapeo v{buildConfig.version}</Version>
</Sidebar>
<TabContent>
<TabPanel value={tabIndex} index={0} component={MapEditor} />
Expand All @@ -302,7 +292,13 @@ export default function Home ({ onSelectLanguage }) {
component={SyncView}
unmountOnExit
/>
<TabPanel value={tabIndex} index={3} component={SettingsView} />
<TabPanel
value={tabIndex}
index={3}
component={UpdaterView}
update={update}
setUpdate={setUpdate}
/>
</TabContent>
<ChangeLanguage
open={dialog === 'ChangeLanguage'}
Expand Down
6 changes: 0 additions & 6 deletions src/renderer/components/SettingsView/AboutMapeo.js

This file was deleted.

101 changes: 0 additions & 101 deletions src/renderer/components/SettingsView/SettingsMenu.js

This file was deleted.

41 changes: 0 additions & 41 deletions src/renderer/components/SettingsView/index.js

This file was deleted.

0 comments on commit b258b84

Please sign in to comment.