Refactor q-app library component style

This commit is contained in:
Nicola Benaglia 2025-04-20 18:58:55 +02:00
parent a5c4a2ae75
commit e8ccfb3d46
4 changed files with 17 additions and 28 deletions

View File

@ -38,7 +38,7 @@ export const AppsContainer = styled(Box)(({ theme }) => ({
export const AppsLibraryContainer = styled(Box)(({ theme }) => ({ export const AppsLibraryContainer = styled(Box)(({ theme }) => ({
alignItems: 'center', alignItems: 'center',
backgroundColor: theme.palette.background.paper, backgroundColor: theme.palette.background.default,
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',
justifyContent: 'flex-start', justifyContent: 'flex-start',
@ -114,7 +114,7 @@ export const AppCircleLabel = styled(Typography)(({ theme }) => ({
})); }));
export const AppLibrarySubTitle = styled(Typography)(({ theme }) => ({ export const AppLibrarySubTitle = styled(Typography)(({ theme }) => ({
backgroundColor: theme.palette.background.paper, backgroundColor: theme.palette.background.default,
color: theme.palette.text.primary, color: theme.palette.text.primary,
fontSize: '16px', fontSize: '16px',
fontWeight: 500, fontWeight: 500,

View File

@ -9,7 +9,7 @@ import {
} from './Apps-styles'; } from './Apps-styles';
import { ButtonBase, InputBase, styled } from '@mui/material'; import { ButtonBase, InputBase, styled } from '@mui/material';
import { MyContext } from '../../App'; import { MyContext } from '../../App';
import IconSearch from '../../assets/svgs/Search.svg'; import SearchIcon from '@mui/icons-material/Search';
import IconClearInput from '../../assets/svgs/ClearInput.svg'; import IconClearInput from '../../assets/svgs/ClearInput.svg';
import { Spacer } from '../../common/Spacer'; import { Spacer } from '../../common/Spacer';
import { AppInfoSnippet } from './AppInfoSnippet'; import { AppInfoSnippet } from './AppInfoSnippet';
@ -19,22 +19,6 @@ import {
AppsDesktopLibraryHeader, AppsDesktopLibraryHeader,
} from './AppsDesktop-styles'; } from './AppsDesktop-styles';
const officialAppList = [
'q-tube',
'q-blog',
'q-share',
'q-support',
'q-mail',
'q-fund',
'q-shop',
'q-trade',
'q-support',
'q-manager',
'q-wallets',
'q-search',
'q-nodecontrol',
];
const ScrollerStyled = styled('div')({ const ScrollerStyled = styled('div')({
// Hide scrollbar for WebKit browsers (Chrome, Safari) // Hide scrollbar for WebKit browsers (Chrome, Safari)
'::-webkit-scrollbar': { '::-webkit-scrollbar': {
@ -136,15 +120,15 @@ export const AppsCategoryDesktop = ({
<AppsLibraryContainer <AppsLibraryContainer
sx={{ sx={{
display: !isShow && 'none', display: !isShow && 'none',
padding: '0px',
height: '100vh', height: '100vh',
overflow: 'hidden', overflow: 'hidden',
padding: '0px',
paddingTop: '30px', paddingTop: '30px',
}} }}
> >
<AppsDesktopLibraryHeader <AppsDesktopLibraryHeader
sx={{ sx={{
maxWidth: '1500px', maxWidth: '1200px',
width: '90%', width: '90%',
}} }}
> >
@ -159,7 +143,8 @@ export const AppsCategoryDesktop = ({
}} }}
> >
<AppsSearchLeft> <AppsSearchLeft>
<img src={IconSearch} /> <SearchIcon />
<InputBase <InputBase
value={searchValue} value={searchValue}
onChange={(e) => setSearchValue(e.target.value)} onChange={(e) => setSearchValue(e.target.value)}
@ -172,6 +157,7 @@ export const AppsCategoryDesktop = ({
}} }}
/> />
</AppsSearchLeft> </AppsSearchLeft>
<AppsSearchRight> <AppsSearchRight>
{searchValue && ( {searchValue && (
<ButtonBase <ButtonBase
@ -186,20 +172,24 @@ export const AppsCategoryDesktop = ({
</AppsSearchContainer> </AppsSearchContainer>
</AppsWidthLimiter> </AppsWidthLimiter>
</AppsDesktopLibraryHeader> </AppsDesktopLibraryHeader>
<AppsDesktopLibraryBody <AppsDesktopLibraryBody
sx={{ sx={{
alignItems: 'center',
height: `calc(100vh - 36px)`, height: `calc(100vh - 36px)`,
overflow: 'auto', overflow: 'auto',
padding: '0px', padding: '0px',
alignItems: 'center', width: '70%',
}} }}
> >
<Spacer height="25px" /> <Spacer height="25px" />
<AppsWidthLimiter> <AppsWidthLimiter>
<AppLibrarySubTitle>{`Category: ${category?.name}`}</AppLibrarySubTitle> <AppLibrarySubTitle>{`Category: ${category?.name}`}</AppLibrarySubTitle>
<Spacer height="25px" /> <Spacer height="25px" />
</AppsWidthLimiter> </AppsWidthLimiter>
<AppsWidthLimiter> <AppsWidthLimiter>
<StyledVirtuosoContainer <StyledVirtuosoContainer
sx={{ sx={{

View File

@ -478,13 +478,13 @@ export const AppsDesktop = ({
)} )}
<AppsLibraryDesktop <AppsLibraryDesktop
isShow={mode === 'library' && !selectedTab}
availableQapps={availableQapps} availableQapps={availableQapps}
setMode={setMode}
myName={myName}
hasPublishApp={!!(myApp || myWebsite)}
categories={categories} categories={categories}
getQapps={getQapps} getQapps={getQapps}
hasPublishApp={!!(myApp || myWebsite)}
isShow={mode === 'library' && !selectedTab}
myName={myName}
setMode={setMode}
/> />
{mode === 'appInfo' && !selectedTab && ( {mode === 'appInfo' && !selectedTab && (

View File

@ -42,7 +42,6 @@ import {
AppsDesktopLibraryHeader, AppsDesktopLibraryHeader,
} from './AppsDesktop-styles'; } from './AppsDesktop-styles';
import { ShowMessageReturnButton } from '../Group/Forum/Mail-styles'; import { ShowMessageReturnButton } from '../Group/Forum/Mail-styles';
import { Theme } from 'emoji-picker-react';
const officialAppList = [ const officialAppList = [
'q-tube', 'q-tube',