diff --git a/.prettierignore b/.prettierignore index 54615f9..3a810c4 100644 --- a/.prettierignore +++ b/.prettierignore @@ -4,4 +4,6 @@ coverage node_modules .idea .github -.vscode \ No newline at end of file +.vscode +resources/html +resources/dist \ No newline at end of file diff --git a/phone/.prettierignore b/phone/.prettierignore deleted file mode 100644 index 48912d2..0000000 --- a/phone/.prettierignore +++ /dev/null @@ -1,2 +0,0 @@ -build -node_modules \ No newline at end of file diff --git a/phone/package.json b/phone/package.json index 7e0a0c3..0ca2763 100644 --- a/phone/package.json +++ b/phone/package.json @@ -65,8 +65,6 @@ "file-loader": "^3.0.1", "html-loader": "^0.5.5", "html-webpack-plugin": "^4.3.0", - "lint-staged": "^10.5.3", - "prettier": "^2.0.5", "react-devtools": "^4.10.1", "react-test-renderer": "^16.13.1", "style-loader": "^0.23.1", @@ -82,22 +80,15 @@ "copy:config": "cp-cli ../config.json ./src/config.autogen.json", "start": "yarn copy:config && react-scripts start", "watch": "cra-build-watch --disable-chunks --build-path ../resources/html --output-filename dev.js", - "format": "prettier --write src/**/*.{js,jsx,ts,tsx,json,css,scss,md}", "build": "yarn copy:config && cross-env NODE_ENV=production webpack --config webpack/prod.config.js --color -p --progress --hide-modules --display-optimization-bailout", "build:dev": "cross-env NODE_ENV=development webpack --config webpack/dev.config.js --color -p --progress --hide-modules --display-optimization-bailout --analyze", "test": "react-scripts test --watchAll=false --testMatch **/src/**/*.test.{ts,js,tsx}", "test:watch": "react-scripts test --watchAll --testMatch **/src/**/*.test.{ts,js,tsx}", - "eject": "react-scripts eject", - "precommit": "npm run test && lint-staged" + "eject": "react-scripts eject" }, "eslintConfig": { "extends": "react-app" }, - "lint-staged": { - "*": [ - "prettier --write src/**/*.{js,jsx,ts,tsx,json,css,scss,md}" - ] - }, "browserslist": { "production": [ ">0.2%", diff --git a/phone/prettier.config.js b/phone/prettier.config.js deleted file mode 100644 index e10e5fe..0000000 --- a/phone/prettier.config.js +++ /dev/null @@ -1,10 +0,0 @@ -// Taso: Including some default values for clarity sake -module.exports = { - trailingComma: 'es5', - tabWidth: 2, - semi: true, - singleQuote: true, - jsxSingleQuote: true, - jsxBracketSameLine: false, - bracketSpacing: true, -}; diff --git a/phone/src/Phone.test.tsx b/phone/src/Phone.test.tsx index d3a4b15..1850143 100644 --- a/phone/src/Phone.test.tsx +++ b/phone/src/Phone.test.tsx @@ -7,6 +7,6 @@ it('renders Phone', () => { shallow( - + , ); }); diff --git a/phone/src/Phone.tsx b/phone/src/Phone.tsx index 1c5c41b..0534715 100644 --- a/phone/src/Phone.tsx +++ b/phone/src/Phone.tsx @@ -52,11 +52,11 @@ function Phone() { const { bottom, visibility } = usePhoneVisibility(); return ( - -
+ +
<> -
+
<> - - {callModal && ( - - )} + + {callModal && } {apps.map((App) => ( ))} diff --git a/phone/src/apps/bank/components/BankApp.css b/phone/src/apps/bank/components/BankApp.css index c980c49..aba5eee 100644 --- a/phone/src/apps/bank/components/BankApp.css +++ b/phone/src/apps/bank/components/BankApp.css @@ -6,8 +6,7 @@ font-family: 'Bahnschrift Regular'; font-style: normal; font-weight: normal; - src: local('Bahnschrift Regular'), - url('../fonts/BAHNSCHRIFT.woff') format('woff'); + src: local('Bahnschrift Regular'), url('../fonts/BAHNSCHRIFT.woff') format('woff'); } #account-section, diff --git a/phone/src/apps/bank/components/BankApp.tsx b/phone/src/apps/bank/components/BankApp.tsx index 626fb19..9eca196 100644 --- a/phone/src/apps/bank/components/BankApp.tsx +++ b/phone/src/apps/bank/components/BankApp.tsx @@ -99,15 +99,15 @@ export const BankApp = () => { const classes = useStyles(); return ( - +
- - - + + + diff --git a/phone/src/apps/bank/components/BankTitle.tsx b/phone/src/apps/bank/components/BankTitle.tsx index 11f2d23..db0bfff 100644 --- a/phone/src/apps/bank/components/BankTitle.tsx +++ b/phone/src/apps/bank/components/BankTitle.tsx @@ -23,8 +23,8 @@ const useStyles = makeStyles((theme) => ({ export const BankTitle = () => { const classes = useStyles(); return ( - - + + WhoDis Banking diff --git a/phone/src/apps/bank/components/account/AccountTransactions.tsx b/phone/src/apps/bank/components/account/AccountTransactions.tsx index 0dd3742..8c4d13c 100644 --- a/phone/src/apps/bank/components/account/AccountTransactions.tsx +++ b/phone/src/apps/bank/components/account/AccountTransactions.tsx @@ -16,7 +16,7 @@ export const AccountTransactions = (): any => { const { transactionList } = useTransactions(); const { t } = useTranslation(); return ( -
+

{t('APPS_BANK_ACCOUNT_TRANSACTIONS')}

diff --git a/phone/src/apps/bank/components/home/BankHome.tsx b/phone/src/apps/bank/components/home/BankHome.tsx index 02c6fb2..26638c3 100644 --- a/phone/src/apps/bank/components/home/BankHome.tsx +++ b/phone/src/apps/bank/components/home/BankHome.tsx @@ -32,13 +32,10 @@ export const BankHome = () => {

{credentials.balance}

- -
diff --git a/phone/src/apps/bank/components/navigation/NavigationBar.tsx b/phone/src/apps/bank/components/navigation/NavigationBar.tsx index c7fea21..971367d 100644 --- a/phone/src/apps/bank/components/navigation/NavigationBar.tsx +++ b/phone/src/apps/bank/components/navigation/NavigationBar.tsx @@ -4,11 +4,7 @@ import { Link } from 'react-router-dom'; import { BottomNavigation, BottomNavigationAction } from '@material-ui/core'; import { makeStyles } from '@material-ui/core/styles'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { - faHome, - faList, - faMoneyCheck, -} from '@fortawesome/free-solid-svg-icons'; +import { faHome, faList, faMoneyCheck } from '@fortawesome/free-solid-svg-icons'; const useStyles = makeStyles((theme) => ({ root: { @@ -37,17 +33,17 @@ export const NavigationBar = () => { } - to='/bank' + to="/bank" /> } - to='/bank/account' + to="/bank/account" /> } - to='/bank/transactions' + to="/bank/transactions" /> ); diff --git a/phone/src/apps/bank/components/transactions/TransactionList.tsx b/phone/src/apps/bank/components/transactions/TransactionList.tsx index fda8676..346eb5b 100644 --- a/phone/src/apps/bank/components/transactions/TransactionList.tsx +++ b/phone/src/apps/bank/components/transactions/TransactionList.tsx @@ -27,7 +27,7 @@ export const TransactionList = () => { }; return ( -
+

{t('APPS_BANK_ACCOUNT_TRANSACTIONS')}

@@ -52,7 +52,7 @@ export const TransactionList = () => { { setTargetID(e.target.value)} /> @@ -73,9 +67,9 @@ export const TransferModal = () => { setAmount(e.target.value)} /> @@ -83,7 +77,7 @@ export const TransferModal = () => { { minimumFractionDigits: 0, maximumFractionDigits: 4, }), - [result] + [result], ); return ( - + { setClipboard(resultStr); addAlert({ message: 'CALCULATOR_COPIED', type: 'info' }); @@ -75,7 +75,7 @@ export const Calculator = ({ ...props }) => { {resultStr} - + diff --git a/phone/src/apps/calculator/components/CalculatorIcon.tsx b/phone/src/apps/calculator/components/CalculatorIcon.tsx index fd8d201..c8a70fe 100644 --- a/phone/src/apps/calculator/components/CalculatorIcon.tsx +++ b/phone/src/apps/calculator/components/CalculatorIcon.tsx @@ -5,37 +5,37 @@ export const CalculatorIcon = ({ ...props }: SvgIconProps) => { return ( - - - - + + + + diff --git a/phone/src/apps/camera/components/CameraApp.tsx b/phone/src/apps/camera/components/CameraApp.tsx index 6c6b175..d39602f 100644 --- a/phone/src/apps/camera/components/CameraApp.tsx +++ b/phone/src/apps/camera/components/CameraApp.tsx @@ -25,11 +25,11 @@ InjectDebugData([ const CameraApp = () => { return ( - + - - + + diff --git a/phone/src/apps/camera/components/grid/GalleryGrid.tsx b/phone/src/apps/camera/components/grid/GalleryGrid.tsx index b18d049..0d6ab05 100644 --- a/phone/src/apps/camera/components/grid/GalleryGrid.tsx +++ b/phone/src/apps/camera/components/grid/GalleryGrid.tsx @@ -14,9 +14,7 @@ export const GalleryGrid = () => { const history = useHistory(); const query = useQueryParams(); - const referal = query.referal - ? decodeURIComponent(query.referal) - : '/camera/image'; + const referal = query.referal ? decodeURIComponent(query.referal) : '/camera/image'; const photos = usePhotos(); @@ -25,17 +23,15 @@ export const GalleryGrid = () => { }; const handlePhotoOpen = (photo) => { - history.push( - addQueryToLocation(getLocationFromUrl(referal), 'image', photo.image) - ); + history.push(addQueryToLocation(getLocationFromUrl(referal), 'image', photo.image)); }; if (!photos) return ( @@ -44,7 +40,7 @@ export const GalleryGrid = () => { style={{ borderRadius: 0 }} className={classes.photo} > - + @@ -53,9 +49,9 @@ export const GalleryGrid = () => { return (
@@ -64,7 +60,7 @@ export const GalleryGrid = () => { style={{ borderRadius: 0 }} className={classes.photo} > - + {photos.map((photo) => ( diff --git a/phone/src/apps/camera/components/modal/GalleryModal.tsx b/phone/src/apps/camera/components/modal/GalleryModal.tsx index 96b0522..661def2 100644 --- a/phone/src/apps/camera/components/modal/GalleryModal.tsx +++ b/phone/src/apps/camera/components/modal/GalleryModal.tsx @@ -20,7 +20,7 @@ export const GalleryModal = () => { const meta: ICameraPhoto = useMemo( () => ({ id: query.id as string, image: query.image as string }), - [query] + [query], ); const _handleClose = () => { @@ -42,11 +42,7 @@ export const GalleryModal = () => { return ( <> - setShareOpen(null)} - /> + setShareOpen(null)} />
diff --git a/phone/src/apps/camera/components/modal/ShareModal.tsx b/phone/src/apps/camera/components/modal/ShareModal.tsx index 63493e2..0b4b722 100644 --- a/phone/src/apps/camera/components/modal/ShareModal.tsx +++ b/phone/src/apps/camera/components/modal/ShareModal.tsx @@ -33,7 +33,7 @@ export const ShareModal = ({ meta, onClose, referal }: IShareModalProps) => {

Or just copy the image here:

- diff --git a/phone/src/apps/contacts/components/ContactsApp.tsx b/phone/src/apps/contacts/components/ContactsApp.tsx index 8350195..e6a0fd2 100644 --- a/phone/src/apps/contacts/components/ContactsApp.tsx +++ b/phone/src/apps/contacts/components/ContactsApp.tsx @@ -15,11 +15,11 @@ export const ContactsApp = () => { return ( - + - - + + diff --git a/phone/src/apps/contacts/components/List/ContactList.tsx b/phone/src/apps/contacts/components/List/ContactList.tsx index 4e279aa..7a5c4d8 100644 --- a/phone/src/apps/contacts/components/List/ContactList.tsx +++ b/phone/src/apps/contacts/components/List/ContactList.tsx @@ -56,8 +56,7 @@ export const ContactList = () => { {contacts .filter( (contact) => - contact.display.match(filteredRegEx) || - contact.number.match(filteredRegEx) + contact.display.match(filteredRegEx) || contact.number.match(filteredRegEx), ) .map((contact) => ( @@ -65,25 +64,17 @@ export const ContactList = () => { {contact.avatar ? ( ) : ( - - {contact.display.slice(0, 1).toUpperCase()} - + {contact.display.slice(0, 1).toUpperCase()} )} - + - diff --git a/phone/src/apps/contacts/components/List/SearchContacts.tsx b/phone/src/apps/contacts/components/List/SearchContacts.tsx index ca72ec4..672fd7f 100644 --- a/phone/src/apps/contacts/components/List/SearchContacts.tsx +++ b/phone/src/apps/contacts/components/List/SearchContacts.tsx @@ -53,7 +53,7 @@ const useStyles = makeStyles((theme: Theme) => alignItems: 'center', justifyContent: 'center', }, - }) + }), ); export const SearchContacts = () => { diff --git a/phone/src/apps/contacts/components/views/ContactInfo.tsx b/phone/src/apps/contacts/components/views/ContactInfo.tsx index 8ed553a..9a4314f 100644 --- a/phone/src/apps/contacts/components/views/ContactInfo.tsx +++ b/phone/src/apps/contacts/components/views/ContactInfo.tsx @@ -1,11 +1,5 @@ import React, { useEffect, useState } from 'react'; -import { - Avatar as MuiAvatar, - Box, - Button, - Paper, - TextField, -} from '@material-ui/core'; +import { Avatar as MuiAvatar, Box, Button, Paper, TextField } from '@material-ui/core'; import { makeStyles, Theme } from '@material-ui/core/styles'; import { useTranslation } from 'react-i18next'; import { useHistory, useParams } from 'react-router-dom'; @@ -123,7 +117,7 @@ const ContactsInfoPage = () => { return (
@@ -161,21 +155,13 @@ const ContactsInfoPage = () => { {/* Display if fetched contact */} {contact && ( <> - - - - @@ -183,12 +169,8 @@ const ContactsInfoPage = () => { )} {/* Display if no fetched contact */} {!contact && ( - - diff --git a/phone/src/apps/contacts/components/views/ContactsPage.tsx b/phone/src/apps/contacts/components/views/ContactsPage.tsx index 75d10a8..d072f30 100644 --- a/phone/src/apps/contacts/components/views/ContactsPage.tsx +++ b/phone/src/apps/contacts/components/views/ContactsPage.tsx @@ -26,7 +26,7 @@ export const ContactPage = () => { <> history.push('/contacts/-1')} className={classes.absolute} > diff --git a/phone/src/apps/contacts/hooks/useContacts.ts b/phone/src/apps/contacts/hooks/useContacts.ts index 55a1ef4..0098474 100644 --- a/phone/src/apps/contacts/hooks/useContacts.ts +++ b/phone/src/apps/contacts/hooks/useContacts.ts @@ -17,7 +17,7 @@ export const useContacts = (): IUseContacts => { const found = contacts.find((contact) => contact.number === number); return found ? found.display : number; }, - [contacts] + [contacts], ); const getContact = useCallback( (id: number): Contact | null => { @@ -25,7 +25,7 @@ export const useContacts = (): IUseContacts => { if (contact.id === id) return contact; } }, - [contacts] + [contacts], ); return { contacts, getDisplayByNumber, getContact }; }; diff --git a/phone/src/apps/contacts/hooks/useFilteredContacts.ts b/phone/src/apps/contacts/hooks/useFilteredContacts.ts index b29b470..96a6df3 100644 --- a/phone/src/apps/contacts/hooks/useFilteredContacts.ts +++ b/phone/src/apps/contacts/hooks/useFilteredContacts.ts @@ -8,7 +8,7 @@ interface FilterdContactsProps { export const useFilteredContacts = (): FilterdContactsProps => { const [filteredContacts, setFilteredContacts] = useRecoilState( - contactsState.filterContacts + contactsState.filterContacts, ); return { filteredContacts, setFilteredContacts }; }; diff --git a/phone/src/apps/dialer/components/DialPadGrid.tsx b/phone/src/apps/dialer/components/DialPadGrid.tsx index 803c952..40787b3 100644 --- a/phone/src/apps/dialer/components/DialPadGrid.tsx +++ b/phone/src/apps/dialer/components/DialPadGrid.tsx @@ -19,12 +19,7 @@ const ButtonItem = ({ label, onClick }: IBtnItem) => { const classes = useStyles(); return ( - @@ -35,8 +30,8 @@ export const DialGrid = () => { const { add, removeOne, clear } = useContext(DialInputCtx); return ( - - + + add(1)} /> add(2)} /> add(3)} /> @@ -46,10 +41,10 @@ export const DialGrid = () => { add(7)} /> add(8)} /> add(9)} /> - + add(0)} /> - - add('-')} /> + + add('-')} /> ); diff --git a/phone/src/apps/dialer/components/DialerApp.tsx b/phone/src/apps/dialer/components/DialerApp.tsx index 4ce7eb0..d2d33b7 100644 --- a/phone/src/apps/dialer/components/DialerApp.tsx +++ b/phone/src/apps/dialer/components/DialerApp.tsx @@ -22,13 +22,13 @@ export const DialerApp = () => { - + - + - + diff --git a/phone/src/apps/dialer/components/DialerInput.tsx b/phone/src/apps/dialer/components/DialerInput.tsx index 7f96bbf..6199977 100644 --- a/phone/src/apps/dialer/components/DialerInput.tsx +++ b/phone/src/apps/dialer/components/DialerInput.tsx @@ -45,18 +45,15 @@ export const DialerInput = () => { return ( - - handleCall(inputVal)} /> + + handleCall(inputVal)} /> - handleNewContact(inputVal)} - /> + handleNewContact(inputVal)} /> ); diff --git a/phone/src/apps/dialer/components/DialerNavBar.tsx b/phone/src/apps/dialer/components/DialerNavBar.tsx index 32bbe78..de1281d 100644 --- a/phone/src/apps/dialer/components/DialerNavBar.tsx +++ b/phone/src/apps/dialer/components/DialerNavBar.tsx @@ -33,27 +33,27 @@ const DialerNavBar = () => { className={classes.root} > } - to='/phone' + to="/phone" /> } - to='/phone/dial' + to="/phone/dial" /> } - to='/phone/contacts' + to="/phone/contacts" /> ); diff --git a/phone/src/apps/dialer/components/views/DialerHistory.tsx b/phone/src/apps/dialer/components/views/DialerHistory.tsx index be95d72..ce41084 100644 --- a/phone/src/apps/dialer/components/views/DialerHistory.tsx +++ b/phone/src/apps/dialer/components/views/DialerHistory.tsx @@ -42,15 +42,10 @@ export const DialerHistory = ({ calls }) => { if (!calls?.length) { return ( - +

You got no friends! - + 😎

@@ -79,7 +74,7 @@ export const DialerHistory = ({ calls }) => { history.push( - `/contacts/-1?addNumber=${call.transmitter}&referal=/phone/contacts` + `/contacts/-1?addNumber=${call.transmitter}&referal=/phone/contacts`, ) } > @@ -105,7 +100,7 @@ export const DialerHistory = ({ calls }) => { history.push( - `/contacts/-1?addNumber=${call.transmitter}&referal=/phone/contacts` + `/contacts/-1?addNumber=${call.transmitter}&referal=/phone/contacts`, ) } > @@ -113,7 +108,7 @@ export const DialerHistory = ({ calls }) => { ) : null} - ) + ), )} ); diff --git a/phone/src/apps/example/components/ExampleApp.tsx b/phone/src/apps/example/components/ExampleApp.tsx index 7d42378..9de4d9d 100644 --- a/phone/src/apps/example/components/ExampleApp.tsx +++ b/phone/src/apps/example/components/ExampleApp.tsx @@ -32,7 +32,7 @@ export const ExampleApp = () => {

This is an example

- + {/* Here we are using the value in a h3 tag */}

{exampleString}

(playing ? stop() : play())}> diff --git a/phone/src/apps/home/components/Home.tsx b/phone/src/apps/home/components/Home.tsx index 32a63e4..da22aa0 100644 --- a/phone/src/apps/home/components/Home.tsx +++ b/phone/src/apps/home/components/Home.tsx @@ -8,7 +8,7 @@ export const HomeApp = () => { const { apps } = useApps(); return ( - + {apps && } diff --git a/phone/src/apps/messages/components/MessagesApp.tsx b/phone/src/apps/messages/components/MessagesApp.tsx index 4d0b1f1..9ca755d 100644 --- a/phone/src/apps/messages/components/MessagesApp.tsx +++ b/phone/src/apps/messages/components/MessagesApp.tsx @@ -22,17 +22,14 @@ export const MessagesApp = () => { return ( - + - + ( <> diff --git a/phone/src/apps/messages/components/form/MessageInput.tsx b/phone/src/apps/messages/components/form/MessageInput.tsx index d1cf794..403a6a8 100644 --- a/phone/src/apps/messages/components/form/MessageInput.tsx +++ b/phone/src/apps/messages/components/form/MessageInput.tsx @@ -34,9 +34,9 @@ const MessageInput = ({ messageGroupId, onAddImageClick }: IProps) => { if (!messageGroupId) return null; return ( - +
- + { - diff --git a/phone/src/apps/messages/components/form/NewMessageGroupButton.tsx b/phone/src/apps/messages/components/form/NewMessageGroupButton.tsx index f60132c..ca18c6b 100644 --- a/phone/src/apps/messages/components/form/NewMessageGroupButton.tsx +++ b/phone/src/apps/messages/components/form/NewMessageGroupButton.tsx @@ -15,13 +15,11 @@ interface INewMessageGroupButtonProps { onClick(): void; } -export function NewMessageGroupButton({ - onClick, -}: INewMessageGroupButtonProps) { +export function NewMessageGroupButton({ onClick }: INewMessageGroupButtonProps) { const classes = useStyles(); return ( - + ); diff --git a/phone/src/apps/messages/components/form/NewMessageGroupForm.tsx b/phone/src/apps/messages/components/form/NewMessageGroupForm.tsx index 29f5842..d2c8735 100644 --- a/phone/src/apps/messages/components/form/NewMessageGroupForm.tsx +++ b/phone/src/apps/messages/components/form/NewMessageGroupForm.tsx @@ -33,7 +33,7 @@ const NewMessageGroupForm = ({ phoneNumber }: { phoneNumber?: string }) => { // external characters out of them: // 123-4567, 987-6543, 333-4444 const phoneNumbers = participants.map(({ number }) => - number.replace(/[^0-9]/g, '') + number.replace(/[^0-9]/g, ''), ); const labelValue = isGroupChat ? label.trim() : null; @@ -46,7 +46,7 @@ const NewMessageGroupForm = ({ phoneNumber }: { phoneNumber?: string }) => { history.push('/messages'); } }, - [history, label, participants, isGroupChat] + [history, label, participants, isGroupChat], ); const onAutocompleteChange = useCallback((_e, value: any) => { @@ -71,7 +71,7 @@ const NewMessageGroupForm = ({ phoneNumber }: { phoneNumber?: string }) => { }} /> ), - [t] + [t], ); const submitDisabled = !participants.length || (isGroupChat && !label); @@ -103,10 +103,10 @@ const NewMessageGroupForm = ({ phoneNumber }: { phoneNumber?: string }) => { diff --git a/phone/src/apps/messages/components/list/MessageGroupItem.tsx b/phone/src/apps/messages/components/list/MessageGroupItem.tsx index 290dd25..22722a2 100644 --- a/phone/src/apps/messages/components/list/MessageGroupItem.tsx +++ b/phone/src/apps/messages/components/list/MessageGroupItem.tsx @@ -24,9 +24,7 @@ const MessageGroupItem = ({ messageGroup, handleClick }: IProps): any => { - - {messageGroup.label || messageGroup.groupDisplay} - + {messageGroup.label || messageGroup.groupDisplay} ); }; diff --git a/phone/src/apps/messages/components/list/MessageSearch.tsx b/phone/src/apps/messages/components/list/MessageSearch.tsx index 53306e9..47a02b3 100644 --- a/phone/src/apps/messages/components/list/MessageSearch.tsx +++ b/phone/src/apps/messages/components/list/MessageSearch.tsx @@ -8,7 +8,7 @@ import useStyles from './list.styles'; interface IProps { value: string; handleChange: ( - event: React.ChangeEvent + event: React.ChangeEvent, ) => void; } @@ -16,7 +16,7 @@ const MessageSearch = ({ value, handleChange }: IProps) => { const { t } = useTranslation(); const classes = useStyles(); return ( - +
diff --git a/phone/src/apps/messages/components/list/MessagesList.tsx b/phone/src/apps/messages/components/list/MessagesList.tsx index e6ca930..43838f5 100644 --- a/phone/src/apps/messages/components/list/MessagesList.tsx +++ b/phone/src/apps/messages/components/list/MessagesList.tsx @@ -24,17 +24,15 @@ const MessagesList = (): any => { const goToConversation = useCallback( (messageGroup) => history.push( - `/messages/conversations/${messageGroup.groupId}/?${qs.stringify( - messageGroup - )}` + `/messages/conversations/${messageGroup.groupId}/?${qs.stringify(messageGroup)}`, ), - [history] + [history], ); useEffect(() => { if (createMessageGroupResult?.groupId) { const findGroup = messageGroups.find( - (g) => g.groupId === createMessageGroupResult.groupId + (g) => g.groupId === createMessageGroupResult.groupId, ); clearMessageGroupResult(); if (findGroup) { @@ -53,9 +51,7 @@ const MessagesList = (): any => { const handleClick = (messageGroup: MessageGroup) => () => { Nui.send('phone:fetchMessages', { groupId: messageGroup.groupId }); history.push( - `/messages/conversations/${messageGroup.groupId}/?${qs.stringify( - messageGroup - )}` + `/messages/conversations/${messageGroup.groupId}/?${qs.stringify(messageGroup)}`, ); }; diff --git a/phone/src/apps/messages/components/modal/Conversation.tsx b/phone/src/apps/messages/components/modal/Conversation.tsx index 4c5e619..d686af8 100644 --- a/phone/src/apps/messages/components/modal/Conversation.tsx +++ b/phone/src/apps/messages/components/modal/Conversation.tsx @@ -31,9 +31,9 @@ const Conversation = ({ activeMessageGroup, messages }: IProps) => { /> diff --git a/phone/src/apps/messages/components/modal/MessageBubble.tsx b/phone/src/apps/messages/components/modal/MessageBubble.tsx index a4ebebd..39b6c3e 100644 --- a/phone/src/apps/messages/components/modal/MessageBubble.tsx +++ b/phone/src/apps/messages/components/modal/MessageBubble.tsx @@ -51,23 +51,20 @@ export const MessageBubble = ({ const classes = useStyles(); return (
- + {isImage(message.message) ? ( multimedia ) : (
{message.message}
)}
- + {isGroupChat && !message.isMine ? message.display || message.phone_number : null} diff --git a/phone/src/apps/messages/components/modal/MessageGroupModal.tsx b/phone/src/apps/messages/components/modal/MessageGroupModal.tsx index 19ed5c2..de5ac1e 100644 --- a/phone/src/apps/messages/components/modal/MessageGroupModal.tsx +++ b/phone/src/apps/messages/components/modal/MessageGroupModal.tsx @@ -14,10 +14,10 @@ const MessageGroupModal = () => { const params = useParams<{ phoneNumber?: string }>(); return ( - + diff --git a/phone/src/apps/messages/components/modal/MessageImageModal.tsx b/phone/src/apps/messages/components/modal/MessageImageModal.tsx index 0de1c0c..6faa00d 100644 --- a/phone/src/apps/messages/components/modal/MessageImageModal.tsx +++ b/phone/src/apps/messages/components/modal/MessageImageModal.tsx @@ -18,12 +18,7 @@ interface IProps { image?: string; } -export const MessageImageModal = ({ - isOpen, - messageGroupId, - onClose, - image, -}: IProps) => { +export const MessageImageModal = ({ isOpen, messageGroupId, onClose, image }: IProps) => { const classes = useStyles(); const history = useHistory(); const { pathname, search } = useLocation(); @@ -45,7 +40,7 @@ export const MessageImageModal = ({ }); onClose(); }, - [messageGroupId, onClose] + [messageGroupId, onClose], ); const sendFromQueryParam = useCallback( @@ -53,7 +48,7 @@ export const MessageImageModal = ({ sendImageMessage(image); removeQueryParamImage(); }, - [removeQueryParamImage, sendImageMessage] + [removeQueryParamImage, sendImageMessage], ); useEffect(() => { @@ -81,20 +76,17 @@ export const MessageImageModal = ({ history.push( `/camera?${qs.stringify({ referal: encodeURIComponent(pathname + search), - })}` + })}`, ), }, ], - [history, pathname, search] + [history, pathname, search], ); return ( <> - + Do you want to share this image? - + {header}
{hasLoaded ? ( - + ) : ( )} diff --git a/phone/src/apps/messages/components/modal/MessageSkeleton.tsx b/phone/src/apps/messages/components/modal/MessageSkeleton.tsx index 4aa18b4..0aa68e7 100644 --- a/phone/src/apps/messages/components/modal/MessageSkeleton.tsx +++ b/phone/src/apps/messages/components/modal/MessageSkeleton.tsx @@ -18,12 +18,7 @@ export default function MessageSkeleton({ height, isMine = false }) { const marginLeft = isMine ? '60px' : '8px'; return (
- +
); } diff --git a/phone/src/apps/messages/hooks/useMessageService.ts b/phone/src/apps/messages/hooks/useMessageService.ts index 59aaac0..be00f42 100644 --- a/phone/src/apps/messages/hooks/useMessageService.ts +++ b/phone/src/apps/messages/hooks/useMessageService.ts @@ -7,21 +7,13 @@ export const useMessagesService = () => { const setMessageGroups = useSetRecoilState(messageState.messageGroups); const setMessages = useSetRecoilState(messageState.messages); const setCreateMessageGroupResult = useSetRecoilState( - messageState.createMessageGroupResult + messageState.createMessageGroupResult, ); const { addAlert } = useSnackbar(); useNuiEvent('MESSAGES', 'phone:fetchMessageGroupsSuccess', setMessageGroups); useNuiEvent('MESSAGES', 'phone:fetchMessagesSuccess', setMessages); - useNuiEvent( - 'MESSAGES', - 'phone:createMessageGroupSuccess', - setCreateMessageGroupResult - ); - useNuiEvent( - 'MESSAGES', - 'phone:createMessageGroupFailed', - setCreateMessageGroupResult - ); + useNuiEvent('MESSAGES', 'phone:createMessageGroupSuccess', setCreateMessageGroupResult); + useNuiEvent('MESSAGES', 'phone:createMessageGroupFailed', setCreateMessageGroupResult); useNuiEvent('MESSAGES', 'phone:setMessagesAlert', addAlert); }; diff --git a/phone/src/apps/messages/hooks/useMessages.ts b/phone/src/apps/messages/hooks/useMessages.ts index 31b3037..43b3cb8 100644 --- a/phone/src/apps/messages/hooks/useMessages.ts +++ b/phone/src/apps/messages/hooks/useMessages.ts @@ -15,18 +15,14 @@ interface IUseMessages { } export default (): IUseMessages => { - const [messages, setMessages] = useRecoilState( - messageState.messages - ); - const messageGroups = useRecoilValue( - messageState.messageGroups - ); + const [messages, setMessages] = useRecoilState(messageState.messages); + const messageGroups = useRecoilValue(messageState.messageGroups); const [ createMessageGroupResult, setCreateMessageGroupResult, ] = useRecoilState( - messageState.createMessageGroupResult + messageState.createMessageGroupResult, ); const clearMessageGroupResult = () => setCreateMessageGroupResult(null); diff --git a/phone/src/apps/notes/NotesApp.tsx b/phone/src/apps/notes/NotesApp.tsx index 9b9d223..33cb48e 100644 --- a/phone/src/apps/notes/NotesApp.tsx +++ b/phone/src/apps/notes/NotesApp.tsx @@ -26,16 +26,12 @@ export const NotesApp = () => { return ( - + - + - - + + diff --git a/phone/src/apps/notes/NotesTitle.tsx b/phone/src/apps/notes/NotesTitle.tsx index d3c2171..9f020a6 100644 --- a/phone/src/apps/notes/NotesTitle.tsx +++ b/phone/src/apps/notes/NotesTitle.tsx @@ -23,8 +23,8 @@ const useStyles = makeStyles((theme) => ({ const NotesTitle = () => { const classes = useStyles(); return ( - - + + ); }; diff --git a/phone/src/apps/notes/list/NoteList.tsx b/phone/src/apps/notes/list/NoteList.tsx index 9b5634f..088cc40 100644 --- a/phone/src/apps/notes/list/NoteList.tsx +++ b/phone/src/apps/notes/list/NoteList.tsx @@ -19,12 +19,7 @@ const NoteList = () => { return ( {notes.map((note) => ( - handleNoteModal(note)} - > + handleNoteModal(note)}> {note.title} ))} diff --git a/phone/src/apps/notes/modal/NoteModal.tsx b/phone/src/apps/notes/modal/NoteModal.tsx index 0f4e910..d80b911 100644 --- a/phone/src/apps/notes/modal/NoteModal.tsx +++ b/phone/src/apps/notes/modal/NoteModal.tsx @@ -52,7 +52,7 @@ export const NoteModal = () => { }; return ( - + {!detail ? ( @@ -61,9 +61,9 @@ export const NoteModal = () => { - + {t('GENERIC_CANCEL')} @@ -124,19 +120,19 @@ export const NoteModal = () => { ) : ( <> - + - + {t('GENERIC_DELETE')} diff --git a/phone/src/apps/sellout/components/SelloutApp.tsx b/phone/src/apps/sellout/components/SelloutApp.tsx index 1394066..d6590b7 100644 --- a/phone/src/apps/sellout/components/SelloutApp.tsx +++ b/phone/src/apps/sellout/components/SelloutApp.tsx @@ -12,12 +12,12 @@ import { SelloutThemeProvider } from '../providers/SelloutThemeProvider'; export const SelloutApp = () => { return ( - + - - + + diff --git a/phone/src/apps/sellout/components/SelloutList/SelloutItem.tsx b/phone/src/apps/sellout/components/SelloutList/SelloutItem.tsx index cb25b00..eedb6a1 100644 --- a/phone/src/apps/sellout/components/SelloutList/SelloutItem.tsx +++ b/phone/src/apps/sellout/components/SelloutList/SelloutItem.tsx @@ -51,7 +51,7 @@ export const SelloutItem = (listing) => {
- + {listing.name} { > {listing.number} - + {listing.title}
{listing.url ? ( - + ) : ( No image provided{' '} - + 🙁 )} - + {listing.description}
diff --git a/phone/src/apps/sellout/components/SelloutTitle.tsx b/phone/src/apps/sellout/components/SelloutTitle.tsx index ff75a25..524f503 100644 --- a/phone/src/apps/sellout/components/SelloutTitle.tsx +++ b/phone/src/apps/sellout/components/SelloutTitle.tsx @@ -23,7 +23,7 @@ const useStyles = makeStyles((theme) => ({ export const SelloutTitle = () => { const classes = useStyles(); return ( - + ); diff --git a/phone/src/apps/sellout/components/form/ListingForm.tsx b/phone/src/apps/sellout/components/form/ListingForm.tsx index 6bb6164..2ee57fb 100644 --- a/phone/src/apps/sellout/components/form/ListingForm.tsx +++ b/phone/src/apps/sellout/components/form/ListingForm.tsx @@ -47,32 +47,32 @@ export const ListingForm = () => { setTitle(e.target.value)} - placeholder='Title on listing..' + placeholder="Title on listing.." inputProps={{ className: classes.textFieldInput }} style={{ width: '80%' }} - size='medium' + size="medium" /> setUrl(e.target.value)} inputProps={{ className: classes.textFieldInput }} style={{ width: '80%' }} - size='medium' - variant='outlined' + size="medium" + variant="outlined" /> setDescription(e.target.value)} - placeholder='Description' + placeholder="Description" inputProps={{ className: classes.multilineFieldInput }} style={{ width: '80%' }} - size='medium' + size="medium" multiline rows={4} - variant='outlined' + variant="outlined" /> {showCloseButton && ( )} {enableEmojis && ( )}
diff --git a/phone/src/apps/twitter/components/buttons/ProfileUpdateButton.tsx b/phone/src/apps/twitter/components/buttons/ProfileUpdateButton.tsx index 7e5a39f..5f90257 100644 --- a/phone/src/apps/twitter/components/buttons/ProfileUpdateButton.tsx +++ b/phone/src/apps/twitter/components/buttons/ProfileUpdateButton.tsx @@ -37,7 +37,7 @@ export function ProfileUpdateButton({ handleClick }) {
diff --git a/phone/src/apps/twitter/components/buttons/ReportButton.tsx b/phone/src/apps/twitter/components/buttons/ReportButton.tsx index 78dadfb..45883f8 100644 --- a/phone/src/apps/twitter/components/buttons/ReportButton.tsx +++ b/phone/src/apps/twitter/components/buttons/ReportButton.tsx @@ -32,7 +32,7 @@ function ReportButton({ handleClose, tweetId, isReported }) { if (loading) { return ( ); } diff --git a/phone/src/apps/twitter/components/buttons/SearchButton.tsx b/phone/src/apps/twitter/components/buttons/SearchButton.tsx index cf9b002..e0de330 100644 --- a/phone/src/apps/twitter/components/buttons/SearchButton.tsx +++ b/phone/src/apps/twitter/components/buttons/SearchButton.tsx @@ -19,7 +19,7 @@ export function ProfileUpdateButton({ handleClick }) { return (
- +
diff --git a/phone/src/apps/twitter/components/buttons/TweetButton.tsx b/phone/src/apps/twitter/components/buttons/TweetButton.tsx index 944d01f..c22ac67 100644 --- a/phone/src/apps/twitter/components/buttons/TweetButton.tsx +++ b/phone/src/apps/twitter/components/buttons/TweetButton.tsx @@ -19,7 +19,7 @@ export function TweetButton({ openModal }) { return (
- +
diff --git a/phone/src/apps/twitter/components/images/Image.tsx b/phone/src/apps/twitter/components/images/Image.tsx index 9292582..9de64a9 100644 --- a/phone/src/apps/twitter/components/images/Image.tsx +++ b/phone/src/apps/twitter/components/images/Image.tsx @@ -41,16 +41,12 @@ export const Image = ({ link, handleClick, small }) => { return (
{handleClick && ( - + )} small avatar diff --git a/phone/src/apps/twitter/components/images/ImagePrompt.tsx b/phone/src/apps/twitter/components/images/ImagePrompt.tsx index 89d0d7b..bcdd2d2 100644 --- a/phone/src/apps/twitter/components/images/ImagePrompt.tsx +++ b/phone/src/apps/twitter/components/images/ImagePrompt.tsx @@ -35,7 +35,7 @@ export const ImagePrompt = ({ visible, value, handleChange }) => { className={classes.textField} onChange={handleImageChange} multiline - size='small' + size="small" placeholder={t('APPS_TWITTER_IMAGE_PLACEHOLDER')} inputRef={textFieldRef} /> diff --git a/phone/src/apps/twitter/components/profile/ProfileField.tsx b/phone/src/apps/twitter/components/profile/ProfileField.tsx index fb00e72..5a2774e 100644 --- a/phone/src/apps/twitter/components/profile/ProfileField.tsx +++ b/phone/src/apps/twitter/components/profile/ProfileField.tsx @@ -12,14 +12,7 @@ const useStyles = makeStyles({ }, }); -function ProfileField({ - label, - value, - handleChange, - allowChange, - multiline, - inputRef, -}) { +function ProfileField({ label, value, handleChange, allowChange, multiline, inputRef }) { const classes = useStyles(); const _handleChange = (e) => handleChange(e.target.value); diff --git a/phone/src/apps/twitter/components/tweet/ShowMore.tsx b/phone/src/apps/twitter/components/tweet/ShowMore.tsx index c918e99..0b776b1 100644 --- a/phone/src/apps/twitter/components/tweet/ShowMore.tsx +++ b/phone/src/apps/twitter/components/tweet/ShowMore.tsx @@ -58,20 +58,15 @@ export const ShowMore = ({ id, isReported, isMine }) => { // if the user cannot perform any actions in show more then don't // allow them to interact with it - let _handleClick = - allowedToDelete || allowedToReport ? handleClick : () => null; + let _handleClick = allowedToDelete || allowedToReport ? handleClick : () => null; return ( <> - { }} > {allowedToDelete && ( - - {t('APPS_TWITTER_DELETE')} - + {t('APPS_TWITTER_DELETE')} )} {allowedToReport && ( - + )} diff --git a/phone/src/apps/twitter/components/tweet/Tweet.tsx b/phone/src/apps/twitter/components/tweet/Tweet.tsx index cf1255d..d465f50 100644 --- a/phone/src/apps/twitter/components/tweet/Tweet.tsx +++ b/phone/src/apps/twitter/components/tweet/Tweet.tsx @@ -98,7 +98,7 @@ export const Tweet = (tweet) => { {enableAvatars && ( - + )} @@ -107,9 +107,9 @@ export const Tweet = (tweet) => {
{profileName}
{secondsToHumanReadable(t, seconds_since_tweet)} diff --git a/phone/src/apps/twitter/components/tweet/TweetMessage.tsx b/phone/src/apps/twitter/components/tweet/TweetMessage.tsx index efcf0e4..43e68c4 100644 --- a/phone/src/apps/twitter/components/tweet/TweetMessage.tsx +++ b/phone/src/apps/twitter/components/tweet/TweetMessage.tsx @@ -43,7 +43,7 @@ export const TweetMessage = ({ modalVisible, message, handleChange }) => { textFieldRef.current.scrollTop = textFieldRef.current.scrollHeight; handleChange(e.target.value); }, - [handleChange] + [handleChange], ); if (!config) return null; @@ -52,12 +52,12 @@ export const TweetMessage = ({ modalVisible, message, handleChange }) => { const overCharacterLimit = message.trim().length > characterLimit; const characterWarningPrompt = `${t( - 'APPS_TWITTER_TWEET_MESSAGE_CHAR_LIMIT' + 'APPS_TWITTER_TWEET_MESSAGE_CHAR_LIMIT', )} (${characterLimit})`; const overNewLineLimit = getNewLineCount(message) > newLineLimit; const newLineWarningPrompt = `${t( - 'APPS_TWITTER_TWEET_MESSAGE_NEW_LINE_LIMIT' + 'APPS_TWITTER_TWEET_MESSAGE_NEW_LINE_LIMIT', )} (${newLineLimit})`; if (overCharacterLimit) { diff --git a/phone/src/apps/twitter/components/tweet/TweetSkeleton.tsx b/phone/src/apps/twitter/components/tweet/TweetSkeleton.tsx index 11d0771..13bac15 100644 --- a/phone/src/apps/twitter/components/tweet/TweetSkeleton.tsx +++ b/phone/src/apps/twitter/components/tweet/TweetSkeleton.tsx @@ -25,11 +25,11 @@ export default function TweetSkeleton() { <>
- +
- - + +
diff --git a/phone/src/apps/twitter/hooks/useModal.ts b/phone/src/apps/twitter/hooks/useModal.ts index 2ecb71d..d16c040 100644 --- a/phone/src/apps/twitter/hooks/useModal.ts +++ b/phone/src/apps/twitter/hooks/useModal.ts @@ -3,7 +3,7 @@ import { twitterState } from './state'; export const useModal = () => { const [modalVisible, setModalVisible] = useRecoilState( - twitterState.showCreateTweetModal + twitterState.showCreateTweetModal, ); const [message, setMessage] = useRecoilState(twitterState.modalMessage); return { modalVisible, setModalVisible, message, setMessage }; diff --git a/phone/src/apps/twitter/hooks/useProfile.ts b/phone/src/apps/twitter/hooks/useProfile.ts index 36ee3ea..b5c6c86 100644 --- a/phone/src/apps/twitter/hooks/useProfile.ts +++ b/phone/src/apps/twitter/hooks/useProfile.ts @@ -18,11 +18,9 @@ interface IUseProfile { export const useProfile = (): IUseProfile => { const profile = useRecoilValue(twitterState.profile); - const updateProfileLoading = useRecoilValue( - twitterState.updateProfileLoading - ); + const updateProfileLoading = useRecoilValue(twitterState.updateProfileLoading); const [updateProfileSuccessful, setUpdateProfileSuccessful] = useRecoilState( - twitterState.updateProfileSuccess + twitterState.updateProfileSuccess, ); return { profile, diff --git a/phone/src/apps/twitter/hooks/useTweetStatus.ts b/phone/src/apps/twitter/hooks/useTweetStatus.ts index 22311bc..0dacfa3 100644 --- a/phone/src/apps/twitter/hooks/useTweetStatus.ts +++ b/phone/src/apps/twitter/hooks/useTweetStatus.ts @@ -5,7 +5,7 @@ import { twitterState } from './state'; export const useTweetStatus = () => { const createTweetLoading = useRecoilValue(twitterState.createTweetLoading); const [createTweetSuccessful, setCreateTweetSuccessful] = useRecoilState( - twitterState.createTweetSuccessful + twitterState.createTweetSuccessful, ); return { createTweetLoading, diff --git a/phone/src/apps/twitter/hooks/useTwitterNotifications.ts b/phone/src/apps/twitter/hooks/useTwitterNotifications.ts index 977b350..7e2bd4e 100644 --- a/phone/src/apps/twitter/hooks/useTwitterNotifications.ts +++ b/phone/src/apps/twitter/hooks/useTwitterNotifications.ts @@ -14,9 +14,7 @@ export const useTwitterNotifications = () => { const { icon, notificationIcon } = useApp('TWITTER'); - const [unreadCount, setUnreadCount] = useRecoilState( - twitterState.unreadTweetsCount - ); + const [unreadCount, setUnreadCount] = useRecoilState(twitterState.unreadTweetsCount); const setNotification = useCallback( ({ profile_name, message }) => { @@ -38,12 +36,12 @@ export const useTwitterNotifications = () => { count: unread, }), content: null, - } + }, ); return unread; }); }, - [setUnreadCount, addNotificationAlert, t, icon, notificationIcon, history] + [setUnreadCount, addNotificationAlert, t, icon, notificationIcon, history], ); return { setNotification, setUnreadCount, unreadCount }; diff --git a/phone/src/apps/twitter/hooks/useTwitterService.ts b/phone/src/apps/twitter/hooks/useTwitterService.ts index b5a2f26..498c7a9 100644 --- a/phone/src/apps/twitter/hooks/useTwitterService.ts +++ b/phone/src/apps/twitter/hooks/useTwitterService.ts @@ -34,9 +34,7 @@ export const useTwitterService = () => { const { setNotification } = useTwitterNotifications(); const setProfile = useSetRecoilState(twitterState.profile); - const setUpdateProfileLoading = useSetRecoilState( - twitterState.updateProfileLoading - ); + const setUpdateProfileLoading = useSetRecoilState(twitterState.updateProfileLoading); const setTweets = useSetRecoilState(twitterState.tweets); const setFilteredTweets = useSetRecoilState(twitterState.filteredTweets); diff --git a/phone/src/apps/twitter/utils/time.ts b/phone/src/apps/twitter/utils/time.ts index 2cbf06a..58253df 100644 --- a/phone/src/apps/twitter/utils/time.ts +++ b/phone/src/apps/twitter/utils/time.ts @@ -14,7 +14,7 @@ const DAYS = 'APPS_TWITTER_TIME_DAYS'; */ export function secondsToHumanReadable( t: (input: string) => string, - seconds: number + seconds: number, ): string { if (seconds < 60) { return t(JUST_NOW); diff --git a/phone/src/common/hooks/useQueryParams.ts b/phone/src/common/hooks/useQueryParams.ts index 105984e..c8c8e6e 100644 --- a/phone/src/common/hooks/useQueryParams.ts +++ b/phone/src/common/hooks/useQueryParams.ts @@ -10,9 +10,7 @@ import { useLocation } from 'react-router-dom'; * * const { id, title } = useQueryParams<{ id: string, title: string }>(); */ -export function useQueryParams>( - defaultValues: T = null -) { +export function useQueryParams>(defaultValues: T = null) { const query = qs.parse(useLocation().search, { ignoreQueryPrefix: true }); if (!defaultValues) { return query as T & Partial; diff --git a/phone/src/common/utils/addQueryToLocation.ts b/phone/src/common/utils/addQueryToLocation.ts index 3fdb312..cf7c907 100644 --- a/phone/src/common/utils/addQueryToLocation.ts +++ b/phone/src/common/utils/addQueryToLocation.ts @@ -9,7 +9,7 @@ interface IRouterLocation { export const addQueryToLocation = ( { pathname = '', search = '' }: Record & IRouterLocation, key = '', - value = '' + value = '', ) => { const { query } = url(pathname + search); return `${pathname}?${qs.stringify({ diff --git a/phone/src/common/utils/deleteQueryFromLocation.ts b/phone/src/common/utils/deleteQueryFromLocation.ts index bc27156..c88662d 100644 --- a/phone/src/common/utils/deleteQueryFromLocation.ts +++ b/phone/src/common/utils/deleteQueryFromLocation.ts @@ -8,7 +8,7 @@ interface IRouterLocation { export const deleteQueryFromLocation = ( location: Record & IRouterLocation, - key = '' + key = '', ) => { const { query } = url(location.pathname + location.search); return `${location.pathname}/?${qs.stringify({ diff --git a/phone/src/config/default.json b/phone/src/config/default.json index 7dd1144..46f4a48 100644 --- a/phone/src/config/default.json +++ b/phone/src/config/default.json @@ -1,13 +1,7 @@ { "cellProvider": "AT&T", "language": "en", - "wallpapers": [ - "beach.jpg", - "minimal.jpg", - "surf.jpg", - "waves.jpg", - "projecterror.jpg" - ], + "wallpapers": ["beach.jpg", "minimal.jpg", "surf.jpg", "waves.jpg", "projecterror.jpg"], "defaultSettings": { "wallpaper": "projecterror.jpg", "frame": "default.png", diff --git a/phone/src/index.tsx b/phone/src/index.tsx index bd22b27..aa60ebf 100644 --- a/phone/src/index.tsx +++ b/phone/src/index.tsx @@ -12,8 +12,7 @@ import { PhoneContainer } from './PhoneContainer'; // Enable Sentry when config setting is true if (PhoneConfig.SentryErrorMetrics) { Sentry.init({ - dsn: - 'https://71fff4e8f11543fa8dbe7acd0f94fb5d@o478949.ingest.sentry.io/5581619', + dsn: 'https://71fff4e8f11543fa8dbe7acd0f94fb5d@o478949.ingest.sentry.io/5581619', autoSessionTracking: true, integrations: [new Integrations.BrowserTracing()], // We recommend adjusting this value in production, or using tracesSampler @@ -28,5 +27,5 @@ ReactDOM.render( , - document.getElementById('root') + document.getElementById('root'), ); diff --git a/phone/src/main.css b/phone/src/main.css index fe2f050..3048d73 100644 --- a/phone/src/main.css +++ b/phone/src/main.css @@ -1,7 +1,6 @@ body { - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', - 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', - sans-serif; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', + 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-size: 20px; @@ -13,8 +12,7 @@ body { } code { - font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', - monospace; + font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace; } a, diff --git a/phone/src/os/apps/config/apps.tsx b/phone/src/os/apps/config/apps.tsx index 853bf5f..feb781a 100644 --- a/phone/src/os/apps/config/apps.tsx +++ b/phone/src/os/apps/config/apps.tsx @@ -65,115 +65,103 @@ export const APPS: IAppConfig[] = [ id: 'DIALER', nameLocale: 'APPS_DIALER', icon: , - notificationIcon: , + notificationIcon: , backgroundColor: DIALER_APP_PRIMARY_COLOR, color: DIALER_APP_TEXT_COLOR, path: '/phone', - Route: () => , + Route: () => , }, { id: 'MESSAGES', nameLocale: 'APPS_MESSAGES', - icon: , - notificationIcon: , + icon: , + notificationIcon: , backgroundColor: MESSAGES_APP_PRIMARY_COLOR, color: MESSAGES_APP_TEXT_COLOR, path: '/messages', - Route: () => ( - - ), + Route: () => , }, { id: 'CONTACTS', nameLocale: 'APPS_CONTACTS', - icon: , - notificationIcon: , + icon: , + notificationIcon: , backgroundColor: CONTACTS_APP_PRIMARY_COLOR, color: CONTACTS_APP_TEXT_COLOR, path: '/contacts', - Route: () => ( - - ), + Route: () => , }, { id: 'CALCULATOR', nameLocale: 'APPS_CALCULATOR', - icon: , - notificationIcon: , + icon: , + notificationIcon: , backgroundColor: purple[500], color: grey[50], path: '/calculator', Route: () => ( - + ), }, { id: 'SETTINGS', nameLocale: 'APPS_SETTINGS', - icon: , - notificationIcon: , + icon: , + notificationIcon: , backgroundColor: '#383838', color: grey[50], path: '/settings', - Route: () => ( - - ), + Route: () => , }, { id: 'BANK', nameLocale: 'APPS_BANK', icon: , - notificationIcon: , + notificationIcon: , backgroundColor: blue[900], color: common.white, path: '/bank', - Route: () => , + Route: () => , }, { id: 'TWITTER', nameLocale: 'APPS_TWITTER', icon: , - notificationIcon: , + notificationIcon: , backgroundColor: blue[600], color: common.white, path: '/twitter', - Route: () => ( - - ), + Route: () => , }, { id: 'SELLOUT', nameLocale: 'APPS_SELLOUT', icon: , - notificationIcon: , + notificationIcon: , backgroundColor: SELLOUT_APP_PRIMARY_COLOR, color: SELLOUT_APP_ICON_COLOR, path: '/sellout', - Route: () => ( - - ), + Route: () => , }, { id: 'NOTES', nameLocale: 'APPS_NOTES', icon: , - notificationIcon: ( - - ), + notificationIcon: , backgroundColor: NOTES_APP_PRIMARY_COLOR, color: NOTES_APP_ICON_COLOR, path: '/notes', - Route: () => , + Route: () => , }, { id: 'CAMERA', nameLocale: 'APPS_CAMERA', - icon: , - notificationIcon: , + icon: , + notificationIcon: , backgroundColor: grey['A400'], color: common.white, path: '/camera', - Route: () => , + Route: () => , }, ]; @@ -182,13 +170,11 @@ if (process.env.NODE_ENV === 'development') { APPS.push({ id: 'EXAMPLE', nameLocale: 'APPS_EXAMPLE', - icon: , - notificationIcon: , + icon: , + notificationIcon: , backgroundColor: blue[500], color: blue[50], path: '/example', - Route: () => ( - - ), + Route: () => , }); } diff --git a/phone/src/os/apps/hooks/useApps.tsx b/phone/src/os/apps/hooks/useApps.tsx index 04033ba..687bf87 100644 --- a/phone/src/os/apps/hooks/useApps.tsx +++ b/phone/src/os/apps/hooks/useApps.tsx @@ -10,11 +10,11 @@ export const useApps = () => { ...a, notification: icons.find((i) => i.key === a.id), })), - [icons] + [icons], ); const getApp = useCallback( (id: string): IAppConfig => apps.find((a) => a.id === id) || null, - [apps] + [apps], ); return { apps, getApp }; }; diff --git a/phone/src/os/call/components/CallControls.tsx b/phone/src/os/call/components/CallControls.tsx index b766229..16468ae 100644 --- a/phone/src/os/call/components/CallControls.tsx +++ b/phone/src/os/call/components/CallControls.tsx @@ -50,24 +50,20 @@ export const CallControls = ({ size }: { size?: 'small' | 'medium' }) => { if (accepted || isTransmitter) { return ( - + ); } return ( <> - - + + - - + + diff --git a/phone/src/os/call/components/CallModal.tsx b/phone/src/os/call/components/CallModal.tsx index e48c4c5..4a3e390 100644 --- a/phone/src/os/call/components/CallModal.tsx +++ b/phone/src/os/call/components/CallModal.tsx @@ -19,7 +19,7 @@ export const CallModal = () => {
- +
diff --git a/phone/src/os/call/components/CallNotification.tsx b/phone/src/os/call/components/CallNotification.tsx index e5bca99..eac42c6 100644 --- a/phone/src/os/call/components/CallNotification.tsx +++ b/phone/src/os/call/components/CallNotification.tsx @@ -18,17 +18,13 @@ const useStyles = makeStyles((theme) => ({ }, })); -export const CallNotification = ({ - children, -}: { - children: React.ReactNode; -}) => { +export const CallNotification = ({ children }: { children: React.ReactNode }) => { const classes = useStyles(); return (
{children} - +
); diff --git a/phone/src/os/call/hooks/useCallNotifications.tsx b/phone/src/os/call/hooks/useCallNotifications.tsx index 0316fb3..df8eb94 100644 --- a/phone/src/os/call/hooks/useCallNotifications.tsx +++ b/phone/src/os/call/hooks/useCallNotifications.tsx @@ -12,11 +12,7 @@ const NOTIFICATION_ID = 'call:current'; export const useCallNotifications = () => { const { t } = useTranslation(); const history = useHistory(); - const { - addNotificationAlert, - removeId, - addNotification, - } = useNotifications(); + const { addNotificationAlert, removeId, addNotification } = useNotifications(); const { play, stop } = useRingtoneSound(); @@ -69,7 +65,7 @@ export const useCallNotifications = () => { ), }, - true + true, ); } }; diff --git a/phone/src/os/call/hooks/useDuration.ts b/phone/src/os/call/hooks/useDuration.ts index 52220e5..f6a556d 100644 --- a/phone/src/os/call/hooks/useDuration.ts +++ b/phone/src/os/call/hooks/useDuration.ts @@ -5,10 +5,9 @@ import { callerState } from './state'; export const useDuration = () => { const [duration, setDuration] = useRecoilState(callerState.callDuration); - const resetDuration = useCallback( - () => setDuration({ ms: 0, s: 0, m: 0, h: 0 }), - [setDuration] - ); + const resetDuration = useCallback(() => setDuration({ ms: 0, s: 0, m: 0, h: 0 }), [ + setDuration, + ]); return { duration, setDuration, resetDuration }; }; diff --git a/phone/src/os/debug/InjectDebugData.ts b/phone/src/os/debug/InjectDebugData.ts index ad63348..03d0d8a 100644 --- a/phone/src/os/debug/InjectDebugData.ts +++ b/phone/src/os/debug/InjectDebugData.ts @@ -38,7 +38,7 @@ const InjectDebugData =

(events: DebugEvent

[], timer = 1000) => { method: event.method, data: event.data, }, - }) + }), ); }, timer); } diff --git a/phone/src/os/keyboard/hooks/useKeyboardService.ts b/phone/src/os/keyboard/hooks/useKeyboardService.ts index db45bf9..7834a15 100644 --- a/phone/src/os/keyboard/hooks/useKeyboardService.ts +++ b/phone/src/os/keyboard/hooks/useKeyboardService.ts @@ -69,7 +69,7 @@ export const useKeyboardService = () => { handlers.current.set(g, getters[g]); }); }, - [getters] + [getters], ); useEffect( @@ -85,7 +85,7 @@ export const useKeyboardService = () => { window.addEventListener('keyup', onKeyUp); return () => window.removeEventListener('keyup', onKeyUp); }, - [getters] + [getters], ); const backspaceHandler = useCallback( @@ -96,7 +96,7 @@ export const useKeyboardService = () => { } history.goBack(); }, - [history] + [history], ); useEffect( @@ -104,6 +104,6 @@ export const useKeyboardService = () => { handlers.current.set('Escape', () => closePhone()); handlers.current.set('Backspace', backspaceHandler); }, - [setEscape, setBackspace, history, backspaceHandler, closePhone] + [setEscape, setBackspace, history, backspaceHandler, closePhone], ); }; diff --git a/phone/src/os/navigation-bar/components/Navigation.tsx b/phone/src/os/navigation-bar/components/Navigation.tsx index 6e9918a..6b6a800 100644 --- a/phone/src/os/navigation-bar/components/Navigation.tsx +++ b/phone/src/os/navigation-bar/components/Navigation.tsx @@ -1,9 +1,5 @@ import React from 'react'; -import { - makeStyles, - BottomNavigation, - BottomNavigationAction, -} from '@material-ui/core'; +import { makeStyles, BottomNavigation, BottomNavigationAction } from '@material-ui/core'; import KeyboardArrowLeftIcon from '@material-ui/icons/KeyboardArrowLeft'; import AppsIcon from '@material-ui/icons/Apps'; import RadioButtonUncheckedIcon from '@material-ui/icons/RadioButtonUnchecked'; @@ -33,17 +29,17 @@ export const Navigation = () => { }} > history.push('/')} icon={} /> } /> !isExact && history.goBack()} icon={} /> diff --git a/phone/src/os/notifications/components/NotificationAlert.tsx b/phone/src/os/notifications/components/NotificationAlert.tsx index c5e8f5b..f785fca 100644 --- a/phone/src/os/notifications/components/NotificationAlert.tsx +++ b/phone/src/os/notifications/components/NotificationAlert.tsx @@ -51,14 +51,14 @@ export const NotificationAlert = () => { { e.stopPropagation(); currentAlert?.onCloseAlert(e); }} > - + } onClick={(e) => currentAlert?.onClickAlert(e)} @@ -67,13 +67,13 @@ export const NotificationAlert = () => { elevation={6} > - - + + {currentAlert?.title} - + {currentAlert?.content} diff --git a/phone/src/os/notifications/components/NotificationBar.tsx b/phone/src/os/notifications/components/NotificationBar.tsx index ec15c8d..53c0483 100644 --- a/phone/src/os/notifications/components/NotificationBar.tsx +++ b/phone/src/os/notifications/components/NotificationBar.tsx @@ -79,13 +79,13 @@ export const NotificationBar = () => { { setBarUncollapsed((curr) => !curr); }} > - + {icons.map((notifIcon) => ( { ))} - + - + - + {Default.cellProvider} - + - + @@ -146,10 +138,10 @@ export const NotificationBar = () => { ))} - + setBarUncollapsed(false)} > diff --git a/phone/src/os/notifications/components/NotificationIcon.tsx b/phone/src/os/notifications/components/NotificationIcon.tsx index 8c09560..831eb71 100644 --- a/phone/src/os/notifications/components/NotificationIcon.tsx +++ b/phone/src/os/notifications/components/NotificationIcon.tsx @@ -9,7 +9,7 @@ interface INotificationIcon { export const NotificationIcon = ({ icon, to }: INotificationIcon) => { return ( - + {icon} ); diff --git a/phone/src/os/notifications/components/NotificationItem.tsx b/phone/src/os/notifications/components/NotificationItem.tsx index 602c50e..5d5a28c 100644 --- a/phone/src/os/notifications/components/NotificationItem.tsx +++ b/phone/src/os/notifications/components/NotificationItem.tsx @@ -47,12 +47,8 @@ export const NotificationItem = ({ {icon && {icon}} {title} {!cantClose && ( - - + + )} diff --git a/phone/src/os/notifications/hooks/useNotifications.tsx b/phone/src/os/notifications/hooks/useNotifications.tsx index 89bf34e..4d7ee5f 100644 --- a/phone/src/os/notifications/hooks/useNotifications.tsx +++ b/phone/src/os/notifications/hooks/useNotifications.tsx @@ -4,9 +4,7 @@ import { NotificationsContext } from '../providers/NotificationsProvider'; export const useNotifications = () => { const context = useContext(NotificationsContext); if (!context) { - throw new Error( - 'useNotifications must be wrapped by NotificationsProvider' - ); + throw new Error('useNotifications must be wrapped by NotificationsProvider'); } return context; }; diff --git a/phone/src/os/notifications/hooks/useQuickAccess.tsx b/phone/src/os/notifications/hooks/useQuickAccess.tsx index e1e9c46..7ec327d 100644 --- a/phone/src/os/notifications/hooks/useQuickAccess.tsx +++ b/phone/src/os/notifications/hooks/useQuickAccess.tsx @@ -26,7 +26,7 @@ export const useQuickAccess = () => { const history = useHistory(); const { apps, getApp } = useApps(); const [recentlyUsed, setRecentlyUsed] = useRecoilState( - state.recentlyUsed + state.recentlyUsed, ); useEffect(() => { @@ -43,7 +43,7 @@ export const useQuickAccess = () => { }); setRecentlyUsed(newState.slice(0, MAX_QUICK_ACCESS_ITEMS)); }, - [apps, recentlyUsed, setRecentlyUsed] + [apps, recentlyUsed, setRecentlyUsed], ); history.listen(listener); diff --git a/phone/src/os/notifications/providers/NotificationsProvider.tsx b/phone/src/os/notifications/providers/NotificationsProvider.tsx index 90f6158..845ef37 100644 --- a/phone/src/os/notifications/providers/NotificationsProvider.tsx +++ b/phone/src/os/notifications/providers/NotificationsProvider.tsx @@ -56,7 +56,7 @@ export const NotificationsContext = createContext<{ addNotificationAlert( n: INotification, persist: boolean, - update?: Partial + update?: Partial, ); }>(null); @@ -83,16 +83,13 @@ export function NotificationsProvider({ children }) { } }, [isPhoneOpen, currentAlert]); - const updateNotification = useCallback( - (idx: number, value: INotification) => { - setNotifications((all) => { - const updated = [...all]; - updated.splice(idx, 1, value); - return updated; - }); - }, - [] - ); + const updateNotification = useCallback((idx: number, value: INotification) => { + setNotifications((all) => { + const updated = [...all]; + updated.splice(idx, 1, value); + return updated; + }); + }, []); const removeNotification = (idx) => { setNotifications((all) => { @@ -114,7 +111,7 @@ export function NotificationsProvider({ children }) { (appId: string): number => { return notifications.findIndex((n) => n.app === appId); }, - [notifications] + [notifications], ); const addOrUpdateNotification = useCallback( @@ -126,7 +123,7 @@ export function NotificationsProvider({ children }) { } addNotification(add); }, - [addNotification, hasNotification, updateNotification] + [addNotification, hasNotification, updateNotification], ); const _showAlert = useCallback( @@ -134,7 +131,7 @@ export function NotificationsProvider({ children }) { n: INotification, persist: boolean, update: Partial, - soundUrl: string + soundUrl: string, ) => { return new Promise((res) => { const resolve = () => { @@ -172,22 +169,18 @@ export function NotificationsProvider({ children }) { }, DEFAULT_ALERT_HIDE_TIME + 300); }); }, - [addOrUpdateNotification, play] + [addOrUpdateNotification, play], ); const addNotificationAlert = ( n: INotification, persist?: boolean, - update?: Partial + update?: Partial, ) => { if (n.sound) { - const { sound, volume } = getSoundSettings( - 'notification', - settings, - n.app - ); + const { sound, volume } = getSoundSettings('notification', settings, n.app); mount(sound, volume, false).then(({ url }) => - setAlerts((curr) => [...curr, [n, persist, update, url]]) + setAlerts((curr) => [...curr, [n, persist, update, url]]), ); return; } @@ -233,7 +226,7 @@ export function NotificationsProvider({ children }) { icons.unshift({ key: curr.app, icon: curr.notificationIcon, badge: 1 }); return icons; }, []), - [notifications] + [notifications], ); const removeAlerts = () => { diff --git a/phone/src/os/nui-events/hooks/useNuiEvent.ts b/phone/src/os/nui-events/hooks/useNuiEvent.ts index f1970da..93c9faf 100644 --- a/phone/src/os/nui-events/hooks/useNuiEvent.ts +++ b/phone/src/os/nui-events/hooks/useNuiEvent.ts @@ -23,7 +23,7 @@ export const useNuiEvent = >( method: string, handler: Function, currentState?: S, - options: IOptions = defaultOptions + options: IOptions = defaultOptions, ) => { const savedHandler: MutableRefObject = useRef(); diff --git a/phone/src/os/nui-events/hooks/useNuiService.ts b/phone/src/os/nui-events/hooks/useNuiService.ts index fd1c083..950a015 100644 --- a/phone/src/os/nui-events/hooks/useNuiService.ts +++ b/phone/src/os/nui-events/hooks/useNuiService.ts @@ -15,7 +15,7 @@ export const useNuiService = (options: IOptions = {}) => { window.dispatchEvent( new MessageEvent(eventNameFactory(app, method), { data, - }) + }), ); } }; diff --git a/phone/src/os/phone/hooks/usePhoneTheme.ts b/phone/src/os/phone/hooks/usePhoneTheme.ts index 4b21afa..5a37202 100644 --- a/phone/src/os/phone/hooks/usePhoneTheme.ts +++ b/phone/src/os/phone/hooks/usePhoneTheme.ts @@ -6,7 +6,5 @@ import * as config from '../../../config/default.json'; export const usePhoneTheme = () => { const [settings] = useSettings(); - return useMemo(() => createMuiTheme(config.themes[settings.theme]), [ - settings.theme, - ]); + return useMemo(() => createMuiTheme(config.themes[settings.theme]), [settings.theme]); }; diff --git a/phone/src/os/sound/hooks/useRingtoneSound.ts b/phone/src/os/sound/hooks/useRingtoneSound.ts index 396cfe2..2524a01 100644 --- a/phone/src/os/sound/hooks/useRingtoneSound.ts +++ b/phone/src/os/sound/hooks/useRingtoneSound.ts @@ -12,9 +12,7 @@ export const useRingtoneSound = () => { throw new Error('useRingtoneSound must be wrapped in SoundProvider'); } - const options = useMemo(() => getSoundSettings('ringtone', settings), [ - settings, - ]); + const options = useMemo(() => getSoundSettings('ringtone', settings), [settings]); useEffect(() => { if (!sound.isMounted(options.sound)) { diff --git a/phone/src/os/sound/providers/SoundProvider.tsx b/phone/src/os/sound/providers/SoundProvider.tsx index 60fb1c4..3cdf3b9 100644 --- a/phone/src/os/sound/providers/SoundProvider.tsx +++ b/phone/src/os/sound/providers/SoundProvider.tsx @@ -11,7 +11,7 @@ interface ISoundContext { url: string, volume?: number, loop?: boolean, - autoplay?: boolean + autoplay?: boolean, ): Promise; play(url?: string, volume?: number, loop?: boolean): void; stop(url: string): void; @@ -36,7 +36,7 @@ export const SoundProvider = ({ children }: { children: React.ReactNode }) => { url: string, volume: number = 1, loop: boolean = false, - autoplay: boolean = false + autoplay: boolean = false, ) => { return new Promise((res) => { if (!soundRefs.current) { @@ -78,7 +78,7 @@ export const SoundProvider = ({ children }: { children: React.ReactNode }) => { instance.once('playerror', onError); }); }, - [] + [], ); const play = useCallback( @@ -115,25 +115,19 @@ export const SoundProvider = ({ children }: { children: React.ReactNode }) => { } mount(url, volume, loop, true); }, - [mount] + [mount], ); - const volume = useCallback( - (url: string, volume: number = undefined): number => { - const sound = soundRefs.current.get(url); - return sound?.howl.volume(volume) as number; - }, - [] - ); + const volume = useCallback((url: string, volume: number = undefined): number => { + const sound = soundRefs.current.get(url); + return sound?.howl.volume(volume) as number; + }, []); - const loop = useCallback( - (url: string, loop: boolean = undefined): boolean => { - const sound = soundRefs.current.get(url); - sound.howl.loop(loop); - return sound.howl.loop(); - }, - [] - ); + const loop = useCallback((url: string, loop: boolean = undefined): boolean => { + const sound = soundRefs.current.get(url); + sound.howl.loop(loop); + return sound.howl.loop(); + }, []); const stop = useCallback((url: string) => { if (!soundRefs.current) { diff --git a/phone/src/os/sound/utils/getSoundSettings.ts b/phone/src/os/sound/utils/getSoundSettings.ts index 6a4a762..c94d443 100644 --- a/phone/src/os/sound/utils/getSoundSettings.ts +++ b/phone/src/os/sound/utils/getSoundSettings.ts @@ -15,14 +15,13 @@ const getPath = { export const getSoundSettings = ( type: 'ringtone' | 'notification', settings: IPhoneSettings, - app?: string + app?: string, ) => { try { return app ? { sound: getPath[type](settings[`${app}_${type}`] || settings[type]), - volume: - (settings[`${app}_${type}Vol`] || settings[`${type}Vol`]) / 100, + volume: (settings[`${app}_${type}Vol`] || settings[`${type}Vol`]) / 100, } : { sound: getPath[type](settings[type]), diff --git a/phone/src/ui/components/Alert.tsx b/phone/src/ui/components/Alert.tsx index ca1e391..0daee4a 100644 --- a/phone/src/ui/components/Alert.tsx +++ b/phone/src/ui/components/Alert.tsx @@ -16,12 +16,7 @@ const useStyles = makeStyles({ export function Alert({ children, ...props }) { const classes = useStyles(); return ( - + {children} ); diff --git a/phone/src/ui/components/AppIcon.tsx b/phone/src/ui/components/AppIcon.tsx index 99c5dde..2e92c55 100644 --- a/phone/src/ui/components/AppIcon.tsx +++ b/phone/src/ui/components/AppIcon.tsx @@ -25,7 +25,7 @@ const useStyles = makeStyles( tooltip: { fontSize: 12, }, - }) + }), ); export const AppIcon = ({ @@ -48,19 +48,17 @@ export const AppIcon = ({ arrow key={id} title={t(nameLocale)} - placement='top' + placement="top" classes={{ tooltip: classes.tooltip }} TransitionComponent={Zoom} > diff --git a/phone/src/ui/components/AppTitle.tsx b/phone/src/ui/components/AppTitle.tsx index c3ca368..975a2d4 100644 --- a/phone/src/ui/components/AppTitle.tsx +++ b/phone/src/ui/components/AppTitle.tsx @@ -24,7 +24,7 @@ const useStyle = makeStyles( text: ({ color }) => ({ color: color || theme.palette.text.primary, }), - }) + }), ); // Taso: Maybe we should pass an icon (maybe fa?) as a prop as well at somepoint // but need to think about the best way to do that for standardization sake. diff --git a/phone/src/ui/components/Button.tsx b/phone/src/ui/components/Button.tsx index 942c9da..48c686e 100644 --- a/phone/src/ui/components/Button.tsx +++ b/phone/src/ui/components/Button.tsx @@ -3,7 +3,7 @@ import MaterialButton from '@material-ui/core/Button'; export const Button = ({ ...props }) => { return ( - + {props.children} ); diff --git a/phone/src/ui/components/ContextMenu.tsx b/phone/src/ui/components/ContextMenu.tsx index 571c375..4cb7619 100644 --- a/phone/src/ui/components/ContextMenu.tsx +++ b/phone/src/ui/components/ContextMenu.tsx @@ -1,11 +1,5 @@ import React from 'react'; -import { - ListItemIcon, - ListItemText, - Slide, - makeStyles, - Paper, -} from '@material-ui/core'; +import { ListItemIcon, ListItemText, Slide, makeStyles, Paper } from '@material-ui/core'; import { List } from './List'; import { ListItem } from './ListItem'; import { useTranslation } from 'react-i18next'; @@ -51,7 +45,7 @@ export const ContextMenu = ({ open, onClose, options }: IContextMenuProps) => { : options; return ( - + {_options.map((option) => ( @@ -65,10 +59,7 @@ export const ContextMenu = ({ open, onClose, options }: IContextMenuProps) => { }} > {option.icon && {option.icon}} - + ))} diff --git a/phone/src/ui/components/GridMenu.tsx b/phone/src/ui/components/GridMenu.tsx index a43b0bc..b12a6e3 100644 --- a/phone/src/ui/components/GridMenu.tsx +++ b/phone/src/ui/components/GridMenu.tsx @@ -5,12 +5,12 @@ import { Link } from 'react-router-dom'; export const GridMenu = ({ items, Component = AppIcon, xs = undefined }) => { return ( - + {items && items.length && items.map((item) => ( - - + + diff --git a/phone/src/ui/components/List.tsx b/phone/src/ui/components/List.tsx index 2f9bc13..744de44 100644 --- a/phone/src/ui/components/List.tsx +++ b/phone/src/ui/components/List.tsx @@ -3,7 +3,7 @@ import MaterialList from '@material-ui/core/List'; export const List = ({ ...props }) => { return ( - + {props.children} ); diff --git a/phone/src/ui/components/ListItem.tsx b/phone/src/ui/components/ListItem.tsx index d47538b..3c6ab04 100644 --- a/phone/src/ui/components/ListItem.tsx +++ b/phone/src/ui/components/ListItem.tsx @@ -3,7 +3,7 @@ import MaterialListItem from '@material-ui/core/ListItem'; export const ListItem = ({ ...props }) => { return ( - + {props.children} ); diff --git a/phone/src/ui/components/Modal.tsx b/phone/src/ui/components/Modal.tsx index e67fc15..bf30f97 100644 --- a/phone/src/ui/components/Modal.tsx +++ b/phone/src/ui/components/Modal.tsx @@ -49,9 +49,7 @@ export const Modal = ({ children, visible, handleClose }) => { return () => window.removeEventListener('keydown', _handleEscape); }); - const showHideClassName = visible - ? classes.displayBlock - : classes.displayNone; + const showHideClassName = visible ? classes.displayBlock : classes.displayNone; return (

diff --git a/phone/src/ui/components/Snackbar.tsx b/phone/src/ui/components/Snackbar.tsx index 78ffc3e..8a965ae 100644 --- a/phone/src/ui/components/Snackbar.tsx +++ b/phone/src/ui/components/Snackbar.tsx @@ -27,9 +27,7 @@ export const Snackbar = () => { return (
- {alert ? ( - {t('APPS_' + alert.message)} - ) : null} + {alert ? {t('APPS_' + alert.message)} : null}
); }; diff --git a/phone/src/ui/components/StatusButton.tsx b/phone/src/ui/components/StatusButton.tsx index 01e11f9..937a9b5 100644 --- a/phone/src/ui/components/StatusButton.tsx +++ b/phone/src/ui/components/StatusButton.tsx @@ -28,17 +28,15 @@ const useStyles = makeStyles( }, }, contained: { - color: ({ color }: IStatusButtonStyleProps) => - theme.palette[color].contrastText, - backgroundColor: ({ color }: IStatusButtonStyleProps) => - theme.palette[color].main, + color: ({ color }: IStatusButtonStyleProps) => theme.palette[color].contrastText, + backgroundColor: ({ color }: IStatusButtonStyleProps) => theme.palette[color].main, '&:hover': { backgroundColor: ({ color }: IStatusButtonStyleProps) => theme.palette[color].dark, }, }, }), - { name: 'MuiButton' } + { name: 'MuiButton' }, ); export const StatusButton = ({ diff --git a/phone/src/ui/components/StatusIconButton.tsx b/phone/src/ui/components/StatusIconButton.tsx index f8d161e..b9aab55 100644 --- a/phone/src/ui/components/StatusIconButton.tsx +++ b/phone/src/ui/components/StatusIconButton.tsx @@ -1,9 +1,4 @@ -import { - fade, - IconButton, - IconButtonProps, - makeStyles, -} from '@material-ui/core'; +import { fade, IconButton, IconButtonProps, makeStyles } from '@material-ui/core'; import React from 'react'; type StatusButtonStyleColor = 'success' | 'error' | 'warning' | 'info'; @@ -15,10 +10,8 @@ interface IStatusButtonStyleProps { const useStyles = makeStyles( (theme) => ({ root: { - color: ({ color }: IStatusButtonStyleProps) => - theme.palette[color].contrastText, - backgroundColor: ({ color }: IStatusButtonStyleProps) => - theme.palette[color].main, + color: ({ color }: IStatusButtonStyleProps) => theme.palette[color].contrastText, + backgroundColor: ({ color }: IStatusButtonStyleProps) => theme.palette[color].main, '&:hover': { backgroundColor: ({ color }: IStatusButtonStyleProps) => theme.palette[color].light, @@ -36,17 +29,15 @@ const useStyles = makeStyles( }, }, contained: { - color: ({ color }: IStatusButtonStyleProps) => - theme.palette[color].contrastText, - backgroundColor: ({ color }: IStatusButtonStyleProps) => - theme.palette[color].main, + color: ({ color }: IStatusButtonStyleProps) => theme.palette[color].contrastText, + backgroundColor: ({ color }: IStatusButtonStyleProps) => theme.palette[color].main, '&:hover': { backgroundColor: ({ color }: IStatusButtonStyleProps) => theme.palette[color].dark, }, }, }), - { name: 'MuiIconButton' } + { name: 'MuiIconButton' }, ); export const StatusIconButton = ({ @@ -56,11 +47,5 @@ export const StatusIconButton = ({ ...props }: Omit & { color: StatusButtonStyleColor }) => { const classes = useStyles({ color }); - return ( - - ); + return ; }; diff --git a/phone/webpack/prod.config.js b/phone/webpack/prod.config.js index 1713cfa..c2a44fb 100644 --- a/phone/webpack/prod.config.js +++ b/phone/webpack/prod.config.js @@ -35,7 +35,6 @@ module.exports = require('./webpack.common')({ ], performance: { - assetFilter: (assetFilename) => - !/(\.map$)|(^(main\.|favicon\.))/.test(assetFilename), + assetFilter: (assetFilename) => !/(\.map$)|(^(main\.|favicon\.))/.test(assetFilename), }, }); diff --git a/phone/yarn.lock b/phone/yarn.lock index 0d75824..c591689 100644 --- a/phone/yarn.lock +++ b/phone/yarn.lock @@ -2464,17 +2464,12 @@ ansi-colors@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA== -ansi-colors@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== - ansi-escapes@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== -ansi-escapes@^4.2.1, ansi-escapes@^4.3.0: +ansi-escapes@^4.2.1: version "4.3.1" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61" integrity sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA== @@ -2723,11 +2718,6 @@ astral-regex@^1.0.0: resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== -astral-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" - integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== - async-each@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" @@ -3619,14 +3609,6 @@ cli-spinners@^2.2.0: resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.4.0.tgz#c6256db216b878cfba4720e719cec7cf72685d7f" integrity sha512-sJAofoarcm76ZGpuooaO0eDy8saEy+YoZBLjC4h8srt4jeBnkYeOgqxgsJQTpyt2LjI5PTfLJHSL+41Yu4fEJA== -cli-truncate@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" - integrity sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg== - dependencies: - slice-ansi "^3.0.0" - string-width "^4.2.0" - cli-width@^2.0.0: version "2.2.1" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48" @@ -3786,11 +3768,6 @@ commander@^4.0.1, commander@^4.1.1: resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== -commander@^6.2.0: - version "6.2.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" - integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== - commander@~2.19.0: version "2.19.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" @@ -4020,17 +3997,6 @@ cosmiconfig@^6.0.0: path-type "^4.0.0" yaml "^1.7.2" -cosmiconfig@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.0.tgz#ef9b44d773959cae63ddecd122de23853b60f8d3" - integrity sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA== - dependencies: - "@types/parse-json" "^4.0.0" - import-fresh "^3.2.1" - parse-json "^5.0.0" - path-type "^4.0.0" - yaml "^1.10.0" - cp-cli@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/cp-cli/-/cp-cli-2.0.0.tgz#0707ca60bcbf20884b16c2c110484263fa7f922d" @@ -4126,7 +4092,7 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^7.0.0, cross-spawn@^7.0.1: +cross-spawn@^7.0.1: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -4473,13 +4439,6 @@ debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: dependencies: ms "2.1.2" -debug@^4.2.0: - version "4.3.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" - integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== - dependencies: - ms "2.1.2" - decamelize-keys@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" @@ -4505,11 +4464,6 @@ decompress-response@^3.3.0: dependencies: mimic-response "^1.0.0" -dedent@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" - integrity sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw= - deep-equal@^1.0.1: version "1.1.1" resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a" @@ -4953,13 +4907,6 @@ enhanced-resolve@^4.0.0, enhanced-resolve@^4.1.0, enhanced-resolve@^4.1.1: memory-fs "^0.5.0" tapable "^1.0.0" -enquirer@^2.3.6: - version "2.3.6" - resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" - integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== - dependencies: - ansi-colors "^4.1.1" - entities@^1.1.1, entities@~1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" @@ -5456,21 +5403,6 @@ execa@^1.0.0: signal-exit "^3.0.0" strip-eof "^1.0.0" -execa@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" - integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== - dependencies: - cross-spawn "^7.0.0" - get-stream "^5.0.0" - human-signals "^1.1.1" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.0" - onetime "^5.1.0" - signal-exit "^3.0.2" - strip-final-newline "^2.0.0" - exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" @@ -5698,7 +5630,7 @@ figgy-pudding@^3.5.1: resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" integrity sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw== -figures@^3.0.0, figures@^3.2.0: +figures@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== @@ -6073,7 +6005,7 @@ get-stream@^4.0.0, get-stream@^4.1.0: dependencies: pump "^3.0.0" -get-stream@^5.0.0, get-stream@^5.1.0: +get-stream@^5.1.0: version "5.2.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== @@ -6682,11 +6614,6 @@ https-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= -human-signals@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" - integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== - hyphenate-style-name@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz#691879af8e220aea5750e8827db4ef62a54e361d" @@ -6785,14 +6712,6 @@ import-fresh@^3.0.0, import-fresh@^3.1.0: parent-module "^1.0.0" resolve-from "^4.0.0" -import-fresh@^3.2.1: - version "3.3.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" - integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - import-from@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/import-from/-/import-from-2.1.0.tgz#335db7f2a7affd53aaa471d4b8021dee36b7f3b1" @@ -7298,11 +7217,6 @@ is-stream@^1.0.0, is-stream@^1.1.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= -is-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" - integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== - is-string@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" @@ -8202,41 +8116,6 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= -lint-staged@^10.5.3: - version "10.5.3" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.5.3.tgz#c682838b3eadd4c864d1022da05daa0912fb1da5" - integrity sha512-TanwFfuqUBLufxCc3RUtFEkFraSPNR3WzWcGF39R3f2J7S9+iF9W0KTVLfSy09lYGmZS5NDCxjNvhGMSJyFCWg== - dependencies: - chalk "^4.1.0" - cli-truncate "^2.1.0" - commander "^6.2.0" - cosmiconfig "^7.0.0" - debug "^4.2.0" - dedent "^0.7.0" - enquirer "^2.3.6" - execa "^4.1.0" - listr2 "^3.2.2" - log-symbols "^4.0.0" - micromatch "^4.0.2" - normalize-path "^3.0.0" - please-upgrade-node "^3.2.0" - string-argv "0.3.1" - stringify-object "^3.3.0" - -listr2@^3.2.2: - version "3.2.3" - resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.2.3.tgz#ef9e0d790862f038dde8a9837be552b1adfd1c07" - integrity sha512-vUb80S2dSUi8YxXahO8/I/s29GqnOL8ozgHVLjfWQXa03BNEeS1TpBLjh2ruaqq5ufx46BRGvfymdBSuoXET5w== - dependencies: - chalk "^4.1.0" - cli-truncate "^2.1.0" - figures "^3.2.0" - indent-string "^4.0.0" - log-update "^4.0.0" - p-map "^4.0.0" - rxjs "^6.6.3" - through "^2.3.8" - load-json-file@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" @@ -8392,23 +8271,6 @@ log-symbols@^3.0.0: dependencies: chalk "^2.4.2" -log-symbols@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920" - integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA== - dependencies: - chalk "^4.0.0" - -log-update@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1" - integrity sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg== - dependencies: - ansi-escapes "^4.3.0" - cli-cursor "^3.1.0" - slice-ansi "^4.0.0" - wrap-ansi "^6.2.0" - loglevel@^1.6.8: version "1.7.0" resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.7.0.tgz#728166855a740d59d38db01cf46f042caa041bb0" @@ -9086,13 +8948,6 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" -npm-run-path@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - dependencies: - path-key "^3.0.0" - nth-check@^1.0.2, nth-check@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" @@ -9623,7 +9478,7 @@ path-key@^2.0.0, path-key@^2.0.1: resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= -path-key@^3.0.0, path-key@^3.1.0: +path-key@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== @@ -9759,13 +9614,6 @@ pkg-up@3.1.0, pkg-up@^3.1.0: dependencies: find-up "^3.0.0" -please-upgrade-node@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942" - integrity sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg== - dependencies: - semver-compare "^1.0.0" - pn@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" @@ -10491,11 +10339,6 @@ prepend-http@^2.0.0: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= -prettier@^2.0.5: - version "2.1.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.2.tgz#3050700dae2e4c8b67c4c3f666cdb8af405e1ce5" - integrity sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg== - pretty-bytes@^5.1.0: version "5.4.1" resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.4.1.tgz#cd89f79bbcef21e3d21eb0da68ffe93f803e884b" @@ -11556,7 +11399,7 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" -rxjs@^6.5.3, rxjs@^6.6.0, rxjs@^6.6.3: +rxjs@^6.5.3, rxjs@^6.6.0: version "6.6.3" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552" integrity sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ== @@ -11908,24 +11751,6 @@ slice-ansi@^2.1.0: astral-regex "^1.0.0" is-fullwidth-code-point "^2.0.0" -slice-ansi@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787" - integrity sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ== - dependencies: - ansi-styles "^4.0.0" - astral-regex "^2.0.0" - is-fullwidth-code-point "^3.0.0" - -slice-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" - integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== - dependencies: - ansi-styles "^4.0.0" - astral-regex "^2.0.0" - is-fullwidth-code-point "^3.0.0" - snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" @@ -12206,11 +12031,6 @@ strict-uri-encode@^2.0.0: resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" integrity sha1-ucczDHBChi9rFC3CdLvMWGbONUY= -string-argv@0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" - integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== - string-length@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" @@ -12253,7 +12073,7 @@ string-width@^3.0.0, string-width@^3.1.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" -string-width@^4.1.0, string-width@^4.2.0: +string-width@^4.1.0: version "4.2.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== @@ -12367,11 +12187,6 @@ strip-eof@^1.0.0: resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= -strip-final-newline@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - strip-indent@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" @@ -12582,7 +12397,7 @@ through2@^2.0.0: readable-stream "~2.3.6" xtend "~4.0.1" -through@^2.3.6, through@^2.3.8, through@~2.3.6: +through@^2.3.6, through@~2.3.6: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= @@ -13555,15 +13370,6 @@ wrap-ansi@^5.1.0: string-width "^3.0.0" strip-ansi "^5.0.0" -wrap-ansi@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" - integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -13665,7 +13471,7 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yaml@^1.10.0, yaml@^1.7.2: +yaml@^1.7.2: version "1.10.0" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e" integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg== diff --git a/resources/.prettierrc b/resources/.prettierrc deleted file mode 100644 index 0a72520..0000000 --- a/resources/.prettierrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "trailingComma": "es5", - "tabWidth": 2, - "semi": true, - "singleQuote": true -} diff --git a/resources/client/cl_bank.ts b/resources/client/cl_bank.ts index 07e4592..77b2558 100644 --- a/resources/client/cl_bank.ts +++ b/resources/client/cl_bank.ts @@ -7,7 +7,7 @@ onNet(events.BANK_SEND_TRANSFERS, (transfer: any) => { app: 'BANK', method: 'setTransaction', data: transfer, - }) + }), ); }); @@ -17,7 +17,7 @@ onNet(events.BANK_SEND_CREDENTIALS, (credentials: any) => { app: 'BANK', method: 'setCredentials', data: credentials, - }) + }), ); }); @@ -37,7 +37,7 @@ onNet(events.BANK_TRANSACTION_ALERT, (result: IAlertProps) => { app: 'BANK', method: 'setAlert', data: result, - }) + }), ); }); @@ -47,6 +47,6 @@ onNet(events.BANK_TRANSACTION_NOTIFICATION, (transfer: any) => { app: 'BANK', method: 'setNotification', data: transfer, - }) + }), ); }); diff --git a/resources/client/cl_call.ts b/resources/client/cl_call.ts index d4bef19..94f7a6f 100644 --- a/resources/client/cl_call.ts +++ b/resources/client/cl_call.ts @@ -27,9 +27,9 @@ onNet( isTransmitter: isTransmitter, accepted: false, }, - }) + }), ); - } + }, ); RegisterNuiCallbackType(events.PHONE_ACCEPT_CALL); // Fires when the TARGET accepts. @@ -54,9 +54,9 @@ onNet( isTransmitter: isTransmitter, accepted: true, }, - }) + }), ); - } + }, ); RegisterNuiCallbackType(events.PHONE_CALL_REJECTED); // Fires when cancelling and rejecting a call. @@ -79,7 +79,7 @@ onNet(events.PHONE_CALL_WAS_REJECTED, () => { accepted: false, active: false, }, - }) + }), ); }); @@ -109,7 +109,7 @@ onNet(events.PHONE_CALL_WAS_ENDED, () => { accepted: false, active: false, }, - }) + }), ); }); @@ -119,7 +119,7 @@ function openCallModal(show: boolean) { app: 'CALL', method: 'callModal', data: show, - }) + }), ); } @@ -129,6 +129,6 @@ onNet(events.PHONE_CALL_SEND_HISTORY, (calls: ICall) => { app: 'DAILER', method: 'setHistory', data: calls, - }) + }), ); }); diff --git a/resources/client/cl_contacts.ts b/resources/client/cl_contacts.ts index 51b51f8..f3fcca5 100644 --- a/resources/client/cl_contacts.ts +++ b/resources/client/cl_contacts.ts @@ -6,7 +6,7 @@ onNet(events.CONTACTS_SEND_CONTACTS, (contacts: any) => { app: 'CONTACTS', method: 'setContacts', data: contacts, - }) + }), ); }); @@ -46,6 +46,6 @@ onNet(events.CONTACTS_ACTION_RESULT, (alert: any) => { app: 'CONTACTS', method: 'setAlert', data: alert, - }) + }), ); }); diff --git a/resources/client/cl_main.ts b/resources/client/cl_main.ts index 111b3d2..e8a928e 100644 --- a/resources/client/cl_main.ts +++ b/resources/client/cl_main.ts @@ -22,7 +22,7 @@ const showPhone = async (): Promise => { app: 'PHONE', method: 'setVisibility', data: true, - }) + }), ); SetNuiFocus(true, true); }; @@ -35,7 +35,7 @@ const hidePhone = async (): Promise => { app: 'PHONE', method: 'setVisibility', data: false, - }) + }), ); await phoneCloseAnim(); SetNuiFocus(false, false); @@ -52,7 +52,7 @@ RegisterCommand( async () => { await hidePhone(); }, - false + false, ); RegisterCommand( @@ -61,7 +61,7 @@ RegisterCommand( //-- Toggles Phone await Phone(); }, - false + false, ); RegisterCommand( @@ -69,7 +69,7 @@ RegisterCommand( async () => { await showPhone(); }, - false + false, ); /* * * * * * * * * * * * * @@ -99,7 +99,7 @@ AddEventHandler('onResourceStop', function (resource: string) { app: 'PHONE', method: 'setVisibility', data: false, - }) + }), ); SetNuiFocus(false, false); removePhoneProp(); //Deletes the phone incase it was attached. @@ -113,7 +113,7 @@ onNet('phone:sendCredentials', (number: string) => { app: 'SIMCARD', method: 'setNumber', data: number, - }) + }), ); }); diff --git a/resources/client/cl_messages.ts b/resources/client/cl_messages.ts index a9b0060..7933948 100644 --- a/resources/client/cl_messages.ts +++ b/resources/client/cl_messages.ts @@ -13,12 +13,9 @@ on(`__cfx_nui:${events.MESSAGES_FETCH_MESSAGE_GROUPS}`, (): void => { onNet( events.MESSAGES_FETCH_MESSAGE_GROUPS_SUCCESS, (messageGroups: MessageGroup[]): void => { - sendMessageEvent( - events.MESSAGES_FETCH_MESSAGE_GROUPS_SUCCESS, - messageGroups - ); + sendMessageEvent(events.MESSAGES_FETCH_MESSAGE_GROUPS_SUCCESS, messageGroups); emitNet(events.MESSAGES_FETCH_MESSAGE_GROUPS_SUCCESS); - } + }, ); onNet(events.MESSAGES_FETCH_MESSAGE_GROUPS_FAILED, () => { @@ -34,7 +31,7 @@ on( ({ phoneNumbers, label }: any, cb: Function): void => { emitNet(events.MESSAGES_CREATE_MESSAGE_GROUP, phoneNumbers, label); cb(); - } + }, ); onNet(events.MESSAGES_CREATE_MESSAGE_GROUP_SUCCESS, (result: any): void => { @@ -55,7 +52,7 @@ on( ({ groupId }: any, cb: Function): void => { emitNet(events.MESSAGES_FETCH_MESSAGES, groupId); cb(); - } + }, ); onNet(events.MESSAGES_FETCH_MESSAGES_SUCCESS, (messages: Message[]): void => { diff --git a/resources/client/cl_photo.ts b/resources/client/cl_photo.ts index a5fa751..81a34c5 100644 --- a/resources/client/cl_photo.ts +++ b/resources/client/cl_photo.ts @@ -14,7 +14,7 @@ function closePhoneTemp() { app: 'PHONE', method: 'setVisibility', data: false, - }) + }), ); } @@ -26,7 +26,7 @@ function openPhoneTemp() { app: 'PHONE', method: 'setVisibility', data: true, - }) + }), ); } @@ -95,16 +95,14 @@ onNet(events.CAMERA_SEND_PHOTOS, (photos: string[]) => { app: 'CAMERA', method: 'setPhotos', data: photos, - }) + }), ); }); function takePhoto() { // Return and log error if screenshot basic token not found if (SCREENSHOT_BASIC_TOKEN === 'none') { - return console.error( - 'Screenshot basic token not found. Please set in server.cfg' - ); + return console.error('Screenshot basic token not found. Please set in server.cfg'); } exp['screenshot-basic'].requestScreenshotUpload( 'https://api.imgur.com/3/image', @@ -118,7 +116,7 @@ function takePhoto() { (data: string) => { const imageLink = JSON.parse(data).data.link; emitNet(events.CAMERA_UPLOAD_PHOTO, imageLink); - } + }, ); } diff --git a/resources/client/cl_sellout.ts b/resources/client/cl_sellout.ts index b130f38..d62de49 100644 --- a/resources/client/cl_sellout.ts +++ b/resources/client/cl_sellout.ts @@ -8,7 +8,7 @@ onNet(events.SELLOUT_SEND_LISTING, (listing: MarketplaceListing) => { app: 'SELLOUT', method: 'setListings', data: listing, - }) + }), ); }); @@ -30,6 +30,6 @@ onNet(events.SELLOUT_ACTION_RESULT, (alert: IAlertProps) => { app: 'SELLOUT', method: 'setAlert', data: alert, - }) + }), ); }); diff --git a/resources/client/cl_twitter.ts b/resources/client/cl_twitter.ts index 734969a..df4b7bb 100644 --- a/resources/client/cl_twitter.ts +++ b/resources/client/cl_twitter.ts @@ -52,12 +52,9 @@ onNet(events.TWITTER_FETCH_TWEETS_FAILURE, () => { * Twitter fetch filtered tweets */ RegisterNuiCallbackType(events.TWITTER_FETCH_TWEETS_FILTERED); -on( - `__cfx_nui:${events.TWITTER_FETCH_TWEETS_FILTERED}`, - (searchValue: string) => { - emitNet(events.TWITTER_FETCH_TWEETS_FILTERED, searchValue); - } -); +on(`__cfx_nui:${events.TWITTER_FETCH_TWEETS_FILTERED}`, (searchValue: string) => { + emitNet(events.TWITTER_FETCH_TWEETS_FILTERED, searchValue); +}); onNet(events.TWITTER_FETCH_TWEETS_FILTERED_SUCCESS, (tweets: any) => { sendTwitterMessage(events.TWITTER_FETCH_TWEETS_FILTERED_SUCCESS, tweets); diff --git a/resources/client/cl_utils.ts b/resources/client/cl_utils.ts index 7b1bf15..304f25f 100644 --- a/resources/client/cl_utils.ts +++ b/resources/client/cl_utils.ts @@ -25,18 +25,13 @@ export default class ClientUtils { }; } - public emitNetPromise( - eventName: string, - ...args: any[] - ): Promise { + public emitNetPromise(eventName: string, ...args: any[]): Promise { return new Promise((resolve, reject) => { let hasTimedOut = false; setTimeout(() => { hasTimedOut = true; - reject( - `${eventName} has timed out after ${this._settings.promiseTimeout} ms` - ); + reject(`${eventName} has timed out after ${this._settings.promiseTimeout} ms`); }, this._settings.promiseTimeout); // Have to use this as the regular uuid refused to work here for some diff --git a/resources/client/functions.ts b/resources/client/functions.ts index 71e8769..8d68c33 100644 --- a/resources/client/functions.ts +++ b/resources/client/functions.ts @@ -21,15 +21,7 @@ const newPhoneProp = async () => { const playerPed = PlayerPedId(); const [x, y, z] = GetEntityCoords(playerPed, true); - prop = CreateObject( - GetHashKey(phoneModel), - x, - y, - z + 0.2, - true, - true, - true - ); + prop = CreateObject(GetHashKey(phoneModel), x, y, z + 0.2, true, true, true); //prop = CreateObject(GetHashKey(phoneModel), 1.0, 1.0, 1.0, 1, 1, 0) const boneIndex = GetPedBoneIndex(playerPed, 28422); AttachEntityToEntity( @@ -47,7 +39,7 @@ const newPhoneProp = async () => { false, true, 1.0, - true + true, ); //-- Attaches the phone to the player. propCreated = true; } else if (propCreated) { @@ -96,7 +88,7 @@ const handleOpenVehicleAnim = async (playerPed: number): Promise => { 0, false, false, - false + false, ); await Delay(300); await newPhoneProp(); @@ -120,7 +112,7 @@ const handleOpenNormalAnim = async (playerPed: number): Promise => { 0, false, false, - false + false, ); await Delay(300); await newPhoneProp(); @@ -174,28 +166,9 @@ const handleCallEndNormalAnim = async (playerPed: number): Promise => { const DICT = 'cellphone@'; const ANIM = 'cellphone_call_to_text'; - if ( - IsEntityPlayingAnim( - playerPed, - 'cellphone@', - 'cellphone_call_listen_base', - 49 - ) - ) { + if (IsEntityPlayingAnim(playerPed, 'cellphone@', 'cellphone_call_listen_base', 49)) { await loadAnimDict(DICT); - TaskPlayAnim( - playerPed, - DICT, - ANIM, - 2.5, - 8.0, - -1, - 50, - 0, - false, - false, - false - ); + TaskPlayAnim(playerPed, DICT, ANIM, 2.5, 8.0, -1, 50, 0, false, false, false); } }; diff --git a/resources/package.json b/resources/package.json index c3f57fe..8009d84 100644 --- a/resources/package.json +++ b/resources/package.json @@ -8,7 +8,6 @@ "repository": "https://github.com/project-error/new-phone-who-dis", "scripts": { "build": "webpack --mode production", - "format": "prettier --write \"./**/*.ts\"", "watch": "webpack --mode development --watch", "test": "jest" }, diff --git a/resources/server/db.ts b/resources/server/db.ts index b2c6f50..5091dcf 100644 --- a/resources/server/db.ts +++ b/resources/server/db.ts @@ -14,7 +14,7 @@ import { mainLogger } from './sv_logger'; const mysqlConnectionString = GetConvar(CONNECTION_STRING, 'none'); if (mysqlConnectionString === 'none') { const error = new Error( - `No connection string provided. make sure "${CONNECTION_STRING}" is set in your config.` + `No connection string provided. make sure "${CONNECTION_STRING}" is set in your config.`, ); mainLogger.error(error.message); throw error; @@ -51,9 +51,7 @@ export function generateConnectionPool() { scheme: 'mysql', hosts: [], }); - const connectionOjbect = connectionStringParser.parse( - mysqlConnectionString - ); + const connectionOjbect = connectionStringParser.parse(mysqlConnectionString); return mysql.createPool({ host: connectionOjbect.hosts[0].host, @@ -84,9 +82,7 @@ export async function withTransaction(queries: Promise[]): Promise { await connection.release(); return results; } catch (err) { - mainLogger.warn( - `Error when submitting queries in transaction, ${err.message}` - ); + mainLogger.warn(`Error when submitting queries in transaction, ${err.message}`); await connection.rollback(); await connection.release(); return Promise.reject(err); diff --git a/resources/server/db_utils.ts b/resources/server/db_utils.ts index c83b19c..ce8ae21 100644 --- a/resources/server/db_utils.ts +++ b/resources/server/db_utils.ts @@ -15,7 +15,7 @@ export function parseSemiColonFormat(connectionString: string): Map { const parts = connectionString.split(';'); if (parts.length === 1) { throw new Error( - `Connection string ${connectionString} is in the incorrect format. Please follow the README.` + `Connection string ${connectionString} is in the incorrect format. Please follow the README.`, ); } diff --git a/resources/server/discord.ts b/resources/server/discord.ts index 9a23edf..7e1f52c 100644 --- a/resources/server/discord.ts +++ b/resources/server/discord.ts @@ -17,7 +17,7 @@ const POST_CHANNEL_URL = `${BASE_URL}/channels/${DISCORD_CHANNEL_ID}/messages`; export async function reportTweetToDiscord( tweet: Tweet, - reportingProfile: Profile + reportingProfile: Profile, ): Promise { if (!DISCORD_TOKEN || !DISCORD_CHANNEL_ID) { discordLogger.warn(`Got a request to report a tweet but discord is not @@ -26,9 +26,7 @@ export async function reportTweetToDiscord( } const content = `**REPORTED TWEET** ---------------------------------------------------------------------- - **Reporting User**: ${reportingProfile.profile_name} (${ - reportingProfile.id - }) + **Reporting User**: ${reportingProfile.profile_name} (${reportingProfile.id}) **Reported User**: ${tweet.profile_name} (${tweet.profile_id}) **Reported Tweet timestamp**: ${tweet.createdAt} ---------------------------------------------------------------------- @@ -40,9 +38,5 @@ export async function reportTweetToDiscord( ${tweet.images.split(IMAGE_DELIMITER).join('\n')} `; - return await axios.post( - POST_CHANNEL_URL, - { content }, - { headers: DISCORD_HEADERS } - ); + return await axios.post(POST_CHANNEL_URL, { content }, { headers: DISCORD_HEADERS }); } diff --git a/resources/server/functions.ts b/resources/server/functions.ts index df77acd..396d941 100644 --- a/resources/server/functions.ts +++ b/resources/server/functions.ts @@ -22,9 +22,7 @@ export function getIdentifier(source: number): string { return ESX.GetPlayerFromId(source).getIdentifier(); } -export async function getIdentifierByPhoneNumber( - phoneNumber: string -): Promise { +export async function getIdentifierByPhoneNumber(phoneNumber: string): Promise { const query = 'SELECT identifier FROM users WHERE phone_number = ?'; const [results] = await pool.query(query, [phoneNumber]); const identifier = results; diff --git a/resources/server/sv_bank.ts b/resources/server/sv_bank.ts index 40754c3..9b3397e 100644 --- a/resources/server/sv_bank.ts +++ b/resources/server/sv_bank.ts @@ -2,23 +2,19 @@ import events from '../utils/events'; import { ESX } from './server'; import { getSource } from './functions'; import { pool } from './db'; -import { - Transfer, - IBankCredentials, -} from '../../phone/src/common/typings/bank'; +import { Transfer, IBankCredentials } from '../../phone/src/common/typings/bank'; import { getIdentifier } from './functions'; import { mainLogger } from './sv_logger'; const bankLogger = mainLogger.child({ module: 'bank' }); async function fetchAllTransactions(identifier: string): Promise { - const query = - 'SELECT * FROM npwd_bank_transfers WHERE identifier = ? ORDER BY id DESC'; + const query = 'SELECT * FROM npwd_bank_transfers WHERE identifier = ? ORDER BY id DESC'; const [results] = await pool.query(query, [identifier]); const transactions = results; bankLogger.verbose( - `Fetched all transactions (${identifier}) - ${JSON.stringify(transactions)}` + `Fetched all transactions (${identifier}) - ${JSON.stringify(transactions)}`, ); return transactions; @@ -38,10 +34,7 @@ function fetchCredentials(): IBankCredentials { return result; } -async function addTransfer( - identifier: string, - transfer: Transfer -): Promise { +async function addTransfer(identifier: string, transfer: Transfer): Promise { const xPlayer = ESX.GetPlayerFromId(getSource()); const bankBalance = xPlayer.getAccount('bank').money; const sourceName = xPlayer.getName(); diff --git a/resources/server/sv_call.ts b/resources/server/sv_call.ts index 43ef663..0ffb91f 100644 --- a/resources/server/sv_call.ts +++ b/resources/server/sv_call.ts @@ -25,10 +25,7 @@ async function getPlayerFromIdentifier(identifier: string): Promise { for (const player of xPlayers) { const xPlayer = ESX.GetPlayerFromId(player); - if ( - xPlayer.getIdentifier() != null && - xPlayer.getIdentifier() == identifier - ) { + if (xPlayer.getIdentifier() != null && xPlayer.getIdentifier() == identifier) { res(xPlayer); } } @@ -40,17 +37,11 @@ async function getPlayerFromIdentifier(identifier: string): Promise { async function saveCall(call: ICall) { const query = 'INSERT INTO npwd_calls (identifier, transmitter, receiver, start) VALUES (?, ?, ?, ?)'; - await pool.query(query, [ - call.identifier, - call.transmitter, - call.receiver, - call.start, - ]); + await pool.query(query, [call.identifier, call.transmitter, call.receiver, call.start]); } async function updateCall(call: ICall, isAccepted: boolean, end: number) { - const query = - 'UPDATE npwd_calls SET is_accepted=?, end=? WHERE identifier = ?'; + const query = 'UPDATE npwd_calls SET is_accepted=?, end=? WHERE identifier = ?'; await pool.query(query, [isAccepted, end, call.identifier]); } @@ -64,57 +55,46 @@ async function fetchCalls(phoneNumber: string): Promise { let calls: Map = new Map(); -onNet( - events.PHONE_INITIALIZE_CALL, - async (phoneNumber: string, timestamp: number) => { - const _source = getSource(); +onNet(events.PHONE_INITIALIZE_CALL, async (phoneNumber: string, timestamp: number) => { + const _source = getSource(); - const callIdentifier = uuidv4(); + const callIdentifier = uuidv4(); - // the client that is calling - const xTransmitter = ESX.GetPlayerFromId(_source); - const transmitterNumber = await usePhoneNumber( - xTransmitter.getIdentifier() - ); + // the client that is calling + const xTransmitter = ESX.GetPlayerFromId(_source); + const transmitterNumber = await usePhoneNumber(xTransmitter.getIdentifier()); - // player who is being called - const receiverIdentifier = await getIdentifierByPhoneNumber(phoneNumber); - const xReceiver = await getPlayerFromIdentifier(receiverIdentifier); - const receiverNumber = phoneNumber; + // player who is being called + const receiverIdentifier = await getIdentifierByPhoneNumber(phoneNumber); + const xReceiver = await getPlayerFromIdentifier(receiverIdentifier); + const receiverNumber = phoneNumber; - calls.set(transmitterNumber, { - identifier: callIdentifier, - transmitter: transmitterNumber, - transmitterSource: _source, - receiver: receiverNumber, - receiverSource: xReceiver.source, - start: timestamp / 1000, - accepted: false, - }); + calls.set(transmitterNumber, { + identifier: callIdentifier, + transmitter: transmitterNumber, + transmitterSource: _source, + receiver: receiverNumber, + receiverSource: xReceiver.source, + start: timestamp / 1000, + accepted: false, + }); - const currentCall = calls.get(transmitterNumber); - await saveCall(currentCall); + const currentCall = calls.get(transmitterNumber); + await saveCall(currentCall); - // events - // client that is calling - emitNet( - events.PHONE_START_CALL, - _source, - transmitterNumber, - receiverNumber, - true - ); + // events + // client that is calling + emitNet(events.PHONE_START_CALL, _source, transmitterNumber, receiverNumber, true); - // client that is being called - emitNet( - events.PHONE_START_CALL, - xReceiver.source, - transmitterNumber, - receiverNumber, - false - ); - } -); + // client that is being called + emitNet( + events.PHONE_START_CALL, + xReceiver.source, + transmitterNumber, + receiverNumber, + false, + ); +}); onNet(events.PHONE_ACCEPT_CALL, async (transmitterNumber: string) => { const pSource = getSource(); @@ -125,13 +105,7 @@ onNet(events.PHONE_ACCEPT_CALL, async (transmitterNumber: string) => { await updateCall(currentCall, true, null); // player who is being called - emitNet( - events.PHONE_CALL_WAS_ACCEPTED, - pSource, - channelId, - currentCall, - false - ); + emitNet(events.PHONE_CALL_WAS_ACCEPTED, pSource, channelId, currentCall, false); // player who is calling emitNet( @@ -139,7 +113,7 @@ onNet(events.PHONE_ACCEPT_CALL, async (transmitterNumber: string) => { currentCall.transmitterSource, channelId, currentCall, - true + true, ); currentCall.accepted = true; @@ -167,39 +141,33 @@ onNet( source: pSource, }); } - } + }, ); -onNet( - events.PHONE_END_CALL, - async (transmitterNumber: string, timestamp: number) => { - const pSource = getSource(); - try { - const currentCall = calls.get(transmitterNumber); - const endTime = timestamp / 1000; - await updateCall(currentCall, false, endTime); - const accepted = calls.get(pSource); +onNet(events.PHONE_END_CALL, async (transmitterNumber: string, timestamp: number) => { + const pSource = getSource(); + try { + const currentCall = calls.get(transmitterNumber); + const endTime = timestamp / 1000; + await updateCall(currentCall, false, endTime); + const accepted = calls.get(pSource); - // player who is being called - emitNet(events.PHONE_CALL_WAS_ENDED, currentCall.receiverSource); - // player who is calling - emitNet(events.PHONE_CALL_WAS_ENDED, currentCall.transmitterSource); - // ends animations if call is active - if (currentCall.accepted) { - emitNet(events.PHONE_CALL_SEND_HANGUP_ANIM, currentCall.receiverSource); - emitNet( - events.PHONE_CALL_SEND_HANGUP_ANIM, - currentCall.transmitterSource - ); - } - calls.delete(transmitterNumber); - } catch (e) { - callLogger.error(`Error ending Phone Call, ${e.message}`, { - source: pSource, - }); + // player who is being called + emitNet(events.PHONE_CALL_WAS_ENDED, currentCall.receiverSource); + // player who is calling + emitNet(events.PHONE_CALL_WAS_ENDED, currentCall.transmitterSource); + // ends animations if call is active + if (currentCall.accepted) { + emitNet(events.PHONE_CALL_SEND_HANGUP_ANIM, currentCall.receiverSource); + emitNet(events.PHONE_CALL_SEND_HANGUP_ANIM, currentCall.transmitterSource); } + calls.delete(transmitterNumber); + } catch (e) { + callLogger.error(`Error ending Phone Call, ${e.message}`, { + source: pSource, + }); } -); +}); onNet(events.PHONE_CALL_FETCH_CALLS, async () => { const _source = getSource(); diff --git a/resources/server/sv_contacts.ts b/resources/server/sv_contacts.ts index eb12263..4755603 100644 --- a/resources/server/sv_contacts.ts +++ b/resources/server/sv_contacts.ts @@ -29,23 +29,15 @@ async function addContact( identifier: string, number: string, display: string, - avatar: string + avatar: string, ): Promise { const query = 'INSERT INTO npwd_phone_contacts (identifier, number, display, avatar) VALUES (?, ?, ?, ?)'; - const [result] = await pool.query(query, [ - identifier, - number, - display, - avatar, - ]); + const [result] = await pool.query(query, [identifier, number, display, avatar]); } -async function updateContact( - contact: Contacts, - identifier: string -): Promise { +async function updateContact(contact: Contacts, identifier: string): Promise { const query = 'UPDATE npwd_phone_contacts SET number = ?, display = ?, avatar = ? WHERE id = ? AND identifier = ?'; await pool.query(query, [ @@ -57,12 +49,8 @@ async function updateContact( ]); } -async function deleteContact( - contact: ContactId, - identifier: string -): Promise { - const query = - 'DELETE FROM npwd_phone_contacts WHERE id = ? AND identifier = ?'; +async function deleteContact(contact: ContactId, identifier: string): Promise { + const query = 'DELETE FROM npwd_phone_contacts WHERE id = ? AND identifier = ?'; await pool.query(query, [contact.id, identifier]); } @@ -99,7 +87,7 @@ onNet( source: _source, }); } - } + }, ); onNet(events.CONTACTS_UPDATE_CONTACT, async (contact: Contacts) => { diff --git a/resources/server/sv_logger.ts b/resources/server/sv_logger.ts index adc06f3..38cc67d 100644 --- a/resources/server/sv_logger.ts +++ b/resources/server/sv_logger.ts @@ -3,15 +3,12 @@ import config from '../utils/config'; import path from 'path'; // Needed to manually apply a color to componenent property of log -const manualColorize = (strToColor: string): string => - `[\x1b[35m${strToColor}\x1b[0m]`; +const manualColorize = (strToColor: string): string => `[\x1b[35m${strToColor}\x1b[0m]`; // Format handler passed to winston const formatLogs = (log: winston.Logform.TransformableInfo): string => { if (log.module) - return `${log.label} ${manualColorize(log.module)} [${log.level}]: ${ - log.message - }`; + return `${log.label} ${manualColorize(log.module)} [${log.level}]: ${log.message}`; return `${log.label} [${log.level}]: ${log.message}`; }; @@ -28,14 +25,14 @@ export const mainLogger = winston.createLogger({ format: winston.format.combine( winston.format.errors({ stack: true }), winston.format.timestamp(), - winston.format.json() + winston.format.json(), ), }), new winston.transports.Console({ format: winston.format.combine( winston.format.label({ label: '[NPWD]' }), winston.format.colorize({ all: true }), - winston.format.printf(formatLogs) + winston.format.printf(formatLogs), ), }), ], diff --git a/resources/server/sv_messages.ts b/resources/server/sv_messages.ts index ae72b65..582185f 100644 --- a/resources/server/sv_messages.ts +++ b/resources/server/sv_messages.ts @@ -49,7 +49,7 @@ interface MessageGroupMapping { async function createMessage( userIdentifier: string, groupId: string, - message: string + message: string, ): Promise { const query = ` INSERT INTO npwd_messages @@ -66,7 +66,7 @@ async function createMessage( * @param userIdentifier - identifier of the user to get message groups for */ async function getMessageGroups( - userIdentifier: string + userIdentifier: string, ): Promise { const query = ` SELECT @@ -104,10 +104,7 @@ async function getMessageGroups( * @param userIdentifier - user to get messages for * @param groupId - the group to get messages from */ -async function getMessages( - userIdentifier: string, - groupId: string -): Promise { +async function getMessages(userIdentifier: string, groupId: string): Promise { const query = ` SELECT npwd_messages.id, @@ -142,7 +139,7 @@ async function getMessages( async function createLabel( userIdentifier: string, groupId: string, - label: string + label: string, ): Promise { const query = ` INSERT INTO npwd_messages_labels @@ -162,7 +159,7 @@ async function createLabel( async function createMessageGroup( userIdentifier: string, groupId: string, - participantIdentifier: string + participantIdentifier: string, ): Promise { const query = ` INSERT INTO npwd_messages_groups @@ -180,9 +177,7 @@ async function createMessageGroup( * Find a players identifier from their phone number * @param phoneNumber - the phone number to search for */ -async function getIdentifierFromPhoneNumber( - phoneNumber: string -): Promise { +async function getIdentifierFromPhoneNumber(phoneNumber: string): Promise { const query = ` SELECT identifier FROM users @@ -231,39 +226,34 @@ async function getMessageCountByGroup(groupId: string): Promise { * @param userIdentifier - the user identifier to get message groups for */ async function getConsolidatedMessageGroups( - userIdentifier: string + userIdentifier: string, ): Promise { const messageGroups = await getMessageGroups(userIdentifier); return messageGroups.reduce( (mapping: MessageGroupMapping, messageGroup: UnformattedMessageGroup) => { const groupId = messageGroup.group_id; - const displayTerm = - messageGroup.display || messageGroup.phone_number || '???'; + const displayTerm = messageGroup.display || messageGroup.phone_number || '???'; if (groupId in mapping) { - mapping[groupId].participants = mapping[groupId].participants.concat( - displayTerm - ); + mapping[groupId].participants = mapping[groupId].participants.concat(displayTerm); } else { mapping[groupId] = { user_identifier: messageGroup.user_identifier, avatar: messageGroup.avatar, label: messageGroup.label, participants: [displayTerm], - updatedAt: messageGroup.updatedAt - ? messageGroup.updatedAt.toString() - : null, + updatedAt: messageGroup.updatedAt ? messageGroup.updatedAt.toString() : null, }; } return mapping; }, - {} + {}, ); } async function getGroupIds( userIdentifier: string, - groupMapping: MessageGroupMapping + groupMapping: MessageGroupMapping, ): Promise { const groupIds: string[] = []; for (const groupId of Object.keys(groupMapping)) { @@ -281,7 +271,7 @@ async function getGroupIds( * @param userIdentifier - user to generate the MessageGroups for */ async function getFormattedMessageGroups( - userIdentifier: string + userIdentifier: string, ): Promise { const groupMapping = await getConsolidatedMessageGroups(userIdentifier); const groupIds = await getGroupIds(userIdentifier, groupMapping); @@ -335,7 +325,7 @@ function createGroupHashID(identifiers: string[]) { async function createMessageGroupsFromPhoneNumbers( userIdentifier: string, phoneNumbers: string[], - groupLabel: string + groupLabel: string, ): Promise { // we check that each phoneNumber exists before we create the group const identifiers: string[] = []; @@ -363,7 +353,7 @@ async function createMessageGroupsFromPhoneNumbers( // other players works as expected createMessageGroup(userIdentifier, groupId, userIdentifier), ...identifiers.map((identifier) => - createMessageGroup(userIdentifier, groupId, identifier) + createMessageGroup(userIdentifier, groupId, identifier), ), ]; @@ -389,11 +379,7 @@ onNet(events.MESSAGES_FETCH_MESSAGE_GROUPS, async () => { try { const identifier = getIdentifier(_source); const messageGroups = await getFormattedMessageGroups(identifier); - emitNet( - events.MESSAGES_FETCH_MESSAGE_GROUPS_SUCCESS, - _source, - messageGroups - ); + emitNet(events.MESSAGES_FETCH_MESSAGE_GROUPS_SUCCESS, _source, messageGroups); } catch (e) { emitNet(events.MESSAGES_FETCH_MESSAGE_GROUPS_FAILED, _source); messageLogger.error(`Failed to fetch messages groups, ${e.message}`); @@ -409,7 +395,7 @@ onNet( const result = await createMessageGroupsFromPhoneNumbers( _identifier, phoneNumbers, - label + label, ); if (result.error && result.duplicate) { @@ -452,7 +438,7 @@ onNet( source: _source, }); } - } + }, ); onNet(events.MESSAGES_FETCH_MESSAGES, async (groupId: string) => { @@ -469,28 +455,25 @@ onNet(events.MESSAGES_FETCH_MESSAGES, async (groupId: string) => { } }); -onNet( - events.MESSAGES_SEND_MESSAGE, - async (groupId: string, message: string) => { - const _source = getSource(); - try { - const _identifier = getIdentifier(_source); - await createMessage(_identifier, groupId, message); - emitNet(events.MESSAGES_SEND_MESSAGE_SUCCESS, _source, groupId); - } catch (e) { - // Not really sure what this does? As I cant find any reference - // of this in the ui part. - emitNet(events.MESSAGES_SEND_MESSAGE_FAILED, _source); - // sending a new alert - // The message property is always using the locale strings without - // the APPS_ prefix. - emitNet(events.MESSAGES_ACTION_RESULT, _source, { - message: 'MESSAGES_NEW_MESSAGE_FAILED', - type: 'error', - }); - messageLogger.error(`Failed to send message, ${e.message}`, { - source: _source, - }); - } +onNet(events.MESSAGES_SEND_MESSAGE, async (groupId: string, message: string) => { + const _source = getSource(); + try { + const _identifier = getIdentifier(_source); + await createMessage(_identifier, groupId, message); + emitNet(events.MESSAGES_SEND_MESSAGE_SUCCESS, _source, groupId); + } catch (e) { + // Not really sure what this does? As I cant find any reference + // of this in the ui part. + emitNet(events.MESSAGES_SEND_MESSAGE_FAILED, _source); + // sending a new alert + // The message property is always using the locale strings without + // the APPS_ prefix. + emitNet(events.MESSAGES_ACTION_RESULT, _source, { + message: 'MESSAGES_NEW_MESSAGE_FAILED', + type: 'error', + }); + messageLogger.error(`Failed to send message, ${e.message}`, { + source: _source, + }); } -); +}); diff --git a/resources/server/sv_notes.ts b/resources/server/sv_notes.ts index 496ab29..4952f75 100644 --- a/resources/server/sv_notes.ts +++ b/resources/server/sv_notes.ts @@ -7,14 +7,12 @@ import { mainLogger } from './sv_logger'; const notesLogger = mainLogger.child({ module: 'notes' }); async function addNote(identifier: string, note: Note): Promise { - const query = - 'INSERT INTO npwd_notes (identifier, title, content) VALUES (?, ?, ?)'; + const query = 'INSERT INTO npwd_notes (identifier, title, content) VALUES (?, ?, ?)'; await pool.query(query, [identifier, note.title, note.content]); } async function fetchAllNotes(identifier: string): Promise { - const query = - 'SELECT * FROM npwd_notes WHERE identifier = ? ORDER BY id DESC'; + const query = 'SELECT * FROM npwd_notes WHERE identifier = ? ORDER BY id DESC'; const [result] = await pool.query(query, [identifier]); return result; } diff --git a/resources/server/sv_photo.ts b/resources/server/sv_photo.ts index d5869ed..25a3cca 100644 --- a/resources/server/sv_photo.ts +++ b/resources/server/sv_photo.ts @@ -7,8 +7,7 @@ import { mainLogger } from './sv_logger'; const photoLogger = mainLogger.child({ module: 'photo' }); async function uploadPhoto(identifier: string, image: string) { - const query = - 'INSERT INTO npwd_phone_gallery (identifier, image) VALUES (?, ?)'; + const query = 'INSERT INTO npwd_phone_gallery (identifier, image) VALUES (?, ?)'; await pool.query(query, [identifier, image]); } @@ -21,8 +20,7 @@ async function getPhotosByIdentifier(identifier: string): Promise { } async function deletePhoto(photo: IPhoto, identifier: string) { - const query = - 'DELETE FROM npwd_phone_gallery WHERE image = ? AND identifier = ?'; + const query = 'DELETE FROM npwd_phone_gallery WHERE image = ? AND identifier = ?'; await pool.query(query, [photo.image, identifier]); } diff --git a/resources/server/sv_sellout.ts b/resources/server/sv_sellout.ts index 569ee35..72d300a 100644 --- a/resources/server/sv_sellout.ts +++ b/resources/server/sv_sellout.ts @@ -21,7 +21,7 @@ async function addListing( identifier: string, name: string, number: any, - listing: MarketplaceListing + listing: MarketplaceListing, ): Promise { const query = 'INSERT INTO npwd_sellout_listings (identifier, name, number, title, url, description) VALUES (?, ?, ?, ?, ?, ?)'; diff --git a/resources/server/sv_twitter.ts b/resources/server/sv_twitter.ts index 7021efe..5bcce6e 100644 --- a/resources/server/sv_twitter.ts +++ b/resources/server/sv_twitter.ts @@ -51,7 +51,7 @@ async function fetchAllTweets(profileId: number): Promise { */ async function fetchTweetsFiltered( profileId: number, - searchValue: string + searchValue: string, ): Promise { const parameterizedSearchValue = `%${searchValue}%`; const query = ` @@ -116,19 +116,12 @@ async function createTweet(identifier: string, tweet: Tweet): Promise { INSERT INTO npwd_twitter_tweets (identifier, message, images) VALUES (?, ?, ?) `; - const [results] = await pool.query(query, [ - identifier, - tweet.message, - tweet.images, - ]); + const [results] = await pool.query(query, [identifier, tweet.message, tweet.images]); const insertData = results; return await getTweet(profile.id, insertData.insertId); } -async function createTweetReport( - tweetId: number, - profileId: number -): Promise { +async function createTweetReport(tweetId: number, profileId: number): Promise { const query = ` INSERT INTO npwd_twitter_reports (tweet_id, profile_id) VALUES (?, ?) @@ -203,14 +196,7 @@ async function updateProfile(identifier: string, profile: Profile) { SET avatar_url = ?, profile_name = ?, bio = ?, location = ?, job = ? WHERE identifier = ? `; - await pool.execute(query, [ - avatar_url, - profile_name, - bio, - location, - job, - identifier, - ]); + await pool.execute(query, [avatar_url, profile_name, bio, location, job, identifier]); } /** @@ -259,10 +245,7 @@ async function deleteTweet(identifier: string, tweetId: number): Promise { * @param profileId - primary key of the profile to check * @param tweetId - primary key of the tweet to check */ -async function doesLikeExist( - profileId: number, - tweetId: number -): Promise { +async function doesLikeExist(profileId: number, tweetId: number): Promise { const query = ` SELECT * FROM npwd_twitter_likes WHERE profile_id = ? AND tweet_id = ? @@ -278,10 +261,7 @@ async function doesLikeExist( * @param tweetId - primary key of the tweet to check * @param profileId - primary key of the profile to check */ -async function doesReportExist( - tweetId: number, - profileId: number -): Promise { +async function doesReportExist(tweetId: number, profileId: number): Promise { const query = ` SELECT * FROM npwd_twitter_reports WHERE tweet_id = ? AND profile_id = ? diff --git a/resources/utils/messages.ts b/resources/utils/messages.ts index 4c79720..3b89f7f 100644 --- a/resources/utils/messages.ts +++ b/resources/utils/messages.ts @@ -6,7 +6,7 @@ function sendMessage(app: string, method: string, data: any) { app, method, data, - }) + }), ); } diff --git a/resources/yarn.lock b/resources/yarn.lock index 2c29242..9c9d540 100644 --- a/resources/yarn.lock +++ b/resources/yarn.lock @@ -1450,11 +1450,6 @@ resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== -"@types/parse-json@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" - integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== - "@types/prettier@^2.0.0": version "2.1.5" resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.1.5.tgz#b6ab3bba29e16b821d84e09ecfaded462b816b00" @@ -1845,7 +1840,7 @@ ansi-colors@^4.1.1: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== -ansi-escapes@^4.2.1, ansi-escapes@^4.3.0: +ansi-escapes@^4.2.1: version "4.3.1" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61" integrity sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA== @@ -1981,11 +1976,6 @@ astral-regex@^1.0.0: resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== -astral-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" - integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== - async-each@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" @@ -2392,7 +2382,7 @@ chalk@^3.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@^4.0.0, chalk@^4.1.0: +chalk@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== @@ -2484,21 +2474,6 @@ clean-stack@^2.0.0: resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== -cli-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" - integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== - dependencies: - restore-cursor "^3.1.0" - -cli-truncate@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" - integrity sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg== - dependencies: - slice-ansi "^3.0.0" - string-width "^4.2.0" - cliui@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" @@ -2600,21 +2575,11 @@ commander@^2.20.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^6.2.0: - version "6.2.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" - integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== - commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= -compare-versions@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.6.0.tgz#1a5689913685e5a87637b8d3ffca75514ec41d62" - integrity sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA== - component-emitter@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" @@ -2689,17 +2654,6 @@ core-util-is@1.0.2, core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= -cosmiconfig@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.0.tgz#ef9b44d773959cae63ddecd122de23853b60f8d3" - integrity sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA== - dependencies: - "@types/parse-json" "^4.0.0" - import-fresh "^3.2.1" - parse-json "^5.0.0" - path-type "^4.0.0" - yaml "^1.10.0" - cp-file@^6.1.0: version "6.2.0" resolved "https://registry.yarnpkg.com/cp-file/-/cp-file-6.2.0.tgz#40d5ea4a1def2a9acdd07ba5c0b0246ef73dc10d" @@ -2849,13 +2803,6 @@ debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: dependencies: ms "2.1.2" -debug@^4.2.0: - version "4.3.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" - integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== - dependencies: - ms "2.1.2" - decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -2871,11 +2818,6 @@ decode-uri-component@^0.2.0: resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= -dedent@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" - integrity sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw= - deep-is@^0.1.3, deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" @@ -3072,7 +3014,7 @@ enhanced-resolve@^4.0.0, enhanced-resolve@^4.1.1, enhanced-resolve@^4.3.0: memory-fs "^0.5.0" tapable "^1.0.0" -enquirer@^2.3.5, enquirer@^2.3.6: +enquirer@^2.3.5: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== @@ -3363,21 +3305,6 @@ execa@^4.0.0: signal-exit "^3.0.2" strip-final-newline "^2.0.0" -execa@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" - integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== - dependencies: - cross-spawn "^7.0.0" - get-stream "^5.0.0" - human-signals "^1.1.1" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.0" - onetime "^5.1.0" - signal-exit "^3.0.2" - strip-final-newline "^2.0.0" - exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" @@ -3515,13 +3442,6 @@ figgy-pudding@^3.5.1: resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" integrity sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw== -figures@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" - integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== - dependencies: - escape-string-regexp "^1.0.5" - file-entry-cache@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" @@ -3584,13 +3504,6 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" -find-versions@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-3.2.0.tgz#10297f98030a786829681690545ef659ed1d254e" - integrity sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww== - dependencies: - semver-regex "^2.0.0" - findup-sync@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-3.0.0.tgz#17b108f9ee512dfb7a5c7f3c8b27ea9e1a9c08d1" @@ -3746,11 +3659,6 @@ get-caller-file@^2.0.1: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-own-enumerable-property-symbols@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664" - integrity sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g== - get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" @@ -4031,22 +3939,6 @@ human-signals@^1.1.1: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== -husky@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/husky/-/husky-4.3.0.tgz#0b2ec1d66424e9219d359e26a51c58ec5278f0de" - integrity sha512-tTMeLCLqSBqnflBZnlVDhpaIMucSGaYyX6855jM4AguGeWCeSzNdb1mfyWduTZ3pe3SJVvVWGL0jO1iKZVPfTA== - dependencies: - chalk "^4.0.0" - ci-info "^2.0.0" - compare-versions "^3.6.0" - cosmiconfig "^7.0.0" - find-versions "^3.2.0" - opencollective-postinstall "^2.0.2" - pkg-dir "^4.2.0" - please-upgrade-node "^3.2.0" - slash "^3.0.0" - which-pm-runs "^1.0.0" - iconv-lite@0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -4323,11 +4215,6 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== -is-obj@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" - integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= - is-path-inside@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.2.tgz#f5220fc82a3e233757291dddc9c5877f2a1f3017" @@ -4357,11 +4244,6 @@ is-regex@^1.1.1: dependencies: has-symbols "^1.0.1" -is-regexp@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" - integrity sha1-/S2INUXEa6xaYz57mgnof6LLUGk= - is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" @@ -5036,41 +4918,6 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= -lint-staged@^10.5.3: - version "10.5.3" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.5.3.tgz#c682838b3eadd4c864d1022da05daa0912fb1da5" - integrity sha512-TanwFfuqUBLufxCc3RUtFEkFraSPNR3WzWcGF39R3f2J7S9+iF9W0KTVLfSy09lYGmZS5NDCxjNvhGMSJyFCWg== - dependencies: - chalk "^4.1.0" - cli-truncate "^2.1.0" - commander "^6.2.0" - cosmiconfig "^7.0.0" - debug "^4.2.0" - dedent "^0.7.0" - enquirer "^2.3.6" - execa "^4.1.0" - listr2 "^3.2.2" - log-symbols "^4.0.0" - micromatch "^4.0.2" - normalize-path "^3.0.0" - please-upgrade-node "^3.2.0" - string-argv "0.3.1" - stringify-object "^3.3.0" - -listr2@^3.2.2: - version "3.2.3" - resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.2.3.tgz#ef9e0d790862f038dde8a9837be552b1adfd1c07" - integrity sha512-vUb80S2dSUi8YxXahO8/I/s29GqnOL8ozgHVLjfWQXa03BNEeS1TpBLjh2ruaqq5ufx46BRGvfymdBSuoXET5w== - dependencies: - chalk "^4.1.0" - cli-truncate "^2.1.0" - figures "^3.2.0" - indent-string "^4.0.0" - log-update "^4.0.0" - p-map "^4.0.0" - rxjs "^6.6.3" - through "^2.3.8" - loader-runner@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" @@ -5124,23 +4971,6 @@ lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== -log-symbols@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920" - integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA== - dependencies: - chalk "^4.0.0" - -log-update@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1" - integrity sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg== - dependencies: - ansi-escapes "^4.3.0" - cli-cursor "^3.1.0" - slice-ansi "^4.0.0" - wrap-ansi "^6.2.0" - logform@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/logform/-/logform-2.2.0.tgz#40f036d19161fc76b68ab50fdc7fe495544492f2" @@ -5663,11 +5493,6 @@ onetime@^5.1.0: dependencies: mimic-fn "^2.1.0" -opencollective-postinstall@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259" - integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q== - optionator@^0.8.1: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -5740,13 +5565,6 @@ p-map@^3.0.0: dependencies: aggregate-error "^3.0.0" -p-map@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" - integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== - dependencies: - aggregate-error "^3.0.0" - p-try@^2.0.0, p-try@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" @@ -5935,13 +5753,6 @@ pkg-dir@^4.1.0, pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" -please-upgrade-node@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942" - integrity sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg== - dependencies: - semver-compare "^1.0.0" - posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" @@ -5957,11 +5768,6 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= -prettier@^2.0.5: - version "2.1.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.2.tgz#3050700dae2e4c8b67c4c3f666cdb8af405e1ce5" - integrity sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg== - pretty-format@^25.2.1, pretty-format@^25.5.0: version "25.5.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-25.5.0.tgz#7873c1d774f682c34b8d48b6743a2bf2ac55791a" @@ -6354,14 +6160,6 @@ resolve@^1.10.0, resolve@^1.17.0, resolve@^1.3.2: dependencies: path-parse "^1.0.6" -restore-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" - integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== - dependencies: - onetime "^5.1.0" - signal-exit "^3.0.2" - ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" @@ -6418,13 +6216,6 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" -rxjs@^6.6.3: - version "6.6.3" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552" - integrity sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ== - dependencies: - tslib "^1.9.0" - safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -6487,16 +6278,6 @@ schema-utils@^2.6.5: ajv "^6.12.4" ajv-keywords "^3.5.2" -semver-compare@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" - integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= - -semver-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-2.0.0.tgz#a93c2c5844539a770233379107b38c7b4ac9d338" - integrity sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw== - "semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" @@ -6624,24 +6405,6 @@ slice-ansi@^2.1.0: astral-regex "^1.0.0" is-fullwidth-code-point "^2.0.0" -slice-ansi@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787" - integrity sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ== - dependencies: - ansi-styles "^4.0.0" - astral-regex "^2.0.0" - is-fullwidth-code-point "^3.0.0" - -slice-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" - integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== - dependencies: - ansi-styles "^4.0.0" - astral-regex "^2.0.0" - is-fullwidth-code-point "^3.0.0" - snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" @@ -6838,11 +6601,6 @@ stream-shift@^1.0.0: resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== -string-argv@0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" - integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== - string-length@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.1.tgz#4a973bf31ef77c4edbceadd6af2611996985f8a1" @@ -6899,15 +6657,6 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -stringify-object@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.3.0.tgz#703065aefca19300d3ce88af4f5b3956d7556629" - integrity sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw== - dependencies: - get-own-enumerable-property-symbols "^3.0.0" - is-obj "^1.0.1" - is-regexp "^1.0.0" - strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" @@ -7055,11 +6804,6 @@ through2@^2.0.0: readable-stream "~2.3.6" xtend "~4.0.1" -through@^2.3.8: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= - timers-browserify@^2.0.4: version "2.0.11" resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.11.tgz#800b1f3eee272e5bc53ee465a04d0e804c31211f" @@ -7562,11 +7306,6 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which-pm-runs@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb" - integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs= - which@^1.2.14, which@^1.2.8, which@^1.2.9, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" @@ -7714,11 +7453,6 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yaml@^1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e" - integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg== - yargs-parser@20.x: version "20.2.3" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.3.tgz#92419ba867b858c868acf8bae9bf74af0dd0ce26"