From 42aa8fa9154bffa7d722938d053920b8f5364084 Mon Sep 17 00:00:00 2001 From: ridel1e Date: Fri, 12 Apr 2024 14:38:19 +0300 Subject: [PATCH 1/8] update dependency --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 23c109340..5cbdc44ac 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@sentry/react": "^6.16.1", "@sentry/tracing": "^6.16.1", "@spectrumlabs/analytics": "^1.1.9", - "@spectrumlabs/cardano-dex-sdk": "^0.1.309", + "@spectrumlabs/cardano-dex-sdk": "^0.1.310", "@types/file-saver": "^2.0.5", "@types/lodash": "^4.14.172", "@types/numeral": "^2.0.2", diff --git a/yarn.lock b/yarn.lock index c7301b76e..6b7b27221 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3337,10 +3337,10 @@ dependencies: "@amplitude/analytics-browser" "^1.9.0" -"@spectrumlabs/cardano-dex-sdk@^0.1.309": - version "0.1.309" - resolved "https://registry.yarnpkg.com/@spectrumlabs/cardano-dex-sdk/-/cardano-dex-sdk-0.1.309.tgz#f0f68913636c0df2be41088aed71a049fff7e521" - integrity sha512-s5px+8AwoVy5SkveRSeTM1/bnvu5ZTW6maTawA+NJljQ4Ty5gtGtv0CrYS3h0da//YD67QdTK3i1nk5CYHtZ5g== +"@spectrumlabs/cardano-dex-sdk@^0.1.310": + version "0.1.310" + resolved "https://registry.yarnpkg.com/@spectrumlabs/cardano-dex-sdk/-/cardano-dex-sdk-0.1.310.tgz#026b72834f403ba3b6a1f2a90dbf0929875a594e" + integrity sha512-jydJgoO8Qxafl/akpqHWPiHyaQm2E1UqVupTzhBlHLiZtRqK0Bt9gkFwoY5pxd83woFRq2NPhg8QVx51k25FqA== dependencies: "@emurgo/cardano-serialization-lib-browser" "^11.5.0" axios "^0.21.1" From c438e9942767f7590006e2358e5073fc784abf61 Mon Sep 17 00:00:00 2001 From: ridel1e Date: Fri, 12 Apr 2024 15:04:54 +0300 Subject: [PATCH 2/8] update dependency #2 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 5cbdc44ac..bafb6ced1 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@sentry/react": "^6.16.1", "@sentry/tracing": "^6.16.1", "@spectrumlabs/analytics": "^1.1.9", - "@spectrumlabs/cardano-dex-sdk": "^0.1.310", + "@spectrumlabs/cardano-dex-sdk": "^0.1.311", "@types/file-saver": "^2.0.5", "@types/lodash": "^4.14.172", "@types/numeral": "^2.0.2", diff --git a/yarn.lock b/yarn.lock index 6b7b27221..9b0422247 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3337,10 +3337,10 @@ dependencies: "@amplitude/analytics-browser" "^1.9.0" -"@spectrumlabs/cardano-dex-sdk@^0.1.310": - version "0.1.310" - resolved "https://registry.yarnpkg.com/@spectrumlabs/cardano-dex-sdk/-/cardano-dex-sdk-0.1.310.tgz#026b72834f403ba3b6a1f2a90dbf0929875a594e" - integrity sha512-jydJgoO8Qxafl/akpqHWPiHyaQm2E1UqVupTzhBlHLiZtRqK0Bt9gkFwoY5pxd83woFRq2NPhg8QVx51k25FqA== +"@spectrumlabs/cardano-dex-sdk@^0.1.311": + version "0.1.311" + resolved "https://registry.yarnpkg.com/@spectrumlabs/cardano-dex-sdk/-/cardano-dex-sdk-0.1.311.tgz#55c4ff50fb81afb064229d3cab5218a5de9da787" + integrity sha512-+h5r5T6oNEsYnEEKTAIirpPDeM0Ff3F/lqDHCQ/g13eMGHiM+YXbhg6fH/uPfAief58MvKNrWmPH/F2Y5EiFsw== dependencies: "@emurgo/cardano-serialization-lib-browser" "^11.5.0" axios "^0.21.1" From 9cbbd50047971d0f338e104c95f5569c96b2774e Mon Sep 17 00:00:00 2001 From: ridel1e Date: Fri, 12 Apr 2024 15:24:52 +0300 Subject: [PATCH 3/8] update dependency #3 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index bafb6ced1..06f0f5d29 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@sentry/react": "^6.16.1", "@sentry/tracing": "^6.16.1", "@spectrumlabs/analytics": "^1.1.9", - "@spectrumlabs/cardano-dex-sdk": "^0.1.311", + "@spectrumlabs/cardano-dex-sdk": "^0.1.312", "@types/file-saver": "^2.0.5", "@types/lodash": "^4.14.172", "@types/numeral": "^2.0.2", diff --git a/yarn.lock b/yarn.lock index 9b0422247..c5f3c92b2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3337,10 +3337,10 @@ dependencies: "@amplitude/analytics-browser" "^1.9.0" -"@spectrumlabs/cardano-dex-sdk@^0.1.311": - version "0.1.311" - resolved "https://registry.yarnpkg.com/@spectrumlabs/cardano-dex-sdk/-/cardano-dex-sdk-0.1.311.tgz#55c4ff50fb81afb064229d3cab5218a5de9da787" - integrity sha512-+h5r5T6oNEsYnEEKTAIirpPDeM0Ff3F/lqDHCQ/g13eMGHiM+YXbhg6fH/uPfAief58MvKNrWmPH/F2Y5EiFsw== +"@spectrumlabs/cardano-dex-sdk@^0.1.312": + version "0.1.312" + resolved "https://registry.yarnpkg.com/@spectrumlabs/cardano-dex-sdk/-/cardano-dex-sdk-0.1.312.tgz#3e9fcedbbd10e3a1ba30c51350933f90ab65b442" + integrity sha512-vU+z/OGp3/c5WAQl9kaa2WuwS1s1GvFpi8TAbRyp02tRSGOg7ef2QIyCjUFCO/inUgFk8w5Eb4RLjkfKvaPAyQ== dependencies: "@emurgo/cardano-serialization-lib-browser" "^11.5.0" axios "^0.21.1" From 9c96fbe82a6ab773d9175b2d932e830f975d9a6f Mon Sep 17 00:00:00 2001 From: Dmitry Date: Sat, 18 May 2024 17:57:03 +0300 Subject: [PATCH 4/8] Created modal, which open after 5 second upon accessing the site. --- src/ApplicationRoutes.tsx | 13 +++++++ .../PreSplashModal/PreSplashModal.tsx | 37 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 src/components/PreSplashModal/PreSplashModal.tsx diff --git a/src/ApplicationRoutes.tsx b/src/ApplicationRoutes.tsx index b3dca042e..46fb55857 100644 --- a/src/ApplicationRoutes.tsx +++ b/src/ApplicationRoutes.tsx @@ -1,3 +1,4 @@ +import { Modal } from '@ergolabs/ui-kit'; import { fireAnalyticsEvent, getBrowser, user } from '@spectrumlabs/analytics'; import { DateTime } from 'luxon'; import { FC, useEffect } from 'react'; @@ -6,6 +7,7 @@ import { Navigate, Outlet, useRoutes } from 'react-router-dom'; import { version } from '../package.json'; import { NetworkDomManager } from './common/services/NetworkDomManager/NetworkDomManager'; import { Layout } from './components/common/Layout/Layout'; +import { PreSplashModal } from './components/PreSplashModal/PreSplashModal.tsx'; import { RouteConfigExtended } from './components/RouterTitle/RouteConfigExtended'; import { RouterTitle } from './components/RouterTitle/RouterTitle'; import { useApplicationSettings } from './context'; @@ -140,6 +142,9 @@ export const ApplicationRoutes: FC = () => { const [settings] = useApplicationSettings(); + const openPreSplashModal = () => + Modal.open(({ close }) => ); + useEffect(() => { fireAnalyticsEvent('App Loaded'); @@ -150,6 +155,14 @@ export const ApplicationRoutes: FC = () => { user.set('locale_active', settings.lang); }, []); + useEffect(() => { + const timer = setTimeout(() => { + openPreSplashModal(); + }, 5000); + + return () => clearTimeout(timer); + }, []); + return ( <> void }> = ({ + close, +}) => { + const { valBySize } = useDevice(); + + const handleClick = () => { + window.open('https://pre-splash-app.spectrum.fi/SPLASH-ADA', '_blank'); + close(); + }; + + return ( + <> + + Try new interface + + ('100%', 480)}> + + + Spectrum DEX will become Splash soon. Try a new Pre-Splash Interface + and meet even faster trading experience. + + + To trade SPLASH token use the new Interface as well. + + + + + + ); +}; From eb022eb28a140e4e831f4a8e1102d964a39a4f91 Mon Sep 17 00:00:00 2001 From: AntonovDm <131981489+AntonovDm@users.noreply.github.com> Date: Mon, 20 May 2024 22:12:03 +0300 Subject: [PATCH 5/8] Added flag hasSeenInformModal in local storage. (#935) Co-authored-by: Dmitry --- src/ApplicationRoutes.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/ApplicationRoutes.tsx b/src/ApplicationRoutes.tsx index 46fb55857..f872d4ced 100644 --- a/src/ApplicationRoutes.tsx +++ b/src/ApplicationRoutes.tsx @@ -6,6 +6,7 @@ import { Navigate, Outlet, useRoutes } from 'react-router-dom'; import { version } from '../package.json'; import { NetworkDomManager } from './common/services/NetworkDomManager/NetworkDomManager'; +import { localStorageManager } from './common/utils/localStorageManager.ts'; import { Layout } from './components/common/Layout/Layout'; import { PreSplashModal } from './components/PreSplashModal/PreSplashModal.tsx'; import { RouteConfigExtended } from './components/RouterTitle/RouteConfigExtended'; @@ -156,11 +157,16 @@ export const ApplicationRoutes: FC = () => { }, []); useEffect(() => { - const timer = setTimeout(() => { - openPreSplashModal(); - }, 5000); + const hasSeenInformModal = localStorageManager.get('hasSeenInformModal'); - return () => clearTimeout(timer); + if (!hasSeenInformModal) { + const timer = setTimeout(() => { + openPreSplashModal(); + localStorageManager.set('hasSeenInformModal', true); + }, 5000); + + return () => clearTimeout(timer); + } }, []); return ( From fda23164f081c475d4f4c6f2b7ae23cee48f91cc Mon Sep 17 00:00:00 2001 From: AntonovDm <131981489+AntonovDm@users.noreply.github.com> Date: Thu, 4 Jul 2024 15:36:00 +0300 Subject: [PATCH 6/8] Front-168. Change link on modal and fix logic spectrum app. (#936) * Changed link on modal and fixed logic view. * fix: renamed variables and changed text on Splash modal. --- src/ApplicationRoutes.tsx | 16 +++---- .../PreSplashModal/PreSplashModal.tsx | 37 --------------- src/components/SplashModal/SplashModal.tsx | 47 +++++++++++++++++++ 3 files changed, 54 insertions(+), 46 deletions(-) delete mode 100644 src/components/PreSplashModal/PreSplashModal.tsx create mode 100644 src/components/SplashModal/SplashModal.tsx diff --git a/src/ApplicationRoutes.tsx b/src/ApplicationRoutes.tsx index f872d4ced..7c6fcf1f9 100644 --- a/src/ApplicationRoutes.tsx +++ b/src/ApplicationRoutes.tsx @@ -1,4 +1,4 @@ -import { Modal } from '@ergolabs/ui-kit'; +import { localStorageManager, Modal } from '@ergolabs/ui-kit'; import { fireAnalyticsEvent, getBrowser, user } from '@spectrumlabs/analytics'; import { DateTime } from 'luxon'; import { FC, useEffect } from 'react'; @@ -6,11 +6,10 @@ import { Navigate, Outlet, useRoutes } from 'react-router-dom'; import { version } from '../package.json'; import { NetworkDomManager } from './common/services/NetworkDomManager/NetworkDomManager'; -import { localStorageManager } from './common/utils/localStorageManager.ts'; import { Layout } from './components/common/Layout/Layout'; -import { PreSplashModal } from './components/PreSplashModal/PreSplashModal.tsx'; import { RouteConfigExtended } from './components/RouterTitle/RouteConfigExtended'; import { RouterTitle } from './components/RouterTitle/RouterTitle'; +import { SplashModal } from './components/SplashModal/SplashModal.tsx'; import { useApplicationSettings } from './context'; import { AddLiquidity } from './pages/AddLiquidity/AddLiquidity'; import { CreatePool } from './pages/CreatePool/CreatePool'; @@ -143,8 +142,8 @@ export const ApplicationRoutes: FC = () => { const [settings] = useApplicationSettings(); - const openPreSplashModal = () => - Modal.open(({ close }) => ); + const openSplashModal = () => + Modal.open(({ close }) => ); useEffect(() => { fireAnalyticsEvent('App Loaded'); @@ -157,12 +156,11 @@ export const ApplicationRoutes: FC = () => { }, []); useEffect(() => { - const hasSeenInformModal = localStorageManager.get('hasSeenInformModal'); + const network = localStorageManager.get('spectrum-selected-network-key'); - if (!hasSeenInformModal) { + if (network !== 'ergo') { const timer = setTimeout(() => { - openPreSplashModal(); - localStorageManager.set('hasSeenInformModal', true); + openSplashModal(); }, 5000); return () => clearTimeout(timer); diff --git a/src/components/PreSplashModal/PreSplashModal.tsx b/src/components/PreSplashModal/PreSplashModal.tsx deleted file mode 100644 index 0531cb0e1..000000000 --- a/src/components/PreSplashModal/PreSplashModal.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import { Button, Flex, Modal, Typography, useDevice } from '@ergolabs/ui-kit'; -import { Trans } from '@lingui/macro'; -import { CSSProperties } from 'react'; -import * as React from 'react'; - -export const PreSplashModal: React.FC<{ close: (result?: any) => void }> = ({ - close, -}) => { - const { valBySize } = useDevice(); - - const handleClick = () => { - window.open('https://pre-splash-app.spectrum.fi/SPLASH-ADA', '_blank'); - close(); - }; - - return ( - <> - - Try new interface - - ('100%', 480)}> - - - Spectrum DEX will become Splash soon. Try a new Pre-Splash Interface - and meet even faster trading experience. - - - To trade SPLASH token use the new Interface as well. - - - - - - ); -}; diff --git a/src/components/SplashModal/SplashModal.tsx b/src/components/SplashModal/SplashModal.tsx new file mode 100644 index 000000000..adc70baa5 --- /dev/null +++ b/src/components/SplashModal/SplashModal.tsx @@ -0,0 +1,47 @@ +import { Button, Flex, Modal, Typography, useDevice } from '@ergolabs/ui-kit'; +import { Trans } from '@lingui/macro'; +import { CSSProperties } from 'react'; +import * as React from 'react'; + +export const SplashModal: React.FC<{ close: (result?: any) => void }> = ({ + close, +}) => { + const { valBySize } = useDevice(); + + const handleClick = () => { + window.open('https://app.splash.trade', '_blank'); + close(); + }; + + return ( + <> + + Product Update + + ('100%', 480)}> + + + Spectrum Cardano DEX will change its brand name to Splash soon. +
+ All pools will be migrated to the Splash interface. +
+ Funds will be accessible through the new interface. +
+ + This interface will be shut down on 1st Aug 2024. + + + + +
+
+ + ); +}; From 1f34d6793d75df1138404398e74b4ef929942121 Mon Sep 17 00:00:00 2001 From: ridel1e Date: Thu, 4 Jul 2024 16:22:33 +0300 Subject: [PATCH 7/8] version up --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 06f0f5d29..1c039e295 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@spectrumlabs/interface", - "version": "5.0.32", + "version": "5.0.34", "private": false, "scripts": { "start": "vite", From 83f53335fcb75c11f0e530d0c8d1ca7162e9121c Mon Sep 17 00:00:00 2001 From: ridel1e Date: Fri, 5 Jul 2024 16:31:24 +0300 Subject: [PATCH 8/8] version up --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1c039e295..3b68b91d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@spectrumlabs/interface", - "version": "5.0.34", + "version": "5.0.35", "private": false, "scripts": { "start": "vite",