diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index 6070e40e..00000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -ARG VARIANT="lts-bullseye" - -FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT} - -RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index b00a7733..00000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "Node.js", - - "build": { - "dockerfile": "Dockerfile", - "args": { "VARIANT": "16-bullseye" } - }, - - // Set *default* container specific settings.json values on container create. - "settings": {}, - - // Add the IDs of extensions you want installed when the container is created. - "extensions": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "lokalise.i18n-ally"], - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - "forwardPorts": [80, 5432], - - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "pnpm install", - - // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. - "remoteUser": "node", - - "features": { - "docker-from-docker": "latest" - } -} diff --git a/.dockerignore b/.dockerignore index 1c360636..0f7eff6d 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,13 +1,22 @@ +# Android App +/app + # Build Artifacts dist .next +.turbo # IDEs .vscode # Project Metadata +.crowdin.yml + +# Documentation README.md +SECURITY.md CHANGELOG.md +CODE_OF_CONDUCT.md # Project Dependencies node_modules @@ -16,6 +25,3 @@ node_modules Dockerfile .dockerignore docker-compose.yml - -# Android App -/app \ No newline at end of file diff --git a/.env.example b/.env.example index c6dc04ba..e546cb72 100644 --- a/.env.example +++ b/.env.example @@ -1,7 +1,11 @@ +# Turbo Cache (Optional) +TURBO_TEAM= +TURBO_TOKEN= + # Server + Client TZ=UTC PUBLIC_URL=http://localhost:3000 -PUBLIC_SERVER_URL=http://localhost:3000/api +PUBLIC_SERVER_URL=http://localhost:3100 PUBLIC_GOOGLE_CLIENT_ID= # Server + Database @@ -18,10 +22,12 @@ JWT_SECRET= JWT_EXPIRY_TIME=604800 GOOGLE_CLIENT_SECRET= GOOGLE_API_KEY= -SENDGRID_API_KEY= -SENDGRID_FORGOT_PASSWORD_TEMPLATE_ID= -SENDGRID_FROM_NAME= -SENDGRID_FROM_EMAIL= +MAIL_FROM_NAME= +MAIL_FROM_EMAIL= +MAIL_HOST= +MAIL_PORT= +MAIL_USERNAME= +MAIL_PASSWORD= STORAGE_BUCKET= STORAGE_REGION= STORAGE_ENDPOINT= diff --git a/.eslintrc.json b/.eslintrc.json index c9c7e52f..fb137075 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,31 +1,22 @@ { - "root": true, "ignorePatterns": ["/app"], "parser": "@typescript-eslint/parser", - "extends": ["plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"], - "plugins": ["@typescript-eslint/eslint-plugin", "simple-import-sort", "unused-imports"], + "extends": ["plugin:@typescript-eslint/recommended"], + "plugins": ["@typescript-eslint/eslint-plugin", "simple-import-sort"], "rules": { + // ESLint + "no-unused-vars": "off", + + // Simple Import Sort + "simple-import-sort/imports": "error", + "simple-import-sort/exports": "error", + // TypeScript ESLint "@typescript-eslint/no-unused-vars": "off", "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/interface-name-prefix": "off", "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/explicit-module-boundary-types": "off", - // Simple Import Sort - "simple-import-sort/imports": "error", - "simple-import-sort/exports": "error", - // Unused Imports - "no-unused-vars": "off", - "unused-imports/no-unused-imports": "error", - "unused-imports/no-unused-vars": [ - "warn", - { - "vars": "all", - "varsIgnorePattern": "^_", - "args": "none", - "argsIgnorePattern": "^_" - } - ] + "@typescript-eslint/explicit-module-boundary-types": "off" }, "overrides": [ { diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 3bc75c16..1de93789 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1,2 @@ +github: AmruthPillai custom: https://paypal.me/RajaRajanA diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index bc40df86..9bb7695f 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -1,36 +1,43 @@ --- name: Bug Report about: Create a report to help improve -title: "[BUG] " +title: '[BUG] ' labels: bug assignees: '' - --- **Describe the bug** + **Product Flavor** + - [ ] Managed (https://rxresu.me) - [ ] Self Hosted **To Reproduce** + + 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error **Expected behavior** + **Screenshots** + **Desktop (please complete the following information):** - - OS: - - Browser - - Version + +- OS: +- Browser +- Version **Additional context** + diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md index e9ec9757..f90431ad 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -1,20 +1,23 @@ --- name: Feature Request about: Suggest an idea for this project -title: "[FEATURE] " +title: '[FEATURE] ' labels: enhancement assignees: '' - --- **Is your feature request related to a problem? Please describe.** + **Describe the solution you'd like** + **Describe alternatives you've considered** + **Additional context** + diff --git a/.github/workflows/digitalocean-deploy.yml b/.github/workflows/digitalocean-deploy.yml index 57d473e5..ad056d81 100644 --- a/.github/workflows/digitalocean-deploy.yml +++ b/.github/workflows/digitalocean-deploy.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Install DigitalOcean CLI - uses: digitalocean/action-doctl@v2.1.1 + uses: digitalocean/action-doctl@v2.2.0 with: token: ${{ secrets.DIGITALOCEAN_TOKEN }} diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index bf14c600..6fae5698 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -9,72 +9,104 @@ jobs: name: Client runs-on: ubuntu-latest + env: + TURBO_TEAM: ${{ secrets.TURBO_TEAM }} + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + steps: - name: Checkout the repository - uses: actions/checkout@v3.0.2 + uses: actions/checkout@v3.1.0 + with: + fetch-depth: 2 - id: version name: Get Version - run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} + run: echo "version=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2.1.0 + + - id: buildx + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2.2.1 + with: + install: true - name: Login to Docker Hub - uses: docker/login-action@v2.0.0 + uses: docker/login-action@v2.1.0 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to GitHub Container Registry - uses: docker/login-action@v2.0.0 + uses: docker/login-action@v2.1.0 with: registry: ghcr.io username: $GITHUB_REPOSITORY_OWNER password: ${{ secrets.GH_TOKEN }} - name: Build and Push Client Image - uses: docker/build-push-action@v3.0.0 + uses: docker/build-push-action@v3.2.0 with: context: . push: true file: client/Dockerfile + platforms: linux/amd64,linux/arm64 tags: | amruthpillai/reactive-resume:client-latest - amruthpillai/reactive-resume:client-${{ steps.version.outputs.tag }} + amruthpillai/reactive-resume:client-${{ env.version }} ghcr.io/amruthpillai/reactive-resume:client-latest - ghcr.io/amruthpillai/reactive-resume:client-${{ steps.version.outputs.tag }} + ghcr.io/amruthpillai/reactive-resume:client-${{ env.version }} server: name: Server runs-on: ubuntu-latest + env: + TURBO_TEAM: ${{ secrets.TURBO_TEAM }} + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + steps: - name: Checkout the repository - uses: actions/checkout@v3.0.2 + uses: actions/checkout@v3.1.0 + with: + fetch-depth: 2 - id: version name: Get Version - run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} + run: echo "version=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2.1.0 + + - id: buildx + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2.2.1 + with: + install: true - name: Login to Docker Hub - uses: docker/login-action@v2.0.0 + uses: docker/login-action@v2.1.0 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to GitHub Container Registry - uses: docker/login-action@v2.0.0 + uses: docker/login-action@v2.1.0 with: registry: ghcr.io username: $GITHUB_REPOSITORY_OWNER password: ${{ secrets.GH_TOKEN }} - name: Build and Push Server Image - uses: docker/build-push-action@v3.0.0 + uses: docker/build-push-action@v3.2.0 with: context: . push: true file: server/Dockerfile + platforms: linux/amd64,linux/arm64 tags: | amruthpillai/reactive-resume:server-latest - amruthpillai/reactive-resume:server-${{ steps.version.outputs.tag }} + amruthpillai/reactive-resume:server-${{ env.version }} ghcr.io/amruthpillai/reactive-resume:server-latest - ghcr.io/amruthpillai/reactive-resume:server-${{ steps.version.outputs.tag }} + ghcr.io/amruthpillai/reactive-resume:server-${{ env.version }} diff --git a/.gitignore b/.gitignore index bd682b05..b76b46fe 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,7 @@ node_modules # macOS -.DS_Store \ No newline at end of file +.DS_Store + +# Turbo +.turbo \ No newline at end of file diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100755 index 02444ade..00000000 --- a/.husky/pre-commit +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -pnpm install -pnpm run lint -pnpm run format \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index 3f4fce07..1b149073 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,6 @@ +# Android App +/app + # Schema schema/dist @@ -18,15 +21,9 @@ CHANGELOG.md # Project Dependencies node_modules +pnpm-lock.yaml # Docker Dockerfile .dockerignore -docker-compose.yml - -# Android App -/app - -# Docs -docs/build -docs/.docusaurus \ No newline at end of file +docker-compose.yml \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json index f93861eb..d8fa4eca 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,3 +1,7 @@ { - "recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "lokalise.i18n-ally"] -} + "recommendations": [ + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode", + "lokalise.i18n-ally" + ] +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index c19ed6d8..00000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "type": "node", - "request": "attach", - "name": "Debug: Server", - "port": 9229, - "restart": true, - "stopOnEntry": false, - "protocol": "inspector" - }, - { - "name": "Debug: Client", - "type": "node-terminal", - "request": "launch", - "command": "pnpm run dev:client", - "console": "integratedTerminal", - "serverReadyAction": { - "pattern": "started server on .+, url: (https?://.+)", - "uriFormat": "%s", - "action": "debugWithChrome" - } - } - ] -} diff --git a/.vscode/settings.json b/.vscode/settings.json index d793699d..fba60638 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,25 +1,22 @@ { "css.validate": false, + "scss.validate": false, + "editor.wordWrap": "on", + "npm.packageManager": "pnpm", + "editor.formatOnSave": true, + "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.codeActionsOnSave": { "source.fixAll.eslint": true }, - "editor.defaultFormatter": "esbenp.prettier-vscode", - "editor.formatOnSave": true, - "editor.wordWrap": "on", "eslint.workingDirectories": [ "schema", "client", "server" ], - "i18n-ally.enabledFrameworks": [ - "react" - ], - "i18n-ally.keystyle": "nested", - "i18n-ally.localesPaths": [ - "client/public/locales" - ], - "i18n-ally.namespace": true, - "i18n-ally.pathMatcher": "{locale}/{namespaces}.{ext}", - "i18n-ally.sortKeys": true, - "scss.validate": false + "conventionalCommits.scopes": [ + "client", + "server", + "docker", + "dependencies" + ] } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index a49531f3..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,293 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -### [3.4.8](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.4.7...v3.4.8) (2022-07-13) - - -### Features - -* **google:** add toast to display error message from google ([25cf594](https://github.com/AmruthPillai/Reactive-Resume/commit/25cf594eb948e1c2d6157028ee1fff2799df5f92)) - -### [3.4.7](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.4.6...v3.4.7) (2022-06-30) - - -### Bug Fixes - -* **mui:** update mui datepickers to newer package ([bfb48e3](https://github.com/AmruthPillai/Reactive-Resume/commit/bfb48e3aa7e0575922841522edc1d38544d1884f)) - -### [3.4.6](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.4.5...v3.4.6) (2022-06-19) - -## [3.6.0](https://github.com/dvd741-a/Reactive-Resume/compare/v3.3.4...v3.6.0) (2022-06-05) - - -### Features - -* **all:** upgrade to v3.4.0 ([87d381f](https://github.com/dvd741-a/Reactive-Resume/commit/87d381fe8eab9ca4624df5de6e8b9ab18a072b67)) -* **i18n:** add Hungrarian (Magyar) language ([35fe4e2](https://github.com/dvd741-a/Reactive-Resume/commit/35fe4e27744b6f7325b25db2cf3b626ed8598623)) - - -### Bug Fixes - -* **i18n:** fix language mismatch in exported pdf ([62fd63e](https://github.com/dvd741-a/Reactive-Resume/commit/62fd63e41fe10fba843a40fb08191f5944f2b2fc)) -* **typeorm:** update typeorm to latest 0.2.x for secpatch ([5bdb92b](https://github.com/dvd741-a/Reactive-Resume/commit/5bdb92b1cff9e56879f9bbf31801d6554a00a8d5)) - -## [3.5.0](https://github.com/dvd741-a/Reactive-Resume/compare/v3.3.4...v3.5.0) (2022-06-05) - - -### Features - -* **all:** upgrade to v3.4.0 ([87d381f](https://github.com/dvd741-a/Reactive-Resume/commit/87d381fe8eab9ca4624df5de6e8b9ab18a072b67)) -* **i18n:** add Hungrarian (Magyar) language ([35fe4e2](https://github.com/dvd741-a/Reactive-Resume/commit/35fe4e27744b6f7325b25db2cf3b626ed8598623)) - - -### Bug Fixes - -* **i18n:** fix language mismatch in exported pdf ([62fd63e](https://github.com/dvd741-a/Reactive-Resume/commit/62fd63e41fe10fba843a40fb08191f5944f2b2fc)) -* **typeorm:** update typeorm to latest 0.2.x for secpatch ([5bdb92b](https://github.com/dvd741-a/Reactive-Resume/commit/5bdb92b1cff9e56879f9bbf31801d6554a00a8d5)) - -### [3.4.5](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.4.4...v3.4.5) (2022-05-24) - - -### Bug Fixes - -* **i18n:** fix language mismatch in exported pdf ([62fd63e](https://github.com/AmruthPillai/Reactive-Resume/commit/62fd63e41fe10fba843a40fb08191f5944f2b2fc)) - -## [3.4.4](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.4.3...v3.4.4) (2022-05-02) - -### Features - -* **i18n:** add Hungrarian (Magyar) language ([35fe4e2](https://github.com/AmruthPillai/Reactive-Resume/commit/35fe4e27744b6f7325b25db2cf3b626ed8598623)) - -### [3.4.3](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.4.2...v3.4.3) (2022-05-01) - -### [3.4.2](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.4.1...v3.4.2) (2022-04-30) - -### [3.4.1](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.4.0...v3.4.1) (2022-04-30) - - -### Bug Fixes - -* **typeorm:** update typeorm to latest 0.2.x for secpatch ([5bdb92b](https://github.com/AmruthPillai/Reactive-Resume/commit/5bdb92b1cff9e56879f9bbf31801d6554a00a8d5)) - -### [3.4.0](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.3.3...v3.4.0) (2022-04-30) - -### [3.3.4](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.3.3...v3.3.4) (2022-04-09) - -### [3.3.3](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.3.2...v3.3.3) (2022-04-09) - - -### Features - -* **profile:** add XING profile icon ([1e59f73](https://github.com/AmruthPillai/Reactive-Resume/commit/1e59f73f79a91d0264c0d2108906ee89d4eb27f8)), closes [#821](https://github.com/AmruthPillai/Reactive-Resume/issues/821) -* **s3:** implement non-ephemeral storage through S3/DO Spaces ([feb911a](https://github.com/AmruthPillai/Reactive-Resume/commit/feb911aea06bacf58ea933d2803a2a89fe36e57b)) - -### [3.3.2](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.3.1...v3.3.2) (2022-04-08) - - -### Bug Fixes - -* **types/react:** downgrade to <18 ([fc77b54](https://github.com/AmruthPillai/Reactive-Resume/commit/fc77b548d8d61530b2d158ff83f088bed12d5080)) - -### [3.3.1](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.3.0...v3.3.1) (2022-04-08) - -## [3.3.0](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.2.11...v3.3.0) (2022-04-08) - - -### Features - -* **upgrade:** changes to code to support new template ([1df7810](https://github.com/AmruthPillai/Reactive-Resume/commit/1df78100ca0667ce9b7834cf2c25384eb21c67c2)) - -### What's Changed -* New Crowdin updates by @AmruthPillai in https://github.com/AmruthPillai/Reactive-Resume/pull/791 -* Bump org.jetbrains.kotlin.android from 1.6.10 to 1.6.20 in /app by @dependabot in https://github.com/AmruthPillai/Reactive-Resume/pull/812 -* New Crowdin updates by @AmruthPillai in https://github.com/AmruthPillai/Reactive-Resume/pull/806 -* A new template - Leafish by @klejejs in https://github.com/AmruthPillai/Reactive-Resume/pull/811 -* Automatic multi-platform Docker image build by @schklom in https://github.com/AmruthPillai/Reactive-Resume/pull/817 - -### New Contributors -* @klejejs made their first contribution in https://github.com/AmruthPillai/Reactive-Resume/pull/811 -* @schklom made their first contribution in https://github.com/AmruthPillai/Reactive-Resume/pull/817 - -### [3.2.11](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.2.10...v3.2.11) (2022-03-28) - -### [3.2.10](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.2.9...v3.2.10) (2022-03-24) - - -### Features - -* **i18n:** add portuguese (pt) language to i18n locales ([7f1c82c](https://github.com/AmruthPillai/Reactive-Resume/commit/7f1c82cd9185ebb44486a16132eb44d5c2fb747a)) - -### [3.2.9](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.2.8...v3.2.9) (2022-03-21) - - -### Features - -* **i18n:** add nl and ru i18n locales to app ([03cbf22](https://github.com/AmruthPillai/Reactive-Resume/commit/03cbf22c9bee96cac8f228830b67b44529b7ecee)) - -### [3.2.8](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.2.7...v3.2.8) (2022-03-18) - - -### Features - -* **client/theme:** add theme switcher to landing page ([8f5632c](https://github.com/AmruthPillai/Reactive-Resume/commit/8f5632c5ad0bc8a4b3028c2806365717fedd78c9)) -* **flags:** introduce flags, disable_user_signups ([b6267d0](https://github.com/AmruthPillai/Reactive-Resume/commit/b6267d07ba2dcaed0da3946d136a0a9a01c441d5)), closes [#698](https://github.com/AmruthPillai/Reactive-Resume/issues/698) -* **i18n:** add Vietnamese language to i18n locales ([4390bcc](https://github.com/AmruthPillai/Reactive-Resume/commit/4390bccfb9764f2d2730ec3a124b7befb6792e9a)) - - -### Bug Fixes - -* **client/create-rename-slug:** fix slug accepting apostrophes and other special characters ([1facd2a](https://github.com/AmruthPillai/Reactive-Resume/commit/1facd2ad111cd9d990c808b3956d3915e8711acd)), closes [#706](https://github.com/AmruthPillai/Reactive-Resume/issues/706) -* **disable_user_signups:** hide create account link under flag ([80acfe9](https://github.com/AmruthPillai/Reactive-Resume/commit/80acfe97c74bfa05b719285b19144144f3f7c5ba)) - -### [3.2.7](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.2.6...v3.2.7) (2022-03-18) - - -### Features - -* **i18n:** add Malayalam (മലയാളം) language to i18n locales ([3a2e62b](https://github.com/AmruthPillai/Reactive-Resume/commit/3a2e62be4c9acc14f17277c060cc9ea2c417a478)) - - -### Bug Fixes - -* **printer/i18n:** fix dates not showing up in resume language when printing ([90321e1](https://github.com/AmruthPillai/Reactive-Resume/commit/90321e1284409ab9442883c04a9b4c591d36f95d)), closes [#729](https://github.com/AmruthPillai/Reactive-Resume/issues/729) - -### [3.2.6](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.2.5...v3.2.6) (2022-03-17) - - -### Features - -* **client/auth/google:** disable google login/registration if GOOGLE_CLIENT_ID is not in ENV ([7f0ee40](https://github.com/AmruthPillai/Reactive-Resume/commit/7f0ee40af4acc7eb41514406ecee3218ace9e891)), closes [#724](https://github.com/AmruthPillai/Reactive-Resume/issues/724) -* **i18n:** add arabic language to i18n locale ([39fa6da](https://github.com/AmruthPillai/Reactive-Resume/commit/39fa6da5dd77ce2e12e81530fa18c2eac722c1f2)) - - -### Bug Fixes - -* **i18n:** add missing languages to dayjs date wrapper locales ([9e6dafc](https://github.com/AmruthPillai/Reactive-Resume/commit/9e6dafc8cada5c01559894905996b81004bedaec)), closes [#719](https://github.com/AmruthPillai/Reactive-Resume/issues/719) -* **json-export:** add mimeType and charset to JSON export ([b3ff780](https://github.com/AmruthPillai/Reactive-Resume/commit/b3ff7805cd856a52900d9acef0554867d8ce0b01)), closes [#726](https://github.com/AmruthPillai/Reactive-Resume/issues/726) -* **linkedin:** fix skill modal crashing when importing from linkedin ([a02b85b](https://github.com/AmruthPillai/Reactive-Resume/commit/a02b85b4bb1c4a1499aacddeac7bc59bcb1f7adb)), closes [#718](https://github.com/AmruthPillai/Reactive-Resume/issues/718) - -### [3.2.5](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.2.4...v3.2.5) (2022-03-16) - - -### Features - -* **i18n:** add danish, polish and turkish locales to i18n ([97e9432](https://github.com/AmruthPillai/Reactive-Resume/commit/97e9432d6bd887e666a3443fbfde9a92cef53965)) - - -### Bug Fixes - -* **client/templates:** fix text veering off of artboard in most templates ([b2f1fb3](https://github.com/AmruthPillai/Reactive-Resume/commit/b2f1fb3a5502988a49c5cd3e496d9d165f5c1792)), closes [#702](https://github.com/AmruthPillai/Reactive-Resume/issues/702) - -### [3.2.4](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.2.3...v3.2.4) (2022-03-14) - -### [3.2.3](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.2.2...v3.2.3) (2022-03-14) - - -### Features - -* **client/import:** implement import json from reactive resume v2 ([42408ce](https://github.com/AmruthPillai/Reactive-Resume/commit/42408ce8c5ce55904854f9f6e0481889a01edfb8)) - -### [3.2.2](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.2.1...v3.2.2) (2022-03-14) - - -### Bug Fixes - -* **client/skills:** make skill level optional ([02e396b](https://github.com/AmruthPillai/Reactive-Resume/commit/02e396bfdbf07ae75661f1e7e4e55060cacee7d0)) - -### [3.2.1](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.2.0...v3.2.1) (2022-03-14) - - -### Features - -* **i18n:** add Chinese (Simplified) language to locales ([549363b](https://github.com/AmruthPillai/Reactive-Resume/commit/549363bbe5bdd781699dea9506bd4baedf5740d1)) - - -### Bug Fixes - -* **client/basics:** fix issue with overlapping photo filters on safari/webkit/iOS ([e6bda68](https://github.com/AmruthPillai/Reactive-Resume/commit/e6bda688ac3ba1c04e82721add92e755ea5386c3)) -* **docker:** fix docker-compose for production grade deployments ([57f7edc](https://github.com/AmruthPillai/Reactive-Resume/commit/57f7edc13432a038c907afc6cb74b5182a9b2333)) - -## [3.2.0](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.1.4...v3.2.0) (2022-03-14) - - -### Features - -* **i18n:** add Bengali, Italian and other languages ([21931bc](https://github.com/AmruthPillai/Reactive-Resume/commit/21931bc324b5e2440baaaaa2e52a93b4f2c766f8)) - - -### Bug Fixes - -* **app:** fix issue with external link redirection in android app ([b18120b](https://github.com/AmruthPillai/Reactive-Resume/commit/b18120b3f7223981e28c0441a6b7725787186edb)) -* **client:** fix issue with react-query cache ([ed75a85](https://github.com/AmruthPillai/Reactive-Resume/commit/ed75a858279047dfd43152e041c1a09a625417f5)) - -### [3.1.4](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.1.3...v3.1.4) (2022-03-12) - - -### Bug Fixes - -* **client:** exported pdf did not contain "Present" keyword with translations ([cf670af](https://github.com/AmruthPillai/Reactive-Resume/commit/cf670af4035dc9b462cf5b1aad06ca089cf1d40c)) -* **client:** fix issues raised through lgtm alerts ([dfccb31](https://github.com/AmruthPillai/Reactive-Resume/commit/dfccb3130f889934d31196226be3d33e772f323b)) - -### [3.1.3](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.1.2...v3.1.3) (2022-03-12) - - -### Bug Fixes - -* **server:** reform url for pdf generation and download ([6d55f91](https://github.com/AmruthPillai/Reactive-Resume/commit/6d55f917eab3cb2f5f3a90c5a18f03b625d60021)), closes [#661](https://github.com/AmruthPillai/Reactive-Resume/issues/661) - -### [3.1.2](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.1.1...v3.1.2) (2022-03-12) - - -### CI - -* **docker:**: include traefik routing and proxy to ensure server connections pass in local ([11cb066](https://github.com/AmruthPillai/Reactive-Resume/commit/11cb066573c6917857b79c028b97fcda1acaf90a)) - -### [3.1.1](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.1.0...v3.1.1) (2022-03-12) - - -### Features - -* **client:** add product hunt announcement banner ([b515fc3](https://github.com/AmruthPillai/Reactive-Resume/commit/b515fc36e7f282db92e8eb509b6c5004a944fa95)) - -## [3.1.0](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.0.0...v3.1.0) (2022-03-12) - - -### Features - -* **client:** add "spanish (es)" language to i18n locales ([bf167f8](https://github.com/AmruthPillai/Reactive-Resume/commit/bf167f81a3659677dada55856f5eaf0fc469e697)) -* **client:** add mm/yyyy date option to date format options ([82bf44d](https://github.com/AmruthPillai/Reactive-Resume/commit/82bf44daa24422156779e9b38d3dc695176eaa09)), closes [#656](https://github.com/AmruthPillai/Reactive-Resume/issues/656) -* **client:** add sitemap generation to next app ([2cbc582](https://github.com/AmruthPillai/Reactive-Resume/commit/2cbc582a12b72b3012246022d4b518ed657d4c08)) -* **client:** disable "Toggle Page Orientation" when there's only one page on the artboard ([01da1a0](https://github.com/AmruthPillai/Reactive-Resume/commit/01da1a06b802f1063a41d7a9a682e76b1daf9461)), closes [#655](https://github.com/AmruthPillai/Reactive-Resume/issues/655) - - -### Bug Fixes - -* **client:** remove hard-coded "keywords:" in certain templates ([dda42b4](https://github.com/AmruthPillai/Reactive-Resume/commit/dda42b4c6b3bc359ac4f2bb91ca8118ddc84ec07)), closes [#650](https://github.com/AmruthPillai/Reactive-Resume/issues/650) -* **client:** show "present" string if end date is not entered, also add to i18n locales ([b5cd6c4](https://github.com/AmruthPillai/Reactive-Resume/commit/b5cd6c412b5b6b6ca7bb43c3801762de451f06b4)), closes [#653](https://github.com/AmruthPillai/Reactive-Resume/issues/653) -* **server:** photo uploads not working, fix save location and returned url ([799f208](https://github.com/AmruthPillai/Reactive-Resume/commit/799f20823e6d97a1ff0ba2c45c61d56304d0fa58)), closes [#658](https://github.com/AmruthPillai/Reactive-Resume/issues/658) - -## [3.0.0](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.0.0-beta.6...v3.0.0) (2022-03-11) - - -### Features - -* **lang**: add German, Kannada and Tamil languages to the app ([3a524f9](https://github.com/AmruthPillai/Reactive-Resume/commit/3a524f9c9c7a0e446491265b2242ad3dfeae188c)) -* **docs:** add docusaurus workspace, initial setup of docs ([dc4aa0b](https://github.com/AmruthPillai/Reactive-Resume/commit/dc4aa0b496096bd59c45426bfcea6ba7db5f5c01)) - -## [3.0.0-beta.6](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.0.0-beta.5...v3.0.0-beta.6) (2022-03-11) - -### Features - -* **lang:** add language switcher on the landing page, in the footer ([8bc7d25](https://github.com/AmruthPillai/Reactive-Resume/commit/8bc7d2599ef6af7a07bfbe886c43844152b0d9f7)) - -### Bug Fixes - -* **i18n:** add missing translation keys, update lang/locale logic ([7d8828a](https://github.com/AmruthPillai/Reactive-Resume/commit/7d8828a358d653bb162877a64c75028eb82678cd)) -* **webkit:** fix issue with webkit not supporting .at() ([2654cba](https://github.com/AmruthPillai/Reactive-Resume/commit/2654cba039eb73d33257c36fa90a52cabc9fda96)) - -## [3.0.0-beta.5](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.0.0-beta.4...v3.0.0-beta.5) (2022-03-10) - -### Bug Fixes - -* **app:** fix issue with using swipelayout ([972e8b1](https://github.com/AmruthPillai/Reactive-Resume/commit/972e8b1bcf9ad44d8915bf23d189711672937bc0)) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 92dfcd50..cbefc2ac 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community. Examples of behavior that contributes to a positive environment for our community include: -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience -* Focusing on what is best not just for us as individuals, but for the +- Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: -* The use of sexualized language or imagery, and sexual attention or +- The use of sexualized language or imagery, and sexual attention or advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a +- Other conduct which could reasonably be considered inappropriate in a professional setting ## Enforcement Responsibilities @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban. ### 4. Permanent Ban **Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an +standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. **Consequence**: A permanent ban from any sort of public interaction within diff --git a/README.md b/README.md index 71f4e0f7..6d04b42d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Reactive Resume +Reactive Resume # Reactive Resume @@ -27,7 +27,8 @@ You have complete control over what goes into your resume, how it looks, what co - [Contributing](#contributing) - [Report Bugs and Feature Requests](#report-bugs-and-feature-requests) - [Donations](#donations) - - [💸 PayPal](#-paypal) + - [GitHub Sponsor](#github-sponsor) + - [PayPal](#paypal) - [Infrastructure](#infrastructure) - [Contributors Wall](#contributors-wall) - [License](#license) @@ -54,13 +55,17 @@ You have complete control over what goes into your resume, how it looks, what co ## Languages +- Amharic (አማርኛ) - Arabic (اَلْعَرَبِيَّةُ) - Bengali (বাংলা) +- Bulgarian (български) +- Catalan (Valencian) - Chinese (中文) - Czech (čeština) - Danish (Dansk) - Dutch (Nederlands) - English +- Finnish (Suomi) - French (Français) - German (Deutsch) - Greek (Ελληνικά) @@ -69,17 +74,26 @@ You have complete control over what goes into your resume, how it looks, what co - Hungarian (Magyar) - Indonesian (Bahasa Indonesia) - Italian (Italiano) +- Japanese (日本語) - Kannada (ಕನ್ನಡ) +- Khmer (ភាសាខ្មែរ) +- Korean (한국어) - Malayalam (മലയാളം) +- Marathi (मराठी) +- Nepali (नेपाली) +- Norwegian (Norsk) - Odia (ଓଡ଼ିଆ) -- Persian (Farsi) +- Persian (فارسی) - Polish (Polski) - Portuguese (Português) +- Romanian (limba română) - Russian (русский) +- Serbian (српски језик) - Spanish (Español) - Swedish (Svenska) - Tamil (தமிழ்) - Turkish (Türkçe) +- Ukranian (Українська мова) - Vietnamese (Tiếng Việt) Help by [translating Reactive Resume](https://translate.rxresu.me) to your language! @@ -112,7 +126,8 @@ Use the [GitHub Issues](https://github.com/AmruthPillai/Reactive-Resume/issues/n Reactive Resume would be nothing without the folks who supported me and kept the project alive in the beginning, and your continued support is what keeps me going. If you found Reactive Resume to be useful, helpful or just insightful and appreciate the effort I took to make the project, please consider donating as little or as much as you can. -### [💸 PayPal](https://paypal.me/RajaRajanA) +### [GitHub Sponsor](https://github.com/sponsors/AmruthPillai) +### [PayPal](https://paypal.me/RajaRajanA) ## Infrastructure diff --git a/app/build.gradle b/app/build.gradle index 382f43df..734c1317 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,7 +1,7 @@ plugins { id 'com.android.application' version '7.1.2' apply false id 'com.android.library' version '7.1.2' apply false - id 'org.jetbrains.kotlin.android' version '1.7.10' apply false + id 'org.jetbrains.kotlin.android' version '1.7.20' apply false } task clean(type: Delete) { diff --git a/client/.eslintrc.json b/client/.eslintrc.json index ad203503..cbc0003e 100644 --- a/client/.eslintrc.json +++ b/client/.eslintrc.json @@ -1,9 +1,33 @@ { - "extends": ["../.eslintrc.json", "next/core-web-vitals"], + "extends": ["../.eslintrc.json", "next/core-web-vitals", "plugin:tailwindcss/recommended"], + "plugins": ["unused-imports"], "ignorePatterns": [".next", "__ENV.js"], + "settings": { + "next": { + "rootDir": "client" + } + }, "rules": { + // Next.js "@next/next/no-img-element": "off", "@next/next/no-sync-scripts": "off", - "@next/next/no-html-link-for-pages": ["error", "pages"] + + // React Hooks + "react-hooks/exhaustive-deps": "off", + + // Unused Imports + "unused-imports/no-unused-imports": "error", + "unused-imports/no-unused-vars": [ + "warn", + { + "vars": "all", + "args": "none", + "varsIgnorePattern": "^_", + "argsIgnorePattern": "^_" + } + ], + + // Tailwind CSS + "tailwindcss/no-custom-classname": ["warn", { "whitelist": ["preview-mode", "printer-mode", "markdown"] }] } } diff --git a/client/Dockerfile b/client/Dockerfile index 64be8a0f..58681b6e 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -1,22 +1,19 @@ -FROM node:lts-alpine as dependencies - -RUN apk add --no-cache curl g++ make python3 \ - && curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm +FROM node:lts-alpine AS base WORKDIR /app -COPY package.json pnpm-*.yaml ./ +RUN apk add --no-cache g++ git curl make python3 libc6-compat \ + && curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm + +FROM base as dependencies + +COPY package.json pnpm-*.yaml turbo.json ./ COPY ./schema/package.json ./schema/package.json COPY ./client/package.json ./client/package.json RUN pnpm install --frozen-lockfile -FROM node:lts-alpine as builder - -RUN apk add --no-cache curl g++ make python3 \ - && curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm - -WORKDIR /app +FROM base as builder COPY . . @@ -24,21 +21,20 @@ COPY --from=dependencies /app/node_modules ./node_modules COPY --from=dependencies /app/schema/node_modules ./schema/node_modules COPY --from=dependencies /app/client/node_modules ./client/node_modules -RUN pnpm run build:schema -RUN pnpm run build:client +ARG TURBO_TEAM +ARG TURBO_TOKEN -FROM node:lts-alpine as production +ENV TURBO_TEAM $TURBO_TEAM +ENV TURBO_TOKEN $TURBO_TOKEN -WORKDIR /app +RUN pnpm run build --filter client -RUN apk add --no-cache curl \ - && curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm +FROM base as production -COPY --from=builder /app/pnpm-*.yaml ./ -COPY --from=builder /app/package.json ./ +COPY --from=builder /app/package.json /app/pnpm-*.yaml /app/turbo.json ./ COPY --from=builder /app/client/package.json ./client/package.json -RUN pnpm install -F client --frozen-lockfile --prod +RUN pnpm install --filter client --prod --frozen-lockfile --workspace-root COPY --from=builder /app/client/.next ./client/.next COPY --from=builder /app/client/public ./client/public @@ -52,4 +48,4 @@ ENV PORT 3000 HEALTHCHECK --interval=30s --timeout=20s --retries=3 --start-period=15s \ CMD curl -fSs 127.0.0.1:3000 || exit 1 -CMD [ "pnpm", "run", "start:client" ] \ No newline at end of file +CMD [ "pnpm", "run", "start", "--filter", "client" ] \ No newline at end of file diff --git a/client/components/build/Center/ArtboardController.tsx b/client/components/build/Center/ArtboardController.tsx index fe3426c0..b68e397b 100644 --- a/client/components/build/Center/ArtboardController.tsx +++ b/client/components/build/Center/ArtboardController.tsx @@ -5,6 +5,8 @@ import { FilterCenterFocus, InsertPageBreak, Link, + RedoOutlined, + UndoOutlined, ViewSidebar, ZoomIn, ZoomOut, @@ -16,6 +18,7 @@ import { useTranslation } from 'next-i18next'; import toast from 'react-hot-toast'; import { useMutation } from 'react-query'; import { ReactZoomPanPinchRef } from 'react-zoom-pan-pinch'; +import { ActionCreators } from 'redux-undo'; import { ServerError } from '@/services/axios'; import { printResumeAsPdf, PrintResumeAsPdfParams } from '@/services/printer'; @@ -31,14 +34,18 @@ const ArtboardController: React.FC = ({ zoomIn, zoomOut, c const theme = useTheme(); const dispatch = useAppDispatch(); - const resume = useAppSelector((state) => state.resume); const isDesktop = useMediaQuery(theme.breakpoints.up('sm')); - const pages = useAppSelector((state) => state.resume.metadata.layout); + + const { past, present: resume, future } = useAppSelector((state) => state.resume); + const pages = get(resume, 'metadata.layout'); const { left, right } = useAppSelector((state) => state.build.sidebar); const orientation = useAppSelector((state) => state.build.page.orientation); const { mutateAsync, isLoading } = useMutation(printResumeAsPdf); + const handleUndo = () => dispatch(ActionCreators.undo()); + const handleRedo = () => dispatch(ActionCreators.redo()); + const handleTogglePageBreakLine = () => dispatch(togglePageBreakLine()); const handleTogglePageOrientation = () => dispatch(togglePageOrientation()); @@ -63,7 +70,7 @@ const ArtboardController: React.FC = ({ zoomIn, zoomOut, c const url = await mutateAsync({ username, slug }); - download(`/api${url}`); + download(url); }; return ( @@ -75,6 +82,20 @@ const ArtboardController: React.FC = ({ zoomIn, zoomOut, c })} >
+ ('builder.controller.tooltip.undo')}> + + + + + + ('builder.controller.tooltip.redo')}> + + + + + + + ('builder.controller.tooltip.zoom-in')}> zoomIn(0.25)}> @@ -97,17 +118,18 @@ const ArtboardController: React.FC = ({ zoomIn, zoomOut, c {isDesktop && ( <> - {pages.length > 1 && ( - ('builder.controller.tooltip.toggle-orientation')}> - - {orientation === 'vertical' ? ( - - ) : ( - - )} - - - )} + ('builder.controller.tooltip.toggle-orientation')}> + + {orientation === 'vertical' ? ( + + ) : ( + + )} + + ('builder.controller.tooltip.toggle-page-break-line')}> diff --git a/client/components/build/Center/Center.tsx b/client/components/build/Center/Center.tsx index eb5a0b60..f9390505 100644 --- a/client/components/build/Center/Center.tsx +++ b/client/components/build/Center/Center.tsx @@ -13,7 +13,7 @@ import Page from './Page'; const Center = () => { const orientation = useAppSelector((state) => state.build.page.orientation); - const resume = useAppSelector((state) => state.resume); + const resume = useAppSelector((state) => state.resume.present); const layout: string[][][] = get(resume, 'metadata.layout'); if (isEmpty(resume)) return null; diff --git a/client/components/build/Center/Header.tsx b/client/components/build/Center/Header.tsx index 1fe53c70..6d1b3a5e 100644 --- a/client/components/build/Center/Header.tsx +++ b/client/components/build/Center/Header.tsx @@ -57,7 +57,7 @@ const Header = () => { const { mutateAsync: deleteMutation } = useMutation(deleteResume); - const resume = useAppSelector((state) => state.resume); + const resume = useAppSelector((state) => state.resume.present); const { left, right } = useAppSelector((state) => state.build.sidebar); const name = useMemo(() => get(resume, 'name'), [resume]); diff --git a/client/components/build/Center/Page.module.scss b/client/components/build/Center/Page.module.scss index 63bf1357..b88254e6 100644 --- a/client/components/build/Center/Page.module.scss +++ b/client/components/build/Center/Page.module.scss @@ -15,7 +15,7 @@ } &.break::after { - content: 'A4 Page Break'; + content: 'Page Break'; top: calc(297mm - 19px); @apply absolute w-full border-b border-dashed border-neutral-800/75; @@ -27,6 +27,22 @@ @apply hidden; } } + + &.format-letter { + width: 216mm; + min-height: 279mm; + + &.break::after { + top: calc(279mm - 19px); + } + } + + .markdown { + ul { + padding-left: 1.5em; + text-indent: -1.5em; + } + } } .pageNumber { diff --git a/client/components/build/Center/Page.tsx b/client/components/build/Center/Page.tsx index 04e0bd30..bcdcd398 100644 --- a/client/components/build/Center/Page.tsx +++ b/client/components/build/Center/Page.tsx @@ -1,5 +1,5 @@ import { css } from '@emotion/css'; -import { CustomCSS, Theme, Typography } from '@reactive-resume/schema'; +import { CustomCSS, PageConfig, ThemeConfig, Typography } from '@reactive-resume/schema'; import clsx from 'clsx'; import get from 'lodash/get'; import isEmpty from 'lodash/isEmpty'; @@ -20,12 +20,13 @@ type Props = PageProps & { const Page: React.FC = ({ page, showPageNumbers = false }) => { const { t } = useTranslation(); - const resume = useAppSelector((state) => state.resume); + const resume = useAppSelector((state) => state.resume.present); const breakLine: boolean = useAppSelector((state) => state.build.page.breakLine); - const theme: Theme = get(resume, 'metadata.theme'); + const theme: ThemeConfig = get(resume, 'metadata.theme'); const customCSS: CustomCSS = get(resume, 'metadata.css'); const template: string = get(resume, 'metadata.template'); + const pageConfig: PageConfig = get(resume, 'metadata.page'); const typography: Typography = get(resume, 'metadata.typography'); const themeCSS = useMemo(() => !isEmpty(theme) && generateThemeStyles(theme), [theme]); @@ -33,12 +34,13 @@ const Page: React.FC = ({ page, showPageNumbers = false }) => { const TemplatePage: React.FC | null = useMemo(() => templateMap[template].component, [template]); return ( -
+
{ const isDesktop = useMediaQuery(theme.breakpoints.up('lg')); - const sections = useAppSelector((state) => state.resume.sections); + const sections = useAppSelector((state) => state.resume.present.sections); const { open } = useAppSelector((state) => state.build.sidebar.left); const customSections = useMemo(() => getCustomSections(sections), [sections]); @@ -65,7 +65,7 @@ const LeftSidebar = () => { variant={isDesktop ? 'persistent' : 'temporary'} >
-