From 28180512ee5e6bdfc01c4007721f6878e0284674 Mon Sep 17 00:00:00 2001 From: Taso Date: Thu, 16 Dec 2021 18:40:36 -0500 Subject: [PATCH 01/23] Update documentation for initial release --- docs/npwd/dev/FrameworkIntegration.md | 31 ++++++ docs/npwd/start/Config.md | 7 +- docs/npwd/start/GetStarted.md | 153 -------------------------- docs/npwd/start/Install.md | 102 +++++++++++++++++ docs/npwd/start/Installation.md | 144 ------------------------ docs/npwd/start/Intro.md | 6 +- docs/npwd/start/RequiredDeps.md | 50 --------- sidebars.js | 12 +- 8 files changed, 146 insertions(+), 359 deletions(-) create mode 100644 docs/npwd/dev/FrameworkIntegration.md delete mode 100644 docs/npwd/start/GetStarted.md create mode 100644 docs/npwd/start/Install.md delete mode 100644 docs/npwd/start/Installation.md delete mode 100644 docs/npwd/start/RequiredDeps.md diff --git a/docs/npwd/dev/FrameworkIntegration.md b/docs/npwd/dev/FrameworkIntegration.md new file mode 100644 index 0000000..7ec4ab6 --- /dev/null +++ b/docs/npwd/dev/FrameworkIntegration.md @@ -0,0 +1,31 @@ +--- +id: framework_integration +title: Framework Integration with NPWD +sidebar_label: Framework Integration +--- + +NPWD was designed to be a framework agnostic resource that could work with any arbitary framework. To enable this, +we expose the `newPlayer` & the `unloadPlayer` export functions to pass the player context to NPWD. + +:::warning + +The NPWD player API is mostly finalized, but the naming of certain exports and the expected data structure, +may be subject to change. + +::: + +## Framework Integration Steps + +You should use the `newPlayer` function whenever a player has finished loading in your framework. If you have a +multicharacter system, make sure that the `identifier` property in the passed argument object is unique to +each character. + +If your framework has a system for switching characters, you should first call the `unloadPlayer` function to unload +the internal NPWD player, then call the `newPlayer` function to load the new character with the new context. + +## Examples + +If you would like to see an example of this API in use, see the following repositories. + +* [esx-npwd](https://github.com/overextended/esx-npwd) +* [qb-npwd](https://github.com/project-error/qb-npwd) \ No newline at end of file diff --git a/docs/npwd/start/Config.md b/docs/npwd/start/Config.md index a66939d..6d6b019 100644 --- a/docs/npwd/start/Config.md +++ b/docs/npwd/start/Config.md @@ -1,11 +1,14 @@ --- id: config_reference -title: Setting Up Config -sidebar_label: Configuration +title: Additional Configuration +sidebar_label: Additional Config --- NPWD includes a `config.json` file in the root directory that allows for further customization of phone behavior. This file is what allows for us to offer framework-agnostic compatibility as well as for multitude of configuration options depending on your needs. +:::warning +This documentation is not yet complete, refer to source for more information. +::: diff --git a/docs/npwd/start/GetStarted.md b/docs/npwd/start/GetStarted.md deleted file mode 100644 index d77d478..0000000 --- a/docs/npwd/start/GetStarted.md +++ /dev/null @@ -1,153 +0,0 @@ ---- -id: get_started -title: Getting Started -sidebar_label: Getting Started ---- - -## Dependencies (As of 2/20/2021) -Below are the dependencies for full functionality of the resource. Adapating it to your framework shouldn't be difficult, but some of the features depend on ESX in the current sate. Additonal documentation for what needs to be changed will be made prior to full launch. - -1. [Es_Extended](https://github.com/esx-framework/es_extended/tree/legacy) For the best results, we recomend **V1 Final.** -1. [Screenshot-Basic](https://github.com/project-error/screenshot-basic) **Be sure to use this version.** -1. [Mumble-Voip](https://github.com/FrazzIe/mumble-voip-fivem) Support for other VOIP resources is planned, but not currently under development. -## Prerequisites - -The Installation Steps assumes you have the following prerequisites: - -1. Dependencies installed. -1. The ability to open a terminal. It's *recomended*, not required, to use [Visual Studio Code](https://code.visualstudio.com/) or Windows Powershell for the sake of this guide to better provide support should issues arise. -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. -1. [Imgur Token](https://api.imgur.com/oauth2/addclient) Your app registration should look like [this](https://i.imgur.com/yO7L431.png). When you register your app, you will get a `Client ID`. This is set in `the server.cfg` as such ```setr SCREENSHOT_BASIC_TOKEN Client_ID```. - - - -## Installation Steps - -**Resource** - -1. Clone the [repo](https://github.com/project-error/npwd) into your `server-data/resources/` folder. The path will be `server-data\resources\npwd`. **Don't clone the repo into a sub folder.** -1. Ensure the resource folder is named `npwd`. -1. Import the [sql file](https://github.com/project-error/npwd/blob/master/resources/import.sql) from the root directory into your database. -1. Add the following to your `server.cfg`: -``` -setr SCREENSHOT_BASIC_TOKEN Client_ID -ensure npwd # After es_extended. -ensure screenshot-basic -``` -1. Make your configurations in the [config.json](https://github.com/project-error/npwd/blob/master/config.json) **before** building the phone. Otherwise you will need to re-build. -1. Open a terminal with the program of your choice. -1. Change your directiory into `npwd\phone` *like so*: `cd A:\FXServer\server-data\resources\npwd\phone` -1. Install node dependencies with `yarn install`. -1. Build in the current directory with `yarn build`. -1. Change your directiory into `npwd\resources` *like so*: `cd A:\FXServer\server-data\resources\npwd\resources` -1. Install node dependencies with`yarn install`. -1. Build in the current directory with `yarn build`. -1. Start your FiveM server - -**Database** - -*New Phone Who Dis (NPWD)* uses its own database driver compatible with `mysql-async` and `ghmattimysql`'s connection string. If you -don't utilize these resources, ensure you have this set in your console. - -``` -set mysql_connection_string "server=127.0.0.1;database=es_extended;userid=user;password=pass" -``` - -**Example `server.cfg`** - -```cfg -ensure es_extended # Must be started first. - -# Mumble-Voip -ensure mumble-voip -setr voice_use3dAudio true -setr voice_useSendingRangeOnly off - -#NPWD -setr SCREENSHOT_BASIC_TOKEN YOUR_IMGUR_TOKEN # Don't forget to set the token here. -ensure npwd -ensure screenshot-basic - -#All other resources you might have -``` -## Development Iteration Cycle -- You must rebuild the resource following any changes by doing `yarn build` in the `resources` and `phone` folder. -- 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 do `ensure npwd` after making your change. -- Avoid commiting `index.html` as the development version overrides the production version. - - -## Configuration - -This resource is highly configurable through the [config.json](https://github.com/project-error/npwd/blob/master/config.json). This JSON file holds configuration for the phone itself, for the apps running on it and peripheral information. - -Below is the list of current configuration options **(WIP)**: - -**Some of these configurations no longher apply.** - -| 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 | 160 | Limit on how many characters tweets can contain | -| twitter.newLineLimit | 10 | Limit on how many new lines a message 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 | - -## Discord Logging - -To configure Discord integration; add the following variables to your `server.cfg` file: - -``` -set discord_bot_token "YOUR_DISCORD_BOT_TOKEN" -set discord_channel_id "YOUR_DISCORD_CHANNEL_ID" -``` - -Current Discord integrations with the phone **(WIP)**: - -- Twitter: reporting tweets - -# Important Information -* By installing [npwd (NPWD)](https://github.com/project-error/npwd), you agree to the use of the following diagnostic package: - * Sentry, (in use within the React portion of NPWD) Automatically - uploads relevant sesssion details and stack traces whenever an exception is thrown. We use these metrics to further improve the quality of the phone. - - * To explicitly disable this, we urge you **not to** as its incredibly useful metrics for us, - please change the `SentryErrorMetrics` setting to `false` in `phone/config/default.json` and rebuild the phone. -* Compatability with [esx_kashacter](https://github.com/FiveEYZ/esx_kashacter) is unknown as of 2/20/2021. Testing still need's to be conducted. - * Same applies to any Multi-Character as testing has only been conducted on`V1 Final` and `1.1 Weight` **without** the use of these resources. -* Encountered an issue? Please open an issue [here](https://github.com/project-error/npwd/issues/new/choose) -* If you seek additional support, feel free to join the [Project-Error Discord](https://discord.gg/HYwBjTbAY5). - -# Previews - -[Latest Teaser Video (October 28th)](https://streamable.com/f1ri9r) - -### Apps -Most of these apps have UI that does **not** represent the final product and are subject to change. -- [**Bank**](https://i.imgur.com/P5Dg0Mj.png) -- [**Calculator**](https://i.imgur.com/96e3bFF.png) -- [**Camera**](https://i.imgur.com/1aGEV28.png) -- [**Contacts**](https://i.imgur.com/3Qc1eJB.png) -- [**Marketplace**](https://i.imgur.com/8hPm6tU.png) -- [**Messages**](https://i.imgur.com/UYHoVvy.png) -- [**Notes**](https://i.imgur.com/m0ktIyj.png) -- [**Phone**](https://i.imgur.com/zuxERmR.png) -- [**Settings**](https://i.imgur.com/0ggMdij.png) -- [**Twitter**](https://i.imgur.com/WfjOl1t.png) diff --git a/docs/npwd/start/Install.md b/docs/npwd/start/Install.md new file mode 100644 index 0000000..b4d1bef --- /dev/null +++ b/docs/npwd/start/Install.md @@ -0,0 +1,102 @@ +--- +id: installation +title: Install and Setup +sidebar_label: Installation +--- + +### Third-Party Resource Dependencies +If you wish for NPWD to have full functionality. The following resources are required to be +installed and started before NPWD. + +1. [screenshot-basic](https://github.com/project-error/screenshot-basic) - **Make sure to use the exact version, as linked.** +2. [pma-voice](https://github.com/AvarianKnight/pma-voice) - Support for other VOIP resources is planned (`toko-voip`) etc + +:::note +NPWD has standardized pma-voice as our default voice system for the phone. We encourage everyone to do such. +::: + +## Installation and Setup + +### Downloading Release +1. Download the latest release of NPWD from the [releases page](https://github.com/project-error/npwd/releases) +2. Unzip and place the `npwd` folder in your FXServer's `resources` directory. + +### Setting up with a Framework +If you are using a popular framework such as ESX or QBCore, you can easily integrate NPWD using the corresponding +premade compatbility resources, these should automatically configure NPWD to work with your framework. + +* [esx-npwd](https://github.com/overextended/esx-npwd) +* [qb-npwd](https://github.com/project-error/qb-npwd) + +If you have *basic* development knowledge and wish to integrate NPWD with any arbitrary framework, +see the following [documentation page](../dev/FrameworkIntegration.md) for more information. + + +### Setting up Camera Functionality + +NPWD allows for players to access a camera app and take in-game photos. These photos must be uploaded and stored somewhere. +One solution is to setup NPWD to upload the photos to Imgur. + +**Steps** +1. Setup an imgur application [here](https://api.imgur.com/oauth2/addclient) +2. Copy the client ID and add `setr SCREENSHOT_BASIC_TOKEN ` to your `server.cfg` file before starting NPWD. + +### Setup Your Database + +To setup NPWD's database schema, you must run the `import.sql` file bundled with the downloaded release. + +If you already use `mysql-async`, `ghmattimysql`, or `oxmysql`. NPWD will automatically configure itself to use the `mysql_connection_string` +from your `server.cfg` file. + +If you do not already use one of these libraries, you must add an entry to your `server.cfg` file for `mysql_connection_string`, matching +one of the following connection configuration formats: + +``` +set mysql_connection_string "mysql://root:12345@localhost/es_extended?charset=utf8mb4" +set mysql_connection_string "user=root;database=es_extended;password=12345;charset=utf8mb4" +``` + +### Setting up Discord Log Integration + +NPWD can integrate with Discord to log certain actions. This requires a webhook to be setup and the following convar +set in your `server.cfg` file: + +``` +set NPWD_DISCORD_TOKEN "my_discord_webhook" +``` + +## Finishing Up + +### Example Final Config + +Your `server.cfg` should somewhat resemble the following (in terms of order): +```cfg +set mysql_connection_string "mysql://root:12345@localhost/es_extended?charset=utf8mb4" +setr SCREENSHOT_BASIC_TOKEN "my_client_id" +set NPWD_DISCORD_TOKEN "my_discord_webhook" + +ensure screenshot-basic +ensure pma-voice + +ensure my_framework_here # Your framework resource +ensure esx-npwd # Any compatibility resources like esx-npwd or qb-npwd + +ensure npwd +``` + + +### Important Information +* By installing [npwd (NPWD)](https://github.com/project-error/npwd), you agree to the use of the following diagnostic package: + * Sentry, (in use within the React portion of NPWD) Automatically + uploads relevant sesssion details and stack traces whenever an exception is thrown. We use these metrics to further improve the quality of the phone. + + * To explicitly disable this, we urge you **not to** as its incredibly useful metrics for us, + please change the `SentryErrorMetrics` setting to `false` in `phone/config/default.json` and rebuild the phone. +* Compatability with [esx_kashacter](https://github.com/FiveEYZ/esx_kashacter) is unknown as of 2/20/2021. Testing still need's to be conducted. + * Same applies to any Multi-Character as testing has only been conducted on`V1 Final` and `1.1 Weight` **without** the use of these resources. +* Encountered an issue? Please open an issue [here](https://github.com/project-error/npwd/issues/new/choose) +* If you seek additional support, feel free to join the [Project-Error Discord](https://discord.gg/HYwBjTbAY5). + +### Previews + +[Latest Teaser Video (October 28th)](https://streamable.com/f1ri9r) diff --git a/docs/npwd/start/Installation.md b/docs/npwd/start/Installation.md deleted file mode 100644 index 475098a..0000000 --- a/docs/npwd/start/Installation.md +++ /dev/null @@ -1,144 +0,0 @@ ---- -id: installation -title: Installation of the Phone -sidebar_label: Installation ---- -### Initial Setup -1. Clone directly from our Git repo, which can be found [here](https://github.com/project-error/npwd), - into FXServer's `resources` directory. - -:::warning -For the moment, do not attempt to clone directly into a subdirectory, such as `[phone]` as this -may raise unexpected behavior with path handling. -::: - -2. Add the following lines to the `server.cfg` -```cfg -setr SCREENSHOT_BASIC_TOKEN Client_ID -# This must be placed after your framework -ensure nwpd -ensure screenshot-basic -``` -3. Change the config settings that can be found in `npwd/config.json`, to -the settings of your choosing. - -### Install Dependencies and Building Code -As this is a `TypeScript` resource, we need to both install `npm` packages and build the source -code. - -1. Open a terminal of your choice (i.e, Powershell -2. Navigate to the NPWD root directory - -3. Install yarn -```shell -yarn -# or -yarn install -``` - -3. Build -```shell -yarn build -``` -[**Lerna**](https://github.com/lerna/lerna) will now build both `resources` and `phone` files. - -### Database Setup -*New Phone Who Dis* integrates our own `MySQL` client directly (`mysql2`). Meaning, we do -not require a middleware resource like `mysql-async` or `oxmysql`. - -**Make sure you have the following added to your `server.cfg` file, with the values -replaced with your respective credentials** - -```cfg -set mysql_connection_string "server=127.0.0.1;database=npwd_wow;userid=dev;password=devlocal" -``` - -:::note - -If you already have `ghmattimysql` or `mysql-async` correctly installed, we are able to parse -those connection details without any changes, as our connection string format is directly compatible. -::: - -### Finishing Up - -After you have completed all of these listed steps, your `server.cfg` should look something -like this: - -```shell -# Your framework must be started before NPWD. - -# pma-voice -ensure pma-voice -# and other convars you use - -# NPWD -setr SCREENSHOT_BASIC_TOKEN YOUR_IMGUR_TOKEN # Don't forget to set the token here. -ensure npwd -ensure screenshot-basic - -#All other resources you might have -``` - -You should now be all set to start your server up and play with the resource! - - -:::note -If you get the error: `Error: Event playerJoining was not safe for net.` then your artifacts are outdated. - -NPWD requires a **minimum** of artifact version `3622`. Please update your artifacts to the latest version [here](https://runtime.fivem.net/artifacts/fivem/build_server_windows/master/?) -::: - -### Handling user data -If you are only going to use the default player data, you can look away from this. For you that are using a framework, or some sort of a multicharacter system, please keep reading. - -Let's start with changing the config. Change 'enableMultiChar' to `true` and remember to change the database options if needed. -```json -{ - "general": { - "useDashNumber": true, - "enableMultiChar": true - }, - "database": { - "playerTable": "users", - "identifierColumn": "identifier" - } -} -``` - -We have created the server-side event called `npwd:newPlayer` that you need to call in order to apply the user data desired. It takes in a object as an argument with `{ source, identifier, firstname, lastname }`, where `firstname` and `lastname` are optional. - -If you are using ESX, we already have the solution for you. -### ESX -#### Lua -```lua --- server-side -AddEventHandler('esx:playerLoaded', function(playerId, xPlayer) - TriggerEvent('npwd:newPlayer', - { - source = playerId, - identifier = xPlayer.identifier, - firstname = xPlayer.get('firstname'), - lastname = xPlayer.get('lastname') - } - ) -end) -``` - -#### JS/TS -```js -// server-side -on('esx:playerLoaded', (playerId, xPlayer) => { - emit('npwd:newPlayer', { - source: playerId, - identifier: xPlayer.identifier, - firstname: xPlayer.get('firstname'), - lastname: xPlayer.get('lastname') - }) -}) -``` - -If you're using any other framework, listen to what event that selects or loads the character and trigger the `npwd:newPlayer` event with your data. - -:::note -If you don't see a open-source framework listed here and have a solution, please consider sharing it with us! -::: diff --git a/docs/npwd/start/Intro.md b/docs/npwd/start/Intro.md index c1a6e95..7cef758 100644 --- a/docs/npwd/start/Intro.md +++ b/docs/npwd/start/Intro.md @@ -7,10 +7,8 @@ slug: / :::warning -NPWD, although close to release, is still being updated and may **not** be ready for use -in live environments. Breaking changes may still occur as development progresses. -**You should not install this phone for any other purpose aside from beta testing** - +NPWD is currently in a public beta phase, edge cases and environment issues may occur and should be expected. +If you encounter any issues, please make sure you report them adequately. ::: This is **New Phone Who Dis** a NUI based phone resource for the multiplayer GTA modification, diff --git a/docs/npwd/start/RequiredDeps.md b/docs/npwd/start/RequiredDeps.md deleted file mode 100644 index 1a3f073..0000000 --- a/docs/npwd/start/RequiredDeps.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -id: requiredDeps -title: NPWD Dependencies -sidebar_label: Dependencies ---- - -:::warning - -These dependencies are not **final** and only represent the current state. - -::: - -### Resource Dependencies -Below are the required **resource** dependencies. They must be installed alongside NPWD for full functionality. - -1. [screenshot-basic](https://github.com/project-error/screenshot-basic) - **Make sure to use the exact version, as linked.** -2. [pma-voice](https://github.com/AvarianKnight/pma-voice) - Support for other VOIP resources is planned (`toko-voip`) etc - - -:::note -NPWD has standardized pma-voice as our default voice system for the phone. We encourage everyone to do such. - -Adapting **NPWD** to your custom framework may not be very difficult. You can read more about it at **Installation** - -::: - -### Prerequisites for Pre-Launch Testing - -In order to be able to effectively test the phone as it is developed, you must -have these pre-requisites installed. These will ***not*** be required at launch when we begin -to produce *webpacked* releases. - -1. Basic understanding of how to interact with a terminal - (i.e, how to open one and execute commands). For most users, we recommend **Windows Powershell** -2. [Git for Windows](https://git-scm.com/download/win) - To easily clone the repository -3. [NodeJS > v16](https://nodejs.org/en/about/releases/) - To provide package management and env tools -4. [yarn](https://yarnpkg.com/) - The `yarn` package manager which can be enabled using `corepack` on Node v16 - ```shell - corepack enable - ``` - -5. Fully Functional FXServer - As setup [here](https://docs.fivem.net/docs/server-manual/setting-up-a-server/) -6. [Imgur Token](https://api.imgur.com/oauth2/addclient) - - Your app registration should look like [this](https://i.imgur.com/yO7L431.png). - When you register your app, you will received a `Client ID`. This should be set as a replicated convar in - `the server.cfg` as shown below: - - ``` - setr SCREENSHOT_BASIC_TOKEN Client_ID - ``` diff --git a/sidebars.js b/sidebars.js index 35af8cf..d5fb311 100644 --- a/sidebars.js +++ b/sidebars.js @@ -5,20 +5,20 @@ module.exports = { type: 'category', label: 'Getting Started', items: [ - 'npwd/start/requiredDeps', 'npwd/start/introduction', - 'npwd/start/installation' + 'npwd/start/installation', + 'npwd/start/config_reference', ] }, { type: 'category', - label: 'Development', - items: ['npwd/dev/setup', 'npwd/dev/basics',] + label: 'API Reference', + items: ['npwd/api/client-exports', 'npwd/api/server-exports'] }, { type: 'category', - label: 'API Reference', - items: ['npwd/api/client-exports', 'npwd/api/server-exports'] + label: 'Development', + items: ['npwd/dev/framework_integration', 'npwd/dev/setup', 'npwd/dev/basics',] }, 'npwd/current_state', 'npwd/credits' From dcbf22d7e1649606c699e641209f7aae5443e3b8 Mon Sep 17 00:00:00 2001 From: Taso Date: Thu, 16 Dec 2021 19:16:15 -0500 Subject: [PATCH 02/23] tweak(nav): tweak documentation text --- docusaurus.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index 5d9982f..b280eb1 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -33,7 +33,7 @@ module.exports = { { to: "docs/", activeBasePath: "docs", - label: "Resource Docs", + label: "Documentation", position: "left", }, { From f90b8b1391c0318640889f11e236db1e1131ea24 Mon Sep 17 00:00:00 2001 From: Taso Date: Thu, 16 Dec 2021 19:29:23 -0500 Subject: [PATCH 03/23] tweak(config): tweak sitewide config slightly --- docusaurus.config.js | 31 ++++++++++++++++++++++--------- src/pages/index.tsx | 2 +- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index b280eb1..53b699f 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -1,6 +1,6 @@ module.exports = { title: "Project Error", - tagline: "Developers striving to produce quality open source FiveM resources", + tagline: "An open source collective centered around quality.", url: "https://docs.projecterror.dev", baseUrl: "/", onBrokenLinks: "throw", @@ -46,30 +46,39 @@ module.exports = { label: "GitHub", position: "right", }, + { + label: "Donate", + href: "https://ko-fi.com/projecterror", + position: "right", + } ], }, footer: { style: "dark", links: [ { - title: "Projects", + title: "Popular Projects", items: [ { - label: "New Phone Who Dis", - href: "https://github.com/project-error/new-phone-who-dis", + label: "New Phone Who Dis (NPWD)", + href: "https://github.com/project-error/npwd", }, { - label: "New Garage Who Dis", - to: "#", + label: "FiveM React Boilerplate Lua", + href: "https://github.com/project-error/fivem-react-boilerplate-lua", }, { - label: "New Bank Who Dis", - to: "#", + label: "PE Basic Loading", + href: "https://github.com/project-error/pe-basicloading", }, + { + label: "PE V8 Utils", + href: "https://github.com/project-error/pe-utils" + } ], }, { - title: "Community", + title: "Community Links", items: [ { label: "Discord", @@ -79,6 +88,10 @@ module.exports = { label: "GitHub", href: "https://github.com/project-error/", }, + { + label: "Donate", + href: "https://ko-fi.com/projecterror" + } ], }, ], diff --git a/src/pages/index.tsx b/src/pages/index.tsx index a8977b3..71b9abd 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -57,7 +57,7 @@ function Feature({ imageUrl, title, description }) { function Home() { const context = useDocusaurusContext(); - const { siteConfig = {} } = context; + const { siteConfig } = context; return ( Date: Thu, 16 Dec 2021 19:29:47 -0500 Subject: [PATCH 04/23] tweak(intro): move previews and feaures from install to intro --- docs/npwd/start/Install.md | 3 --- docs/npwd/start/Intro.md | 6 ++++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/npwd/start/Install.md b/docs/npwd/start/Install.md index b4d1bef..f8c7797 100644 --- a/docs/npwd/start/Install.md +++ b/docs/npwd/start/Install.md @@ -97,6 +97,3 @@ ensure npwd * Encountered an issue? Please open an issue [here](https://github.com/project-error/npwd/issues/new/choose) * If you seek additional support, feel free to join the [Project-Error Discord](https://discord.gg/HYwBjTbAY5). -### Previews - -[Latest Teaser Video (October 28th)](https://streamable.com/f1ri9r) diff --git a/docs/npwd/start/Intro.md b/docs/npwd/start/Intro.md index 7cef758..dd2f511 100644 --- a/docs/npwd/start/Intro.md +++ b/docs/npwd/start/Intro.md @@ -20,4 +20,10 @@ There are several goals of this project: * Create a **clean** and **maintable** codebase * Make it as framework **standalone** as possible +### Features +ADD FEATURE LIST HERE + +### Previews + +[Latest Teaser Video (October 28th)](https://streamable.com/f1ri9r) From 4d73b2654eceeac97bd551eb3e68e251908aa3c0 Mon Sep 17 00:00:00 2001 From: Taso Date: Thu, 16 Dec 2021 20:07:19 -0500 Subject: [PATCH 05/23] Add development bootstrap guide --- docs/npwd/dev/DevelopmentBootstrap.md | 65 +++++++++++++++++++++++++++ sidebars.js | 2 +- 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 docs/npwd/dev/DevelopmentBootstrap.md diff --git a/docs/npwd/dev/DevelopmentBootstrap.md b/docs/npwd/dev/DevelopmentBootstrap.md new file mode 100644 index 0000000..ba330c4 --- /dev/null +++ b/docs/npwd/dev/DevelopmentBootstrap.md @@ -0,0 +1,65 @@ +--- +id: dev_bootstrap +title: Setting Up for Development +sidebar_label: Bootstrap Development +--- +Setting up NPWD for development requires a few steps and some familiarity with the scripts. +This short guide will help you get your development environment bootstrapped and ready. + +## Enviroment Setup + +Please make sure you have the following dependencies installed within your development environment. + +#### Prerequisites +* Git +* Node > 16.x +* Yarn + +#### Enabling Yarn + +If you have not used Yarn before and are using Node > 16.10, you will need to enable it using `corepack enable`. If you have not +used yarn before and are using Node < 16.10, you will need to install it using `npm i -g yarn`. + +## Installing Dependencies & Setup + +**Step 1** + +Clone the repository into your `resources` folder with the name `npwd`. + +```sh +git clone https://github.com/project-error/npwd.git +``` + +**Step 2** + +Navigate to cloned folder and install dependencies for both NUI and game scripts (This will automatically install dependencies in +all the subpackages) +```sh +cd npwd && yarn +``` + +## Build Phase + +#### Building all of NPWD + +To build the whole project (NUI & game-scripts), run the following command in the repository root. + +```sh +yarn build +``` + +#### Building NUI + +To build **only** the NUI package, navigate to the `phone` folder and run the `build` script as shown. + +```sh +cd phone && yarn build +``` + +#### Building Game Scripts + +To build **only** the game scripts package, navigate to the `resources` folder and run the `build` script as shown. + +```sh +cd resources && yarn build +``` \ No newline at end of file diff --git a/sidebars.js b/sidebars.js index d5fb311..f665ce4 100644 --- a/sidebars.js +++ b/sidebars.js @@ -18,7 +18,7 @@ module.exports = { { type: 'category', label: 'Development', - items: ['npwd/dev/framework_integration', 'npwd/dev/setup', 'npwd/dev/basics',] + items: ['npwd/dev/dev_bootstrap', 'npwd/dev/framework_integration', 'npwd/dev/setup', 'npwd/dev/basics',] }, 'npwd/current_state', 'npwd/credits' From 3575ce98a72840f058960c800a86e3721f36847c Mon Sep 17 00:00:00 2001 From: Taso Date: Thu, 16 Dec 2021 20:24:26 -0500 Subject: [PATCH 06/23] Add events API reference --- docs/npwd/api/events.md | 20 ++++++++++++++++++++ sidebars.js | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 docs/npwd/api/events.md diff --git a/docs/npwd/api/events.md b/docs/npwd/api/events.md new file mode 100644 index 0000000..f5b1866 --- /dev/null +++ b/docs/npwd/api/events.md @@ -0,0 +1,20 @@ +--- +id: npwd-events +title: Resource Events +sidebar_label: Events +--- + +NPWD will sometimes emit events for third-party resource integration. + +## Client Events + +### `npwd:PhotoModeStarted` + +This event is emitted when a player first enters the camera mode. It can be useful for toggling UI components while the +camera is active. + +### `npwd:PhotoModeEnded` + +This event is the ending equivalent of `npwd:PhotoModeStarted`, it will be triggered upon the player exiting the camera. +It can be useful for toggling UI components while the camera is active. + diff --git a/sidebars.js b/sidebars.js index f665ce4..7040ce2 100644 --- a/sidebars.js +++ b/sidebars.js @@ -13,7 +13,7 @@ module.exports = { { type: 'category', label: 'API Reference', - items: ['npwd/api/client-exports', 'npwd/api/server-exports'] + items: ['npwd/api/client-exports', 'npwd/api/server-exports', 'npwd/api/npwd-events'] }, { type: 'category', From 9f25402f3f1e9f7f35d6f2e566244374eface8bf Mon Sep 17 00:00:00 2001 From: RockySouthpaw <55056068+RockySouthpaw@users.noreply.github.com> Date: Wed, 22 Dec 2021 18:24:05 -0500 Subject: [PATCH 07/23] Update credits (#2) --- docs/npwd/Credits.md | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/docs/npwd/Credits.md b/docs/npwd/Credits.md index e8d384a..918622d 100644 --- a/docs/npwd/Credits.md +++ b/docs/npwd/Credits.md @@ -4,21 +4,22 @@ title: Contributers sidebar_label: Contributers --- -We appreciate all the support and help we get. Looking forward to making this list longer! +We appreciate all the support and help we get. Below is a list of contributors to the resource with the [**Project Error Team**](https://github.com/orgs/project-error/people) removed from the list. We hope we continuously add to this list as time passes. -- [**Oldarorn**](https://github.com/Oldarorn) - [**AvarianKnight**](https://github.com/AvarianKnight) - [**BombayV**](https://github.com/BombayV) -- [**synterrr**](https://github.com/synterrr) -- [**dayiskuan**](https://github.com/dayiskuan) -- [**brezedc**](https://github.com/brezedc) -- [**BTNGaming**](https://github.com/BTNGaming) -- [**Ruqen**](https://github.com/Ruqen) -- [**NuttyShrimp**](https://github.com/NuttyShrimp) -- [**wowjeeez**](https://github.com/wowjeeez) -- [**vWernay**](https://github.com/vWernay) -- [**DmACKGL**](https://github.com/DmACKGL) +- [**Ekinoxx0**](https://github.com/Ekinoxx0) +- [**GoatG33k**](https://github.com/GoatG33k) - [**HypeLevels**](https://github.com/HypeLevels) +- [**NuttyShrimp**](https://github.com/NuttyShrimp) +- [**Oldarorn**](https://github.com/Oldarorn) +- [**Ruqen**](https://github.com/Ruqen) +- [**brezedc**](https://github.com/brezedc) +- [**dayiskuan**](https://github.com/dayiskuan) - [**goodnightnoodles**](https://github.com/goodnightnoodles) -- [**GoatG33k**](https://github.com/GoatG33k) -- [**iTexZoz**](https://github.com/iTexZoz) \ No newline at end of file +- [**iTexZoz**](https://github.com/iTexZoz) +- [**synterrr**](https://github.com/synterrr) +- [**vWernay**](https://github.com/vWernay) +- [**wowjeeez**](https://github.com/wowjeeez) + +Want your name here? Feel free to open a [pull request](https://github.com/project-error/npwd/pulls) targeting any of our [issues](https://github.com/project-error/npwd/issues), add/improve translation, or any sort of useful contributions to the resource repository. From b0e1a38851b9b96f318cc08ba2a6bbed5625147c Mon Sep 17 00:00:00 2001 From: itschip Date: Thu, 23 Dec 2021 23:49:03 +0100 Subject: [PATCH 08/23] feat(docs): disable apps docs --- docs/npwd/dev/DisableApps.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 docs/npwd/dev/DisableApps.md diff --git a/docs/npwd/dev/DisableApps.md b/docs/npwd/dev/DisableApps.md new file mode 100644 index 0000000..e00f79d --- /dev/null +++ b/docs/npwd/dev/DisableApps.md @@ -0,0 +1,35 @@ +--- +id: disable_apps +title: Disable Apps +sidebar_label: Disable Apps +--- + +If you wish to disable a certain app, open up `apps.tsx`; + +Location: `phone/src/os/apps/config/apps.tsx` + +Here you'll see all the apps listed within the `APPS` object. In order to remove an app, you can simply comment out or remove the app you want. + +```tsx +export const APPS: IAppConfig[] = [ + ..// +/* Hiding the bank app while the bank resource gets done */ + /*{ + id: 'BANK', + nameLocale: 'APPS_BANK', + backgroundColor: blue[900], + color: common.white, + path: '/bank', + Route: () => , + },*/ + { + id: 'MATCH', + nameLocale: 'APPS_MATCH', + backgroundColor: MATCH_APP_PRIMARY_COLOR, + color: MATCH_APP_TEXT_COLOR, + path: '/match', + Route: () => , + }, + /... +] +``` \ No newline at end of file From 1fa90045d83b98c271bd65a6d753833f4e3eee85 Mon Sep 17 00:00:00 2001 From: itschip Date: Thu, 23 Dec 2021 23:49:17 +0100 Subject: [PATCH 09/23] feat(docs): update sidebar --- sidebars.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sidebars.js b/sidebars.js index 7040ce2..144e4a0 100644 --- a/sidebars.js +++ b/sidebars.js @@ -18,7 +18,7 @@ module.exports = { { type: 'category', label: 'Development', - items: ['npwd/dev/dev_bootstrap', 'npwd/dev/framework_integration', 'npwd/dev/setup', 'npwd/dev/basics',] + items: ['npwd/dev/dev_bootstrap', 'npwd/dev/framework_integration', 'npwd/dev/setup', 'npwd/dev/disable_apps', 'npwd/dev/basics',] }, 'npwd/current_state', 'npwd/credits' From 80c75557e19dbf17eb875cfb926bd52d7427e98e Mon Sep 17 00:00:00 2001 From: itschip Date: Thu, 23 Dec 2021 23:49:42 +0100 Subject: [PATCH 10/23] fix(api/events): fix typo --- docs/npwd/api/events.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/npwd/api/events.md b/docs/npwd/api/events.md index f5b1866..6e4949f 100644 --- a/docs/npwd/api/events.md +++ b/docs/npwd/api/events.md @@ -16,5 +16,5 @@ camera is active. ### `npwd:PhotoModeEnded` This event is the ending equivalent of `npwd:PhotoModeStarted`, it will be triggered upon the player exiting the camera. -It can be useful for toggling UI components while the camera is active. +It can be useful for toggling UI components on again. From 711f01b6711c0a98530926d79e118f92b893e991 Mon Sep 17 00:00:00 2001 From: itschip Date: Thu, 23 Dec 2021 23:50:23 +0100 Subject: [PATCH 11/23] feat(start/config): include all necassary config options --- docs/npwd/start/Config.md | 74 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/docs/npwd/start/Config.md b/docs/npwd/start/Config.md index 6d6b019..12754f3 100644 --- a/docs/npwd/start/Config.md +++ b/docs/npwd/start/Config.md @@ -8,6 +8,80 @@ NPWD includes a `config.json` file in the root directory that allows for further behavior. This file is what allows for us to offer framework-agnostic compatibility as well as for multitude of configuration options depending on your needs. +### PhoneAsItem +- `enabled` + - If you want to enable the phone as an item. + - `default`: **false** +- `exportResource` + - The resource where you have an exported function to check for items. +- `exportFunction` + - The exported function from the `exportResource` resource. + + +### General + +- `enableMultiChar` + - Set this to `true` you're running a framework that handles character details independent. + - `default`: **false** + +### Database + +- `useIdentifierPrefix` + - If you're using a prefix such as `license:` or `discord:` with the identifier. + - `default`: **false** +- `playerTable` + - The database table where you store players/characters used with the phone. + - `default`: **users** +- `identifierColumn` + - The identifier column from the `playerTable` table. + - `default`: **identifier** +- `phoneNumberColumn` + - The phone number column from the `playerTable` table. + - `default`: **phone_number** + +### Twitter +- `showNotifications` + - Whether to show notifications from Twitter or not. + - `default`: **true** +- `generateProfileNameFromUsers`: + - If you want to generate profiles for the players when the phone is initialized. + - `default`: **true** +- `allowEditableProfileName` + - If you want to allow players to edit their profile name. + - `default`: **true** +- `allowDeleteTweets`: + - Allow players to delete their tweets. + - `default`: **true** +- `allowReportTweets` + - Allow players to report tweets. + - `default`: **true** +- `characterLimit` + - The number of characters allowed in a tweet. + - `default`: **160** +- `newLineLimit`: + - How many new lines a tweet can contain. + - `default`: **10** +- `enableAvatars` + - If players should be able to change their avatar. + - `default`: **true** +- `enableEmojis` + - Whether to allow emojis in tweets or not. + - `default`: **true** +- `enableImages` + - Whether to allow images/media in tweets or not. + - `default`: **true** +- `maxImages` + - The max amount of images allowed in a tweet. + - `default`: **true** + +### Match +- `generateProfileNameFromUsers` + - If you want to generate profiles for the players when the phone is initialized. + - `default`: **true** +- `allowEditableProfileName` + - If you want to allow players to edit their profile name. + - `default`: **true** + :::warning This documentation is not yet complete, refer to source for more information. ::: From 0b059c6c34406d8eb0983e1cad51032a87241a66 Mon Sep 17 00:00:00 2001 From: itschip Date: Thu, 23 Dec 2021 23:50:46 +0100 Subject: [PATCH 12/23] feat(npwd/dev): overall intallation and bootstrap docs changes --- docs/npwd/dev/DevelopmentBootstrap.md | 27 +++++++++++++++++++++++---- docs/npwd/start/Install.md | 10 +++++----- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/docs/npwd/dev/DevelopmentBootstrap.md b/docs/npwd/dev/DevelopmentBootstrap.md index ba330c4..6e2cce0 100644 --- a/docs/npwd/dev/DevelopmentBootstrap.md +++ b/docs/npwd/dev/DevelopmentBootstrap.md @@ -11,9 +11,9 @@ This short guide will help you get your development environment bootstrapped and Please make sure you have the following dependencies installed within your development environment. #### Prerequisites -* Git -* Node > 16.x -* Yarn +* [Git](https://git-scm.com/) +* [Node > 16.x](https://nodejs.org/en/) +* [Yarn](https://classic.yarnpkg.com/lang/en/docs/install) #### Enabling Yarn @@ -62,4 +62,23 @@ To build **only** the game scripts package, navigate to the `resources` folder a ```sh cd resources && yarn build -``` \ No newline at end of file +``` + +#### Watching files +If you don't want to rebuild all the time, you can also watch files which will write to disk. + +```sh +cd phone && yarn watch +``` + +```sh +cd resources && yarn watch +``` + +:::note +### Common issues + +#### Media files are not loaded when running `yarn watch`: +You most likely forgot to build the phone first. Building the phone will place the media files in `/resources/html` + +::: \ No newline at end of file diff --git a/docs/npwd/start/Install.md b/docs/npwd/start/Install.md index f8c7797..9107d3f 100644 --- a/docs/npwd/start/Install.md +++ b/docs/npwd/start/Install.md @@ -9,7 +9,7 @@ If you wish for NPWD to have full functionality. The following resources are req installed and started before NPWD. 1. [screenshot-basic](https://github.com/project-error/screenshot-basic) - **Make sure to use the exact version, as linked.** -2. [pma-voice](https://github.com/AvarianKnight/pma-voice) - Support for other VOIP resources is planned (`toko-voip`) etc +2. [pma-voice](https://github.com/AvarianKnight/pma-voice) :::note NPWD has standardized pma-voice as our default voice system for the phone. We encourage everyone to do such. @@ -79,11 +79,13 @@ ensure screenshot-basic ensure pma-voice ensure my_framework_here # Your framework resource -ensure esx-npwd # Any compatibility resources like esx-npwd or qb-npwd +ensure esx-npwd # Any compatibility resources like esx-npwd or qb-npwd. ensure npwd ``` +Note: If you're using `es_extended` from `overextended`, `esx-npwd` is not necessary. See their [README](https://github.com/overextended/es_extended#readme) for more information. + ### Important Information * By installing [npwd (NPWD)](https://github.com/project-error/npwd), you agree to the use of the following diagnostic package: @@ -92,8 +94,6 @@ ensure npwd * To explicitly disable this, we urge you **not to** as its incredibly useful metrics for us, please change the `SentryErrorMetrics` setting to `false` in `phone/config/default.json` and rebuild the phone. -* Compatability with [esx_kashacter](https://github.com/FiveEYZ/esx_kashacter) is unknown as of 2/20/2021. Testing still need's to be conducted. - * Same applies to any Multi-Character as testing has only been conducted on`V1 Final` and `1.1 Weight` **without** the use of these resources. -* Encountered an issue? Please open an issue [here](https://github.com/project-error/npwd/issues/new/choose) +* Encountered an issue? Please open an issue [here](https://github.com/project-error/npwd/issues/new/?assignees=&labels=New+Issue&template=bug-report.yml&title=Bug%3A+%3Cshort+description%3E) * If you seek additional support, feel free to join the [Project-Error Discord](https://discord.gg/HYwBjTbAY5). From a92ddc5c141e4e23d17f0086e9d207bd28645a44 Mon Sep 17 00:00:00 2001 From: Darrian Date: Tue, 4 Jan 2022 01:06:27 -0500 Subject: [PATCH 13/23] fix(src): Update repos and center logos. --- src/pages/index.tsx | 18 ++++++++---------- static/img/pe-logo.png | Bin 0 -> 20835 bytes 2 files changed, 8 insertions(+), 10 deletions(-) create mode 100644 static/img/pe-logo.png diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 71b9abd..b5d170b 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -19,22 +19,20 @@ const features = [ ), }, { - title: "New Bank Who Dis", - imageUrl: "img/npwd-icon.png", + title: "FiveM React Boilerplate Lua", + imageUrl: "img/pe-logo.png", description: ( <> - A Bank/ATM resource that provides a user interface for ATM's and general - banking. + A simple and extendable React (TypeScript) boilerplate designed around the Lua ScRT. ), }, { - title: "New Garage Who Dis", - imageUrl: "img/npwd-icon.png", + title: "Project Error Basic Loading", + imageUrl: "img/pe-logo.png", description: ( <> - A WIP all encompassing Garage resource that attemps to fill the massive - gaps of prior resources + A very basic, yet still robust and extendable, loading screen. ), }, @@ -47,10 +45,10 @@ function Feature({ imageUrl, title, description }) { {imgUrl && (
{title} +

{title}

+

{description}

)} -

{title}

-

{description}

); } diff --git a/static/img/pe-logo.png b/static/img/pe-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..ca01ecaf60ce09a984365cccb0e8713113e856ca GIT binary patch literal 20835 zcmWh!Wmp?c5DxATpm>2$ptzNy#i2lPcPD}3?(U(*-J!TkaBm^SrFijT#jUu1`F`A! zCwqHybF;HE^UlmhtEtH0VN+rQ006vC@-i9#08+yL7bZGlB)FG<4Do~HrXeQ$?E}`2GK1NP|x0U;sev_LGdHmbc0ADu(|n$UVl{ zZth~zs&WL-S2+ZTM5v{vUhj91n@7X1)<74Ux3>DC(tUwn=i}?;nT0m$bFE28as&c( zC(EAlg(T!1opinU2sj0&tlCeetuLsGja@h@@eiLo{>{C~^&&@tXM8iX^0HXToM@X) zl>fxExu4Z1{BGjPVS1U_IB0{(Wr8Dyr_m()lEAIRYI64Fiun`I@zhJju8hb1Lis}L z;blDKQ<2n*7^AOW#fTmjA)AYBSBm^hYbufQMu}bHsbFD{$r;qE?imkh2?rUq5GTJ9 zcX_Qfs#NH~HTIqv{@@yMHRn|vP{sGae5X&yrq6fEIN-In(H!=^MOrXdJ<-L_p5*yJ!%r$o-^oDz2)Cy`*QMsc$(R^3AdcHH= z)fqQp70gd3QK0N|SLd#V>)!Zm(XLJq>jvS47rbXQ=dnIAjEenju}t4htnp>c34QfjcU9s?$q5F85W_)jg;}-g z+iZWiNUm`9QysV%iK!-`7F zV<2hFPb!75W|sB66J?zFi ze!YkbboZ?TV=;-*$Bu~Sq(24g9ne^iBQr!o9DKxtBpX*8c9(j=#1eXYk}ySrq+LM@ z6XQJ5S|fhx7|CFG!AhvEFBR_N4_{?JHGZU~Z2Za{iqgu-r{AY(#xN`kR0N@Il5ST{ z!k}N0OII)~kVP>S2W>*BNH>Gu%DY8Wb$lcu6m-%_VO6^8@Z5_F#GBv;X7%i9LVo@( z*SBae7BOhILrl$S1R&Z16CY~jLdC#?ibND4SgqgHA=NSw)Yh^RoAsMIa z|8$p}+=PQ5G`3f8ASs2J^f{D9{uR02<1~p90X~LT9!EC7LZ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022 01:14:03 -0500 Subject: [PATCH 14/23] chore: update docs with more information Also removed the current state mark down document and adjusted the home page. --- docs/npwd/CurrentState.md | 75 -------------- docs/npwd/api/events.md | 21 ++++ docs/npwd/api/server-exports.mdx | 15 ++- docs/npwd/start/Config.md | 59 ++++++----- docs/npwd/start/Install.md | 162 +++++++++++++++++++++++-------- docs/npwd/start/Intro.md | 113 ++++++++++++++++++--- sidebars.js | 1 - 7 files changed, 283 insertions(+), 163 deletions(-) delete mode 100644 docs/npwd/CurrentState.md diff --git a/docs/npwd/CurrentState.md b/docs/npwd/CurrentState.md deleted file mode 100644 index f8baf25..0000000 --- a/docs/npwd/CurrentState.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -id: current_state -title: Current Development Progress -sidebar_label: Current Progress ---- - -[New Phone Who Dis](https://github.com/project-error/npwd) is still in active development and is **not** production ready. Translations are very much appreicated. - -Follow current development on the [**Git Kraken**](https://app.gitkraken.com/glo/card/280229b041b54407946be50eb2e9c02b) as it is most likely more up to date than below. - -## Working Apps -The following apps should be in full working order and are no longer in active development: - -- [**Calculator**](https://i.imgur.com/96e3bFF.png) - -## Stable Apps -These apps are **not** done and contain the least amount of issues across the phone. - -- [**Contacts**](https://i.imgur.com/3Qc1eJB.png) - -- [**Notes**](https://i.imgur.com/m0ktIyj.png) - -- [**Twitter**](https://i.imgur.com/WfjOl1t.png) - -:::info - - Replying, Liking and quoting all need work still. - - Profile page or some alternative. - - Notifications currently show for the tweet inititator too. -::: - -## Unfinished Apps -Lack of functionality for the below apps is due to the apps still being in development. Please **do not** report any issues regarding these apps on the github repository. Use the discord instead. We're not ready to begin QA (Quality Assurance) for these. - -### Bank -[Preview](https://i.imgur.com/P5Dg0Mj.png) - - - Uncertain if we're going to use a 3rd party resource made by one of our team members. - - No SQL scheme has been created. - - Functionality is non-existant. -### Camera -[Preview](https://i.imgur.com/1aGEV28.png) - - - UI still shows when taking pictures. - - Unable to move when taking pictures. - - Animation is incorrect when closing the camera. - - Missing sounds/Success feedback. - -### Marketplace -[Preview](https://i.imgur.com/8hPm6tU.png) - - - UI needs to be revamped still. - - Message and call icons do nothing. - - Post listings has no success feedback. - - can spam listings as new listings don't transition. - -### Messages -[Preview](https://i.imgur.com/UYHoVvy.png) - - - Has active PR's currently - -### Calls - -[Preview](https://i.imgur.com/zuxERmR.png) - - - Dialer lacks paste. - - Unable to delete typed numbers. - - Needs sound when calling - - Needs UI rework for when a call is active. -### Settings - -[Preview](https://i.imgur.com/0ggMdij.png) - - - Active PR with style redesign - - Preview ringtone while adjusting volume. - - Additional themes in progress. diff --git a/docs/npwd/api/events.md b/docs/npwd/api/events.md index 6e4949f..77df6ae 100644 --- a/docs/npwd/api/events.md +++ b/docs/npwd/api/events.md @@ -12,9 +12,30 @@ NPWD will sometimes emit events for third-party resource integration. This event is emitted when a player first enters the camera mode. It can be useful for toggling UI components while the camera is active. +Example: +```lua +AddEventHandler('npwd:PhotoModeStarted', function() + LocalPlayer.state:set('pictureMode', true, true) + DisplayRadar(false) + RemoveMultiplayerHudCash() + RemoveMultiplayerBankCash() + TriggerEvent('your-hide-hud-event') +end) +``` ### `npwd:PhotoModeEnded` This event is the ending equivalent of `npwd:PhotoModeStarted`, it will be triggered upon the player exiting the camera. It can be useful for toggling UI components on again. +Example: +```lua +AddEventHandler('npwd:PhotoModeEnded', function () + LocalPlayer.state:set('pictureMode', false, true) + if IsPedInAnyVehicle(PlayerPedId(), false) then + DisplayRadar(true) + end + TriggerEvent('your-show-hud-event') +end) +``` + diff --git a/docs/npwd/api/server-exports.mdx b/docs/npwd/api/server-exports.mdx index 679fee3..2a44e3e 100644 --- a/docs/npwd/api/server-exports.mdx +++ b/docs/npwd/api/server-exports.mdx @@ -20,5 +20,16 @@ NPWD behavior and actions. You can find a list of the available **server exports name="newPlayer" luaExample={"exports.npwd:newPlayer({ source = 1, firstname = 'Taso', lastname = 'Dev', identifier = 'dba4d971256a8bfb1a543cf0d46e342ad1cdd478', phoneNumber = '444-1312' })"} jsExample={"exports.npwd.newPlayer({ source: 1, firstname: 'Taso', lastname: 'Dev', identifier: 'dba4d971256a8bfb1a543cf0d46e342ad1cdd478', phoneNumber: '444-1312' })"} - desc="Adds a new player to NPWD internal handling. This should be used for framework integration." -/> \ No newline at end of file + desc="Adds a new player to NPWD internal handling. This is used with framework integration to load a player." +/> + + + +:::warning +The export `unloadPlayer` currently doesn't perform correctly due to recoil limitations. You can track the issue [here](https://github.com/project-error/npwd/issues/476). +::: \ No newline at end of file diff --git a/docs/npwd/start/Config.md b/docs/npwd/start/Config.md index ccfb1ce..222ac53 100644 --- a/docs/npwd/start/Config.md +++ b/docs/npwd/start/Config.md @@ -1,46 +1,42 @@ --- id: config_reference -title: Additional Configuration -sidebar_label: Additional Config +title: Advanced Configuration +sidebar_label: Advanced Configuration --- NPWD includes a `config.json` file in the root directory that allows for further customization of phone behavior. This file is what allows for us to offer framework-agnostic compatibility as well as for multitude -of configuration options depending on your needs. +of configuration options depending on your needs. IF you followed the [installation instructions](../start/installation#basic-configuration) , we went over the basic configuration already and has been abstracted from this page. +## Export Configuration +To keep the resource as framework agnostic as possible, we occassionally use exports to do certain things for us that would normally require framework dependency. ### PhoneAsItem -- `enabled` - - If you want to enable the phone as an item. - - `default`: **false** +Default Configuration: +```json + { + "PhoneAsItem": { + "enabled": false, + "exportResource": "my-core-resource", + "exportFunction": "myCheckerFunction" + }, +``` +- `"enabled"` + - If you want to enable the phone as an item. This export needs to return ether `true` or `false`. - `exportResource` - The resource where you have an exported function to check for items. - `exportFunction` - The exported function from the `exportResource` resource. +Example Export: +```lua +exports('myCheckerFunction', function() + -- Now determine whether NPWD can be opened + -- True Indicates that NPWD can be opened, if it returns false then NPWD cant be opened. + return true +end) +``` -### General - -- `useResourceIntegration` - - Set this to `true` you're running a framework that handles character details (identifier, name, etc) independent. - - `default`: **false** -- `toggleKey` - - The IO parameter ID to use for the default binding, e.g. `f3`. - -### Database - -- `useIdentifierPrefix` - - If you're using a prefix such as `license:` or `discord:` with the identifier. - - `default`: **false** -- `playerTable` - - The database table where you store players/characters used with the phone. - - `default`: **users** -- `identifierColumn` - - The identifier column from the `playerTable` table. - - `default`: **identifier** -- `phoneNumberColumn` - - The phone number column from the `playerTable` table. - - `default`: **phone_number** - +## App Configuration ### Twitter - `showNotifications` - Whether to show notifications from Twitter or not. @@ -85,6 +81,5 @@ of configuration options depending on your needs. - `default`: **true** :::warning -This documentation is not yet complete, refer to source for more information. -::: - +This documentation is not yet complete, refer to source code for more information. +::: \ No newline at end of file diff --git a/docs/npwd/start/Install.md b/docs/npwd/start/Install.md index de726c5..0652bac 100644 --- a/docs/npwd/start/Install.md +++ b/docs/npwd/start/Install.md @@ -1,6 +1,6 @@ --- id: installation -title: Install and Setup +title: Installation and Setup sidebar_label: Installation --- @@ -12,30 +12,123 @@ installed and started before NPWD. 2. [pma-voice](https://github.com/AvarianKnight/pma-voice) :::note -NPWD has standardized pma-voice as our default voice system for the phone. We encourage everyone to do such. +NPWD has standardized pma-voice as our default voice system for the phone. We encourage everyone to do such. We will **not** provide support or configuration, for any other VOIP's should issues arise. ::: +### Downloading Release +1. Navigate to the [releases page](https://github.com/project-error/npwd/releases). + - The latest release is shown at the top of the page and will have an [image](https://i.imgur.com/2SB8pfe.png) to the right stating as such. +2. [Left click](https://i.imgur.com/LMezKkg.png) on the hyperlink containing `npwd.zip`. +:::tip +The mentioned zip contains a pre-built version of the phone so no building is required. +::: +3. Save and unzip the `npwd` folder into your `resources` folder. An example directory would be: `A:\xd-rp-server\server-data\resources` -## Installation and Setup +## Initial Setup -### Downloading Release -1. Download the latest release of NPWD from the [releases page](https://github.com/project-error/npwd/releases) -2. Unzip and place the `npwd` folder in your FXServer's `resources` directory. +### Database Integration + +To setup the database schema, you must run the `import.sql` file found within the [root](https://github.com/project-error/npwd/blob/master/import.sql) of your `npwd` folder. + +If you already use `mysql-async`, `ghmattimysql`, or `oxmysql`. NPWD will automatically configure itself to use the `mysql_connection_string` +from your `server.cfg` file. + +If you do **not** already use one of these libraries, you must add an entry to your `server.cfg` file for `mysql_connection_string`, matching +one of the following connection configuration formats: + +``` +# You do NOT need both. Only one. +set mysql_connection_string "mysql://root:12345@localhost/es_extended?charset=utf8mb4" +set mysql_connection_string "user=root;database=es_extended;password=12345;charset=utf8mb4" +``` + +### Basic Configuration +:::caution +Standalone installation requires a users table of some sort that stores player identifiers. As of v1.x, we do not populate such a table, but are working on possible solutions. +::: +*NPWD* uses a `config.json` file that contains important information **required** for the resource to work correctly. Thie file is location within the root of your `npwd` folder. See [here](https://github.com/project-error/npwd/blob/master/config.json). The below configuration instructions is **universal** regardless which install method you do. + +#### Databse Configuration +```json +"database": { + "useIdentifierPrefix": false, + "playerTable": "users", + "identifierColumn": "identifier", + "identifierType": "license", + "profileQueries": true, + "phoneNumberColumn": "phone_number" + }, +``` + +Above is the default database configuration that comes with *NPWD*. The information needs to be altered to match your database. + +- `"useIdentifierPrefix"` + - The prefix is refering to the text before the colon when obntaining identifiers. + - If your database uses `license:XXXXXXXXXXXXXXXXXXXXXXXXXXX` set this to `true`. Otherwise, set it to `false`. + - This is **only** used when `"useResourceIntegration"` is set to `false`. +- `"playerTable"` + - The table in which your user information is stored. + - At a minimum, it needs to contain player's identifier and a phone number column. +- `"identifierColumn"` + - Found within your playerTable that is specified within the `config.json`. +- `"identifierType"` + - Ranges from the following: `steam`, `license`, `xbl`, `ip`, `discord` and `live`. +- `"profileQueries"` + - Provides useful debug information about the time it took to get data from the database. +- `"phoneNumberColumn"` + - The column where phone numbers are stored. + - As of v1.03, you need to create this yourself. See the [sql file](https://github.com/project-error/npwd/blob/13335e98d55ea7a082bf08c7c17f24866658a2d1/import.sql#L3) for an example query. + + :::note + We are working to improve this so the number column is added when you run the SQL file. + ::: + +#### General Configuration +```json +"general": { + "useResourceIntegration": false, + "toggleKey": "f1", + "toggleCommand": "phone", + }, +``` + +- `"useResourceIntegration"` + - This is **only** used for framework integration. + :::info + Setting this to true is what exposes the `newPlayer` export. The export won't work without this set to true. + ::: +- `"toggleKey"` + - The key used to open the phone. Please see here for a list of available keys. +- `"toggleCommand"` + - The command used to open the phone. This is executed on the key press of the configured `toggleKey`. -### Setting up with a Framework -If you are using a popular framework such as ESX or QBCore, you can easily integrate NPWD using the corresponding -premade compatbility resources, these should automatically configure NPWD to work with your framework. +### Framework Integration +If you are using a popular framework such as *ESX* or *QBCore*, you can easily integrate NPWD using the corresponding +premade compatbility resource(s), these should automatically configure *NPWD* to work with your framework. + +The below resource(s) may have issues depending on your framework version. Please open an issue on our Github [repository](https://github.com/project-error/npwd/issues/new?assignees=&labels=New+Issue&template=bug-report.yml&title=Bug%3A+%3Cshort+description%3E) if you encounter any bugs. + +- [esx-npwd](https://github.com/overextended/esx-npwd) + - You do **NOT** need this if you're using Overextended's [esx](https://github.com/overextended/es_extended) fork as the functionality has been built in. +- [qb-npwd](https://github.com/project-error/qb-npwd) + - Loosely tested with [qb-core](https://github.com/qbcore-framework/qb-core) + - We will not support qbus or any unofficial versions. -* [esx-npwd](https://github.com/overextended/esx-npwd) -* [qb-npwd](https://github.com/project-error/qb-npwd) If you have *basic* development knowledge and wish to integrate NPWD with any arbitrary framework, see the following [documentation page](../dev/FrameworkIntegration.md) for more information. +:::tip +Have you made a wrapper for a framework not listed above? If so, please reach out to us so we may improve our documentation. You can do so by contacting us on the Project-Error Discord [here](https://discord.com/invite/HYwBjTbAY5). +::: +## Feature Related Setup +Below is information pertaining to functionalty to enable specific features of the phone such as image uploading for the camera or report logging for discord. ### Setting up Camera Functionality - -NPWD allows for players to access a camera app and take in-game photos. These photos must be uploaded and stored somewhere. -One solution is to setup NPWD to upload the photos to Imgur. +:::caution +We are aware of issues related to photos being null and not saving. This is currently out of our control, but we are exploring other options for image uploading. +::: +*NPWD* allows for players to access a camera app and take in-game photos. The link to the photo is saved within the database of *NPWD* so these photos are **required** to be uploaded somewhere. +One solution is to setup *NPWD* to upload the photos to *Imgur*. **Steps** 1. Setup an imgur application [here](https://api.imgur.com/oauth2/addclient). @@ -47,27 +140,14 @@ One solution is to setup NPWD to upload the photos to Imgur. If you can't find your application you just created, check your settings pages [here](https://imgur.com/account/settings/apps). -### Setup Your Database - -To setup NPWD's database schema, you must run the `import.sql` file bundled with the downloaded release. - -If you already use `mysql-async`, `ghmattimysql`, or `oxmysql`. NPWD will automatically configure itself to use the `mysql_connection_string` -from your `server.cfg` file. - -If you do not already use one of these libraries, you must add an entry to your `server.cfg` file for `mysql_connection_string`, matching -one of the following connection configuration formats: - -``` -set mysql_connection_string "mysql://root:12345@localhost/es_extended?charset=utf8mb4" -set mysql_connection_string "user=root;database=es_extended;password=12345;charset=utf8mb4" -``` - ### Setting up Discord Log Integration -NPWD can integrate with Discord to log certain actions. This requires a webhook to be setup and the following convar +NPWD can integrate with Discord to log certain actions. As of release v1.0.3, the only use case is to log reported tweets and marketplace listings. This requires a webhook to be setup and the following convar set in your `server.cfg` file: ``` +# You need to wrap the webhook in quotation marks. +# Do NOT use setr in place of set as this shares this webhook with the client. set NPWD_DISCORD_TOKEN "my_discord_webhook" ``` @@ -78,28 +158,28 @@ set NPWD_DISCORD_TOKEN "my_discord_webhook" Your `server.cfg` should somewhat resemble the following (in terms of order): ```cfg set mysql_connection_string "mysql://root:12345@localhost/es_extended?charset=utf8mb4" -setr SCREENSHOT_BASIC_TOKEN "my_client_id" -set NPWD_DISCORD_TOKEN "my_discord_webhook" +setr SCREENSHOT_BASIC_TOKEN XXXXXXXXXXXXXXX +set NPWD_DISCORD_TOKEN "my_discord_webhook" # Quotations required ensure screenshot-basic ensure pma-voice -ensure my_framework_here # Your framework resource -ensure esx-npwd # Any compatibility resources like esx-npwd or qb-npwd. +ensure my_framework_here # Your framework resource. Ignore if you're not using one. +ensure esx-npwd # Any compatibility resources like esx-npwd or qb-npwd. Ignore if you're not using one. ensure npwd ``` -Note: If you're using `es_extended` from `overextended`, `esx-npwd` is not necessary. See their [README](https://github.com/overextended/es_extended#readme) for more information. +:::caution +If you're using `es_extended` from `overextended`, `esx-npwd` is not necessary as it's built into their resource. See their [README](https://github.com/overextended/es_extended#readme) for more information. +::: -### Important Information -* By installing [npwd (NPWD)](https://github.com/project-error/npwd), you agree to the use of the following diagnostic package: +## Important Information +* By installing [npwd](https://github.com/project-error/npwd), you agree to the use of the following diagnostic package: * Sentry, (in use within the React portion of NPWD) Automatically uploads relevant sesssion details and stack traces whenever an exception is thrown. We use these metrics to further improve the quality of the phone. - - * To explicitly disable this, we urge you **not to** as its incredibly useful metrics for us, - please change the `SentryErrorMetrics` setting to `false` in `phone/config/default.json` and rebuild the phone. -* Encountered an issue? Please open an issue [here](https://github.com/project-error/npwd/issues/new/?assignees=&labels=New+Issue&template=bug-report.yml&title=Bug%3A+%3Cshort+description%3E) + * To explicitly disable this, we urge you **not to** as its incredibly useful metrics for us, please change the `SentryErrorMetrics` setting to `false` in `phone/config/default.json` and rebuild the phone. +* Encountered an issue? Please open an issue [here](https://github.com/project-error/npwd/issues/new/?assignees=&labels=New+Issue&template=bug-report.yml&title=Bug%3A+%3Cshort+description%3E) following the provided template. * If you seek additional support, feel free to join the [Project-Error Discord](https://discord.gg/HYwBjTbAY5). diff --git a/docs/npwd/start/Intro.md b/docs/npwd/start/Intro.md index dd2f511..4bbce22 100644 --- a/docs/npwd/start/Intro.md +++ b/docs/npwd/start/Intro.md @@ -8,22 +8,111 @@ slug: / :::warning NPWD is currently in a public beta phase, edge cases and environment issues may occur and should be expected. -If you encounter any issues, please make sure you report them adequately. +If you encounter any issues, please make sure you report them adequately to the team via the [Discord](https://discord.gg/uy5N7jT5aJ) or by opening an issue on the Github [repository](https://github.com/project-error/docs.projecterror.dev). ::: -This is **New Phone Who Dis** a NUI based phone resource for the multiplayer GTA modification, -**FiveM**. This project was initially started by a group of ex-maintainers of the **GCPhone** project who -had become frustrated with the numerous issues that had started to grow in the legacy code. +
+ Material-UI logo +
+

NPWD

-There are several goals of this project: -* Provide a **comprehensive** set of **features** not yet available on an open source phone -* Create a **clean** and **maintable** codebase -* Make it as framework **standalone** as possible +
-### Features +![Discord](https://img.shields.io/discord/791854454760013827?label=Our%20Discord) -ADD FEATURE LIST HERE -### Previews +[**Watch the NPWD Trailer**](https://www.youtube.com/watch?v=Yh8gT8wuywU) -[Latest Teaser Video (October 28th)](https://streamable.com/f1ri9r) +![2-1](https://user-images.githubusercontent.com/55056068/147857192-cd8502e6-fb38-4975-b182-4aaaeadff877.png) + +
+ +# NPWD Release (Current Version 1.x) + +**New-Phone-Who-Dis** (*NPWD*) is a standalone and open source phone resource created for use in [*FiveM*](https://fivem.net/). It was built from +the ground up by some of the previous contributors and maintainers of the Reignited GCPhone project, who found +the Vue 2 codebase littered with technical debt and legacy code that hindered continued development. + +*NPWD* is an attempt at solving these problems and making a codebase that can be adapted and extended on +by the community. Maintainability has been our utmost priority as well. It has been designed to be as developer accessible as possible, with included utilities and tools +to ease and streamline the phone development process. + +## Feature Request & Issue Reporting +Please open an issue/enhancement on our Github [repository](https://github.com/project-error/npwd/issues/new/choose). This is the best way for us to track what needs to be resolved or improved upon. + +## Features +- [Optimized](https://i.imgur.com/mN5ib42.png) + - 0.01 ms on idle and 0.05 while in use. +- [Twitter](https://i.imgur.com/BjwovRR.png) + - Like, reply, retweet, report and delete your own Tweets. + - Send emojis and images directly from the phone's gallery, or from an external url. *Gifs too!* + - NPWD features discord logging so all reported tweets will be sent to the configured webhook. +- [Matchmaker](https://i.imgur.com/46XtZ06.jpeg) + - Like tinder but without all the bots. Swipe right into romance or rejection. + - As of v1.0, there is no filter for sexual preference. + - Don't want this app? Follow the documentation [here](../dev/DisableApps.md) to disable it. +- [Marketplace](https://user-images.githubusercontent.com/55056068/147530933-d56ceb19-0db2-471f-a8ca-7cc3986b87be.png) + - Post an ad with/without a picture. + - Choose a picture from your gallery or from a url. + - Features calling/messaging icons so no need to provide your number. +- [Text Messaging](https://i.imgur.com/9vFHqhW.png) + - Send a message or an image taken straight from the phones Gallery. +- [Calling](https://i.imgur.com/7T0JbQl.png) + - Call anyone from anywhere. +- [Camera](https://i.imgur.com/Fk6wQkg.png) + - Take pictures of oneself or your surroundings. + - All pictures save to the gallery where they can be retrieved with a copyable link. + - As of v1.0, there is currently [two photo modes](https://i.imgur.com/pole8bA.jpeg) for front/rear camera. +- [Contacts](https://i.imgur.com/Qxs35rj.png) + - Add a phone number to your contacts for easier access. + - Supports up to 19 characters for phone number by default and easily changed within the + - Gif support for avatar. +- [Notes](https://i.imgur.com/0Hvvlah.png) + - Something you want to remember in game? Make a note! +- [Calculator](https://user-images.githubusercontent.com/55056068/147531020-b7527a69-0b0e-4e81-83c7-58ad836eab23.png) + - Peform calculations. +- [Themes](https://i.imgur.com/2DpBHuM.png) + - Default dark theme or light theme with other themes in the works. Want to make your own? Follow our [documentation](../dev/SettingUpApp.md#setting-up-the-theme). + - Set within the Settings app. +- [6 Custom Cases/Frames](https://i.imgur.com/opyF0J1.png) + - These cases were made by [DayIsKuan](https://github.com/dayiskuan) + - Set within the Settings app. +- [Icon Sets](https://i.imgur.com/z7pyrmU.png) + - Change between material UI icons or our custom made icons. + - Want to make your own? Follow our [documentation](../dev/SettingUpApp.md#adding-icons). + - Set within the Settings app. +- [Notifications - Closed](https://i.imgur.com/j474Sc2.png) + - While closed, only a portion of it will render to display a notification. + - As of v1.0, this is currently used for calls, text and tweets. +- [Notifications - Open](https://i.imgur.com/33BlJn6.png) + - While open, all notifications occur across the top of the phone. + - View [missed notifications](https://i.imgur.com/3B4Ezyq.png) by clicking on the phone's header. +- [Streamer Mode](https://i.imgur.com/jzU075n.png) + - A mode designed for streamers where images are hidden unless clicked. + - This applies across all apps on the phone. + - Easily set within the phone's setting app. +- [Settings Configuration](https://user-images.githubusercontent.com/55056068/147530852-78934a48-b478-472c-b7f4-61860e4f8479.mp4) + - Use a slider to set ringtone and notification alert volume. + - Copy your phone number to clipboard for easy sharing. + - Configure a chosen ringtone or alert sound. + - Choose betwen **twelve** languages as of v1.0. + - Change frames, icon sets and themes. + - Adjust Zoom (100% to 70%). + - Filter notification preferences. +- Discord Logging + - Follow our [documentation](../start/Install.md#setting-up-discord-log-integration) for intial setup. + - Never used a webhook before? Follow Discord's [documentation](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks) for creating a webhook. + +## Standalone Information & Installation + +We have designed *NPWD* to be generally framework agnostic, meaning that it can easily be +integrated with both popular open source frameworks like ESX & QBCore or any arbitary +custom framework. + +For further details on this system, please refer to our [installation](../start/Install.md#standalone-installation). + +## Technical Stack and Development + +*NPWD* uses React + TypeScript to form the NUI front end and uses TypeScript (V8 runtime) for game +scripts. You can find more technical information regarding the development of this project on our docs +page [here](../dev/DevelopmentBootstrap.md). diff --git a/sidebars.js b/sidebars.js index 144e4a0..ad38037 100644 --- a/sidebars.js +++ b/sidebars.js @@ -20,7 +20,6 @@ module.exports = { label: 'Development', items: ['npwd/dev/dev_bootstrap', 'npwd/dev/framework_integration', 'npwd/dev/setup', 'npwd/dev/disable_apps', 'npwd/dev/basics',] }, - 'npwd/current_state', 'npwd/credits' ] } From 14e650aa90eeaae7f16d51126caca7950b5ad52c Mon Sep 17 00:00:00 2001 From: Darrian Date: Wed, 5 Jan 2022 01:20:23 -0500 Subject: [PATCH 15/23] fix: add discord link to button --- docs/npwd/start/Intro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/npwd/start/Intro.md b/docs/npwd/start/Intro.md index 4bbce22..c3a481f 100644 --- a/docs/npwd/start/Intro.md +++ b/docs/npwd/start/Intro.md @@ -18,7 +18,7 @@ If you encounter any issues, please make sure you report them adequately to the
-![Discord](https://img.shields.io/discord/791854454760013827?label=Our%20Discord) +[![Discord](https://img.shields.io/discord/791854454760013827?label=Our%20Discord)](https://discord.com/invite/HYwBjTbAY5) [**Watch the NPWD Trailer**](https://www.youtube.com/watch?v=Yh8gT8wuywU) From 6d9be0ac187ca2f93687f3e53fa7d4ae414bfef9 Mon Sep 17 00:00:00 2001 From: Darrian Date: Thu, 6 Jan 2022 17:51:56 -0500 Subject: [PATCH 16/23] chore: minor adjustment Mention pe-core --- docs/npwd/start/Install.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/npwd/start/Install.md b/docs/npwd/start/Install.md index 0652bac..6acf9ea 100644 --- a/docs/npwd/start/Install.md +++ b/docs/npwd/start/Install.md @@ -5,14 +5,17 @@ sidebar_label: Installation --- ### Third-Party Resource Dependencies -If you wish for NPWD to have full functionality. The following resources are required to be -installed and started before NPWD. +:::warning +Failure to adhere to these dependencies will result in *NPWD* not working correctly. You MUST use the screenshot basic version linked below. +::: +If you wish for *NPWD* to have full functionality. The following resources are required to be +installed and started before *NPWD*. 1. [screenshot-basic](https://github.com/project-error/screenshot-basic) - **Make sure to use the exact version, as linked.** 2. [pma-voice](https://github.com/AvarianKnight/pma-voice) :::note -NPWD has standardized pma-voice as our default voice system for the phone. We encourage everyone to do such. We will **not** provide support or configuration, for any other VOIP's should issues arise. +*NPWD* has standardized pma-voice as our default voice system for the phone. We encourage everyone to do such. We will **not** provide support or configuration, for any other VOIP's should issues arise. ::: ### Downloading Release 1. Navigate to the [releases page](https://github.com/project-error/npwd/releases). @@ -43,7 +46,7 @@ set mysql_connection_string "user=root;database=es_extended;password=12345;chars ### Basic Configuration :::caution -Standalone installation requires a users table of some sort that stores player identifiers. As of v1.x, we do not populate such a table, but are working on possible solutions. +Standalone installation requires a users table of some sort that stores player identifiers. If you are a menu based server and don't use popular frameworks, you will need to use [pe-core](https://github.com/project-error/pe-core) so you can use this resource. It's a very basic "framework" and wlll have no impact on your server. ::: *NPWD* uses a `config.json` file that contains important information **required** for the resource to work correctly. Thie file is location within the root of your `npwd` folder. See [here](https://github.com/project-error/npwd/blob/master/config.json). The below configuration instructions is **universal** regardless which install method you do. From dad23045b019ef3457ce1fed122a308ca29049b4 Mon Sep 17 00:00:00 2001 From: Darrian Date: Thu, 6 Jan 2022 23:57:48 -0500 Subject: [PATCH 17/23] chore: remove unused file --- docs/npwd/dev/Intro.md | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 docs/npwd/dev/Intro.md diff --git a/docs/npwd/dev/Intro.md b/docs/npwd/dev/Intro.md deleted file mode 100644 index 8221483..0000000 --- a/docs/npwd/dev/Intro.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -id: dev_intro -title: Intro for NPWD Development -sidebar_label: Intro to NPWD Dev -slug: /dev/ ---- - -TODO: Migrate these \ No newline at end of file From 99418271d798cd9810473cee7d9e2df80313af6c Mon Sep 17 00:00:00 2001 From: Darrian Date: Fri, 7 Jan 2022 00:02:06 -0500 Subject: [PATCH 18/23] chore: implement docs for esx/qb --- docs/npwd/framework/esx.md | 39 ++++++++++++++++++++++++++++++++++ docs/npwd/framework/qb-core.md | 34 +++++++++++++++++++++++++++++ docs/npwd/start/Install.md | 10 ++------- sidebars.js | 5 +++++ 4 files changed, 80 insertions(+), 8 deletions(-) create mode 100644 docs/npwd/framework/esx.md create mode 100644 docs/npwd/framework/qb-core.md diff --git a/docs/npwd/framework/esx.md b/docs/npwd/framework/esx.md new file mode 100644 index 0000000..90c33b8 --- /dev/null +++ b/docs/npwd/framework/esx.md @@ -0,0 +1,39 @@ +--- +id: esx +title: ESX Integratration +sidebar_label: ESX Integratration +--- + +:::warning +ESX is **very** end of life and shouldn't be used. However, if you insist on doing so please use Overextended's [ESX](https://github.com/overextended/es_extended). NPWD is already integrated with it and it's actively maintained. The origional repository has no active maintainors and this is the most reliable fork to date. +::: + +## Dependencies +Below are a list of depdencies, outside of the standard installation, for *NPWD* to work with *QB-Core* +- [esx-npwd](https://github.com/overextended/esx-npwd) + - Required for the resource to work with the framework. + - Uses the `newPlayer` export. +- [ESX](https://github.com/overextended/es_extended) + - While `esx-npwd` may work on other esx versions, this is the best version to use. + +### Configuration +You will need to adjust the `config.json` file to match the example below. This is required for `qb-npwd` to function correctly. This is located within the root of your `npwd` folder. See [here](https://github.com/project-error/npwd/blob/master/config.json). + +```json + "general": { + "useResourceIntegration": true, + "toggleKey": "f1", + "toggleCommand": "phone" + }, + "database": { + "useIdentifierPrefix": false, + "playerTable": "users", + "identifierColumn": "identifier", + "identifierType": "license", + "profileQueries": true, + "phoneNumberColumn": "phone_number" + }, +``` + +### Final Notes +Be sure your `server.cfg` resembled the example found within the [installation](../start/installation#example-final-config) page. As a reminder, `esx-npwd` may not work on older versions so be sure to use Overextended's [ESX](https://github.com/overextended/es_extended). \ No newline at end of file diff --git a/docs/npwd/framework/qb-core.md b/docs/npwd/framework/qb-core.md new file mode 100644 index 0000000..bcec113 --- /dev/null +++ b/docs/npwd/framework/qb-core.md @@ -0,0 +1,34 @@ +--- +id: qb-core +title: QB-Core Integratration +sidebar_label: QB-Core Integratration +--- + +## Dependencies +Below are a list of depdencies, outside of the standard installation, for *NPWD* to work with *QB-Core* +- [qb-npwd](https://github.com/project-error/qb-npwd) + - Required for the resource to work with the framework. + - Uses the `newPlayer` export. +- [QB-Core](https://github.com/qbcore-framework/qb-core) + +### Configuration +You will need to adjust the `config.json` file to match the example below. This is required for `qb-npwd` to function correctly. This is located within the root of your `npwd` folder. See [here](https://github.com/project-error/npwd/blob/master/config.json). + +```json + "general": { + "useResourceIntegration": true, + "toggleKey": "f1", + "toggleCommand": "phone" + }, + "database": { + "useIdentifierPrefix": false, + "playerTable": "players", + "identifierColumn": "citizenid", + "identifierType": "license", + "profileQueries": true, + "phoneNumberColumn": "phone_number" + }, +``` + +### Final Notes +Be sure your `server.cfg` resembled the example found within the [installation](../start/installation#example-final-config) page. As a reminder, `qb-npwd` will not support any non official versions of [QB-Core](https://github.com/qbcore-framework/qb-core). \ No newline at end of file diff --git a/docs/npwd/start/Install.md b/docs/npwd/start/Install.md index 6acf9ea..8042835 100644 --- a/docs/npwd/start/Install.md +++ b/docs/npwd/start/Install.md @@ -48,7 +48,7 @@ set mysql_connection_string "user=root;database=es_extended;password=12345;chars :::caution Standalone installation requires a users table of some sort that stores player identifiers. If you are a menu based server and don't use popular frameworks, you will need to use [pe-core](https://github.com/project-error/pe-core) so you can use this resource. It's a very basic "framework" and wlll have no impact on your server. ::: -*NPWD* uses a `config.json` file that contains important information **required** for the resource to work correctly. Thie file is location within the root of your `npwd` folder. See [here](https://github.com/project-error/npwd/blob/master/config.json). The below configuration instructions is **universal** regardless which install method you do. +*NPWD* uses a `config.json` file that contains important information **required** for the resource to work correctly. This file is location within the root of your `npwd` folder. See [here](https://github.com/project-error/npwd/blob/master/config.json). #### Databse Configuration ```json @@ -108,13 +108,7 @@ Above is the default database configuration that comes with *NPWD*. The informat If you are using a popular framework such as *ESX* or *QBCore*, you can easily integrate NPWD using the corresponding premade compatbility resource(s), these should automatically configure *NPWD* to work with your framework. -The below resource(s) may have issues depending on your framework version. Please open an issue on our Github [repository](https://github.com/project-error/npwd/issues/new?assignees=&labels=New+Issue&template=bug-report.yml&title=Bug%3A+%3Cshort+description%3E) if you encounter any bugs. - -- [esx-npwd](https://github.com/overextended/esx-npwd) - - You do **NOT** need this if you're using Overextended's [esx](https://github.com/overextended/es_extended) fork as the functionality has been built in. -- [qb-npwd](https://github.com/project-error/qb-npwd) - - Loosely tested with [qb-core](https://github.com/qbcore-framework/qb-core) - - We will not support qbus or any unofficial versions. +Follow the written documentation for [ESX](../framework/esx) and [QB-Core](../framework/qb-core) for the altered installation. If you have *basic* development knowledge and wish to integrate NPWD with any arbitrary framework, diff --git a/sidebars.js b/sidebars.js index ad38037..4326d6d 100644 --- a/sidebars.js +++ b/sidebars.js @@ -10,6 +10,11 @@ module.exports = { 'npwd/start/config_reference', ] }, + { + type: 'category', + label: 'Framework Integration', + items: ['npwd/framework/esx', 'npwd/framework/qb-core',] + }, { type: 'category', label: 'API Reference', From de4b2edf67065a4ad00f966bdd8fb43e965f4425 Mon Sep 17 00:00:00 2001 From: Darrian Date: Fri, 7 Jan 2022 00:05:14 -0500 Subject: [PATCH 19/23] chore: properly organize the intro --- docs/npwd/start/Intro.md | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/docs/npwd/start/Intro.md b/docs/npwd/start/Intro.md index c3a481f..8122c4e 100644 --- a/docs/npwd/start/Intro.md +++ b/docs/npwd/start/Intro.md @@ -27,7 +27,7 @@ If you encounter any issues, please make sure you report them adequately to the
-# NPWD Release (Current Version 1.x) +# NPWD Release (Current version 1.0) **New-Phone-Who-Dis** (*NPWD*) is a standalone and open source phone resource created for use in [*FiveM*](https://fivem.net/). It was built from the ground up by some of the previous contributors and maintainers of the Reignited GCPhone project, who found @@ -37,6 +37,22 @@ the Vue 2 codebase littered with technical debt and legacy code that hindered co by the community. Maintainability has been our utmost priority as well. It has been designed to be as developer accessible as possible, with included utilities and tools to ease and streamline the phone development process. +## Standalone Information & Installation + +We have designed *NPWD* to be generally framework agnostic, meaning that it can easily be +integrated with both popular open source frameworks like ESX & QBCore or any arbitary +custom framework. + +For further details on this system, please refer to our installation [documentation](https://projecterror.dev/docs/npwd/start/installation). + +**As of 1/6/2021, you must use our fork of [screenshot-basic](https://github.com/project-error/screenshot-basic) + +## Technical Stack and Development + +*NPWD* uses React + TypeScript to form the NUI front end and uses TypeScript (V8 runtime) for game +scripts. You can find more technical information regarding the development of this project on our docs +page [here](https://projecterror.dev/docs/npwd/dev/dev_bootstrap). + ## Feature Request & Issue Reporting Please open an issue/enhancement on our Github [repository](https://github.com/project-error/npwd/issues/new/choose). This is the best way for us to track what needs to be resolved or improved upon. @@ -103,16 +119,7 @@ Please open an issue/enhancement on our Github [repository](https://github.com/p - Follow our [documentation](../start/Install.md#setting-up-discord-log-integration) for intial setup. - Never used a webhook before? Follow Discord's [documentation](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks) for creating a webhook. -## Standalone Information & Installation - -We have designed *NPWD* to be generally framework agnostic, meaning that it can easily be -integrated with both popular open source frameworks like ESX & QBCore or any arbitary -custom framework. +## Final words +A special thanks to all the people who have helped out with the translations! You have all been amazing. -For further details on this system, please refer to our [installation](../start/Install.md#standalone-installation). - -## Technical Stack and Development - -*NPWD* uses React + TypeScript to form the NUI front end and uses TypeScript (V8 runtime) for game -scripts. You can find more technical information regarding the development of this project on our docs -page [here](../dev/DevelopmentBootstrap.md). +Thanks to [Ultrahacx](https://github.com/ultrahacx) for all the artwork and animations seen in the trailer and this post. \ No newline at end of file From acf756f81bd4ceed7928b766cca098108cf51b51 Mon Sep 17 00:00:00 2001 From: Darrian Date: Fri, 7 Jan 2022 00:47:09 -0500 Subject: [PATCH 20/23] chore: create faq --- docs/npwd/faq.md | 75 ++++++++++++++++++++++++++++++++++++++ docs/npwd/start/Install.md | 2 +- sidebars.js | 3 +- 3 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 docs/npwd/faq.md diff --git a/docs/npwd/faq.md b/docs/npwd/faq.md new file mode 100644 index 0000000..9498e1d --- /dev/null +++ b/docs/npwd/faq.md @@ -0,0 +1,75 @@ +--- +id: faq +title: Frequently Asked Questions +sidebar_label: Frequently Asked Questions +--- + +# Common Issues + +## Crashes + +### My Phone crashed after a settings update! + +This can sometimes happen after we change the structure of our client stored setting data. As the phone is in the beta stage, these changes can happen but are not expected to be numerous. If you experience issues after a settings update and you have previously used the phone, please follow the guide below. + +- Press F8 and paste `nui_devtools` then press enter +- On the header, click `application`. +- On the side bar under `Storage` expand local storage [as such](https://i.imgur.com/1hvb8Fk.png). +- Find `https://cfx-nui-npwd` +- Right click and select `Clear` +- Restart the resource, using `ensure npwd ` + +## Errors + +### Event playerJoining was not safe for net + +You need to update your artifacts to a version beyond `3622`. Don’t know your artifact version? Type `version` into your console. + +Click [here](https://runtime.fivem.net/artifacts/fivem/build_server_windows/master/?) to download the latest. + +### No such export isPhoneVisible + +You downloaded the source code and didn’t build. + +Please download from the [release tab](https://github.com/project-error/npwd/releases) and **be sure** you download the `npwd.zip` as this is the built version. + +If you want to modify the source code please see the [documentation page](dev/DevelopmentBootstrap.md) for building. + +### No such export: newPlayer in resource npwd + +This export is only available when the `useResourceIntegration` is set to true. See [here](https://github.com/project-error/npwd/blob/fc2a905f0fd85db797b716053b8f0d4398b8bd61/config.json#L8). + +### Cannont read properties of undefined (reading 'phone_number') +The error would look like [this](https://i.imgur.com/IIM0vEd.png) + +This is usually caused by: +- You did not configure the `config.json` properly. + - Please follow the configuration [documentation](start/installation#basic-configuration) again. +- You do not have a users table where you store player's identifiers. + - As of v1.04, *NPWD* doesn't generate one. + - You will need to install [pe-core](https://github.com/project-error/pe-core). +- You do not have a `phone_number` column. + - See the [sql file](https://github.com/project-error/npwd/blob/13335e98d55ea7a082bf08c7c17f24866658a2d1/import.sql#L3) for an example query. + +### Failed to upload photo, Column 'image' cannot be null +Ensure you installed the correct version of [screenshot-basic](https://github.com/project-error/screenshot-basic) and have followed the documentation for generating an *imgur* [token](start/installation#setting-up-camera-functionality). If you have done so, then imgur may be blocked in your country. We're working on alternatives for this issue. + +## Basic Questions + +### How do I open the phone? + +By default, the phone opens with `F1`. You can adjust it within the [config.json](https://github.com/project-error/npwd/blob/20b7ca34416a8a428b0c4e39c1da80c8e96f5b0f/config.json#L9). + +**Note:** Once this is set, you will need to restart the server for the best results. + +### How do I use the phone to send a gps location to ambulance job? + +We currently don’t have this functionality. We have plans to create an export to send a message so this will be possible. + +### How do I change the command to open the phone? + +You can do so [here](https://github.com/project-error/npwd/blob/20b7ca34416a8a428b0c4e39c1da80c8e96f5b0f/config.json#L10). Just restart the resource after. + +### How do i set the default language? + +As of v1.0.4, the only way to set the default language is by setting it [here](https://github.com/project-error/npwd/blob/20b7ca34416a8a428b0c4e39c1da80c8e96f5b0f/phone/src/config/default.json#L3) and rebuilding the phone. We are working on abstracting this to a config so this isn't required. \ No newline at end of file diff --git a/docs/npwd/start/Install.md b/docs/npwd/start/Install.md index 8042835..1f10822 100644 --- a/docs/npwd/start/Install.md +++ b/docs/npwd/start/Install.md @@ -122,7 +122,7 @@ Have you made a wrapper for a framework not listed above? If so, please reach ou Below is information pertaining to functionalty to enable specific features of the phone such as image uploading for the camera or report logging for discord. ### Setting up Camera Functionality :::caution -We are aware of issues related to photos being null and not saving. This is currently out of our control, but we are exploring other options for image uploading. +Some have reported issues with uploading images. While this is most likely related to using a different version of [screenshot-basic](https://github.com/project-error/screenshot-basic), imgur may also be blocked in your country. We are currently working on alternatives. ::: *NPWD* allows for players to access a camera app and take in-game photos. The link to the photo is saved within the database of *NPWD* so these photos are **required** to be uploaded somewhere. One solution is to setup *NPWD* to upload the photos to *Imgur*. diff --git a/sidebars.js b/sidebars.js index 4326d6d..a8d1fb0 100644 --- a/sidebars.js +++ b/sidebars.js @@ -25,7 +25,8 @@ module.exports = { label: 'Development', items: ['npwd/dev/dev_bootstrap', 'npwd/dev/framework_integration', 'npwd/dev/setup', 'npwd/dev/disable_apps', 'npwd/dev/basics',] }, - 'npwd/credits' + 'npwd/credits', + 'npwd/faq' ] } }; From 6c7fe8e4c96d4b9d81854e272c3613e8bbb4ad96 Mon Sep 17 00:00:00 2001 From: Darrian Date: Fri, 7 Jan 2022 00:49:22 -0500 Subject: [PATCH 21/23] chore: adjust header to include npwd --- docusaurus.config.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index 685049a..6e5572d 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -43,7 +43,12 @@ module.exports = { }, { href: "https://github.com/project-error/docs.projecterror.dev", - label: "GitHub", + label: "Docs", + position: "right", + }, + { + href: "https://github.com/project-error/npwd", + label: "Get NPWD", position: "right", }, { From b9184e91ff9be90d0a8fd6342ff39363b93e9ac3 Mon Sep 17 00:00:00 2001 From: Darrian Date: Tue, 11 Jan 2022 21:24:40 -0500 Subject: [PATCH 22/23] chore: add roadmap --- docs/npwd/Roadmap.md | 38 ++++++++++++++++++++++++++++++++++++++ sidebars.js | 3 ++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 docs/npwd/Roadmap.md diff --git a/docs/npwd/Roadmap.md b/docs/npwd/Roadmap.md new file mode 100644 index 0000000..67e882b --- /dev/null +++ b/docs/npwd/Roadmap.md @@ -0,0 +1,38 @@ +--- +id: roadmap +title: Update Roadmap +sidebar_label: Update Roadmap +--- + +We push any major changes to the develop branch of the resource. So + +### Version 1.1.0 +- [x] [Call Volume Slider](https://github.com/project-error/npwd/commit/85f464c6e216f83250516a2d7cdc2bc27c0f23ef) +- [x] [Center Time With Frame](https://github.com/project-error/npwd/issues/511) +- [x] [Check for Custom Wallpaper](https://github.com/project-error/npwd/commit/8a1220474ff83db5fbcc8b3056c66260f3c80f4e) +- [ ] Config For Generated Number Format +- [ ] [Default Language](https://github.com/project-error/npwd/issues/501) +- [ ] [Handle Initial Database Insertion For Users](https://github.com/project-error/npwd/issues/502) +- [ ] Messages/Call Hooks +- [ ] Notify Weirdos Of New Versions +- [x] [Ringtone Dial For Origionator](https://github.com/project-error/npwd/commit/071e5e65d9bc3627ad5a122bafe45feb5d06233e) +- [ ] [Share Contact](https://github.com/project-error/npwd/issues/472) + +### Version 1.2.0+ +TBA + +### Undetermined Planned Features +These are features we plan on adding to the phone, but currently have no set time frame to do so. + +- [ ] Bank App +- [ ] Cell Service +- [ ] Config for Bottom Navbar Order +- [ ] Document App +- [ ] Email App +- [ ] Garage App + - Will use [NGWD](https://github.com/project-error/new-garage-who-dis) as this is planned to be fully standalone. +- [ ] GPS System + - Send current location. + - Intervally update real time position. +- [ ] Group Messages +- [ ] Photo Enlarge on Click \ No newline at end of file diff --git a/sidebars.js b/sidebars.js index a8d1fb0..ed93ed0 100644 --- a/sidebars.js +++ b/sidebars.js @@ -26,7 +26,8 @@ module.exports = { items: ['npwd/dev/dev_bootstrap', 'npwd/dev/framework_integration', 'npwd/dev/setup', 'npwd/dev/disable_apps', 'npwd/dev/basics',] }, 'npwd/credits', - 'npwd/faq' + 'npwd/faq', + 'npwd/roadmap' ] } }; From 03e376baf5c183f6905029d45f9eec2623072e07 Mon Sep 17 00:00:00 2001 From: Mojito-Fivem Date: Sun, 20 Feb 2022 18:26:04 +0000 Subject: [PATCH 23/23] docs: Word filtering --- docs/npwd/start/Config.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/npwd/start/Config.md b/docs/npwd/start/Config.md index 222ac53..f293ac8 100644 --- a/docs/npwd/start/Config.md +++ b/docs/npwd/start/Config.md @@ -36,6 +36,22 @@ exports('myCheckerFunction', function() end) ``` +## Word Filtering / Blacklisting + +Block / filter banned words in some apps like twitter, messaging and marketplace. + +Set enabled to true and add blacklisted words to the array like so: + +```json +{ + "profanityFilter": { + "enabled": true, + "badWords": ["sus", "amogus"] + } +} +``` +This will block these words with asterisks so a message would appear as "\*\*\*sy" instead of "sussy" + ## App Configuration ### Twitter - `showNotifications`