From 99c8e1d9b8ef9d11660cc49ca28b1d241698bf3a Mon Sep 17 00:00:00 2001 From: JonasVHG <4658984+JonasVHG@users.noreply.github.com> Date: Wed, 29 Nov 2023 14:43:02 +0100 Subject: [PATCH 1/7] update config --- src/assets/config.json | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/assets/config.json b/src/assets/config.json index c56efd8..b1095b9 100644 --- a/src/assets/config.json +++ b/src/assets/config.json @@ -1,10 +1,12 @@ { "production": true, - "apiUrl": "https://projectaanvraag-api.uitdatabank.dev/", + "apiUrl": "http://host.docker.internal/", "widgetApi_currentVersion": "3", - "widgetApi_embedUrl_current": "https://projectaanvraag-api.uitdatabank.dev/widgets/layout/:page_id.js", - "widgetApi_embedUrl_forceCurrent": "https://projectaanvraag-api.uitdatabank.dev/widgets/layout/v3/:page_id.js", - "projectaanvraagDashboardUrl": "https://projectaanvraag.uitdatabank.dev/", + "widgetApi_embedUrl_current": "http://host.docker.internal/widgets/layout/:page_id.js", + "widgetApi_embedUrl_forceCurrent": "http://host.docker.internal/widgets/layout/v3/:page_id.js", + "projectaanvraagDashboardUrl": "http://host.docker.internal:9999", + "platformUrl": "http://localhost:81/admin", "zendeskUrl": "https://www.zendesk.com", - "publishers": "BRUZZ,Gazet van Antwerpen,Indiestyle,UiTX,UiT,UiTMetVlieg,NXTPOP" + "publishers": "BRUZZ,Gazet van Antwerpen,Indiestyle,UiTX,UiT,UiTMetVlieg,NXTPOP", + "platformIsLive": true } From 4c7f567adc86e76a01684afa2ae2520682ae80d5 Mon Sep 17 00:00:00 2001 From: JonasVHG <4658984+JonasVHG@users.noreply.github.com> Date: Wed, 29 Nov 2023 14:43:13 +0100 Subject: [PATCH 2/7] Add new values to environment --- src/environments/environment.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 6950587..6c57a50 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -15,8 +15,10 @@ type Environment = { widgetApi_embedUrl_current: string; widgetApi_embedUrl_forceCurrent: string; projectaanvraagDashboardUrl: string; + platformUrl: string; zendeskUrl: string; publishers: string; + platformIsLive: boolean; }; export let environment: Environment; @@ -31,7 +33,9 @@ export const setEnvironmentToConfig = async () => { widgetApi_embedUrl_current: config.widgetApi_embedUrl_current, widgetApi_embedUrl_forceCurrent: config.widgetApi_embedUrl_forceCurrent, projectaanvraagDashboardUrl: config.projectaanvraagDashboardUrl, + platformUrl: config.platformUrl, zendeskUrl: config.zendeskUrl, publishers: config.publishers, + platformIsLive: config.platformIsLive, }; }; From 58ef77fb22dbc0271f8207b081185c62ebacd36d Mon Sep 17 00:00:00 2001 From: JonasVHG <4658984+JonasVHG@users.noreply.github.com> Date: Wed, 29 Nov 2023 14:45:48 +0100 Subject: [PATCH 3/7] Add translation --- src/assets/i18n/nl.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/assets/i18n/nl.json b/src/assets/i18n/nl.json index 77ed8f3..15004e2 100644 --- a/src/assets/i18n/nl.json +++ b/src/assets/i18n/nl.json @@ -267,6 +267,7 @@ "BUTTON_COPY_TO_CLIPBOARD": "Scripttag kopiëren", "BUTTON_COPY_TO_CLIPBOARD_TITLE": "Kopiëren", "BUTTON_COPY_TO_CLIPBOARD_SUCCESS": "Scripttag gekopieerd", + "TOPBAR_BACK_BUTTON_LABEL_INTEGRATIES": "Integraties", "BUTTON_BACK_TO_PROJECTAANVRAAG_DASHBOARD": "Projectaanvragen", "WIDGET_PAGE_LIST_NO_PAGES_FOUND": "Geen widgets gevonden. Klik op \"Nieuwe widget maken\" om van start te gaan.", "TITLE_WIDGET_PAGE_LEGACY_WIDGETS_LIST": "Widgets aangemaakt vòòr 2018", From 92b9addd9a88232aa59d7140b2b1bc6104f93bdc Mon Sep 17 00:00:00 2001 From: JonasVHG <4658984+JonasVHG@users.noreply.github.com> Date: Wed, 29 Nov 2023 14:46:19 +0100 Subject: [PATCH 4/7] update name & redirect of BackButton depending on platformIsLive --- .../components/page-list/page-list.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/widget-builder/components/page-list/page-list.component.ts b/src/app/widget-builder/components/page-list/page-list.component.ts index 782a9b9..d90621a 100644 --- a/src/app/widget-builder/components/page-list/page-list.component.ts +++ b/src/app/widget-builder/components/page-list/page-list.component.ts @@ -319,8 +319,8 @@ export class PageListComponent implements OnInit { this.topbarService.setBackButton( new BackButton( BackButton.TYPE_LINK, - 'TOPBAR_BACK_BUTTON_LABEL_PROJECTAANVRAGEN', - environment.projectaanvraagDashboardUrl + environment.platformIsLive ? 'TOPBAR_BACK_BUTTON_LABEL_INTEGRATIES' : 'TOPBAR_BACK_BUTTON_LABEL_PROJECTAANVRAGEN', + environment.platformIsLive ? environment.platformUrl : environment.projectaanvraagDashboardUrl ) ); } From aff2e684653b830159f3f1a62931638c5657cf15 Mon Sep 17 00:00:00 2001 From: JonasVHG <4658984+JonasVHG@users.noreply.github.com> Date: Wed, 29 Nov 2023 14:51:33 +0100 Subject: [PATCH 5/7] linting --- .../components/page-list/page-list.component.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/widget-builder/components/page-list/page-list.component.ts b/src/app/widget-builder/components/page-list/page-list.component.ts index d90621a..3b55a3c 100644 --- a/src/app/widget-builder/components/page-list/page-list.component.ts +++ b/src/app/widget-builder/components/page-list/page-list.component.ts @@ -319,8 +319,12 @@ export class PageListComponent implements OnInit { this.topbarService.setBackButton( new BackButton( BackButton.TYPE_LINK, - environment.platformIsLive ? 'TOPBAR_BACK_BUTTON_LABEL_INTEGRATIES' : 'TOPBAR_BACK_BUTTON_LABEL_PROJECTAANVRAGEN', - environment.platformIsLive ? environment.platformUrl : environment.projectaanvraagDashboardUrl + environment.platformIsLive + ? 'TOPBAR_BACK_BUTTON_LABEL_INTEGRATIES' + : 'TOPBAR_BACK_BUTTON_LABEL_PROJECTAANVRAGEN', + environment.platformIsLive + ? environment.platformUrl + : environment.projectaanvraagDashboardUrl ) ); } From 339dddbb12b234d3a5a8535d7e46b70523c8bb73 Mon Sep 17 00:00:00 2001 From: Luc Wollants Date: Mon, 11 Dec 2023 14:40:49 +0100 Subject: [PATCH 6/7] Consistent naming `publiq platform` --- .../widget-builder/components/page-list/page-list.component.ts | 2 +- src/assets/i18n/nl.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/widget-builder/components/page-list/page-list.component.ts b/src/app/widget-builder/components/page-list/page-list.component.ts index 3b55a3c..0aa7e7f 100644 --- a/src/app/widget-builder/components/page-list/page-list.component.ts +++ b/src/app/widget-builder/components/page-list/page-list.component.ts @@ -320,7 +320,7 @@ export class PageListComponent implements OnInit { new BackButton( BackButton.TYPE_LINK, environment.platformIsLive - ? 'TOPBAR_BACK_BUTTON_LABEL_INTEGRATIES' + ? 'TOPBAR_BACK_BUTTON_LABEL_PUBLIQ_PLATFORM' : 'TOPBAR_BACK_BUTTON_LABEL_PROJECTAANVRAGEN', environment.platformIsLive ? environment.platformUrl diff --git a/src/assets/i18n/nl.json b/src/assets/i18n/nl.json index 15004e2..465930c 100644 --- a/src/assets/i18n/nl.json +++ b/src/assets/i18n/nl.json @@ -267,7 +267,6 @@ "BUTTON_COPY_TO_CLIPBOARD": "Scripttag kopiëren", "BUTTON_COPY_TO_CLIPBOARD_TITLE": "Kopiëren", "BUTTON_COPY_TO_CLIPBOARD_SUCCESS": "Scripttag gekopieerd", - "TOPBAR_BACK_BUTTON_LABEL_INTEGRATIES": "Integraties", "BUTTON_BACK_TO_PROJECTAANVRAAG_DASHBOARD": "Projectaanvragen", "WIDGET_PAGE_LIST_NO_PAGES_FOUND": "Geen widgets gevonden. Klik op \"Nieuwe widget maken\" om van start te gaan.", "TITLE_WIDGET_PAGE_LEGACY_WIDGETS_LIST": "Widgets aangemaakt vòòr 2018", @@ -276,6 +275,7 @@ "TITLE_WIDGET_PAGE_LIST_NEW_VERSION": "Nieuwe versie", "LOGOUT_FAILED_NOTIFICATION": "Afmelden niet gelukt. Probeer het later opnieuw.", "TOPBAR_USER_MENU_BUTTON_LOGOUT": "Afmelden", + "TOPBAR_BACK_BUTTON_LABEL_PUBLIQ_PLATFORM": "publiq platform", "TOPBAR_BACK_BUTTON_LABEL_PROJECTAANVRAGEN": "Projectaanvragen", "TOPBAR_PUBLISH_BUTTON": "Publiceren", "TOPBAR_STYLES_BUTTON": "Stijlen", From d79053409a1e4187a24a8f6f536aced06c6270d6 Mon Sep 17 00:00:00 2001 From: Luc Wollants Date: Mon, 11 Dec 2023 14:41:09 +0100 Subject: [PATCH 7/7] Redirect to integrations page for normal users --- src/assets/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assets/config.json b/src/assets/config.json index b1095b9..3f2608b 100644 --- a/src/assets/config.json +++ b/src/assets/config.json @@ -5,7 +5,7 @@ "widgetApi_embedUrl_current": "http://host.docker.internal/widgets/layout/:page_id.js", "widgetApi_embedUrl_forceCurrent": "http://host.docker.internal/widgets/layout/v3/:page_id.js", "projectaanvraagDashboardUrl": "http://host.docker.internal:9999", - "platformUrl": "http://localhost:81/admin", + "platformUrl": "http://localhost:81/nl/integraties", "zendeskUrl": "https://www.zendesk.com", "publishers": "BRUZZ,Gazet van Antwerpen,Indiestyle,UiTX,UiT,UiTMetVlieg,NXTPOP", "platformIsLive": true