+
diff --git a/phone/src/apps/contacts/components/styles.contactmodal.ts b/phone/src/apps/contacts/components/styles.contactmodal.ts
new file mode 100644
index 0000000..b208bb9
--- /dev/null
+++ b/phone/src/apps/contacts/components/styles.contactmodal.ts
@@ -0,0 +1,45 @@
+import { makeStyles, Theme } from '@material-ui/core/styles';
+
+const useStyles = makeStyles((theme: Theme) => ({
+ button: {
+ margin: 5,
+ marginTop: 20,
+ },
+ root: {
+ position: 'fixed',
+ bottom: 380,
+ zIndex: 2,
+ background: '#232323',
+ marginLeft: '-4em',
+ height: '20%',
+ },
+ clearButton: {
+ width: '10%',
+ position: 'absolute',
+ right: 0,
+ },
+ textInputField: {
+ fontSize: 20,
+ borderBottomColor: 'red',
+ },
+ addBtn: {
+ margin: 'auto',
+ fontSize: 16,
+ width: 150,
+ background: '#2196f3',
+ marginBottom: 10,
+ padding: 8,
+ },
+ cancelBtn: {
+ margin: 'auto',
+ width: 150,
+ background: '#232323',
+ marginBottom: 20,
+ padding: 8,
+ },
+ icons: {
+ marginRight: 5,
+ },
+}));
+
+export default useStyles;
diff --git a/phone/src/apps/contacts/components/styles.contacts.ts b/phone/src/apps/contacts/components/styles.contacts.ts
new file mode 100644
index 0000000..a7ada28
--- /dev/null
+++ b/phone/src/apps/contacts/components/styles.contacts.ts
@@ -0,0 +1,35 @@
+import { makeStyles, Theme } from '@material-ui/core/styles';
+
+const useStyles = makeStyles((theme: Theme) => ({
+ backgroundModal: {
+ background: 'black',
+ opacity: '0.6',
+ position: 'absolute',
+ top: 0,
+ left: 0,
+ right: 0,
+ bottom: 0,
+ zIndex: 5,
+ },
+ absolute: {
+ position: 'sticky',
+ bottom: theme.spacing(2),
+ left: theme.spacing(3),
+ },
+ // title
+ root: {
+ height: '60px',
+ width: '100%',
+ display: 'flex',
+ flexFlow: 'row nowrap',
+ justifyContent: 'center',
+ alignItems: 'center',
+ background: '#424242',
+ },
+ icon: {
+ color: '#fff',
+ fontSize: 30,
+ },
+}));
+
+export default useStyles;
diff --git a/phone/src/apps/contacts/hooks/state.ts b/phone/src/apps/contacts/hooks/state.ts
index 0c5321b..e8ed8f8 100644
--- a/phone/src/apps/contacts/hooks/state.ts
+++ b/phone/src/apps/contacts/hooks/state.ts
@@ -1,24 +1,28 @@
-import { atom } from "recoil";
+import { atom } from 'recoil';
export const contactsState = {
contacts: atom({
- key: "contactsList",
+ key: 'contactsList',
default: [],
}),
showModal: atom({
- key: "showModal",
+ key: 'showModal',
default: false,
}),
filterContacts: atom({
key: 'filterContacts',
- default: ""
+ default: '',
}),
showContactsModal: atom({
key: 'showContactModal',
- default: false
+ default: false,
}),
contactDetail: atom({
key: 'contactDetail',
- default: null
- })
+ default: null,
+ }),
+ contactAlert: atom({
+ key: 'contactAlert',
+ default: null,
+ }),
};
diff --git a/phone/src/locale/en.json b/phone/src/locale/en.json
index e68f834..7f782aa 100644
--- a/phone/src/locale/en.json
+++ b/phone/src/locale/en.json
@@ -61,6 +61,13 @@
"APPS_MESSAGES_INVALID_PHONE_NUMBER": "Invalid phone number: ",
"APPS_MESSAGES_MESSAGE_GROUP_DUPLICATE": "This message group already exists",
"APPS_MESSAGES_MESSAGE_GROUP_CREATE_FAILED": "Failed to create message group",
- "APPS_MESSAGES_MESSAGE_GROUP_CREATE_MINE": "You cannot add yourself!"
+ "APPS_MESSAGES_MESSAGE_GROUP_CREATE_MINE": "You cannot add yourself!",
+
+ "APPS_CONTACTS_ADD_SUCCESS": "Successfully created contact!",
+ "APPS_CONTACTS_ADD_FAILED": "Failed to created contact!",
+ "APPS_CONTACTS_UPDATE_SUCCESS": "Successfully updated contact!",
+ "APPS_CONTACTS_UPDATE_FAILED": "Failed to update contact!",
+ "APPS_CONTACTS_DELETE_SUCCESS": "Successfully deleted contact!",
+ "APPS_CONTACTS_DELETE_FAILED": "Failed to delete contact!"
}
}
diff --git a/resources/package.json b/resources/package.json
index bd24e17..4873b0e 100644
--- a/resources/package.json
+++ b/resources/package.json
@@ -19,6 +19,7 @@
"@types/node": "^14.11.10",
"axios": "^0.21.0",
"connection-string-parser": "^1.0.3",
+ "esx.js": "^1.1.5",
"fivem-esx-js": "^0.1.12",
"fivem-js": "^1.3.1",
"md5": "^2.3.0",