mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-03 14:38:45 +00:00
chore(marketplace): clean up references of 'sellout'
This commit is contained in:
1 parent
7cf1e20e8f
commit
bdc79aeff9
9 files changed
+32
-34
No files matched your search
@@ -14,7 +14,7 @@ export const MarketplaceApp = () => {
|
||||
|
||||
return (
|
||||
<MarketplaceThemeProvider>
|
||||
<AppWrapper id="sellout-app">
|
||||
<AppWrapper id="marketplace-app">
|
||||
<AppTitle app={marketplaceApp} />
|
||||
<AppContent>
|
||||
<Switch>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import { common, red } from '@material-ui/core/colors';
|
||||
|
||||
export const SELLOUT_APP_PRIMARY_COLOR = red[500];
|
||||
export const SELLOUT_APP_ICON_COLOR = common.white;
|
||||
export const SELLOUT_APP_TEXT_COLOR = common.black;
|
||||
export const MARKETPLACE_APP_PRIMARY_COLOR = red[500];
|
||||
export const MARKETPLACE_APP_ICON_COLOR = common.white;
|
||||
export const MARKETPLACE_APP_TEXT_COLOR = common.black;
|
||||
|
||||
const theme = {
|
||||
palette: {
|
||||
primary: {
|
||||
main: SELLOUT_APP_PRIMARY_COLOR,
|
||||
main: MARKETPLACE_APP_PRIMARY_COLOR,
|
||||
dark: red[700],
|
||||
light: red[200],
|
||||
contrastText: SELLOUT_APP_TEXT_COLOR,
|
||||
contrastText: MARKETPLACE_APP_TEXT_COLOR,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createAppThemeProvider } from '../../../os/apps/utils/createAppThemeProvider';
|
||||
|
||||
import selloutTheme from '../marketplace.theme';
|
||||
import marketplaceTheme from '../marketplace.theme';
|
||||
|
||||
export const MarketplaceThemeProvider = createAppThemeProvider(selloutTheme);
|
||||
export const MarketplaceThemeProvider = createAppThemeProvider(marketplaceTheme);
|
||||
@@ -22,8 +22,8 @@ import {
|
||||
CONTACTS_APP_TEXT_COLOR,
|
||||
} from '../../../apps/contacts/contacts.theme';
|
||||
import {
|
||||
SELLOUT_APP_PRIMARY_COLOR,
|
||||
SELLOUT_APP_ICON_COLOR,
|
||||
MARKETPLACE_APP_PRIMARY_COLOR,
|
||||
MARKETPLACE_APP_ICON_COLOR,
|
||||
} from '../../../apps/marketplace/marketplace.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';
|
||||
@@ -140,8 +140,8 @@ export const APPS: IAppConfig[] = [
|
||||
{
|
||||
id: 'MARKETPLACE',
|
||||
nameLocale: 'APPS_MARKETPLACE',
|
||||
backgroundColor: SELLOUT_APP_PRIMARY_COLOR,
|
||||
color: SELLOUT_APP_ICON_COLOR,
|
||||
backgroundColor: MARKETPLACE_APP_PRIMARY_COLOR,
|
||||
color: MARKETPLACE_APP_ICON_COLOR,
|
||||
path: '/marketplace',
|
||||
Route: () => (
|
||||
<AppRoute
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';
|
||||
|
||||
const SelloutAppIcon = (props: SvgIconProps) => {
|
||||
const MarketplaceAppIcon = (props: SvgIconProps) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<svg
|
||||
@@ -12,7 +12,7 @@ const SelloutAppIcon = (props: SvgIconProps) => {
|
||||
clipRule="evenodd"
|
||||
viewBox="0 0 176 178"
|
||||
>
|
||||
<metadata id="author">dayiskuan@gmail.com</metadata>
|
||||
<metadata id="author">dayiskuan@gmail.com</metadata>
|
||||
<path fill="none" d="M0 0H176V178H0z"></path>
|
||||
<clipPath id="_clip1">
|
||||
<path d="M0 0H176V178H0z"></path>
|
||||
@@ -43,4 +43,4 @@ const SelloutAppIcon = (props: SvgIconProps) => {
|
||||
);
|
||||
};
|
||||
|
||||
export default SelloutAppIcon;
|
||||
export default MarketplaceAppIcon;
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';
|
||||
|
||||
const SelloutAppIcon = (props: SvgIconProps) => {
|
||||
const MarketplaceAppIcon = (props: SvgIconProps) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<svg
|
||||
@@ -12,7 +12,7 @@ import SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';
|
||||
clipRule="evenodd"
|
||||
viewBox="0 0 132 132"
|
||||
>
|
||||
<metadata id="author">dayiskuan@gmail.com</metadata>
|
||||
<metadata id="author">dayiskuan@gmail.com</metadata>
|
||||
<path fill="none" d="M0 0H131.067V131.086H0z"></path>
|
||||
<g fill={props.htmlColor || '#000'}>
|
||||
<path d="M67.522 3.067c-3.039-1.311-6.655-1.54-10.928-1.63-13.581.261-19.547 7.157-23.025 16.968-2.266 6.393-4.217 13.717-3.856 20.576l.019.333-12.093-.008a3.58 3.58 0 00-3.627 3.232l-9.329 81.467a4.982 4.982 0 004.958 5.462s28.788.448 53.721.623c19.032.135 35.814.09 35.814.09a5.692 5.692 0 005.251-3.493l16.399-.228a5.697 5.697 0 005.523-6.512s-2.079-13.828-4.659-29.477c-3.382-20.508-7.579-44.129-7.579-44.129a4.13 4.13 0 00-3.798-3.528l-5.542-.21c.726-3.636 1.606-9.661 1.147-15.963-.339-4.654-2.039-9.581-4.303-13.733C98.023 6.319 92.289 2.005 81.454.963c-5.572-.255-10.281.208-13.932 2.104zM30.479 46.928l-11.411-.885-4.027 73.383c9.506-.137 29.959-.414 48.321-.543 11-.078 21.248-.096 27.94-.097l-.106-11.302c-.225-1.768-.648-31.178-.915-37.153-.373-8.319.432-17.534.159-22.334l-10.98.687a110.854 110.854 0 01-1.633 6.321 6.758 6.758 0 011.903 4.709 6.783 6.783 0 01-6.78 6.78 6.783 6.783 0 01-6.78-6.78 6.786 6.786 0 014.368-6.338c.264-1.333.57-3.031.854-4.981l-10.875-.39a3.566 3.566 0 01-1.401.517 3.565 3.565 0 01-2.634-.662l-17.775-.637c.121 2.179.302 4.121.48 5.695a6.787 6.787 0 014.383 6.344 6.783 6.783 0 01-6.78 6.78 6.783 6.783 0 01-6.78-6.78c0-1.783.689-3.405 1.816-4.616a108.03 108.03 0 01-1.347-7.718zm67.066 2.874c.419 4.919 1.023 12.305 1.548 19.835.425 6.076.787 12.243.987 17.294.156 4.193.708 9.386 1.356 14.518a459.462 459.462 0 002.021 14.079l10.748-.29a2377.593 2377.593 0 01-3.024-23.247c-2.006-16.087-4.073-34.13-4.886-41.292l-8.75-.897zm-.3-7.484c.389-4.031.784-12.91-2.137-20.393-2.09-5.357-6.308-9.764-14.621-10.085a19.505 19.505 0 00-3.114-.049c1.261 2.127 2.216 4.485 2.909 7.002 1.42 5.152 1.691 10.994 1.255 16.628a80.12 80.12 0 01-.405 3.925l11.107.007a4.895 4.895 0 014.399 2.942l.607.023zM67.767 16.954c-.096.131-.191.265-.283.4-4.481 6.576-5.384 16.143-5.473 21.98l10.267.006c.266-5.801-.081-12.158-1.912-17.499-.622-1.817-1.468-3.479-2.599-4.887zm-9.488-4.584a20.678 20.678 0 00-1.685-.032c-7.976-.153-12.326 4.042-14.713 9.669-2.231 5.259-3.082 11.531-3.275 17.312l15.622.01c-.265-2.89-.438-6.553-.214-10.441.321-5.585 1.561-11.558 4.265-16.518z"></path>
|
||||
@@ -26,6 +26,4 @@ import SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
|
||||
export default SelloutAppIcon;
|
||||
export default MarketplaceAppIcon;
|
||||
@@ -4,14 +4,14 @@ import {
|
||||
MarketplaceListingBase,
|
||||
MarketplaceReportDTO,
|
||||
} from '../../../typings/marketplace';
|
||||
import { selloutLogger } from './marketplace.utils';
|
||||
import { marketplaceLogger } from './marketplace.utils';
|
||||
import MarketplaceService from './marketplace.service';
|
||||
import { onNetPromise } from '../utils/PromiseNetEvents/onNetPromise';
|
||||
import { MarketplaceDeleteDTO } from '../../../typings/marketplace';
|
||||
|
||||
onNetPromise<void, MarketplaceListing[]>(MarketplaceEvents.FETCH_LISTING, async (reqObj, resp) => {
|
||||
MarketplaceService.handleFetchListings(reqObj, resp).catch((e) => {
|
||||
selloutLogger.error(
|
||||
marketplaceLogger.error(
|
||||
`Error occurred in fetch listing event (${reqObj.source}), Error: ${e.message}`,
|
||||
);
|
||||
resp({ status: 'error', errorMsg: 'INTERNAL_ERROR' });
|
||||
@@ -20,7 +20,7 @@ onNetPromise<void, MarketplaceListing[]>(MarketplaceEvents.FETCH_LISTING, async
|
||||
|
||||
onNetPromise<MarketplaceListingBase, void>(MarketplaceEvents.ADD_LISTING, async (reqObj, resp) => {
|
||||
MarketplaceService.handleAddListing(reqObj, resp).catch((e) => {
|
||||
selloutLogger.error(
|
||||
marketplaceLogger.error(
|
||||
`Error occurred in add listing event (${reqObj.source}), Error: ${e.message}`,
|
||||
);
|
||||
resp({ status: 'error', errorMsg: 'INTERNAL_ERROR' });
|
||||
@@ -30,7 +30,7 @@ onNetPromise<MarketplaceListingBase, void>(MarketplaceEvents.ADD_LISTING, async
|
||||
onNetPromise<MarketplaceDeleteDTO>(MarketplaceEvents.DELETE_LISTING, async (reqObj, resp) => {
|
||||
// TODO: Needs a permission check of some sort here eventually
|
||||
MarketplaceService.handleDeleteListing(reqObj, resp).catch((e) => {
|
||||
selloutLogger.error(
|
||||
marketplaceLogger.error(
|
||||
`Error occurred in delete listing event (${reqObj.source}), Error: ${e.message}`,
|
||||
);
|
||||
resp({ status: 'error', errorMsg: 'INTERNAL_ERROR' });
|
||||
@@ -40,7 +40,7 @@ onNetPromise<MarketplaceDeleteDTO>(MarketplaceEvents.DELETE_LISTING, async (reqO
|
||||
onNetPromise<MarketplaceReportDTO>(MarketplaceEvents.REPORT_LISTING, async (reqObj, resp) => {
|
||||
// TODO: Needs a permission check of some sort here eventually
|
||||
MarketplaceService.handleReportListing(reqObj, resp).catch((e) => {
|
||||
selloutLogger.error(
|
||||
marketplaceLogger.error(
|
||||
`Error occurred in report listing event (${reqObj.source}), Error: ${e.message}`,
|
||||
);
|
||||
resp({ status: 'error', errorMsg: 'INTERNAL_ERROR' });
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import PlayerService from '../players/player.service';
|
||||
import { selloutLogger } from './marketplace.utils';
|
||||
import { marketplaceLogger } from './marketplace.utils';
|
||||
import MarketplaceDB, { _MarketplaceDB } from './marketplace.db';
|
||||
import {
|
||||
MarketplaceDeleteDTO,
|
||||
@@ -17,15 +17,15 @@ class _MarketplaceService {
|
||||
|
||||
constructor() {
|
||||
this.marketplaceDB = MarketplaceDB;
|
||||
selloutLogger.debug('Marketplace service started');
|
||||
marketplaceLogger.debug('Marketplace service started');
|
||||
}
|
||||
|
||||
async handleAddListing(
|
||||
reqObj: PromiseRequest<MarketplaceListingBase>,
|
||||
resp: PromiseEventResp<void>,
|
||||
): Promise<void> {
|
||||
selloutLogger.debug('Handling add listing, listing:');
|
||||
selloutLogger.debug(reqObj.data);
|
||||
marketplaceLogger.debug('Handling add listing, listing:');
|
||||
marketplaceLogger.debug(reqObj.data);
|
||||
|
||||
const player = PlayerService.getPlayer(reqObj.source);
|
||||
|
||||
@@ -53,7 +53,7 @@ class _MarketplaceService {
|
||||
// Broadcast to everyone we are adding a listing
|
||||
emitNet(MarketplaceEvents.BROADCAST_ADD, -1, { type: 'ADD', listing: returnObj });
|
||||
} catch (e) {
|
||||
selloutLogger.error(`Failed to add listing ${e.message}`, {
|
||||
marketplaceLogger.error(`Failed to add listing ${e.message}`, {
|
||||
source: reqObj.source,
|
||||
});
|
||||
|
||||
@@ -70,7 +70,7 @@ class _MarketplaceService {
|
||||
|
||||
resp({ data: listings, status: 'ok' });
|
||||
} catch (e) {
|
||||
selloutLogger.error(`Failed to fetch listings, ${e.message}`, {
|
||||
marketplaceLogger.error(`Failed to fetch listings, ${e.message}`, {
|
||||
source: req.source,
|
||||
});
|
||||
resp({ status: 'error', errorMsg: 'DB_ERROR' });
|
||||
@@ -113,14 +113,14 @@ class _MarketplaceService {
|
||||
const reportingPlayer = GetPlayerName(reqObj.source.toString());
|
||||
|
||||
if (reportExists) {
|
||||
selloutLogger.error(`This listing has already been reported`);
|
||||
marketplaceLogger.error(`This listing has already been reported`);
|
||||
resp({ status: 'error', errorMsg: 'REPORT_EXISTS' });
|
||||
}
|
||||
|
||||
await this.marketplaceDB.reportListing(rListing.id, rListing.name);
|
||||
await reportListingToDiscord(rListing, reportingPlayer);
|
||||
} catch (e) {
|
||||
selloutLogger.error(`Failed to report listing ${e.message}`, {
|
||||
marketplaceLogger.error(`Failed to report listing ${e.message}`, {
|
||||
source: reqObj.source,
|
||||
});
|
||||
resp({ status: 'error', errorMsg: 'DB_ERROR' });
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
import { mainLogger } from '../sv_logger';
|
||||
|
||||
export const selloutLogger = mainLogger.child({ module: 'sellout' });
|
||||
export const marketplaceLogger = mainLogger.child({ module: 'sellout' });
|
||||
Reference in new issue
Block a user