Skip to content

Commit

Permalink
Merge branch 'suite' of https://github.com/chain4travel/camino-suite
Browse files Browse the repository at this point in the history
…into msig-pending-tx
  • Loading branch information
Ysrbolles committed Dec 29, 2024
2 parents ade7ae0 + d40be09 commit f0ce48d
Show file tree
Hide file tree
Showing 69 changed files with 4,371 additions and 1,893 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
WALLET_IMAGE="europe-west3-docker.pkg.dev/pwk-c4t-dev/camino-suite-apps/camino-suite-wallet:suite"
SUITE_IMAGE="suite-local"
EXPLORER_IMAGE="europe-west3-docker.pkg.dev/pwk-c4t-dev/camino-suite-apps/camino-suite-explorer:suite"
VOTING_IMAGE="europe-west3-docker.pkg.dev/pwk-c4t-dev/camino-suite-apps/camino-suite-voting:suite"
BUILD_ENV="build:dev"
16 changes: 8 additions & 8 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ jobs:

# These extract all artifacts out from the container to git so they can be previewed
- name: extract screenshots to git
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
name: cypress-screenshots_wallet
path: camino-suite/cypress/screenshots
# Test run video was always captured, so this action uses "always()" condition
- name: extract videos to git
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: cypress-videos
name: cypress-videos_wallet
path: camino-suite/cypress/videos


Expand Down Expand Up @@ -126,15 +126,15 @@ jobs:

# These extract all artifacts out from the container to git so they can be previewed
- name: extract screenshots to git
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
name: cypress-screenshots_explorer
path: camino-suite/cypress/screenshots
# Test run video was always captured, so this action uses "always()" condition
- name: extract videos to git
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: cypress-videos
name: cypress-videos_explorer
path: camino-suite/cypress/videos
9 changes: 8 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
- name: create suite docker image
run: |
docker build . -f Dockerfile_SUITE -t ${{ steps.setDefaults.outputs.docker_image }} --build-arg BUILD_ENV=build:${{ steps.setDefaults.outputs.build_env }} --build-arg EXPLORER_BRANCH=${{ steps.setDefaults.outputs.branch }} --build-arg WALLET_BRANCH=${{ steps.setDefaults.outputs.branch }}
docker build . -f Dockerfile_SUITE -t ${{ steps.setDefaults.outputs.docker_image }} --build-arg BUILD_ENV=build:${{ steps.setDefaults.outputs.build_env }} --build-arg EXPLORER_BRANCH=${{ steps.setDefaults.outputs.branch }} --build-arg WALLET_BRANCH=${{ steps.setDefaults.outputs.branch }} --build-arg VOTING_BRANCH=${{ steps.setDefaults.outputs.branch }}
Expand All @@ -110,6 +110,13 @@ jobs:
docker push ${{ steps.setDefaults.outputs.docker_image }}
gcloud run deploy camino-suite-${{ steps.setDefaults.outputs.build_env }} --image ${{ steps.setDefaults.outputs.docker_image }} --region=europe-west1
- name: push and deploy docker stage suite
if: ${{(github.event_name == 'push') && (github.ref == 'refs/heads/suite-c4t') }}
run: |
gcloud auth configure-docker --quiet europe-west3-docker.pkg.dev
docker push ${{ steps.setDefaults.outputs.docker_image }}
gcloud run deploy camino-suite-${{ steps.setDefaults.outputs.build_env }} --image ${{ steps.setDefaults.outputs.docker_image }} --region=europe-west1
- name: push and deploy docker stage suite
if: ${{(github.event_name == 'push') && contains(github.ref, 'refs/tags/') }}
run: |
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile_SUITE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ARG BUILD_ENV="build:dev"
ARG EXPLORER_BRANCH=suite
ARG WALLET_BRANCH=suite
ARG VOTING_BRANCH=suite

FROM node:16 as stage-suite
ARG BUILD_ENV
Expand All @@ -16,11 +17,14 @@ FROM europe-west3-docker.pkg.dev/pwk-c4t-dev/camino-suite-apps/camino-suite-expl

FROM europe-west3-docker.pkg.dev/pwk-c4t-dev/camino-suite-apps/camino-suite-wallet:$WALLET_BRANCH as stage-wallet

FROM europe-west3-docker.pkg.dev/pwk-c4t-dev/camino-suite-apps/camino-suite-voting:$VOTING_BRANCH as stage-voting



FROM nginx:1.18
COPY --from=stage-suite /app/camino-suite/dist/ /usr/share/nginx/html
COPY --from=stage-explorer /app/camino-block-explorer/dist/ /usr/share/nginx/html/explorer
COPY --from=stage-wallet /app/camino-wallet/dist/ /usr/share/nginx/html/wallet
COPY --from=stage-voting /app/camino-suite-voting/dist/ /usr/share/nginx/html/dac
# Copy the default nginx.conf provided by tiangolo/node-frontend
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Camino Application Suite
# Camino Suite

This app uses Module Federation to combine three different applications with different frameworks into a single, cohesive application. The three applications are:

Expand Down
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ version: '3.5'

services:

voting:
image: ${VOTING_IMAGE}
entrypoint: ["yarn", "start"]
ports:
- 5004:5004
container_name: camino-suite-voting-container

wallet:
image: ${WALLET_IMAGE}
entrypoint: ["yarn", "start"]
Expand Down
6 changes: 5 additions & 1 deletion nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@ server {
}

include /etc/nginx/extra-conf.d/*.conf;
}

gzip on;
gzip_types *;
gzip_proxied no-cache no-store private expired auth;
}
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"name": "host-react",
"version": "1.0.0",
"scripts": {
"build": "PUBLIC_PATH=https://suite.camino.network/ EXPLORER_PATH=https://suite.camino.network/explorer/ WALLET_PATH=https://suite.camino.network/wallet/ webpack --config webpack.prod.js",
"build:dev": "PUBLIC_PATH=https://dev.suite.camino.network/ EXPLORER_PATH=https://dev.suite.camino.network/explorer/ WALLET_PATH=https://dev.suite.camino.network/wallet/ webpack --config webpack.dev.js",
"build:stage": "PUBLIC_PATH=https://stage.suite.camino.network/ EXPLORER_PATH=https://stage.suite.camino.network/explorer/ WALLET_PATH=https://stage.suite.camino.network/wallet/ webpack --config webpack.prod.js",
"build": "PUBLIC_PATH=https://suite.camino.network/ EXPLORER_PATH=https://suite.camino.network/explorer/ WALLET_PATH=https://suite.camino.network/wallet/ DAC_PATH=https://suite.camino.network/dac/ webpack --config webpack.prod.js",
"build:dev": "PUBLIC_PATH=https://dev.suite.camino.network/ EXPLORER_PATH=https://dev.suite.camino.network/explorer/ WALLET_PATH=https://dev.suite.camino.network/wallet/ DAC_PATH=https://dev.suite.camino.network/dac/ webpack --config webpack.dev.js",
"build:stage": "PUBLIC_PATH=https://stage.suite.camino.network/ EXPLORER_PATH=https://stage.suite.camino.network/explorer/ WALLET_PATH=https://stage.suite.camino.network/wallet/ DAC_PATH=https://stage.suite.camino.network/dac/ webpack --config webpack.prod.js",
"build:start": "cd dist && PORT=5001 npx serve",
"start": "webpack-dev-server --config webpack.local.js",
"start:live": "webpack-dev-server --open --config webpack.local.js --live-reload",
Expand Down Expand Up @@ -32,16 +32,16 @@
"@emotion/styled": "^11.10.5",
"@mdi/js": "^7.0.96",
"@mdi/react": "^1.6.1",
"@types/big.js": "^6.2.2",
"@types/ethereum-protocol": "^1.0.5",
"@reduxjs/toolkit": "^1.8.1",
"@testing-library/dom": "^8.19.0",
"@mui/icons-material": "^5.15.11",
"@mui/material": "^5.15.11",
"@mui/system": "^5.15.11",
"@reduxjs/toolkit": "^1.8.1",
"@testing-library/dom": "^8.19.0",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.0.1",
"@testing-library/user-event": "^14.1.1",
"@types/big.js": "^6.2.2",
"@types/ethereum-protocol": "^1.0.5",
"@types/jest": "^27.4.1",
"@types/lodash": "^4.14.189",
"@types/node": "^17.0.25",
Expand Down Expand Up @@ -83,10 +83,10 @@
"webpack-dev-server": "^4.3.1",
"webpack-merge": "^5.8.0",
"yup": "^0.32.11",
"ethers": "^6.13.2"
"ethers": "^6.13.2",
"big.js": "^6.2.1"
},
"dependencies": {
"big.js": "^6.2.1",
"react": "^18.2.0",
"react-circle-flags": "^0.0.18",
"react-dom": "^18.2.0"
Expand Down
19 changes: 8 additions & 11 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,16 @@
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Explore Camino Suite for comprehensive travel solutions by Chain4Travel. Discover more about our services and how we're revolutionizing travel."
content="Discover Camino Suite — hub for crypto wallets, on-chain data, transactions, Camino Messenger configuration, and Partner Showroom of Camino Network."
/>
<title>Camino Suite Application</title>
<meta name="keywords" content="Camino Suite" />
<title>Camino Suite</title>

<meta property="og:image" content="/preview.jpg" />
<meta
property="og:title"
content="Camino Suite Camino Suite Application: Your Gateway to Revolutionary Travel"
/>
<meta property="og:image" content="/preview.png" />
<meta property="og:title" content="Camino Suite: wallet, data, partners showroom" />
<meta
property="og:description"
content="Explore Camino Suite for comprehensive travel solutions by Chain4Travel. Discover more about our services and how we're revolutionizing travel."
content="Discover Camino Suite — hub for crypto wallets, on-chain data, transactions, Camino Messenger configuration, and Partner Showroom of Camino Network."
/>
<meta property="og:url" content="https://suite.camino.network/" />
<meta property="og:type" content="website" />
Expand All @@ -32,9 +30,8 @@
name="twitter:description"
content="Camino Suite for everything Camino by Chain4Travel."
/>
<meta name="twitter:image" content="/preview.jpg" />
<meta name="twitter:image:alt" content="Camino Suite Application" />

<meta name="twitter:image" content="/preview.png" />
<meta name="twitter:image:alt" content="Camino Suite" />
<link rel="preconnect" href="https://cdn.jsdelivr.net" />
<link
rel="stylesheet"
Expand Down
4 changes: 2 additions & 2 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"short_name": "Camino Suite Application",
"name": "Camino Suite Application",
"short_name": "Camino Suite",
"name": "Camino Suite",
"icons": [
{
"src": "favicon.ico",
Expand Down
Binary file removed public/preview.jpg
Binary file not shown.
Binary file added public/preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/@types/partners.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
export interface PartnerDataType {
isValidator: boolean
contractAddress: any
id?: number
attributes?: AttributesType
}

export interface AttributesType {
cChainAddresses?: { Network: string; cAddress: string; id: number }[]
cChainAddress?: string
contactEmail?: string
companyName?: string
companyCountry?: string
companyWebsite?: string
contactFirstname?: string
contactLastname?: string
contactPhone?: string
pChainAddresses?: { Network: string; pAddress: string; id: number }[]
pChainAddress?: string
companyShortDescription?: string
companyLongDescription?: string
Expand Down
8 changes: 4 additions & 4 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { ExplorerStoreProvider } from 'Explorer/useStore'
import React from 'react'
import ReactDOM from 'react-dom/client'
import Root from './layout/index'
import { HelmetProvider } from 'react-helmet-async'
import ThemeConfig from './theme'
import { Provider as ReduxProvider } from 'react-redux'
import { configureAppStore } from './redux/store'
import './index.css'
import { ExplorerStoreProvider } from 'Explorer/useStore'
import Root from './layout/index'
import { configureAppStore } from './redux/store'
import ThemeConfig from './theme'

export const store = configureAppStore()

Expand Down
30 changes: 26 additions & 4 deletions src/components/Alert.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { Box, Typography } from '@mui/material'
import { Box, SxProps, Typography } from '@mui/material'
import React from 'react'

const Alert = ({
variant,
title,
content,
sx,
}: {
variant: 'info' | 'negative'
variant: 'info' | 'negative' | 'warning'
title?: string
content: string
sx?: SxProps
}) => {
return (
<Box
Expand All @@ -18,11 +20,20 @@ const Alert = ({
padding: '16px',
border: '1px solid',
borderColor:
variant === 'info' ? 'rgba(0, 133, 255, 0.5)' : 'rgba(229, 67, 31, 0.5)',
variant === 'info'
? 'rgba(0, 133, 255, 0.5)'
: variant === 'warning'
? 'rgba(229, 162, 31, 0.5)'
: 'rgba(229, 67, 31, 0.5)',
background:
variant === 'info' ? 'rgba(0, 133, 255, 0.05)' : 'rgba(229, 67, 31, 0.05)',
variant === 'info'
? 'rgba(0, 133, 255, 0.05)'
: variant === 'warning'
? 'rgba(229, 162, 31, 0.05)'
: 'rgba(229, 67, 31, 0.05)',
borderRadius: '6px',
maxWidth: '350px',
...sx,
...(!title && { alignItems: 'center' }),
}}
>
Expand Down Expand Up @@ -55,6 +66,17 @@ const Alert = ({
/>
</svg>
)}
{variant === 'warning' && (
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path d="M13 14H11V9H13M13 18H11V16H13M1 21H23L12 2L1 21Z" fill="#E5A21F" />
</svg>
)}
</Box>
<Box sx={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
{title && (
Expand Down
2 changes: 1 addition & 1 deletion src/components/Animate/DialogAnimate.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box, Dialog, DialogProps, Paper, useTheme } from '@mui/material'
import React from 'react'
import { Dialog, Box, Paper, DialogProps, useTheme } from '@mui/material'

interface DialogAnimateProps extends DialogProps {
animate?: object
Expand Down
Loading

0 comments on commit f0ce48d

Please sign in to comment.