From a7bfbc8ff738c6a9dd90d5acf5a34a12a440b4fb Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Fri, 3 Jun 2022 17:18:17 +0200 Subject: [PATCH] change(ui) - config changes --- frontend/app/components/Announcements/Announcements.js | 2 +- frontend/app/components/Client/Integrations/Integrations.js | 2 +- frontend/app/components/Header/Discover/Discover.js | 2 +- frontend/package-lock.json | 1 + frontend/package.json | 6 +++--- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/frontend/app/components/Announcements/Announcements.js b/frontend/app/components/Announcements/Announcements.js index b61b62757..ec1e2f3ac 100644 --- a/frontend/app/components/Announcements/Announcements.js +++ b/frontend/app/components/Announcements/Announcements.js @@ -14,7 +14,7 @@ class Announcements extends React.Component { navigateToUrl = url => { if (url) { - if (url.startsWith(window.env.ORIGIN)) { + if (url.startsWith(window.env.ORIGIN || window.location.origin)) { const { history } = this.props; var path = new URL(url).pathname if (path.includes('/metrics')) { diff --git a/frontend/app/components/Client/Integrations/Integrations.js b/frontend/app/components/Client/Integrations/Integrations.js index 00bbac68b..12e3712eb 100644 --- a/frontend/app/components/Client/Integrations/Integrations.js +++ b/frontend/app/components/Client/Integrations/Integrations.js @@ -368,7 +368,7 @@ export default class Integrations extends React.PureComponent { title="Github" description="Easily share issues on GitHub directly from any session replay." icon="integrations/github" - url={ `https://auth.openreplay.com/oauth/login?provider=github&back_url=${window.env.ORIGIN}` } + url={ `https://auth.openreplay.com/oauth/login?provider=github&back_url=${window.env.ORIGIN || window.location.origin}` } onClick={ () => this.showIntegrationConfig(GITHUB) } integrated={ issuesIntegrated } deleteHandler={issuesIntegrated ? () => this.deleteHandler('issues') : null} diff --git a/frontend/app/components/Header/Discover/Discover.js b/frontend/app/components/Header/Discover/Discover.js index b3f40066f..37e00d05b 100644 --- a/frontend/app/components/Header/Discover/Discover.js +++ b/frontend/app/components/Header/Discover/Discover.js @@ -69,7 +69,7 @@ class Discover extends React.PureComponent { onClick = task => { if (task.URL) { - if (task.URL.includes(window.env.ORIGIN)) { + if (task.URL.includes(window.env.ORIGIN || window.location.origin)) { const { history } = this.props; var path = new URL(task.URL).pathname history.push(path) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 7d415be63..b0c4ad67b 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -7,6 +7,7 @@ "": { "name": "openreplay", "version": "1.3.6", + "hasInstallScript": true, "dependencies": { "@sentry/browser": "^5.21.1", "@svg-maps/world": "^1.0.1", diff --git a/frontend/package.json b/frontend/package.json index 40d682c77..f5b960c76 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -3,16 +3,16 @@ "version": "1.3.6", "scripts": { "start": "webpack serve", - "build": "npm run gen:icons && rm -rf public && webpack", + "build": "npm run gen:icons && npm run gen:colors && rm -rf public && webpack", "upload:minio": "node ./scripts/upload-minio.js", "deploy:minio": "npm run build:minio && npm run upload:minio", "lint": "eslint --fix app; exit 0", - "gen:css-types": "tcm app/components && tcm app/player", "gen:constants": "node ./scripts/constants.js", "gen:icons": "node ./scripts/icons.ts", "gen:colors": "node ./scripts/colors.js", "storybook": "start-storybook", - "flow": "flow" + "flow": "flow", + "postinstall": "npm run gen:icons && npm run gen:colors" }, "dependencies": { "@sentry/browser": "^5.21.1",