diff --git a/.browserslistrc b/.browserslistrc new file mode 100644 index 00000000..3e5809a3 --- /dev/null +++ b/.browserslistrc @@ -0,0 +1,11 @@ +# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. +# For additional information regarding the format and rule options, please see: +# https://github.com/browserslist/browserslist#queries +# You can see what browsers were selected by your queries by running: +# npx browserslist + +last 1 Chrome version +last 1 Firefox version +last 1 Edge major versions +last 2 Safari major versions +last 2 iOS major versions diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..c51d7b9c --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,86 @@ +module.exports = { + 'extends': [ + 'react-app', + 'react-app/jest' + ], + 'rules': { + 'linebreak-style': [ + 'off' + ], + 'quotes': [ + 'error', + 'single' + ], + 'brace-style': [ + 'error', + 'allman', + { + 'allowSingleLine': true + } + ], + 'object-curly-spacing': [ + 'error', + 'always' + ], + 'keyword-spacing': [ + 'error', + { + 'overrides': { + 'if': { + 'after': false + }, + 'for': { + 'after': false + }, + 'while': { + 'after': false + }, + 'switch': { + 'after': false + } + } + } + ], + '@typescript-eslint/no-explicit-any': [ + 'off' + ], + '@typescript-eslint/ban-ts-comment': [ + 'off' + ], + '@typescript-eslint/no-empty-function': [ + 'error', + { + 'allow': [ + 'functions', + 'arrowFunctions', + 'generatorFunctions', + 'methods', + 'generatorMethods', + 'constructors' + ] + } + ], + '@typescript-eslint/no-unused-vars': [ + 'off' + ], + '@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' + ] + } + } diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..bb163dd8 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,32 @@ +name: Deploy Bundle@dev + +on: + push: + branches: [ dev ] + +jobs: + build: + + runs-on: self-hosted + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + - name: Install & Build + run: | + npm run build:prod + - name: Archive Artifacts + uses: actions/upload-artifact@v2 + with: + path: | + build + - name: Upload Artifacts + uses: actions/upload-artifact@v2 + with: + host: ${{ secrets.HOST }} + port: ${{ secrets.PORT }} + username: ${{ secrets.USERNAME }} + key: ${{ secrets.SSHKEY }} + path: | + build + target: "/var/www/nitrots.co/domains/prod.nitrots.co/html" diff --git a/craco.config.js b/craco.config.js new file mode 100644 index 00000000..48a9bf86 --- /dev/null +++ b/craco.config.js @@ -0,0 +1,5 @@ +module.exports = { + eslint: { + enabled: false + } +} diff --git a/package.json b/package.json index 05c2007b..3b3ffc65 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,13 @@ "name": "nitro-react", "version": "0.1.0", "private": true, + "scripts": { + "start": "react-scripts start", + "build": "react-scripts --max_old_space_size=8048 build", + "build:prod": "npm uninstall @nitrots/nitro-renderer && npm i git+https://git@git.krews.org/nitro/nitro-renderer#dev && npm i && npm run build", + "test": "react-scripts test", + "eject": "react-scripts eject" + }, "dependencies": { "@nitrots/nitro-renderer": "file:../nitro-renderer", "animate.css": "^4.1.1", @@ -17,112 +24,6 @@ "typescript": "^4.3.5", "web-vitals": "^1.1.2" }, - "scripts": { - "postinstall": "node ./webpack-patcher.js", - "start": "react-scripts start", - "build": "react-scripts build", - "build:prod": "npm i git+https://git@git.krews.org/nitro/nitro-renderer#dev && npm i && npm run build", - "test": "react-scripts test", - "eject": "react-scripts eject" - }, - "eslintConfig": { - "extends": [ - "react-app", - "react-app/jest" - ], - "rules": { - "linebreak-style": [ - "off" - ], - "quotes": [ - "error", - "single" - ], - "brace-style": [ - "error", - "allman", - { - "allowSingleLine": true - } - ], - "object-curly-spacing": [ - "error", - "always" - ], - "keyword-spacing": [ - "error", - { - "overrides": { - "if": { - "after": false - }, - "for": { - "after": false - }, - "while": { - "after": false - }, - "switch": { - "after": false - } - } - } - ], - "@typescript-eslint/no-explicit-any": [ - "off" - ], - "@typescript-eslint/ban-ts-comment": [ - "off" - ], - "@typescript-eslint/no-empty-function": [ - "error", - { - "allow": [ - "functions", - "arrowFunctions", - "generatorFunctions", - "methods", - "generatorMethods", - "constructors" - ] - } - ], - "@typescript-eslint/no-unused-vars": [ - "off" - ], - "@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" - ] - } - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - }, "devDependencies": { "@testing-library/jest-dom": "^5.14.1", "@testing-library/react": "^11.2.7", diff --git a/public/renderer-config.json b/public/renderer-config.json index bd228c88..b6112627 100644 --- a/public/renderer-config.json +++ b/public/renderer-config.json @@ -6,7 +6,7 @@ "images.url": "${asset.url}/images", "gamedata.url": "${asset.url}/gamedata", "sounds.url": "${asset.url}/sounds", - "external.texts.url": "${gamedata.url}/ExternalTexts.json", + "external.texts.url": [ "${gamedata.url}/ExternalTexts.json", "${gamedata.url}/UITexts.json" ], "external.samples.url": "${hof.furni.url}/mp3/sound_machine_sample_%sample%.mp3", "furnidata.url": "${gamedata.url}/FurnitureData.json", "productdata.url": "${gamedata.url}/ProductData.json", diff --git a/public/ui-config.json b/public/ui-config.json index 1cf49b7a..58dfdcc7 100644 --- a/public/ui-config.json +++ b/public/ui-config.json @@ -45,6 +45,7 @@ 5, 101 ], + "currency.display.number.short": false, "currency.asset.icon.url": "${images.url}/wallet/%type%.png", "catalog.asset.url": "${image.library.url}catalogue", "catalog.asset.image.url": "${catalog.asset.url}/%name%.gif", diff --git a/src/api/utils/LocalizeFormattedNumber.ts b/src/api/utils/LocalizeFormattedNumber.ts new file mode 100644 index 00000000..fab30d46 --- /dev/null +++ b/src/api/utils/LocalizeFormattedNumber.ts @@ -0,0 +1,6 @@ +export function LocalizeFormattedNumber(number: number): string +{ + if(!number || isNaN(number)) return '0'; + + return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ' '); +}; diff --git a/src/api/utils/index.ts b/src/api/utils/index.ts index 3125981d..2ef88a1e 100644 --- a/src/api/utils/index.ts +++ b/src/api/utils/index.ts @@ -1,6 +1,7 @@ export * from './ColorUtils'; export * from './LocalizeBadgeDescription'; export * from './LocalizeBageName'; +export * from './LocalizeFormattedNumber'; export * from './LocalizeShortNumber'; export * from './LocalizeText'; export * from './Randomizer'; diff --git a/src/assets/images/icons/help.png b/src/assets/images/icons/help.png new file mode 100644 index 00000000..50d8aa8a Binary files /dev/null and b/src/assets/images/icons/help.png differ diff --git a/src/assets/styles/icons.scss b/src/assets/styles/icons.scss index 147da74e..a5108a7c 100644 --- a/src/assets/styles/icons.scss +++ b/src/assets/styles/icons.scss @@ -125,6 +125,12 @@ height: 15px; } + &.icon-help { + background: url('../images/icons/help.png'); + width: 13px; + height: 23px; + } + &.icon-joinroom { background-image: url('../images/toolbar/icons/joinroom.png'); width: 21px; diff --git a/src/layout/notification-bubble/NotificationBubbleView.scss b/src/layout/notification-bubble/NotificationBubbleView.scss index cadbac52..579d9531 100644 --- a/src/layout/notification-bubble/NotificationBubbleView.scss +++ b/src/layout/notification-bubble/NotificationBubbleView.scss @@ -1,14 +1,11 @@ .nitro-notification-bubble { pointer-events: all; - background-color: $gable-green; - border: 2px solid rgba($white, 0.5); + padding: 6px 5px; + background-color: rgba($dark,.95); + box-shadow: inset 0px 5px lighten(rgba($dark,.6),2.5), inset 0 -4px darken(rgba($dark,.6),4); font-size: $font-size-sm; margin-bottom: 5px; - &.club-gift { - - } - .bubble-image { width: 30px; height: 30px; diff --git a/src/layout/notification-bubble/NotificationBubbleView.tsx b/src/layout/notification-bubble/NotificationBubbleView.tsx index c1b29654..49a45b9f 100644 --- a/src/layout/notification-bubble/NotificationBubbleView.tsx +++ b/src/layout/notification-bubble/NotificationBubbleView.tsx @@ -21,7 +21,7 @@ export const NotificationBubbleView: FC = props => }, [ fadesOut, close ]); return ( -
+
{ children }
) diff --git a/src/views/groups/views/creator/GroupCreatorView.scss b/src/views/groups/views/creator/GroupCreatorView.scss index 8cecc536..565be07f 100644 --- a/src/views/groups/views/creator/GroupCreatorView.scss +++ b/src/views/groups/views/creator/GroupCreatorView.scss @@ -69,8 +69,8 @@ } .creator-tab { - height: 230px; - min-height: 230px; - max-height: 230px; + height: 260px; + min-height: 260px; + max-height: 260px; } } diff --git a/src/views/groups/views/manager/GroupManagerView.scss b/src/views/groups/views/manager/GroupManagerView.scss index c15acb37..10c3159e 100644 --- a/src/views/groups/views/manager/GroupManagerView.scss +++ b/src/views/groups/views/manager/GroupManagerView.scss @@ -2,8 +2,8 @@ width: 385px; .manager-tab { - height: 230px; - min-height: 230px; - max-height: 230px; + height: 260px; + min-height: 260px; + max-height: 260px; } } diff --git a/src/views/groups/views/room-information/GroupRoomInformationView.scss b/src/views/groups/views/room-information/GroupRoomInformationView.scss index 9c1ac19c..8c921539 100644 --- a/src/views/groups/views/room-information/GroupRoomInformationView.scss +++ b/src/views/groups/views/room-information/GroupRoomInformationView.scss @@ -1,8 +1,8 @@ .nitro-group-room-information { pointer-events: all; - padding: 2px; - background-color: $gable-green; - border: 2px solid rgba($white, 0.5); + padding: 6px 5px; + background-color: rgba($dark,.95); + box-shadow: inset 0px 5px lighten(rgba($dark,.6),2.5), inset 0 -4px darken(rgba($dark,.6),4); font-size: $font-size-sm; margin-bottom: 5px; diff --git a/src/views/groups/views/room-information/GroupRoomInformationView.tsx b/src/views/groups/views/room-information/GroupRoomInformationView.tsx index af2f73ee..9b8f29b7 100644 --- a/src/views/groups/views/room-information/GroupRoomInformationView.tsx +++ b/src/views/groups/views/room-information/GroupRoomInformationView.tsx @@ -104,7 +104,7 @@ export const GroupRoomInformationView: FC<{}> = props => if(!groupInformation) return null; return ( -
+
setIsExpended(value => !value) }>
{ LocalizeText('group.homeroominfo.title') }
@@ -119,7 +119,7 @@ export const GroupRoomInformationView: FC<{}> = props =>
{ (groupInformation.type !== GroupType.PRIVATE || isRealOwner()) && - } diff --git a/src/views/groups/views/shared-tabs/tab-badge/GroupSharedTabBadgeView.scss b/src/views/groups/views/shared-tabs/tab-badge/GroupSharedTabBadgeView.scss index 1ad61e27..4475004d 100644 --- a/src/views/groups/views/shared-tabs/tab-badge/GroupSharedTabBadgeView.scss +++ b/src/views/groups/views/shared-tabs/tab-badge/GroupSharedTabBadgeView.scss @@ -3,11 +3,14 @@ position: relative; border-radius: $border-radius; width: 16px; - height: 12px; + height: 16px; background: $white; + border: 2px solid $white; + box-shadow: inset 3px 3px rgba(0, 0, 0, .1); &.active { background: $primary; + box-shadow: none; } } @@ -15,7 +18,13 @@ position: relative; border-radius: $border-radius; width: 16px; - height: 12px; + height: 16px; + border: 2px solid $white; + box-shadow: inset 3px 3px rgba(0, 0, 0, .1); + + &.active { + box-shadow: none; + } } .selection-list { diff --git a/src/views/groups/views/shared-tabs/tab-badge/GroupSharedTabBadgeView.tsx b/src/views/groups/views/shared-tabs/tab-badge/GroupSharedTabBadgeView.tsx index 09de6a59..a29666fe 100644 --- a/src/views/groups/views/shared-tabs/tab-badge/GroupSharedTabBadgeView.tsx +++ b/src/views/groups/views/shared-tabs/tab-badge/GroupSharedTabBadgeView.tsx @@ -113,7 +113,7 @@ export const GroupSharedTabBadgeView: FC = props =
{ badgePartColors && badgePartColors.map((item, index) => { - return
selectPartProperty('color', item.id) }>
+ return
selectPartProperty('color', item.id) }>
}) }
diff --git a/src/views/groups/views/shared-tabs/tab-colors/GroupSharedTabColorsView.scss b/src/views/groups/views/shared-tabs/tab-colors/GroupSharedTabColorsView.scss index 06045fff..80a94c75 100644 --- a/src/views/groups/views/shared-tabs/tab-colors/GroupSharedTabColorsView.scss +++ b/src/views/groups/views/shared-tabs/tab-colors/GroupSharedTabColorsView.scss @@ -4,6 +4,12 @@ position: relative; border-radius: $border-radius; width: 15px; - height: 12px; + height: 15px; + border: 2px solid $white; + box-shadow: inset 2px 2px rgba(0, 0, 0, .2); + + &.active { + box-shadow: none; + } } } diff --git a/src/views/groups/views/shared-tabs/tab-colors/GroupSharedTabColorsView.tsx b/src/views/groups/views/shared-tabs/tab-colors/GroupSharedTabColorsView.tsx index 1266fef8..d9a0d4f6 100644 --- a/src/views/groups/views/shared-tabs/tab-colors/GroupSharedTabColorsView.tsx +++ b/src/views/groups/views/shared-tabs/tab-colors/GroupSharedTabColorsView.tsx @@ -1,3 +1,4 @@ +import classNames from 'classnames'; import { FC, useCallback, useEffect, useState } from 'react'; import { LocalizeText } from '../../../../../api'; import { useGroupsContext } from '../../../context/GroupsContext'; @@ -64,7 +65,7 @@ export const GroupSharedTabColorsView: FC<{}> = props =>
{ groupColorsA && groupColorsA.map((item, index) => { - return
selectColor(item.id) }>
+ return
selectColor(item.id) }>
}) }
setSelectingColorIndex(1) } />
@@ -77,7 +78,7 @@ export const GroupSharedTabColorsView: FC<{}> = props =>
{ groupColorsB && groupColorsB.map((item, index) => { - return
selectColor(item.id) }>
+ return
selectColor(item.id) }>
}) }
diff --git a/src/views/notification-center/views/bubble-layouts/club-gift/NotificationClubGiftBubbleView.tsx b/src/views/notification-center/views/bubble-layouts/club-gift/NotificationClubGiftBubbleView.tsx index dcf4296a..0c03c440 100644 --- a/src/views/notification-center/views/bubble-layouts/club-gift/NotificationClubGiftBubbleView.tsx +++ b/src/views/notification-center/views/bubble-layouts/club-gift/NotificationClubGiftBubbleView.tsx @@ -11,13 +11,13 @@ export const NotificationClubGiftBubbleView: FC -
- +
+ { LocalizeText('notifications.text.club_gift') }
-
- { LocalizeText('notifications.button.later') } - +
+ + { LocalizeText('notifications.button.later') }
); diff --git a/src/views/purse/PurseView.scss b/src/views/purse/PurseView.scss index 72ed8e27..a4af3639 100644 --- a/src/views/purse/PurseView.scss +++ b/src/views/purse/PurseView.scss @@ -1,12 +1,10 @@ .nitro-purse { - padding: 2px; - background-color: $gable-green; - border: 2px solid rgba($white, 0.5); - border-top: 0; + background-color: rgba($dark,.95); font-size: $font-size-sm; pointer-events: all; - margin-bottom:5px; - + margin-bottom: 5px; + padding: 6px 5px; + box-shadow: inset 0px 5px lighten(rgba($dark,.6),2.5), inset 0 -4px darken(rgba($dark,.6),4); .notification-button { color:lighten($dark,20); @@ -17,19 +15,21 @@ } .nitro-purse-hc { - background-color: $william; - margin:0 2px; + background-color: rgba($light,.1); + margin: 0 5px; } .nitro-purse-button { - background: $bg-mirage-split-background; + border-bottom: 1px solid rgba(0, 0, 0, 0.3); + padding: 2px 3px; + border-radius: $border-radius; - &:not(:first-child) { - margin-top:2px; + &:last-child { + border-bottom: none; } &:hover { - background: $bg-cello-split-background; + background-color: rgba($light,.1); } } } diff --git a/src/views/purse/PurseView.tsx b/src/views/purse/PurseView.tsx index 09d22531..7a2f8028 100644 --- a/src/views/purse/PurseView.tsx +++ b/src/views/purse/PurseView.tsx @@ -29,6 +29,11 @@ export const PurseView: FC<{}> = props => return GetConfiguration('system.currency.types', []); }, []); + const currencyDisplayNumberShort = useMemo(() => + { + return GetConfiguration('currency.display.number.short', false); + }, []); + const getCurrencyElements = useCallback((offset: number, limit: number = -1, seasonal: boolean = false) => { if(!purse.activityPoints.size) return null; @@ -53,13 +58,13 @@ export const PurseView: FC<{}> = props => if((limit > -1) && (count === limit)) break; if(seasonal) elements.push(); - else elements.push(); + else elements.push(); count++; } return elements; - }, [ purse, displayedCurrencies ]); + }, [ purse, displayedCurrencies, currencyDisplayNumberShort ]); const getClubText = useCallback(() => { @@ -123,19 +128,19 @@ export const PurseView: FC<{}> = props =>
- + { getCurrencyElements(0, 2) }
-
+
{ getClubText() }
-
+
diff --git a/src/views/purse/views/currency/CurrencyView.scss b/src/views/purse/views/currency/CurrencyView.scss index 492f8454..eb77390d 100644 --- a/src/views/purse/views/currency/CurrencyView.scss +++ b/src/views/purse/views/currency/CurrencyView.scss @@ -1,9 +1,4 @@ .nitro-currency { pointer-events: all; - background: $bg-mirage-split-background; position: relative; - - &:not(:first-of-type) { - margin-top:2px; - } } diff --git a/src/views/purse/views/currency/CurrencyView.tsx b/src/views/purse/views/currency/CurrencyView.tsx index 63783a42..589eb03e 100644 --- a/src/views/purse/views/currency/CurrencyView.tsx +++ b/src/views/purse/views/currency/CurrencyView.tsx @@ -1,25 +1,32 @@ -import { FC } from 'react'; +import { FC, useMemo } from 'react'; import { OverlayTrigger, Tooltip } from 'react-bootstrap'; -import { LocalizeShortNumber } from '../../../../api'; +import { LocalizeFormattedNumber, LocalizeShortNumber } from '../../../../api'; import { CurrencyIcon } from '../../../shared/currency-icon/CurrencyIcon'; import { CurrencyViewProps } from './CurrencyView.types'; export const CurrencyView: FC = props => { - const { type = -1, amount = -1 } = props; + const { type = -1, amount = -1, short = false } = props; + const element = useMemo(() => + { + return (
+
{ short ? LocalizeShortNumber(amount) : LocalizeFormattedNumber(amount) }
+ +
); + }, [ amount, short, type ]); + + if(!short) return element; + return ( - { amount } + { LocalizeFormattedNumber(amount) } }> -
-
{LocalizeShortNumber(amount)}
- -
+ { element }
); } diff --git a/src/views/purse/views/currency/CurrencyView.types.ts b/src/views/purse/views/currency/CurrencyView.types.ts index 0ff2718e..fc6684f8 100644 --- a/src/views/purse/views/currency/CurrencyView.types.ts +++ b/src/views/purse/views/currency/CurrencyView.types.ts @@ -2,4 +2,5 @@ export interface CurrencyViewProps { type: number; amount: number; + short: boolean; } diff --git a/src/views/purse/views/seasonal/SeasonalView.scss b/src/views/purse/views/seasonal/SeasonalView.scss index e5f8894d..901c0d8d 100644 --- a/src/views/purse/views/seasonal/SeasonalView.scss +++ b/src/views/purse/views/seasonal/SeasonalView.scss @@ -1,16 +1,12 @@ .nitro-seasonal-currency { pointer-events: all; - padding: 2px; - background-color: $gable-green; - border: 2px solid rgba($white, 0.5); + padding: 6px 5px; + background-color: rgba($dark,.95); + box-shadow: inset 0px 5px lighten(rgba($dark,.6),2.5), inset 0 -4px darken(rgba($dark,.6),4); font-size: $font-size-sm; margin-bottom: 5px; - .nitro-currency-text { - background: $bg-mirage-split-background; - } - - .nitro-seasonal-icon { - background-color: $william; + .seasonal-text { + color: rgba($light,.5); } } diff --git a/src/views/purse/views/seasonal/SeasonalView.tsx b/src/views/purse/views/seasonal/SeasonalView.tsx index 1dbc4a20..804b15b4 100644 --- a/src/views/purse/views/seasonal/SeasonalView.tsx +++ b/src/views/purse/views/seasonal/SeasonalView.tsx @@ -1,5 +1,5 @@ import { FC } from 'react'; -import { LocalizeShortNumber, LocalizeText } from '../../../../api'; +import { LocalizeFormattedNumber, LocalizeText } from '../../../../api'; import { CurrencyIcon } from '../../../shared/currency-icon/CurrencyIcon'; import { SeasonalViewProps } from './SeasonalView.types'; @@ -10,11 +10,11 @@ export const SeasonalView: FC = props => return (
- { LocalizeText(`purse.seasonal.currency.${ type }`) } - { LocalizeShortNumber(amount) } + { LocalizeText(`purse.seasonal.currency.${ type }`) } + { LocalizeFormattedNumber(amount) }
-
- +
+
); diff --git a/src/views/room/widgets/furniture/dimmer/FurnitureDimmerView.scss b/src/views/room/widgets/furniture/dimmer/FurnitureDimmerView.scss index 1e671f8d..7ec95775 100644 --- a/src/views/room/widgets/furniture/dimmer/FurnitureDimmerView.scss +++ b/src/views/room/widgets/furniture/dimmer/FurnitureDimmerView.scss @@ -9,5 +9,11 @@ .color-swatch { height: 30px; + border: 2px solid $white; + box-shadow: inset 3px 3px rgba(0, 0, 0, .2); + + &.active { + box-shadow: none; + } } } diff --git a/src/views/room/widgets/furniture/dimmer/FurnitureDimmerView.tsx b/src/views/room/widgets/furniture/dimmer/FurnitureDimmerView.tsx index 9778760e..f65f2664 100644 --- a/src/views/room/widgets/furniture/dimmer/FurnitureDimmerView.tsx +++ b/src/views/room/widgets/furniture/dimmer/FurnitureDimmerView.tsx @@ -1,4 +1,5 @@ import { NitroEvent } from '@nitrots/nitro-renderer'; +import classNames from 'classnames'; import { FC, useCallback, useEffect, useMemo, useState } from 'react'; import ReactSlider from 'react-slider'; import { ColorUtils, GetConfiguration, LocalizeText, RoomWidgetDimmerChangeStateMessage, RoomWidgetDimmerPreviewMessage, RoomWidgetDimmerSavePresetMessage, RoomWidgetUpdateDimmerEvent, RoomWidgetUpdateDimmerStateEvent } from '../../../../../api'; @@ -175,7 +176,7 @@ export const FurnitureDimmerView: FC<{}> = props =>
{ AVAILABLE_COLORS.map((color, index) => { - return
setSelectedColor(color) } style={{ backgroundColor: HTML_COLORS[index] }}>
; + return
setSelectedColor(color) } style={{ backgroundColor: HTML_COLORS[index] }}>
; }) }
}
diff --git a/tsconfig.json b/tsconfig.json index ac2a9fd7..df4dcf04 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -24,6 +24,6 @@ }, "include": [ "src", - "node_modules/@nitrots/nitro-renderer/src/**/*.ts", + "node_modules/@nitrots/nitro-renderer/**/*.ts", ] } diff --git a/webpack-patcher.js b/webpack-patcher.js deleted file mode 100644 index f4178ce0..00000000 --- a/webpack-patcher.js +++ /dev/null @@ -1,22 +0,0 @@ -const fs = require('fs'); - -function deleteLineFromFile(props) -{ - const data = fs.readFileSync(props.path, 'utf-8'); - const array = data.split('\n'); - const value = array[props.lineToRemove.index - 1].trim(); - - if (value === props.lineToRemove.value) - { - array.splice(props.lineToRemove.index - 1, 1); - - const newData = array.join('\n'); - - fs.writeFileSync(props.path, newData, 'utf-8'); - } -} - -deleteLineFromFile({ - path: 'node_modules/react-scripts/config/webpack.config.js', - lineToRemove: { index: 406, value: 'include: paths.appSrc,' }, -});