mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
1 parent
baf6dedb6f
commit
a88286f97a
23 files changed
+85
-52
No files matched your search
+2
-2
@@ -16,7 +16,7 @@ import { useApps } from './os/apps/hooks/useApps';
|
|||||||
import { useContactsService } from './apps/contacts/hooks/useContactsService';
|
import { useContactsService } from './apps/contacts/hooks/useContactsService';
|
||||||
import { useTwitterService } from './apps/twitter/hooks/useTwitterService';
|
import { useTwitterService } from './apps/twitter/hooks/useTwitterService';
|
||||||
import { useMatchService } from './apps/match/hooks/useMatchService';
|
import { useMatchService } from './apps/match/hooks/useMatchService';
|
||||||
import { useSelloutService } from './apps/sellout/hooks/useSelloutService';
|
import { useMarketplaceService } from './apps/marketplace/hooks/useMarketplaceService';
|
||||||
import { useBankService } from './apps/bank/hooks/useBankService';
|
import { useBankService } from './apps/bank/hooks/useBankService';
|
||||||
import { useMessagesService } from './apps/messages/hooks/useMessageService';
|
import { useMessagesService } from './apps/messages/hooks/useMessageService';
|
||||||
import { useNotesService } from './apps/notes/hooks/useNotesService';
|
import { useNotesService } from './apps/notes/hooks/useNotesService';
|
||||||
@@ -68,7 +68,7 @@ function Phone() {
|
|||||||
useContactsService();
|
useContactsService();
|
||||||
useTwitterService();
|
useTwitterService();
|
||||||
useMatchService();
|
useMatchService();
|
||||||
useSelloutService();
|
useMarketplaceService();
|
||||||
useBankService();
|
useBankService();
|
||||||
useMessagesService();
|
useMessagesService();
|
||||||
useNotesService();
|
useNotesService();
|
||||||
|
|||||||
+12
-11
@@ -1,28 +1,28 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { AppWrapper } from '../../../ui/components/AppWrapper';
|
import { AppWrapper } from '../../../ui/components/AppWrapper';
|
||||||
import { AppContent } from '../../../ui/components/AppContent';
|
import { AppContent } from '../../../ui/components/AppContent';
|
||||||
import { SelloutTitle } from './SelloutTitle';
|
import { MarketplaceTitle } from './MarketplaceTitle';
|
||||||
import { SelloutListContainer } from './SelloutList/SelloutListContainer';
|
import { MarketplaceListContainer } from './SelloutList/MarketplaceListContainer';
|
||||||
import { NavigationBar } from './navigation/NavigationBar';
|
import { NavigationBar } from './navigation/NavigationBar';
|
||||||
import { Switch, Route } from 'react-router-dom';
|
import { Switch, Route } from 'react-router-dom';
|
||||||
import { ListingFormContainer } from './form/ListingFormContainer';
|
import { ListingFormContainer } from './form/ListingFormContainer';
|
||||||
import InjectDebugData from '../../../os/debug/InjectDebugData';
|
import InjectDebugData from '../../../os/debug/InjectDebugData';
|
||||||
import { SelloutThemeProvider } from '../providers/SelloutThemeProvider';
|
import { MarketplaceThemeProvider } from '../providers/MarketplaceThemeProvider';
|
||||||
|
|
||||||
export const SelloutApp = () => {
|
export const MarketplaceApp = () => {
|
||||||
return (
|
return (
|
||||||
<SelloutThemeProvider>
|
<MarketplaceThemeProvider>
|
||||||
<AppWrapper id="sellout-app">
|
<AppWrapper id="sellout-app">
|
||||||
<SelloutTitle />
|
<MarketplaceTitle />
|
||||||
<AppContent>
|
<AppContent>
|
||||||
<Switch>
|
<Switch>
|
||||||
<Route path="/sellout" exact component={SelloutListContainer} />
|
<Route path="/marketplace" exact component={MarketplaceListContainer} />
|
||||||
<Route path="/sellout/new" component={ListingFormContainer} />
|
<Route path="/marketplace/new" component={ListingFormContainer} />
|
||||||
</Switch>
|
</Switch>
|
||||||
</AppContent>
|
</AppContent>
|
||||||
<NavigationBar />
|
<NavigationBar />
|
||||||
</AppWrapper>
|
</AppWrapper>
|
||||||
</SelloutThemeProvider>
|
</MarketplaceThemeProvider>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -35,8 +35,9 @@ InjectDebugData([
|
|||||||
id: 1,
|
id: 1,
|
||||||
name: 'Some guy',
|
name: 'Some guy',
|
||||||
number: '111-1134',
|
number: '111-1134',
|
||||||
title: 'Car',
|
title: 'eeeeeeeeeeeeeeeeeeeeeeeee',
|
||||||
description: 'Selling this cool car',
|
description:
|
||||||
|
'skldfsd sajsfjklsdfj sdajsklfjdsjklas jskj sdjsd jasdkl sdjsf jasdklsfjfj kljasdkf jkaf jsdkla jsk jdkla j kljasdkf jkld jasd kljk',
|
||||||
url: 'https://beta.iodine.gg/706Y3.jpeg',
|
url: 'https://beta.iodine.gg/706Y3.jpeg',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
+1
-1
@@ -20,7 +20,7 @@ const useStyles = makeStyles((theme) => ({
|
|||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
export const SelloutTitle = () => {
|
export const MarketplaceTitle = () => {
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
return (
|
return (
|
||||||
<Paper className={classes.root} square variant="outlined" elevation={24}>
|
<Paper className={classes.root} square variant="outlined" elevation={24}>
|
||||||
File renamed without changes.
+2
-2
@@ -33,7 +33,7 @@ const useStyles = makeStyles((theme) => ({
|
|||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
export const SelloutItem = (listing: MarketplaceListing) => {
|
export const MarketplaceItem = (listing: MarketplaceListing) => {
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -62,7 +62,7 @@ export const SelloutItem = (listing: MarketplaceListing) => {
|
|||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Typography variant="h6" style={{ padding: 10 }}>
|
<Typography variant="body1" style={{ padding: 10 }}>
|
||||||
{listing.description}
|
{listing.description}
|
||||||
</Typography>
|
</Typography>
|
||||||
<ListingActions listing={listing} />
|
<ListingActions listing={listing} />
|
||||||
+3
-3
@@ -1,15 +1,15 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { List } from '../../../../ui/components/List';
|
import { List } from '../../../../ui/components/List';
|
||||||
import { useListing } from '../../hooks/useListing';
|
import { useListing } from '../../hooks/useListing';
|
||||||
import { SelloutItem } from './SelloutItem';
|
import { MarketplaceItem } from './MarketplaceItem';
|
||||||
|
|
||||||
export const SelloutList = () => {
|
export const MarketplaceList = () => {
|
||||||
const listings = useListing();
|
const listings = useListing();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<List>
|
<List>
|
||||||
{listings.map((listing) => (
|
{listings.map((listing) => (
|
||||||
<SelloutItem key={listing.id} {...listing} />
|
<MarketplaceItem key={listing.id} {...listing} />
|
||||||
))}
|
))}
|
||||||
</List>
|
</List>
|
||||||
);
|
);
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { MarketplaceList } from './MarketplaceList';
|
||||||
|
|
||||||
|
export const MarketplaceListContainer = () => {
|
||||||
|
return <MarketplaceList />;
|
||||||
|
};
|
||||||
+39
-12
@@ -1,7 +1,10 @@
|
|||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { makeStyles, Button, TextField } from '@material-ui/core';
|
import { makeStyles, Button, TextField, Typography } from '@material-ui/core';
|
||||||
import Nui from '../../../../os/nui-events/utils/Nui';
|
import Nui from '../../../../os/nui-events/utils/Nui';
|
||||||
import { MarketplaceEvents } from '../../../../../../typings/marketplace';
|
import { MarketplaceEvents } from '../../../../../../typings/marketplace';
|
||||||
|
import { useSnackbar } from '../../../../ui/hooks/useSnackbar';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { useHistory } from 'react-router';
|
||||||
|
|
||||||
const useStyles = makeStyles((theme) => ({
|
const useStyles = makeStyles((theme) => ({
|
||||||
root: {
|
root: {
|
||||||
@@ -29,17 +32,28 @@ const useStyles = makeStyles((theme) => ({
|
|||||||
|
|
||||||
export const ListingForm = () => {
|
export const ListingForm = () => {
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const { addAlert } = useSnackbar();
|
||||||
|
const history = useHistory();
|
||||||
|
|
||||||
const [title, setTitle] = useState('');
|
const [title, setTitle] = useState('');
|
||||||
const [url, setUrl] = useState('');
|
const [url, setUrl] = useState('');
|
||||||
const [description, setDescription] = useState('');
|
const [description, setDescription] = useState('');
|
||||||
|
|
||||||
const addListing = () => {
|
const addListing = () => {
|
||||||
Nui.send(MarketplaceEvents.ADD_LISTING, {
|
if (title !== '' && description !== '') {
|
||||||
title,
|
Nui.send(MarketplaceEvents.ADD_LISTING, {
|
||||||
url,
|
title,
|
||||||
description,
|
url,
|
||||||
});
|
description,
|
||||||
|
});
|
||||||
|
history.push('/marketplace');
|
||||||
|
} else {
|
||||||
|
addAlert({
|
||||||
|
message: t('APPS_MARKETPLACE_REQUIRED_FIELDS'),
|
||||||
|
type: 'error',
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -48,15 +62,22 @@ export const ListingForm = () => {
|
|||||||
<TextField
|
<TextField
|
||||||
className={classes.input}
|
className={classes.input}
|
||||||
onChange={(e) => setTitle(e.target.value)}
|
onChange={(e) => setTitle(e.target.value)}
|
||||||
placeholder="Title on listing.."
|
label={t('GENERIC_REQUIRED')}
|
||||||
inputProps={{ className: classes.textFieldInput }}
|
placeholder={t('APPS_MARKETPLACE_FORM_TITLE')}
|
||||||
|
inputProps={{
|
||||||
|
className: classes.textFieldInput,
|
||||||
|
maxLength: 25,
|
||||||
|
}}
|
||||||
style={{ width: '80%' }}
|
style={{ width: '80%' }}
|
||||||
size="medium"
|
size="medium"
|
||||||
|
InputLabelProps={{
|
||||||
|
shrink: true,
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<TextField
|
<TextField
|
||||||
className={classes.input}
|
className={classes.input}
|
||||||
placeholder="Image URL"
|
placeholder={t('APPS_MARKETPLACE_FORM_IMAGE')}
|
||||||
onChange={(e) => setUrl(e.target.value)}
|
onChange={(e) => setUrl(e.target.value)}
|
||||||
inputProps={{ className: classes.textFieldInput }}
|
inputProps={{ className: classes.textFieldInput }}
|
||||||
style={{ width: '80%' }}
|
style={{ width: '80%' }}
|
||||||
@@ -67,15 +88,21 @@ export const ListingForm = () => {
|
|||||||
<TextField
|
<TextField
|
||||||
className={classes.input}
|
className={classes.input}
|
||||||
onChange={(e) => setDescription(e.target.value)}
|
onChange={(e) => setDescription(e.target.value)}
|
||||||
placeholder="Description"
|
label={t('GENERIC_REQUIRED')}
|
||||||
inputProps={{ className: classes.multilineFieldInput }}
|
placeholder={t('APPS_MARKETPLACE_FORM_DESCRIPTION')}
|
||||||
|
inputProps={{
|
||||||
|
className: classes.multilineFieldInput,
|
||||||
|
maxLength: 130,
|
||||||
|
}}
|
||||||
style={{ width: '80%' }}
|
style={{ width: '80%' }}
|
||||||
size="medium"
|
size="medium"
|
||||||
|
InputLabelProps={{
|
||||||
|
shrink: true,
|
||||||
|
}}
|
||||||
multiline
|
multiline
|
||||||
rows={4}
|
rows={4}
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Button onClick={addListing} className={classes.postButton}>
|
<Button onClick={addListing} className={classes.postButton}>
|
||||||
Post
|
Post
|
||||||
</Button>
|
</Button>
|
||||||
File renamed without changes.
+2
-2
@@ -31,9 +31,9 @@ export const NavigationBar = () => {
|
|||||||
<BottomNavigationAction
|
<BottomNavigationAction
|
||||||
component={Link}
|
component={Link}
|
||||||
icon={<FontAwesomeIcon icon={faHome} />}
|
icon={<FontAwesomeIcon icon={faHome} />}
|
||||||
to="/sellout"
|
to="/marketplace"
|
||||||
/>
|
/>
|
||||||
<BottomNavigationAction component={Link} icon={<AddCircleIcon />} to="/sellout/new" />
|
<BottomNavigationAction component={Link} icon={<AddCircleIcon />} to="/marketplace/new" />
|
||||||
</BottomNavigation>
|
</BottomNavigation>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
File renamed without changes.
File renamed without changes.
+1
-1
@@ -6,7 +6,7 @@ import { IAlert, useSnackbar } from '../../../ui/hooks/useSnackbar';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { MarketplaceEvents } from '../../../../../typings/marketplace';
|
import { MarketplaceEvents } from '../../../../../typings/marketplace';
|
||||||
|
|
||||||
export const useSelloutService = () => {
|
export const useMarketplaceService = () => {
|
||||||
const setSellout = useSetRecoilState(selloutState.listing);
|
const setSellout = useSetRecoilState(selloutState.listing);
|
||||||
const { addAlert } = useSnackbar();
|
const { addAlert } = useSnackbar();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
File renamed without changes.
@@ -0,0 +1,5 @@
|
|||||||
|
import { createAppThemeProvider } from '../../../os/apps/utils/createAppThemeProvider';
|
||||||
|
|
||||||
|
import selloutTheme from '../marketplace.theme';
|
||||||
|
|
||||||
|
export const MarketplaceThemeProvider = createAppThemeProvider(selloutTheme);
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
import React from 'react';
|
|
||||||
import { SelloutList } from './SelloutList';
|
|
||||||
|
|
||||||
export const SelloutListContainer = () => {
|
|
||||||
return <SelloutList />;
|
|
||||||
};
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
import { createAppThemeProvider } from '../../../os/apps/utils/createAppThemeProvider';
|
|
||||||
|
|
||||||
import selloutTheme from '../sellout.theme';
|
|
||||||
|
|
||||||
export const SelloutThemeProvider = createAppThemeProvider(selloutTheme);
|
|
||||||
@@ -189,16 +189,21 @@
|
|||||||
"APPS_SETTING_STREAMER_MODE_DESC": "Hide images before they are shown",
|
"APPS_SETTING_STREAMER_MODE_DESC": "Hide images before they are shown",
|
||||||
|
|
||||||
"APPS_MARKETPLACE_CREATE_LISTING_SUCCESS": "Successfully created a new listing",
|
"APPS_MARKETPLACE_CREATE_LISTING_SUCCESS": "Successfully created a new listing",
|
||||||
"APPS_MARKETPALCE_CREATE_LISTING_FAILED": "Failed to create a new listing",
|
"APPS_MARKETPLACE_CREATE_LISTING_FAILED": "Failed to create a new listing",
|
||||||
"APPS_MARKETPLACE_DELETE_LISTING_SUCCESS": "Successfully delete listing",
|
"APPS_MARKETPLACE_DELETE_LISTING_SUCCESS": "Successfully delete listing",
|
||||||
"APPS_MARKETPLACE_DELETE_LISTING_FAILED": "Failed to delete listing",
|
"APPS_MARKETPLACE_DELETE_LISTING_FAILED": "Failed to delete listing",
|
||||||
"APPS_MARKETPLACE_REPORT_LISTING_FAILED": "This listing has already been reported",
|
"APPS_MARKETPLACE_REPORT_LISTING_FAILED": "This listing has already been reported",
|
||||||
"APPS_MARKETPLACE_REPORT_LISTING_SUCCESS": "Successfully reported listing",
|
"APPS_MARKETPLACE_REPORT_LISTING_SUCCESS": "Successfully reported listing",
|
||||||
|
"APPS_MARKETPLACE_REQUIRED_FIELDS": "All required fields must be filled!",
|
||||||
|
"APPS_MARKETPLACE_FORM_TITLE": "Title",
|
||||||
|
"APPS_MARKETPLACE_FORM_IMAGE": "Image or URL",
|
||||||
|
"APPS_MARKETPLACE_FORM_DESCRIPTION": "Description",
|
||||||
|
|
||||||
"GENERIC_CLICK_TO_REVEAL": "Click to reveal",
|
"GENERIC_CLICK_TO_REVEAL": "Click to reveal",
|
||||||
"GENERIC_WAIT": "Please wait...",
|
"GENERIC_WAIT": "Please wait...",
|
||||||
"GENERIC_SAVE": "Save",
|
"GENERIC_SAVE": "Save",
|
||||||
"GENERIC_UPDATE": "Update",
|
"GENERIC_UPDATE": "Update",
|
||||||
|
"GENERIC_REQUIRED": "Required",
|
||||||
"GENERIC_DELETE": "Delete",
|
"GENERIC_DELETE": "Delete",
|
||||||
"GENERIC_REPORT": "Report",
|
"GENERIC_REPORT": "Report",
|
||||||
"GENERIC_CALL": "Call",
|
"GENERIC_CALL": "Call",
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import { MessagesApp } from '../../../apps/messages/components/MessagesApp';
|
|||||||
import { MatchApp } from '../../../apps/match/components/MatchApp';
|
import { MatchApp } from '../../../apps/match/components/MatchApp';
|
||||||
import { TwitterApp } from '../../../apps/twitter/components/TwitterApp';
|
import { TwitterApp } from '../../../apps/twitter/components/TwitterApp';
|
||||||
import { ExampleApp } from '../../../apps/example/components/ExampleApp';
|
import { ExampleApp } from '../../../apps/example/components/ExampleApp';
|
||||||
import { SelloutApp } from '../../../apps/sellout/components/SelloutApp';
|
import { MarketplaceApp } from '../../../apps/marketplace/components/MarketplaceApp';
|
||||||
import { NotesApp } from '../../../apps/notes/NotesApp';
|
import { NotesApp } from '../../../apps/notes/NotesApp';
|
||||||
import CameraApp from '../../../apps/camera/components/CameraApp';
|
import CameraApp from '../../../apps/camera/components/CameraApp';
|
||||||
import { AppRoute } from '../components/AppRoute';
|
import { AppRoute } from '../components/AppRoute';
|
||||||
@@ -41,7 +41,7 @@ import {
|
|||||||
import {
|
import {
|
||||||
SELLOUT_APP_PRIMARY_COLOR,
|
SELLOUT_APP_PRIMARY_COLOR,
|
||||||
SELLOUT_APP_ICON_COLOR,
|
SELLOUT_APP_ICON_COLOR,
|
||||||
} from '../../../apps/sellout/sellout.theme';
|
} from '../../../apps/marketplace/marketplace.theme';
|
||||||
import { NOTES_APP_ICON_COLOR, NOTES_APP_PRIMARY_COLOR } from '../../../apps/notes/notes.theme';
|
import { NOTES_APP_ICON_COLOR, NOTES_APP_PRIMARY_COLOR } from '../../../apps/notes/notes.theme';
|
||||||
import { DIALER_APP_PRIMARY_COLOR, DIALER_APP_TEXT_COLOR } from '../../../apps/dialer/dialer.theme';
|
import { DIALER_APP_PRIMARY_COLOR, DIALER_APP_TEXT_COLOR } from '../../../apps/dialer/dialer.theme';
|
||||||
import {
|
import {
|
||||||
@@ -149,8 +149,8 @@ export const APPS: IAppConfig[] = [
|
|||||||
notificationIcon: <FontAwesomeIcon icon={faAd} fixedWidth size="xs" />,
|
notificationIcon: <FontAwesomeIcon icon={faAd} fixedWidth size="xs" />,
|
||||||
backgroundColor: SELLOUT_APP_PRIMARY_COLOR,
|
backgroundColor: SELLOUT_APP_PRIMARY_COLOR,
|
||||||
color: SELLOUT_APP_ICON_COLOR,
|
color: SELLOUT_APP_ICON_COLOR,
|
||||||
path: '/sellout',
|
path: '/marketplace',
|
||||||
Route: () => <AppRoute id="SELLOUT" path="/sellout" component={SelloutApp} />,
|
Route: () => <AppRoute id="MARKETPLACE" path="/marketplace" component={MarketplaceApp} />,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'NOTES',
|
id: 'NOTES',
|
||||||
|
|||||||
File renamed without changes.
@@ -3,7 +3,7 @@ import ClientUtils from './cl_utils';
|
|||||||
import './cl_main';
|
import './cl_main';
|
||||||
import './cl_twitter';
|
import './cl_twitter';
|
||||||
import './cl_contacts';
|
import './cl_contacts';
|
||||||
import './cl_sellout';
|
import './cl_marketplace';
|
||||||
import './cl_bank';
|
import './cl_bank';
|
||||||
import './cl_notes';
|
import './cl_notes';
|
||||||
import './cl_photo';
|
import './cl_photo';
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import './db';
|
|||||||
import './sv_twitter';
|
import './sv_twitter';
|
||||||
import './sv_main';
|
import './sv_main';
|
||||||
import './sv_contacts';
|
import './sv_contacts';
|
||||||
import './sv_sellout';
|
import './sv_marketplace';
|
||||||
import './sv_bank';
|
import './sv_bank';
|
||||||
import './sv_notes';
|
import './sv_notes';
|
||||||
import './sv_photo';
|
import './sv_photo';
|
||||||
|
|||||||
File renamed without changes.
Reference in new issue
Block a user