Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
139 changes: 42 additions & 97 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,110 +1,55 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"settings": {
"react": {
"pragma": "React",
"version": "18.0.0"
}
},
"env": {
"browser": true,
"es2021": true
},
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended"
"plugin:tailwindcss/recommended"
],
"overrides": [
{
"env": {
"node": true
},
"files": [
".eslintrc.ts",
".eslintrc.tsx"
],
"parserOptions": {
"sourceType": "script"
}
}
],
"plugins": [
"@typescript-eslint",
"react"
"react",
"@typescript-eslint"
],
"rules": {
"linebreak-style": [
"off"
],
"quotes": [
"error",
"single"
],
"@typescript-eslint/indent": [
"error",
4,
{
"SwitchCase": 1
}
],
"array-bracket-spacing": [
"error",
"always"
],
"brace-style": [
"error",
"allman"
],
"template-curly-spacing": [
"error",
"always"
],
"no-multi-spaces": [
"error"
],
"@typescript-eslint/object-curly-spacing": [
"error",
"always",
{
"arraysInObjects": true,
"objectsInObjects": false
}
],
"@typescript-eslint/ban-types": [
"error",
{
"types": {
"String": true,
"Boolean": true,
"Number": true,
"Symbol": true,
"{}": false,
"Object": false,
"object": false,
"Function": false
},
"extendDefaults": true
}
],
"no-switch-case-fall-through": [
"off"
],
"jsx-quotes": [
"error"
],
"react/prop-types": [
"off"
],
"react/jsx-curly-spacing": [
"error",
{
"when": "always",
"children": true
}
],
"react/jsx-equals-spacing": [
"error"
],
"react/jsx-newline": [
"error",
{
"prevent": true
}
]
"tailwindcss/no-custom-classname": "off",
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 1, "maxBOF": 1 }],
"no-multi-spaces": ["error", { "ignoreEOLComments": false }],
"no-duplicate-imports": ["error", { "includeExports": true }],
"no-empty-character-class": "error",
"eqeqeq": ["error", "always"],
"no-duplicate-case": "error",
"comma-dangle": ["error", "never"],
"quotes": [ "error", "double" ],
"semi": [ "error", "never" ],
"indent": [ "error", 4 ],
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"react/no-unescaped-entities": "off",
"object-curly-spacing": [ "error", "always" ],
"array-bracket-spacing": [ "error", "always" ],
"space-infix-ops": ["error", { "int32Hint": false }],
"space-in-parens": ["error", "never"],
"space-before-blocks": ["error", "always"]
},
"settings": {
"react": {
"version": "detect"
}
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/dist
/illumina
/tmp
/out-tsc
/node_modules
Expand Down
29 changes: 6 additions & 23 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,15 @@
{
"typescript.tsdk": "node_modules\\typescript\\lib",
"typescript.preferences.importModuleSpecifier": "relative",
"typescript.preferences.quoteStyle": "single",
"typescript.format.placeOpenBraceOnNewLineForControlBlocks": true,
"typescript.format.placeOpenBraceOnNewLineForFunctions": true,
"editor.wordWrap": "on",
"typescript.preferences.quoteStyle": "double",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.sortJSON": false,
"source.organizeImports": true
"source.fixAll.eslint": "explicit",
"source.organizeImports": "explicit"
},
"editor.formatOnSave": false,
"git.ignoreLimitWarning": true,
"editor.insertSpaces": true,
"editor.tabSize": 2,
"editor.formatOnSave": true,
"files.eol": "\n",
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"emmet.showExpandedAbbreviation": "never",
"eslint.format.enable": true,
"eslint.validate": [
"javascript",
"typescript"
],
"eslint.workingDirectories": [
{
"pattern": "./src"
}
],
"javascript.format.enable": false,
"thunder-client.saveToWorkspace": false,
"thunder-client.workspaceRelativePath": "."
}
48 changes: 24 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
# Nitro React v2.1
# Illumina Nitro React v2.1

## Prerequisites

- [Git](https://git-scm.com/)
- [NodeJS](https://nodejs.org/) >= 18
- If using NodeJS < 18 remove `--openssl-legacy-provider` from the package.json scripts
- [Yarn](https://yarnpkg.com/) `npm i yarn -g`
- [Git](https://git-scm.com/)
- [NodeJS](https://nodejs.org/) >= 18
- If using NodeJS < 18 remove `--openssl-legacy-provider` from the package.json scripts
- [Yarn](https://yarnpkg.com/) `npm i yarn -g`

## Installation

- First you should open terminal and navigate to the folder where you want to clone Nitro
- Clone Nitro
- `git clone https://git.krews.org/nitro/nitro-react.git`
- Install the dependencies
- `yarn install`
- This may take some time, please be patient
- Rename a few files
- Rename `public/renderer-config.json.example` to `public/renderer-config.json`
- Rename `public/ui-config.json.example` to `public/ui-config.json`
- Set your links
- Open `public/renderer-config.json`
- Update `socket.url, asset.url, image.library.url, & hof.furni.url`
- Open `public/ui-config.json`
- Update `camera.url, thumbnails.url, url.prefix, habbopages.url`
- You can override any variable by passing it to `NitroConfig` in the index.html
- First you should open terminal and navigate to the folder where you want to clone Nitro
- Clone Nitro
- `git clone https://git.krews.org/nitro/nitro-react.git`
- Install the dependencies
- `yarn install`
- This may take some time, please be patient
- Rename a few files
- Rename `public/renderer-config.json.example` to `public/renderer-config.json`
- Rename `public/ui-config.json.example` to `public/ui-config.json`
- Set your links
- Open `public/renderer-config.json`
- Update `socket.url, asset.url, image.library.url, & hof.furni.url`
- Open `public/ui-config.json`
- Update `camera.url, thumbnails.url, url.prefix, habbopages.url`
- You can override any variable by passing it to `NitroConfig` in the index.html

## Usage

- To use Nitro you need `.nitro` assets generated, see [nitro-converter](https://git.krews.org/nitro/nitro-converter) for instructions
- See [Morningstar Websockets](https://git.krews.org/nitro/ms-websockets) for instructions on configuring websockets on your server
- To use Nitro you need `.nitro` assets generated, see [nitro-converter](https://git.krews.org/nitro/nitro-converter) for instructions
- See [Morningstar Websockets](https://git.krews.org/nitro/ms-websockets) for instructions on configuring websockets on your server

### Development

Expand All @@ -46,5 +46,5 @@ To build a production version of Nitro just run the following command
yarn build:prod
```

- A `dist` folder will be generated, these are the files that must be uploaded to your webserver
- Consult your CMS documentation for compatibility with Nitro and how to add the production files
- A `dist` folder will be generated, these are the files that must be uploaded to your webserver
- Consult your CMS documentation for compatibility with Nitro and how to add the production files
14 changes: 7 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" crossorigin="use-credentials" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#000000">
<meta name="apple-mobile-web-app-title" content="Nitro">
<meta name="application-name" content="Nitro">
<meta name="apple-mobile-web-app-title" content="Illumina UI">
<meta name="application-name" content="Illumina UI">
<meta name="msapplication-TileColor" content="#000000">
<meta name="theme-color" content="#000000" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<base href="./">
<title>Nitro</title>
<base href="/">
<title>Illumina UI</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root" class="w-100 h-100"></div>
<div id="root"></div>
<script>
const NitroConfig = {
"config.urls": [ '/renderer-config.json', '/ui-config.json' ],
"config.urls": [ './renderer-config.json', './ui-config.json' ],
"sso.ticket": (new URLSearchParams(window.location.search).get('sso') || null),
"forward.type": (new URLSearchParams(window.location.search).get('room') ? 2 : -1),
"forward.id": (new URLSearchParams(window.location.search).get('room') || 0),
"friend.id": (new URLSearchParams(window.location.search).get('friend') || 0),
};
</script>
<script type="module" src="./src/index.tsx"></script>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
Loading