mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-06-13 19:41:22 +00:00
Get correct files from other branch
This commit is contained in:
parent
958acbe943
commit
2f3252a2e3
@ -18,11 +18,9 @@ import {
|
|||||||
AppsLibraryContainer,
|
AppsLibraryContainer,
|
||||||
AppsWidthLimiter,
|
AppsWidthLimiter,
|
||||||
} from './Apps-styles';
|
} from './Apps-styles';
|
||||||
import { Avatar, Box, ButtonBase, InputBase } from '@mui/material';
|
import { Avatar, Box } from '@mui/material';
|
||||||
import { Add } from '@mui/icons-material';
|
import { getBaseApiReact } from '../../App';
|
||||||
import { getBaseApiReact, isMobile } from '../../App';
|
|
||||||
import LogoSelected from '../../assets/svgs/LogoSelected.svg';
|
import LogoSelected from '../../assets/svgs/LogoSelected.svg';
|
||||||
|
|
||||||
import { Spacer } from '../../common/Spacer';
|
import { Spacer } from '../../common/Spacer';
|
||||||
import { executeEvent } from '../../utils/events';
|
import { executeEvent } from '../../utils/events';
|
||||||
import { AppRating } from './AppRating';
|
import { AppRating } from './AppRating';
|
||||||
@ -49,9 +47,8 @@ export const AppInfo = ({ app, myName }) => {
|
|||||||
return (
|
return (
|
||||||
<AppsLibraryContainer
|
<AppsLibraryContainer
|
||||||
sx={{
|
sx={{
|
||||||
height: !isMobile && '100%',
|
height: '100%',
|
||||||
justifyContent: !isMobile && 'flex-start',
|
justifyContent: 'flex-start',
|
||||||
alignItems: isMobile && 'center',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
@ -62,7 +59,8 @@ export const AppInfo = ({ app, myName }) => {
|
|||||||
width: '90%',
|
width: '90%',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{!isMobile && <Spacer height="30px" />}
|
<Spacer height="30px" />
|
||||||
|
|
||||||
<AppsWidthLimiter>
|
<AppsWidthLimiter>
|
||||||
<AppInfoSnippetContainer>
|
<AppInfoSnippetContainer>
|
||||||
<AppInfoSnippetLeft
|
<AppInfoSnippetLeft
|
||||||
@ -170,15 +168,9 @@ export const AppInfo = ({ app, myName }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<AppDownloadButtonText>
|
<AppDownloadButtonText>
|
||||||
{!isMobile ? (
|
{isSelectedAppPinned
|
||||||
<>
|
? 'Unpin from dashboard'
|
||||||
{isSelectedAppPinned
|
: 'Pin to dashboard'}
|
||||||
? 'Unpin from dashboard'
|
|
||||||
: 'Pin to dashboard'}
|
|
||||||
</>
|
|
||||||
) : (
|
|
||||||
<>{isSelectedAppPinned ? 'Unpin' : 'Pin'}</>
|
|
||||||
)}
|
|
||||||
</AppDownloadButtonText>
|
</AppDownloadButtonText>
|
||||||
</AppDownloadButton>
|
</AppDownloadButton>
|
||||||
<AppDownloadButton
|
<AppDownloadButton
|
||||||
|
@ -12,9 +12,8 @@ import {
|
|||||||
AppInfoUserName,
|
AppInfoUserName,
|
||||||
} from './Apps-styles';
|
} from './Apps-styles';
|
||||||
import { Avatar, ButtonBase } from '@mui/material';
|
import { Avatar, ButtonBase } from '@mui/material';
|
||||||
import { getBaseApiReact, isMobile } from '../../App';
|
import { getBaseApiReact } from '../../App';
|
||||||
import LogoSelected from '../../assets/svgs/LogoSelected.svg';
|
import LogoSelected from '../../assets/svgs/LogoSelected.svg';
|
||||||
|
|
||||||
import { Spacer } from '../../common/Spacer';
|
import { Spacer } from '../../common/Spacer';
|
||||||
import { executeEvent } from '../../utils/events';
|
import { executeEvent } from '../../utils/events';
|
||||||
import { AppRating } from './AppRating';
|
import { AppRating } from './AppRating';
|
||||||
@ -124,52 +123,49 @@ export const AppInfoSnippet = ({
|
|||||||
gap: '10px',
|
gap: '10px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{!isMobile && (
|
<AppDownloadButton
|
||||||
<AppDownloadButton
|
onClick={() => {
|
||||||
onClick={() => {
|
setSortablePinnedApps((prev) => {
|
||||||
setSortablePinnedApps((prev) => {
|
let updatedApps;
|
||||||
let updatedApps;
|
|
||||||
|
|
||||||
if (isSelectedAppPinned) {
|
if (isSelectedAppPinned) {
|
||||||
// Remove the selected app if it is pinned
|
// Remove the selected app if it is pinned
|
||||||
updatedApps = prev.filter(
|
updatedApps = prev.filter(
|
||||||
(item) =>
|
(item) =>
|
||||||
!(
|
!(
|
||||||
item?.name === app?.name &&
|
item?.name === app?.name && item?.service === app?.service
|
||||||
item?.service === app?.service
|
)
|
||||||
)
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
// Add the selected app if it is not pinned
|
|
||||||
updatedApps = [
|
|
||||||
...prev,
|
|
||||||
{
|
|
||||||
name: app?.name,
|
|
||||||
service: app?.service,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
saveToLocalStorage(
|
|
||||||
'ext_saved_settings',
|
|
||||||
'sortablePinnedApps',
|
|
||||||
updatedApps
|
|
||||||
);
|
);
|
||||||
return updatedApps;
|
} else {
|
||||||
});
|
// Add the selected app if it is not pinned
|
||||||
setSettingsLocalLastUpdated(Date.now());
|
updatedApps = [
|
||||||
}}
|
...prev,
|
||||||
sx={{
|
{
|
||||||
backgroundColor: '#359ff7ff',
|
name: app?.name,
|
||||||
opacity: isSelectedAppPinned ? 0.6 : 1,
|
service: app?.service,
|
||||||
}}
|
},
|
||||||
>
|
];
|
||||||
<AppDownloadButtonText>
|
}
|
||||||
{' '}
|
|
||||||
{isSelectedAppPinned ? 'Unpin' : 'Pin'}
|
saveToLocalStorage(
|
||||||
</AppDownloadButtonText>
|
'ext_saved_settings',
|
||||||
</AppDownloadButton>
|
'sortablePinnedApps',
|
||||||
)}
|
updatedApps
|
||||||
|
);
|
||||||
|
return updatedApps;
|
||||||
|
});
|
||||||
|
setSettingsLocalLastUpdated(Date.now());
|
||||||
|
}}
|
||||||
|
sx={{
|
||||||
|
backgroundColor: '#359ff7ff',
|
||||||
|
opacity: isSelectedAppPinned ? 0.6 : 1,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<AppDownloadButtonText>
|
||||||
|
{' '}
|
||||||
|
{isSelectedAppPinned ? 'Unpin' : 'Pin'}
|
||||||
|
</AppDownloadButtonText>
|
||||||
|
</AppDownloadButton>
|
||||||
|
|
||||||
<AppDownloadButton
|
<AppDownloadButton
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user