From 29ba30c17ad959c73cfb80382625fa278a59ca8a Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Wed, 24 Jul 2024 16:17:06 +0200 Subject: [PATCH 1/8] auto-deployment, install new node js version with nvm --- deployment/bare_metal/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/bare_metal/start.sh b/deployment/bare_metal/start.sh index 5bdf10547..c6c948105 100755 --- a/deployment/bare_metal/start.sh +++ b/deployment/bare_metal/start.sh @@ -214,7 +214,7 @@ echo 'Updating admin' >> $UPDATE_HTML cd $PROJECT_ROOT/admin # TODO maybe handle this differently? unset NODE_ENV -nvm use +nvm install npm i -g yarn yarn install yarn build From bac0a7168cd1b3801784fa885a90331cf66a4e9c Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Wed, 24 Jul 2024 16:24:13 +0200 Subject: [PATCH 2/8] fix bug in auto-deployment --- deployment/bare_metal/start.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/deployment/bare_metal/start.sh b/deployment/bare_metal/start.sh index c6c948105..ef65ffcda 100755 --- a/deployment/bare_metal/start.sh +++ b/deployment/bare_metal/start.sh @@ -214,6 +214,7 @@ echo 'Updating admin' >> $UPDATE_HTML cd $PROJECT_ROOT/admin # TODO maybe handle this differently? unset NODE_ENV +nvm use nvm install npm i -g yarn yarn install From 0728afc75b5d779827fec852391a2e36d5d002b1 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Wed, 24 Jul 2024 16:55:38 +0200 Subject: [PATCH 3/8] use only for admin another nodejs version and switch back to default (16) after. --- deployment/bare_metal/start.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/deployment/bare_metal/start.sh b/deployment/bare_metal/start.sh index ef65ffcda..a131c14ac 100755 --- a/deployment/bare_metal/start.sh +++ b/deployment/bare_metal/start.sh @@ -219,6 +219,7 @@ nvm install npm i -g yarn yarn install yarn build +nvm use default # TODO maybe handle this differently? export NODE_ENV=production From a8fdc5e94a2001afddb739d2c6bdc6fdbdf4c8e0 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Wed, 24 Jul 2024 17:30:25 +0200 Subject: [PATCH 4/8] next try --- deployment/bare_metal/start.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/deployment/bare_metal/start.sh b/deployment/bare_metal/start.sh index a131c14ac..3fe99bd50 100755 --- a/deployment/bare_metal/start.sh +++ b/deployment/bare_metal/start.sh @@ -16,6 +16,7 @@ set +o allexport # enable nvm export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" +nvm use default # NOTE: all config values will be in process.env when starting # the services and will therefore take precedence over the .env @@ -204,6 +205,9 @@ echo 'Updating frontend' >> $UPDATE_HTML cd $PROJECT_ROOT/frontend # TODO maybe handle this differently? unset NODE_ENV +nvm use +nvm install +npm i -g yarn yarn install yarn build # TODO maybe handle this differently? @@ -219,10 +223,11 @@ nvm install npm i -g yarn yarn install yarn build -nvm use default # TODO maybe handle this differently? export NODE_ENV=production +nvm use default + # Install & build dht-node echo 'Updating dht-node' >> $UPDATE_HTML cd $PROJECT_ROOT/dht-node @@ -243,6 +248,7 @@ yarn build # TODO maybe handle this differently? export NODE_ENV=production +nvm use default # start after building all to use up less ressources pm2 start --name gradido-backend "yarn --cwd $PROJECT_ROOT/backend start" -l $GRADIDO_LOG_PATH/pm2.backend.$TODAY.log --log-date-format 'YYYY-MM-DD HH:mm:ss.SSS' #pm2 start --name gradido-frontend "yarn --cwd $PROJECT_ROOT/frontend start" -l $GRADIDO_LOG_PATH/pm2.frontend.$TODAY.log --log-date-format 'YYYY-MM-DD HH:mm:ss.SSS' From 61638fad64f3191cbd3319da9dc17de547d51821 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Micha=C5=82owski?= Date: Thu, 25 Jul 2024 15:41:53 +0200 Subject: [PATCH 5/8] feat(admin): Automatic Contributions fixed --- .../ContributionLink/ContributionLinkList.vue | 173 ++++++++++-------- admin/src/components/FigureQrCode.vue | 28 +-- admin/yarn.lock | 2 +- 3 files changed, 108 insertions(+), 95 deletions(-) diff --git a/admin/src/components/ContributionLink/ContributionLinkList.vue b/admin/src/components/ContributionLink/ContributionLinkList.vue index d22ef3af9..009746611 100644 --- a/admin/src/components/ContributionLink/ContributionLinkList.vue +++ b/admin/src/components/ContributionLink/ContributionLinkList.vue @@ -1,12 +1,12 @@ - diff --git a/admin/src/components/FigureQrCode.vue b/admin/src/components/FigureQrCode.vue index 353c0d87d..edea28ad8 100644 --- a/admin/src/components/FigureQrCode.vue +++ b/admin/src/components/FigureQrCode.vue @@ -1,7 +1,7 @@ @@ -18,26 +18,26 @@ export default { }, data() { return { - options: { + image: null, + showQr: false, + } + }, + computed: { + qrOptions() { + return { cellSize: 8, correctLevel: 'H', data: this.link, - logo: { - image: null, - }, - }, - } + logo: { image: this.image }, + } + }, }, created() { const image = new Image() - image.src = 'img/gdd-coin.png' + image.src = '/img/gdd-coin.png' image.onload = () => { - this.options = { - ...this.options, - logo: { - image, - }, - } + this.image = image + this.showQr = true } }, } diff --git a/admin/yarn.lock b/admin/yarn.lock index c64a17612..8f1707178 100644 --- a/admin/yarn.lock +++ b/admin/yarn.lock @@ -8279,7 +8279,7 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== -qrcanvas-vue@3.0.0: +qrcanvas-vue@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/qrcanvas-vue/-/qrcanvas-vue-3.0.0.tgz#4bdba09b8050bcc0880d8859b5835cc4b2919248" integrity sha512-B7LgAyOEJWf8Bz0y2J8M0OXE77uNWcH7PWr6q8ihyuQE5NP9zopY9wJGTZIT6Mu7oEOczPHMLDedZqFCT2Qxdw== From a049dc823069f8fd7328a324070b13ba7ed411ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Micha=C5=82owski?= Date: Thu, 25 Jul 2024 15:43:43 +0200 Subject: [PATCH 6/8] feat(admin): Automatic Contributions remove unused code --- .../ContributionLink/ContributionLink.vue | 50 --------- .../ContributionLink/ContributionLinkForm.vue | 103 +----------------- 2 files changed, 1 insertion(+), 152 deletions(-) diff --git a/admin/src/components/ContributionLink/ContributionLink.vue b/admin/src/components/ContributionLink/ContributionLink.vue index 6440b5eaa..ee18bbee2 100644 --- a/admin/src/components/ContributionLink/ContributionLink.vue +++ b/admin/src/components/ContributionLink/ContributionLink.vue @@ -43,56 +43,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->