diff --git a/.env.tpl b/.env.tpl index 80607cf..eebc36d 100644 --- a/.env.tpl +++ b/.env.tpl @@ -1,6 +1,7 @@ # set these to your upload API service URL and the DID your service is using as its service DID NEXT_PUBLIC_W3UP_SERVICE_URL=https://staging.up.web3.storage NEXT_PUBLIC_W3UP_SERVICE_DID=did:web:staging.web3.storage +NEXT_PUBLIC_W3UP_PROVIDER=did:web:staging.web3.storage # set these to values from Stripe settings NEXT_PUBLIC_STRIPE_PRICING_TABLE_ID=prctbl_1OCeiEF6A5ufQX5vPFlWRkPm diff --git a/.github/workflows/deploy-storacha.yml b/.github/workflows/deploy-storacha.yml index 533cd83..7485a61 100644 --- a/.github/workflows/deploy-storacha.yml +++ b/.github/workflows/deploy-storacha.yml @@ -2,18 +2,115 @@ name: Deploy Storacha on: push: branches: - - 'feat/storacha-skin' + - 'main' + pull_request: + branches: + - 'main' jobs: + test: + uses: ./.github/workflows/test.yml + + preview: + name: Preview + needs: + - test + runs-on: ubuntu-latest + permissions: + pull-requests: write + environment: + name: ${{ (github.ref_name == 'main') && 'staging' || format('preview-{0}', github.ref_name) }} + url: ${{ (github.ref_name == 'main') && 'https://staging.console.web3.storage/' || steps.cloudflare_url.outputs.stdout }} + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/pnpm + - name: create .env from .env.tpl setting env variables used by `pnpm run pages:build` + run: | + # set env vars from template + + # omit these because they are added manually in the next step + function excludeDefaultServiceVariables() { + cat - | grep -v NEXT_PUBLIC_W3UP_SERVICE_ | grep -v NEXT_PUBLIC_STRIPE + } + + # set .env from .env.tpl with exclusions + cat .env.tpl | excludeDefaultServiceVariables > .env + + # add vars configuring console frontend to use staging w3up as backend + echo "NEXT_PUBLIC_W3UP_SERVICE_DID=did:web:staging.web3.storage" >> .env + echo "NEXT_PUBLIC_W3UP_SERVICE_URL=https://staging.up.storacha.network" >> .env + echo "NEXT_PUBLIC_W3UP_PROVIDER=did:web:staging.web3.storage" >> .env + echo "NEXT_PUBLIC_STRIPE_PRICING_TABLE_ID=prctbl_1NzhdvF6A5ufQX5vKNZuRhie" >> .env + echo "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_51LO87hF6A5ufQX5viNsPTbuErzfavdrEFoBuaJJPfoIhzQXdOUdefwL70YewaXA32ZrSRbK4U4fqebC7SVtyeNcz00qmgNgueC" >> .env + echo "NEXT_PUBLIC_STRIPE_CUSTOMER_PORTAL_LINK=https://billing.stripe.com/p/login/test_6oE29Gff99KO6mk8ww" >> .env + # as long as this uses https://github.com/cloudflare/next-on-pages/blob/dc529d7efa8f8568ea8f71b5cdcf78df89be6c12/packages/next-on-pages/bin/index.js, + # env vars won't get passed through to wrangler, so if wrangler will need them, write them to .env like the previous step + - run: pnpm pages:build + - name: Deploy preview build to Cloudflare Pages + uses: mathiasvr/command-output@v1.1.0 + id: cloudflare + with: + run: npx wrangler pages deploy --project-name "$CLOUDFLARE_PAGES_PROJECT_NAME" --branch "$GITHUB_REF_NAME" --commit-hash "$GITHUB_SHA" .vercel/output/static + env: + CLOUDFLARE_API_TOKEN: ${{ secrets.CF_TOKEN }} + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} + CLOUDFLARE_PAGES_PROJECT_NAME: ${{ (github.ref_name == 'main') && 'console-web3-storage-staging' || 'console-web3-storage-preview' }} + - name: Find Cloudflare Pages preview URL + uses: mathiasvr/command-output@v1.1.0 + id: cloudflare_url + with: + run: egrep -o 'https?://[^ ]+' <(echo "${{ steps.cloudflare.outputs.stdout }}") + - name: Find Current Pull Request + uses: jwalton/gh-find-current-pr@v1.3.0 + id: finder + - name: Update Preview URLs PR Comment + uses: marocchino/sticky-pull-request-comment@v2.2.0 + with: + number: ${{ steps.finder.outputs.pr }} + message: | + ### Website preview πŸ”—βœ¨ + - ⛅️ ${{ steps.cloudflare_url.outputs.stdout }} + + [build log](/${{ github.repository }}/actions/runs/${{ github.run_id }}) + - name: Add Preview URLs as Job Summary + run: | + echo " + ### Website preview πŸ”—βœ¨ + - ⛅️ ${{ steps.cloudflare_url.outputs.stdout }} + + [build log](/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> $GITHUB_STEP_SUMMARY + + changelog: + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + name: Changelog + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + outputs: + releases_created: ${{ steps.tag-release.outputs.releases_created }} + steps: + - uses: GoogleCloudPlatform/release-please-action@v3 + id: tag-release + with: + token: ${{ secrets.GITHUB_TOKEN }} + release-type: node + monorepo-tags: true + changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"chore","section":"Other Changes","hidden":false}]' + release: name: Release + if: (github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.changelog.outputs.releases_created) || inputs.force_release runs-on: ubuntu-latest environment: name: production url: https://console.storacha.network + needs: + - test + - changelog steps: - uses: actions/checkout@v3 with: - ref: 'feat/storacha-skin' + ref: 'main' - uses: ./.github/actions/pnpm - name: create .env from .env.tpl setting env variables used by `pnpm run pages:build` run: | @@ -29,7 +126,7 @@ jobs: # add vars configuring console frontend to use staging w3up as backend echo "NEXT_PUBLIC_W3UP_SERVICE_DID=did:web:web3.storage" >> .env - echo "NEXT_PUBLIC_W3UP_SERVICE_URL=https://up.web3.storage" >> .env + echo "NEXT_PUBLIC_W3UP_SERVICE_URL=https://up.storacha.network" >> .env echo "NEXT_PUBLIC_W3UP_PROVIDER=did:web:web3.storage" >> .env echo "NEXT_PUBLIC_STRIPE_PRICING_TABLE_ID=prctbl_1OCJ1qF6A5ufQX5vM5DWg4rA" >> .env echo "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_live_51LO87hF6A5ufQX5vQTO5BHyz8y9ybJp4kg1GsBjYuqwluuwtQTkbeZzkoQweFQDlv7JaGjuIdUWAyuwXp3tmCfsM005lJK9aS8" >> .env diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0175ac6..cc033c5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,10 +2,10 @@ name: Deploy on: push: branches: - - main + - old-main pull_request: branches: - - main + - old-main jobs: test: uses: ./.github/workflows/test.yml @@ -18,8 +18,8 @@ jobs: permissions: pull-requests: write environment: - name: ${{ (github.ref_name == 'main') && 'staging' || format('preview-{0}', github.ref_name) }} - url: ${{ (github.ref_name == 'main') && 'https://staging.console.web3.storage/' || steps.cloudflare_url.outputs.stdout }} + name: ${{ (github.ref_name == 'old-main') && 'staging' || format('preview-{0}', github.ref_name) }} + url: ${{ (github.ref_name == 'old-main') && 'https://staging.console.web3.storage/' || steps.cloudflare_url.outputs.stdout }} steps: - uses: actions/checkout@v3 - uses: ./.github/actions/pnpm @@ -53,7 +53,7 @@ jobs: env: CLOUDFLARE_API_TOKEN: ${{ secrets.CF_TOKEN }} CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} - CLOUDFLARE_PAGES_PROJECT_NAME: ${{ (github.ref_name == 'main') && 'console-web3-storage-staging' || 'console-web3-storage-preview' }} + CLOUDFLARE_PAGES_PROJECT_NAME: ${{ (github.ref_name == 'old-main') && 'console-web3-storage-staging' || 'console-web3-storage-preview' }} - name: Find Cloudflare Pages preview URL uses: mathiasvr/command-output@v1.1.0 id: cloudflare_url @@ -80,7 +80,7 @@ jobs: [build log](/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> $GITHUB_STEP_SUMMARY changelog: - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + if: github.event_name == 'push' && github.ref == 'refs/heads/old-main' name: Changelog runs-on: ubuntu-latest permissions: @@ -99,7 +99,7 @@ jobs: release: name: Release - if: (github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.changelog.outputs.releases_created) || inputs.force_release + if: (github.event_name == 'push' && github.ref == 'refs/heads/old-main' && needs.changelog.outputs.releases_created) || inputs.force_release runs-on: ubuntu-latest environment: name: production @@ -137,7 +137,7 @@ jobs: uses: mathiasvr/command-output@v1.1.0 id: cloudflare with: - run: npx wrangler pages deploy --project-name console-web3-storage --branch "main" --commit-hash "$GITHUB_SHA" .vercel/output/static + run: npx wrangler pages deploy --project-name console-web3-storage --branch "old-main" --commit-hash "$GITHUB_SHA" .vercel/output/static env: CLOUDFLARE_API_TOKEN: ${{ secrets.CF_TOKEN }} CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} diff --git a/CHANGELOG.md b/CHANGELOG.md index bddf241..6a4ab5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,57 @@ # Changelog +## [1.12.0](https://github.com/storacha/console/compare/w3console-v1.11.0...w3console-v1.12.0) (2024-10-02) + + +### Features + +* add old web3 storage migrator ([#129](https://github.com/storacha/console/issues/129)) ([ba45a5f](https://github.com/storacha/console/commit/ba45a5fdebb7651e461f8bf55c93d5fcfc3a2204)) + +## [1.11.0](https://github.com/storacha/console/compare/w3console-v1.10.0...w3console-v1.11.0) (2024-09-24) + + +### Features + +* share spaces via email ([#123](https://github.com/storacha/console/issues/123)) ([896079b](https://github.com/storacha/console/commit/896079ba93c6b798a4239fa5b317c05654f01435)) + + +### Bug Fixes + +* import space preview ([#127](https://github.com/storacha/console/issues/127)) ([1f2acf6](https://github.com/storacha/console/commit/1f2acf64acbf2e603eaf4db06ba91ffdd614a1a4)) +* share space via ucan file ([#126](https://github.com/storacha/console/issues/126)) ([ba934a2](https://github.com/storacha/console/commit/ba934a23317aa94703591ef3cb99446aea265b66)) + +## [1.10.0](https://github.com/storacha/console/compare/w3console-v1.9.1...w3console-v1.10.0) (2024-09-20) + + +### Features + +* change email ([7c7beb7](https://github.com/storacha/console/commit/7c7beb7f9f78e25076bf089878d5e058cd52f680)) +* **copy:** Add missing comma ([#115](https://github.com/storacha/console/issues/115)) ([97f1ac3](https://github.com/storacha/console/commit/97f1ac3c455a97df00db2f512a665cd28b241a11)) +* Improved layout styling, and other tales ([#114](https://github.com/storacha/console/issues/114)) ([d0a2208](https://github.com/storacha/console/commit/d0a2208d04432b6f3537f2197238ac10bcc5148a)) +* more styles ([d4e8efa](https://github.com/storacha/console/commit/d4e8efa489974b4fc3603347142e474ac13c60bc)) +* styles for upload page ([6c54798](https://github.com/storacha/console/commit/6c54798b3850e1a7211313012aff7e84d4236b39)) +* trigger deploy ([a8f1089](https://github.com/storacha/console/commit/a8f108939fc8e9b399b58525fb5971b70071642f)) +* wording ([ffe9b1b](https://github.com/storacha/console/commit/ffe9b1b65ceb24ce7b18bfbf1e7a9a5a79868007)) + + +### Bug Fixes + +* apostrophe ([681b9b8](https://github.com/storacha/console/commit/681b9b8430181ef96544848e87d67481aa625d1a)) +* check ref ([f406ac9](https://github.com/storacha/console/commit/f406ac985419824308b561a39430a4a38c5e43c1)) +* deploy-storacha.yml needs to use the new main branch ([#122](https://github.com/storacha/console/issues/122)) ([65644c8](https://github.com/storacha/console/commit/65644c851272d5920bf1ed22fc6ff4a420f54242)) +* deploy.yml needs to use the old-main branch ([#120](https://github.com/storacha/console/issues/120)) ([713af05](https://github.com/storacha/console/commit/713af05572387fcf12cc34cec0dd1db4df0061ff)) +* quotes ([bcf209b](https://github.com/storacha/console/commit/bcf209bf830a83b71f0f3f9f61919832a3768057)) +* **space-creator:** check provision result before proceeding ([#119](https://github.com/storacha/console/issues/119)) ([5ea5940](https://github.com/storacha/console/commit/5ea59400f274f294e7ffb1aa99efab18ff099a9e)) +* use correct branch name ([f81e090](https://github.com/storacha/console/commit/f81e0907fcbed54323995acbb9c13f2c151f6db7)) +* use main branch ([698974b](https://github.com/storacha/console/commit/698974b36ff3c4cb0275a25aec4384fecb2723d2)) + + +### Other Changes + +* add storacha deploy action ([39345e6](https://github.com/storacha/console/commit/39345e60e639fd11eb9af44766d16fc71ed73945)) +* Set `packageManager` ([#117](https://github.com/storacha/console/issues/117)) ([c9436fc](https://github.com/storacha/console/commit/c9436fc323799fe1d5e3d0ced2a8789d3d7001f5)) +* update deploy name ([f7c1340](https://github.com/storacha/console/commit/f7c1340858e449e49237c7c40b85cebfa9721a01)) + ## [1.9.1](https://github.com/storacha-network/console/compare/w3console-v1.9.0...w3console-v1.9.1) (2024-07-15) diff --git a/README.md b/README.md index 4f30b4a..9f12bc1 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # Console -> Your dashboard for web3.storage +> Your dashboard for storacha.network Upload files & manage your spaces from your browser. ## Getting Started -To use the production site visit https://console.web3.storage +To use the production site visit https://console.storacha.network To contribute and customize console, copy `.env.tpl` to `.env` and run the development server: @@ -20,12 +20,12 @@ You can start editing the page by modifying `app/page.tsx`. The page auto-update ### Using an alternate w3up service -By default, this app connects to https://up.web3.storage. To use an alternate service, specify -the service URL and DID in your environment variables, like: +By default, this app connects to `https://up.web3.storage`, and uses `did:web:web3.storage` as provider. To use an alternate service and/or provider, specify the service URL, service DID and provider DID in your environment variables, like so: ``` NEXT_PUBLIC_W3UP_SERVICE_URL=https://your.w3up.service NEXT_PUBLIC_W3UP_SERVICE_DID=did:your-service-did +NEXT_PUBLIC_W3UP_PROVIDER=did:your-provider-did ``` An example `.env.local` file can be found in `.env.tpl`. @@ -33,5 +33,3 @@ An example `.env.local` file can be found in `.env.tpl`. If you are using `w3infra`, the service URL will be displayed as the `UploadApiStack`'s `ApiEndpoint` output once `npm start` has successfully set up your development environment.

⁂

- - diff --git a/package.json b/package.json index cec5878..77b72b1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,8 @@ { "name": "w3console", - "version": "1.9.1", + "version": "1.12.0", "private": true, + "packageManager": "pnpm@9.9.0+sha256.7a4261e50d9a44d9240baf6c9d6e10089dcf0a79d0007f2a26985a6927324177", "scripts": { "dev": "next dev", "build": "next build", @@ -22,13 +23,13 @@ "@ucanto/core": "^9.0.0", "@ucanto/interface": "^9.0.0", "@ucanto/transport": "^9.0.0", - "@w3ui/react": "^2.3.0", + "@w3ui/react": "2.4.0", "@web3-storage/access": "^19.0.0", "@web3-storage/capabilities": "^17.1.0", "@web3-storage/content-claims": "^3.2.1", "@web3-storage/data-segment": "^5.0.0", "@web3-storage/did-mailto": "^2.1.0", - "@web3-storage/w3up-client": "^13.1.1", + "@web3-storage/w3up-client": "13.1.1", "archy": "^1.0.0", "ariakit-utils": "0.17.0-next.27", "blueimp-md5": "^2.19.0", @@ -52,9 +53,9 @@ "@types/react": "latest", "@types/react-dom": "latest", "autoprefixer": "latest", - "eslint": "latest", - "eslint-config-next": "latest", - "eslint-plugin-next-on-pages": "^1.6.3", + "eslint": "8.55.0", + "eslint-config-next": "14.0.4", + "eslint-plugin-next-on-pages": "1.6.3", "postcss": "latest", "tailwindcss": "latest", "typescript": "latest", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3ac8a8d..dcba2d8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,8 +36,8 @@ importers: specifier: ^9.0.0 version: 9.0.0 '@w3ui/react': - specifier: ^2.3.0 - version: 2.3.0(@types/react@18.2.42)(encoding@0.1.13)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + specifier: 2.4.0 + version: 2.4.0(@types/react@18.2.42)(encoding@0.1.13)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@web3-storage/access': specifier: ^19.0.0 version: 19.0.0 @@ -54,7 +54,7 @@ importers: specifier: ^2.1.0 version: 2.1.0 '@web3-storage/w3up-client': - specifier: ^13.1.1 + specifier: 13.1.1 version: 13.1.1(encoding@0.1.13) archy: specifier: ^1.0.0 @@ -121,13 +121,13 @@ importers: specifier: latest version: 10.4.16(postcss@8.4.32) eslint: - specifier: latest + specifier: 8.55.0 version: 8.55.0 eslint-config-next: - specifier: latest + specifier: 14.0.4 version: 14.0.4(eslint@8.55.0)(typescript@5.3.3) eslint-plugin-next-on-pages: - specifier: ^1.6.3 + specifier: 1.6.3 version: 1.6.3(eslint@8.55.0) postcss: specifier: latest @@ -461,6 +461,7 @@ packages: '@humanwhocodes/config-array@0.11.13': resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==} engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} @@ -468,6 +469,7 @@ packages: '@humanwhocodes/object-schema@2.0.1': resolution: {integrity: sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==} + deprecated: Use @eslint/object-schema instead '@ipld/car@3.2.4': resolution: {integrity: sha512-rezKd+jk8AsTGOoJKqzfjLJ3WVft7NZNH95f0pfPbicROvzTyvHCNy567HzSUd6gRXZ9im29z5ZEv9Hw49jSYw==} @@ -490,6 +492,10 @@ packages: resolution: {integrity: sha512-N14oMy0q4gM6OuZkIpisKe0JBSjf1Jb39VI+7jMLiWX9124u1Z3Fdj/Tag1NA0cVxxqWDh0CqsjcVfOKtelPDA==} engines: {node: '>=16.0.0', npm: '>=7.0.0'} + '@ipld/dag-cbor@9.2.1': + resolution: {integrity: sha512-nyY48yE7r3dnJVlxrdaimrbloh4RokQaNRdI//btfTkcTEZbpmSrbYcBQ4VKTf8ZxXAOUJy4VsRpkJo+y9RTnA==} + engines: {node: '>=16.0.0', npm: '>=7.0.0'} + '@ipld/dag-json@10.2.2': resolution: {integrity: sha512-NnU8HdHKwAoGyrW3S09NMa8aZw0tImLRyR64hoafpLpDpAbA9g1+fb24JsdlugbL4sXUQVwDVA+qK4Ud8V83lA==} engines: {node: '>=16.0.0', npm: '>=7.0.0'} @@ -683,6 +689,13 @@ packages: '@sinclair/typebox@0.25.24': resolution: {integrity: sha512-XJfwUVUKDHF5ugKwIcxEgc9k8b7HbznCp6eUfWgu710hMPNIO4aw4/zB5RogDQz8nd6gyCDpU9O/m6qYEWY6yQ==} + '@storacha/one-webcrypto@1.0.1': + resolution: {integrity: sha512-bD+vWmcgsEBqU0Dz04BR43SA03bBoLTAY29vaKasY9Oe8cb6XIP0/vkm0OS2UwKC13c8uRgFW4rjJUgDCNLejQ==} + + '@storacha/one-webcrypto@https://codeload.github.com/web3-storage/one-webcrypto/tar.gz/9e029e2fd477bd95bb80abd3553bbac704ccc7a6': + resolution: {tarball: https://codeload.github.com/web3-storage/one-webcrypto/tar.gz/9e029e2fd477bd95bb80abd3553bbac704ccc7a6} + version: 1.0.1 + '@swc/helpers@0.5.2': resolution: {integrity: sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==} @@ -738,12 +751,12 @@ packages: '@types/node@20.10.4': resolution: {integrity: sha512-D08YG6rr8X90YB56tSIuBaddy/UXAA9RKJoFvrsnogAum/0pmjkgi4+2nx96A330FmioegBWmEYQ+syqCFaveg==} - '@types/node@20.12.12': - resolution: {integrity: sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==} - '@types/node@20.14.9': resolution: {integrity: sha512-06OCtnTXtWOZBJlRApleWndH4JsRVs1pDCc8dLSQp+7PpUpX3ePdHyeNSFTeSe7FtKyQkrlPvHwJOW3SLd8Oyg==} + '@types/node@22.7.0': + resolution: {integrity: sha512-MOdOibwBs6KW1vfqz2uKMlxq5xAfAZ98SZjO8e3XnAbFnTJtAspqhWk7hrdSAs9/Y14ZWMiy7/MxMUzAOadYEw==} + '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -898,11 +911,11 @@ packages: '@vercel/static-config@3.0.0': resolution: {integrity: sha512-2qtvcBJ1bGY0dYGYh3iM7yGKkk971FujLEDXzuW5wcZsPr1GSEjO/w2iSr3qve6nDDtBImsGoDEnus5FI4+fIw==} - '@w3ui/core@2.2.0': - resolution: {integrity: sha512-nIPlt658jplWMl6ymbgFJcn4gJV3vcj7bOm5NChlc64lzRpVfmamWd30yTkYWJ6CQeHYLoEwqmmnfjkXbUTfdg==} + '@w3ui/core@2.3.1': + resolution: {integrity: sha512-nA2RkJBavJsy93TdZUjvOQJruWlalT4DJsOo3YYEt9X2iGtdFJTluVcFy4TXJCo4cnw3y7hzkE1YtE+o0vu6Yw==} - '@w3ui/react@2.3.0': - resolution: {integrity: sha512-P3yC76zyq2au4odHITQ3gz5Y5zhrLFKQsVfT3OScidJCsKQkaG6RAYIkfwxRoXAKRAxuZyNiwtd4zoONTgRW8g==} + '@w3ui/react@2.4.0': + resolution: {integrity: sha512-78ZZvkoCyG9MudzK70uj1mOGuw8AtHUEZX3LIa2wVsW2FCiwOr4Oywk6fmXpGx5cHQ4mz5sAoQj71aA4tyZ4NQ==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -931,12 +944,22 @@ packages: '@web3-storage/access@19.0.0': resolution: {integrity: sha512-n+d+aoGPGhx70zEI7AKxJ1MD+esanTaXOomfasYGmmIWVqy85pCxC4CInM89qI/oY5BWPAcIAs6s+7mikYVceA==} + '@web3-storage/access@20.0.1': + resolution: {integrity: sha512-JlCTp1BlFmxrxpkkLo73tytHIv7J+l8++dP5ghYk5oEo2Om3mUq+T3KkkkjZ8d3omoWam6tGiTQXbc/awHJjDw==} + + '@web3-storage/blob-index@1.0.4': + resolution: {integrity: sha512-04+PrmVHFT+xzRhyIPdcvGc8Y2NDffUe8R1gJOyErVzEVz5N1I9Q/BrlFHYt/A4HrjM5JBsxqSrZgTIkjfPmLA==} + engines: {node: '>=16.15'} + '@web3-storage/capabilities@16.0.0': resolution: {integrity: sha512-wCjLpYc6t8tFRZrF2k2vBteJDWzHkmQjoJG0Yy/fjA04IjNN48iVZaCMQIANHXZxDGlYRGxhwzDwl4dovAdSTQ==} '@web3-storage/capabilities@17.1.0': resolution: {integrity: sha512-p5Wn2O3TSEZ7JFSph2KY9OuFnofbkhKi7Tp+1zcPEYAUsEvDWGabd1NvSPDDMpFBE74UX4ZljE8aQzDAtI3qRw==} + '@web3-storage/capabilities@17.3.0': + resolution: {integrity: sha512-9415OPNVYO5gXDVf1vzZywkjndKTVA9IPnU04lQXxUaYfYZ5S5kzV2PI1SvySMOsCNE7u7uSCTiclblx5gPYAg==} + '@web3-storage/car-block-validator@1.2.0': resolution: {integrity: sha512-KKQ/M5WtpH/JlkX+bQYKzdG4azmSF495T7vpewje2xh7MBh1d94/BLblxCcLM/larWvXDxOkbAyTTdlECAAuUw==} @@ -952,6 +975,9 @@ packages: '@web3-storage/data-segment@5.1.0': resolution: {integrity: sha512-FYdmtKvNiVz+maZ++k4PdD43rfJW5DeagLpstq2y84CyOKNRBWbHLCZ/Ec5zT9iGI+0WgsCGbpC/WlG0jlrnhA==} + '@web3-storage/data-segment@5.2.0': + resolution: {integrity: sha512-Jr/bdweoEQ0lWIaNuFcYxM6BHYmXHBWwfXygHyp370agkAdU+dIFIbm+tX+66XP/1YmEUi4JI2I80psDtoJ++Q==} + '@web3-storage/did-mailto@2.1.0': resolution: {integrity: sha512-TRmfSXj1IhtX3ESurSNOylZSBKi0z/VJNoMLpof+AVRdovgZjjocpiePQTs2pfHKqHTHfJXc9AboWyK4IKTWMw==} engines: {node: '>=16.15'} @@ -968,14 +994,17 @@ packages: '@web3-storage/upload-client@14.1.1': resolution: {integrity: sha512-sg44cd0hmKcI7I8eK5UOiZfdrtPf9DfMWRfBum/5gYLwD5VZazBd+mkqjihNqGOiE4mhbn6DtLVIRNzgP7Wfog==} - '@web3-storage/w3up-client@13.1.0': - resolution: {integrity: sha512-XxdWUqIGaeBsuqX9C5FHLD4vIq0DAytMs8NP6AlCwK1wgMYqsjw1dCzNGCFM60gQGzYgoRBn8+CTJ1ftDnv0PA==} - engines: {node: '>=18'} + '@web3-storage/upload-client@17.0.1': + resolution: {integrity: sha512-+ELz3y32YmiMvuPD/fZgCEqn/KvvoUKcZ2ao+9wosfs6GJ8/j6lhxkEkwnICiwU2tLEB+FUsOuCDFquOSW1rKg==} '@web3-storage/w3up-client@13.1.1': resolution: {integrity: sha512-dZzRPHyRQIBABHwGWRJd6iTkpkp5dIxwZY3/rVUy6KBAKVCV4Ei8WmyI1m+NDt/MO7XpBrWg+uNRivEKZWinCw==} engines: {node: '>=18'} + '@web3-storage/w3up-client@16.2.0': + resolution: {integrity: sha512-gqzq03gcu14UrNw5Nwi7j6bqA3HLjnPDITo/qJBzaeRRfoBgnB6nrakIkR/SVhKqZ43VRy0MpxUhUmTLxW3kFQ==} + engines: {node: '>=18'} + '@zxing/text-encoding@0.9.0': resolution: {integrity: sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==} @@ -1277,6 +1306,9 @@ packages: carstream@1.1.0: resolution: {integrity: sha512-tbf8FOnGX1+0kOe77nm9MG53REiqQopDwzwbXYVxUcsKOAHG2KSD++qy95v1vrtRt1Q6L0Sb01it7QwJ+Yt1sQ==} + carstream@2.2.0: + resolution: {integrity: sha512-/gHkK0lQjmGM45fhdx8JD+x7a1XS1qUk3T9xWWSt3oZiWPLq4u/lnDstp+N55K7hqTKKlb0CCr43EHTrlbmJSQ==} + cborg@1.10.2: resolution: {integrity: sha512-b3tFPA9pUr2zCUiCfRd2+wok2/LBSNUMKOuRRok+WlvvAgEt/PlbgPTsZUcwCOs53IJvLgTp0eotwtosE6njug==} hasBin: true @@ -2087,6 +2119,7 @@ packages: glob@7.1.7: resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==} + deprecated: Glob versions prior to v9 are no longer supported glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} @@ -2719,6 +2752,9 @@ packages: multiformats@13.1.0: resolution: {integrity: sha512-HzdtdBwxsIkzpeXzhQ5mAhhuxcHbjEHH+JQoxt7hG/2HGFjjwyolLo7hbaexcnhoEuV4e0TNJ8kkpMjiEYY4VQ==} + multiformats@13.3.0: + resolution: {integrity: sha512-CBiqvsufgmpo01VT5ze94O+uc+Pbf6f/sThlvWss0sBZmAOu6GQn5usrYV2sf2mr17FWYc0rO8c/CNe2T90QAA==} + multiformats@9.9.0: resolution: {integrity: sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg==} @@ -2885,10 +2921,6 @@ packages: one-webcrypto@1.0.3: resolution: {integrity: sha512-fu9ywBVBPx0gS9K0etIROTiCkvI5S1TDjFsYFb3rC1ewFxeOqsbzq7aIMBHsYfrTHBcGXJaONXXjTl8B01cW1Q==} - one-webcrypto@https://codeload.github.com/web3-storage/one-webcrypto/tar.gz/5148cd14d5489a8ac4cd38223870e02db15a2382: - resolution: {tarball: https://codeload.github.com/web3-storage/one-webcrypto/tar.gz/5148cd14d5489a8ac4cd38223870e02db15a2382} - version: 1.0.3 - onetime@5.1.2: resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} engines: {node: '>=6'} @@ -3626,6 +3658,9 @@ packages: undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + undici-types@6.19.8: + resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + undici@5.25.4: resolution: {integrity: sha512-450yJxT29qKMf3aoudzFpIciqpx6Pji3hEWaXqXmanbXF58LTAGCKxcJjxMXWu3iG+Mudgo3ZUfDB6YDFd/dAw==} engines: {node: '>=14.0'} @@ -4090,6 +4125,11 @@ snapshots: cborg: 4.0.3 multiformats: 13.1.0 + '@ipld/dag-cbor@9.2.1': + dependencies: + cborg: 4.0.3 + multiformats: 13.3.0 + '@ipld/dag-json@10.2.2': dependencies: cborg: 4.0.3 @@ -4277,6 +4317,10 @@ snapshots: '@sinclair/typebox@0.25.24': {} + '@storacha/one-webcrypto@1.0.1': {} + + '@storacha/one-webcrypto@https://codeload.github.com/web3-storage/one-webcrypto/tar.gz/9e029e2fd477bd95bb80abd3553bbac704ccc7a6': {} + '@swc/helpers@0.5.2': dependencies: tslib: 2.6.2 @@ -4324,13 +4368,13 @@ snapshots: dependencies: undici-types: 5.26.5 - '@types/node@20.12.12': + '@types/node@20.14.9': dependencies: undici-types: 5.26.5 - '@types/node@20.14.9': + '@types/node@22.7.0': dependencies: - undici-types: 5.26.5 + undici-types: 6.19.8 '@types/normalize-package-data@2.4.4': {} @@ -4634,24 +4678,24 @@ snapshots: json-schema-to-ts: 1.6.4 ts-morph: 12.0.0 - '@w3ui/core@2.2.0(encoding@0.1.13)': + '@w3ui/core@2.3.1(encoding@0.1.13)': dependencies: '@ipld/dag-ucan': 3.4.0 '@ucanto/client': 9.0.1 '@ucanto/interface': 10.0.1 '@ucanto/principal': 9.0.1 '@ucanto/transport': 9.1.1 - '@web3-storage/access': 18.4.0 + '@web3-storage/access': 20.0.1 '@web3-storage/did-mailto': 2.1.0 - '@web3-storage/w3up-client': 13.1.0(encoding@0.1.13) + '@web3-storage/w3up-client': 16.2.0(encoding@0.1.13) transitivePeerDependencies: - encoding - '@w3ui/react@2.3.0(@types/react@18.2.42)(encoding@0.1.13)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': + '@w3ui/react@2.4.0(@types/react@18.2.42)(encoding@0.1.13)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@ariakit/react': 0.3.14(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@ariakit/react-core': 0.3.14(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - '@w3ui/core': 2.2.0(encoding@0.1.13) + '@w3ui/core': 2.3.1(encoding@0.1.13) ariakit-react-utils: 0.17.0-next.27(@types/react@18.2.42)(react@18.2.0) react: 18.2.0 transitivePeerDependencies: @@ -4707,7 +4751,7 @@ snapshots: bigint-mod-arith: 3.3.1 conf: 11.0.2 multiformats: 12.1.3 - one-webcrypto: https://codeload.github.com/web3-storage/one-webcrypto/tar.gz/5148cd14d5489a8ac4cd38223870e02db15a2382 + one-webcrypto: '@storacha/one-webcrypto@https://codeload.github.com/web3-storage/one-webcrypto/tar.gz/9e029e2fd477bd95bb80abd3553bbac704ccc7a6' p-defer: 4.0.1 type-fest: 4.18.2 uint8arrays: 4.0.9 @@ -4728,11 +4772,43 @@ snapshots: bigint-mod-arith: 3.3.1 conf: 11.0.2 multiformats: 12.1.3 - one-webcrypto: https://codeload.github.com/web3-storage/one-webcrypto/tar.gz/5148cd14d5489a8ac4cd38223870e02db15a2382 + one-webcrypto: '@storacha/one-webcrypto@https://codeload.github.com/web3-storage/one-webcrypto/tar.gz/9e029e2fd477bd95bb80abd3553bbac704ccc7a6' + p-defer: 4.0.1 + type-fest: 4.18.2 + uint8arrays: 4.0.9 + + '@web3-storage/access@20.0.1': + dependencies: + '@ipld/car': 5.2.4 + '@ipld/dag-ucan': 3.4.0 + '@scure/bip39': 1.3.0 + '@storacha/one-webcrypto': 1.0.1 + '@ucanto/client': 9.0.1 + '@ucanto/core': 10.0.1 + '@ucanto/interface': 10.0.1 + '@ucanto/principal': 9.0.1 + '@ucanto/transport': 9.1.1 + '@ucanto/validator': 9.0.2 + '@web3-storage/capabilities': 17.3.0 + '@web3-storage/did-mailto': 2.1.0 + bigint-mod-arith: 3.3.1 + conf: 11.0.2 + multiformats: 12.1.3 p-defer: 4.0.1 type-fest: 4.18.2 uint8arrays: 4.0.9 + '@web3-storage/blob-index@1.0.4': + dependencies: + '@ipld/dag-cbor': 9.2.0 + '@storacha/one-webcrypto': 1.0.1 + '@ucanto/core': 10.0.1 + '@ucanto/interface': 10.0.1 + '@web3-storage/capabilities': 17.3.0 + carstream: 2.2.0 + multiformats: 13.1.0 + uint8arrays: 5.1.0 + '@web3-storage/capabilities@16.0.0': dependencies: '@ucanto/core': 10.0.1 @@ -4753,6 +4829,16 @@ snapshots: '@web3-storage/data-segment': 3.2.0 uint8arrays: 5.1.0 + '@web3-storage/capabilities@17.3.0': + dependencies: + '@ucanto/core': 10.0.1 + '@ucanto/interface': 10.0.1 + '@ucanto/principal': 9.0.1 + '@ucanto/transport': 9.1.1 + '@ucanto/validator': 9.0.2 + '@web3-storage/data-segment': 5.2.0 + uint8arrays: 5.1.0 + '@web3-storage/car-block-validator@1.2.0': dependencies: '@multiformats/blake2': 1.0.13 @@ -4787,6 +4873,12 @@ snapshots: multiformats: 11.0.2 sync-multihash-sha2: 1.0.0 + '@web3-storage/data-segment@5.2.0': + dependencies: + '@ipld/dag-cbor': 9.2.1 + multiformats: 13.3.0 + sync-multihash-sha2: 1.0.0 + '@web3-storage/did-mailto@2.1.0': {} '@web3-storage/filecoin-client@3.3.3': @@ -4822,7 +4914,28 @@ snapshots: transitivePeerDependencies: - encoding - '@web3-storage/w3up-client@13.1.0(encoding@0.1.13)': + '@web3-storage/upload-client@17.0.1(encoding@0.1.13)': + dependencies: + '@ipld/car': 5.2.4 + '@ipld/dag-cbor': 9.2.0 + '@ipld/dag-ucan': 3.4.0 + '@ipld/unixfs': 2.2.0 + '@ucanto/client': 9.0.1 + '@ucanto/core': 10.0.1 + '@ucanto/interface': 10.0.1 + '@ucanto/transport': 9.1.1 + '@web3-storage/blob-index': 1.0.4 + '@web3-storage/capabilities': 17.3.0 + '@web3-storage/data-segment': 5.1.0 + '@web3-storage/filecoin-client': 3.3.3 + ipfs-utils: 9.0.14(encoding@0.1.13) + multiformats: 12.1.3 + p-retry: 5.1.2 + varint: 6.0.0 + transitivePeerDependencies: + - encoding + + '@web3-storage/w3up-client@13.1.1(encoding@0.1.13)': dependencies: '@ipld/dag-ucan': 3.4.0 '@ucanto/client': 9.0.1 @@ -4838,7 +4951,7 @@ snapshots: transitivePeerDependencies: - encoding - '@web3-storage/w3up-client@13.1.1(encoding@0.1.13)': + '@web3-storage/w3up-client@16.2.0(encoding@0.1.13)': dependencies: '@ipld/dag-ucan': 3.4.0 '@ucanto/client': 9.0.1 @@ -4846,11 +4959,12 @@ snapshots: '@ucanto/interface': 10.0.1 '@ucanto/principal': 9.0.1 '@ucanto/transport': 9.1.1 - '@web3-storage/access': 18.4.0 - '@web3-storage/capabilities': 17.1.0 + '@web3-storage/access': 20.0.1 + '@web3-storage/blob-index': 1.0.4 + '@web3-storage/capabilities': 17.3.0 '@web3-storage/did-mailto': 2.1.0 '@web3-storage/filecoin-client': 3.3.3 - '@web3-storage/upload-client': 14.1.1(encoding@0.1.13) + '@web3-storage/upload-client': 17.0.1(encoding@0.1.13) transitivePeerDependencies: - encoding @@ -5179,6 +5293,12 @@ snapshots: multiformats: 12.1.3 uint8arraylist: 2.4.7 + carstream@2.2.0: + dependencies: + '@ipld/dag-cbor': 9.2.0 + multiformats: 13.1.0 + uint8arraylist: 2.4.7 + cborg@1.10.2: {} cborg@4.0.3: {} @@ -6857,6 +6977,8 @@ snapshots: multiformats@13.1.0: {} + multiformats@13.3.0: {} + multiformats@9.9.0: {} murmurhash3js-revisited@3.0.0: {} @@ -7040,8 +7162,6 @@ snapshots: one-webcrypto@1.0.3: {} - one-webcrypto@https://codeload.github.com/web3-storage/one-webcrypto/tar.gz/5148cd14d5489a8ac4cd38223870e02db15a2382: {} - onetime@5.1.2: dependencies: mimic-fn: 2.1.0 @@ -7250,7 +7370,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 20.12.12 + '@types/node': 22.7.0 long: 5.2.3 pump@3.0.0: @@ -7857,6 +7977,8 @@ snapshots: undici-types@5.26.5: {} + undici-types@6.19.8: {} + undici@5.25.4: dependencies: '@fastify/busboy': 2.0.0 diff --git a/public/favicon.ico b/public/favicon.ico index 821fd0e..ac3d5c6 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/public/racha-fire-opacity-50.png b/public/racha-fire-opacity-50.png new file mode 100644 index 0000000..5eadb18 Binary files /dev/null and b/public/racha-fire-opacity-50.png differ diff --git a/public/racha-fire.jpg b/public/racha-fire.jpg new file mode 100644 index 0000000..4f69e80 Binary files /dev/null and b/public/racha-fire.jpg differ diff --git a/public/racha-fire.png b/public/racha-fire.png new file mode 100644 index 0000000..4128d96 Binary files /dev/null and b/public/racha-fire.png differ diff --git a/public/storacha-logo.svg b/public/storacha-logo.svg new file mode 100644 index 0000000..0b8b883 --- /dev/null +++ b/public/storacha-logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/web3storage-psa-logo.png b/public/web3storage-psa-logo.png new file mode 100644 index 0000000..9b61164 Binary files /dev/null and b/public/web3storage-psa-logo.png differ diff --git a/src/app/globals.css b/src/app/globals.css index 376e0cf..116fdb7 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -2,6 +2,75 @@ @tailwind components; @tailwind utilities; +:root { + --hot-red: #E91315; + --hot-red-light: #EFE3F3; + --hot-yellow: #FFC83F; + --hot-yellow-light: #FFE4AE; + --hot-blue: #0176CE; + --hot-blue-light: #BDE0FF; +} + +.font-epilogue { + font-family: "Epilogue", sans-serif; + font-optical-sizing: auto; + font-weight: 400; + font-style: normal; +} +.bg-racha-fire { + background: var(--hot-red-light) url("/racha-fire.png") bottom left; + background-size: 100% auto; + background-position: bottom; + background-repeat: no-repeat; +} +.bg-racha-fire\/50 { + background: transparent url("/racha-fire-opacity-50.png") bottom left; + background-size: 100% auto; + background-position: bottom; + background-repeat: no-repeat; +} +.bg-hot-red, +.hover\:bg-hot-red:hover { + background-color: var(--hot-red); +} +.bg-hot-red-light, +.hover\:bg-hot-red-light:hover { + background-color: var(--hot-red-light); +} +.bg-hot-blue-light { + background-color: var(--hot-blue-light); +} +.bg-hot-yellow { + background-color: var(--hot-yellow); +} +.hover\:bg-hot-yellow:hover { + background-color: var(--hot-yellow); +} +.bg-hot-yellow-light, +.hover\:bg-hot-yellow-light:hover { + background-color: var(--hot-yellow-light); +} +.border-hot-red, +.hover\:border-hot-red:hover { + border-color: var(--hot-red); +} +.border-hot-yellow { + border-color: var(--hot-yellow); +} +.border-hot-yellow-light { + border-color: var(--hot-yellow-light); +} +.text-hot-red, +.hover\:text-hot-red:hover { + color: var(--hot-red); +} +.text-hot-yellow { + color: var(--hot-yellow); +} +.text-hot-blue { + color: var(--hot-blue); +} + .w3ui-button-colors { @apply text-white bg-slate-800 hover:bg-blue-800 transition-colors ease-in; } @@ -23,7 +92,7 @@ } .authenticator { - @apply bg-zinc-950 w-full h-screen flex flex-col justify-center items-center; + @apply bg-racha-fire w-full min-h-screen flex flex-col justify-center items-center py-4; } @keyframes bgPosDrift { diff --git a/src/app/layout.tsx b/src/app/layout.tsx index b07fc06..3290214 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -5,8 +5,8 @@ import Toaster from '@/components/Toaster' import { Provider as MigrationsProvider } from '@/components/MigrationsProvider' export const metadata: Metadata = { - title: 'w3up console', - description: 'web3.storage management console', + title: 'Storacha console', + description: 'Storacha management console', } export default function RootLayout ({ @@ -16,7 +16,12 @@ export default function RootLayout ({ }) { return ( - + + + + + + {children} diff --git a/src/app/migration/[id]/page.tsx b/src/app/migration/[id]/page.tsx index a40a0e0..d719c0f 100644 --- a/src/app/migration/[id]/page.tsx +++ b/src/app/migration/[id]/page.tsx @@ -8,9 +8,10 @@ import { useMigrations } from '@/components/MigrationsProvider' import { DidIcon } from '@/components/DidIcon' import CopyIcon from '@/components/CopyIcon' import { CheckCircleIcon, ClockIcon, FlagIcon } from '@heroicons/react/20/solid' -import { Migration, MigrationProgress } from '@/lib/migrations/api' +import { Migration, Progress } from '@/lib/migrations/api' import { useRouter } from 'next/navigation' import { UnknownLink } from '@w3ui/react' +import { dataSources } from '@/app/migration/data-sources' interface PageProps { params: { @@ -49,6 +50,9 @@ export default function MigrationPage ({ params }: PageProps): JSX.Element { const migration = migrations.find(m => m.id === params.id) if (!migration) return

Migration not found

+ const ds = dataSources.find(({ source }) => source.id === migration.source) + if (!ds) return

Unknown data source

+ const handleRemove = () => { removeMigration(migration.id) router.replace('/') @@ -56,8 +60,8 @@ export default function MigrationPage ({ params }: PageProps): JSX.Element { return (
-

Migrating from {migration.source}

-
+

Migrating from {ds.name}

+

Target

@@ -114,7 +118,7 @@ const LogLines = ({ lines }: { lines: string[] }) => { ref.current?.scrollIntoView({ block: 'end', behavior: 'smooth' }) }) return ( -
+    
       {lines.map(line => `${line}\n`)}
       {lines.length ? '' : 'No logs yet!'}
       
@@ -122,7 +126,7 @@ const LogLines = ({ lines }: { lines: string[] }) => { ) } -const ProgressBar = ({ progress }: { progress?: MigrationProgress }) => { +const ProgressBar = ({ progress }: { progress?: Progress }) => { const attempted = progress ? progress.succeeded + progress.failed.length : 0 const failed = progress?.failed.length const total = progress ? attempted + progress.pending : 0 @@ -142,12 +146,12 @@ const ProgressBar = ({ progress }: { progress?: MigrationProgress }) => { ) } -const RemoveButton = ({ onRemove, progress }: { onRemove: () => void, progress?: MigrationProgress }) => { +const RemoveButton = ({ onRemove, progress }: { onRemove: () => void, progress?: Progress }) => { const [isRemoveConfirmModalOpen, setRemoveConfirmModalOpen] = useState(false) if (progress && progress.pending <= 0) { return ( - ) @@ -155,7 +159,7 @@ const RemoveButton = ({ onRemove, progress }: { onRemove: () => void, progress?: return ( <> - { setConfirmed(false); onCancel() }} className='relative z-50'>