From be78fc177dadaaff0609384a2f4e1e46189d94f7 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sat, 13 Nov 2021 15:43:34 +0100 Subject: [PATCH 01/10] fix: don't try to deploy a review env when not a pr --- .drone.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 8b3514247..87185436c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -151,6 +151,10 @@ steps: - node ./scripts/deploy-preview-netlify.js depends_on: - build-prod + when: + branch: + exclude: + - main --- kind: pipeline @@ -651,6 +655,6 @@ steps: from_secret: crowdin_key --- kind: signature -hmac: b343ca4448b29bcd26ba9888fa67926040b2f420d891b62e2e74ce487557c58c +hmac: 255ff4485be7c8577e82b2bb0c1736800b78470ca674e2fe380317e8c7098c06 ... From b5927be136135594eed8090a8ff4881fa6fdc663 Mon Sep 17 00:00:00 2001 From: renovate Date: Sat, 13 Nov 2021 15:13:09 +0000 Subject: [PATCH 02/10] chore(deps): pin dependency vite-svg-loader to 3.1.0 (#989) Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/989 Co-authored-by: renovate Co-committed-by: renovate --- package.json | 2 +- yarn.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1fea18f54..5453bccdd 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "vite": "2.6.14", "vite-plugin-pwa": "0.11.3", "vue-tsc": "0.29.4", - "vite-svg-loader": "^3.1.0", + "vite-svg-loader": "3.1.0", "wait-on": "6.0.0", "workbox-cli": "6.3.0" }, diff --git a/yarn.lock b/yarn.lock index 5368a2af4..f224420ec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13244,7 +13244,7 @@ vite-plugin-pwa@0.11.3: workbox-build "^6.3.0" workbox-window "^6.3.0" -vite-svg-loader@^3.1.0: +vite-svg-loader@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/vite-svg-loader/-/vite-svg-loader-3.1.0.tgz#58d4ed5785583afce10059125467f8bf803e3183" integrity sha512-dcxLJPQXC3e2/HYrKjOi0fEIzP+Wcny1PhOTsYhnZcqLIhyjAHkMeZwWl9jXC3u+QpUZy4TyLgVnBPuiok3BUA== From 9a499f68e89b11e1de72ed065b3a69bce17492a0 Mon Sep 17 00:00:00 2001 From: drone Date: Sat, 13 Nov 2021 15:24:30 +0000 Subject: [PATCH 03/10] [skip ci] Updated translations via Crowdin --- src/i18n/lang/cs-CZ.json | 4 +++- src/i18n/lang/de-DE.json | 4 +++- src/i18n/lang/de-swiss.json | 4 +++- src/i18n/lang/es-ES.json | 4 +++- src/i18n/lang/fr-FR.json | 4 +++- src/i18n/lang/it-IT.json | 4 +++- src/i18n/lang/nl-NL.json | 4 +++- src/i18n/lang/pt-BR.json | 4 +++- src/i18n/lang/pt-PT.json | 4 +++- src/i18n/lang/ro-RO.json | 4 +++- src/i18n/lang/ru-RU.json | 4 +++- src/i18n/lang/tr-TR.json | 4 +++- src/i18n/lang/vi-VN.json | 4 +++- 13 files changed, 39 insertions(+), 13 deletions(-) diff --git a/src/i18n/lang/cs-CZ.json b/src/i18n/lang/cs-CZ.json index dc83c00ae..a1e258c5f 100644 --- a/src/i18n/lang/cs-CZ.json +++ b/src/i18n/lang/cs-CZ.json @@ -449,7 +449,9 @@ "saved": "Uloženo!", "default": "Výchozí", "close": "Zavřít", - "download": "Stáhnout" + "download": "Stáhnout", + "showMenu": "Show the menu", + "hideMenu": "Hide the menu" }, "input": { "resetColor": "Obnovit barvu", diff --git a/src/i18n/lang/de-DE.json b/src/i18n/lang/de-DE.json index 1517e8b65..1099b888b 100644 --- a/src/i18n/lang/de-DE.json +++ b/src/i18n/lang/de-DE.json @@ -449,7 +449,9 @@ "saved": "Gespeichert!", "default": "Standard", "close": "Schließen", - "download": "Herunterladen" + "download": "Herunterladen", + "showMenu": "Show the menu", + "hideMenu": "Hide the menu" }, "input": { "resetColor": "Farbe zurücksetzen", diff --git a/src/i18n/lang/de-swiss.json b/src/i18n/lang/de-swiss.json index 76b7af094..ff967c583 100644 --- a/src/i18n/lang/de-swiss.json +++ b/src/i18n/lang/de-swiss.json @@ -449,7 +449,9 @@ "saved": "Gspeicheret!", "default": "Standard", "close": "Schlüüse", - "download": "Herunterladen" + "download": "Herunterladen", + "showMenu": "Show the menu", + "hideMenu": "Hide the menu" }, "input": { "resetColor": "Farb zruggsetze", diff --git a/src/i18n/lang/es-ES.json b/src/i18n/lang/es-ES.json index e8fd95bd1..2f3dfe28f 100644 --- a/src/i18n/lang/es-ES.json +++ b/src/i18n/lang/es-ES.json @@ -449,7 +449,9 @@ "saved": "Saved!", "default": "Default", "close": "Close", - "download": "Download" + "download": "Download", + "showMenu": "Show the menu", + "hideMenu": "Hide the menu" }, "input": { "resetColor": "Reset Color", diff --git a/src/i18n/lang/fr-FR.json b/src/i18n/lang/fr-FR.json index 364b38729..e157db469 100644 --- a/src/i18n/lang/fr-FR.json +++ b/src/i18n/lang/fr-FR.json @@ -449,7 +449,9 @@ "saved": "Enregistré !", "default": "Par défaut", "close": "Fermer", - "download": "Télécharger" + "download": "Télécharger", + "showMenu": "Show the menu", + "hideMenu": "Hide the menu" }, "input": { "resetColor": "Réinitialiser la couleur", diff --git a/src/i18n/lang/it-IT.json b/src/i18n/lang/it-IT.json index e42f66641..6a6c84f0f 100644 --- a/src/i18n/lang/it-IT.json +++ b/src/i18n/lang/it-IT.json @@ -449,7 +449,9 @@ "saved": "Salvato!", "default": "Predefinito", "close": "Chiudi", - "download": "Scarica" + "download": "Scarica", + "showMenu": "Show the menu", + "hideMenu": "Hide the menu" }, "input": { "resetColor": "Ripristina Colore", diff --git a/src/i18n/lang/nl-NL.json b/src/i18n/lang/nl-NL.json index e8fd95bd1..2f3dfe28f 100644 --- a/src/i18n/lang/nl-NL.json +++ b/src/i18n/lang/nl-NL.json @@ -449,7 +449,9 @@ "saved": "Saved!", "default": "Default", "close": "Close", - "download": "Download" + "download": "Download", + "showMenu": "Show the menu", + "hideMenu": "Hide the menu" }, "input": { "resetColor": "Reset Color", diff --git a/src/i18n/lang/pt-BR.json b/src/i18n/lang/pt-BR.json index e8fd95bd1..2f3dfe28f 100644 --- a/src/i18n/lang/pt-BR.json +++ b/src/i18n/lang/pt-BR.json @@ -449,7 +449,9 @@ "saved": "Saved!", "default": "Default", "close": "Close", - "download": "Download" + "download": "Download", + "showMenu": "Show the menu", + "hideMenu": "Hide the menu" }, "input": { "resetColor": "Reset Color", diff --git a/src/i18n/lang/pt-PT.json b/src/i18n/lang/pt-PT.json index e8fd95bd1..2f3dfe28f 100644 --- a/src/i18n/lang/pt-PT.json +++ b/src/i18n/lang/pt-PT.json @@ -449,7 +449,9 @@ "saved": "Saved!", "default": "Default", "close": "Close", - "download": "Download" + "download": "Download", + "showMenu": "Show the menu", + "hideMenu": "Hide the menu" }, "input": { "resetColor": "Reset Color", diff --git a/src/i18n/lang/ro-RO.json b/src/i18n/lang/ro-RO.json index e8fd95bd1..2f3dfe28f 100644 --- a/src/i18n/lang/ro-RO.json +++ b/src/i18n/lang/ro-RO.json @@ -449,7 +449,9 @@ "saved": "Saved!", "default": "Default", "close": "Close", - "download": "Download" + "download": "Download", + "showMenu": "Show the menu", + "hideMenu": "Hide the menu" }, "input": { "resetColor": "Reset Color", diff --git a/src/i18n/lang/ru-RU.json b/src/i18n/lang/ru-RU.json index c85f8c3c5..19b8aad5c 100644 --- a/src/i18n/lang/ru-RU.json +++ b/src/i18n/lang/ru-RU.json @@ -449,7 +449,9 @@ "saved": "Сохранено!", "default": "По умолчанию", "close": "Закрыть", - "download": "Скачать" + "download": "Скачать", + "showMenu": "Show the menu", + "hideMenu": "Hide the menu" }, "input": { "resetColor": "Сбросить цвет", diff --git a/src/i18n/lang/tr-TR.json b/src/i18n/lang/tr-TR.json index e8fd95bd1..2f3dfe28f 100644 --- a/src/i18n/lang/tr-TR.json +++ b/src/i18n/lang/tr-TR.json @@ -449,7 +449,9 @@ "saved": "Saved!", "default": "Default", "close": "Close", - "download": "Download" + "download": "Download", + "showMenu": "Show the menu", + "hideMenu": "Hide the menu" }, "input": { "resetColor": "Reset Color", diff --git a/src/i18n/lang/vi-VN.json b/src/i18n/lang/vi-VN.json index c150d71f9..bdf0670ea 100644 --- a/src/i18n/lang/vi-VN.json +++ b/src/i18n/lang/vi-VN.json @@ -449,7 +449,9 @@ "saved": "Đã lưu!", "default": "Mặc định", "close": "Đóng", - "download": "Tải về" + "download": "Tải về", + "showMenu": "Show the menu", + "hideMenu": "Hide the menu" }, "input": { "resetColor": "Đặt lại màu", From 03eee061ff96a4803a1fbe0d2ec409a5f3cc52f7 Mon Sep 17 00:00:00 2001 From: konrad Date: Sat, 13 Nov 2021 15:36:53 +0000 Subject: [PATCH 04/10] fix: preview deploy for PRs (#990) Co-authored-by: kolaente Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/990 Co-authored-by: konrad Co-committed-by: konrad --- .drone.yml | 8 ++++---- netlify.toml | 12 ++++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 87185436c..0553195be 100644 --- a/.drone.yml +++ b/.drone.yml @@ -152,9 +152,9 @@ steps: depends_on: - build-prod when: - branch: - exclude: - - main + event: + include: + - pull_request --- kind: pipeline @@ -655,6 +655,6 @@ steps: from_secret: crowdin_key --- kind: signature -hmac: 255ff4485be7c8577e82b2bb0c1736800b78470ca674e2fe380317e8c7098c06 +hmac: 15df446c7e93a881249d46273485183386157229ee6a37b1ed0fcb2a0b32bbe2 ... diff --git a/netlify.toml b/netlify.toml index c549a3ca6..24ee45e7f 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,3 +1,15 @@ [build] command = "yarn build" publish = "dist" + +[[redirects]] + from = "/*" + to = "/index.html" + status = 200 + +[[headers]] + for = "/*" + [headers.values] + X-Frame-Options = "DENY" + X-XSS-Protection = "1; mode=block" + X-Robots-Tag = "noindex" From 73651ef964af57e717d6449fb7d5937028539c58 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sat, 13 Nov 2021 17:28:56 +0100 Subject: [PATCH 05/10] feat: remove ssl generation from docker image --- Dockerfile | 6 ------ nginx.conf | 4 ---- 2 files changed, 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index d73a4fe80..159930f6a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,12 +24,6 @@ RUN \ # Stage 2: copy FROM nginx -RUN apt-get update && apt-get install -y apt-utils openssl && \ - mkdir -p /etc/nginx/ssl && \ - openssl genrsa -out /etc/nginx/ssl/dummy.key 2048 && \ - openssl req -new -key /etc/nginx/ssl/dummy.key -out /etc/nginx/ssl/dummy.csr -subj "/C=DE/L=Berlin/O=Vikunja/CN=Vikunja Snakeoil" && \ - openssl x509 -req -days 3650 -in /etc/nginx/ssl/dummy.csr -signkey /etc/nginx/ssl/dummy.key -out /etc/nginx/ssl/dummy.crt - COPY nginx.conf /etc/nginx/nginx.conf COPY run.sh /run.sh diff --git a/nginx.conf b/nginx.conf index 6e980b238..9b0674b72 100644 --- a/nginx.conf +++ b/nginx.conf @@ -60,15 +60,11 @@ http { server { listen 80; listen 81 default_server http2 proxy_protocol; ## Needed when behind HAProxy with SSL termination + HTTP/2 support - listen 443 default_server ssl http2; server_name _; expires $expires; - ssl_certificate /etc/nginx/ssl/dummy.crt; - ssl_certificate_key /etc/nginx/ssl/dummy.key; - location ~* .(txt|webmanifest|css|js|mjs|map|svg|jpg|jpeg|png|ico|ttf|woff|woff2|wav)$ { root /usr/share/nginx/html; try_files $uri $uri/ =404; From 31f0c384ac3a45b242464b2a8bd8424ef8cbdfc7 Mon Sep 17 00:00:00 2001 From: konrad Date: Sat, 13 Nov 2021 19:48:06 +0000 Subject: [PATCH 06/10] feat: add button to clear active filters (#924) Co-authored-by: kolaente Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/924 Reviewed-by: dpschen Co-authored-by: konrad Co-committed-by: konrad --- cypress/integration/list/list.spec.js | 4 +- src/components/list/partials/filter-popup.vue | 96 +++++++----- src/components/list/partials/filters.vue | 10 +- src/components/misc/popup.vue | 54 +++++++ src/components/tasks/gantt-component.vue | 12 +- src/components/tasks/mixins/taskList.js | 8 +- src/i18n/lang/en.json | 1 + src/styles/components/list.scss | 5 - src/views/list/views/Kanban.vue | 42 ++---- src/views/list/views/List.vue | 28 ++-- src/views/list/views/Table.vue | 141 +++++++++--------- 11 files changed, 227 insertions(+), 174 deletions(-) create mode 100644 src/components/misc/popup.vue diff --git a/cypress/integration/list/list.spec.js b/cypress/integration/list/list.spec.js index 596c6adcd..864b533b3 100644 --- a/cypress/integration/list/list.spec.js +++ b/cypress/integration/list/list.spec.js @@ -219,10 +219,10 @@ describe('Lists', () => { cy.get('.table-view .filter-container .items .button') .contains('Columns') .click() - cy.get('.table-view .filter-container .card .card-content .fancycheckbox .check') + cy.get('.table-view .filter-container .card.columns-filter .card-content .fancycheckbox .check') .contains('Priority') .click() - cy.get('.table-view .filter-container .card .card-content .fancycheckbox .check') + cy.get('.table-view .filter-container .card.columns-filter .card-content .fancycheckbox .check') .contains('Done') .click() diff --git a/src/components/list/partials/filter-popup.vue b/src/components/list/partials/filter-popup.vue index e761fb9ef..cabc5cfb6 100644 --- a/src/components/list/partials/filter-popup.vue +++ b/src/components/list/partials/filter-popup.vue @@ -1,37 +1,49 @@ + + diff --git a/src/components/list/partials/filters.vue b/src/components/list/partials/filters.vue index d76793534..95a849d2a 100644 --- a/src/components/list/partials/filters.vue +++ b/src/components/list/partials/filters.vue @@ -458,15 +458,7 @@ export default { return } - let foundDone = false - this.params.filter_by.forEach((f, i) => { - if (f === 'done') { - foundDone = i - } - }) - if (foundDone === false) { - this.filters.done = true - } + this.filters.done = this.params.filter_by.some((f) => f === 'done') === false }, async prepareRelatedObjectFilter(kind, filterName = null, servicePrefix = null) { if (filterName === null) { diff --git a/src/components/misc/popup.vue b/src/components/misc/popup.vue new file mode 100644 index 000000000..fcfa420e8 --- /dev/null +++ b/src/components/misc/popup.vue @@ -0,0 +1,54 @@ + + + + + diff --git a/src/components/tasks/gantt-component.vue b/src/components/tasks/gantt-component.vue index ac1df28d8..9e56c755c 100644 --- a/src/components/tasks/gantt-component.vue +++ b/src/components/tasks/gantt-component.vue @@ -9,12 +9,12 @@ > {{ $t('filters.title') }} + -
- - \ No newline at end of file diff --git a/src/components/home/navigation.vue b/src/components/home/navigation.vue index 9f5cfd11d..5f9d1a21e 100644 --- a/src/components/home/navigation.vue +++ b/src/components/home/navigation.vue @@ -48,7 +48,7 @@
-