mirror of
https://github.com/duckietm/Nitro-Cool-UI.git
synced 2025-06-21 22:36:58 +00:00
V2: Fixed indexing and cleanup
This commit is contained in:
parent
2afc5f1143
commit
e5a2d527fa
@ -1,6 +0,0 @@
|
||||
[*]
|
||||
charset = utf-8
|
||||
insert_final_newline = true
|
||||
end_of_line = lf
|
||||
indent_style = space
|
||||
indent_size = 4
|
@ -105,17 +105,6 @@
|
||||
{
|
||||
"prevent": true
|
||||
}
|
||||
],
|
||||
"react/jsx-sort-props": [
|
||||
"error",
|
||||
{
|
||||
"callbacksLast": true,
|
||||
"shorthandFirst": true,
|
||||
"shorthandLast": false,
|
||||
"ignoreCase": true,
|
||||
"noSortAlphabetically": false,
|
||||
"reservedFirst": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
32
.vscode/settings.json
vendored
32
.vscode/settings.json
vendored
@ -1,32 +0,0 @@
|
||||
{
|
||||
"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",
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": true,
|
||||
"source.fixAll.sortJSON": false,
|
||||
"source.organizeImports": true
|
||||
},
|
||||
"editor.formatOnSave": false,
|
||||
"git.ignoreLimitWarning": 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": "."
|
||||
}
|
@ -25,12 +25,6 @@
|
||||
- Update `camera.url, thumbnails.url, url.prefix, habbopages.url`
|
||||
- You can override any variable by passing it to `NitroConfig` in the index.html
|
||||
|
||||
nitro-renderer>yarn install
|
||||
\nitro-renderer>yarn link
|
||||
\nitro-react>yarn install
|
||||
yarn link "@nitrots/nitro-renderer"
|
||||
yarn start
|
||||
|
||||
## Usage
|
||||
|
||||
- To use Nitro you need `.nitro` assets generated, see [nitro-converter](https://git.krews.org/nitro/nitro-converter) for instructions
|
||||
|
@ -1,49 +0,0 @@
|
||||
const lightenHexColor = (hex, percent) =>
|
||||
{
|
||||
// Remove the hash symbol if present
|
||||
hex = hex.replace(/^#/, '');
|
||||
|
||||
// Convert hex to RGB
|
||||
let r = parseInt(hex.substring(0, 2), 16);
|
||||
let g = parseInt(hex.substring(2, 4), 16);
|
||||
let b = parseInt(hex.substring(4, 6), 16);
|
||||
|
||||
// Adjust RGB values
|
||||
r = Math.round(Math.min(255, r + 255 * percent));
|
||||
g = Math.round(Math.min(255, g + 255 * percent));
|
||||
b = Math.round(Math.min(255, b + 255 * percent));
|
||||
|
||||
// Convert RGB back to hex
|
||||
const result = ((r << 16) | (g << 8) | b).toString(16);
|
||||
|
||||
// Make sure result has 6 digits
|
||||
return '#' + result.padStart(6, '0');
|
||||
}
|
||||
|
||||
const generateShades = (colors) =>
|
||||
{
|
||||
for (let color in colors)
|
||||
{
|
||||
let hex = colors[color]
|
||||
let extended = {}
|
||||
const shades = [ 50, 100, 200, 300, 400, 500, 600, 700, 900, 950 ];
|
||||
|
||||
for (let i = 0; i < shades.length; i++)
|
||||
{
|
||||
let shade = shades[i];
|
||||
extended[shade] = lightenHexColor(hex, shades[(shades.length - 1 - i) ] / 1000);
|
||||
}
|
||||
|
||||
colors[color] = {
|
||||
DEFAULT: hex,
|
||||
...extended
|
||||
}
|
||||
}
|
||||
|
||||
return colors;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
generateShades,
|
||||
lightenHexColor
|
||||
}
|
@ -15,7 +15,7 @@
|
||||
<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="./">
|
||||
<base href="/client/">
|
||||
<title>Nitro</title>
|
||||
</head>
|
||||
<body>
|
||||
@ -23,7 +23,7 @@
|
||||
<div id="root" class="w-100 h-100"></div>
|
||||
<script>
|
||||
window.NitroConfig = {
|
||||
"config.urls": [ '/renderer-config.json', '/ui-config.json' ],
|
||||
"config.urls": [ 'renderer-config.json', 'ui-config.json' ],
|
||||
"socket.url": (new URLSearchParams(window.location.search).get('socket.url') || null),
|
||||
"sso.ticket": (new URLSearchParams(window.location.search).get('sso') || null),
|
||||
"forward.type": (new URLSearchParams(window.location.search).get('room') ? 2 : -1),
|
||||
|
25
package.json
25
package.json
@ -4,16 +4,19 @@
|
||||
"homepage": ".",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "vite",
|
||||
"build": "vite build",
|
||||
"start": "vite --base=/client/ --host",
|
||||
"build": "vite build --base=/client/",
|
||||
"build:prod": "npx browserslist@latest --update-db && yarn build",
|
||||
"eslint": "eslint src --ext .ts,.tsx"
|
||||
},
|
||||
"dependencies": {
|
||||
"@headlessui/react": "^1.7.18",
|
||||
"@headlessui/tailwindcss": "^0.2.0",
|
||||
"@tanstack/react-virtual": "3.2.0",
|
||||
"dompurify": "^3.1.0",
|
||||
"@emoji-mart/data": "^1.1.2",
|
||||
"@emoji-mart/react": "^1.1.1",
|
||||
"@tanstack/react-virtual": "^3.0.0-beta.60",
|
||||
"@uiw/react-color": "^2.1.1",
|
||||
"dompurify": "^3.0.11",
|
||||
"emoji-mart": "^5.5.2",
|
||||
"emoji-toolkit": "8.0.0",
|
||||
"react": "^18.2.0",
|
||||
"react-bootstrap": "^2.2.2",
|
||||
"react-dom": "^18.2.0",
|
||||
@ -23,7 +26,6 @@
|
||||
"use-between": "^1.3.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/forms": "^0.5.7",
|
||||
"@types/node": "^20.11.30",
|
||||
"@types/react": "^18.2.67",
|
||||
"@types/react-dom": "^18.2.22",
|
||||
@ -31,20 +33,13 @@
|
||||
"@typescript-eslint/eslint-plugin": "^7.3.1",
|
||||
"@typescript-eslint/parser": "^7.3.1",
|
||||
"@vitejs/plugin-react": "^4.2.1",
|
||||
"autoprefixer": "^10.4.19",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-plugin-import": "^2.29.1",
|
||||
"eslint-plugin-jsx-a11y": "^6.8.0",
|
||||
"eslint-plugin-react": "^7.34.1",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"postcss": "^8.4.38",
|
||||
"postcss-nested": "^6.0.1",
|
||||
"prettier": "^3.2.5",
|
||||
"prettier-plugin-tailwindcss": "^0.5.13",
|
||||
"sass": "^1.72.0",
|
||||
"tailwindcss": "^3.4.3",
|
||||
"typescript": "^5.4.2",
|
||||
"vite": "^5.1.6",
|
||||
"vite-tsconfig-paths": "^4.3.2"
|
||||
"vite": "^5.1.6"
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +0,0 @@
|
||||
/** @type {import("postcss-load-config").Config} */
|
||||
|
||||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {}
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
/** @type {import("prettier").Config} */
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
'prettier-plugin-tailwindcss'
|
||||
]
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"socket.url": "ws://localhost:2096",
|
||||
"asset.url": "http://192.168.0.8/gamedata",
|
||||
"image.library.url": "http://192.168.0.8/gamedata/c_images/",
|
||||
"hof.furni.url": "http://192.168.0.8/gamedata",
|
||||
"socket.url": "wss://websocket.website.com:2096",
|
||||
"asset.url": "https://website.com/gamedata",
|
||||
"image.library.url": "https://website.com/gamedata/c_images/",
|
||||
"hof.furni.url": "https://website.com/gamedata",
|
||||
"images.url": "${asset.url}/images",
|
||||
"gamedata.url": "${asset.url}",
|
||||
"sounds.url": "${asset.url}/sounds/%sample%.mp3",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"image.library.notifications.url": "${image.library.url}notifications/%image%.png",
|
||||
"achievements.images.url": "${image.library.url}Quests/%image%.png",
|
||||
"camera.url": "http://192.168.0.8/camera/photo",
|
||||
"camera.url": "https://website.com/camera/photo",
|
||||
"thumbnails.url": "/camera/photo/thumb/%thumbnail%.png",
|
||||
"url.prefix": "",
|
||||
"habbopages.url": "${url.prefix}/",
|
||||
@ -135,279 +135,606 @@
|
||||
"catalog.headers": false,
|
||||
"chat.input.maxlength": 100,
|
||||
"chat.styles.disabled": [],
|
||||
"chat.styles": [
|
||||
{
|
||||
"chat.styles": [{
|
||||
"styleId": 0,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 1,
|
||||
"minRank": 5,
|
||||
"isSystemStyle": true,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 2,
|
||||
"minRank": 5,
|
||||
"isSystemStyle": true,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 3,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 4,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 5,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 6,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 7,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 8,
|
||||
"minRank": 5,
|
||||
"isSystemStyle": true,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 9,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": true,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 10,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": true,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 11,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": true,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 12,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": true,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 13,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": true,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 14,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": true,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 15,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": true,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 16,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": true,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 17,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": true,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 18,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": true,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 19,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": true,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 20,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": true,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 21,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": true,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 22,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": true,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 23,
|
||||
"minRank": 5,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 24,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": true,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 25,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": true,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 26,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": true,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 27,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": true,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 28,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": true,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 29,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": true,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 30,
|
||||
"minRank": 5,
|
||||
"isSystemStyle": true,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 31,
|
||||
"minRank": 5,
|
||||
"isSystemStyle": true,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 32,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": true,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 33,
|
||||
"minRank": 5,
|
||||
"isSystemStyle": true,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 34,
|
||||
"minRank": 5,
|
||||
"isSystemStyle": true,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 35,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": true,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 36,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": true,
|
||||
"isAmbassadorOnly": false
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 37,
|
||||
"minRank": 5,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": true
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"styleId": 38,
|
||||
"minRank": 0,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": true,
|
||||
"isAmbassadorOnly": false
|
||||
}, {
|
||||
"styleId": 39,
|
||||
"minRank": 5,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": true
|
||||
}, {
|
||||
"styleId": 40,
|
||||
"minRank": 5,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": true
|
||||
}, {
|
||||
"styleId": 41,
|
||||
"minRank": 5,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": true
|
||||
}, {
|
||||
"styleId": 42,
|
||||
"minRank": 5,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": true
|
||||
}, {
|
||||
"styleId": 43,
|
||||
"minRank": 5,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": true
|
||||
}, {
|
||||
"styleId": 44,
|
||||
"minRank": 5,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": true
|
||||
}, {
|
||||
"styleId": 45,
|
||||
"minRank": 5,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": true
|
||||
}, {
|
||||
"styleId": 46,
|
||||
"minRank": 5,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": true
|
||||
}, {
|
||||
"styleId": 47,
|
||||
"minRank": 5,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": true
|
||||
}, {
|
||||
"styleId": 48,
|
||||
"minRank": 5,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": true
|
||||
}, {
|
||||
"styleId": 49,
|
||||
"minRank": 5,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": true
|
||||
}, {
|
||||
"styleId": 50,
|
||||
"minRank": 5,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": true
|
||||
}, {
|
||||
"styleId": 51,
|
||||
"minRank": 5,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": true
|
||||
}, {
|
||||
"styleId": 52,
|
||||
"minRank": 5,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": true
|
||||
}, {
|
||||
"styleId": 53,
|
||||
"minRank": 5,
|
||||
"isSystemStyle": false,
|
||||
"isHcOnly": false,
|
||||
"isAmbassadorOnly": true
|
||||
}
|
||||
],
|
||||
"camera.available.effects": [{
|
||||
"name": "dark_sepia",
|
||||
"colorMatrix": [
|
||||
0.4, 0.4, 0.1, 0, 110, 0.3, 0.4, 0.1, 0, 30, 0.3, 0.2, 0.1, 0, 0, 0, 0,
|
||||
0, 1, 0
|
||||
],
|
||||
"minLevel": 0,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "increase_saturation",
|
||||
"colorMatrix": [
|
||||
2, -0.5, -0.5, 0, 0, -0.5, 2, -0.5, 0, 0, -0.5, -0.5, 2, 0, 0, 0, 0, 0,
|
||||
1, 0
|
||||
],
|
||||
"minLevel": 0,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "increase_contrast",
|
||||
"colorMatrix": [
|
||||
1.5, 0, 0, 0, -50, 0, 1.5, 0, 0, -50, 0, 0, 1.5, 0, -50, 0, 0, 0, 1.5, 0
|
||||
],
|
||||
"minLevel": 0,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "shadow_multiply_02",
|
||||
"colorMatrix": [],
|
||||
"minLevel": 0,
|
||||
"blendMode": 2,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "color_1",
|
||||
"colorMatrix": [
|
||||
0.393, 0.769, 0.189, 0, 0, 0.349, 0.686, 0.168, 0, 0, 0.272, 0.534,
|
||||
0.131, 0, 0, 0, 0, 0, 1, 0
|
||||
],
|
||||
"minLevel": 1,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "hue_bright_sat",
|
||||
"colorMatrix": [
|
||||
1, 0.6, 0.2, 0, -50, 0.2, 1, 0.6, 0, -50, 0.6, 0.2, 1, 0, -50, 0, 0, 0,
|
||||
1, 0
|
||||
],
|
||||
"minLevel": 1,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "hearts_hardlight_02",
|
||||
"colorMatrix": [],
|
||||
"minLevel": 1,
|
||||
"blendMode": 9,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "texture_overlay",
|
||||
"colorMatrix": [],
|
||||
"minLevel": 1,
|
||||
"blendMode": 4,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "pinky_nrm",
|
||||
"colorMatrix": [],
|
||||
"minLevel": 1,
|
||||
"blendMode": 0,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "color_2",
|
||||
"colorMatrix": [
|
||||
0.333, 0.333, 0.333, 0, 0, 0.333, 0.333, 0.333, 0, 0, 0.333, 0.333,
|
||||
0.333, 0, 0, 0, 0, 0, 1, 0
|
||||
],
|
||||
"minLevel": 2,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "night_vision",
|
||||
"colorMatrix": [
|
||||
0, 0, 0, 0, 0, 0, 1.1, 0, 0, -50, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0
|
||||
],
|
||||
"minLevel": 2,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "stars_hardlight_02",
|
||||
"colorMatrix": [],
|
||||
"minLevel": 2,
|
||||
"blendMode": 9,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "coffee_mpl",
|
||||
"colorMatrix": [],
|
||||
"minLevel": 2,
|
||||
"blendMode": 2,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "security_hardlight",
|
||||
"colorMatrix": [],
|
||||
"minLevel": 3,
|
||||
"blendMode": 9,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "bluemood_mpl",
|
||||
"colorMatrix": [],
|
||||
"minLevel": 3,
|
||||
"blendMode": 2,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "rusty_mpl",
|
||||
"colorMatrix": [],
|
||||
"minLevel": 3,
|
||||
"blendMode": 2,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "decr_conrast",
|
||||
"colorMatrix": [
|
||||
0.5, 0, 0, 0, 50, 0, 0.5, 0, 0, 50, 0, 0, 0.5, 0, 50, 0, 0, 0, 1, 0
|
||||
],
|
||||
"minLevel": 4,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "green_2",
|
||||
"colorMatrix": [
|
||||
0.5, 0.5, 0.5, 0, 0, 0.5, 0.5, 0.5, 0, 90, 0.5, 0.5, 0.5, 0, 0, 0, 0, 0,
|
||||
1, 0
|
||||
],
|
||||
"minLevel": 4,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "alien_hrd",
|
||||
"colorMatrix": [],
|
||||
"minLevel": 4,
|
||||
"blendMode": 9,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "color_3",
|
||||
"colorMatrix": [
|
||||
0.609, 0.609, 0.082, 0, 0, 0.309, 0.609, 0.082, 0, 0, 0.309, 0.609,
|
||||
0.082, 0, 0, 0, 0, 0, 1, 0
|
||||
],
|
||||
"minLevel": 5,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "color_4",
|
||||
"colorMatrix": [
|
||||
0.8, -0.8, 1, 0, 70, 0.8, -0.8, 1, 0, 70, 0.8, -0.8, 1, 0, 70, 0, 0, 0,
|
||||
1, 0
|
||||
],
|
||||
"minLevel": 5,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "toxic_hrd",
|
||||
"colorMatrix": [],
|
||||
"minLevel": 5,
|
||||
"blendMode": 9,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "hypersaturated",
|
||||
"colorMatrix": [
|
||||
2, -1, 0, 0, 0, -1, 2, 0, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 1, 0
|
||||
],
|
||||
"minLevel": 6,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "Yellow",
|
||||
"colorMatrix": [
|
||||
1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0
|
||||
],
|
||||
"minLevel": 6,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "misty_hrd",
|
||||
"colorMatrix": [],
|
||||
"minLevel": 6,
|
||||
"blendMode": 9,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "x_ray",
|
||||
"colorMatrix": [
|
||||
0, 1.2, 0, 0, -100, 0, 2, 0, 0, -120, 0, 2, 0, 0, -120, 0, 0, 0, 1, 0
|
||||
],
|
||||
"minLevel": 7,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "decrease_saturation",
|
||||
"colorMatrix": [
|
||||
0.7, 0.2, 0.2, 0, 0, 0.2, 0.7, 0.2, 0, 0, 0.2, 0.2, 0.7, 0, 0, 0, 0, 0,
|
||||
1, 0
|
||||
],
|
||||
"minLevel": 7,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "drops_mpl",
|
||||
"colorMatrix": [],
|
||||
"minLevel": 8,
|
||||
"blendMode": 2,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "shiny_hrd",
|
||||
"colorMatrix": [],
|
||||
"minLevel": 9,
|
||||
"blendMode": 9,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "glitter_hrd",
|
||||
"colorMatrix": [],
|
||||
"minLevel": 10,
|
||||
"blendMode": 9,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "frame_gold",
|
||||
"colorMatrix": [],
|
||||
"minLevel": 10,
|
||||
"blendMode": 0,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "frame_gray_4",
|
||||
"colorMatrix": [],
|
||||
"minLevel": 10,
|
||||
"blendMode": 0,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "frame_black_2",
|
||||
"colorMatrix": [],
|
||||
"minLevel": 10,
|
||||
"blendMode": 0,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "frame_wood_2",
|
||||
"colorMatrix": [],
|
||||
"minLevel": 10,
|
||||
"blendMode": 0,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "finger_nrm",
|
||||
"colorMatrix": [],
|
||||
"minLevel": 10,
|
||||
"blendMode": 0,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "color_5",
|
||||
"colorMatrix": [
|
||||
3.309, 0.609, 1.082, 0.2, 0, 0.309, 0.609, 0.082, 0, 0, 1.309, 0.609,
|
||||
0.082, 0, 0, 0, 0, 0, 1, 0
|
||||
],
|
||||
"minLevel": 10,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "black_white_negative",
|
||||
"colorMatrix": [
|
||||
-0.5, -0.5, -0.5, 0, 0, -0.5, -0.5, -0.5, 0, 0, -0.5, -0.5, -0.5, 0, 0,
|
||||
0, 0, 0, 1, 0
|
||||
],
|
||||
"minLevel": 10,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "blue",
|
||||
"colorMatrix": [
|
||||
0.5, 0.5, 0.5, 0, -255, 0.5, 0.5, 0.5, 0, -170, 0.5, 0.5, 0.5, 0, 0, 0,
|
||||
0, 0, 1, 0
|
||||
],
|
||||
"minLevel": 10,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "red",
|
||||
"colorMatrix": [
|
||||
0.5, 0.5, 0.5, 0, 0, 0.5, 0.5, 0.5, 0, -170, 0.5, 0.5, 0.5, 0, -170, 0,
|
||||
0, 0, 1, 0
|
||||
],
|
||||
"minLevel": 10,
|
||||
"enabled": true
|
||||
}, {
|
||||
"name": "green",
|
||||
"colorMatrix": [
|
||||
0.5, 0.5, 0.5, 0, -170, 0.5, 0.5, 0.5, 0, 0, 0.5, 0.5, 0.5, 0, -170, 0,
|
||||
0, 0, 1, 0
|
||||
],
|
||||
"minLevel": 10,
|
||||
"enabled": true
|
||||
}
|
||||
],
|
||||
"camera.available.effects": [
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { AddLinkEventTracker, ILinkEventTracker, RemoveLinkEventTracker } from '@nitrots/nitro-renderer';
|
||||
import { AddLinkEventTracker, GetConfiguration, ILinkEventTracker, RemoveLinkEventTracker } from '@nitrots/nitro-renderer';
|
||||
import { FC, useEffect } from 'react';
|
||||
import { GetConfigurationValue, LocalizeText } from '../../api';
|
||||
import { Column, Flex, Grid, NitroCardContentView, NitroCardHeaderView, NitroCardTabsItemView, NitroCardTabsView, NitroCardView } from '../../common';
|
||||
@ -72,19 +72,22 @@ export const CatalogView: FC<{}> = props =>
|
||||
<NitroCardView uniqueKey="catalog" className="nitro-catalog" style={ GetConfigurationValue('catalog.headers') ? { width: 710 } : {} }>
|
||||
<NitroCardHeaderView headerText={ LocalizeText('catalog.title') } onCloseClick={ event => setIsVisible(false) } />
|
||||
<NitroCardTabsView>
|
||||
{ rootNode && (rootNode.children.length > 0) && rootNode.children.map(child =>
|
||||
{
|
||||
{rootNode &&
|
||||
rootNode.children.length > 0 &&
|
||||
rootNode.children.map((child, index) => {
|
||||
if (!child.isVisible) return null;
|
||||
|
||||
const uniqueKey = `${child.pageId}-${index}`;
|
||||
return (
|
||||
<NitroCardTabsItemView key={ child.pageId } isActive={ child.isActive } onClick={ event =>
|
||||
{
|
||||
<NitroCardTabsItemView
|
||||
key={uniqueKey}
|
||||
isActive={child.isActive}
|
||||
onClick={(event) => {
|
||||
if (searchResult) setSearchResult(null);
|
||||
|
||||
activateNode(child);
|
||||
} } >
|
||||
<Flex gap={ GetConfigurationValue('catalog.tab.icons') ? 1 : 0 } alignItems="center">
|
||||
{ GetConfigurationValue('catalog.tab.icons') && <CatalogIconView icon={ child.iconId } /> }
|
||||
}}
|
||||
>
|
||||
<Flex gap={GetConfiguration('catalog.tab.icons') ? 1 : 0} alignItems="center">
|
||||
{GetConfiguration('catalog.tab.icons') && <CatalogIconView icon={child.iconId} />}
|
||||
{child.localization}
|
||||
</Flex>
|
||||
</NitroCardTabsItemView>
|
||||
|
@ -1,51 +0,0 @@
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
|
||||
const { generateShades } = require('./css-utils/CSSColorUtils');
|
||||
|
||||
const colors = {
|
||||
'toolbar': '#555555',
|
||||
'card-header': '#1E7295',
|
||||
'card-close': '#921911',
|
||||
'card-tabs': '#185D79',
|
||||
'card-border': '#283F5D',
|
||||
'card-tab-item': '#B6BEC5',
|
||||
'card-tab-item-active': '#DFDFDF',
|
||||
'card-content-area': '#DFDFDF'
|
||||
};
|
||||
|
||||
const boxShadow = {
|
||||
'inner1px': 'inset 0 0 0 1px rgba(255,255,255,.3)'
|
||||
};
|
||||
|
||||
|
||||
module.exports = {
|
||||
theme: {
|
||||
extend: {
|
||||
fontFamily: {
|
||||
sans: [ 'Ubuntu', 'sans-serif' ],
|
||||
},
|
||||
colors: generateShades(colors),
|
||||
boxShadow,
|
||||
spacing: {
|
||||
'card-header': '33px',
|
||||
'card-tabs': '33px',
|
||||
'navigator-w': '420px',
|
||||
'navigator-h': '440px',
|
||||
'inventory-w': '528px',
|
||||
'inventory-h': '320px'
|
||||
},
|
||||
zIndex: {
|
||||
'toolbar': ''
|
||||
}
|
||||
},
|
||||
},
|
||||
darkMode: 'class',
|
||||
plugins: [
|
||||
require('@tailwindcss/forms'),
|
||||
require('@headlessui/tailwindcss')({ prefix: 'ui' })
|
||||
],
|
||||
content: [
|
||||
'./index.html',
|
||||
'./src/**/*.{html,js,jsx,ts,tsx}'
|
||||
]
|
||||
}
|
@ -20,10 +20,7 @@
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
"jsx": "react-jsx",
|
||||
"paths": {
|
||||
"@layout/*": ["layout/*"],
|
||||
}
|
||||
"jsx": "react-jsx"
|
||||
},
|
||||
"include": [
|
||||
"src",
|
||||
|
@ -2,10 +2,9 @@
|
||||
import react from '@vitejs/plugin-react';
|
||||
import { resolve } from 'path';
|
||||
import { defineConfig } from 'vite';
|
||||
import tsconfigPaths from 'vite-tsconfig-paths';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [ react(), tsconfigPaths() ],
|
||||
plugins: [ react() ],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve(__dirname, 'src'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user