Refactor selector positions

This commit is contained in:
Nicola Benaglia 2025-05-29 14:19:21 +02:00
parent eb7780a6ce
commit a504d92911
5 changed files with 45 additions and 24 deletions

View File

@ -3966,7 +3966,7 @@ function App() {
bottom: '1%', bottom: '1%',
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',
left: '1%', left: '3px',
position: 'absolute', position: 'absolute',
width: 'auto', width: 'auto',
}} }}

View File

@ -25,6 +25,8 @@ import { CoreSyncStatus } from '../CoreSyncStatus';
import { MessagingIconFilled } from '../../assets/Icons/MessagingIconFilled'; import { MessagingIconFilled } from '../../assets/Icons/MessagingIconFilled';
import { useAtom } from 'jotai'; import { useAtom } from 'jotai';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import LanguageSelector from '../Language/LanguageSelector';
import ThemeSelector from '../Theme/ThemeSelector';
const uid = new ShortUniqueId({ length: 8 }); const uid = new ShortUniqueId({ length: 8 });
@ -457,6 +459,7 @@ export const AppsDesktop = ({
</IconWrapper> </IconWrapper>
</ButtonBase> </ButtonBase>
)} )}
{mode !== 'home' && ( {mode !== 'home' && (
<AppsNavBarDesktop <AppsNavBarDesktop
disableBack={isNewTabWindow && mode === 'viewer'} disableBack={isNewTabWindow && mode === 'viewer'}
@ -499,6 +502,7 @@ export const AppsDesktop = ({
{mode === 'appInfo' && !selectedTab && ( {mode === 'appInfo' && !selectedTab && (
<AppInfo app={selectedAppInfo} myName={myName} /> <AppInfo app={selectedAppInfo} myName={myName} />
)} )}
{mode === 'appInfo-from-category' && !selectedTab && ( {mode === 'appInfo-from-category' && !selectedTab && (
<AppInfo app={selectedAppInfo} myName={myName} /> <AppInfo app={selectedAppInfo} myName={myName} />
)} )}
@ -553,6 +557,26 @@ export const AppsDesktop = ({
</Box> </Box>
</> </>
)} )}
<Box
sx={{
alignItems: 'flex-start',
bottom: '1%',
display: 'flex',
flexDirection: 'column',
left: '3px',
position: 'absolute',
width: 'auto',
}}
>
<Box sx={{ alignSelf: 'left' }}>
<LanguageSelector />
</Box>
<Box sx={{ alignSelf: 'center' }}>
<ThemeSelector />
</Box>
</Box>
</AppsParent> </AppsParent>
); );
}; };

View File

@ -18,6 +18,8 @@ import { IconWrapper } from '../Desktop/DesktopFooter';
import { CoreSyncStatus } from '../CoreSyncStatus'; import { CoreSyncStatus } from '../CoreSyncStatus';
import { MessagingIconFilled } from '../../assets/Icons/MessagingIconFilled'; import { MessagingIconFilled } from '../../assets/Icons/MessagingIconFilled';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import LanguageSelector from '../Language/LanguageSelector';
import ThemeSelector from '../Theme/ThemeSelector';
const uid = new ShortUniqueId({ length: 8 }); const uid = new ShortUniqueId({ length: 8 });
@ -351,6 +353,24 @@ export const AppsDevMode = ({
</ButtonBase> </ButtonBase>
{mode !== 'home' && <AppsDevModeNavBar />} {mode !== 'home' && <AppsDevModeNavBar />}
<Box
sx={{
alignItems: 'flex-start',
bottom: '1%',
display: 'flex',
flexDirection: 'column',
position: 'absolute',
width: 'auto',
}}
>
<Box sx={{ alignSelf: 'left' }}>
<LanguageSelector />
</Box>
<Box sx={{ alignSelf: 'center' }}>
<ThemeSelector />
</Box>
</Box>
</Box> </Box>
{mode === 'home' && ( {mode === 'home' && (

View File

@ -35,7 +35,6 @@ export const AppsDevModeNavBar = () => {
const [isNewTabWindow, setIsNewTabWindow] = useState(false); const [isNewTabWindow, setIsNewTabWindow] = useState(false);
const tabsRef = useRef(null); const tabsRef = useRef(null);
const [anchorEl, setAnchorEl] = useState(null); const [anchorEl, setAnchorEl] = useState(null);
const open = Boolean(anchorEl);
const handleClick = (event) => { const handleClick = (event) => {
setAnchorEl(event.currentTarget); setAnchorEl(event.currentTarget);

View File

@ -14,8 +14,6 @@ import { SortablePinnedApps } from './SortablePinnedApps';
import { extractComponents } from '../Chat/MessageDisplay'; import { extractComponents } from '../Chat/MessageDisplay';
import ArrowOutwardIcon from '@mui/icons-material/ArrowOutward'; import ArrowOutwardIcon from '@mui/icons-material/ArrowOutward';
import { AppsPrivate } from './AppsPrivate'; import { AppsPrivate } from './AppsPrivate';
import ThemeSelector from '../Theme/ThemeSelector';
import LanguageSelector from '../Language/LanguageSelector';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
export const AppsHomeDesktop = ({ export const AppsHomeDesktop = ({
@ -169,26 +167,6 @@ export const AppsHomeDesktop = ({
myApp={myApp} myApp={myApp}
/> />
</AppsContainer> </AppsContainer>
<Box
sx={{
alignItems: 'flex-start',
bottom: '1%',
display: 'flex',
flexDirection: 'column',
left: '4px',
position: 'absolute',
width: 'auto',
}}
>
<Box sx={{ alignSelf: 'left' }}>
<LanguageSelector />
</Box>
<Box sx={{ alignSelf: 'center' }}>
<ThemeSelector />
</Box>
</Box>
</> </>
); );
}; };