Author SHA1 Message Date
J Francisco Rader 6b23079d97 Add terminal integration lulz 2021-03-24 15:59:31 -03:00
J Francisco Rader f5b4484c1a Merge branch 'master' into license/change-license 2021-03-24 15:56:45 -03:00
J Francisco Rader 1437234fe2 Add license notice to README and update to real values 2021-03-24 15:55:45 -03:00
Dillon Skaggs b789e73447 fix(readme): fix typo (#180)
auguest kek
2021-03-24 14:24:03 -04:00
Taso 6c2eae7f5d fix(phone/settings): Fixed localStorage persistence 2021-03-22 19:14:53 -04:00
J Francisco Rader a3d7c19f44 Tweaks / Message notifications (#174)
* Remove msg notifications when opening one | Dont alert notifications when inside that conversation

* Fix msg events

* Fix goToConversation util

* Fix nuiEvents for messages
2021-03-22 18:57:20 -03:00
J Francisco Rader 02608e937e Changed to only GPL instead of AGPL to avoid server restrictions 2021-03-22 18:56:51 -03:00
Christopher b42ee97450 feat(resources/cl_utils): NuiCallback 2021-03-22 22:45:47 +01:00
Taso 4e7e6b3e92 fix(client/marketplace): Fixed typo preventing listings from being sent 2021-03-22 14:44:34 -04:00
J Francisco Rader 74c1657fd7 Change license to AGPL which is much widely use than the current one, and ensures that modifications preserve the open source and freedom philosophy. Also prevents any server-side integration to use incompatible licenses which dont follow open source and freedom ideals 2021-03-22 15:26:51 -03:00
Taso 0f61088999 refactor(events): Events are now tied to a common enum typings (#167)
* chore(scripts/twitter): Refactored twitter to use event enums

* chore(scripts/marketplace): Refactored marketplace to use event enums

* chore(scripts/messages): Refactored messages to use event enums

* chore(scripts/contacts): Refactored contacts to use event enums

* chore(scripts/calls): Refactored calls to use event enums

* chore(scripts/notes): Refactored notes to use event enums

* chore(scripts/photos): Refactored photos to use event enums

* chore(scripts/bank): Refactored bank to use event enums

* chore(scripts/phone): Refactored phone to use event enums

* chore(events): Removed old events object

* refactor(phone/nui-events): Attached NUI events to respective enum

* tweak(event-enums): Added npwd prefix to all events

* tweak(phone/serve): Added craco to override CRA without eject

Also bumped react-scripts to 4.0.1, with seemingly no issues

* fix(typings/twitter): Fixed method enums for twitter
2021-03-22 13:37:07 -04:00
Erik 53d5bb459d Merge pull request #170 from project-error/feature/default-profile-names
Feature/default profile names
2021-03-22 10:40:22 -04:00
Kire fe1e685f6f fix(phone/twitter): Fix crash on broadcast with no profile set 2021-03-22 10:37:56 -04:00
Kire c8f680fdfb update for PR feedback 2021-03-22 10:37:10 -04:00
Kire f3f055944c handle twitter profile updating 2021-03-22 10:37:10 -04:00
Kire 21a2f8912d initial PR review changes 2021-03-22 10:37:10 -04:00
Kire 97f5c99cc0 handle all configuration cases 2021-03-22 10:37:10 -04:00
Kire 8000cc3d3f added UI for choosing a default profile name 2021-03-22 10:37:10 -04:00
Christopher 9261025b4f fix typo = 2021-03-22 10:58:54 +01:00
Erik a52ffc4e79 Feature/twitter refresh (#160)
* receive and process broadcasted tweets to the clients

* removing profile fetch and cleaning up unused functions

* defend against null profile

* move defenseive check to top pof notifications

* fix bug where delete was visible for non owners

* remove polling implementation
2021-03-20 18:17:14 -04:00
Taso 2a4457b323 feat(phone/settings): Schema validation & Reset Settings
You can now reset your settings to default using the action in the Settings App

Setting schema validation has been added that will temporarily reset to default settings if
the JSON string contains unexpected values. A alert will pop up informing the user
that they should reset to default settings using the action in the settings app,
as a permanent solution.
2021-03-20 12:57:22 -04:00
J Francisco Rader 97c308f550 Add useNuiEventCallback hook (#173)
* Add useNuiEventCallback hook
2021-03-19 11:54:26 -03:00
Christopher Gjelten 769f5a3d21 Merge pull request #169 from project-error/tweak/dialer
tweak(dialer): Several fixes and improvements
2021-03-19 12:08:16 +01:00
Christopher 73f057b55b dont call if no value 2021-03-19 10:01:25 +01:00
J Francisco Rader 0ec2b682e7 Messages bugfix again :D (#164)
* Handle offline messages | Fetch messages when broadcasted | Fetch message groups

* Fetch messages on notification click

* Dont fetch groups if duplicate group

* Only submit new message on click submit

* Fix infinite loading when duplicated group is creatded

* Fix infinite loading when group already existed

* Make code prettier

* Centralize fetch messages on goToConversation

* Remove duplicated event

* Improve message groups mapping to include yourself for unreadCount + Fix redirection after adding contact + General improvements

* Remove conflicts

* Fix media paths
2021-03-18 23:01:54 -03:00
Taso a2c0f94bd8 fix(whoops): Forgot to remove the string-parser change from last commit 2021-03-17 20:27:25 -04:00
Taso e8d28359a9 chore(server): Bumped deps & tweaked build
We are now ignoring the Cardinal and parse-connection-string warnings
that used to pop up after build.

Deps were bumped using standard `yarn upgrade`
2021-03-17 20:11:37 -04:00
Taso 67b557b7c3 fix(phone/sourcemaps): Add .map to client files 2021-03-17 17:36:45 -04:00
Taso 4b29cbbce3 fix(phone/home): Fixed incorrect props for Grid item 2021-03-17 13:59:53 -04:00
Taso 06137d77ad fix(phone/notifications): Fixed error when setting for app is not defined 2021-03-17 13:55:45 -04:00
Taso 279778e4f3 tweak(phone/webpack): Generate source maps 2021-03-17 11:18:37 -04:00
Taso f1f6a05981 tweak(dialer): Several fixes and improvements
Time has been changed to a relative format. Locale specifics are pending
merge of #168.

Several typos have been fixed where "DAILER" was referenced instead of
"DIALER"

A translation key was added for when a user has no call history.

The input box has been unlocked so users can use their keyboard directly
rather than using the dial pad.
2021-03-17 10:26:52 -04:00
Taso a6e8c769c0 feat(locale): Added a locale setting in Settings app
This removes the need to rebuild the phone in order to change language
2021-03-17 10:24:28 -04:00
Bombay 5c6538b340 Fix : Typo (#171) 2021-03-17 06:37:48 -04:00
Taso 1ecdb7a4a8 fix(locales): Fixed Bosnian Alpha-2 code 2021-03-16 21:14:52 -04:00
Taso d5d483eee8 tweak(phone/settings): Enabled copy and paste for number 2021-03-16 17:56:40 -04:00
Taso ef30daeb65 fix(phone/twitter): Altered transform on ShowMore
I wasn't sure what the comment was referring to, but changed this to a
standard top offset, and it fixed a issue with the transform being
screwed up between tweets.
2021-03-16 17:45:54 -04:00
Taso 19e228894d tweak(phone/settings): Added streamer mode desc 2021-03-16 17:31:41 -04:00
Taso a244183976 fix(server/types): Fixed type on Tweet create sql resp 2021-03-16 16:24:27 -04:00
Taso e01057d818 refactor(server/tweets): Slight tweaks to twitter handling on server 2021-03-16 16:24:27 -04:00
Taso 9ffca0d14e chore(server/messages): Type create message response 2021-03-16 16:24:27 -04:00
Taso 1a9c21f89d fix/cleanup(server/twitter): Fix for fetch after tweet & gen cleanup 2021-03-16 16:24:27 -04:00
Taso 3031e650e3 cleanup(server/marketplace): General cleanup of marketplace
Tweaked SQL tables to reference 'marketplace' and not 'sellout'

Removed if/else in favor of if/return
2021-03-16 16:24:27 -04:00
Taso 23ef9b8cd6 chore(server/photo): Added try/catch to missing sql query 2021-03-16 16:24:27 -04:00
Taso 598bcd2eb3 chore(server/notes): Removed redundant pSource call 2021-03-16 16:24:27 -04:00
Taso 78961b788f tweak(server/messages): General cleanup changes and added missing docs
I personally don't like if else chains, so changed to if checks
2021-03-16 16:24:27 -04:00
Taso adf9758d9f tweak(server/calls): Tweaked call handling
Added Sanity checks

Switched timestamp creation to server
2021-03-16 16:24:27 -04:00
Christopher Gjelten bc8a89d825 Update discord.ts 2021-03-16 16:55:11 +01:00
Taso ff0e75d82b fix(phone/bank): Fixed transactionList 2021-03-15 12:06:39 -04:00
Christopher 458839488e tweak(resources): use 'custom appMessageEvent' 2021-03-15 10:53:02 +01:00
Christopher 5c9f36f754 feat(resource): messageEvent for each app 2021-03-15 10:52:11 +01:00
Christopher 4045acc162 yet again, we fuck off with typings 2021-03-15 10:22:12 +01:00
Christopher 9d2aeddd4b clean up bank hook 2021-03-15 10:13:25 +01:00
Taso f0c5e5101e chore(typings): Moved common typings to root dir 2021-03-14 15:19:30 -04:00
Taso 378830245d chore(server/players): Removed unused imports & misc debug logs 2021-03-14 15:07:04 -04:00
Christopher Gjelten b9fc51e61d Merge pull request #166 from EverlastRP/master
replaced all imgur images to iodine images :)
2021-03-14 00:21:42 +01:00
Hamy 7f7c54e0b5 replaced all imgur images to iodine images :)
dont mind the 347 changed files its cause i drag and dropped 👽
2021-03-13 15:07:09 +03:00
Christopher b9fbc067c6 feat(resources/call): check if receiver of call is online 2021-03-11 22:21:53 +01:00
J Francisco Rader 75a4eb176e Feature / Streamer Mode (#159)
* feat(phone/settings): Add streamer mode setting and PictureReveal component :)

* feat(phone/settings): Add PictureReveal streamer mode to twitter and improve its theme a bit
2021-03-11 16:00:04 -05:00
Christopher Gjelten d841ee0958 Merge pull request #161 from project-error/fix/message-issues
Fix checking if contact exist
2021-03-11 15:09:00 +01:00
dependabot[bot] 3ec6e5a6ae chore(deps): bump elliptic from 6.5.3 to 6.5.4 in /resources
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4)

Signed-off-by: dependabot[bot] <[email protected]>
2021-03-11 03:08:33 -05:00
Taso b8ef6b1695 Merge pull request #155 from project-error/tweak/remove-esx-code
feat(standalone): Allows for the phone to be free from framework requirements
2021-03-10 21:50:55 -05:00
Taso 08e477f360 tweak(server/players): Commented getPlayers command for debug 2021-03-10 21:49:10 -05:00
Taso 044f5ba39c chore(server/players): Unused import cleanup 2021-03-10 21:44:00 -05:00
Taso 7fd02913da Revert "tweak(server/player): Added regex replace to getIdentifierByPhoneNumber"
Reverted as to ensure current compatibility with messages app, messages
should be altered to deal with this in the future.

This reverts commit 258ea66746.
2021-03-10 21:27:21 -05:00
Taso b0e5458504 refactor(server/discord): Refactored Discord reports to use webhooks (#158) 2021-03-10 21:10:34 -05:00
Taso c6bdf4b331 fix(sellout/report): Fixed sellout discord reports 2021-03-10 21:04:59 -05:00
SynTer ea5b034fbe locale(pt-br): Additional keys (#163) 2021-03-10 18:24:19 -05:00
Taso 1801255c04 fix(server/players): Fixed public name setters 2021-03-10 17:21:36 -05:00
Taso 6dd57beae5 fix(server/players): Fixed getIdentifierFromPhoneNumber 2021-03-10 22:18:27 +00:00
Christopher dfc4f49b58 remove log 2021-03-10 22:47:58 +01:00
Taso e20e39728a tweak(server/player): Debug tools 2021-03-10 16:44:32 -05:00
Christopher 4c8902f16a remove unused token
no this is not valid anymore
2021-03-10 20:51:29 +01:00
J Francisco Rader c066e1a464 Add unread count from actual participant 2021-03-10 13:27:11 -05:00
Taso 258ea66746 tweak(server/player): Added regex replace to getIdentifierByPhoneNumber
Added a regex replace to match the old signature for this function. Also
migrated messages to use the new util function rather than a locally
defined query
2021-03-08 20:35:25 -05:00
Taso 6e9c3e6d1a enhance(server/player): Several enhancements
Attach a readonly username property to Player class

Implement setters/getters for Player class to ensure future
compatibility for servers who implement a character switching system

Attach a fetch argument to getIdentifierByPhoneNumber that will force a
DB query if player is not online
2021-03-08 20:18:20 -05:00
Taso e5fac800ee refactor(server/player): Added player management system internally
This system stores loaded players in maps handled entirely by NPWD.

This should entirely remove the ESX dependency on practically everything.
2021-03-08 18:43:21 -05:00
Christopher de53b12763 feat(resources): set number as keytype for Players map 2021-03-08 22:53:00 +01:00
Taso 7d233a9efa tweak(sql): Added default twitter avatar to import.sql 2021-03-08 16:22:19 -05:00
Christopher 7e9ad952cf fix(resources/notes): resolve fetch on deletion 2021-03-08 20:13:34 +01:00
Christopher ebe75dba1f fix(phone/call): resolve showing transmitter number for transmitter 2021-03-08 19:56:29 +01:00
Christopher 1d25c02083 fix(phone/messages): resolve issue around checking if contact exsist 2021-03-08 18:58:19 +01:00
Christopher Gjelten ba06dd367e Update README.md 2021-03-08 16:55:32 +01:00
Oldarorn d4232d778e Added missing french translations (#156)
New fresh baguette translation !
2021-03-08 16:03:21 +01:00
Christopher dddb99afb3 feat(translation): norwegian translation 2021-03-07 22:16:08 +01:00
Christopher 425c09edc9 update tsconfig 2021-03-07 21:29:16 +01:00
Christopher a424a67f05 tweak(resources/main): getPlayerIdentifirs use 2021-03-07 20:39:55 +01:00
Taso 8116dd074d tweak(ci): Small tweaks to job names 2021-03-07 13:19:57 -05:00
Christopher 5d456d18c1 change to playerJoining event 2021-03-07 18:59:01 +01:00
Christopher c99d0780ae feat(resources): remove all esx code, almost 2021-03-07 18:26:28 +01:00
Christopher Gjelten 6b6080c4b2 Tweak/marketplace additions (#137)
Checks for being the OP of the listing. Calling, Message, Delete and Report. 

Updates to Locale is needed.
2021-03-07 16:30:58 +01:00
Erik 0203ebbe51 Feature/Twitter Notification Filters (#147)
Feature: Twitter notification update
2021-03-07 16:25:10 +01:00
Erik 21152fa38a [Feature] Twitter retweets (#143)
Feature: Retweets
2021-03-07 16:03:33 +01:00
J Francisco Rader 1a09fa57ae Fix: Workaround for ESX errors pertaining to player loading (#153)
* Set phone ready before sending any init events + Show initializing phone message if not ready yet

* Send phone ready to nui
2021-03-06 19:25:32 -05:00
Taso 6e72e2c50e fix(phone/snackbar): Fixed animations & simplified logic (#146) 2021-03-06 17:32:01 -05:00
J Francisco Rader e56ae415dc Feat / Reusable SearchField + Fixed Messages align bottom flex with scroll (first message starts at bottom) (#151)
* feat(phone/ui): Make SearchField a reusable component

* Fixed conversation scrolling and align bottom

* feat(phone/ui): Autoscroll fix

* feat(phone/ui): Autoscroll fix remove unused deps

* feat(phone/ui): Autoscroll add needed dep for new messages
2021-03-06 16:53:48 -05:00
Hamy 1659fa1654 updated bh.json to be the correct lang code and translation (#150) 2021-03-06 12:33:40 -05:00
Christopher Gjelten 73355e7209 Update README.md 2021-03-06 17:40:11 +01:00
Christopher Gjelten c144fd3dd6 Update README.md 2021-03-06 17:39:46 +01:00
Christopher Gjelten f94dc7fb0b Update README.md 2021-03-06 17:38:08 +01:00
Christopher Gjelten ce93213238 Update README.md 2021-03-06 17:36:05 +01:00
Taso 605f957f9a feat(client/debug): Phone restart command (#145)
Trigger a UI restart by entering the command `phone:restart` in the F8 console.
2021-03-06 10:38:10 -05:00
J Francisco Rader 531a341ffd fix(messages): Sliding phone up and down when mesages apps is open is fixed now (#148) 2021-03-06 03:22:17 -05:00
J Francisco Rader 08d2de2dc7 tweak(phone/messages): Improve transition to MessageModal (conversation) (#140) 2021-03-06 02:10:13 -05:00
J Francisco Rader 0c602f1767 Bugfix / Fix message bubble, notifications slideup phone and overflow and conversation scrolling (#144)
* Fix overflow on message bubbles

* Fix messages scrolling

* fix(phone/messages): Fix notification slide when in messages app
2021-03-05 22:07:51 -05:00
Taso f4834b78c8 tweak(phone/sound): Removed howl instance console log on ready 2021-03-05 18:05:18 -05:00
Taso b303e648df tweak(phone/debug): Set default data property for mockNuiEvent 2021-03-05 17:09:09 -05:00
J Francisco Rader bdbf342270 fix(phone/messages): fixed autocomplete getting bricked (#138) 2021-03-05 16:11:50 -05:00
Taso 6419245d93 Revert "feat(phone/settings): Add localStorage settings schema validation (#139)"
This reverts commit cb5a00e57e.
Reverted due a non-descript bug in CEF. Will be reapplied after fix.
2021-03-05 12:38:22 -05:00
Taso da5694863a tweak(sql): Moved import.sql to resource root 2021-03-05 11:45:11 -05:00
J Francisco Rader cb5a00e57e feat(phone/settings): Add localStorage settings schema validation (#139)
Will reset to default settings if the schema is invalid.
2021-03-05 11:18:36 -05:00
Taso 60431d2de7 tweak(phone/settings): Altered localStorage key 2021-03-05 10:31:37 -05:00
Taso 5c9c75c36c tweak(phone/snackbar-provider): Altered API to expect a string for message, not a key (#135)
Change SnackbarProviderAlert message property to allow for any string rather than a explicit translation key
2021-03-04 22:40:17 -05:00
9abac70427 feat/messages additions (in memory of Leonard Nimoy) (#118)
* feat(resouces/messages): broadcast messagse to participants

* feat(phone/messages): notifications for messages

* remove weird empty onNet

* reformat?

* last reformat! This pr will be squashed

* tweak(phone/messages): send groupName to notification alert

* fix identifer

* fixing notification groupName

* resbasee...i think

* feat(messages): check for unread messages

* send nui event is count > 0

* remove usless test

* import.sql update

* Refactor NotificationsProvider and fix messages notifications

* Send groupId on message broadcast

* Update phone/src/apps/messages/components/modal/Conversation.tsx

* Update phone/src/apps/messages/hooks/useMessageNotifications.ts

* Update phone/src/os/notifications/providers/NotificationsProvider.tsx

* Update phone/src/common/typings/messages.ts

* Update phone/src/apps/messages/hooks/useMessageNotifications.ts

* clean sql file

* Update resources/server/sv_messages.ts

* Fetch message groups when other person created for you

* fix sql

* Select unreadCount from messageGroups

* whatever husky again

* Add members menu and add contact in messages

* Add from group bubbles

* Fix messages scroll with new msg

* Message image menu flicker + justify bottom messages

* Improve debugging

* Add container to Slider

* Improve logger

* Fix create message

* add creator identifier to group hash

* Fix dafuq i broke

* group_id bigger varchar in column

* group_id bigger varchar in column

* Phone visibility default browser

* Add debugging

Co-authored-by: J Francisco Rader <[email protected]>
Co-authored-by: J Francisco Rader <[email protected]>
2021-03-04 18:35:33 -05:00
Taso 42d3d573cb tweak(phone/sentry): Only enable in prod 2021-03-04 17:24:14 -05:00
Taso b2e3698936 fix(phone/settings): Fixed incorrect setting ref for localStore 2021-03-04 11:33:25 -05:00
Taso eae06b2dc6 tweak(phone/settings): Added a SettingItemIconAction component
Currently used for phone number
2021-03-04 11:33:25 -05:00
Taso 140a28bef7 tweak(phone/default-settings): Set default twitter noti volume to 50% 2021-03-04 11:33:25 -05:00
Taso 58868f3644 fix(phone/context-menu): Fixed issue where backdrop was fixed height 2021-03-04 11:33:25 -05:00
Taso 924d17c2f6 tweak(phone/context-menu): Lock scroll when context menu is open 2021-03-04 11:33:25 -05:00
Taso 64c4e0ec16 enhance(phone/settings): Added labels to settings and misc cleanup
This change alters the default localStorage schema, please clear your localStorage cache for testing
2021-03-04 11:33:25 -05:00
dependabot[bot] 5969d33dc3 chore(deps): bump axios from 0.21.0 to 0.21.1 in /resources (#136)
Bumps [axios](https://github.com/axios/axios) from 0.21.0 to 0.21.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.21.0...v0.21.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-03 22:54:05 -05:00
Taso 41b50d6429 tweak(phone/utils): Moved isImageValid util to common dir 2021-03-03 22:19:59 -05:00
Taso 18c1676c01 tweak(phone/utils): Refactored image validation to promise from cb 2021-03-03 22:19:59 -05:00
Taso e330b89889 tweak(phone/debug): Restricted global mockNuiEvent to dev env
Probably a good idea so we don't forget
2021-03-03 22:04:20 -05:00
Taso b6352ccf82 feat(phone/debug): Added a global window dispatch method
See JSDocs for usage details.
2021-03-03 21:48:45 -05:00
Christopher Gjelten 622a931ace Merge pull request #130 from project-error/bugfix/messages-overlaps-input
Bugfix / Touch height to fix messages overlapping input
2021-03-03 22:44:32 +01:00
SynTer ec053dd883 locale(pt-br): Updated missing keys 2021-03-02 21:15:05 -05:00
J Francisco Rader 2ba6de3a71 Touch height to fix messages overlapping input 2021-03-02 19:01:00 -05:00
Christopher Gjelten cf9c26428c Merge pull request #129 from project-error/bug/yarn-run-watch 2021-03-03 00:52:06 +01:00
Kire 55e909a103 added wild card for JS files in resources folder 2021-03-02 18:44:36 -05:00
Christopher 6f4ee009a9 printWidth: 100 2021-03-02 21:03:06 +01:00
Christopher d27aeb3b0e 120 in printWidth since rocky got md 2021-03-02 20:56:15 +01:00
Christopher f552c1212c more formatting 2021-03-02 20:45:41 +01:00
Christopher 046447b0fb mad formatting 2021-03-02 20:41:25 +01:00
Christopher 6777498bcc pretty quick 2021-03-02 20:38:29 +01:00
Christopher ebb3c5e06c fixed husky?? 2021-03-02 20:35:58 +01:00
Christopher aa54bdd887 fixed husky 2021-03-02 20:34:36 +01:00
Christopher cc6d587f5e fixed husky 2021-03-02 20:33:29 +01:00
Christopher 9584d2864e fixed husky 2021-03-02 20:33:09 +01:00
Christopher 91cbb8356f husky works now 2021-03-02 20:30:08 +01:00
Christopher 56f937c945 pre commit on husky 2021-03-02 20:28:10 +01:00
Christopher 1c39a48c30 fuck husky 2021-03-02 20:26:25 +01:00
Christopher 80132e48d7 more cleanup 2021-03-02 20:13:13 +01:00
Christopher bf06c1ed3f feat(resources/marketplace): more cleanup 2021-03-02 20:05:11 +01:00
Christopher 9f5d5e50a8 Merge branch 'master' of https://github.com/project-error/new-phone-who-dis 2021-03-02 19:56:46 +01:00
Christopher 864a6c2402 feat(resources/marketplace): added typings server side 2021-03-02 19:56:41 +01:00
Taso 52992b7d10 chore(client): Removed unused variables 2021-03-02 13:54:32 -05:00
Christopher aa7919b988 feat(resources/marketplace): added typings client side 2021-03-02 19:54:03 +01:00
Taso 95866cc51c tweak(server/logging): Added try catch and logging to calls fetch 2021-03-02 13:42:37 -05:00
J Francisco Rader e037a9b0f8 Play/Stop sound after interrupt 2021-03-02 09:31:25 -05:00
J Francisco Rader c37f6a66b4 Safely handle sound settings 2021-03-02 09:27:49 -05:00
Christopher Gjelten ba69ff4b8d Merge pull request #125 from project-error/tweak/snackbar-provider
tweak(phone/snackbarprovider): remove redunant function
2021-03-02 12:37:51 +01:00
J Francisco Rader a579d7bb8d Tweak/use sound mount before its ready to play (#128)
* Make useSound use soundProvider and be sure its mounted!

* Remove console.log
2021-03-01 22:13:44 -05:00
J Francisco Rader e9e22ce9bc Remove comma from hell and improve useRingtoneSound (#127) 2021-03-01 17:29:54 -05:00
J Francisco Rader 4eda44b9c2 Add calling and notification sounds (#119)
* Add calling and notification sounds

* Fix notification visibility on any resolution

* Add comments

* Log howler error src

* Revert removed files im stupid

* Make sliders on settings use changeCommitted instead of onChange

* Fix ringtone paths

* Break alert words overflow

* Fix tweet overflow pepega

* Remove unused hook

* Update volume sliders in real time

* Fix resolution notifications

* Fix initial value for vol sliders

* Fix call duration timer bugs

* Add alert when phone active and phone closes

* keep notification

* Stop ringing when accept
2021-03-01 17:22:58 -05:00
RockySouthpaw 8ecb91e71f Fix: Animation being triggered if the phone isn't open. 2021-03-01 17:05:05 -05:00
Christopher 8bca955ad7 update delay 2021-03-01 20:01:16 +01:00
Christopher 2a9f475cdc tweak(phone/snackbarprovider): remove redunant function 2021-03-01 19:42:48 +01:00
Oldarorn f58c30b0d9 Added missing translations (#123)
Because it was asked to us ! 

All the english keys are now translated into baguette language + fix typo
2021-03-01 13:05:59 -05:00
J Francisco Rader 52c4009dc9 Fix alerts blocking mouse (#124) 2021-03-01 13:05:09 -05:00
Bombay f866c6de47 Created locales' base for notifications + sound (#121)
* Added missing locales

* Change places for readability

* Typo

* Moved APPS_CONTACT closer to its related locale

* Update en.json

* + Space

* + Space

* bh.json base

Added a base for the language. It's no longer missing translations but some of them are in English

* tr.json base

TR locale base (relocate + added missing locales in English while keeping old ones)

* sv.json base

Base for sv. Same as the ones before.

* ptbr.json base

Same as before

* pt.json base

* Update fr.json

* fr.json base

* Added sound locale

* Added sound locale

* Update es.json

* Update fr.json

* Update pt.json

* Update ptbr.json

* Update sv.json

* Update tr.json
2021-03-01 12:49:40 -05:00
Christopher Gjelten 74967eeb26 Merge pull request #122 from project-error/feature/missing-lang-keys-script
Add script for getting missing keys
2021-03-01 18:46:05 +01:00
J Francisco Rader 12ed0bd46d Fix alerts position 2021-03-01 12:37:13 -05:00
J Francisco Rader 83a093e36b Add script for getting missing keys 2021-03-01 11:18:39 -05:00
RockySouthpaw 8587f6be73 Fix message error (#120) 2021-02-28 18:26:37 -05:00
Christopher 39d66d0ce7 quick fix for PhoneContainer 2021-02-28 17:40:15 +01:00
Christopher Gjelten a5a04cdef7 Merge pull request #110 from project-error/feat/alerts-for-apps
Feat/alerts for apps (in memory of daft punk)
2021-02-28 17:25:56 +01:00
Christopher Gjelten 51f9b20857 Merge branch 'master' into feat/alerts-for-apps 2021-02-28 02:00:34 +01:00
Christopher 4d82c8e69a feat(phone/messages): minor changes for nui 2021-02-28 01:39:26 +01:00
Christopher 09d397b6cf feat(resources/messages): server and client functionality for alerts 2021-02-28 01:37:22 +01:00
Christopher ec913fbef4 remove(phone/messages): remove alerts components 2021-02-28 01:35:02 +01:00
Christopher 1c81bfa7f2 fix(camera): resolve issue for deleting images 2021-02-28 00:05:07 +01:00
Christopher Gjelten ee7e544b23 Fix: typo in dialerHistory? 2021-02-27 21:23:29 +01:00
J Francisco Rader 9cfc3fa8ec Remove dependency comments and use useRef instead for useSound hook (#117)
* Remove dependency comments and use useRef instead for useSound hook

* Handle change URL volume and loop gracefully
2021-02-27 15:10:59 -05:00
RockySouthpaw 54bdd07e9c Fix/number generating (#114)
* Fix number not generating on player join.

* Update import.sql

* Check for existing number

Kidz pretty much did this kek

* Added error catch to esx:playerLoaded
2021-02-27 14:14:49 -05:00
J Francisco RaderandChristopher 41674968ab Notification alert stays on if it is an incoming call and phone is closed (#115)
* Phone now shows all the time slide a bit if incoming call exists | can close alerts!

* Improve animation

* Improve call controls

* Make alerts not overflow | Call modal is navigable out :)

* Open modal when accepting call

* Cant navigate back from homepage

* Avoid call route if no call active + rename things

* Impprove main apps icons sizes

* hover effect to app icons :)

* Revert interface change

* fix(phone/dialer): resolve not calling when adding contacts

Co-authored-by: Christopher <[email protected]>
2021-02-26 21:45:01 -05:00
Christopher 796548d9d5 remove more unused variables :( 2021-02-26 19:52:36 +01:00
Christopher f0305e3bb2 remove(phone/bank): remove unused hooks 2021-02-26 14:07:23 +01:00
Christopher 47218e63f5 feat(phone|resources/bank): useSnackbar for alert 2021-02-26 12:48:27 +01:00
Christopher 1afca13862 feat(phone/bank): remove alert component 2021-02-26 12:10:47 +01:00
Christopher cea0bd653b fix(phone): remove unused variables 2021-02-26 12:08:04 +01:00
Christopher a9ba633241 tweak(phone): remove bank & twitter notification components 2021-02-26 12:00:46 +01:00
RockySouthpaw d2461bab16 Sort contacts alphabetically (#116)
Does it for contacts app and phone app.
2021-02-23 22:13:36 -05:00
Christopher d4fbdc8e0c feat(phone/dialer): add contacts from dialer history 2021-02-23 23:19:29 +01:00
J Francisco Rader 51fb261e8a Fix phone stuck after calling (#113) 2021-02-23 15:46:52 -05:00
J Francisco Rader f6d7a3dbe1 Feature/floating notifications calling and twitter (#112)
* Add floating notifications :O

* Add phone notifications and refactor calling ui

* This is unsafe

* Fix controls null check

* Remove go to alert

* Fix phone stuck after call

* Remove lazy mount for Phone

* Fix open/close cl_main

* Use effect for notification visibility

* Remove all alerts when phone closes

* Avoid re-render useNuiEvent

* It works now :c
2021-02-23 13:19:10 -05:00
Christopher Gjelten 4633146d40 Merge pull request #109 from project-error/feature/notes-app-theme-provider
Feature / Notes and Dialer theme providers
2021-02-22 23:21:06 +01:00
Christopher Gjelten fef876d9a6 Merge branch 'master' into feat/alerts-for-apps 2021-02-22 21:58:19 +01:00
J Francisco Rader bf814041d7 Remove hardcoded dialer colors 2021-02-21 19:41:59 -05:00
J Francisco Rader 65c71f9cb6 Fix StatusButton shadows 2021-02-21 19:36:03 -05:00
J Francisco Rader 3171052963 Add contacts referal after creating from dialer 2021-02-21 19:34:36 -05:00
J Francisco Rader 1650929eed Make see contacts list after saving new contact 2021-02-21 19:27:56 -05:00
J Francisco Rader ada49700e5 Add dialer app theme | Add new contact button from dialer after you type number 2021-02-21 19:24:38 -05:00
J Francisco Rader 2c6358e4c3 Add status button | Revert white icons 2021-02-21 18:13:08 -05:00
Christopher d71f69f3eb Merge branch 'master' of https://github.com/project-error/new-phone-who-dis 2021-02-21 21:31:04 +01:00
Christopher e18c39169e del(client): remove ESX on client runtime 2021-02-21 21:30:55 +01:00
RockySouthpaw c1f3ff59ed Update read me to reflect docs. (#108) 2021-02-21 14:56:39 -05:00
J Francisco Rader bf7d94b33d Fix alerts overflow and improve message-bubble style 2021-02-21 13:03:19 -05:00
J Francisco Rader 9f04ac3243 Add theme provider for notes 2021-02-21 12:49:09 -05:00
J Francisco Rader 4acb214ec9 Task/improve hardcoded styles and types (#107)
* Add working notifications with only twitter for now

* feat(notification-bar): I didnt copy from NP

* feat(notifications): Collapse when no more notifications after closing one

* Improve overall messages styling code

* Improve Routing performance

* improve use keyboard hook

* Remove unused returns

* Button hover color :)

* Button hover color :) x2

* Added hover style to containedPrimary msg btn

* Replace custom components for custom theme providers for Messages and Contacts apps

* Improve createAppThemeProvider

* Improve createAppThemeProvider

* Final housekeeping for messages styles

* Change placeholder to label in Contacts app text fields

* Fix alerts style with navigation and fix calc copy alerrt

* Split Phone code for snackbar

* Add more options and style Context Menu

* Enable Sellout theme provider and make it work with light themes
2021-02-21 12:41:25 -05:00
Christopher 767402a6b2 feat(alerts): useSnackbar for twitter 2021-02-21 17:29:06 +01:00
Christopher 7d7c893800 Merge branch 'feat/alerts-for-apps' of https://github.com/project-error/new-phone-who-dis into feat/alerts-for-apps 2021-02-19 21:19:32 +01:00
Christopher e14bb5701a feat(Twitter): Remove success on create | useSnackbar 2021-02-19 21:19:00 +01:00
Christopher 5244ff3a57 feat(Marketplace): minor alerts 2021-02-19 18:26:53 +01:00
Christopher 283832f17e feat(Alerts): alerts for contacts 2021-02-19 18:26:52 +01:00
J Francisco Rader 75e23b783c default browser visibility == true 2021-02-19 11:14:15 -05:00
J Francisco Rader 630661b784 Fix visibility 2021-02-19 11:14:00 -05:00
J Francisco Rader ff177d65d1 Remove unused files 2021-02-19 11:03:10 -05:00
J Francisco Rader a686ae2bfc Fix import 2021-02-19 11:00:54 -05:00
J Francisco Rader 0e43851d81 I make phone break 2021-02-19 10:51:54 -05:00
Christopher 6d2961ac71 feat(Marketplace): minor alerts 2021-02-19 16:19:55 +01:00
J Francisco Rader 40ec19a349 Feature / Add working notifications with only twitter for now (#102)
* Add working notifications with only twitter for now

* feat(notification-bar): I didnt copy from NP

* Make default browser visibility true

* feat(notifications): Collapse when no more notifications after closing one
2021-02-18 19:21:07 -05:00
Christopher 9846a4e1ae feat(Alerts): alerts for contacts 2021-02-18 23:20:24 +01:00
Bombay 11af8bfb5a New phone background (#106)
Added project error wallpaper and adjusted default wallpaper.
2021-02-18 16:12:25 -05:00
Christopher 9ebc433ac9 fix(resources/core): possible fix for generating numbers
A weird 'bug' that caused phone numbers not being generated. Hopefully changing this to the event 'playerConnecting' will fix this
2021-02-18 21:32:25 +01:00
RockySouthpawandTaso 3a572cbc7b feat(client/anim): Added animation flow for calls (#104)
Co-authored-by: Taso <[email protected]>
2021-02-18 12:39:30 -05:00
Christopher Gjelten d6d2bed335 Merge pull request #101 from project-error/feature/autocomplete-contacts
Feature / Autocomplete contacts in messages + improve messages ui a bit
2021-02-17 22:02:04 +01:00
J Francisco Rader 88f1ecbd6b Fix(server/sql): resolved issue with explicit collations (#99) 2021-02-17 14:46:30 -05:00
Taso 187e534e08 chore(dependencies): Cleaned up dependencies/package.json 2021-02-17 14:43:12 -05:00
Christopher a3fa095f9f fix(phone/messages): fix posiston for Fab 2021-02-17 20:15:14 +01:00
Christopher f765f35b8c Merge branch 'feature/autocomplete-contacts' of https://github.com/project-error/new-phone-who-dis into feature/autocomplete-contacts 2021-02-17 18:37:03 +01:00
Christopher db5ef05687 tweak(resources/main): fetch contacts on initalize 2021-02-17 18:36:48 +01:00
J Francisco Rader 3a093230a5 Improve msg styles 2021-02-17 12:36:07 -05:00
Christopher Gjelten 13cd6b6f97 Merge pull request #100 from project-error/RockySouthpaw-patch-1
Fix: Call history is now sorted.
2021-02-17 16:50:09 +01:00
Christopher 1e88ca4242 not reverted, but reverted 2021-02-17 16:46:58 +01:00
Christopher a651eb9242 fix(phone/twitter): resolve isValidMessage issue
This only returned false. This commit is a temporary fix, as we need to check if there is any whitepace no matter if there is text or not
2021-02-17 16:45:10 +01:00
J Francisco Rader cf4baafb19 Autocomplete contacts + improve messages ui a bit 2021-02-17 01:23:08 -05:00
RockySouthpaw 6be68c8e9f Fix: Call history is now sorted.
Call history Is now ordered by ID so recent calls show up first instead of last. Previously it was just at the bottom.

(Courtesy of Chip)
2021-02-16 20:57:09 -05:00
Christopher b5a4c518d5 Merge branch 'master' of https://github.com/project-error/new-phone-who-dis 2021-02-17 00:09:24 +01:00
Christopher 7432e85a9a fix(resources/client/photos): fix toggle 2021-02-17 00:05:59 +01:00
Taso 17f5fb62d9 fix(client/photos): Fixes #98 2021-02-16 17:52:57 -05:00
Christopher Gjelten 6f0a2ba30d Merge pull request #92 from project-error/feature/message-from-contacts
Feature/message from contacts
2021-02-16 23:47:44 +01:00
Christopher Gjelten cd5131ef57 Merge branch 'master' into feature/message-from-contacts 2021-02-16 23:46:43 +01:00
Christopher Gjelten 2f2a92a673 Merge pull request #93 from project-error/enhance/source-changes
refactor(server/source-handling): Altered how we handle source
2021-02-16 23:44:40 +01:00
Christopher 7d5417ed55 fix(phone/messages): change how we get source | remove useEffect for parts 2021-02-16 23:33:37 +01:00
Christopher 15d7d3dcea fix(phone/messages): change how we get source | remove useEffect for parts 2021-02-16 23:33:23 +01:00
Christopher 4f69ae2266 fix(phone/messages): change how we get source | remove useEffect for parts 2021-02-16 23:32:27 +01:00
Taso 513407249a feat(client/net): Promisfied net events (#95) 2021-02-16 17:31:22 -05:00
J Francisco Rader be479d75cc Fix possibly\ 2021-02-16 17:10:47 -05:00
J Francisco Rader c1f72c77c5 fix new msg alone 2021-02-16 17:10:46 -05:00
J Francisco Rader de952dc555 Remove shit 2021-02-16 17:10:46 -05:00
J Francisco Rader b93d5faee1 Redirect when new msg group is created, and use contacts to push a new message from there 2021-02-16 17:10:45 -05:00
Christopher Gjelten 3bf098c5ee Merge pull request #94 from project-error/feat/useSound
feat(phone/os): useSound hook
2021-02-16 22:53:02 +01:00
Christopher 7d8824680e feat(resources/fxmanifest): I make sound work 2021-02-16 22:48:44 +01:00
RockySouthpaw cd7131e021 Update bug-report.md 2021-02-16 16:40:33 -05:00
Christopher Gjelten 107f28b89c Merge pull request #97 from dayiskuan/feature/custom-frame
Adding new phone designs
2021-02-16 22:07:59 +01:00
Dayiskuan 7e7801e28e Adding new phone designs 2021-02-16 15:55:16 -05:00
RockySouthpaw fa3b3c4ec6 Merge pull request #96 from dayiskuan/feature/custom-frame
Feature / Adding custom default phone frame
2021-02-15 16:37:05 -05:00
Dayiskuan 0c498a9d76 Adding custom default phone frame 2021-02-15 15:51:04 -05:00
Christopher 8a8f8e3bb0 Merge branch 'master' of https://github.com/project-error/new-phone-who-dis 2021-02-15 18:31:08 +01:00
Christopher aeb692499d fix(phone/contacts): resolve issue where avatar is undefined 2021-02-15 18:30:47 +01:00
Taso 9e648d858b Use callback optimizations 2021-02-14 23:20:39 -05:00
Taso 68360e7619 feat(phone/useSound): Initial useSound implementation 2021-02-14 23:16:09 -05:00
Taso 1aa6a383ab refactor(server/source-handling): Altered how we handle source
These changes are made in case source is not guranteed to remain the same

Due to how JS should operate, this shouldn't be an issue but this just ensures that
2021-02-14 20:17:41 -05:00
RockySouthpaw acb8e056c3 Update README.md 2021-02-14 19:03:46 -05:00
Christopher 31e692626a feat(Phone): add animation 2021-02-15 00:30:01 +01:00
Christopher e51bcca7f8 fix(phone/contacts): fixed incorrect Nui.send property | history.goBack 2021-02-15 00:23:23 +01:00
Christopher 32f6f6ebcc fix(phone/build): incorrect file reference 2021-02-14 23:53:52 +01:00
TasoandChristopher Gjelten 211576e237 feat(server/debug): Added initial implementation of new Logger (#84)
- Logs out to a file w/ relevant meta data
- Provides better readability for end user

This should help provide better troubleshooting for both
development and end users.

This also fixes any previous catches that were attempting to print stack traces,
causing the [object Object] message to appear.

Co-authored-by: Christopher Gjelten <[email protected]>
2021-02-14 17:28:13 -05:00
Christopher Gjelten a5491302b6 Merge pull request #81 from project-error/enhance/debug
Enhance/debug - Several changes to improve dev experience
2021-02-14 23:21:52 +01:00
Taso 1f07a469d8 Merge branch 'master' into enhance/debug 2021-02-14 17:15:01 -05:00
RockySouthpaw f76c27d76f Merge pull request #90 from project-error/feat/call-anim
Fix phone not opening with keybind
2021-02-14 14:20:12 -05:00
Darrian Gaylor 001f1425df Fix phone not opening with keybind 2021-02-14 14:17:07 -05:00
J Francisco Rader 7bafa7d518 I make phone work (#89) 2021-02-14 13:40:57 -05:00
Christopher Gjelten 7420a20c7e Merge pull request #87 from project-error/feat/snackbar-provider
Feat/snackbar provider + using it in notes
2021-02-14 19:00:47 +01:00
RockySouthpaw 990ebedc08 update discord URL 2021-02-14 12:52:47 -05:00
Christopher Gjelten f879085b46 Merge branch 'master' into feat/snackbar-provider 2021-02-14 14:10:42 +01:00
Christopher 5efd9aa1f0 removed unused variables 2021-02-14 14:06:51 +01:00
Christopher 92c7a352de feat(notes/server): use new alert 2021-02-14 13:58:01 +01:00
Christopher 9eefc1642a fix(SnackbarProvider): resolve context error 2021-02-14 13:56:51 +01:00
Christopher ce35041568 fix(notes/nui): remove unused variables 2021-02-14 13:31:05 +01:00
J Francisco Rader 8af43eca04 Fix copy config in windows (#86) 2021-02-13 14:25:43 -05:00
Christopher 276a283135 fix(SnackbarProvider): remove unused varable 2021-02-13 18:20:57 +01:00
Christopher 911d5b8eba fix(SnackbarProvider): remove unused varable 2021-02-13 18:19:48 +01:00
Christopher d9b26814dd tweak(notes/client|server): change to sending an object to NUI 2021-02-13 13:50:30 +01:00
Christopher b4258718d8 fix alert provider | remove alert from notes and contact 2021-02-13 13:48:05 +01:00
RockySouthpaw aebf496dbd Merge pull request #85 from Oldarorn/patch-2
Translation: Updated fr.json. Added translation for additional app names, added translation for notes app, and added translation date format.
2021-02-12 13:46:13 -05:00
Oldarorn d48d2e6845 Update fr.json
New update !
2021-02-12 12:30:55 +01:00
Taso 992719980a Merge pull request #83 from project-error/cleanup/game-scripts
Cleanup/game scripts - Misc. cleanup of game scripts
2021-02-11 16:51:28 -05:00
Taso e1f409fed3 fix(scripts/typings): Fixed reference to changed type 2021-02-11 16:40:01 -05:00
Christopher 9ba8bd683f fix(SnackbarProvider): center alert 2021-02-11 21:12:19 +01:00
Christopher 82adc9497b remove SnackBar component | improve Provider 2021-02-11 01:01:33 +01:00
Christopher 8ec2a4769d feat(useSnackbar): strict types 2021-02-11 01:00:40 +01:00
Christopher 7160fcdfac feat(Snackbar): interface 2021-02-11 01:00:14 +01:00
Taso 587185535f fix(phone/anim): Added missing phoneClose anim to handler 2021-02-10 17:46:46 -05:00
Taso 8f78423591 Merge branch 'master' into cleanup/game-scripts 2021-02-10 16:31:00 -05:00
Taso 9486fb69b9 chore(phone/nui): update for cerulean fxversion 2021-02-10 16:29:28 -05:00
Taso f0a2d8c77e refactor(phone/visibility): Improved organization of visibility flow 2021-02-10 14:25:00 -05:00
J Francisco RaderandTaso 81f5e27064 Remove client phoneConfig event (#73)
* Remove client phoneConfig event

* Remove unused debug

* Remove unused import

* Remove unused import

* Remove duplicated functions | fix useEffect dependency | etc

* Fix warnings

* Update phone/src/apps/twitter/components/TwitterApp.tsx

Co-authored-by: Taso <[email protected]>

Co-authored-by: Taso <[email protected]>
2021-02-10 12:04:28 -05:00
Taso 368a8c57f8 optimize(scripts/anims): Optimized and organized open/close animations 2021-02-09 18:45:48 -05:00
Taso 47e1f2950e fix(scripts/nui-callbacks): Fixed NUI callback stalls 2021-02-09 18:43:54 -05:00
Taso 6b21cfddd0 cleanup(scripts/cl_photo): Cleaned up code 2021-02-09 18:16:04 -05:00
Christopher c38fe9ef66 feat(SnackbarProvider): interface update | wrap around phone 2021-02-09 19:19:36 +01:00
RockySouthpaw fdfd4133e2 Added kash disclaimer. 2021-02-09 12:55:29 -05:00
Taso b73919c147 fix(phone/tweet): Fixed possible XSS vector
As we were parsing user input for \n in order to convert to <br> tags, a XSS vulnerability was introduced allowing for users to pass arbitrary script tags to be rendered in tweets.
2021-02-09 11:14:52 -05:00
Taso c0509be2d1 Refactored Contacts to use Routes and not a Modal (#80)
The new route allows for other components to directly route to contacts/:id, where id is the contact id for a users given contacts. It also adds a getContact function accessible by the useConfig hook in case a contact needs to be retrieved using a contact id.
2021-02-09 09:59:54 -05:00
Taso cd9e9e820c chore(readme): updated with dev tools instructions 2021-02-08 23:15:34 -05:00
Taso 9dfff30224 feat(build): One command to build both phone and scripts
To build for both scripts run yarn build in root
2021-02-08 23:04:06 -05:00
Taso f39ed37e73 chore(phone/build): Removed unnecessary files 2021-02-08 23:02:25 -05:00
Taso 7b6d49f661 feat(phone/webpack): Allow for use of react-devtools in game
This is dynamically added to the bundle depending on the environment. In production, react-devtools will not be bundled. Build a development bundle using `yarn build:dev`
2021-02-08 23:00:33 -05:00
Christopher babce2f568 feat(SnackbarProvider): initial provider 2021-02-09 00:35:35 +01:00
Christopher eaf27f37ef fix(Modal): add styling for closeButton back 2021-02-08 22:48:56 +01:00
Christopher Gjelten be754a3dc6 Merge pull request #79 from project-error/fix/notes-handling
Fix/notes handling
2021-02-08 22:34:22 +01:00
Christopher Gjelten 67c043f36c Merge pull request #78 from project-error/feature/quick-access-and-minor-perf-improvements
Feature/quick access and minor perf improvements
2021-02-08 22:25:09 +01:00
Christopher 1a5c85ed82 fix(notes/nui): better solution for Fab 2021-02-08 21:29:43 +01:00
Christopher d4cf6ce4f6 fix(notes/nui): fix Fab in notes list 2021-02-08 21:27:27 +01:00
Christopher 5e2b1a3aa5 fix(notes/nui): fix Fab in notes list 2021-02-08 21:27:00 +01:00
ErikandTaso ddb93b4de8 Fix twitter focusing bug (#74)
* fixes focusing bug and does some render optimizations

* fix(phone/twitter): Fixed conditional hook calls

Co-authored-by: Taso <[email protected]>
2021-02-08 15:24:42 -05:00
Christopher b57adf5a56 fix(notes/nui): remmove NoteModal content and title on save 2021-02-08 21:15:12 +01:00
Erik d793d1b635 fix(phone/twitter): Fix twitter for light theme (#64)
* fix twitter for light theme

* fixed styling on makeStyles
2021-02-08 15:13:34 -05:00
Taso 5d3fad36f7 chore(phone/twitter): Allow for use of Twitter in browser 2021-02-08 15:11:47 -05:00
Christopher 8e207ea2b1 fix(notes/nui): decreased NoteModal title maxLength 2021-02-08 20:56:24 +01:00
Christopher 0502d03b24 feat(notes/nui): maxLength prop on title 2021-02-08 20:31:43 +01:00
Taso 9dd47a2a43 fix(lol): lol 2021-02-08 13:53:42 -05:00
Christopher 491df669c4 feat(sql): add gallery format 2021-02-08 19:41:26 +01:00
Christopher 77bca6b299 tweak(os/useQuickAccess): use exact as true 2021-02-08 19:00:26 +01:00
Christopher 19a0ca7372 feat(more translation) 2021-02-08 18:54:38 +01:00
Christopher a8f025aff3 feat(notes/client|server): sending alert results! 2021-02-08 18:54:13 +01:00
Christopher 4d92847163 feat(notes/nui): use notes alert 2021-02-08 18:52:58 +01:00
Christopher 59973fcf9e feat(notes/nui): useAlet hook 2021-02-08 18:52:04 +01:00
Christopher fc1f6b3ad3 feat(notes/nui): notes alert 2021-02-08 18:51:08 +01:00
J Francisco Rader a27de26ef0 Use NavLink 2021-02-08 00:51:00 -05:00
J Francisco Rader 16623e98e0 Housekeeping :D 2021-02-08 00:46:26 -05:00
J Francisco Rader c149a1f49e Add quick access and improve Apps config 2021-02-08 00:44:57 -05:00
J Francisco Rader 6ae60b377c Delete unused component 2021-02-08 00:44:57 -05:00
J Francisco Rader 4672e613f4 Fix dialer routing and add contacts to it 2021-02-08 00:44:57 -05:00
J Francisco Rader 2bb32c453b Fix: Dialer Routing, added contacts and styling. (#77)
* Fix dialer routing and add contacts to it

* Fix styling

* Delete unused component
2021-02-07 23:55:24 -05:00
RockySouthpaw 84d9b08bff Update README.md 2021-02-07 15:49:23 -05:00
J Francisco Rader e2c8964b81 Fix NUI every render (#75) 2021-02-07 15:12:59 -05:00
RockySouthpaw 1d3a17220a Merge pull request #72 from project-error/chore/improving-readme
Improved install instructions and cleanup.
2021-02-07 13:38:49 -05:00
RockySouthpaw 603f92a06f Added requested edits. 2021-02-07 13:35:52 -05:00
RockySouthpaw 9de07224ae Delete bug_report.md 2021-02-07 03:21:59 -05:00
RockySouthpaw 2c0ba599ad Added additional issue templates. 2021-02-07 03:20:03 -05:00
RockySouthpaw 381615cabd Update issue templates 2021-02-07 03:03:19 -05:00
RockySouthpaw cb29ba5825 Forgot to ensure 2021-02-07 02:38:25 -05:00
RockySouthpaw 2c03e3a765 Improved install instructions and cleanup. 2021-02-07 02:34:03 -05:00
Christopher Gjelten cbea6c7c67 Merge pull request #67 from project-error/fix/warnings-and-call-timer
Fix warnings + Improve CallTimer
2021-02-07 04:18:33 +01:00
Christopher 4e1d85b35f feat(phone/useApps): startup event for apps | remove onClick 2021-02-07 04:16:15 +01:00
Christopher 640643e086 cleanup(GalleryGrid): remove unused variables 2021-02-07 04:14:36 +01:00
Christopher 1e771e87af feat(photo/client|sever): fetch photo on upload 2021-02-07 04:14:00 +01:00
Christopher 6fc469c4a3 feat(events): photo uploaded successful 2021-02-07 04:13:00 +01:00
J Francisco Rader 332b132352 Fix new message 2021-02-06 20:55:11 -05:00
Christopher 4e8dbf5667 fix(state) 2021-02-07 02:44:46 +01:00
Christopher 80e43f6f64 tweak(ui/callTimer): resolved timer issue 2021-02-07 02:40:23 +01:00
Christopher 10a8d792d8 Merge branch 'fix/warnings-and-call-timer' of https://github.com/project-error/new-phone-who-dis into fix/warnings-and-call-timer 2021-02-07 02:03:19 +01:00
Taso 1ac3d89f59 fix(resources/calls): Fixed save call not saving identifier 2021-02-06 20:02:40 -05:00
Christopher 17f186b935 Merge branch 'fix/warnings-and-call-timer' of https://github.com/project-error/new-phone-who-dis into fix/warnings-and-call-timer 2021-02-07 02:01:40 +01:00
Taso f626d1b0ce fix(resources/calls): invalid sql syntax 2021-02-06 19:56:48 -05:00
J Francisco Rader 892acd2f59 Fix warnings + Improve CallTimer 2021-02-06 17:22:12 -05:00
J Francisco Rader 0d356c7930 Merge pull request #71 from project-error/fix/close-share-picture-in-messages
BugFix / sharing bug
2021-02-06 17:21:16 -05:00
J Francisco Rader 1db4dafa2d Fix sharing bug 2021-02-06 17:18:44 -05:00
Christopher Gjelten ecd826dcd3 Merge pull request #65 from project-error/bug/twitter-char-limit
Bug/twitter char limit
2021-02-06 22:47:28 +01:00
J Francisco Rader 51d31ee122 Fix warnings + Improve CallTimer 2021-02-06 16:36:14 -05:00
J Francisco Rader 40f9555b39 Make Camera app use router (#69)
* Make Camera app use router

* Remove unused hooks

* Fucking communicate messages with camera with router

* Improved sharing in messages flow

* Fix clipboard

* Removeunused imports

* improve routing helpers

* Fix bug :D

* Fix stupid thing

* Add docs to useQueryParams hook
2021-02-06 22:24:50 +01:00
Taso 447c51a07e Feat/inject debug - Use new abstraction to clean up debug data (#70)
* feat(phone/debug): Inject debug data for development

* refactor(phone/debug): Refactored mock data to InjectDebugEvents

* fix(phone/debug) removed useless debug injections
2021-02-06 16:00:09 -05:00
Taso 686b86acf9 Merge pull request #68 from project-error/fix/zoom
Fixed issues with using non standard `zoom` css property
2021-02-06 13:38:05 -05:00
Taso 263275b921 tweak(phone/app-grid): Tweaked tooltip styling 2021-02-06 13:32:43 -05:00
J Francisco Rader 28b2599e75 Fix zoom origin 2021-02-06 13:29:03 -05:00
Christopher 5da2d680c6 fix(zoom): inital commit on possbile fix 2021-02-06 13:29:02 -05:00
Taso 7e9c1d0f35 fix(phone/apps): Fixed locales for apps 2021-02-06 13:18:06 -05:00
Kire 37504feec7 handle case where user spams new lines 2021-02-04 23:10:22 -05:00
Kire 1fca1ac200 twitter char limit to 160 and added scroll 2021-02-04 22:29:47 -05:00
Taso fd2aac31a0 chore(resources): Removed unnecessary true in watch script 2021-02-04 00:48:47 -05:00
RockySouthpaw e11c0c536c Organized wallpapers, and removed non existing ones. (#63) 2021-02-04 00:44:27 -05:00
Taso ea2fcdba00 chore(resources): Removed random lua file 2021-02-04 00:42:53 -05:00
RockySouthpaw d6a8c45d52 Revert "Merge pull request #62 from project-error/feature/show-app-name-on-hover"
This reverts commit 5f7875182c.
2021-02-03 22:41:45 -05:00
RockySouthpaw 5f7875182c Merge pull request #62 from project-error/feature/show-app-name-on-hover
Feature/show app name on hover
2021-02-03 20:22:30 -05:00
Kire 5a36290b83 Added typings to app configuration
Added an interface for the app configuration list and imported/used it in several places. Also found some cases where there were unused/unnecessary properties involved that didn't exist in this configuration.
2021-02-03 13:51:59 -05:00
Kire 948f8dfade Working tooltips 2021-02-03 13:43:53 -05:00
Christopher Gjelten 63aea89e2b Merge pull request #61 from project-error/feat/calling-lua-ts
Feat/calling lua ts
2021-02-03 00:00:06 +01:00
Christopher 5c3f4366ec fix(calling/state): fix state keys 2021-02-02 23:56:14 +01:00
Christopher 157407740e Merge branch 'feat/calling-lua-ts' of https://github.com/project-error/new-phone-who-dis into feat/calling-lua-ts 2021-02-02 23:51:34 +01:00
Christopher 3cbdf531db feat(updated import.sql) 2021-02-02 23:51:13 +01:00
itschip 566b55b374 Prettified Code! 2021-02-02 22:48:54 +00:00
Christopher e48864c6dc feat(calling): using unix as call time 2021-02-02 23:47:43 +01:00
Christopher 8ff9017902 Merge branch 'feat/calling-lua-ts' of https://github.com/project-error/new-phone-who-dis into feat/calling-lua-ts 2021-02-02 18:36:55 +01:00
Christopher 42cdbaab4f tweak(dial/nui): useContext instead of Consumer 2021-02-02 18:36:46 +01:00
itschip 39a46ad4dc Prettified Code! 2021-02-02 09:23:10 +00:00
Christopher ae1715f173 feat(call/client|server): use Unix 2021-02-02 10:21:50 +01:00
itschip 08d848054e Prettified Code! 2021-02-01 19:16:38 +00:00
Christopher 8472309436 fix conflicts 2021-02-01 20:15:20 +01:00
Christopher d3b04f4cd9 tweak(call/nui): duration as global state 2021-02-01 20:14:27 +01:00
itschip 8621cab587 Prettified Code! 2021-02-01 18:45:15 +00:00
Christopher dd008775f9 feat(calling/nui): Timer for calls 2021-02-01 19:44:00 +01:00
itschip 3063da94b2 Prettified Code! 2021-01-31 20:50:18 +00:00
Christopher f4b77d9f51 fix(Dial/nui): rename functions 2021-01-31 21:49:11 +01:00
Christopher c7b185014d feat(calling/dial): update interfaces 2021-01-31 21:44:24 +01:00
Christopher 8ad85d8209 feat(calling/client|server): update Call interface 2021-01-31 21:43:44 +01:00
Christopher 04afb24bda fix(dial/hooks): rename 2021-01-31 21:43:04 +01:00
Christopher 5563125d2c fix(Notification): resolved ThemeProvider issue 2021-01-31 16:38:14 +01:00
Christopher eaf764cd01 feat(phone/client): fetch contacts on dailer
This is for knowing if the contact exist, so we can show the name or the phone number, and NOT open the contacts page first
2021-01-31 16:08:12 +01:00
itschip fe4c46e8ee Prettified Code! 2021-01-31 15:00:22 +00:00
Christopher 827f98bba1 feat(DialerInput): calling from DialPage 2021-01-31 15:59:15 +01:00
itschip 856a7ef7ef Prettified Code! 2021-01-31 01:53:49 +00:00
Christopher bf79f85336 fix(calling/server): resolve issue where call is not updated when accepted 2021-01-31 02:52:44 +01:00
itschip d08e38495a Prettified Code! 2021-01-31 01:49:31 +00:00
Christopher cf65004c42 del(Phone.tsx): remove 'type' from call mock data 2021-01-31 02:48:28 +01:00
Christopher 601450e579 feat(dailer/history): showing timestamps in recent calls 2021-01-31 02:47:38 +01:00
Christopher 798c3ce3e4 feat(types/calls): timestamp type 2021-01-31 02:46:59 +01:00
Christopher 342fd9aaba feat(calling/client|server): handling timestamps for calls 2021-01-31 02:46:33 +01:00
Christopher da4592d531 feat(package/dayjs): added dayjs 2021-01-31 02:45:39 +01:00
itschip ddcb5e5a3d Prettified Code! 2021-01-29 19:10:36 +00:00
Christopher 283f872e5b fix(resovled pull issues) 2021-01-29 20:09:19 +01:00
itschip 26a4c1c31a Prettified Code! 2021-01-29 18:57:12 +00:00
Christopher 9895ea2089 tweak(calling/server|client): more history and calling 2021-01-29 19:56:00 +01:00
Christopher fbb3b07b7b feat(calling/client|server): show dail history 2021-01-29 19:54:37 +01:00
Christopher f960d1414c feat(calling/client|server): show dail history 2021-01-29 19:54:17 +01:00
Christopher 89ea248d32 feat(contacts/nui | calling/client|server): getName | close modal on add | show dail history 2021-01-29 19:53:14 +01:00
itschip 762fb237c3 Prettified Code! 2021-01-27 23:48:05 +00:00
Christopher 0f10eac796 feat(calling): working state 2021-01-28 00:46:56 +01:00
Christopher 034d996b25 fixed merge 2021-01-28 00:45:18 +01:00
Christopher 65b744e7f2 feat(typings/call): added typings for calling 2021-01-28 00:43:09 +01:00
Christopher a3ef384f35 fix(CallModal): fixed nui requests and if-else inline 2021-01-28 00:42:36 +01:00
Christopher 242d92acb3 feat(utils/nui): able to merge data 2021-01-28 00:41:31 +01:00
Christopher 804c8da9cb feat(utils/nui): able to merge data 2021-01-28 00:41:15 +01:00
Christopher d3a2ee7628 feat(calling/client|server): working calling 2021-01-28 00:40:52 +01:00
Christopher 9c71ef470c feat(events): tweaks 2021-01-28 00:40:06 +01:00
itschip 658964277b Prettified Code! 2021-01-26 21:32:13 +00:00
Christopher 552cba3e76 shit fix 2021-01-26 22:30:51 +01:00
Christopher f23af8da04 Merge branch 'feat/calling-lua-ts' of https://github.com/project-error/new-phone-who-dis into feat/calling-lua-ts 2021-01-26 22:07:38 +01:00
Christopher 7eb4b09f5c fix(adding correct events 2021-01-26 22:07:28 +01:00
itschip dbcfdd9eda Prettified Code! 2021-01-26 20:43:20 +00:00
Christopher a7f3f50f3d feat(callModal/nui): styles and functions for calling modal
Needs to be discussed
2021-01-26 21:42:11 +01:00
Christopher 5ae49f4c7a feat(calling/server): more client-side handling for calling
We need to come up with a better way of doing this
2021-01-26 21:41:28 +01:00
Christopher 1382e66b3d feat(calling/server): more server-side handling for calling 2021-01-26 21:40:49 +01:00
Christopher 7b7b96783c feat(utils/evens): events for calling 2021-01-26 21:40:18 +01:00
J Francisco Rader 20f125c9c8 Merge pull request #60 from project-error/feature/improve-sellout-images-and-create-generic-picture
Feature/improve sellout images and create generic picture
2021-01-24 19:56:06 -05:00
J Francisco RaderandJ Francisco Rader bde18ef1cf chore(phone): Types and unused variable cleanup
Co-authored-by: J Francisco Rader <[email protected]>
2021-01-24 18:30:37 -05:00
J Francisco Rader e0f9cc193b Fix shit 2021-01-24 14:45:00 -05:00
J Francisco Rader 6de92e3a7a Create shared Picture components and use them in sellout app 2021-01-24 14:42:15 -05:00
J Francisco Rader bdadf052c5 Housekeeping :D 2021-01-24 13:26:34 -05:00
RockySouthpaw 5719c67874 Updated Authors (kidz) 2021-01-24 13:10:42 -05:00
RockySouthpaw 1ac2d607b7 Added Kire to fxmanifest
silly chip
2021-01-24 13:05:57 -05:00
Christopher Gjelten 6f5c973930 Update fxmanifest.lua 2021-01-24 19:03:42 +01:00
Christopher Gjelten 3bf4cb183e Merge pull request #58 from project-error/task/cleanup-all-warnings
Fix all ts warnings
2021-01-24 18:38:26 +01:00
J Francisco Rader 2b96d93565 Merge master 2021-01-23 18:44:00 -05:00
itschip e7cafe0855 Prettified Code! 2021-01-23 19:59:33 +00:00
Christopher 03ecd5226b feat(calling/server): Using source as channel id 2021-01-23 20:58:05 +01:00
Taso d0de0e4bac Feat: Lerna integration with husky for precommit checks (#57)
* feat: Lerna integration with husky

* Lint-staged integration

* tweak(ci/cd): Removed prettier integration

* Added lint-staged to precommit hook call

* tweak: removed git add from lint-staged

* tweak(gitignore): Removed package.json from ignore
2021-01-18 15:17:41 -05:00
Taso d6e9a85b40 Feat: Dial section
Still WIP
2021-01-18 14:30:32 -05:00
Taso 5a9707ae3c chore(phone/config): Readded overwritten config fields 2021-01-18 12:18:32 -05:00
Taso 853184dba6 Merge branch 'master' into feat/calling-lua-ts 2021-01-18 12:13:08 -05:00
Taso 820354aa2e Misc(styling): Fixed AppContent shenanigans with height 2021-01-18 12:08:23 -05:00
Taso 2c06579182 enhance(phone/types): Improved types for AppWrapper & AppContent 2021-01-18 12:08:16 -05:00
itschip 4fe3229bb7 Prettified Code! 2021-01-17 21:36:50 +00:00
Christopher 8d100a5ebd possible solution for accepting call 2021-01-17 22:35:41 +01:00
Christopher e5604bd544 feat(calling/server): setting unique channel id 2021-01-17 22:29:55 +01:00
itschip 7cc3a47f7b Prettified Code! 2021-01-17 21:17:56 +00:00
Christopher c8882a618b fix(merge): fixed conflicts 2021-01-17 22:16:21 +01:00
itschip 52a32b443d Prettified Code! 2021-01-17 21:09:45 +00:00
Christopher db3bd999f2 feat(calling/client|server): partical functions for calling
Should probably reuse data
2021-01-17 22:08:29 +01:00
Christopher 77c7cc303e feat(calling/client|server): partical functions for calling
Should probably reuse data
2021-01-17 22:03:52 +01:00
Taso 8a2f281790 enhance(phone): useNuiEvent types and integrated DebugLogger 2021-01-17 15:49:22 -05:00
itschip c12b0ba126 Prettified Code! 2021-01-17 20:13:46 +01:00
Christopher c35b5f2b84 feat(modals/call/nui): inital commit for calling modal 2021-01-17 20:12:21 +01:00
Christopher 59ad36c7fd fix(contacts/client|server): fixed source for updating contacts 2021-01-17 20:12:15 +01:00
Christopher 1913dd48df fix(contacts/nui): resolved switch statement for alerts 2021-01-17 20:10:34 +01:00
TasoOneAsia 85ffdc571b Prettified Code! 2021-01-17 20:10:34 +01:00
Taso a8deb8b578 feat(call): More progress 2021-01-17 20:10:33 +01:00
itschip 03e8c4a0d5 Prettified Code! 2021-01-17 20:10:33 +01:00
Christopher 28902fb97f feat(client/server): imports 2021-01-17 20:10:33 +01:00
Christopher 085fb778f1 feat(calling/client|nui): new command and changed event name 2021-01-17 20:10:32 +01:00
Christopher 88d1cb89fd fix(calling/server|client): fixed events issue | updated calling server 2021-01-17 20:10:21 +01:00
Christopher 22c36f0920 inital ts commit 2021-01-17 20:09:35 +01:00
Christopher 28774d24d8 Merge branch 'feat/calling-lua-ts' of https://github.com/project-error/new-phone-who-dis into feat/calling-lua-ts 2021-01-17 14:30:52 +01:00
Christopher 903e3c5f64 feat(modals/call/nui): inital commit for calling modal 2021-01-17 14:29:56 +01:00
itschip 5c168c804b Prettified Code! 2021-01-15 21:08:51 +00:00
Christopher 76aee071a8 fix(contacts/client|server): fixed source for updating contacts 2021-01-15 22:07:45 +01:00
Christopher ccb5b76d29 fix(contacts/nui): resolved switch statement for alerts 2021-01-15 22:05:32 +01:00
Christopher 6bb534231b something weird happened now 2021-01-14 20:23:31 +01:00
Christopher 1ec30f341a feat(notes/nui): interface for useNoteDetail 2021-01-14 20:19:22 +01:00
Christopher 5960524b98 feat(notes/nui): interface for useNotes 2021-01-14 20:18:59 +01:00
Christopher 92579dd213 feat(notes/nui): interface for useNoteModal 2021-01-14 20:09:09 +01:00
Christopher 20e03e4981 feat(camera/nui): interface on useShareModal 2021-01-14 20:02:59 +01:00
Christopher ba027b67fd fix(bank/nui): interface for useBankModal 2021-01-14 19:37:46 +01:00
Christopher deeabd9677 fix(contacts/nui): interface for useContactDetail 2021-01-14 19:36:05 +01:00
Christopher a7100f16a9 fix(contacts/nui): interface for useContacts 2021-01-14 19:32:56 +01:00
Christopher c7f6a72180 fix(typo in useContactModal) 2021-01-14 19:02:35 +01:00
Christopher 0e0cde0ca1 feat(contacts/nui): interface for useContactModal 2021-01-14 19:01:47 +01:00
Christopher fa465a8b23 feat(contacts/nui): interface for useFilteredContacts 2021-01-14 19:00:13 +01:00
Christopher 01291abe73 feat(contacts/nui): interface for useModal 2021-01-14 18:58:50 +01:00
Taso ec1451a9aa Fix: prettier config in resources\ not being standard. 2021-01-13 20:36:03 -05:00
Taso d56112a0cb Feat: Debug logger 2021-01-13 20:31:14 -05:00
Taso 7b9d8826a6 Fix: SettingItem with no onClick 2021-01-13 16:49:30 -05:00
TasoOneAsia bcdab48bdb Prettified Code! 2021-01-13 04:13:28 +00:00
Taso 5766da5c66 feat(call): More progress 2021-01-12 23:12:00 -05:00
Taso a29ba86577 tweak(webpack): Added copy plugin to webpack allowing for easier build
Also changed build script name
2021-01-12 22:09:56 -05:00
Taso a227743bdc Merge branch 'master' into feat/calling-lua-ts 2021-01-12 21:47:24 -05:00
Taso 54daa42454 styling: Enforced styling across all files (#55) 2021-01-12 21:31:03 -05:00
Taso c9b3174505 DB: Removed explicit collation values on tables for compatability reasons 2021-01-12 21:27:37 -05:00
Taso c91d0729fb DB: Removed need for password and added docs 2021-01-12 21:27:00 -05:00
Taso 2b52612f65 bump: esx.js version 2021-01-12 21:26:38 -05:00
Christopher 3c371d4e7e Merge branch 'feat/calling-lua-ts' of https://github.com/Re-Ignited-Development/new-phone-who-dis into feat/calling-lua-ts 2021-01-12 22:11:58 +01:00
Christopher dec6614b45 feat(client/server): imports 2021-01-12 22:11:40 +01:00
itschip 6cfc9ec19c Prettified Code! 2021-01-12 21:02:42 +00:00
Christopher 4a193776ec feat(calling/client|nui): new command and changed event name 2021-01-12 22:01:24 +01:00
Christopher 4823debf2d fix(calling/server|client): fixed events issue | updated calling server 2021-01-12 21:31:49 +01:00
Xios_Bombay 6e94bef7f3 locale: Added new translations for es.json (#54) 2021-01-12 12:15:01 -05:00
Taso fded06adbb locale: European PT (#53) 2021-01-12 12:11:58 -05:00
TasoOneAsia 3269f2f270 Prettified Code! 2021-01-12 17:10:35 +00:00
Taso b7ff4b670b Merge pull request #52 from Oldarorn/patch-1
Update fr.json
2021-01-12 12:09:34 -05:00
Taso 5c23744a13 Merge branch 'master' of https://github.com/project-error/new-phone-who-dis 2021-01-12 12:06:35 -05:00
Taso 73a5bab1c7 Feat: Settings localStorage state 2021-01-12 12:04:46 -05:00
Taso d65806ffa5 Misc: cleanup for rebase of master 2021-01-12 11:30:43 -05:00
Taso 8912650f0e refactor: LocalStorage state integration 2021-01-12 11:28:20 -05:00
Christopher 8266b473a5 inital ts commit 2021-01-11 19:10:20 +01:00
HypeLevels 1efb5fb54a Update i18n.ts 2021-01-11 18:08:54 +00:00
HypeLevels e4c0a4e40c Create pt.json 2021-01-11 18:08:27 +00:00
Oldarorn 8c5595ebef Update fr.json 2021-01-11 17:55:37 +01:00
TasoOneAsia c249cfa2ec Prettified Code! 2021-01-10 22:14:48 +00:00
Taso 60828c8261 Added Brazilian Translations (#51) 2021-01-10 17:13:47 -05:00
SynTer acc0091c9e added on resources array 2021-01-10 19:12:32 -03:00
SynTer a799f6effa Added the translation on i18n.ts 2021-01-10 19:11:15 -03:00
SynTer 85b80d4de7 Brazilian Portuguese translation 2021-01-10 19:06:08 -03:00
Taso d07b5496b1 chore: removed unused .lua files that caused confusions for locales pr's 2021-01-10 17:00:44 -05:00
Christopher 5af6e4936d feat(settings): utilze useLocalStorage 2021-01-09 20:09:30 +01:00
Christopher 6458bce17f tweak(settings): switced to useLocalStorage hook 2021-01-09 18:45:18 +01:00
Christopher 5fdb9ba21c fix(localStorage): solution to localStorage issue
Still need to find a good way to re-render
2021-01-08 21:48:24 +01:00
Taso a1f0d7a289 Merge pull request #48 from project-error/feat/sentry
Feat: Added Sentry integration for exception metrics
2021-01-08 10:11:07 -05:00
Christopher 645f982074 Merge branch 'master' of https://github.com/Re-Ignited-Development/new-phone-who-dis 2021-01-07 21:45:52 +01:00
Christopher 66ccf7a73f feat(Phone): fixed warnings 2021-01-07 21:45:33 +01:00
Christopher a723167b7d feat(GridMenu): fixed warnings 2021-01-07 21:45:21 +01:00
Christopher b1481f635b feat(navbar/nui): fixed warnings 2021-01-07 21:45:04 +01:00
Christopher 9707c8da60 feat(contacts/nui): fixed warnings 2021-01-07 21:44:49 +01:00
Christopher 75896d3936 feat(settings/nui): fixed warnings 2021-01-07 21:44:25 +01:00
Christopher 1cf4d0e081 feat(notes/nui): fixed warnings 2021-01-07 21:44:07 +01:00
Christopher abf644986a feat(camera/nui): fixed warnings 2021-01-07 21:43:53 +01:00
Christopher 18db9e5a4d feat(bank/nui): fixed warnings 2021-01-07 21:43:31 +01:00
Christopher ee283c8b1c fix(bank/nui): fixed warnings 2021-01-07 21:43:07 +01:00
Christopher 310d58d3d1 fix(twitter/nui): fixed warnings 2021-01-07 21:42:53 +01:00
Christopher aaf851c5ee fix(twitter/nui): fixed warnings 2021-01-07 21:42:37 +01:00
Christopher 07dc73f0cb minor changes in localStorage - nothing to see here 2021-01-07 21:17:44 +01:00
TasoOneAsia 43b38d7f98 Prettified Code! 2021-01-06 22:26:11 +00:00
Taso 67e3b74b02 Merge pull request #47 from project-error/enhance/locale-strings
Enhance/locale strings
2021-01-06 17:25:10 -05:00
TasoOneAsia 3b42511c10 Prettified Code! 2021-01-06 16:25:12 +00:00
Taso dce7528c7a Feat: Sentry for issue tracking/exception handling 2021-01-06 11:16:05 -05:00
Taso b6d363fabd Revert "refactor(import SQL): Misc. comments/changes still WIP "
This reverts commit 3f1c8b890b.
2021-01-06 03:52:51 -05:00
TasoOneAsia af8da64849 Prettified Code! 2021-01-06 08:48:15 +00:00
Taso 0a3a341d98 Feat: Additional locales for contacts app 2021-01-06 03:44:11 -05:00
Taso fb0a402292 Feat: Added locales for Settings 2021-01-06 03:24:56 -05:00
Taso b3e6cc0c6e Merge branch 'master' of https://github.com/Re-Ignited-Development/new-phone-who-dis 2021-01-06 03:05:05 -05:00
Taso 35c5a3098b Merge pull request #45 from Hamy-os/master
added bh.json
2021-01-06 02:48:55 -05:00
Hamy fe09bb0058 Update i18n.ts
added the import thingy and there was 2 missing :|
2021-01-06 10:05:36 +03:00
Hamy ce30495cb4 added bh.json
bosnian!!!! wooooooooooo
2021-01-05 14:19:36 +03:00
Christopher Gjelten 4512a4369a Merge pull request #44 from Ruqen/master
Turkish language implemented
2021-01-04 20:37:05 +01:00
Christopher dddddc01f8 feat(localstorage): resolved issue with phone not re-rendering 2021-01-04 20:33:53 +01:00
Ruqen 12ab829791 Create tr.lua 2021-01-04 21:50:08 +03:00
Ruqen 47d62773ba Create tr.json 2021-01-04 21:49:43 +03:00
Taso d93818dbc1 Merge pull request #40 from project-error/dependabot/npm_and_yarn/resources/node-notifier-8.0.1
build(deps): bump node-notifier from 8.0.0 to 8.0.1 in /resources
2021-01-04 13:48:10 -05:00
itschip 5803b8a629 Prettified Code! 2021-01-04 18:47:24 +00:00
Christopher Gjelten fda60c3736 Merge pull request #43 from brezedc/master
helo, i add swedish yes, shoutout to 99kr
2021-01-04 19:46:12 +01:00
Breze a254d148fd walla i tror i fixed
ey
2021-01-04 19:42:55 +01:00
Breze a4f1ce9078 ey walla 2021-01-04 19:35:11 +01:00
itschip 0581947429 Prettified Code! 2021-01-04 18:29:56 +00:00
Christopher 528cfa907a feat(translation): added fr and es 2021-01-04 19:28:41 +01:00
Breze bc87f4125c added swedish edits 2021-01-04 19:17:01 +01:00
itschip 2982a346ed Prettified Code! 2021-01-04 18:10:59 +00:00
Christopher Gjelten 4c8beceb67 Merge pull request #42 from XiosBombay/master
Spanish translation (I'll update it as more apps or things get added or removed)
2021-01-04 19:09:51 +01:00
Christopher Gjelten aee41958e8 Merge pull request #41 from Oldarorn/master
First french translation shot
2021-01-04 19:01:51 +01:00
Xios_Bombay 3ca689f47e Create es.lua + Translation 2021-01-04 08:47:36 -05:00
Xios_Bombay 6e6a93b5fd Update es.json 2021-01-04 08:44:34 -05:00
Xios_Bombay fc01a56a7c Create es.json 2021-01-04 08:12:54 -05:00
Christopher Gjelten 53beb1845c Update LICENSE 2021-01-04 10:29:42 +01:00
Oldarorn 87dca03629 Create fr.lua 2021-01-04 09:32:58 +01:00
Oldarorn 61e13a407a Create fr.json 2021-01-04 09:32:04 +01:00
itschip 6dc162a107 Prettified Code! 2021-01-03 20:05:57 +00:00
Christopher Gjelten 7c6fb3bab6 Update README.md 2021-01-03 21:04:59 +01:00
Christopher Gjelten df98f07bb5 Update README.md 2021-01-03 21:04:48 +01:00
Christopher Gjelten 924dccc447 Update LICENSE 2020-12-27 19:09:37 +01:00
dependabot[bot] d9e8514e14 build(deps): bump node-notifier from 8.0.0 to 8.0.1 in /resources
Bumps [node-notifier](https://github.com/mikaelbr/node-notifier) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/mikaelbr/node-notifier/releases)
- [Changelog](https://github.com/mikaelbr/node-notifier/blob/v8.0.1/CHANGELOG.md)
- [Commits](https://github.com/mikaelbr/node-notifier/compare/v8.0.0...v8.0.1)

Signed-off-by: dependabot[bot] <[email protected]>
2020-12-22 20:57:54 +00:00
Christopher Gjelten 1d03d3c458 Update LICENSE 2020-12-16 08:13:29 +01:00
Taso 3f1c8b890b refactor(import SQL): Misc. comments/changes still WIP
The data structure can be heavily improved imo, we just need some time to sit down together and decide.
2020-12-15 21:56:07 -05:00
Taso 2172529df6 chore: Added NUI build folder (resources/html) to .gitignore 2020-12-15 14:07:07 -05:00
Taso 2b3f57e60c chore: Removed children .gitignores and relocated rules to root. 2020-12-15 13:46:38 -05:00
Taso 76a7829370 Feat: Changed SS Basic to Convar
Screenshot Basic token is now set using a replicated convar. i.e +setr "SCREENSHOT_BASIC_TOKEN" "token"
2020-12-15 13:42:28 -05:00
Taso 0200a68a4e chore: Fixed up .gitignore to ignore built files for NUI 2020-12-15 13:41:12 -05:00
Taso 6034b559ce mod(config): Generated dashed numbers by default 2020-12-15 13:38:54 -05:00
Taso 12a6ebb5aa fix(utils/events): Added missing event 2020-12-15 13:38:29 -05:00
Taso 61fd8ffea6 fix: paths for common typings folder and misc. 2020-12-15 13:18:28 -05:00
Christopher 14223c9800 feat(idontknowwhatthisis) 2020-12-14 20:27:59 +01:00
Christopher 3e03993d5b feat(settings): using local storage to save settings
Need to ensure that when a new setting is set, we re-render the phone.
2020-12-13 21:59:10 +01:00
443 changed files with 25456 additions and 11859 deletions

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
---
name: Bug Report
about: Create a report to help us improve
title: 'Bug: TITLE'
labels: New Issue
assignees: ''
---
**Is this issue related to the phone still being in development?**
If so, please consult the [gitkraken](https://app.gitkraken.com/glo/board/X9YZ_x_SVQEcMwpH) to see if it's already being tracked.
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Evidence**
If applicable, add a screenshot or a video to help explain your problem.
**Needed information (please complete the following information):**
- **Server OS**: [e.g. Windows 10]
- **Server Artifact version**: [e.g. 3486] Don't know? Do `version` into your server console.
- What version of **new-phone-who-dis** are you running?
**Additional context**
Add any other context about the problem here.
+21
View File
@@ -0,0 +1,21 @@
---
name: Feature Request
about: Suggest a feature that you would like added/improved upon.
title: 'Enhancement: TITLE'
labels: Enhancement
assignees: ''
---
**Is your feature request related to a problem or design oversight? If so, please explain it.**
Provide evidence to help support your claim so we can better understand such as pictures or a video.
**What is your suggestion?**
Please include as much details as possible. Avoid vague suggestions such as "An app to order food with.". Include as much details as possible such as: "An app that will allow a player to order a food item of their choice and have a player/npc deliver it to them."
**Does your suggestion require any dependencies? (Jobs and Money are framework dependencies.)**
**Do you have any references to help us visualize your suggestion?**
Such as "Here is a link to a similar concept: https://www.youtube.com/watch?v=j5a0jTc9S10 "
**Any additional comments or concerns?**
+3 -19
View File
@@ -1,10 +1,10 @@
name: Tests and CI
name: Test Suite
on: [push]
jobs:
nui_preformatting_tests:
name: NUI Preformatting and Tests
name: Tests for NUI
runs-on: ubuntu-latest
defaults:
run:
@@ -34,21 +34,13 @@ jobs:
node-version: '14.x'
- name: Install dependencies NUI
run: yarn --frozen-lockfile
- name: Prettify Code
uses: creyD/[email protected]
with:
# This part is also where you can pass other options, for example:
prettier_options: --write **/*.{js,jsx,ts,tsx,json,css,scss,md}
only_changed: True
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run Enzyme Tests
run: yarn test
env:
CI: true
game_scripts_test:
name: Formatting/Tests for Native Scripts
name: Tests for Game Scripts
runs-on: ubuntu-latest
defaults:
run:
@@ -68,14 +60,6 @@ jobs:
node-version: '14.x'
- name: Install dependencies NUI
run: yarn --frozen-lockfile
- name: Prettify code
uses: creyD/[email protected]
with:
# This part is also where you can pass other options, for example:
prettier_options: --write **/*.{js,jsx,ts,tsx,json,css,scss,md}
only_changed: True
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run Jest Tests
run: yarn test
env:
+21 -1
View File
@@ -1,2 +1,22 @@
# No intellij folder
# No IDE Folders
.idea
resources/html
phone/.eslintcache
# Node Modules and Built Folders
node_modules
build
dist
# Error Logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Mac thing
.DS_Store
# Debug logs
sv_npwd.log
+1
View File
@@ -0,0 +1 @@
_
+30
View File
@@ -0,0 +1,30 @@
#!/bin/sh
if [ -z "$husky_skip_init" ]; then
debug () {
[ "$HUSKY_DEBUG" = "1" ] && echo "husky (debug) - $1"
}
readonly hook_name="$(basename "$0")"
debug "starting $hook_name..."
if [ "$HUSKY" = "0" ]; then
debug "HUSKY env variable is set to 0, skipping hook"
exit 0
fi
if [ -f ~/.huskyrc ]; then
debug "sourcing ~/.huskyrc"
. ~/.huskyrc
fi
export readonly husky_skip_init=1
sh -e "$0" "$@"
exitCode="$?"
if [ $exitCode != 0 ]; then
echo "husky - $hook_name hook exited with code $exitCode (error)"
exit $exitCode
fi
exit 0
fi
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn pretty-quick --staged
+9
View File
@@ -0,0 +1,9 @@
build
dist
coverage
node_modules
.idea
.github
.vscode
resources/html
resources/dist
+9
View File
@@ -0,0 +1,9 @@
{
"printWidth": 100,
"singleQuote": true,
"semi": true,
"bracketSpacing": true,
"trailingComma": "all",
"useTabs": false,
"tabWidth": 2
}
View File
Whitespace-only changes.
+5
View File
@@ -0,0 +1,5 @@
Kidz
ItsChip
ROCKY_southpaw
Kire
TasoOneAsia
+591 -8
View File
@@ -1,11 +1,594 @@
Copyright (c) BTNGaming, itzchip, ROCKY_southpaw
GNU General Public License
==========================
All rights reserved.
_Version 3, 29 June 2007_
_Copyright © 2007 Free Software Foundation, Inc. &lt;<http://fsf.org/>&gt;_
Even if 'All rights reserved' is very clear :
Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed.
You shall not use any piece of this software in a commercial product / service
You shall not resell this software
You shall not provide any facility to install this particular software in a commercial product / service
You are in no way allowed to redistribute this code until this private project has become public, unless given written consent by one of the copyright holders.
This copyright should appear in every part of the project code
## Preamble
The GNU General Public License is a free, copyleft license for software and other
kinds of works.
The licenses for most software and other practical works are designed to take away
your freedom to share and change the works. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change all versions of a
program--to make sure it remains free software for all its users. We, the Free
Software Foundation, use the GNU General Public License for most of our software; it
applies also to any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General
Public Licenses are designed to make sure that you have the freedom to distribute
copies of free software (and charge for them if you wish), that you receive source
code or can get it if you want it, that you can change the software or use pieces of
it in new free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you these rights or
asking you to surrender the rights. Therefore, you have certain responsibilities if
you distribute copies of the software, or if you modify it: responsibilities to
respect the freedom of others.
For example, if you distribute copies of such a program, whether gratis or for a fee,
you must pass on to the recipients the same freedoms that you received. You must make
sure that they, too, receive or can get the source code. And you must show them these
terms so they know their rights.
Developers that use the GNU GPL protect your rights with two steps: **(1)** assert
copyright on the software, and **(2)** offer you this License giving you legal permission
to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains that there is
no warranty for this free software. For both users' and authors' sake, the GPL
requires that modified versions be marked as changed, so that their problems will not
be attributed erroneously to authors of previous versions.
Some devices are designed to deny users access to install or run modified versions of
the software inside them, although the manufacturer can do so. This is fundamentally
incompatible with the aim of protecting users' freedom to change the software. The
systematic pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we have designed
this version of the GPL to prohibit the practice for those products. If such problems
arise substantially in other domains, we stand ready to extend this provision to
those domains in future versions of the GPL, as needed to protect the freedom of
users.
Finally, every program is threatened constantly by software patents. States should
not allow patents to restrict development and use of software on general-purpose
computers, but in those that do, we wish to avoid the special danger that patents
applied to a free program could make it effectively proprietary. To prevent this, the
GPL assures that patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and modification follow.
## TERMS AND CONDITIONS
### 0. Definitions
“This License” refers to version 3 of the GNU General Public License.
“Copyright” also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
“The Program” refers to any copyrightable work licensed under this
License. Each licensee is addressed as “you”. “Licensees” and
“recipients” may be individuals or organizations.
To “modify” a work means to copy from or adapt all or part of the work in
a fashion requiring copyright permission, other than the making of an exact copy. The
resulting work is called a “modified version” of the earlier work or a
work “based on” the earlier work.
A “covered work” means either the unmodified Program or a work based on
the Program.
To “propagate” a work means to do anything with it that, without
permission, would make you directly or secondarily liable for infringement under
applicable copyright law, except executing it on a computer or modifying a private
copy. Propagation includes copying, distribution (with or without modification),
making available to the public, and in some countries other activities as well.
To “convey” a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through a computer
network, with no transfer of a copy, is not conveying.
An interactive user interface displays “Appropriate Legal Notices” to the
extent that it includes a convenient and prominently visible feature that **(1)**
displays an appropriate copyright notice, and **(2)** tells the user that there is no
warranty for the work (except to the extent that warranties are provided), that
licensees may convey the work under this License, and how to view a copy of this
License. If the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
### 1. Source Code
The “source code” for a work means the preferred form of the work for
making modifications to it. “Object code” means any non-source form of a
work.
A “Standard Interface” means an interface that either is an official
standard defined by a recognized standards body, or, in the case of interfaces
specified for a particular programming language, one that is widely used among
developers working in that language.
The “System Libraries” of an executable work include anything, other than
the work as a whole, that **(a)** is included in the normal form of packaging a Major
Component, but which is not part of that Major Component, and **(b)** serves only to
enable use of the work with that Major Component, or to implement a Standard
Interface for which an implementation is available to the public in source code form.
A “Major Component”, in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system (if any) on which
the executable work runs, or a compiler used to produce the work, or an object code
interpreter used to run it.
The “Corresponding Source” for a work in object code form means all the
source code needed to generate, install, and (for an executable work) run the object
code and to modify the work, including scripts to control those activities. However,
it does not include the work's System Libraries, or general-purpose tools or
generally available free programs which are used unmodified in performing those
activities but which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for the work, and
the source code for shared libraries and dynamically linked subprograms that the work
is specifically designed to require, such as by intimate data communication or
control flow between those subprograms and other parts of the work.
The Corresponding Source need not include anything that users can regenerate
automatically from other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same work.
### 2. Basic Permissions
All rights granted under this License are granted for the term of copyright on the
Program, and are irrevocable provided the stated conditions are met. This License
explicitly affirms your unlimited permission to run the unmodified Program. The
output from running a covered work is covered by this License only if the output,
given its content, constitutes a covered work. This License acknowledges your rights
of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not convey, without
conditions so long as your license otherwise remains in force. You may convey covered
works to others for the sole purpose of having them make modifications exclusively
for you, or provide you with facilities for running those works, provided that you
comply with the terms of this License in conveying all material for which you do not
control copyright. Those thus making or running the covered works for you must do so
exclusively on your behalf, under your direction and control, on terms that prohibit
them from making any copies of your copyrighted material outside their relationship
with you.
Conveying under any other circumstances is permitted solely under the conditions
stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
### 3. Protecting Users' Legal Rights From Anti-Circumvention Law
No covered work shall be deemed part of an effective technological measure under any
applicable law fulfilling obligations under article 11 of the WIPO copyright treaty
adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention
of such measures.
When you convey a covered work, you waive any legal power to forbid circumvention of
technological measures to the extent such circumvention is effected by exercising
rights under this License with respect to the covered work, and you disclaim any
intention to limit operation or modification of the work as a means of enforcing,
against the work's users, your or third parties' legal rights to forbid circumvention
of technological measures.
### 4. Conveying Verbatim Copies
You may convey verbatim copies of the Program's source code as you receive it, in any
medium, provided that you conspicuously and appropriately publish on each copy an
appropriate copyright notice; keep intact all notices stating that this License and
any non-permissive terms added in accord with section 7 apply to the code; keep
intact all notices of the absence of any warranty; and give all recipients a copy of
this License along with the Program.
You may charge any price or no price for each copy that you convey, and you may offer
support or warranty protection for a fee.
### 5. Conveying Modified Source Versions
You may convey a work based on the Program, or the modifications to produce it from
the Program, in the form of source code under the terms of section 4, provided that
you also meet all of these conditions:
* **a)** The work must carry prominent notices stating that you modified it, and giving a
relevant date.
* **b)** The work must carry prominent notices stating that it is released under this
License and any conditions added under section 7. This requirement modifies the
requirement in section 4 to “keep intact all notices”.
* **c)** You must license the entire work, as a whole, under this License to anyone who
comes into possession of a copy. This License will therefore apply, along with any
applicable section 7 additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no permission to license the
work in any other way, but it does not invalidate such permission if you have
separately received it.
* **d)** If the work has interactive user interfaces, each must display Appropriate Legal
Notices; however, if the Program has interactive interfaces that do not display
Appropriate Legal Notices, your work need not make them do so.
A compilation of a covered work with other separate and independent works, which are
not by their nature extensions of the covered work, and which are not combined with
it such as to form a larger program, in or on a volume of a storage or distribution
medium, is called an “aggregate” if the compilation and its resulting
copyright are not used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work in an aggregate
does not cause this License to apply to the other parts of the aggregate.
### 6. Conveying Non-Source Forms
You may convey a covered work in object code form under the terms of sections 4 and
5, provided that you also convey the machine-readable Corresponding Source under the
terms of this License, in one of these ways:
* **a)** Convey the object code in, or embodied in, a physical product (including a
physical distribution medium), accompanied by the Corresponding Source fixed on a
durable physical medium customarily used for software interchange.
* **b)** Convey the object code in, or embodied in, a physical product (including a
physical distribution medium), accompanied by a written offer, valid for at least
three years and valid for as long as you offer spare parts or customer support for
that product model, to give anyone who possesses the object code either **(1)** a copy of
the Corresponding Source for all the software in the product that is covered by this
License, on a durable physical medium customarily used for software interchange, for
a price no more than your reasonable cost of physically performing this conveying of
source, or **(2)** access to copy the Corresponding Source from a network server at no
charge.
* **c)** Convey individual copies of the object code with a copy of the written offer to
provide the Corresponding Source. This alternative is allowed only occasionally and
noncommercially, and only if you received the object code with such an offer, in
accord with subsection 6b.
* **d)** Convey the object code by offering access from a designated place (gratis or for
a charge), and offer equivalent access to the Corresponding Source in the same way
through the same place at no further charge. You need not require recipients to copy
the Corresponding Source along with the object code. If the place to copy the object
code is a network server, the Corresponding Source may be on a different server
(operated by you or a third party) that supports equivalent copying facilities,
provided you maintain clear directions next to the object code saying where to find
the Corresponding Source. Regardless of what server hosts the Corresponding Source,
you remain obligated to ensure that it is available for as long as needed to satisfy
these requirements.
* **e)** Convey the object code using peer-to-peer transmission, provided you inform
other peers where the object code and Corresponding Source of the work are being
offered to the general public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excluded from the
Corresponding Source as a System Library, need not be included in conveying the
object code work.
A “User Product” is either **(1)** a “consumer product”, which
means any tangible personal property which is normally used for personal, family, or
household purposes, or **(2)** anything designed or sold for incorporation into a
dwelling. In determining whether a product is a consumer product, doubtful cases
shall be resolved in favor of coverage. For a particular product received by a
particular user, “normally used” refers to a typical or common use of
that class of product, regardless of the status of the particular user or of the way
in which the particular user actually uses, or expects or is expected to use, the
product. A product is a consumer product regardless of whether the product has
substantial commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
“Installation Information” for a User Product means any methods,
procedures, authorization keys, or other information required to install and execute
modified versions of a covered work in that User Product from a modified version of
its Corresponding Source. The information must suffice to ensure that the continued
functioning of the modified object code is in no case prevented or interfered with
solely because modification has been made.
If you convey an object code work under this section in, or with, or specifically for
use in, a User Product, and the conveying occurs as part of a transaction in which
the right of possession and use of the User Product is transferred to the recipient
in perpetuity or for a fixed term (regardless of how the transaction is
characterized), the Corresponding Source conveyed under this section must be
accompanied by the Installation Information. But this requirement does not apply if
neither you nor any third party retains the ability to install modified object code
on the User Product (for example, the work has been installed in ROM).
The requirement to provide Installation Information does not include a requirement to
continue to provide support service, warranty, or updates for a work that has been
modified or installed by the recipient, or for the User Product in which it has been
modified or installed. Access to a network may be denied when the modification itself
materially and adversely affects the operation of the network or violates the rules
and protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided, in accord with
this section must be in a format that is publicly documented (and with an
implementation available to the public in source code form), and must require no
special password or key for unpacking, reading or copying.
### 7. Additional Terms
“Additional permissions” are terms that supplement the terms of this
License by making exceptions from one or more of its conditions. Additional
permissions that are applicable to the entire Program shall be treated as though they
were included in this License, to the extent that they are valid under applicable
law. If additional permissions apply only to part of the Program, that part may be
used separately under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option remove any
additional permissions from that copy, or from any part of it. (Additional
permissions may be written to require their own removal in certain cases when you
modify the work.) You may place additional permissions on material, added by you to a
covered work, for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you add to a
covered work, you may (if authorized by the copyright holders of that material)
supplement the terms of this License with terms:
* **a)** Disclaiming warranty or limiting liability differently from the terms of
sections 15 and 16 of this License; or
* **b)** Requiring preservation of specified reasonable legal notices or author
attributions in that material or in the Appropriate Legal Notices displayed by works
containing it; or
* **c)** Prohibiting misrepresentation of the origin of that material, or requiring that
modified versions of such material be marked in reasonable ways as different from the
original version; or
* **d)** Limiting the use for publicity purposes of names of licensors or authors of the
material; or
* **e)** Declining to grant rights under trademark law for use of some trade names,
trademarks, or service marks; or
* **f)** Requiring indemnification of licensors and authors of that material by anyone
who conveys the material (or modified versions of it) with contractual assumptions of
liability to the recipient, for any liability that these contractual assumptions
directly impose on those licensors and authors.
All other non-permissive additional terms are considered “further
restrictions” within the meaning of section 10. If the Program as you received
it, or any part of it, contains a notice stating that it is governed by this License
along with a term that is a further restriction, you may remove that term. If a
license document contains a further restriction but permits relicensing or conveying
under this License, you may add to a covered work material governed by the terms of
that license document, provided that the further restriction does not survive such
relicensing or conveying.
If you add terms to a covered work in accord with this section, you must place, in
the relevant source files, a statement of the additional terms that apply to those
files, or a notice indicating where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the form of a
separately written license, or stated as exceptions; the above requirements apply
either way.
### 8. Termination
You may not propagate or modify a covered work except as expressly provided under
this License. Any attempt otherwise to propagate or modify it is void, and will
automatically terminate your rights under this License (including any patent licenses
granted under the third paragraph of section 11).
However, if you cease all violation of this License, then your license from a
particular copyright holder is reinstated **(a)** provisionally, unless and until the
copyright holder explicitly and finally terminates your license, and **(b)** permanently,
if the copyright holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently
if the copyright holder notifies you of the violation by some reasonable means, this
is the first time you have received notice of violation of this License (for any
work) from that copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the licenses of
parties who have received copies or rights from you under this License. If your
rights have been terminated and not permanently reinstated, you do not qualify to
receive new licenses for the same material under section 10.
### 9. Acceptance Not Required for Having Copies
You are not required to accept this License in order to receive or run a copy of the
Program. Ancillary propagation of a covered work occurring solely as a consequence of
using peer-to-peer transmission to receive a copy likewise does not require
acceptance. However, nothing other than this License grants you permission to
propagate or modify any covered work. These actions infringe copyright if you do not
accept this License. Therefore, by modifying or propagating a covered work, you
indicate your acceptance of this License to do so.
### 10. Automatic Licensing of Downstream Recipients
Each time you convey a covered work, the recipient automatically receives a license
from the original licensors, to run, modify and propagate that work, subject to this
License. You are not responsible for enforcing compliance by third parties with this
License.
An “entity transaction” is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an organization, or
merging organizations. If propagation of a covered work results from an entity
transaction, each party to that transaction who receives a copy of the work also
receives whatever licenses to the work the party's predecessor in interest had or
could give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if the predecessor
has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the rights granted or
affirmed under this License. For example, you may not impose a license fee, royalty,
or other charge for exercise of rights granted under this License, and you may not
initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging
that any patent claim is infringed by making, using, selling, offering for sale, or
importing the Program or any portion of it.
### 11. Patents
A “contributor” is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The work thus
licensed is called the contributor's “contributor version”.
A contributor's “essential patent claims” are all patent claims owned or
controlled by the contributor, whether already acquired or hereafter acquired, that
would be infringed by some manner, permitted by this License, of making, using, or
selling its contributor version, but do not include claims that would be infringed
only as a consequence of further modification of the contributor version. For
purposes of this definition, “control” includes the right to grant patent
sublicenses in a manner consistent with the requirements of this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license
under the contributor's essential patent claims, to make, use, sell, offer for sale,
import and otherwise run, modify and propagate the contents of its contributor
version.
In the following three paragraphs, a “patent license” is any express
agreement or commitment, however denominated, not to enforce a patent (such as an
express permission to practice a patent or covenant not to sue for patent
infringement). To “grant” such a patent license to a party means to make
such an agreement or commitment not to enforce a patent against the party.
If you convey a covered work, knowingly relying on a patent license, and the
Corresponding Source of the work is not available for anyone to copy, free of charge
and under the terms of this License, through a publicly available network server or
other readily accessible means, then you must either **(1)** cause the Corresponding
Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the
patent license for this particular work, or **(3)** arrange, in a manner consistent with
the requirements of this License, to extend the patent license to downstream
recipients. “Knowingly relying” means you have actual knowledge that, but
for the patent license, your conveying the covered work in a country, or your
recipient's use of the covered work in a country, would infringe one or more
identifiable patents in that country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or arrangement, you
convey, or propagate by procuring conveyance of, a covered work, and grant a patent
license to some of the parties receiving the covered work authorizing them to use,
propagate, modify or convey a specific copy of the covered work, then the patent
license you grant is automatically extended to all recipients of the covered work and
works based on it.
A patent license is “discriminatory” if it does not include within the
scope of its coverage, prohibits the exercise of, or is conditioned on the
non-exercise of one or more of the rights that are specifically granted under this
License. You may not convey a covered work if you are a party to an arrangement with
a third party that is in the business of distributing software, under which you make
payment to the third party based on the extent of your activity of conveying the
work, and under which the third party grants, to any of the parties who would receive
the covered work from you, a discriminatory patent license **(a)** in connection with
copies of the covered work conveyed by you (or copies made from those copies), or **(b)**
primarily for and in connection with specific products or compilations that contain
the covered work, unless you entered into that arrangement, or that patent license
was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting any implied
license or other defenses to infringement that may otherwise be available to you
under applicable patent law.
### 12. No Surrender of Others' Freedom
If conditions are imposed on you (whether by court order, agreement or otherwise)
that contradict the conditions of this License, they do not excuse you from the
conditions of this License. If you cannot convey a covered work so as to satisfy
simultaneously your obligations under this License and any other pertinent
obligations, then as a consequence you may not convey it at all. For example, if you
agree to terms that obligate you to collect a royalty for further conveying from
those to whom you convey the Program, the only way you could satisfy both those terms
and this License would be to refrain entirely from conveying the Program.
### 13. Use with the GNU Affero General Public License
Notwithstanding any other provision of this License, you have permission to link or
combine any covered work with a work licensed under version 3 of the GNU Affero
General Public License into a single combined work, and to convey the resulting work.
The terms of this License will continue to apply to the part which is the covered
work, but the special requirements of the GNU Affero General Public License, section
13, concerning interaction through a network will apply to the combination as such.
### 14. Revised Versions of this License
The Free Software Foundation may publish revised and/or new versions of the GNU
General Public License from time to time. Such new versions will be similar in spirit
to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies that
a certain numbered version of the GNU General Public License “or any later
version” applies to it, you have the option of following the terms and
conditions either of that numbered version or of any later version published by the
Free Software Foundation. If the Program does not specify a version number of the GNU
General Public License, you may choose any version ever published by the Free
Software Foundation.
If the Program specifies that a proxy can decide which future versions of the GNU
General Public License can be used, that proxy's public statement of acceptance of a
version permanently authorizes you to choose that version for the Program.
Later license versions may give you additional or different permissions. However, no
additional obligations are imposed on any author or copyright holder as a result of
your choosing to follow a later version.
### 15. Disclaimer of Warranty
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE
QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
### 16. Limitation of Liability
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY
COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS
PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE
OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE
WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
### 17. Interpretation of Sections 15 and 16
If the disclaimer of warranty and limitation of liability provided above cannot be
given local legal effect according to their terms, reviewing courts shall apply local
law that most closely approximates an absolute waiver of all civil liability in
connection with the Program, unless a warranty or assumption of liability accompanies
a copy of the Program in return for a fee.
_END OF TERMS AND CONDITIONS_
## How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible use to
the public, the best way to achieve this is to make it free software which everyone
can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them
to the start of each source file to most effectively state the exclusion of warranty;
and each file should have at least the “copyright” line and a pointer to
where the full notice is found.
New-Phone-Who-Dis (NPWD) Copyright (C) 2021 - Kidz, Chip, ROCKY_southpaw, Kire, TasoOneAsia
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short notice like this
when it starts in an interactive mode:
New-Phone-Who-Dis (NPWD) Copyright (C) 2021 - Kidz, Chip, ROCKY_southpaw, Kire, TasoOneAsia
This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type 'show c' for details.
The hypothetical commands `show w` and `show c` should show the appropriate parts of
the General Public License. Of course, your program's commands might be different;
for a GUI interface, you would use an “about box”.
You should also get your employer (if you work as a programmer) or school, if any, to
sign a “copyright disclaimer” for the program, if necessary. For more
information on this, and how to apply and follow the GNU GPL, see
&lt;<http://www.gnu.org/licenses/>&gt;.
The GNU General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may consider it
more useful to permit linking proprietary applications with the library. If this is
what you want to do, use the GNU Lesser General Public License instead of this
License. But first, please read
&lt;<http://www.gnu.org/philosophy/why-not-lgpl.html>&gt;.
+43 -56
View File
@@ -1,79 +1,66 @@
# New Phone README TITLE
# New-Phone-Who-Dis (NPWD)
TODO
<img src="https://beta.iodine.gg/zVkK7.png" width="500" height="300" />
## Production Server Installation
NPWD is our current running project. Our team has been working on the project since August, 2020. This resource isn’t complete yet and currently has no ETA for release. Feel free to test it out in a dev environment by following the installation guide.
Written completely by the Project Error Dev Team in [React](https://reactjs.org/) with a [TypeScript](https://www.typescriptlang.org/) client/server environment.
### Configuration
## Project Error Discord
This resource is highly configurable through the [config.json](./config.json). This JSON file holds configuration for the phone itself, for the apps running on it and peripheral information.
- Join the [Discord](https://discord.gg/HYwBjTbAY5) to follow current development of the project.
Below is the list of configuration options:
## Documentation & Installation
| Option | Default | Description |
|--------------------------------------|----------|--------------------------------------------------------------------------------------------------------------------------------|
| Locale | en | The language locale used by the app. See [fivem keybinds](https://docs.fivem.net/docs/game-references/controls/) for options |
| KeyTogglePhone | 288 (F1) | The keybind to open and close the app. See [fivem keybinds](https://docs.fivem.net/docs/game-references/controls/) for options |
| PhoneAsItem | false | whether or not the phone is an item in game |
| SwimDestroy | false | whether or not the phone will have a chance to be destroyed while swimming |
| RunRate | 10 | interval in seconds to check phone destruction |
| DestoryChance | 100 | Percent chance that phone destruction will occur |
| DestroyPhoneReCheck | 3 | Time in minutes before another phone destruction attempt will happen |
| notificationPosition.horizontal | right | Horizontal position of phone notifications. `left`, `center` or `right` |
| notificationPosition.vertical | bottom | Vertical positon of phone notifications. `top` or `bottom` |
| twitter.showNotifications | true | Whether or not to show twitter notifications |
| twitter.generateProfileNameFromUsers | true | Whether or not the server should automtically generate a player's profile name from their user in the database |
| twitter.allowEdtiableProfileName | true | Whether or not players can edit their profile name |
| twitter.allowDeleteTweets | true | Whether or not players can delete their own tweets |
| twitter.allowReportTweets | true | Whether or not players can report tweets. Optional discord integration. |
| twitter.characterLimit | 240 | Limit on how many characters tweets can contain |
| twitter.enableAvatars | true | Whether or not player's can select avatars for their twitter profile |
| twitter.enableEmojis | true | Whether or not player's can use emojis in tweets |
| twitter.enableImages | true | Whether or not player's can add images to tweets (external URLs) |
| twitter.maxImages | 3 | The maximum amount of images allowed in a tweet |
- [Project-Error Docs](https://docs.projecterror.dev/#/) contains all the information regarding this resource. Please consult it for installation, dependencies, and other important information.
### Discord
## Support
It is possible to perform discord integration with the phone. To configure discord add the following variables to your `server.cfg` file:
No support is being provided currently for the resource as it is still in an unfinished state.
```
set discord_bot_token "YOUR_DISCORD_BOT_TOKEN"
set discord_channel_id "YOUR_DISCORD_CHANNEL_ID"
```
Should you encounter any issues, please do the following:
Current discord integrations with the phone:
- Check the [Git Kraken](https://app.gitkraken.com/glo/board/X9YZ_x_SVQEcMwpH) to see if the issue you're referring to is already tracked.
- Check the [State of Development](https://docs.projecterror.dev/#/npwd/state-of-dev?id=introduction) to see if the app is still a **WIP**.
- If the issue isn't on the Git Kraken and the app is finished, please open an issue.
- If the issue isn't on the Git Kraken and the app is **not** finished, please contact us in Discord.
- Twitter: reporting tweets
We do not want issues opened that are due to the phone being **WIP** as this slows down development since we now have to address it more immediately.
## Preview
## Development
[Latest Teaser Video (October 28th)](https://streamable.com/f1ri9r)
This phone is a [React](https://reactjs.org/) project with a TypeScript client/server environment.
#### Apps (February 20th, 2021)
### Prerequisites
Most of these apps have UI that does **not** represent the final product and are subject to change.
The development environment assumes you have the following prerequisites:
- [**Bank**](https://beta.iodine.gg/Eh53X.png)
- [**Calculator**](https://beta.iodine.gg/s6VQV.png)
- [**Camera**](https://beta.iodine.gg/vW0y9.png)
- [**Contacts**](https://beta.iodine.gg/3fujR.png)
- [**Marketplace**](https://beta.iodine.gg/5bUa8.png)
- [**Messages**](https://beta.iodine.gg/S4Lia.png)
- [**Notes**](https://beta.iodine.gg/qTkBb.png)
- [**Phone**](https://beta.iodine.gg/z0ii9.png)
- [**Settings**](https://beta.iodine.gg/mZAIt.png)
- [**Twitter**](https://beta.iodine.gg/rQZFR.png)
1. A windows environment and Powershell as your default terminal
1. [Git for windows](https://git-scm.com/download/win) installed
1. [LTS node.js](https://nodejs.org/en/about/releases/) installed
1. [yarn](https://yarnpkg.com/) package manager installed (`npm install -g yarn`)
1. A fivem environment that is set up according to the [setting up a server instructions](https://docs.fivem.net/docs/server-manual/setting-up-a-server/) from the fivem documentation
## License
### Development Environment
New-Phone-Who-Dis (NPWD)
#### Steps
Copyright (C) 2021 - Kidz, Chip, ROCKY_southpaw, Kire, TasoOneAsia
1. Clone the repo into your `server-data/resources/[local]` folder
1. Go into the react project: `cd phone`
1. Install node dependencies: `yarn install`
2. Install `lint-staged` globally `npm i -g lint-staged
3. Add the `new-phone-who-dis` app to your `server.cfg`
4. Start your fivem server
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
#### Development iteration cycle:
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
- If iterating on client/server Lua make your change and then `ensure new-phone-who-dis` in the fivem server terminal
- If iteration on UI changes run the project with `yarn watch` which will monitor the JavaScript project and rebuild when you make code changes and then `ensure new-phone-who-dis` after making your change
- Avoid commiting `index.html` as the development version overrides the production version
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
+36 -31
View File
@@ -1,32 +1,37 @@
{
"Locale": "en",
"KeyTogglePhone": 288,
"KeyTakeCall": 38,
"PhoneAsItem": false,
"SwimDestroy": false,
"RunRate": 10,
"DestoryChance": 100,
"DestroyPhoneReCheck": 3,
"notificationPosition": {
"horizontal": "right",
"vertical": "top"
},
"general": {
"useDashNumber": false
},
"twitter": {
"showNotifications": true,
"generateProfileNameFromUsers": true,
"allowEdtiableProfileName": true,
"allowDeleteTweets": true,
"allowReportTweets": true,
"characterLimit": 240,
"enableAvatars": true,
"enableEmojis": true,
"enableImages": true,
"maxImages": 3
},
"bank": {
"showNotifications": true
}
}
"Locale": "en",
"KeyTogglePhone": 288,
"KeyTakeCall": 38,
"PhoneAsItem": false,
"SwimDestroy": false,
"RunRate": 10,
"DestoryChance": 100,
"DestroyPhoneReCheck": 3,
"notificationPosition": {
"horizontal": "right",
"vertical": "top"
},
"general": {
"useDashNumber": true
},
"twitter": {
"showNotifications": true,
"generateProfileNameFromUsers": true,
"allowEdtiableProfileName": true,
"allowDeleteTweets": true,
"allowReportTweets": true,
"characterLimit": 160,
"newLineLimit": 10,
"enableAvatars": true,
"enableEmojis": true,
"enableImages": true,
"maxImages": 3
},
"bank": {
"showNotifications": true
},
"debug": {
"level": "debug",
"enabled": true
}
}
+6 -19
View File
@@ -1,24 +1,13 @@
fx_version "adamant"
fx_version "cerulean"
game "gta5"
description 'New-PHone-Who-Dis'
author { "chip", "BTNGaming", "ROCKY_southpaw" }
description 'js runtime monkaW'
authors { "itschip", "erik-sn", "TasoOneAsia", "kidz", "RockySouthpaw"}
client_script {
'@es_extended/locale.lua',
'resources/locales/*.lua',
'resources/client/*lua',
'resources/dist/client/*.client.js'
}
shared_script {
'resources/config.lua'
}
server_script {
"@mysql-async/lib/MySQL.lua",
'@es_extended/locale.lua',
'resources/locales/*.lua',
'resources/server/*.lua',
'resources/dist/server/*.server.js'
}
@@ -27,8 +16,6 @@ ui_page 'resources/html/index.html'
files {
'resources/html/index.html',
'resources/html/*.js',
'resources/html/media/frames/*.png',
'resources/html/media/backgrounds/*.png',
'resources/html/media/backgrounds/*.jpg',
'resources/html/media/twitter/*'
}
'resources/html/*.map',
'resources/html/media/**/*'
}
+60 -57
View File
@@ -1,6 +1,6 @@
-- comment this out if your server has a different table/location for phone_number
-- or if it already exists in the users table
ALTER TABLE `users` ADD COLUMN `phone_number` VARCHAR(20) NULL DEFAULT NULL;
# comment this out if your server has a different table/location for phone_number
# or if it already exists in the users table
ALTER TABLE `users` ADD COLUMN `phone_number` VARCHAR(20) DEFAULT NULL;
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('phone', 'Phone', 1, 0, 1);
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('dphone', 'Destroyed Phone', 1, 0, 1);
@@ -11,39 +11,36 @@ CREATE TABLE IF NOT EXISTS npwd_phone_contacts (
number varchar(10) DEFAULT NULL,
display varchar(60) NOT NULL DEFAULT '',
PRIMARY KEY (id)
)
ENGINE = INNODB,
AUTO_INCREMENT = 6,
AVG_ROW_LENGTH = 4096,
CHARACTER SET utf8mb4,
COLLATE utf8mb4_0900_ai_ci;
);
CREATE TABLE IF NOT EXISTS `npwd_twitter_tweets` (
`id` int NOT NULL AUTO_INCREMENT,
`message` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`message` varchar(1000) NOT NULL,
`createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updatedAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`likes` int NOT NULL DEFAULT '0',
`identifier` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`identifier` varchar(40) NOT NULL,
`visible` tinyint NOT NULL DEFAULT '1',
`images` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '',
`images` varchar(1000) DEFAULT '',
`retweet` int DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=190 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
);
CREATE TABLE IF NOT EXISTS `npwd_twitter_profiles` (
`id` int NOT NULL AUTO_INCREMENT,
`profile_name` varchar(90) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
`identifier` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`avatar_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
`bio` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
`location` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
`job` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
`profile_name` varchar(90) NOT NULL,
`identifier` varchar(40) NOT NULL,
# Default Profile avatar can be set here
`avatar_url` varchar(255) DEFAULT 'https://beta.iodine.gg/QrEvq.png',
`bio` varchar(512) DEFAULT NULL,
`location` varchar(45) DEFAULT NULL,
`job` varchar(45) DEFAULT NULL,
`createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updatedAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `profile_name_UNIQUE` (`profile_name`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
);
CREATE TABLE IF NOT EXISTS `npwd_twitter_likes` (
`id` int NOT NULL AUTO_INCREMENT,
@@ -55,7 +52,7 @@ CREATE TABLE IF NOT EXISTS `npwd_twitter_likes` (
KEY `tweet_idx` (`tweet_id`),
CONSTRAINT `profile` FOREIGN KEY (`profile_id`) REFERENCES `npwd_twitter_profiles` (`id`),
CONSTRAINT `tweet` FOREIGN KEY (`tweet_id`) REFERENCES `npwd_twitter_tweets` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
);
CREATE TABLE IF NOT EXISTS npwd_notes (
@@ -64,28 +61,28 @@ CREATE TABLE IF NOT EXISTS npwd_notes (
title varchar(255) NOT NULL,
content varchar(255) NOT NULL,
PRIMARY KEY (id)
)
ENGINE = INNODB,
AUTO_INCREMENT = 5,
AVG_ROW_LENGTH = 4096,
CHARACTER SET utf8mb4,
COLLATE utf8mb4_general_ci;
);
CREATE TABLE IF NOT EXISTS npwd_sellout_listings (
CREATE TABLE IF NOT EXISTS npwd_marketplace_listings (
id int(11) NOT NULL AUTO_INCREMENT,
identifier varchar(255) DEFAULT NULL,
username varchar(255) DEFAULT NULL,
name varchar(50) DEFAULT NULL,
number varchar(255) NOT NULL,
title varchar(255) DEFAULT NULL,
url varchar(255) DEFAULT NULL,
description varchar(255) NOT NULL,
createdAt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
updatedAt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id)
)
ENGINE = INNODB,
AUTO_INCREMENT = 26,
AVG_ROW_LENGTH = 2048,
CHARACTER SET utf8mb4,
COLLATE utf8mb4_general_ci;
);
CREATE TABLE IF NOT EXISTS npwd_marketplace_reports (
id int(11) NOT NULL AUTO_INCREMENT,
listing_id int(11) DEFAULT NULL,
profile varchar(255) DEFAULT NULL,
PRIMARY KEY (id)
);
CREATE TABLE IF NOT EXISTS `npwd_twitter_reports` (
`id` int NOT NULL AUTO_INCREMENT,
@@ -97,24 +94,19 @@ CREATE TABLE IF NOT EXISTS `npwd_twitter_reports` (
KEY `tweet_idx` (`tweet_id`),
CONSTRAINT `report_profile` FOREIGN KEY (`profile_id`) REFERENCES `npwd_twitter_profiles` (`id`),
CONSTRAINT `report_tweet` FOREIGN KEY (`tweet_id`) REFERENCES `npwd_twitter_tweets` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
);
CREATE TABLE IF NOT EXISTS `npwd_messages_groups` (
`id` int NOT NULL AUTO_INCREMENT,
`user_identifier` varchar(40) NOT NULL,
`createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updatedAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`group_id` varchar(60) NOT NULL,
`group_id` varchar(512) NOT NULL,
`participant_identifier` varchar(40) NOT NULL,
`label` varchar(60) DEFAULT '',
PRIMARY KEY (`id`),
KEY `npwd_messages_groups_group_id` (`group_id`),
KEY `npwd_messages_groups_user_identifier_idx` (`user_identifier`),
KEY `npwd_messages_groups_participant_identifier_idx` (`participant_identifier`),
CONSTRAINT `npwd_messages_groups_participant_identifier` FOREIGN KEY (`participant_identifier`) REFERENCES `users` (`identifier`),
CONSTRAINT `npwd_messages_groups_user_identifier` FOREIGN KEY (`user_identifier`) REFERENCES `users` (`identifier`)
) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
`unreadCount` int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
);
CREATE TABLE IF NOT EXISTS `npwd_messages_labels` (
`id` int NOT NULL AUTO_INCREMENT,
@@ -122,25 +114,36 @@ CREATE TABLE IF NOT EXISTS `npwd_messages_labels` (
`label` varchar(60) NOT NULL,
`createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updatedAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`group_id` varchar(45) NOT NULL,
PRIMARY KEY (`id`),
KEY `npwd_messages_labels_group_id_idx` (`group_id`),
KEY `npwd_messages_labels_group_id_idx1` (`user_identifier`),
CONSTRAINT `npwd_messages_labels_group_id` FOREIGN KEY (`group_id`) REFERENCES `npwd_messages_groups` (`group_id`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
`group_id` varchar(512) NOT NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE IF NOT EXISTS `npwd_messages` (
`id` int NOT NULL AUTO_INCREMENT,
`message` varchar(512) NOT NULL,
`user_identifier` varchar(40) NOT NULL,
`group_id` varchar(60) NOT NULL,
`group_id` varchar(512) NOT NULL,
`isRead` tinyint NOT NULL DEFAULT '0',
`createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updatedAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`visible` tinyint NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `messages_identifier_idx` (`user_identifier`),
KEY `npwd_messages_group_id_idx` (`group_id`),
CONSTRAINT `npwd_messages_group_id` FOREIGN KEY (`group_id`) REFERENCES `npwd_messages_groups` (`group_id`),
CONSTRAINT `npwd_messages_user_identifier` FOREIGN KEY (`user_identifier`) REFERENCES `users` (`identifier`)
) ENGINE=InnoDB AUTO_INCREMENT=120 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
PRIMARY KEY (`id`)
);
CREATE TABLE IF NOT EXISTS npwd_calls (
id int(11) NOT NULL AUTO_INCREMENT,
identifier varchar(255) DEFAULT NULL,
transmitter varchar(255) NOT NULL,
receiver varchar(255) NOT NULL,
is_accepted tinyint(4) DEFAULT 0,
start varchar(255) DEFAULT NULL,
end varchar(255) DEFAULT NULL,
PRIMARY KEY (id)
);
CREATE TABLE IF NOT EXISTS npwd_phone_gallery (
id int(11) NOT NULL AUTO_INCREMENT,
identifier varchar(255) DEFAULT NULL,
image varchar(255) DEFAULT NULL,
PRIMARY KEY (id)
);
+5
View File
@@ -0,0 +1,5 @@
{
"packages": ["phone", "resources"],
"version": "0.0.0",
"npmClient": "yarn"
}
+19
View File
@@ -0,0 +1,19 @@
{
"name": "npwd",
"devDependencies": {
"husky": "^5.1.3",
"lerna": "^3.22.1",
"prettier": "^2.2.1",
"pretty-quick": "^3.1.0"
},
"scripts": {
"build": "lerna run build --concurrency 1",
"prepare": "husky install",
"format": "pretty-quick"
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
}
}
+1 -4
View File
@@ -8,8 +8,5 @@
],
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-syntax-dynamic-import"
]
"plugins": ["@babel/plugin-proposal-class-properties", "@babel/plugin-syntax-dynamic-import"]
}
-23
View File
@@ -1,23 +0,0 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# production
/build
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
-2
View File
@@ -1,2 +0,0 @@
build
node_modules
+2 -1
View File
@@ -1,2 +1,3 @@
# New Phone Who Dis
A FiveM phone created with ReactJS, with the power from BTNGaming, kidz, ROCKY_shouthpaw and chip.
A FiveM phone created with ReactJS, with the power from TasoOneAsia, erik-sn (Kire), jfrader (kidz), r1OG, RockySouthpaw and itschip. Still missing commits from 99kr.
+58
View File
@@ -0,0 +1,58 @@
const {
addAfterLoader,
removeLoaders,
loaderByName,
getLoaders,
throwUnexpectedConfigError,
} = require('@craco/craco');
const throwError = (message) =>
throwUnexpectedConfigError({
packageName: 'craco',
githubRepo: 'gsoft-inc/craco',
message,
githubIssueQuery: 'webpack',
});
module.exports = {
webpack: {
configure: (webpackConfig, { paths }) => {
const { hasFoundAny, matches } = getLoaders(webpackConfig, loaderByName('babel-loader'));
if (!hasFoundAny) throwError('failed to find babel-loader');
const { hasRemovedAny, removedCount } = removeLoaders(
webpackConfig,
loaderByName('babel-loader'),
);
if (!hasRemovedAny) throwError('no babel-loader to remove');
if (removedCount !== 2) throwError('had expected to remove 2 babel loader instances');
webpackConfig.resolve.plugins = webpackConfig.resolve.plugins.filter(
({ constructor: c }) => !c || c.name !== 'ModuleScopePlugin',
);
const tsLoader = {
test: /\.tsx?$/,
loader: require.resolve('ts-loader'),
options: { transpileOnly: true },
};
const { isAdded: tsLoaderIsAdded } = addAfterLoader(
webpackConfig,
loaderByName('url-loader'),
tsLoader,
);
if (!tsLoaderIsAdded) throwError('failed to add ts-loader');
const { isAdded: babelLoaderIsAdded } = addAfterLoader(
webpackConfig,
loaderByName('ts-loader'),
matches[1].loader, // babel-loader
);
if (!babelLoaderIsAdded) throwError('failed to add back babel-loader for non-application JS');
return webpackConfig;
},
},
};
+77
View File
@@ -0,0 +1,77 @@
const args = process.argv.slice(2);
console.log(args);
const path = './src/locale/';
const langs = ['bs', 'no', 'es', 'fr', 'pt', 'ptbr', 'sv', 'tr'];
const defaultLang = 'en';
const langFiles = [];
let defaultLangFile;
const missingKeys = {};
const promises = langs
.filter((l) => (args[0] ? args[0] === l : true))
.map((l) => {
return new Promise((res, rej) => {
import(path + l + '.json')
.then((module) => {
langFiles.push(module.default.translation);
res();
})
.catch((e) => {
console.error(e);
rej(e);
});
});
});
const Load = () => Promise.all(promises);
const LoadDefault = () =>
new Promise((res, rej) => {
import(path + defaultLang + '.json')
.then((module) => {
defaultLangFile = module.default.translation;
res();
})
.catch((e) => {
console.error(e);
rej(e);
});
});
(async () => {
const filteredLangs = langs.filter((l) => (args[0] ? args[0] === l : true));
await LoadDefault();
await Load();
let idx = 0;
for (const file of langFiles) {
const currLang = filteredLangs[idx];
if (currLang === defaultLang) {
return;
}
idx++;
if (args[0] && args[0] !== currLang) {
return;
}
missingKeys[currLang] = [];
for (const dKey in defaultLangFile) {
let exists = false;
for (const key in file) {
if (key === dKey) {
exists = true;
}
}
if (!exists) {
missingKeys[currLang].push([dKey, defaultLangFile[dKey]]);
}
}
}
console.log(missingKeys);
})();
+33 -18
View File
@@ -1,10 +1,11 @@
{
"name": "new-phone",
"name": "npwd-nui",
"version": "0.1.0",
"private": true,
"repository": "https://github.com/project-error/new-phone-who-dis",
"private": false,
"license": "CC-BY-NC-SA-4.0",
"dependencies": {
"@babel/polyfill": "^7.4.4",
"@fortawesome/fontawesome-free": "^5.15.1",
"@fortawesome/fontawesome-svg-core": "^1.2.32",
"@fortawesome/free-brands-svg-icons": "^5.15.1",
"@fortawesome/free-solid-svg-icons": "^5.15.1",
@@ -13,25 +14,27 @@
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "^4.0.0-alpha.56",
"@popperjs/core": "^2.5.3",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1",
"@types/jest": "^26.0.14",
"core-js": "^3.6.5",
"@sentry/react": "^5.29.2",
"@sentry/tracing": "^5.29.2",
"core-js": "^3.8.3",
"dayjs": "^1.10.4",
"dompurify": "^2.2.6",
"emoji-mart": "^3.0.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.5",
"howler": "^2.2.1",
"i18next": "^19.7.0",
"prettier": "^2.0.5",
"jsonschema": "^1.4.0",
"parse-url": "^5.0.2",
"qs": "^6.9.6",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-hotkeys": "^2.0.0",
"react-i18next": "^11.7.1",
"react-popper": "^2.2.3",
"react-router-dom": "^5.2.0",
"react-scripts": "3.4.3",
"recoil": "^0.0.10",
"styled-components": "^5.1.1"
"react-scripts": "4.0.1",
"recoil": "^0.1.2"
},
"devDependencies": {
"@babel/cli": "^7.4.4",
@@ -40,21 +43,32 @@
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/preset-env": "^7.4.5",
"@babel/preset-react": "^7.0.0",
"@craco/craco": "^6.1.1",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1",
"@types/enzyme": "^3.10.7",
"@types/howler": "^2.2.1",
"@types/jest": "^26.0.14",
"@types/node": "^14.11.5",
"@types/qs": "^6.9.5",
"@types/react": "^16.9.51",
"@types/react-dom": "^16.9.8",
"@types/react-router-dom": "^5.1.7",
"babel-eslint": "^10.0.1",
"babel-loader": "^8.1.0",
"babel-plugin-styled-components": "^1.10.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"copy-webpack-plugin": "6.2.1",
"cp-cli": "^2.0.0",
"cra-build-watch": "^3.2.0",
"cross-env": "^7.0.2",
"css-loader": "^2.1.1",
"customize-cra": "^1.0.0",
"file-loader": "^3.0.1",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^4.3.0",
"ifdef-loader": "^2.1.5",
"react-devtools": "^4.10.1",
"react-test-renderer": "^16.13.1",
"style-loader": "^0.23.1",
"svg-url-loader": "^2.3.2",
@@ -65,12 +79,13 @@
"webpack-cli": "^3.3.12"
},
"scripts": {
"start": "react-scripts start",
"i18n:missing": "node --experimental-json-modules i18n.missingKeys.js",
"copy:config": "cp-cli ../config.json ./src/config.autogen.json",
"start": "craco 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": "react-scripts build",
"build:resources": "cross-env NODE_ENV=production webpack --config webpack/webpack.resources.js --color -p --progress --hide-modules --display-optimization-bailout",
"test": "react-scripts test --watchAll=false --testMatch **/src/**/*.test.{ts,js,tsx}",
"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": "craco 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"
},
-10
View File
@@ -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
}
+5 -2
View File
@@ -2,10 +2,13 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" />
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
/>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>ReIgnited React Phone</title>
<title>Project Error - New Phone Who Dis</title>
</head>
<body>
<div id="root"></div>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 381 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.
Binary file not shown.
+5 -6
View File
@@ -1,12 +1,12 @@
.PhoneWrapper {
width: 100vw;
height: 100vh;
position: relative;
}
.Phone {
position: absolute;
bottom: 0vh;
right: 0vh;
right: 0;
width: 500px;
height: 1000px;
background-size: cover;
@@ -24,8 +24,6 @@
overflow: hidden;
position: absolute;
background-color: black;
border-left: 4px solid black;
border-right: 4px solid black;
bottom: 100px;
left: 50px;
right: 50px;
@@ -35,6 +33,7 @@
background-position: center;
background-size: cover;
background-repeat: no-repeat;
border-radius: 20px;
}
.PhoneAppContainer {
@@ -49,12 +48,12 @@
}
*::-webkit-scrollbar-track {
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
background-color: #f5f5f5;
background-color: #666;
}
*::-webkit-scrollbar {
width: 3px;
background-color: transparent;
}
*::-webkit-scrollbar-thumb {
background-color: #666;
background-color: #f5f5f5;
}
+6 -6
View File
@@ -1,12 +1,12 @@
import React from "react";
import { RecoilRoot } from "recoil";
import { shallow } from "enzyme";
import Phone from "./Phone";
import React from 'react';
import { RecoilRoot } from 'recoil';
import { shallow } from 'enzyme';
import Phone from './Phone';
it("renders Phone", () => {
it('renders Phone', () => {
shallow(
<RecoilRoot>
<Phone />
</RecoilRoot>
</RecoilRoot>,
);
});
+109 -275
View File
@@ -1,14 +1,11 @@
import React from 'react';
import React, { useEffect } from 'react';
import './Phone.css';
import './i18n';
import { Route } from 'react-router-dom';
import { useSettings } from './apps/settings/hooks/useSettings';
import MessageIcon from '@material-ui/icons/Email';
import { CallModal } from './modal/components/CallModal';
import { CallModal } from './os/call/components/CallModal';
import { HomeApp } from './apps/home/components/Home';
import { ThemeProvider } from '@material-ui/core';
import { useInitKeyboard } from './os/keyboard/hooks/useKeyboard';
import { NotificationIcon } from './os/notifications/components/NotificationIcon';
import { Box, Paper, Slide, Typography } from '@material-ui/core';
import { useKeyboardService } from './os/keyboard/hooks/useKeyboardService';
import { NotificationBar } from './os/notifications/components/NotificationBar';
import { Navigation } from './os/navigation-bar/components/Navigation';
import { useNuiService } from './os/nui-events/hooks/useNuiService';
@@ -23,305 +20,142 @@ import { useBankService } from './apps/bank/hooks/useBankService';
import { useMessagesService } from './apps/messages/hooks/useMessageService';
import { useNotesService } from './apps/notes/hooks/useNotesService';
import { usePhotoService } from './apps/camera/hooks/usePhotoService';
import Nui from './os/nui-events/utils/Nui';
import { isSettingsSchemaValid, useSettings } from './apps/settings/hooks/useSettings';
import { useCallService } from './os/call/hooks/useCallService';
import { useDialService } from './apps/dialer/hooks/useDialService';
import InjectDebugData from './os/debug/InjectDebugData';
import { usePhoneVisibility } from './os/phone/hooks/usePhoneVisibility';
import { PhoneSnackbar } from './ui/components/PhoneSnackbar';
import { NotificationAlert } from './os/notifications/components/NotificationAlert';
import { useCallModal } from './os/call/hooks/useCallModal';
import WindowSnackbar from './ui/components/WindowSnackbar';
import { usePhone } from './os/phone/hooks/usePhone';
// Inject mock data when in development env.
if (process.env.NODE_ENV === 'development') {
setTimeout(() => {
window.dispatchEvent(
new MessageEvent('message', {
data: {
app: 'CAMERA',
method: 'setPhotos',
data: [
{
id: 1,
image: 'https://i.imgur.com/OO8wx6Z.jpg',
},
{
id: 1,
image: 'https://i.imgur.com/pqGBiST.jpg',
},
],
},
})
);
}, 1000);
setTimeout(() => {
window.dispatchEvent(
new MessageEvent('message', {
data: {
app: 'BANK',
method: 'setCredentials',
data: {
name: 'Firstname Lastname',
balance: 2000,
},
},
})
);
}, 1000);
setTimeout(() => {
window.dispatchEvent(
new MessageEvent('message', {
data: {
app: 'CONTACTS',
method: 'setContacts',
data: [
{
id: 1,
display: 'Ruqen',
number: '43534444',
},
{
id: 1,
display: 'Taso',
number: '43534444',
},
],
},
})
);
}, 1000);
setTimeout(() => {
window.dispatchEvent(
new MessageEvent('message', {
data: {
app: 'SIMCARD',
method: 'setNumber',
data: '111-1134',
},
})
);
}, 1000);
setTimeout(() => {
window.dispatchEvent(
new MessageEvent('message', {
data: {
app: 'PHONE',
method: 'setVisibility',
data: true,
},
})
);
}, 1000);
setTimeout(() => {
window.dispatchEvent(
new MessageEvent('message', {
data: {
app: 'NOTES',
method: 'setNotes',
data: [
{
id: 1,
title: 'First note',
content: 'Hello, this is my shitty note',
},
{
id: 2,
title: 'Second note',
content: 'Hello, this is another shitty note',
},
],
},
})
);
}, 1000);
setTimeout(() => {
window.dispatchEvent(
new MessageEvent('message', {
data: {
app: 'BANK',
method: 'setNotification',
data: {
id: 1,
message: 'ahhaha',
},
},
})
);
}, 1000);
setTimeout(() => {
new MessageEvent('messsage', {
data: {
app: 'TWITTER',
method: 'setNotification',
data: {
id: 1,
message: 'ahhaha',
},
},
});
}, 1000);
setTimeout(() => {
window.dispatchEvent(
new MessageEvent('message', {
data: {
app: 'BANK',
method: 'setTransaction',
data: [
{
id: 1,
amount: 200,
type: 'Deposit',
source: 'chip',
},
{
id: 2,
amount: 200,
type: 'Withdraw',
source: 'chip',
},
{
id: 3,
amount: 200,
type: 'Withdraw',
source: 'chip',
},
{
id: 4,
amount: 50,
type: 'Deposit',
source: 'chip',
},
{
id: 4,
amount: 50,
type: 'Deposit',
source: 'chip',
},
{
id: 4,
amount: 50,
type: 'Deposit',
source: 'chip',
},
],
},
})
);
}, 1000);
setTimeout(() => {
window.dispatchEvent(
new MessageEvent('message', {
data: {
app: 'SELLOUT',
method: 'setListings',
data: [
{
id: 1,
name: 'Some guy',
number: '123-4567',
title: 'Car',
category: 'CAR',
description: 'Selling this cool car',
url: 'https://i.imgur.com/ROmGTwi.jpeg',
price: 400,
posted: '1/9/2021',
},
{
id: 2,
name: 'Some other dude',
number: '666-6666',
title: 'Material',
description:
'Selling my wife olsdfjsdfk jfksdaj kasjfksf jdkasf jklasf jasklf jaskf',
url: '',
price: 30,
},
],
},
})
);
}, 1000);
}
import { useTranslation } from 'react-i18next';
import { useSnackbar } from './ui/hooks/useSnackbar';
function Phone() {
const { t, i18n } = useTranslation();
const { apps } = useApps();
const [settings] = useSettings();
const { addAlert } = useSnackbar();
// Set language from local storage
// This will only trigger on first mount & settings changes
useEffect(() => {
i18n.changeLanguage(settings.language.value).catch((e) => console.error(e));
}, [i18n, settings.language]);
useEffect(() => {
if (!isSettingsSchemaValid()) {
addAlert({
message: t('SETTINGS.MESSAGES.INVALID_SETTINGS'),
type: 'error',
});
}
// We only want to run this on first mount of the phone,
// so we leave an empty dep array. Otherwise, we hit a max depth error.
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
useNuiService();
useKeyboardService();
usePhoneService();
const { visibility } = usePhone();
const { settings, currentTheme } = useSettings();
const { allApps } = useApps();
useSimcardService();
useContactsService();
useTwitterService();
useInitKeyboard();
useSelloutService();
useBankService();
useMessagesService();
useNotesService();
usePhotoService();
useCallService();
useDialService();
if (visibility === false) {
return null;
}
const calling = false;
document.onkeyup = function (data) {
if (data.which == 27) {
Nui.send('phone:close');
}
};
const { modal: callModal } = useCallModal();
const { bottom, visibility } = usePhoneVisibility();
const { isPhoneReady } = usePhone();
return (
<ThemeProvider theme={currentTheme()}>
<div className='PhoneWrapper'>
<div style={{ zoom: settings.zoom }}>
<div className='Phone'>
<div>
<WindowSnackbar />
<Slide direction="up" timeout={{ enter: 500, exit: 500 }} in={visibility}>
<div className="PhoneWrapper">
<div
className="Phone"
style={{
position: 'fixed',
transformOrigin: 'right bottom',
transform: `scale(${settings.zoom.value}`,
bottom,
}}
>
<div
className='PhoneFrame'
className="PhoneFrame"
style={{
backgroundImage: `url(./media/frames/${settings.frame})`,
backgroundImage: `url(media/frames/${settings.frame.value})`,
}}
></div>
/>
<div
id='phone'
className='PhoneScreen'
id="phone"
className="PhoneScreen"
style={{
backgroundImage: `url(./media/backgrounds/${settings.wallpaper})`,
backgroundImage: `url(media/backgrounds/${settings.wallpaper.value})`,
}}
>
<>
<NotificationBar
notifications={[
{
key: 'newMessage',
icon: <NotificationIcon Icon={MessageIcon} />,
},
]}
/>
<div className='PhoneAppContainer'>
{calling ? (
<CallModal />
) : (
{isPhoneReady ? (
<>
<NotificationBar />
<div className="PhoneAppContainer">
<>
<Route exact path='/' component={HomeApp} />
{allApps.map((App) => (
<Route exact path="/" component={HomeApp} />
{callModal && <Route exact path="/call" component={CallModal} />}
{apps.map((App) => (
<App.Route key={App.id} />
))}
</>
)}
</div>
<Navigation />
</>
<NotificationAlert />
<PhoneSnackbar />
</div>
<Navigation />
</>
) : (
<Box
component={Paper}
height="100%"
width="100%"
display="flex"
flexDirection="column"
alignItems="center"
justifyContent="center"
>
<Typography paragraph variant="h6">
NPWD {t('INITIALIZING')}
</Typography>
<Typography paragraph>{t('GENERIC_WAIT')}</Typography>
</Box>
)}
</div>
</div>
</div>
</div>
</ThemeProvider>
</Slide>
</div>
);
}
export default Phone;
InjectDebugData([
{
app: 'PHONE',
method: 'setVisibility',
data: true,
},
{
app: 'PHONE',
method: 'setPhoneReady',
data: true,
},
]);
+22
View File
@@ -0,0 +1,22 @@
import React from 'react';
import { ThemeProvider } from '@material-ui/core';
import { NotificationsProvider } from './os/notifications/providers/NotificationsProvider';
import { usePhoneTheme } from './os/phone/hooks/usePhoneTheme';
import SnackbarProvider from './ui/providers/SnackbarProvider';
import Phone from './Phone';
import { SoundProvider } from './os/sound/providers/SoundProvider';
export const PhoneContainer = () => {
const currentTheme = usePhoneTheme();
return (
<ThemeProvider theme={currentTheme}>
<SoundProvider>
<NotificationsProvider>
<SnackbarProvider>
<Phone />
</SnackbarProvider>
</NotificationsProvider>
</SoundProvider>
</ThemeProvider>
);
};
+7 -8
View File
@@ -1,4 +1,4 @@
@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap");
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');
/* #### Generated By: http://www.cufonfonts.com #### */
@@ -7,10 +7,11 @@
font-style: normal;
font-weight: normal;
src: local('Bahnschrift Regular'), url('../fonts/BAHNSCHRIFT.woff') format('woff');
}
}
#account-section, #transaction-section {
font-family: 'Bahnschrift Regular'
#account-section,
#transaction-section {
font-family: 'Bahnschrift Regular';
}
#transaction-section .MuiTablePagination-root {
@@ -26,12 +27,10 @@
font-size: 50px;
}
#bank-app .Mui-selected {
color: #388CF8 !important;
color: #388cf8 !important;
}
#bank-app .MuiSnackbar-root {
position: absolute;
}
@@ -47,4 +46,4 @@
#actionButton a {
color: #fff;
}
}
+60 -20
View File
@@ -1,27 +1,73 @@
import React from 'react';
import { makeStyles, Paper, Typography } from '@material-ui/core';
import { makeStyles } from '@material-ui/core';
import { BankTitle } from './BankTitle';
import { AppWrapper } from '../../../ui/components';
import { AppContent } from '../../../ui/components/AppContent';
import { Button } from '../../../ui/components/Button';
import { useTranslation } from 'react-i18next';
import { useTransactions } from '../hooks/useTransactions';
import './BankApp.css';
import { TransferModal } from './transfers/TransferModal';
import { useBankModal } from '../hooks/useBankModal';
import { useCredentials } from '../hooks/useCredentials';
import { Switch, Route } from 'react-router-dom';
// image
import CreditCard from '../img/credit-card.png';
import { NavigationBar } from './navigation/NavigationBar';
import { BankHome } from './home/BankHome';
import { BankAccount } from './account/BankAccount';
import { TransactionList } from './transactions/TransactionList';
import { BankAlert } from './alert/BankAlert';
import InjectDebugData from '../../../os/debug/InjectDebugData';
InjectDebugData([
{
app: 'BANK',
method: 'setCredentials',
data: {
name: 'Firstname Lastname',
balance: 2000,
},
},
{
app: 'BANK',
method: 'setTransaction',
data: [
{
id: 1,
amount: 200,
type: 'Deposit',
source: 'chip',
},
{
id: 2,
amount: 200,
type: 'Withdraw',
source: 'chip',
},
{
id: 3,
amount: 200,
type: 'Withdraw',
source: 'chip',
},
{
id: 4,
amount: 50,
type: 'Deposit',
source: 'chip',
},
{
id: 4,
amount: 50,
type: 'Deposit',
source: 'chip',
},
{
id: 4,
amount: 50,
type: 'Deposit',
source: 'chip',
},
],
},
]);
const useStyles = makeStyles((theme) => ({
root: {
@@ -49,26 +95,20 @@ const useStyles = makeStyles((theme) => ({
}));
export const BankApp = () => {
const { showBankModal, setShowBankModal } = useBankModal();
const { t } = useTranslation();
const { showBankModal } = useBankModal();
const classes = useStyles();
const openTransactionsModal = () => {
setShowBankModal(true);
};
return (
<AppWrapper id='bank-app'>
<AppWrapper id="bank-app">
<BankTitle />
<TransferModal />
<div className={showBankModal ? classes.backgroundModal : undefined} />
<AppContent>
<Switch>
<Route path='/bank' exact component={BankHome} />
<Route path='/bank/account' exact component={BankAccount} />
<Route path='/bank/transactions' exact component={TransactionList} />
<Route path="/bank" exact component={BankHome} />
<Route path="/bank/account" exact component={BankAccount} />
<Route path="/bank/transactions" exact component={TransactionList} />
</Switch>
<BankAlert />
</AppContent>
<NavigationBar />
</AppWrapper>
+2 -3
View File
@@ -1,7 +1,6 @@
import React from 'react';
import Paper from '@material-ui/core/Paper';
import { Typography, makeStyles } from '@material-ui/core';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import './BankApp.css';
@@ -24,8 +23,8 @@ const useStyles = makeStyles((theme) => ({
export const BankTitle = () => {
const classes = useStyles();
return (
<Paper className={classes.root} square variant='outlined' elevation={24}>
<Typography id='bank-title' style={{ margin: 0 }} variant='h4'>
<Paper className={classes.root} square variant="outlined" elevation={24}>
<Typography id="bank-title" style={{ margin: 0 }} variant="h4">
WhoDis Banking
</Typography>
</Paper>
@@ -1,6 +1,6 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import { makeStyles, Paper, Typography, Button } from '@material-ui/core';
import { Button } from '@material-ui/core';
import { useTransactions } from '../../hooks/useTransactions';
import useStyles from './account.styles';
@@ -13,15 +13,13 @@ export const AccountTransactions = (): any => {
Transfer: classes.depositType,
};
const { transactionList } = useTransactions();
const transactionList = useTransactions();
const { t } = useTranslation();
return (
<div id='account-section'>
<div id="account-section">
<div className={classes.header}>
<h2 className={classes.title}>{t('APPS_BANK_ACCOUNT_TRANSACTIONS')}</h2>
<Button className={classes.seeAll}>
{t('APPS_BANK_ACCOUNT_SEE_TRANSACTION')}
</Button>
<Button className={classes.seeAll}>{t('APPS_BANK_ACCOUNT_SEE_TRANSACTION')}</Button>
</div>
<div className={classes.transcationDiv}>
@@ -33,7 +31,7 @@ export const AccountTransactions = (): any => {
</div>
<div>
<p className={TransactionTypes[transaction.type]}>
{transaction.type == 'Withdraw' ? '-' : '+'}
{transaction.type === 'Withdraw' ? '-' : '+'}
{transaction.amount}
</p>
</div>
@@ -1,6 +1,5 @@
import React from 'react';
import { Button } from '../../../../ui/components/Button';
import { makeStyles, Paper, Typography } from '@material-ui/core';
import { makeStyles } from '@material-ui/core';
import { useTranslation } from 'react-i18next';
import { BankCard } from './BankCard';
import { AccountTransactions } from './AccountTransactions';
@@ -19,18 +18,14 @@ const useStyles = makeStyles((theme) => ({
export const BankAccount = () => {
const classes = useStyles();
const { credentials } = useCredentials();
const credentials = useCredentials();
const { t } = useTranslation();
return (
<div className={classes.root}>
<div>
<h1 className={classes.title}>{t('APPS_BANK_ACCOUNT_TITLE')}</h1>
</div>
<BankCard
name={credentials.name}
account='Checking'
balance={credentials.balance}
/>
<BankCard name={credentials.name} account="Checking" balance={credentials.balance} />
<AccountTransactions />
</div>
);
@@ -1,8 +0,0 @@
import React from "react";
import MuiAlert from "@material-ui/lab/Alert";
export function Alert(props) {
return <MuiAlert elevation={6} variant="filled" {...props} />;
}
export default Alert;
@@ -1,43 +0,0 @@
import React, { useState, useEffect } from 'react';
import { useBankAlert } from '../../hooks/useBankAlert';
import Snackbar from '@material-ui/core/Snackbar';
import Alert from './Alert';
import { useTranslation } from 'react-i18next';
export const BankAlert = () => {
const { t } = useTranslation();
const [open, setOpen] = useState(false);
const { bankAlert, setBankAlert } = useBankAlert();
const [message, setMessage] = useState(null);
const [severity, setSeverity] = useState('');
const _handleClose = () => {
setOpen(false);
setBankAlert(null);
};
useEffect(() => {
if (bankAlert === true) {
setOpen(true);
setMessage(t('APPS_BANK_ALERT_TRANSFER_SUCCESS'));
setSeverity('success');
} else if (bankAlert === false) {
setOpen(true);
setMessage(t('APPS_BANK_ALERT_TRANSFER_FAILURE'));
setSeverity('error');
}
}, [bankAlert]);
return (
<Snackbar
style={{ width: '80%' }}
open={open}
autoHideDuration={6000}
onClose={_handleClose}
>
<Alert onClose={_handleClose} severity={severity}>
{message}
</Alert>
</Snackbar>
);
};
@@ -12,7 +12,7 @@ import useStyles from './home.styles';
export const BankHome = () => {
const classes = useStyles();
const { setShowBankModal } = useBankModal();
const { credentials } = useCredentials();
const credentials = useCredentials();
const { t } = useTranslation();
const openTransactionsModal = () => {
@@ -24,21 +24,17 @@ export const BankHome = () => {
return (
<div className={classes.root}>
<Typography className={classes.headTitle}>
<span style={{ fontWeight: 'bold' }}>{t('APPS_BANK_HOME_TITLE')}</span>,{' '}
{credentials.name}
<span style={{ fontWeight: 'bold' }}>{t('APPS_BANK_HOME_TITLE')}</span>, {credentials.name}
</Typography>
<div className={classes.accounts}>
<h2 className={classes.accountsType}>Checking:</h2>
<p className={classes.accountBalance}>{credentials.balance}</p>
</div>
<div className={classes.actions}>
<Button id='actionButton' className={classes.actionButton}>
<NavLink to='/bank/account'>{t('APPS_BANK_ACCOUNT_LINK')}</NavLink>
<Button id="actionButton" className={classes.actionButton}>
<NavLink to="/bank/account">{t('APPS_BANK_ACCOUNT_LINK')}</NavLink>
</Button>
<Button
onClick={openTransactionsModal}
className={classes.actionButton}
>
<Button onClick={openTransactionsModal} className={classes.actionButton}>
{t('APPS_BANK_ACTIONS_TRANSFER')}
</Button>
</div>
@@ -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 = () => {
<BottomNavigationAction
component={Link}
icon={<FontAwesomeIcon icon={faHome} />}
to='/bank'
to="/bank"
/>
<BottomNavigationAction
component={Link}
icon={<FontAwesomeIcon icon={faMoneyCheck} />}
to='/bank/account'
to="/bank/account"
/>
<BottomNavigationAction
component={Link}
icon={<FontAwesomeIcon icon={faList} />}
to='/bank/transactions'
to="/bank/transactions"
/>
</BottomNavigation>
);
@@ -1,48 +0,0 @@
import React, { useEffect, useState } from 'react';
import Notification from '../../../../ui/components/Notification';
import { usePhone } from '../../../../os/phone/hooks/usePhone';
import { useTranslation } from 'react-i18next';
import useStyles from './notification.style';
import { useBankNotification } from '../../hooks/useBankNotification';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faWonSign } from '@fortawesome/free-solid-svg-icons';
export const BankNotification = () => {
const { notification } = useBankNotification();
const classes = useStyles();
const { t } = useTranslation();
const [visible, setVisible] = useState(false);
const { config } = usePhone();
useEffect(() => {
if (notification) {
setVisible(true);
}
}, [notification?.id]);
if (!config?.bank.showNotifications || !notification) return null;
return (
<Notification
key={notification.id}
open={visible}
handleClose={() => setVisible(false)}
>
<div className={classes.content}>
<div className={classes.title}>
<div className={classes.titleLeft}>
<div className={classes.icon}>
<FontAwesomeIcon icon={faWonSign} />
</div>
<div className={classes.heading}>{notification.type}</div>
</div>
<div className={classes.justNow}>{t('APPS_BANK_TIME_JUST_NOW')}</div>
</div>
<div className={classes.message}>
{notification.source} sent you ${notification.transferAmount}.{' '}
<br></br> {notification.message}
</div>
</div>
</Notification>
);
};
@@ -1,43 +0,0 @@
import { makeStyles, createStyles, Theme } from '@material-ui/core/styles';
const useStyles = makeStyles((theme: Theme) =>
createStyles({
content: {
padding: theme.spacing(2),
overflowY: 'hidden',
},
title: {
display: 'flex',
flexFlow: 'row nowrap',
justifyContent: 'space-between',
alignItems: 'center',
},
titleLeft: {
display: 'flex',
flexFlow: 'row nowrap',
justifyContent: 'flex-start',
alignItems: 'center',
},
icon: {
marginTop: '3px',
marginRight: '5px',
},
heading: {
marginBottom: '3px',
},
justNow: {
fontSize: '18px',
fontStyle: 'italic',
paddingRight: '3px',
},
message: {
fontSize: '16px',
overflow: 'hidden',
display: '-webkit-box',
WebkitLineClamp: 2,
WebkitBoxOrient: 'vertical',
},
})
);
export default useStyles;
@@ -5,7 +5,7 @@ import TablePagination from '@material-ui/core/TablePagination';
import { useTransactions } from '../../hooks/useTransactions';
export const TransactionList = () => {
const { transactionList } = useTransactions();
const transactionList = useTransactions();
const { t } = useTranslation();
const classes = useStyles();
const [page, setPage] = useState(0);
@@ -27,7 +27,7 @@ export const TransactionList = () => {
};
return (
<div id='transaction-section'>
<div id="transaction-section">
<div className={classes.header}>
<h2 className={classes.title}>{t('APPS_BANK_ACCOUNT_TRANSACTIONS')}</h2>
</div>
@@ -43,7 +43,7 @@ export const TransactionList = () => {
</div>
<div>
<p className={TransactionTypes[transaction.type]}>
{transaction.type == 'Withdraw' ? '-' : '+'}
{transaction.type === 'Withdraw' ? '-' : '+'}
{transaction.amount}
</p>
</div>
@@ -52,7 +52,7 @@ export const TransactionList = () => {
<TablePagination
rowsPerPageOptions={[3, 5]}
className={classes.pagination}
component='div'
component="div"
count={transactionList.length}
rowsPerPage={rowsPerPage}
page={page}
@@ -1,17 +1,11 @@
import React, { useState } from 'react';
import Modal from '../../../../ui/components/Modal';
import {
Button,
List,
ListItem,
TextField,
makeStyles,
} from '@material-ui/core';
import CloseIcon from '@material-ui/icons/Close';
import { Button, List, ListItem, TextField, makeStyles } from '@material-ui/core';
import Nui from '../../../../os/nui-events/utils/Nui';
import { useBankModal } from '../../hooks/useBankModal';
import { BankEvents } from '../../../../../../typings/bank';
const useStyles = makeStyles((theme) => ({
input: {
@@ -33,11 +27,6 @@ const useStyles = makeStyles((theme) => ({
fontSize: 16,
marginBottom: 30,
},
closeButton: {
position: 'absolute',
right: 0,
width: '10%',
},
}));
export const TransferModal = () => {
@@ -55,7 +44,7 @@ export const TransferModal = () => {
const addTransfer = () => {
const transferAmount = parseInt(amount);
Nui.send('phone:addTransfer', {
Nui.send(BankEvents.ADD_TRANSFER, {
targetID,
transferAmount,
message,
@@ -65,16 +54,13 @@ export const TransferModal = () => {
return (
<Modal visible={showBankModal} handleClose={_handleClose}>
<Button className={classes.closeButton} onClick={_handleClose}>
<CloseIcon />
</Button>
<List style={{ marginTop: 20 }}>
<ListItem>
<TextField
inputProps={{ className: classes.modalInputCenter }}
fullWidth
type='number'
placeholder='ID'
type="number"
placeholder="ID"
value={targetID}
onChange={(e) => setTargetID(e.target.value)}
/>
@@ -82,9 +68,9 @@ export const TransferModal = () => {
<ListItem>
<TextField
inputProps={{ className: classes.modalInputCenter }}
placeholder='Amount'
placeholder="Amount"
fullWidth
type='number'
type="number"
value={amount}
onChange={(e) => setAmount(e.target.value)}
/>
@@ -92,7 +78,7 @@ export const TransferModal = () => {
<ListItem>
<TextField
inputProps={{ className: classes.modalInput }}
placeholder='Message'
placeholder="Message"
fullWidth
value={message}
multiline
+5 -9
View File
@@ -3,22 +3,18 @@ import { atom } from 'recoil';
export const bankState = {
transactions: atom({
key: 'transactionList',
default: []
default: [],
}),
bankModal: atom({
key: 'modalVisibility',
default: false,
}),
transferSuccessful: atom({
key: 'bankAlert',
default: null
}),
bankCredentials: atom({
key: 'bankCredentails',
default: null
default: null,
}),
notification: atom({
key: 'bankNotification',
default: null
})
}
default: null,
}),
};
@@ -1,7 +0,0 @@
import { useRecoilState } from 'recoil';
import { bankState } from './state';
export const useBankAlert = (): any => {
const [ bankAlert, setBankAlert ] = useRecoilState(bankState.transferSuccessful);
return { bankAlert, setBankAlert };
}
+8 -3
View File
@@ -1,7 +1,12 @@
import { useRecoilState } from 'recoil';
import { bankState } from './state';
export const useBankModal = () => {
const [ showBankModal, setShowBankModal ] = useRecoilState(bankState.bankModal);
return { showBankModal, setShowBankModal };
interface BankModalProps {
showBankModal: boolean;
setShowBankModal: (show: boolean) => void;
}
export const useBankModal = (): BankModalProps => {
const [showBankModal, setShowBankModal] = useRecoilState(bankState.bankModal);
return { showBankModal, setShowBankModal };
};
@@ -1,13 +1,8 @@
import { useRecoilValue } from 'recoil';
import { Transfer } from '../../../common/typings/bank';
import { Transfer } from '../../../../../typings/bank';
import { bankState } from './state';
interface IBankNotification {
notification: Transfer | null;
}
export const useBankNotification = (): IBankNotification => {
const notification = useRecoilValue<Transfer | null>(bankState.notification);
return { notification };
export const useBankNotification = () => {
return useRecoilValue<Transfer | null>(bankState.notification);
};
+18 -11
View File
@@ -1,22 +1,29 @@
import { useNuiEvent } from '../../../os/nui-events/hooks/useNuiEvent';
import { bankState } from './state';
import { useTransactions } from './useTransactions'
import { useTransactions } from './useTransactions';
import { useCredentials } from './useCredentials';
import { useBankAlert } from './useBankAlert';
import { useSetRecoilState } from 'recoil'
import { useSetRecoilState } from 'recoil';
import { useBankNotification } from './useBankNotification';
import { IAlert, useSnackbar } from '../../../ui/hooks/useSnackbar';
import { useTranslation } from 'react-i18next';
export const useBankService = () => {
const setTransaction = useSetRecoilState(bankState.transactions)
const setCredentials = useSetRecoilState(bankState.bankCredentials)
const setAlertMessage = useSetRecoilState(bankState.transferSuccessful)
const setTransaction = useSetRecoilState(bankState.transactions);
const setCredentials = useSetRecoilState(bankState.bankCredentials);
const setNotification = useSetRecoilState(bankState.notification);
const { addAlert } = useSnackbar();
const { t } = useTranslation();
const handleAddAlert = ({ message, type }: IAlert) => {
addAlert({
message: t(`APPS_${message}`),
type,
});
};
///
useNuiEvent('BANK', 'setTransaction', setTransaction);
useNuiEvent('BANK', 'setCredentials', setCredentials);
useNuiEvent('BANK', 'setAlert', setAlertMessage);
useNuiEvent('BANK', 'setAlert', handleAddAlert);
useNuiEvent('BANK', 'setNotification', setNotification);
return { useTransactions, useCredentials, useBankAlert, useBankNotification };
}
return { useTransactions, useCredentials, useBankNotification };
};
+3 -8
View File
@@ -1,12 +1,7 @@
import { useRecoilValue } from 'recoil';
import { bankState } from './state';
import { IBankCredentials } from '../../../common/typings/bank';
import { IBankCredentials } from '../../../../../typings/bank';
interface ICredentialsHook {
credentials: IBankCredentials;
}
export const useCredentials = (): ICredentialsHook => {
const credentials = useRecoilValue(bankState.bankCredentials);
return { credentials };
export const useCredentials = () => {
return useRecoilValue<IBankCredentials>(bankState.bankCredentials);
};
+4 -4
View File
@@ -1,7 +1,7 @@
import { useRecoilValue } from "recoil";
import { bankState } from './state';
import { useRecoilValue } from 'recoil';
import { ITransactions } from '../../../../../typings/bank';
import { bankState } from './state';
export const useTransactions = () => {
const transactionList = useRecoilValue(bankState.transactions);
return { transactionList };
return useRecoilValue<ITransactions[]>(bankState.transactions);
};
@@ -1,6 +1,10 @@
import React from 'react';
import React, { useMemo } from 'react';
import { useCalculator, CalcButton } from '../hooks/useCalculator';
import { Grid, makeStyles, Box, Paper } from '@material-ui/core';
import { Grid, makeStyles, Box, Paper, Fab } from '@material-ui/core';
import { setClipboard } from '../../../os/phone/hooks/useClipboard';
import FileCopyIcon from '@material-ui/icons/FileCopy';
import { useSnackbar } from '../../../ui/hooks/useSnackbar';
import { useTranslation } from 'react-i18next';
const useStyles = makeStyles((theme) => ({
button: {
@@ -12,6 +16,12 @@ const useStyles = makeStyles((theme) => ({
textAlign: 'right',
overflow: 'hidden',
textOverflow: 'ellipsis',
position: 'relative',
},
copyFab: {
position: 'absolute',
top: '16px',
left: '16px',
},
}));
@@ -37,17 +47,43 @@ export const Calculator = ({ ...props }) => {
eight,
nine,
} = useCalculator();
const { addAlert } = useSnackbar();
const classes = useStyles();
const resultStr = useMemo(
() =>
result().toLocaleString(undefined, {
minimumFractionDigits: 0,
maximumFractionDigits: 4,
}),
[result],
);
const { t } = useTranslation();
return (
<Box display='flex' flexDirection='column'>
<Box display="flex" flexDirection="column">
<Box flexGrow={1} component={Paper} p={4} className={classes.result}>
{result().toLocaleString(undefined, {
minimumFractionDigits: 0,
maximumFractionDigits: 4,
})}
<Fab
size="small"
onClick={() => {
setClipboard(resultStr);
addAlert({
message: t('GENERIC_WRITE_TO_CLIPBOARD_MESSAGE', {
content: 'number',
}),
type: 'success',
});
}}
className={classes.copyFab}
>
<FileCopyIcon />
</Fab>
{resultStr}
</Box>
<Box>
<Grid container justify='space-around'>
<Grid container justify="space-around">
<CalcButton button={clear} className={classes.button} />
<CalcButton button={clearAll} className={classes.button} />
<CalcButton button={divider} className={classes.button} />
@@ -1,12 +1,12 @@
import React from "react";
import { AppWrapper } from "../../../ui/components";
import { AppTitle } from "../../../ui/components/AppTitle";
import { AppContent } from "../../../ui/components/AppContent";
import { Calculator } from "./Calculator";
import { useApp } from "../../../os/apps/hooks/useApps";
import React from 'react';
import { AppWrapper } from '../../../ui/components';
import { AppTitle } from '../../../ui/components/AppTitle';
import { AppContent } from '../../../ui/components/AppContent';
import { Calculator } from './Calculator';
import { useApp } from '../../../os/apps/hooks/useApps';
export const CalculatorApp = () => {
const calculator = useApp("CALCULATOR");
const calculator = useApp('CALCULATOR');
return (
<AppWrapper>
<AppTitle app={calculator} />
@@ -1,7 +1,7 @@
import React from "react";
import { SvgIcon } from "@material-ui/core";
import React from 'react';
import { SvgIcon, SvgIconProps } from '@material-ui/core';
export const CalculatorIcon = ({ ...props }) => {
export const CalculatorIcon = ({ ...props }: SvgIconProps) => {
return (
<SvgIcon {...props}>
<svg
+28 -19
View File
@@ -1,30 +1,39 @@
import { Fab } from '@material-ui/core';
import React from 'react'
import { AppWrapper } from "../../../ui/components";
import { AppContent } from "../../../ui/components/AppContent";
import { usePhotoModal } from '../hooks/usePhotoModal';
import React from 'react';
import { AppWrapper } from '../../../ui/components';
import { AppContent } from '../../../ui/components/AppContent';
import { GalleryGrid } from './grid/GalleryGrid';
import { GalleryModal } from './modal/GalleryModal';
import InjectDebugData from '../../../os/debug/InjectDebugData';
import { Route, Switch } from 'react-router-dom';
InjectDebugData([
{
app: 'CAMERA',
method: 'setPhotos',
data: [
{
id: 1,
image: 'https://beta.iodine.gg/noDcb.jpeg',
},
{
id: 2,
image: 'https://beta.iodine.gg/teUcY.jpeg',
},
],
},
]);
const CameraApp = () => {
const {modal} = usePhotoModal();
return (
<AppWrapper id='camera-app'>
<AppWrapper id="camera-app">
<AppContent>
<GalleryModal />
{/*<Router>
<Switch>
<Route path="/camera/image" component={GalleryModal} />
<Route path="/" exact component={GalleryGrid} />
</Switch>
</Router>*/}
{!modal ? <GalleryGrid /> : null}
<Switch>
<Route path="/camera" exact component={GalleryGrid} />
<Route path="/camera/image" exact component={GalleryModal} />
</Switch>
</AppContent>
</AppWrapper>
)
}
);
};
export default CameraApp;
@@ -1,62 +1,57 @@
import React from 'react'
import React from 'react';
import { Box, Button } from '@material-ui/core';
import useStyles from './grid.styles';
import { usePhotos } from '../../hooks/usePhotos';
import AddIcon from '@material-ui/icons/Add';
import Nui from '../../../../os/nui-events/utils/Nui';
import { usePhotoModal } from '../../hooks/usePhotoModal';
import { usePhotoMeta } from '../../hooks/usePhotoMeta';
import { useModal } from '../../../contacts/hooks/useModal';
//import { useHistory } from 'react-router-dom';
import { useHistory } from 'react-router-dom';
import { useQueryParams } from '../../../../common/hooks/useQueryParams';
import { addQueryToLocation } from '../../../../common/utils/addQueryToLocation';
import { getLocationFromUrl } from '../../../../common/utils/getLocationFromUrl';
import { PhotoEvents } from '../../../../../../typings/photo';
// isMessage will work as a style handler kinda. If the gallery is rendered in the messages,
// it will have the value true, which basically means a tweak on the design to fit in a modal
export const GalleryGrid = (isMessags) => {
const classes = useStyles()
const { setMeta } = usePhotoMeta();
const { setModal } = usePhotoModal();
export const GalleryGrid = () => {
const classes = useStyles();
const history = useHistory();
const query = useQueryParams();
const referal = query.referal ? decodeURIComponent(query.referal) : '/camera/image';
//let history = useHistory();
const photos = usePhotos();
console.log(photos)
const handleCamera = () => {
Nui.send('phone:TakePhoto', {})
}
Nui.send(PhotoEvents.TAKE_PHOTO, {});
};
const handlePhotoOpen = (photo) => {
setModal(true)
setMeta(photo)
//history.push('/camera/image')
}
history.push(addQueryToLocation(getLocationFromUrl(referal), 'image', photo.image));
};
if(!photos) return (
<Box display="flex" flexWrap="wrap" alignContent="flex-start" className={classes.root}>
if (!photos)
return (
<Box display="flex" flexWrap="wrap" alignContent="flex-start" className={classes.root}>
<Box>
<Button onClick={handleCamera} style={{ borderRadius: 0 }} className={classes.photo}>
<AddIcon fontSize="large"/>
<AddIcon fontSize="large" />
</Button>
</Box>
</Box>
)
);
return (
<div>
<Box display="flex" flexWrap="wrap" alignContent="flex-start" className={classes.root}>
<Box>
<Button onClick={handleCamera} style={{ borderRadius: 0 }} className={classes.photo}>
<AddIcon fontSize="large"/>
<AddIcon fontSize="large" />
</Button>
</Box>
{photos.map(photo => (
<Box onClick={() => handlePhotoOpen(photo)}>
{photos.map((photo) => (
<Box key={photo.id} onClick={() => handlePhotoOpen(photo)}>
<div style={{ backgroundImage: `url(${photo.image})` }} className={classes.photo} />
</Box>
))}
</Box>
</div>
)
}
);
};
@@ -2,7 +2,7 @@ import { makeStyles, Theme } from '@material-ui/core/styles';
const useStyles = makeStyles((theme: Theme) => ({
root: {
flexGrow: 1
flexGrow: 1,
},
photo: {
border: '1px inset #fff',
@@ -13,7 +13,7 @@ const useStyles = makeStyles((theme: Theme) => ({
backgroundPosition: 'center',
backgroundRepeat: 'no-repeat',
backgroundSize: 'cover',
}
}))
},
}));
export default useStyles;
export default useStyles;
@@ -1,62 +1,64 @@
import React from 'react'
import Modal from '../../../../ui/components/Modal';
import { usePhotoMeta } from '../../hooks/usePhotoMeta';
import { usePhotoModal } from '../../hooks/usePhotoModal';
import React, { useMemo, useState, useCallback } from 'react';
import useStyles from './modal.styles';
import { useHistory } from 'react-router-dom';
import { Button, Paper } from '@material-ui/core';
import ArrowBackIcon from '@material-ui/icons/ArrowBack';
import DeleteIcon from '@material-ui/icons/Delete';
import ShareIcon from '@material-ui/icons/Share';
import Nui from '../../../../os/nui-events/utils/Nui';
import { useShareModal } from '../../hooks/useShareModal';
import { useHistory } from 'react-router-dom';
import { useQueryParams } from '../../../../common/hooks/useQueryParams';
import { ICameraPhoto } from '../../hooks/usePhotos';
import { ShareModal } from './ShareModal';
import { useShareLink } from '../../hooks/useShareLink';
import { PhotoEvents } from '../../../../../../typings/photo';
export const GalleryModal = () => {
const { meta, setMeta } = usePhotoMeta();
const { modal, setModal } = usePhotoModal();
const classes = useStyles();
const history = useHistory();
const query = useQueryParams();
const referal = query.referal || '/camera';
const { shareModal ,setShareModal } = useShareModal();
const { setShareLink } = useShareLink();
const [shareOpen, setShareOpen] = useState(null);
const meta: ICameraPhoto = useMemo(
() => ({ id: query.id as string, image: query.image as string }),
[query],
);
const _handleClose = () => {
setModal(false)
setMeta(null);
}
history.push(referal);
};
const handleDeletePhoto = () => {
console.log(meta.id)
Nui.send('photo:deletePhoto', {
id: meta.id
})
setModal(false)
}
Nui.send(PhotoEvents.DELETE_PHOTO, {
image: meta.image,
});
history.push(referal);
};
const handleSharePhoto = () => {
setShareModal(true)
setShareLink(meta.image)
}
if(!meta) return null;
const handleSharePhoto = useCallback(() => {
setShareOpen(meta);
}, [meta]);
if (!meta) return null;
return (
<Paper className={modal ? classes.modal : classes.modalHide}>
<ShareModal key={meta.id} {...meta}/>
<div className={shareModal ? classes.backgroundModal : undefined} />
<Button onClick={_handleClose}><ArrowBackIcon /></Button>
<div className={classes.image} style={{ backgroundImage: `url(${meta.image})`}} />
<div className={classes.actionDiv}>
<Button onClick={handleDeletePhoto}>
<DeleteIcon fontSize="large" />
<>
<ShareModal referal={referal} meta={shareOpen} onClose={() => setShareOpen(null)} />
<Paper className={classes.modal}>
<div className={shareOpen ? classes.backgroundModal : null} />
<Button onClick={_handleClose}>
<ArrowBackIcon />
</Button>
<Button onClick={handleSharePhoto}>
<ShareIcon fontSize="large" />
</Button>
</div>
</Paper>
)
}
<div className={classes.image} style={{ backgroundImage: `url(${meta.image})` }} />
<div className={classes.actionDiv}>
<Button onClick={handleDeletePhoto}>
<DeleteIcon fontSize="large" />
</Button>
<Button onClick={handleSharePhoto}>
<ShareIcon fontSize="large" />
</Button>
</div>
</Paper>
</>
);
};
@@ -1,47 +1,42 @@
import React, { useRef, useState } from 'react';
import React from 'react';
import Modal from '../../../../ui/components/Modal';
import { useShareLink } from '../../hooks/useShareLink';
import { useShareModal } from '../../hooks/useShareModal';
import { Button } from '@material-ui/core';
import MessageIcon from '@material-ui/icons/Message';
import { setClipboard } from '../../../../os/phone/hooks/useClipboard';
import CloseIcon from '@material-ui/icons/Close';
import useStyles from './modal.styles';
import Nui from '../../../../os/nui-events/utils/Nui';
import { ICameraPhoto } from '../../hooks/usePhotos';
import { useHistory } from 'react-router-dom';
export const ShareModal = (meta) => {
interface IShareModalProps {
meta: ICameraPhoto;
referal: string;
onClose(): void;
}
export const ShareModal = ({ meta, onClose, referal }: IShareModalProps) => {
const classes = useStyles();
const { shareModal, setShareModal } = useShareModal();
const { setShareLink } = useShareLink();
const _handleClose = () => {
setShareModal(false);
setShareLink(null);
};
const history = useHistory();
const handleCopyImage = () => {
setClipboard(meta.image);
history.push(referal);
};
return (
<Modal visible={shareModal} handleClose={_handleClose}>
<Modal visible={!!meta} handleClose={onClose}>
<div className={classes.shareModal}>
<Button
style={{ position: 'absolute', right: 0, width: '10%' }}
onClick={_handleClose}
>
<CloseIcon />
</Button>
<div className={classes.innerShareModal}>
<h4 style={{ textAlign: 'center', marginTop: 20 }}>
Where do you want to share the photo?
</h4>
<Button>{<MessageIcon />} Message</Button>
<h4>Or just copy the image here:</h4>
<Button onClick={handleCopyImage} variant='contained'>
Copy image
</Button>
<>
<h4 style={{ textAlign: 'center', marginTop: 20 }}>
Where do you want to share the photo?
</h4>
<Button>{<MessageIcon />} Message</Button>
<h4>Or just copy the image here:</h4>
<Button onClick={handleCopyImage} variant="contained">
Copy image
</Button>
</>
</div>
</div>
</Modal>
@@ -2,9 +2,9 @@ import { makeStyles, Theme } from '@material-ui/core/styles';
const useStyles = makeStyles((theme: Theme) => ({
backgroundModal: {
background: "black",
opacity: "0.6",
position: "absolute",
background: 'black',
opacity: '0.6',
position: 'absolute',
top: 0,
left: 0,
right: 0,
@@ -17,7 +17,7 @@ const useStyles = makeStyles((theme: Theme) => ({
width: '100%',
},
modalHide: {
display: 'none'
display: 'none',
},
image: {
width: 'auto',
@@ -27,22 +27,22 @@ const useStyles = makeStyles((theme: Theme) => ({
backgroundPosition: 'center',
backgroundSize: 'cover',
backgroundRepeat: 'no-repeat',
marginTop: '4em'
marginTop: '4em',
},
actionDiv: {
marginTop: 15,
display: 'flex',
justifyContent: 'space-evenly'
justifyContent: 'space-evenly',
},
// share modal
shareModal: {
marginBottom: 50
marginBottom: 50,
},
innerShareModal: {
marginTop: 40,
textAlign: 'center'
}
}))
textAlign: 'center',
},
}));
export default useStyles;
export default useStyles;
+2 -18
View File
@@ -3,22 +3,6 @@ import { atom } from 'recoil';
export const photoState = {
photos: atom({
key: 'galleryPhotos',
default: null
default: null,
}),
modal: atom({
key: 'photoModal',
default: false
}),
photoMeta: atom({
key: 'photoMeta',
default: null
}),
shareModal: atom({
key: 'phoneShareModal',
default: false
}),
shareLink: atom({
key: 'photoShareLink',
default: null
})
}
};
@@ -1,7 +0,0 @@
import { useRecoilState } from 'recoil';
import { photoState } from './state';
export const usePhotoMeta = () => {
const [meta, setMeta] = useRecoilState(photoState.photoMeta);
return { meta, setMeta};
}
@@ -1,7 +0,0 @@
import { useRecoilState } from 'recoil';
import { photoState } from './state';
export const usePhotoModal = () => {
const [modal, setModal] = useRecoilState(photoState.modal);
return { modal, setModal}
}
@@ -1,10 +1,8 @@
import { useSetRecoilState } from 'recoil';
import { useNuiEvent } from '../../../os/nui-events/hooks/useNuiEvent';
import { photoState } from './state';
import { usePhotos } from './usePhotos';
export const usePhotoService = () => {
const setPhotos = useSetRecoilState(photoState.photos);
useNuiEvent('CAMERA', 'setPhotos', setPhotos);
return usePhotos();
}
};
+6 -9
View File
@@ -1,14 +1,11 @@
import { useRecoilValue } from 'recoil';
import { photoState } from './state';
interface IPhotos {
image: string[];
map?: any;
export interface ICameraPhoto {
id: string;
image: string;
}
export const usePhotos = (): IPhotos | null => {
const photos = useRecoilValue<IPhotos | null>(photoState.photos);
return photos;
}
export const usePhotos = (): ICameraPhoto[] | null => {
return useRecoilValue<ICameraPhoto[] | null>(photoState.photos);
};
@@ -1,7 +0,0 @@
import { useRecoilState } from 'recoil';
import { photoState } from './state';
export const useShareLink = () => {
const [ shareLink, setShareLink ] = useRecoilState(photoState.shareLink);
return { shareLink, setShareLink }
}
@@ -1,7 +0,0 @@
import { useRecoilState } from 'recoil';
import { photoState } from './state';
export const useShareModal = () => {
const [ shareModal, setShareModal ] = useRecoilState(photoState.shareModal);
return { shareModal, setShareModal }
}
@@ -1,3 +0,0 @@
#contact-app .Mui-focused::after {
border-bottom: #2196f3 solid 4px;
}
@@ -1,87 +0,0 @@
import React, { useState } from 'react';
import { makeStyles, Theme } from '@material-ui/core/styles';
import { Button, TextField } from '@material-ui/core';
import Nui from '../../../os/nui-events/utils/Nui';
import List from '@material-ui/core/List';
import ListItem from '@material-ui/core/ListItem';
import Modal from '../../../ui/components/Modal';
import { useModal } from '../hooks/useModal';
import ClearIcon from '@material-ui/icons/Clear';
import PersonIcon from '@material-ui/icons/Person';
import PhoneIcon from '@material-ui/icons/Phone';
import AccountCircleIcon from '@material-ui/icons/AccountCircle';
import useStyles from './styles.contactmodal';
export const AddContactModal = () => {
const [name, setName] = useState('');
const [number, setNumber] = useState('');
const [avatar, setAvatar] = useState('');
const classes = useStyles();
const { showModal, setShowModal } = useModal();
const addContact = () => {
if (name === '' || number === '') {
console.log('You need to pass in values');
} else {
Nui.send('contacts:add', {
name,
number,
avatar,
});
console.log(name, number, avatar);
}
};
const _handleClose = () => {
setShowModal(false);
};
return (
<Modal visible={showModal} handleClose={_handleClose}>
<Button onClick={_handleClose} className={classes.clearButton}>
<ClearIcon />
</Button>
<List style={{ marginTop: 30 }}>
<ListItem>
<PersonIcon className={classes.icons} />
<TextField
value={name}
inputProps={{ className: classes.textInputField }}
onChange={(e) => setName(e.target.value)}
fullWidth
variant='standard'
placeholder='Name'
/>
</ListItem>
<ListItem>
<PhoneIcon className={classes.icons} />
<TextField
value={number}
inputProps={{ className: classes.textInputField }}
onChange={(e) => setNumber(e.target.value)}
fullWidth
placeholder='Number'
variant='standard'
type='text'
/>
</ListItem>
<ListItem>
<AccountCircleIcon className={classes.icons} />
<TextField
value={avatar}
inputProps={{ className: classes.textInputField }}
onChange={(e) => setAvatar(e.target.value)}
fullWidth
placeholder='Avatar URL'
variant='standard'
type='text'
/>
</ListItem>
</List>
<Button className={classes.addBtn} onClick={addContact}>
Add Contact
</Button>
</Modal>
);
};
@@ -1,13 +0,0 @@
import React from 'react';
import Paper from '@material-ui/core/Paper';
import ContactsIcon from '@material-ui/icons/Contacts';
import useStyles from './styles.contacts';
export const ContactTitle = () => {
const classes = useStyles();
return (
<Paper className={classes.root} square variant='outlined' elevation={24}>
<ContactsIcon className={classes.icon} />
</Paper>
);
};
@@ -1,49 +1,57 @@
import React from 'react';
import { AppWrapper } from '../../../ui/components';
import { makeStyles, createStyles, Theme } from '@material-ui/core/styles';
import { AppTitle } from '../../../ui/components/AppTitle';
import { AppContent } from '../../../ui/components/AppContent';
import { ContactList } from './List/ContactList';
import { useApp } from '../../../os/apps/hooks/useApps';
import { AddContactModal } from './ContactModal';
import { useModal } from '../hooks/useModal';
import { SearchContacts } from './List/SearchContacts';
import PersonAddIcon from '@material-ui/icons/PersonAdd';
import Fab from '@material-ui/core/Fab';
import { InfoModal } from './modal/InfoModal';
import { useContactDetail } from '../hooks/useContactDetail';
import { ContactAlert } from './alert/ContactAlert';
import InjectDebugData from '../../../os/debug/InjectDebugData';
import { Route } from 'react-router-dom';
import useStyles from './styles.contacts';
import ContactsInfoPage from './views/ContactInfo';
import { ContactPage } from './views/ContactsPage';
import { ContactsThemeProvider } from '../providers/ContactsThemeProvider';
export const ContactsApp = () => {
const classes = useStyles();
const { showModal, setShowModal } = useModal();
const contacts = useApp('CONTACTS');
const { contactDetail } = useContactDetail();
const openModal = () => {
setShowModal(true);
};
return (
<AppWrapper id='contact-app'>
<AppTitle app={contacts} />
<SearchContacts />
<AddContactModal />
<InfoModal key={contactDetail?.id} />
<div className={showModal ? classes.backgroundModal : undefined} />
<AppContent>
<ContactList />
<Fab
onClick={openModal}
style={{ backgroundColor: '#2196f3', color: '#fff' }}
className={classes.absolute}
>
<PersonAddIcon />
</Fab>
<ContactAlert />
</AppContent>
</AppWrapper>
<ContactsThemeProvider>
<AppWrapper id="contact-app">
<AppTitle app={contacts} />
<AppContent>
<Route path="/contacts/" exact component={ContactPage} />
<Route path="/contacts/:id" exact component={ContactsInfoPage} />
</AppContent>
</AppWrapper>
</ContactsThemeProvider>
);
};
InjectDebugData([
{
app: 'CONTACTS',
method: 'setContacts',
data: [
{
id: 1,
display: 'Ruqen',
number: '555-15196',
},
{
id: 2,
display: 'Taso',
number: '215-8139',
avatar: 'http://i.tasoagc.dev/i9Ig',
},
{
id: 3,
display: 'Chip',
number: '111-1111',
},
{
id: 4,
display: 'Kidz',
number: '444-4444',
},
],
},
]);
@@ -1,110 +1,80 @@
import React from 'react';
import ListItemText from '@material-ui/core/ListItemText';
import {
Button,
ListItemAvatar,
Avatar as MuiAvatar,
List,
ListItem,
TextField,
Collapse,
makeStyles,
} from '@material-ui/core';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faPen } from '@fortawesome/free-solid-svg-icons';
import { Button, ListItemAvatar, Avatar as MuiAvatar, List, ListItem } from '@material-ui/core';
import { useFilteredContacts } from '../../hooks/useFilteredContacts';
import PhoneIcon from '@material-ui/icons/Phone';
import ChatIcon from '@material-ui/icons/Chat';
import MoreVertIcon from '@material-ui/icons/MoreVert';
import { useContacts } from '../../hooks/useContacts';
import { useContactModal } from '../../hooks/useContactModal';
import { useContactDetail } from '../../hooks/useContactDetail';
import Nui from '../../../../os/nui-events/utils/Nui';
import '../Contact.css';
import { ContactAlert } from '../alert/ContactAlert';
const useStyles = makeStyles((theme) => ({
updateButton: {
margin: 'auto',
fontSize: 14,
width: 150,
background: '#2196f3',
marginBottom: 10,
padding: 8,
},
collapseItem: {
margin: 'auto',
width: '50%',
},
}));
import { SearchContacts } from './SearchContacts';
import { useHistory } from 'react-router-dom';
import LogDebugEvent from '../../../../os/debug/LogDebugEvents';
import { CallEvents } from '../../../../../../typings/call';
export const ContactList = () => {
const { filteredContacts } = useFilteredContacts();
const { setShowContactModal } = useContactModal();
const { contactDetail, setContactDetail } = useContactDetail();
const history = useHistory();
const contacts = useContacts();
const { contacts } = useContacts();
const openContactInfo = (contact) => {
setShowContactModal(true);
setContactDetail(contact);
console.log('CONTACT', contactDetail);
const openContactInfo = (contactId: number) => {
history.push(`/contacts/${contactId}`);
};
const startCall = (number) => {
console.log(number);
Nui.send('phone:startCall', {
const startCall = (number: string) => {
LogDebugEvent({
action: 'Emitting `Start Call` to Scripts',
level: 2,
data: true,
});
Nui.send(CallEvents.INITIALIZE_CALL, {
number,
});
};
const handleMessage = (phoneNumber: string) => {
LogDebugEvent({
action: 'Routing to Message',
level: 1,
data: { phoneNumber },
});
history.push(`/messages/new/${phoneNumber}`);
};
const filteredRegEx = new RegExp(filteredContacts, 'gi');
return (
<List>
{contacts.contacts
.filter(
(contact) =>
contact.display.includes(filteredContacts.toLowerCase()) ||
contact.number.includes(filteredContacts.toLowerCase())
)
.map((contact) => (
<>
<>
<SearchContacts />
<List>
{contacts
.filter(
(contact) =>
contact.display.match(filteredRegEx) || contact.number.match(filteredRegEx),
)
.map((contact) => (
<ListItem key={contact.id} divider>
<ListItemAvatar>
{contact.avatar ? (
<MuiAvatar src={contact.avatar} />
) : (
<MuiAvatar>
{contact.display.slice(0, 1).toUpperCase()}
</MuiAvatar>
<MuiAvatar>{contact.display.slice(0, 1).toUpperCase()}</MuiAvatar>
)}
</ListItemAvatar>
<ListItemText
primary={contact.display}
secondary={contact.number}
/>
<ListItemText primary={contact.display} secondary={contact.number} />
<Button onClick={() => startCall(contact.number)}>
<PhoneIcon />
</Button>
<Button
onClick={() =>
console.log('Message: ' + contact.display, contact.number)
}
>
<Button onClick={() => handleMessage(contact.number)}>
<ChatIcon />
</Button>
<Button
style={{ margin: -15 }}
onClick={() => openContactInfo(contact)}
>
<Button style={{ margin: -15 }} onClick={() => openContactInfo(contact.id)}>
<MoreVertIcon />
</Button>
</ListItem>
</>
))}
</List>
))}
</List>
</>
);
};
@@ -1,94 +1,22 @@
import React from 'react';
import { InputBase } from '@material-ui/core';
import SearchIcon from '@material-ui/icons/Search';
import {
createStyles,
fade,
Theme,
makeStyles,
} from '@material-ui/core/styles';
import { Box } from '@material-ui/core';
import { useTranslation } from 'react-i18next';
import { useFilteredContacts } from '../../hooks/useFilteredContacts';
const useStyles = makeStyles((theme: Theme) =>
createStyles({
bg: {
backgroundColor: '#232323',
display: 'flex',
height: 60,
justifyContent: 'center',
alignItems: 'center',
},
textFieldInput: {
fontSize: 20,
},
inputRoot: {
color: '#fff',
fontSize: 18,
},
inputInput: {
padding: theme.spacing(1, 4, 1, 4),
transition: theme.transitions.create('width'),
width: '100%',
[theme.breakpoints.up('sm')]: {
width: '13ch',
'&:focus': {
width: '20ch',
},
},
},
search: {
position: 'relative',
borderRadius: theme.shape.borderRadius,
backgroundColor: fade(theme.palette.common.white, 0.15),
'&:hover': {
backgroundColor: fade(theme.palette.common.white, 0.25),
},
marginLeft: 0,
width: '100%',
[theme.breakpoints.up('sm')]: {
marginLeft: theme.spacing(1),
width: 'auto',
},
},
searchIcon: {
padding: theme.spacing(0, 0.5),
height: '100%',
position: 'absolute',
pointerEvents: 'none',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
},
})
);
import { SearchField } from '../../../../ui/components/SearchField';
export const SearchContacts = () => {
const { setFilteredContacts } = useFilteredContacts();
const classes = useStyles();
const handleChange = (e) => {
setFilteredContacts(e.target.value);
};
const { setFilteredContacts, filteredContacts } = useFilteredContacts();
const { t } = useTranslation();
return (
<div className={classes.bg}>
<div className={classes.search}>
<div className={classes.searchIcon}>
<SearchIcon style={{ color: '#fff' }} />
</div>
<InputBase
onChange={handleChange}
placeholder='Search contacts...'
classes={{
root: classes.inputRoot,
input: classes.inputInput,
}}
inputProps={{ 'aria-label': 'search' }}
/>
</div>
</div>
<Box>
<SearchField
onChange={(e) => setFilteredContacts(e.target.value)}
placeholder={t('APPS_CONTACT_PLACEHOLDER_SEARCH_CONTACTS')}
value={filteredContacts}
/>
</Box>
);
};
@@ -1,64 +0,0 @@
import { Snackbar } from '@material-ui/core';
import React, { useState, useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { Alert } from '../../../../ui/components/Alert';
import { useContactAlert } from '../../hooks/useAlert';
import { AlertCategory } from '../../../../common/typings/contact';
// Used as a prefix for referencing the locales
// Needed to make code cleaner
const LOCALE_PREFIX = 'APPS_';
export const ContactAlert = () => {
const { t } = useTranslation();
const { alert, setAlert } = useContactAlert();
const [open, setOpen] = useState(false);
const [message, setMessage] = useState(null);
const [severity, setSeverity] = useState('');
const _handleClose = () => {
setOpen(false);
setAlert(null);
};
function setMessageAlert(type: AlertCategory, severity: 'success' | 'error') {
setMessage(t(LOCALE_PREFIX + type));
setSeverity(severity);
setOpen(true);
}
useEffect(() => {
switch (alert) {
case 'CONTACT_ADD_FAILED':
setMessageAlert(alert, 'error');
break;
case 'CONTACT_ADD_SUCCESS':
setMessageAlert(alert, 'success');
break;
case 'CONTACT_DELETE_FAILED':
setMessageAlert(alert, 'error');
break;
case 'CONTACT_DELETE_SUCCESS':
setMessageAlert(alert, 'success');
break;
case 'CONTACT_UPDATE_FAILED':
setMessageAlert(alert, 'error');
break;
case 'CONTACT_UPDATE_SUCCESS':
setMessageAlert(alert, 'success');
}
}, [alert]);
return (
<Snackbar
style={{ width: '80%', position: 'absolute', bottom: '10%' }}
autoHideDuration={6000}
open={open}
onClose={_handleClose}
>
<Alert severity={severity} variant='filled'>
{message}
</Alert>
</Snackbar>
);
};
@@ -1,112 +0,0 @@
import React, { useState } from 'react';
import {
Paper,
Slide,
Button,
TextField,
Avatar as MuiAvatar,
} from '@material-ui/core';
import useStyles from './modal.styles';
import { useContactModal } from '../../hooks/useContactModal';
import ArrowBackIcon from '@material-ui/icons/ArrowBack';
import { useTranslation } from 'react-i18next';
import { useContactDetail } from '../../hooks/useContactDetail';
import Nui from '../../../../os/nui-events/utils/Nui';
export const InfoModal = () => {
const classes = useStyles();
const { showContactModal, setShowContactModal } = useContactModal();
const { t } = useTranslation();
const { contactDetail, setContactDetail } = useContactDetail();
const [display, setDisplay] = useState(
contactDetail ? contactDetail.display : ''
);
console.log(contactDetail);
const [number, setNumber] = useState(
contactDetail ? contactDetail.number : ''
);
const [avatar, setAvatar] = useState(
contactDetail ? contactDetail.avatar : ''
);
const closeModal = () => {
setShowContactModal(false);
setContactDetail(null);
};
const updateContact = () => {
Nui.send('phone:updateContact', {
id: contactDetail.id,
display,
number,
avatar,
});
setContactDetail(null);
setShowContactModal(false);
};
const deleteContact = () => {
Nui.send('phone:deleteContact', {
id: contactDetail.id,
});
setContactDetail(null);
setShowContactModal(false);
};
return (
<Slide direction='up' in={showContactModal}>
<Paper
className={showContactModal ? classes.modalRoot : classes.modalHide}
square
>
<Button style={{ margin: 10 }} onClick={closeModal}>
<ArrowBackIcon fontSize='large' />
</Button>
<div className={classes.listContainer}>
<MuiAvatar className={classes.avatar} src={avatar} />
<TextField
className={classes.input}
value={display}
onChange={(e) => setDisplay(e.target.value)}
placeholder={t('APPS_CONTACT_FORM_NAME')}
fullWidth
inputProps={{
className: classes.inputProps,
}}
/>
<TextField
className={classes.input}
value={number}
onChange={(e) => setNumber(e.target.value)}
placeholder={t('APPS_CONTACT_FORM_NUMBER')}
fullWidth
inputProps={{
className: classes.inputProps,
}}
/>
<TextField
className={classes.input}
placeholder={t('APPS_CONTACT_FORM_AVATAR')}
fullWidth
value={avatar}
onChange={(e) => setAvatar(e.target.value)}
inputProps={{
className: classes.inputProps,
}}
/>
<div style={{ display: 'block' }}>
<Button onClick={updateContact} className={classes.updateButton}>
Update
</Button>
<Button onClick={deleteContact} className={classes.deleteButton}>
Delete
</Button>
</div>
</div>
</Paper>
</Slide>
);
};
@@ -1,49 +0,0 @@
import { makeStyles } from '@material-ui/core';
const useStyles = makeStyles((theme) => ({
modalRoot: {
zIndex: 10,
position: 'absolute',
height: '100%',
width: '100%'
},
modalHide: {
display: 'none'
},
listContainer: {
marginTop: 30,
width: '75%',
margin: '0 auto',
textAlign: 'center',
},
avatar: {
margin: 'auto',
height: '125px',
width: '124px',
marginBottom: 29
},
input: {
marginBottom: 20,
margin: 'auto',
textAlign: 'center',
},
inputProps: {
fontSize: 22
},
updateButton: {
background: '#2196f3',
width: 150,
height: 45,
fontSize: 16,
marginTop: 29,
marginBottom: 29
},
deleteButton: {
background: '#d32f2f',
width: 150,
height: 40,
fontSize: 16
}
}))
export default useStyles;
@@ -1,45 +0,0 @@
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;
@@ -1,35 +0,0 @@
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: 'absolute',
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;
@@ -0,0 +1,184 @@
import React, { useEffect, useState } from 'react';
import { Avatar as MuiAvatar, Box, Button, Paper, TextField } from '@material-ui/core';
import { makeStyles } from '@material-ui/core/styles';
import { useTranslation } from 'react-i18next';
import { useHistory, useParams } from 'react-router-dom';
import { useContacts } from '../../hooks/useContacts';
import Nui from '../../../../os/nui-events/utils/Nui';
import ArrowBackIcon from '@material-ui/icons/ArrowBack';
import LogDebugEvent from '../../../../os/debug/LogDebugEvents';
import { useQueryParams } from '../../../../common/hooks/useQueryParams';
import { ContactEvents } from '../../../../../../typings/contact';
interface ContactInfoRouteParams {
mode: string;
id: string;
}
interface ContactInfoRouteQuery {
addNumber?: string;
referal?: string;
}
const useStyles = makeStyles({
root: {
height: '100%',
width: '100%',
},
listContainer: {
marginTop: 30,
width: '75%',
margin: '0 auto',
textAlign: 'center',
},
avatar: {
margin: 'auto',
height: '125px',
width: '124px',
marginBottom: 29,
},
input: {
marginBottom: 20,
margin: 'auto',
textAlign: 'center',
},
inputProps: {
fontSize: 22,
},
});
const ContactsInfoPage = () => {
const classes = useStyles();
const history = useHistory();
const { getContact } = useContacts();
const { id } = useParams<ContactInfoRouteParams>();
const { addNumber, referal } = useQueryParams<ContactInfoRouteQuery>({
referal: '/contacts',
});
const contact = getContact(parseInt(id));
// Set state after checking if null
const [name, setName] = useState(contact ? contact.display : '');
const [number, setNumber] = useState(contact ? contact.number : '');
const [avatar, setAvatar] = useState(contact ? contact.avatar : '');
const { t } = useTranslation();
useEffect(() => {
if (addNumber) {
setNumber(addNumber);
}
}, [addNumber]);
const handleContactAdd = () => {
LogDebugEvent({
action: 'Handling Contact Add',
data: contact,
level: 2,
});
Nui.send(ContactEvents.ADD_CONTACT, {
display: name,
number,
avatar,
});
history.replace(referal);
};
const handleContactSave = () => {
LogDebugEvent({
action: 'Handling Contact Update',
data: contact,
level: 2,
});
Nui.send(ContactEvents.UPDATE_CONTACT, {
id: contact.id,
display: name,
number,
avatar,
});
history.goBack();
};
const handleContactDelete = () => {
LogDebugEvent({
action: 'Handling Contact Delete',
data: contact,
level: 2,
});
Nui.send(ContactEvents.DELETE_CONTACT, {
id: contact.id,
});
history.goBack();
};
return (
<Paper className={classes.root} square>
<Button style={{ margin: 10 }} onClick={() => history.goBack()}>
<ArrowBackIcon fontSize="large" />
</Button>
<div className={classes.listContainer}>
<MuiAvatar className={classes.avatar} src={avatar} />
<TextField
autoFocus
className={classes.input}
value={name}
onChange={(e) => setName(e.target.value)}
label={t('APPS_CONTACT_FORM_NAME')}
fullWidth
inputProps={{
className: classes.inputProps,
}}
/>
<TextField
className={classes.input}
value={number}
onChange={(e) => setNumber(e.target.value)}
label={t('APPS_CONTACT_FORM_NUMBER')}
fullWidth
inputProps={{
className: classes.inputProps,
}}
/>
<TextField
className={classes.input}
label={t('APPS_CONTACT_FORM_AVATAR')}
fullWidth
value={avatar}
onChange={(e) => setAvatar(e.target.value)}
inputProps={{
className: classes.inputProps,
}}
/>
{/* Display if fetched contact */}
{contact && (
<>
<Box py={1} display="block">
<Button color="primary" variant="contained" onClick={handleContactSave}>
{t('GENERIC_UPDATE')}
</Button>
</Box>
<Box py={1} display="block">
<Button variant="contained" color="secondary" onClick={handleContactDelete}>
{t('GENERIC_DELETE')}
</Button>
</Box>
</>
)}
{/* Display if no fetched contact */}
{!contact && (
<Box display="block">
<Button color="primary" variant="contained" onClick={handleContactAdd}>
{t('APPS_CONTACT_MODAL_BUTTON_ADD')}
</Button>
</Box>
)}
</div>
</Paper>
);
};
export default ContactsInfoPage;
@@ -0,0 +1,37 @@
import React from 'react';
import Fab from '@material-ui/core/Fab';
import PersonAddIcon from '@material-ui/icons/PersonAdd';
import { useHistory } from 'react-router-dom';
import { makeStyles, Theme } from '@material-ui/core/styles';
import { ContactList } from '../List/ContactList';
const useStyles = makeStyles((theme: Theme) => ({
absolute: {
position: 'absolute',
bottom: theme.spacing(2),
right: theme.spacing(2),
},
icon: {
color: '#fff',
fontSize: 30,
},
}));
export const ContactPage = () => {
const history = useHistory();
const classes = useStyles();
return (
<>
<ContactList />
<Fab
color="primary"
onClick={() => history.push('/contacts/-1')}
className={classes.absolute}
>
<PersonAddIcon />
</Fab>
</>
);
};
+27
View File
@@ -0,0 +1,27 @@
import { blue, common } from '@material-ui/core/colors';
export const CONTACTS_APP_PRIMARY_COLOR = blue[500];
export const CONTACTS_APP_TEXT_COLOR = common.white;
const theme = {
palette: {
primary: {
main: CONTACTS_APP_PRIMARY_COLOR,
dark: blue[700],
light: blue[300],
contrastText: CONTACTS_APP_TEXT_COLOR,
},
secondary: {
main: '#d32f2f',
light: '#eb4242',
dark: '#941212',
contrastText: CONTACTS_APP_TEXT_COLOR,
},
success: {
main: '#2196f3',
contrastText: CONTACTS_APP_TEXT_COLOR,
},
},
};
export default theme;
-4
View File
@@ -21,8 +21,4 @@ export const contactsState = {
key: 'contactDetail',
default: null,
}),
contactAlert: atom({
key: 'contactAlert',
default: null,
}),
};
@@ -1,8 +0,0 @@
import { useRecoilState } from 'recoil';
import { IContactAlert } from '../../../common/typings/contact';
import { contactsState } from './state';
export const useContactAlert = (): IContactAlert => {
const [alert, setAlert] = useRecoilState(contactsState.contactAlert);
return { alert, setAlert };
};
Loaded 100 of 443 files, more files were not shown because too many files have changed in this diff. Show more