mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-05 06:28:51 +00:00
chore(marketplace): clean up references of 'sellout'
This commit is contained in:
1 parent
7cf1e20e8f
commit
bdc79aeff9
9 files changed
+30
-32
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
|
||||
@@ -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
|
||||
@@ -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