From 064f552c8875267b606c7fe05f300d95bb97967c Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 16 Sep 2021 00:48:43 -0400 Subject: [PATCH 01/19] Update build --- .browserslistrc | 11 +++++++++ craco.config.js | 5 ++++ package-lock.json | 57 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 20 ++++------------ tsconfig.json | 2 +- webpack-patcher.js | 22 ------------------ 6 files changed, 78 insertions(+), 39 deletions(-) create mode 100644 .browserslistrc create mode 100644 craco.config.js delete mode 100644 webpack-patcher.js 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/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-lock.json b/package-lock.json index 9effa8d0..0f2a0fe4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1152,6 +1152,55 @@ "minimist": "^1.2.0" } }, + "@craco/craco": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@craco/craco/-/craco-6.3.0.tgz", + "integrity": "sha512-SCnfEQxT/6NAbU/3sIWw7gQXtzjjiTp/EZFdJTd8inPURILIy0YajrC2p8qBG2KhFo5cwgOrEDyaGyAFvvuyuA==", + "requires": { + "cross-spawn": "^7.0.0", + "lodash": "^4.17.15", + "semver": "^7.3.2", + "webpack-merge": "^4.2.2" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + } + } + }, "@csstools/convert-colors": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/@csstools/convert-colors/-/convert-colors-1.4.0.tgz", @@ -18810,6 +18859,14 @@ } } }, + "webpack-merge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.2.2.tgz", + "integrity": "sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g==", + "requires": { + "lodash": "^4.17.15" + } + }, "webpack-sources": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", diff --git a/package.json b/package.json index 05c2007b..bd043db6 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { + "@craco/craco": "^6.3.0", "@nitrots/nitro-renderer": "file:../nitro-renderer", "animate.css": "^4.1.1", "classnames": "^2.3.1", @@ -18,11 +19,10 @@ "web-vitals": "^1.1.2" }, "scripts": { - "postinstall": "node ./webpack-patcher.js", - "start": "react-scripts start", - "build": "react-scripts build", + "start": "craco start", + "build": "craco build", "build:prod": "npm i git+https://git@git.krews.org/nitro/nitro-renderer#dev && npm i && npm run build", - "test": "react-scripts test", + "test": "craco test", "eject": "react-scripts eject" }, "eslintConfig": { @@ -111,18 +111,6 @@ ] } }, - "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/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,' }, -}); From 8f83c06cbee3aa43b26c1e9ead4809608c873e38 Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 16 Sep 2021 01:17:49 -0400 Subject: [PATCH 02/19] Test workflow --- .github/workflows/deploy.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..1a78a89b --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,25 @@ +name: Deploy Bundle@dev + +on: + push: + branches: [ dev ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Build Repository + uses: billsonnn/nitro-react@master + env: + HOST: ${{ secrets.HOST }} + USERNAME: ${{ secrets.USERNAME }} + PORT: ${{ secrets.PORT }} + KEY: ${{ secrets.SSHKEY }} + with: + node-version: '14.x' + registry-url: 'https://registry.npmjs.org' + source: "." + target: "/var/www/nitrots.co/domains/prod.nitrots.co/html" + run: npm run build:prod From c79690206f9094174e2faf5deb489e2c711a8415 Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 16 Sep 2021 01:27:14 -0400 Subject: [PATCH 03/19] Update config --- public/renderer-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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", From 341af1ba2aafc18c397c95d12416520228bb7508 Mon Sep 17 00:00:00 2001 From: MyNameIsBatman Date: Thu, 16 Sep 2021 02:27:23 -0300 Subject: [PATCH 04/19] Purse updates --- src/assets/images/icons/help.png | Bin 0 -> 233 bytes src/assets/styles/icons.scss | 6 +++++ .../NotificationBubbleView.scss | 9 +++---- .../NotificationBubbleView.tsx | 2 +- .../NotificationClubGiftBubbleView.tsx | 10 ++++---- src/views/purse/PurseView.scss | 24 +++++++++--------- src/views/purse/PurseView.tsx | 4 +-- .../purse/views/currency/CurrencyView.scss | 5 ---- .../purse/views/seasonal/SeasonalView.scss | 14 ++++------ .../purse/views/seasonal/SeasonalView.tsx | 6 ++--- 10 files changed, 37 insertions(+), 43 deletions(-) create mode 100644 src/assets/images/icons/help.png diff --git a/src/assets/images/icons/help.png b/src/assets/images/icons/help.png new file mode 100644 index 0000000000000000000000000000000000000000..50d8aa8a0ef1f6d2c206bebcfd2acd354fde7bcf GIT binary patch literal 233 zcmeAS@N?(olHy`uVBq!ia0vp@KrF?<1|)MVuEhf>&H|6fVg?3oArNM~bhqvgP;j=V zi(^Q|t)r6;@-`^&xZa#3dgtK98wZ+&3m%=j+r9Ey#H9;juE{x{k`~ylwBKRr9==&z zAS+(jiDN>L)x235TrFy5tllF33tFx28CgXnYCO0lvp%}YM6R{r$sE=zzXPj8E$e2A zuhUn4KWT&ET$lIUTh!NG%6r{zrx=#}5uIDXfYrZ(Vnp9otvurQ11q dS0npYM)wnXq8m%KWP#3P@O1TaS?83{1OQ*^RXzX! literal 0 HcmV?d00001 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/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..3b1c5c56 100644 --- a/src/views/purse/PurseView.tsx +++ b/src/views/purse/PurseView.tsx @@ -128,14 +128,14 @@ export const PurseView: FC<{}> = props =>
-
+
{ 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/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..3758c71c 100644 --- a/src/views/purse/views/seasonal/SeasonalView.tsx +++ b/src/views/purse/views/seasonal/SeasonalView.tsx @@ -10,11 +10,11 @@ export const SeasonalView: FC = props => return (
- { LocalizeText(`purse.seasonal.currency.${ type }`) } + { LocalizeText(`purse.seasonal.currency.${ type }`) } { LocalizeShortNumber(amount) }
-
- +
+
); From f76428e8f73522cf5d85735e2469213aaf233afc Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 16 Sep 2021 01:42:56 -0400 Subject: [PATCH 05/19] Test deploy --- .github/workflows/deploy.yml | 40 ++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1a78a89b..15dedca3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,16 +10,30 @@ jobs: runs-on: ubuntu-latest steps: - - name: Build Repository - uses: billsonnn/nitro-react@master - env: - HOST: ${{ secrets.HOST }} - USERNAME: ${{ secrets.USERNAME }} - PORT: ${{ secrets.PORT }} - KEY: ${{ secrets.SSHKEY }} - with: - node-version: '14.x' - registry-url: 'https://registry.npmjs.org' - source: "." - target: "/var/www/nitrots.co/domains/prod.nitrots.co/html" - run: npm run build:prod + - name: Checkout Repository + uses: actions/checkout@v2 + with: + repository: 'billsonnn/nitro-react@dev' + - name: Install & Build + with: + node-version: '14.x' + registry-url: 'https://registry.npmjs.org' + run: | + npm i git+https://git@git.krews.org/nitro/nitro-renderer#dev + npm i + npm run build + - 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" From f156a0a91b9072d36affe83bda8e95e2a3c1fdff Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 16 Sep 2021 01:45:43 -0400 Subject: [PATCH 06/19] Test again --- .github/workflows/deploy.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 15dedca3..38f262f3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,9 +15,6 @@ jobs: with: repository: 'billsonnn/nitro-react@dev' - name: Install & Build - with: - node-version: '14.x' - registry-url: 'https://registry.npmjs.org' run: | npm i git+https://git@git.krews.org/nitro/nitro-renderer#dev npm i From 037a438ef7b9923232ea64bfd2e931c2015f7bb7 Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 16 Sep 2021 01:47:26 -0400 Subject: [PATCH 07/19] Deploy updates --- .github/workflows/deploy.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 38f262f3..59e9ccf2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,8 +12,6 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v2 - with: - repository: 'billsonnn/nitro-react@dev' - name: Install & Build run: | npm i git+https://git@git.krews.org/nitro/nitro-renderer#dev From 8542ff9633fa2770884baa67bee39371cde74557 Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 16 Sep 2021 01:56:04 -0400 Subject: [PATCH 08/19] Update deploy script again --- .github/workflows/deploy.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 59e9ccf2..1dcb893b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,6 +12,9 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '14' - name: Install & Build run: | npm i git+https://git@git.krews.org/nitro/nitro-renderer#dev From 0c8777b50e1e7030ae4e9cb4a003413cde2f0792 Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 16 Sep 2021 02:32:53 -0400 Subject: [PATCH 09/19] Try deploy again --- .github/workflows/deploy.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1dcb893b..59e9ccf2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,9 +12,6 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: '14' - name: Install & Build run: | npm i git+https://git@git.krews.org/nitro/nitro-renderer#dev From ad227fa2e43fe88682c86ba013370bebe51805d8 Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 16 Sep 2021 02:50:12 -0400 Subject: [PATCH 10/19] Update deploy --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 59e9ccf2..a52eff44 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,7 +7,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: self-hosted steps: - name: Checkout Repository From f0b10ec17db0d58d5942e37e78668ce0440756f8 Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 16 Sep 2021 03:09:42 -0400 Subject: [PATCH 11/19] Update deploy --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a52eff44..4f75d306 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,7 +16,7 @@ jobs: run: | npm i git+https://git@git.krews.org/nitro/nitro-renderer#dev npm i - npm run build + node --max-old-space-size=8192 node_modules/@craco/craco/bin/craco.js build - name: Archive Artifacts uses: actions/upload-artifact@v2 with: From 43e82c622c01960b82828bd948e1409157a6be36 Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 16 Sep 2021 03:22:51 -0400 Subject: [PATCH 12/19] Again --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4f75d306..d960239c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,7 +16,7 @@ jobs: run: | npm i git+https://git@git.krews.org/nitro/nitro-renderer#dev npm i - node --max-old-space-size=8192 node_modules/@craco/craco/bin/craco.js build + node node_modules/@craco/craco/bin/craco.js --max_old_space_size=4096 build - name: Archive Artifacts uses: actions/upload-artifact@v2 with: From d1897c79c3a39005660420e5586d2178e5f99f9d Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 16 Sep 2021 03:36:29 -0400 Subject: [PATCH 13/19] Again --- .eslintrc.js | 86 +++++++++++++++++++++++++++++ .github/workflows/deploy.yml | 2 +- package-lock.json | 57 -------------------- package.json | 101 +++-------------------------------- 4 files changed, 94 insertions(+), 152 deletions(-) create mode 100644 .eslintrc.js 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 index d960239c..78318e26 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,7 +16,7 @@ jobs: run: | npm i git+https://git@git.krews.org/nitro/nitro-renderer#dev npm i - node node_modules/@craco/craco/bin/craco.js --max_old_space_size=4096 build + npm run build:prod - name: Archive Artifacts uses: actions/upload-artifact@v2 with: diff --git a/package-lock.json b/package-lock.json index 0f2a0fe4..9effa8d0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1152,55 +1152,6 @@ "minimist": "^1.2.0" } }, - "@craco/craco": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/@craco/craco/-/craco-6.3.0.tgz", - "integrity": "sha512-SCnfEQxT/6NAbU/3sIWw7gQXtzjjiTp/EZFdJTd8inPURILIy0YajrC2p8qBG2KhFo5cwgOrEDyaGyAFvvuyuA==", - "requires": { - "cross-spawn": "^7.0.0", - "lodash": "^4.17.15", - "semver": "^7.3.2", - "webpack-merge": "^4.2.2" - }, - "dependencies": { - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "requires": { - "isexe": "^2.0.0" - } - } - } - }, "@csstools/convert-colors": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/@csstools/convert-colors/-/convert-colors-1.4.0.tgz", @@ -18859,14 +18810,6 @@ } } }, - "webpack-merge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.2.2.tgz", - "integrity": "sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g==", - "requires": { - "lodash": "^4.17.15" - } - }, "webpack-sources": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", diff --git a/package.json b/package.json index bd043db6..e523d8f4 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,14 @@ "name": "nitro-react", "version": "0.1.0", "private": true, + "scripts": { + "start": "react-scripts start", + "build": "react-scripts --max_old_space_size=4096 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" + }, "dependencies": { - "@craco/craco": "^6.3.0", "@nitrots/nitro-renderer": "file:../nitro-renderer", "animate.css": "^4.1.1", "classnames": "^2.3.1", @@ -18,99 +24,6 @@ "typescript": "^4.3.5", "web-vitals": "^1.1.2" }, - "scripts": { - "start": "craco start", - "build": "craco build", - "build:prod": "npm i git+https://git@git.krews.org/nitro/nitro-renderer#dev && npm i && npm run build", - "test": "craco 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" - ] - } - }, "devDependencies": { "@testing-library/jest-dom": "^5.14.1", "@testing-library/react": "^11.2.7", From a4805c1514b5319a26e5a9893f557d06079a29ab Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 16 Sep 2021 03:43:43 -0400 Subject: [PATCH 14/19] Update deploy --- .github/workflows/deploy.yml | 2 -- package.json | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 78318e26..bb163dd8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,8 +14,6 @@ jobs: uses: actions/checkout@v2 - name: Install & Build run: | - npm i git+https://git@git.krews.org/nitro/nitro-renderer#dev - npm i npm run build:prod - name: Archive Artifacts uses: actions/upload-artifact@v2 diff --git a/package.json b/package.json index e523d8f4..c2e8ba1b 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "start": "react-scripts start", - "build": "react-scripts --max_old_space_size=4096 build", + "build": "react-scripts --max_old_space_size=8048 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" From eec9c0a0e1b7c3a84e4d41e0fc98874e47e5456a Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 16 Sep 2021 03:45:36 -0400 Subject: [PATCH 15/19] Update --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c2e8ba1b..3b3ffc65 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "start": "react-scripts start", "build": "react-scripts --max_old_space_size=8048 build", - "build:prod": "npm i git+https://git@git.krews.org/nitro/nitro-renderer#dev && npm i && npm run 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" }, From 3a78daf03d655c9fdd8402fcd9ce56491a3bf22b Mon Sep 17 00:00:00 2001 From: MyNameIsBatman Date: Thu, 16 Sep 2021 09:35:19 -0300 Subject: [PATCH 16/19] Purse Short Number toggle --- public/ui-config.json | 1 + src/api/utils/LocalizeFormattedNumber.ts | 6 ++++++ src/api/utils/index.ts | 1 + src/views/purse/PurseView.tsx | 11 +++++++--- .../purse/views/currency/CurrencyView.tsx | 21 ++++++++++++------- .../views/currency/CurrencyView.types.ts | 1 + .../purse/views/seasonal/SeasonalView.tsx | 4 ++-- 7 files changed, 33 insertions(+), 12 deletions(-) create mode 100644 src/api/utils/LocalizeFormattedNumber.ts 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/views/purse/PurseView.tsx b/src/views/purse/PurseView.tsx index 3b1c5c56..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,7 +128,7 @@ export const PurseView: FC<{}> = props =>
- + { getCurrencyElements(0, 2) }
diff --git a/src/views/purse/views/currency/CurrencyView.tsx b/src/views/purse/views/currency/CurrencyView.tsx index 63783a42..f4450e78 100644 --- a/src/views/purse/views/currency/CurrencyView.tsx +++ b/src/views/purse/views/currency/CurrencyView.tsx @@ -1,13 +1,23 @@ -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 ( = props => { 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.tsx b/src/views/purse/views/seasonal/SeasonalView.tsx index 3758c71c..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'; @@ -11,7 +11,7 @@ export const SeasonalView: FC = props =>
{ LocalizeText(`purse.seasonal.currency.${ type }`) } - { LocalizeShortNumber(amount) } + { LocalizeFormattedNumber(amount) }
From 24e06192781e8f3e4cd85c3c36b97fa311b6cd78 Mon Sep 17 00:00:00 2001 From: MyNameIsBatman Date: Thu, 16 Sep 2021 09:36:54 -0300 Subject: [PATCH 17/19] Fix Purse tooltip --- src/views/purse/views/currency/CurrencyView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/purse/views/currency/CurrencyView.tsx b/src/views/purse/views/currency/CurrencyView.tsx index f4450e78..589eb03e 100644 --- a/src/views/purse/views/currency/CurrencyView.tsx +++ b/src/views/purse/views/currency/CurrencyView.tsx @@ -23,7 +23,7 @@ export const CurrencyView: FC = props => placement="left" overlay={ - { amount } + { LocalizeFormattedNumber(amount) } }> { element } From 3539d0e6bfde721229fc81e880eaac108a07645f Mon Sep 17 00:00:00 2001 From: MyNameIsBatman Date: Thu, 16 Sep 2021 10:07:33 -0300 Subject: [PATCH 18/19] Color swatch updates --- .../groups/views/creator/GroupCreatorView.scss | 6 +++--- .../groups/views/manager/GroupManagerView.scss | 6 +++--- .../tab-badge/GroupSharedTabBadgeView.scss | 13 +++++++++++-- .../tab-badge/GroupSharedTabBadgeView.tsx | 2 +- .../tab-colors/GroupSharedTabColorsView.scss | 8 +++++++- .../tab-colors/GroupSharedTabColorsView.tsx | 5 +++-- .../furniture/dimmer/FurnitureDimmerView.scss | 6 ++++++ .../furniture/dimmer/FurnitureDimmerView.tsx | 3 ++- 8 files changed, 36 insertions(+), 13 deletions(-) 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/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/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] }}>
; }) }
}
From 7e4b332711d7619866162b30acbcce0db537e492 Mon Sep 17 00:00:00 2001 From: MyNameIsBatman Date: Thu, 16 Sep 2021 10:23:54 -0300 Subject: [PATCH 19/19] Fix GroupRoomInformationView layout --- .../views/room-information/GroupRoomInformationView.scss | 6 +++--- .../views/room-information/GroupRoomInformationView.tsx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) 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()) && - }