From 8e33d3e4c88e4091836844ceb8f006714949809e Mon Sep 17 00:00:00 2001 From: dank074 Date: Thu, 16 Sep 2021 17:28:51 -0500 Subject: [PATCH 01/14] Update deploy.yml --- .github/workflows/deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bb163dd8..a9b7f856 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,6 +10,8 @@ jobs: runs-on: self-hosted steps: + - name: cleanup + run: sudo chown -R $USER:$USER /home/github/actions-runner/_work/nitro-react - name: Checkout Repository uses: actions/checkout@v2 - name: Install & Build From e8ec8953aef7481e890383b692629085723768dd Mon Sep 17 00:00:00 2001 From: dank074 Date: Thu, 16 Sep 2021 17:32:57 -0500 Subject: [PATCH 02/14] Update deploy.yml --- .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 a9b7f856..6f1e3438 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,7 +11,7 @@ jobs: steps: - name: cleanup - run: sudo chown -R $USER:$USER /home/github/actions-runner/_work/nitro-react + run: echo ${{secrets.DEPLOY_PASSWORD}} | sudo -S chown -R $USER:$USER /home/github/actions-runner/_work/nitro-react - name: Checkout Repository uses: actions/checkout@v2 - name: Install & Build From d3823227d15450e3f2161bf44739032032333093 Mon Sep 17 00:00:00 2001 From: dank074 Date: Thu, 16 Sep 2021 17:46:13 -0500 Subject: [PATCH 03/14] undo changes to deploy.yml --- .github/workflows/deploy.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6f1e3438..bb163dd8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,8 +10,6 @@ jobs: runs-on: self-hosted steps: - - name: cleanup - run: echo ${{secrets.DEPLOY_PASSWORD}} | sudo -S chown -R $USER:$USER /home/github/actions-runner/_work/nitro-react - name: Checkout Repository uses: actions/checkout@v2 - name: Install & Build From 772bda8e07cd7a5fcbf77c459471d29056a19b05 Mon Sep 17 00:00:00 2001 From: dank074 Date: Thu, 16 Sep 2021 17:56:18 -0500 Subject: [PATCH 04/14] try non-self hosted --- .github/workflows/deploy.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bb163dd8..8eecf65d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,11 +7,18 @@ on: jobs: build: - runs-on: self-hosted + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [15.x] steps: - name: Checkout Repository uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} - name: Install & Build run: | npm run build:prod From 04185f670254abd60fa8ee3a473694bba4a1877f Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 16 Sep 2021 23:16:54 -0400 Subject: [PATCH 05/14] Fix deploy again --- craco.config.js | 22 ++++++++++++++++++ package-lock.json | 57 +++++++++++++++++++++++++++++++++++++++++++++++ package.json | 7 +++--- 3 files changed, 83 insertions(+), 3 deletions(-) diff --git a/craco.config.js b/craco.config.js index 48a9bf86..e29aacfa 100644 --- a/craco.config.js +++ b/craco.config.js @@ -1,5 +1,27 @@ module.exports = { eslint: { enabled: false + }, + webpack: { + configure: (webpackConfig) => ({ + ...webpackConfig, + module: { + ...webpackConfig.module, + rules: webpackConfig.module.rules.map((rule) => + { + if(!rule.oneOf) return rule; + + return { + ...rule, + oneOf: rule.oneOf.map((ruleObject) => + { + if(!new RegExp(ruleObject.test).test('.ts') || !ruleObject.include) return ruleObject; + + return { ...ruleObject, include: undefined }; + }) + }; + }) + } + }) } } 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 3b3ffc65..3277a368 100644 --- a/package.json +++ b/package.json @@ -3,13 +3,14 @@ "version": "0.1.0", "private": true, "scripts": { - "start": "react-scripts start", - "build": "react-scripts --max_old_space_size=8048 build", + "start": "craco start", + "build": "craco --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", + "test": "craco 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", From 86edf1ddda53b6467f5ffd809cf50b48abab12b3 Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 16 Sep 2021 23:18:03 -0400 Subject: [PATCH 06/14] Fix trophy css --- src/layout/trophy/NitroLayoutTrophyView.scss | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/layout/trophy/NitroLayoutTrophyView.scss b/src/layout/trophy/NitroLayoutTrophyView.scss index ded18038..edcc05f8 100644 --- a/src/layout/trophy/NitroLayoutTrophyView.scss +++ b/src/layout/trophy/NitroLayoutTrophyView.scss @@ -2,8 +2,6 @@ position: relative; width: 340px; height: 173px; - top: 25px; - left: 25px; color: black; background-position: 0px 0px; From 779e2c6b3ebeb22ca256239a254573a269949e94 Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 16 Sep 2021 23:20:10 -0400 Subject: [PATCH 07/14] Update card tabs css --- src/layout/card/tabs/NitroCardTabsView.scss | 1 + src/layout/card/tabs/NitroCardTabsView.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/layout/card/tabs/NitroCardTabsView.scss b/src/layout/card/tabs/NitroCardTabsView.scss index dbfa4ff9..60874fa6 100644 --- a/src/layout/card/tabs/NitroCardTabsView.scss +++ b/src/layout/card/tabs/NitroCardTabsView.scss @@ -1,6 +1,7 @@ .nitro-card-tabs { min-height: $nitro-card-tabs-height; max-height: $nitro-card-tabs-height; + border-bottom: $nav-tabs-border-width solid $nav-tabs-border-color; @import './tabs-item/NitroCardTabsItemView'; } diff --git a/src/layout/card/tabs/NitroCardTabsView.tsx b/src/layout/card/tabs/NitroCardTabsView.tsx index cf49777d..eb69565b 100644 --- a/src/layout/card/tabs/NitroCardTabsView.tsx +++ b/src/layout/card/tabs/NitroCardTabsView.tsx @@ -5,7 +5,7 @@ export const NitroCardTabsView: FC = props => { return (
-
    +
      { props.children }
From a0ac6405c2bce62d1a679313d774b2446a6992d8 Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 16 Sep 2021 23:20:23 -0400 Subject: [PATCH 08/14] Fix navigator tab null issue --- src/views/navigator/NavigatorView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/navigator/NavigatorView.tsx b/src/views/navigator/NavigatorView.tsx index 49c05fae..892fa2ae 100644 --- a/src/views/navigator/NavigatorView.tsx +++ b/src/views/navigator/NavigatorView.tsx @@ -221,7 +221,7 @@ export const NavigatorView: FC = props => setIsVisible(false) } /> - { topLevelContexts.map((context, index) => + { topLevelContexts && (topLevelContexts.length > 0) && topLevelContexts.map((context, index) => { return ( sendSearch('', context.code) }> From bb901a0519d3d608259761ea442a751711990cd5 Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 16 Sep 2021 23:30:30 -0400 Subject: [PATCH 09/14] Try 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 8eecf65d..7f9231e5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [15.x] + node-version: [14.x] steps: - name: Checkout Repository From 464ac14a9d3deba40de0b63dd9c80cc8e9f581be Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 16 Sep 2021 23:31:22 -0400 Subject: [PATCH 10/14] Change runner to self hosted --- .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 7f9231e5..b1139443 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 strategy: matrix: node-version: [14.x] From 53d21582c4b43c63cde5b10f19d410ce89bf94fd Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 16 Sep 2021 23:47:07 -0400 Subject: [PATCH 11/14] Try again --- craco.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/craco.config.js b/craco.config.js index e29aacfa..661daecc 100644 --- a/craco.config.js +++ b/craco.config.js @@ -1,6 +1,6 @@ module.exports = { eslint: { - enabled: false + enable: false }, webpack: { configure: (webpackConfig) => ({ From 073ff1f24cd8b5f8f0fcbdcfdfb1a66a0da321a2 Mon Sep 17 00:00:00 2001 From: Bill Date: Fri, 17 Sep 2021 00:49:15 -0400 Subject: [PATCH 12/14] Update deploy script --- .github/workflows/deploy.yml | 37 ++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b1139443..074f19a8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,21 +19,34 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - - name: Install & Build + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: '~/.npm' + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + - name: Reinstall @nitrots/nitro-renderer run: | - npm run build:prod + npm uninstall @nitrots/nitro-renderer + npm install git+https://git@git.krews.org/nitro/nitro-renderer#dev + - name: Install dependencies + run: | + npm install + - name: Build Nitro + run: | + 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" + - name: Deploy Artifacts + uses: easingthemes/ssh-deploy@main + env: + REMOTE_HOST: ${{ secrets.HOST }} + REMOTE_PORT: ${{ secrets.PORT }} + REMOTE_USER: ${{ secrets.USERNAME }} + SSH_PRIVATE_KEY: ${{ secrets.SSHKEY }} + SOURCE: "build/" + TARGET: ${{ secrets.TARGET }} From 796e5db130905b55aef4fa37e068ac1887c7ad08 Mon Sep 17 00:00:00 2001 From: Bill Date: Fri, 17 Sep 2021 01:02:03 -0400 Subject: [PATCH 13/14] Update deploy --- .github/workflows/deploy.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 074f19a8..44ef9068 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,13 +26,10 @@ jobs: key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node- - - name: Reinstall @nitrots/nitro-renderer + - name: Install dependencies run: | npm uninstall @nitrots/nitro-renderer npm install git+https://git@git.krews.org/nitro/nitro-renderer#dev - - name: Install dependencies - run: | - npm install - name: Build Nitro run: | npm run build From c7a5170c2208dc439c88868e09674ac1249943ed Mon Sep 17 00:00:00 2001 From: Layne Date: Sat, 18 Sep 2021 01:27:31 -0400 Subject: [PATCH 14/14] new header ig --- .../card/content/NitroCardContentView.scss | 6 ----- .../card/header/NitroCardHeaderView.scss | 25 ++++++++++++------- .../card/header/NitroCardHeaderView.tsx | 4 +-- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/layout/card/content/NitroCardContentView.scss b/src/layout/card/content/NitroCardContentView.scss index c681fd34..9ffd6fe9 100644 --- a/src/layout/card/content/NitroCardContentView.scss +++ b/src/layout/card/content/NitroCardContentView.scss @@ -2,15 +2,9 @@ padding-top: $container-padding-x; padding-bottom: $container-padding-x; overflow: auto; - - &.simple { - padding-left: ($container-padding-x + 25px); - padding-right: ($container-padding-x + 25px); - } } @include media-breakpoint-down(lg) { - .content-area { height: 100% !important; min-height: auto !important; diff --git a/src/layout/card/header/NitroCardHeaderView.scss b/src/layout/card/header/NitroCardHeaderView.scss index b3142be8..b81b748e 100644 --- a/src/layout/card/header/NitroCardHeaderView.scss +++ b/src/layout/card/header/NitroCardHeaderView.scss @@ -2,7 +2,6 @@ min-height: 33px; max-height: 33px; white-space: nowrap; - overflow: hidden; .header-text { margin: 0 35px; @@ -10,19 +9,22 @@ &.simple-header { min-height: 28px; - max-height: 28px; + + .header-close { + font-size: 12px; + } } .bg-tertiary-split { position: relative; - border: 2px solid darken($quaternary, 4); - box-shadow: 0 0 0 2px $white; + border-bottom: 2px solid darken($quaternary, 5); + box-shadow: 0 2px white; width: 100%; - margin: 0 25px; + margin: 0; &:before { position: absolute; - content: ' '; + content: " "; top: 0; left: 0; width: 100%; @@ -36,15 +38,20 @@ border-radius: $border-radius; box-shadow: 0 0 0 1.5px $white; border: 2px solid #921911; - background: repeating-linear-gradient(rgba(245,80,65,1), rgba(245,80,65,1) 50%, rgba(194,48,39,1) 50%, rgba(194,48,39,1) 100%); + background: repeating-linear-gradient( + rgba(245, 80, 65, 1), + rgba(245, 80, 65, 1) 50%, + rgba(194, 48, 39, 1) 50%, + rgba(194, 48, 39, 1) 100% + ); cursor: pointer; line-height: 1; padding: 1px 3px; - + &:hover { filter: brightness(1.2); } - + &:active { filter: brightness(0.8); } diff --git a/src/layout/card/header/NitroCardHeaderView.tsx b/src/layout/card/header/NitroCardHeaderView.tsx index 3be15c6d..b964fe46 100644 --- a/src/layout/card/header/NitroCardHeaderView.tsx +++ b/src/layout/card/header/NitroCardHeaderView.tsx @@ -18,8 +18,8 @@ export const NitroCardHeaderView: FC = props => return (
-
-
{ headerText }
+
+
{ headerText }