Compare commits

...

357 Commits

Author SHA1 Message Date
984078db76 parallelize ci workflow 2023-07-12 16:26:07 +02:00
fbc0ae8918 fix use of dev dependency 2023-07-12 16:21:46 +02:00
3e93656f1f update issue templates 2023-07-12 16:02:16 +02:00
01bf17d7c8 Update README.md 2023-07-12 16:01:09 +02:00
651013fcf2 Merge pull request #1381 from AmruthPillai/fix/issue-with-private-resumes
fix(client): 🐛 do not allow private resumes to be viewable or downloadable through the link
2023-07-12 15:59:57 +02:00
1c2d796c50 fix(client): 🐛 do not allow private resumes to be viewable or downloadable through the link 2023-07-12 15:59:22 +02:00
5ef4bfcb6b Merge pull request #1379 from AmruthPillai/dependabot/github_actions/docker/setup-buildx-action-2.9.0
Bump docker/setup-buildx-action from 2.8.0 to 2.9.0
2023-07-12 14:47:30 +02:00
a305b6419e Merge pull request #1378 from AmruthPillai/dependabot/gradle/app/org.jetbrains.kotlin.android-1.9.0
Bump org.jetbrains.kotlin.android from 1.8.22 to 1.9.0 in /app
2023-07-12 14:47:22 +02:00
dcfdff2abe Bump docker/setup-buildx-action from 2.8.0 to 2.9.0
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.8.0 to 2.9.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2.8.0...v2.9.0)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-10 03:00:37 +00:00
de77a6039a Bump org.jetbrains.kotlin.android from 1.8.22 to 1.9.0 in /app
Bumps [org.jetbrains.kotlin.android](https://github.com/JetBrains/kotlin) from 1.8.22 to 1.9.0.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.8.22...v1.9.0)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin.android
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-10 02:23:11 +00:00
e44eab55c3 Merge pull request #1376 from AmruthPillai/dependabot/github_actions/docker/setup-buildx-action-2.8.0
Bump docker/setup-buildx-action from 2.7.0 to 2.8.0
2023-07-04 13:49:24 +02:00
c73ad9a627 Bump docker/setup-buildx-action from 2.7.0 to 2.8.0
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.7.0 to 2.8.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2.7.0...v2.8.0)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-03 02:45:58 +00:00
be3d4a4f7c Merge pull request #1374 from AmruthPillai/i18n_main
New Crowdin updates
2023-07-02 08:01:43 +02:00
c86792901b New translations builder.json (Swedish) 2023-06-29 15:56:08 +02:00
a2645a10f0 Merge pull request #1369 from AmruthPillai/dependabot/github_actions/docker/setup-buildx-action-2.7.0
Bump docker/setup-buildx-action from 2.6.0 to 2.7.0
2023-06-22 16:13:22 +02:00
772d8a0d41 Merge pull request #1368 from AmruthPillai/dependabot/github_actions/docker/build-push-action-4.1.1
Bump docker/build-push-action from 4.1.0 to 4.1.1
2023-06-22 16:13:14 +02:00
57348c13b2 Merge pull request #1367 from AmruthPillai/dependabot/github_actions/docker/metadata-action-4.6.0
Bump docker/metadata-action from 4.5.0 to 4.6.0
2023-06-22 16:13:03 +02:00
ffb92a967e Merge pull request #1366 from AmruthPillai/dependabot/docker/server/playwright-v1.35.1-focal
Bump playwright from v1.35.0-focal to v1.35.1-focal in /server
2023-06-22 16:10:59 +02:00
ed933f0452 Bump docker/setup-buildx-action from 2.6.0 to 2.7.0
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.6.0 to 2.7.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2.6.0...v2.7.0)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 02:58:00 +00:00
26e67fe457 Bump docker/build-push-action from 4.1.0 to 4.1.1
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 02:57:55 +00:00
4507d2d032 Bump docker/metadata-action from 4.5.0 to 4.6.0
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4.5.0 to 4.6.0.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](https://github.com/docker/metadata-action/compare/v4.5.0...v4.6.0)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 02:57:50 +00:00
97b43d2fc9 Bump playwright from v1.35.0-focal to v1.35.1-focal in /server
Bumps playwright from v1.35.0-focal to v1.35.1-focal.

---
updated-dependencies:
- dependency-name: playwright
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 02:57:47 +00:00
88916a54d3 Merge pull request #1362 from AmruthPillai/i18n_main
New Crowdin updates
2023-06-15 10:04:54 +02:00
3aa57ebce8 Merge pull request #1358 from AmruthPillai/dependabot/gradle/app/org.jetbrains.kotlin.android-1.8.22
Bump org.jetbrains.kotlin.android from 1.8.21 to 1.8.22 in /app
2023-06-15 10:04:48 +02:00
623d300da3 Merge pull request #1357 from AmruthPillai/dependabot/github_actions/actions/checkout-3.5.3
Bump actions/checkout from 3.5.2 to 3.5.3
2023-06-15 10:04:40 +02:00
10d7562e7a Merge pull request #1356 from AmruthPillai/dependabot/docker/client/node-20-alpine
Bump node from 18-alpine to 20-alpine in /client
2023-06-15 10:04:33 +02:00
807e747018 Merge pull request #1355 from AmruthPillai/dependabot/github_actions/docker/build-push-action-4.1.0
Bump docker/build-push-action from 4.0.0 to 4.1.0
2023-06-15 10:04:26 +02:00
1301cdce12 Merge pull request #1354 from AmruthPillai/dependabot/docker/server/playwright-v1.35.0-focal
Bump playwright from v1.34.3-focal to v1.35.0-focal in /server
2023-06-15 10:04:17 +02:00
c5fcbf5982 New translations common.json (Dutch) 2023-06-14 17:29:51 +02:00
a9daaeba55 New translations builder.json (Dutch) 2023-06-14 17:29:49 +02:00
dc33c35433 Bump org.jetbrains.kotlin.android from 1.8.21 to 1.8.22 in /app
Bumps [org.jetbrains.kotlin.android](https://github.com/JetBrains/kotlin) from 1.8.21 to 1.8.22.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.8.22/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.8.21...v1.8.22)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin.android
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-12 03:00:24 +00:00
189605484a Bump actions/checkout from 3.5.2 to 3.5.3
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.2 to 3.5.3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.5.2...v3.5.3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-12 02:58:29 +00:00
bb3e93d976 Bump node from 18-alpine to 20-alpine in /client
Bumps node from 18-alpine to 20-alpine.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-12 02:58:18 +00:00
44d692aad1 Bump docker/build-push-action from 4.0.0 to 4.1.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4.0.0...v4.1.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-12 02:58:18 +00:00
bb0ca824b8 Bump playwright from v1.34.3-focal to v1.35.0-focal in /server
Bumps playwright from v1.34.3-focal to v1.35.0-focal.

---
updated-dependencies:
- dependency-name: playwright
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-12 02:57:59 +00:00
a0b8de4ab4 Merge pull request #1347 from AlexTu2/main
add Discord icon
2023-06-09 09:06:47 +02:00
f73a80c684 add Discord icon 2023-06-08 22:52:38 -04:00
0eddb7d5a3 remove old ci action workflows 2023-06-08 16:28:08 +02:00
6ff36cb1e4 fix build-deploy script 2023-06-08 16:27:14 +02:00
c513d68813 Add push: true to Build and Deploy Script 2023-06-08 15:25:16 +02:00
8d3f4e031c update dependencies, rework on github actions ci script 2023-06-08 15:05:15 +02:00
3aa8778a67 Update README.md 2023-06-08 13:51:31 +02:00
d4a3cec3c2 create new github actions workflow "Build and Push Multi-Arch Docker Images using Manifest" 2023-06-08 13:48:35 +02:00
96eca65ed0 add back health module to server 2023-06-07 20:45:21 +02:00
30fd283898 use matrix to build amd64/arm64 images 2023-06-07 20:25:12 +02:00
726ea7312b add arm to qemu platform 2023-06-07 20:10:25 +02:00
f3a7180d4b change run script for docker file 2023-06-07 19:52:48 +02:00
0173ce32c3 Implement Turborepo to include Build Caching in CI/CD 2023-06-07 19:50:48 +02:00
d4b6c16bf9 updating dependencies, fixing server reloads 2023-06-07 18:39:14 +02:00
c571f201d3 update version 2023-06-07 17:18:33 +02:00
e4ecf50ed4 add missing backslash 2023-06-07 17:18:18 +02:00
5ee99cfdab attempt to fix internal server error 2023-06-07 12:06:04 +02:00
72e610b50d Merge pull request #1323 from AmruthPillai/i18n_main
New Crowdin updates
2023-05-30 16:53:03 +02:00
ba34787333 Merge pull request #1326 from AmruthPillai/dependabot/docker/server/playwright-v1.34.3-focal
Bump playwright from v1.34.0-focal to v1.34.3-focal in /server
2023-05-30 16:52:54 +02:00
e11b0e6224 Bump playwright from v1.34.0-focal to v1.34.3-focal in /server
Bumps playwright from v1.34.0-focal to v1.34.3-focal.

---
updated-dependencies:
- dependency-name: playwright
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 02:58:15 +00:00
c78ee18e05 New translations common.json (Norwegian) 2023-05-26 14:15:52 +02:00
5f5b484243 New translations builder.json (Norwegian) 2023-05-26 14:15:50 +02:00
bcc451a6a1 Merge pull request #1320 from AmruthPillai/dependabot/docker/server/playwright-v1.34.0-focal
Bump playwright from v1.32.3-focal to v1.34.0-focal in /server
2023-05-23 21:09:04 +02:00
55a7f6a556 Merge pull request #1315 from dev-abir/main
add icons
2023-05-23 21:08:55 +02:00
e9b6265c60 Merge pull request #1304 from AmruthPillai/dependabot/gradle/app/org.jetbrains.kotlin.android-1.8.21
Bump org.jetbrains.kotlin.android from 1.8.20 to 1.8.21 in /app
2023-05-23 21:08:40 +02:00
2e2f3271c9 Bump playwright from v1.32.3-focal to v1.34.0-focal in /server
Bumps playwright from v1.32.3-focal to v1.34.0-focal.

---
updated-dependencies:
- dependency-name: playwright
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 02:58:19 +00:00
fa3e92d643 Merge pull request #1314 from jobayer12/issue-1309
Rename the Work Experience label.
2023-05-17 10:33:51 +02:00
1f9b52eda6 Added the experience section on the leftSidebar. 2023-05-13 17:58:27 +06:00
7074b6fc76 add icon packs according to #834 2023-05-09 22:10:31 +05:30
b4c4fb94f7 Renamed the Work Experience label. 2023-05-08 10:44:57 +06:00
22bdb64fa9 Added the experience section on the leftSidebar. 2023-05-08 10:42:27 +06:00
af02158d05 Bump org.jetbrains.kotlin.android from 1.8.20 to 1.8.21 in /app
Bumps [org.jetbrains.kotlin.android](https://github.com/JetBrains/kotlin) from 1.8.20 to 1.8.21.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.8.20...v1.8.21)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin.android
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-01 03:03:01 +00:00
6a8db92fc4 fix bugs 2023-04-21 01:13:32 +02:00
6f219ef17e bump up version to 3.7.2 2023-04-20 23:02:14 +02:00
667e51abdc implement larger pool size for db 2023-04-20 22:52:24 +02:00
7b98277c32 Merge pull request #1294 from AmruthPillai/dependabot/docker/server/playwright-v1.32.3-focal
Bump playwright from v1.32.1-focal to v1.32.3-focal in /server
2023-04-20 22:34:03 +02:00
77ed7ed8be Merge pull request #1293 from AmruthPillai/dependabot/github_actions/actions/checkout-3.5.2
Bump actions/checkout from 3.5.0 to 3.5.2
2023-04-20 22:33:56 +02:00
ce584d9326 Merge pull request #1289 from AmruthPillai/i18n_main
New Crowdin updates
2023-04-20 22:33:48 +02:00
5685352375 Merge pull request #1286 from AmruthPillai/dependabot/github_actions/martinbeentjes/npm-get-version-action-1.3.1
Bump martinbeentjes/npm-get-version-action from 1.2.3 to 1.3.1
2023-04-20 22:33:38 +02:00
036b2917a6 update dependencies, attempt to fix server restart issue 2023-04-20 22:33:11 +02:00
e972320722 Bump playwright from v1.32.1-focal to v1.32.3-focal in /server
Bumps playwright from v1.32.1-focal to v1.32.3-focal.

---
updated-dependencies:
- dependency-name: playwright
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-17 02:59:32 +00:00
4ac1e9db35 Bump actions/checkout from 3.5.0 to 3.5.2
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.0 to 3.5.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.5.0...v3.5.2)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-17 02:58:06 +00:00
9fe4403b40 New translations modals.json (Nepali) 2023-04-11 08:37:33 +02:00
4f4084ab45 New translations modals.json (Amharic) 2023-04-11 08:37:32 +02:00
72227dc9ab New translations modals.json (Odia) 2023-04-11 08:37:31 +02:00
d44795a421 New translations modals.json (Kannada) 2023-04-11 08:37:30 +02:00
e9584144e4 New translations modals.json (Malayalam) 2023-04-11 08:37:30 +02:00
bbedfa3b75 New translations modals.json (Hindi) 2023-04-11 08:37:29 +02:00
03f7d74096 New translations modals.json (Marathi) 2023-04-11 08:37:28 +02:00
a62693d611 New translations modals.json (Bengali) 2023-04-11 08:37:27 +02:00
421f195e1e New translations modals.json (Tamil) 2023-04-11 08:37:26 +02:00
b22dff523f New translations modals.json (Khmer) 2023-04-11 08:37:25 +02:00
58d0c6e315 New translations modals.json (Persian) 2023-04-11 08:37:24 +02:00
36178cac22 New translations landing.json (Nepali) 2023-04-11 08:37:24 +02:00
376786fa25 New translations landing.json (Amharic) 2023-04-11 08:37:23 +02:00
efceda1c55 New translations landing.json (Odia) 2023-04-11 08:37:22 +02:00
047e317c51 New translations landing.json (Kannada) 2023-04-11 08:37:21 +02:00
36ad63adb9 New translations landing.json (Malayalam) 2023-04-11 08:37:20 +02:00
45c88caf58 New translations landing.json (Hindi) 2023-04-11 08:37:20 +02:00
ca11a9217a New translations landing.json (Marathi) 2023-04-11 08:37:19 +02:00
fd6fbbba77 New translations landing.json (Bengali) 2023-04-11 08:37:18 +02:00
e2fb83bda9 New translations landing.json (Tamil) 2023-04-11 08:37:17 +02:00
40567e8f61 New translations landing.json (Khmer) 2023-04-11 08:37:16 +02:00
64c899b159 New translations modals.json (Indonesian) 2023-04-11 08:37:12 +02:00
b267cc4097 New translations modals.json (Vietnamese) 2023-04-11 08:37:11 +02:00
f4657b6592 New translations modals.json (Chinese Simplified) 2023-04-11 08:37:10 +02:00
6a2f512638 New translations modals.json (Ukrainian) 2023-04-11 08:37:10 +02:00
499005c21f New translations modals.json (Turkish) 2023-04-11 08:37:09 +02:00
0e18d3fc48 New translations modals.json (Serbian (Cyrillic)) 2023-04-11 08:37:08 +02:00
3b831c4eb4 New translations modals.json (Russian) 2023-04-11 08:37:07 +02:00
40564944ef New translations modals.json (Polish) 2023-04-11 08:37:06 +02:00
fdbb6d2e5b New translations modals.json (Norwegian) 2023-04-11 08:37:06 +02:00
398cd63082 New translations modals.json (Dutch) 2023-04-11 08:37:05 +02:00
efd4af14e5 New translations modals.json (Japanese) 2023-04-11 08:37:03 +02:00
889697fc31 New translations modals.json (Hungarian) 2023-04-11 08:37:02 +02:00
3aedf6618d New translations modals.json (Finnish) 2023-04-11 08:37:01 +02:00
abf42e13af New translations modals.json (Greek) 2023-04-11 08:37:00 +02:00
40bcbebadd New translations modals.json (Danish) 2023-04-11 08:36:59 +02:00
364f2e6d49 New translations modals.json (Czech) 2023-04-11 08:36:58 +02:00
7e5dfd75f9 New translations modals.json (Catalan) 2023-04-11 08:36:57 +02:00
b94d10c614 New translations modals.json (Bulgarian) 2023-04-11 08:36:57 +02:00
8c40b417ec New translations modals.json (Arabic) 2023-04-11 08:36:56 +02:00
1f17dfe6ea New translations landing.json (Indonesian) 2023-04-11 08:36:55 +02:00
be6ea1a224 New translations landing.json (Vietnamese) 2023-04-11 08:36:54 +02:00
583e9effae New translations builder.json (Nepali) 2023-04-11 08:36:53 +02:00
619b2757c8 New translations builder.json (Amharic) 2023-04-11 08:36:52 +02:00
9e27eee029 New translations builder.json (Odia) 2023-04-11 08:36:51 +02:00
c2d3c611e1 New translations builder.json (Kannada) 2023-04-11 08:36:50 +02:00
735f589e54 New translations builder.json (Malayalam) 2023-04-11 08:36:49 +02:00
1e3d6fbb77 New translations builder.json (Hindi) 2023-04-11 08:36:48 +02:00
3995e7159a New translations builder.json (Marathi) 2023-04-11 08:36:47 +02:00
6662acf0b0 New translations builder.json (Bengali) 2023-04-11 08:36:47 +02:00
feb8abca95 New translations builder.json (Tamil) 2023-04-11 08:36:46 +02:00
75c83bd91d New translations builder.json (Khmer) 2023-04-11 08:36:45 +02:00
f6d5897ed3 New translations landing.json (Chinese Simplified) 2023-04-11 08:36:44 +02:00
ed356763a1 New translations landing.json (Ukrainian) 2023-04-11 08:36:43 +02:00
4847246d84 New translations landing.json (Turkish) 2023-04-11 08:36:42 +02:00
a0ae6cb77e New translations landing.json (Serbian (Cyrillic)) 2023-04-11 08:36:42 +02:00
2aa2550be0 New translations landing.json (Russian) 2023-04-11 08:36:41 +02:00
df39913d49 New translations landing.json (Polish) 2023-04-11 08:36:40 +02:00
2225505d48 New translations landing.json (Norwegian) 2023-04-11 08:36:39 +02:00
afe20e61ee New translations landing.json (Dutch) 2023-04-11 08:36:38 +02:00
794e9c6511 New translations landing.json (Japanese) 2023-04-11 08:36:37 +02:00
e7e423bf29 New translations landing.json (Hungarian) 2023-04-11 08:36:35 +02:00
2173297207 New translations landing.json (Finnish) 2023-04-11 08:36:34 +02:00
b091cfa474 New translations landing.json (Greek) 2023-04-11 08:36:33 +02:00
057bb3a414 New translations landing.json (Czech) 2023-04-11 08:36:33 +02:00
c1442c9acc New translations landing.json (Catalan) 2023-04-11 08:36:32 +02:00
977f1beafd New translations landing.json (Bulgarian) 2023-04-11 08:36:31 +02:00
39ee710e97 New translations landing.json (Arabic) 2023-04-11 08:36:30 +02:00
1d1841c8db New translations builder.json (Indonesian) 2023-04-11 08:36:29 +02:00
3e44774ed4 New translations builder.json (Vietnamese) 2023-04-11 08:36:28 +02:00
9e2fa01896 New translations builder.json (Chinese Simplified) 2023-04-11 08:36:28 +02:00
7811f9840c New translations builder.json (Ukrainian) 2023-04-11 08:36:27 +02:00
34425c6200 New translations builder.json (Turkish) 2023-04-11 08:36:26 +02:00
46f9fc549a New translations builder.json (Serbian (Cyrillic)) 2023-04-11 08:36:25 +02:00
237abf359b New translations builder.json (Russian) 2023-04-11 08:36:24 +02:00
c5e8739009 New translations builder.json (Polish) 2023-04-11 08:36:23 +02:00
0ea8040977 New translations builder.json (Norwegian) 2023-04-11 08:36:22 +02:00
1f10e8efe3 New translations builder.json (Dutch) 2023-04-11 08:36:21 +02:00
8c2688670e New translations builder.json (Japanese) 2023-04-11 08:36:20 +02:00
bc5d49b568 New translations builder.json (Hungarian) 2023-04-11 08:36:19 +02:00
27ea84e720 New translations builder.json (Finnish) 2023-04-11 08:36:17 +02:00
0becb66bfd New translations builder.json (Greek) 2023-04-11 08:36:16 +02:00
11f88492e9 New translations builder.json (Czech) 2023-04-11 08:36:15 +02:00
ae3e01466f New translations builder.json (Catalan) 2023-04-11 08:36:14 +02:00
5d04dd8a83 New translations builder.json (Bulgarian) 2023-04-11 08:36:13 +02:00
52c15a8151 New translations builder.json (Arabic) 2023-04-11 08:36:12 +02:00
f6104e7051 Bump martinbeentjes/npm-get-version-action from 1.2.3 to 1.3.1
Bumps [martinbeentjes/npm-get-version-action](https://github.com/martinbeentjes/npm-get-version-action) from 1.2.3 to 1.3.1.
- [Release notes](https://github.com/martinbeentjes/npm-get-version-action/releases)
- [Commits](https://github.com/martinbeentjes/npm-get-version-action/compare/v1.2.3...v1.3.1)

---
updated-dependencies:
- dependency-name: martinbeentjes/npm-get-version-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-10 03:09:34 +00:00
ed710f6fe5 hotfix for docker CMD script 2023-04-06 15:41:00 +02:00
7e6e239d7f Merge pull request #1279 from AmruthPillai/i18n_main
New Crowdin updates
2023-04-06 15:04:42 +02:00
b4381a22f3 remove VERSION env dependency from server 2023-04-06 15:03:53 +02:00
ba6ca4d220 update build commands for pnpm on Dockerfile 2023-04-06 14:42:36 +02:00
5486906b05 use corepack to install pnpm, over regular method 2023-04-06 13:08:51 +02:00
7348b295cb upgrade gradle version from 7.4.0 to 7.4.2 2023-04-06 12:40:57 +02:00
025762fdf6 update Gradle distributions on Android App 2023-04-06 11:58:00 +02:00
96411cdb90 remove turbo from the workspace 2023-04-06 11:50:28 +02:00
835f453384 New translations dashboard.json (Italian) 2023-04-05 22:56:45 +02:00
cc475ae1e9 New translations common.json (Italian) 2023-04-05 22:56:44 +02:00
a5249ec646 New translations modals.json (Italian) 2023-04-05 22:56:42 +02:00
d0e3090421 New translations landing.json (Italian) 2023-04-05 22:56:39 +02:00
14f68c8937 New translations builder.json (Italian) 2023-04-05 22:56:37 +02:00
9c0c6076b3 update pnpm in dockerfile 2023-04-05 09:25:28 +02:00
36bf729161 update dependencies, fix typescript issues, optimize lodash imports 2023-04-05 09:06:49 +02:00
3a430ad98c bump up version to 3.6.19 2023-04-04 23:47:28 +02:00
90a8610dd7 update dependencies 2023-04-04 23:47:02 +02:00
d62ddab140 Merge pull request #1276 from AmruthPillai/dependabot/gradle/app/org.jetbrains.kotlin.android-1.8.20
Bump org.jetbrains.kotlin.android from 1.8.10 to 1.8.20 in /app
2023-04-04 12:53:30 +02:00
ca0186bb67 Merge pull request #1268 from AmruthPillai/dependabot/docker/server/playwright-v1.32.1-focal
Bump playwright from v1.30.0-focal to v1.32.1-focal in /server
2023-04-04 12:44:15 +02:00
88ac8389ea Merge pull request #1267 from AmruthPillai/dependabot/github_actions/actions/checkout-3.5.0
Bump actions/checkout from 3.3.0 to 3.5.0
2023-04-04 11:38:14 +02:00
2f3864fff2 Merge pull request #1254 from AmruthPillai/dependabot/github_actions/docker/setup-buildx-action-2.5.0
Bump docker/setup-buildx-action from 2.4.0 to 2.5.0
2023-04-04 11:38:03 +02:00
7878e52cc4 Merge pull request #1227 from AmruthPillai/i18n_main
New Crowdin updates
2023-04-04 11:37:51 +02:00
08b1967a4e Bump org.jetbrains.kotlin.android from 1.8.10 to 1.8.20 in /app
Bumps [org.jetbrains.kotlin.android](https://github.com/JetBrains/kotlin) from 1.8.10 to 1.8.20.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin.android
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-03 03:02:02 +00:00
b870ca8297 New translations dashboard.json (Korean) 2023-04-01 21:34:54 +02:00
1507c54671 New translations common.json (Korean) 2023-04-01 21:34:53 +02:00
0984ca4daf New translations modals.json (Korean) 2023-04-01 21:34:51 +02:00
438798f8de New translations landing.json (Korean) 2023-04-01 21:34:49 +02:00
27aadb8948 New translations builder.json (Korean) 2023-04-01 21:34:47 +02:00
244a4118cf New translations common.json (Korean) 2023-04-01 20:24:02 +02:00
cde320ce46 New translations dashboard.json (Hebrew) 2023-03-30 11:44:14 +02:00
4772df7618 New translations modals.json (Hebrew) 2023-03-30 11:44:11 +02:00
ecb95b35f3 New translations landing.json (Hebrew) 2023-03-30 11:44:07 +02:00
24b09af563 New translations builder.json (Hebrew) 2023-03-30 11:44:03 +02:00
9471fb4169 New translations dashboard.json (Hebrew) 2023-03-30 10:38:01 +02:00
2f296d6f08 New translations common.json (Hebrew) 2023-03-30 10:38:00 +02:00
cd3d3caa15 New translations modals.json (Hebrew) 2023-03-30 10:37:57 +02:00
440eefe46e Bump playwright from v1.30.0-focal to v1.32.1-focal in /server
Bumps playwright from v1.30.0-focal to v1.32.1-focal.

---
updated-dependencies:
- dependency-name: playwright
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-27 02:59:00 +00:00
5787e2badb Bump actions/checkout from 3.3.0 to 3.5.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.3.0 to 3.5.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.3.0...v3.5.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-27 02:58:28 +00:00
c235e5ab16 Bump docker/setup-buildx-action from 2.4.0 to 2.5.0
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.4.0 to 2.5.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2.4.0...v2.5.0)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-13 02:59:14 +00:00
f584c70f27 New translations landing.json (Danish) 2023-02-17 04:15:04 +05:30
3aa0279519 New translations builder.json (Danish) 2023-02-17 04:15:00 +05:30
6830aec2f9 New translations landing.json (Danish) 2023-02-17 01:27:01 +05:30
9a3d7af325 New translations common.json (French) 2023-02-12 19:25:54 +05:30
52f7e8557f New translations modals.json (French) 2023-02-12 19:25:50 +05:30
12c17d1c7c New translations landing.json (French) 2023-02-12 19:25:47 +05:30
67918187a1 New translations builder.json (French) 2023-02-12 19:25:46 +05:30
dcbc0c2b45 New translations dashboard.json (French) 2023-02-12 16:57:35 +05:30
26b6a741c2 New translations builder.json (French) 2023-02-12 16:57:29 +05:30
d7064129e8 Merge pull request #1225 from raphaelcangucu/feature.pt-BR
Translation fixes on LeftSideBar
2023-02-10 08:33:56 +05:30
279dd36a13 Fix translations for other languages 2023-02-08 19:19:48 -03:00
49e47b28de fix date and start to translate to pt-br 2023-02-08 15:43:23 -03:00
a782343e0a Merge pull request #1218 from AmruthPillai/dependabot/gradle/app/org.jetbrains.kotlin.android-1.8.10
Bump org.jetbrains.kotlin.android from 1.8.0 to 1.8.10 in /app
2023-02-08 02:03:17 +05:30
1e7821a46d Merge pull request #1217 from AmruthPillai/dependabot/github_actions/docker/setup-buildx-action-2.4.0
Bump docker/setup-buildx-action from 2.3.0 to 2.4.0
2023-02-08 02:03:08 +05:30
f7bea5a218 Merge pull request #1216 from AmruthPillai/dependabot/github_actions/docker/build-push-action-4.0.0
Bump docker/build-push-action from 3.3.0 to 4.0.0
2023-02-08 02:02:57 +05:30
05fa4f3192 Merge pull request #1190 from AmruthPillai/i18n_main
New Crowdin updates
2023-02-08 02:02:46 +05:30
ed357f0ebc Merge pull request #1215 from C4illin/main
Add ISO 8601 option
2023-02-08 02:02:36 +05:30
1774832a58 Bump org.jetbrains.kotlin.android from 1.8.0 to 1.8.10 in /app
Bumps [org.jetbrains.kotlin.android](https://github.com/JetBrains/kotlin) from 1.8.0 to 1.8.10.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.8.10/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.8.0...v1.8.10)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin.android
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-06 02:25:09 +00:00
2837befd52 Bump docker/setup-buildx-action from 2.3.0 to 2.4.0
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2.3.0...v2.4.0)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-06 02:20:21 +00:00
38d866c0c2 Bump docker/build-push-action from 3.3.0 to 4.0.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3.3.0 to 4.0.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3.3.0...v4.0.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-06 02:20:16 +00:00
87c7acf4f1 New translations modals.json (Swedish) 2023-02-06 01:53:14 +01:00
1bd68118ce New translations landing.json (Swedish) 2023-02-06 01:53:11 +01:00
5c34b28c80 New translations builder.json (Swedish) 2023-02-06 01:53:08 +01:00
c550183720 Add ISO 8601 option 2023-02-05 23:28:21 +01:00
3605579b1b Merge pull request #1206 from AmruthPillai/dependabot/github_actions/docker/setup-buildx-action-2.3.0
Bump docker/setup-buildx-action from 2.2.1 to 2.3.0
2023-01-30 08:40:37 +01:00
fa2e28688f Merge pull request #1207 from AmruthPillai/dependabot/docker/server/playwright-v1.30.0-focal
Bump playwright from v1.29.2-focal to v1.30.0-focal in /server
2023-01-30 08:40:27 +01:00
20f1031e28 Bump playwright from v1.29.2-focal to v1.30.0-focal in /server
Bumps playwright from v1.29.2-focal to v1.30.0-focal.

---
updated-dependencies:
- dependency-name: playwright
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-30 02:17:52 +00:00
292cb6d0ed Bump docker/setup-buildx-action from 2.2.1 to 2.3.0
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.2.1 to 2.3.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2.2.1...v2.3.0)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-30 02:16:52 +00:00
45f2dc1cfc Merge pull request #1195 from busches/castform-masthead-spacing
fix: extra whitespace in Castform header
2023-01-23 13:10:56 +01:00
e319dd3e3d fix: extra whitespace in Castform header
Using the Castform template without a summary, still has extra whitespace for the summary. This commit fixes the extra whitespace to not appear when no summary is present.
2023-01-22 17:48:27 -06:00
9678f7a6e5 New translations modals.json (Portuguese) 2023-01-22 22:58:07 +01:00
0cca4e21fb New translations landing.json (Portuguese) 2023-01-22 22:58:04 +01:00
f6758f191d New translations builder.json (Portuguese) 2023-01-22 22:58:01 +01:00
983662f877 New translations common.json (German) 2023-01-21 00:50:00 +01:00
c7fc28a5c5 New translations modals.json (German) 2023-01-21 00:49:57 +01:00
1f7c33e805 New translations common.json (German) 2023-01-20 23:41:22 +01:00
437cc331a8 New translations landing.json (German) 2023-01-20 23:41:15 +01:00
aef51375b8 New translations builder.json (German) 2023-01-20 23:41:14 +01:00
bdd65968e5 New translations dashboard.json (Spanish) 2023-01-20 19:04:27 +01:00
061a789c18 New translations modals.json (Spanish) 2023-01-20 19:04:23 +01:00
68507d0501 New translations builder.json (Spanish) 2023-01-20 19:04:19 +01:00
1e28c5adfa New translations modals.json (Romanian) 2023-01-20 10:41:28 +01:00
3b09550ebd New translations landing.json (Romanian) 2023-01-20 10:41:25 +01:00
16aef9cbec New translations builder.json (Romanian) 2023-01-20 10:41:22 +01:00
b24da90ba7 bump up version to 3.6.18 2023-01-19 07:55:12 +01:00
2aa7dbd3ad Merge pull request #1188 from AmruthPillai/feat/implement-self-serve-account-deletion
[Feature] Implement Self-Serve Account Deletion
2023-01-19 07:53:49 +01:00
9f8f2c4b8b remove console.log 2023-01-19 07:52:59 +01:00
5331ecccc1 i18n-ize the user profile modal 2023-01-19 07:51:43 +01:00
f2ec86940c Merge branch 'main' into feat/implement-self-serve-account-deletion 2023-01-19 07:34:11 +01:00
cd74e707ba update dependencies 2023-01-19 07:33:15 +01:00
ff101dbfac [Feature] Implement Self-Serve Account Deletion 2023-01-19 00:11:15 +01:00
5024c19f87 fix error messages not displaying toasts sometimes, add axios error interceptors 2023-01-18 21:36:05 +01:00
c9850b5815 Merge pull request #1183 from AmruthPillai/i18n_main
New Crowdin updates
2023-01-18 20:37:54 +01:00
6fe4e7d7e1 Merge pull request #1184 from AmruthPillai/dependabot/github_actions/docker/build-push-action-3.3.0
Bump docker/build-push-action from 3.2.0 to 3.3.0
2023-01-16 10:53:29 +01:00
a5b8b91e82 Bump docker/build-push-action from 3.2.0 to 3.3.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3.2.0...v3.3.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-16 02:33:23 +00:00
cc7095adc3 New translations landing.json (Spanish) 2023-01-16 01:53:40 +01:00
e2703f55aa New translations builder.json (Spanish) 2023-01-16 01:53:37 +01:00
8c5849c988 Merge pull request #1172 from AmruthPillai/dependabot/github_actions/actions/checkout-3.3.0
Bump actions/checkout from 3.2.0 to 3.3.0
2023-01-09 10:02:35 +01:00
5322ab2420 Merge pull request #1173 from AmruthPillai/dependabot/docker/server/playwright-v1.29.2-focal
Bump playwright from v1.29.1-focal to v1.29.2-focal in /server
2023-01-09 10:02:27 +01:00
b84e6bcfb1 Bump playwright from v1.29.1-focal to v1.29.2-focal in /server
Bumps playwright from v1.29.1-focal to v1.29.2-focal.

---
updated-dependencies:
- dependency-name: playwright
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-09 02:06:20 +00:00
a4ab0174c7 Bump actions/checkout from 3.2.0 to 3.3.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.2.0...v3.3.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-09 02:05:40 +00:00
7e93b5a757 update dependencies 2023-01-04 22:15:13 +01:00
044820fa71 Update README.md 2023-01-04 16:05:30 +01:00
322178e8a4 Merge pull request #1165 from JadinHeaston/main
Fixing unconditional ```http://``` prefix.
2023-01-03 23:22:17 +01:00
6358fbad30 Adding check for ``addHttp()` to see if `mailto:` or `tel:`` is present.Signed-off-by: Jadin Heaston <jadin.heaston@como.gov> 2023-01-03 13:57:07 -06:00
d342c0a9af fix axios type issue 2023-01-03 17:17:35 +01:00
63084eebb4 feat(dependencies): ⬆️ update dependencies, fix date display issue, add more profile icons 2023-01-03 17:06:30 +01:00
3b4ea00db8 Merge pull request #1162 from AmruthPillai/dependabot/gradle/app/org.jetbrains.kotlin.android-1.8.0
Bump org.jetbrains.kotlin.android from 1.7.22 to 1.8.0 in /app
2023-01-03 16:51:17 +01:00
c8f7bffe7e Merge pull request #1160 from coolswood/main
fix: Gengar two cols bug
2023-01-03 16:51:09 +01:00
3ff56f89d9 Merge pull request #1158 from AmruthPillai/i18n_main
New Crowdin updates
2023-01-03 16:50:48 +01:00
7fb9f27837 Bump org.jetbrains.kotlin.android from 1.7.22 to 1.8.0 in /app
Bumps [org.jetbrains.kotlin.android](https://github.com/JetBrains/kotlin) from 1.7.22 to 1.8.0.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.7.22...v1.8.0)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin.android
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-02 02:04:34 +00:00
c9685d4ce7 fix: Gengar two cols bug 2022-12-31 10:01:54 +02:00
4dc987e27d New translations landing.json (Persian) 2022-12-30 19:09:41 +01:00
f7af06ae9a New translations builder.json (Persian) 2022-12-30 18:12:15 +01:00
a5c337faa3 Merge pull request #1151 from AmruthPillai/dependabot/github_actions/digitalocean/action-doctl-2.3.0
Bump digitalocean/action-doctl from 2.2.0 to 2.3.0
2022-12-30 11:48:34 +01:00
fc4704f0a6 Merge pull request #1150 from AmruthPillai/dependabot/docker/server/playwright-v1.29.1-focal
Bump playwright from v1.29.0-focal to v1.29.1-focal in /server
2022-12-30 11:48:25 +01:00
d968334ada Merge pull request #1155 from coolswood/main
fix: overflow-y-auto
2022-12-29 21:37:29 +01:00
fea6d23178 fix: overflow-y-auto 2022-12-29 19:37:47 +02:00
3fefc95572 Bump digitalocean/action-doctl from 2.2.0 to 2.3.0
Bumps [digitalocean/action-doctl](https://github.com/digitalocean/action-doctl) from 2.2.0 to 2.3.0.
- [Release notes](https://github.com/digitalocean/action-doctl/releases)
- [Commits](https://github.com/digitalocean/action-doctl/compare/v2.2.0...v2.3.0)

---
updated-dependencies:
- dependency-name: digitalocean/action-doctl
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-26 02:04:49 +00:00
b07e7d1213 Bump playwright from v1.29.0-focal to v1.29.1-focal in /server
Bumps playwright from v1.29.0-focal to v1.29.1-focal.

---
updated-dependencies:
- dependency-name: playwright
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-26 02:04:31 +00:00
d47b8bfb03 Merge pull request #1139 from AmruthPillai/dependabot/github_actions/actions/checkout-3.2.0
Bump actions/checkout from 3.1.0 to 3.2.0
2022-12-19 10:22:44 +01:00
5bf7fbdae1 Merge pull request #1140 from AmruthPillai/dependabot/docker/server/playwright-v1.29.0-focal
Bump playwright from v1.28.1-focal to v1.29.0-focal in /server
2022-12-19 10:22:34 +01:00
fca766b382 Bump playwright from v1.28.1-focal to v1.29.0-focal in /server
Bumps playwright from v1.28.1-focal to v1.29.0-focal.

---
updated-dependencies:
- dependency-name: playwright
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-19 02:06:27 +00:00
feadfb1b67 Bump actions/checkout from 3.1.0 to 3.2.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.1.0...v3.2.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-19 02:06:19 +00:00
e69000f221 Merge pull request #1137 from AmruthPillai/feat/add-remark-gfm-math-plugins
feat(client):  add github flavored syntax and math equations to markdown support
2022-12-17 10:27:19 +01:00
6b4a54465a feat(client): add github flavored syntax and math equations to markdown support 2022-12-17 10:19:25 +01:00
878659999f Merge pull request #1135 from AmruthPillai/i18n_main
New Crowdin updates
2022-12-17 09:53:13 +01:00
1868c47e30 New translations common.json (Dutch) 2022-12-17 09:48:12 +01:00
51442efc23 New translations common.json (German) 2022-12-17 09:48:07 +01:00
556e962ec5 refactor(client): 📝 add link to subreddit 2022-12-16 22:56:23 +01:00
b5ce67f863 Update README.md 2022-12-16 18:06:46 +01:00
c3ce89dc3a Update README.md 2022-12-16 18:04:22 +01:00
e87930c758 bump version to 3.6.16 2022-12-16 17:59:58 +01:00
815a693e58 Merge pull request #1134 from AmruthPillai/feature/configure-gitpod
Configure Gitpod for easier development and self-hosting
2022-12-16 17:58:50 +01:00
8287fcae96 add gitpod to README.md 2022-12-16 17:58:38 +01:00
cd7fe6c404 Remove .env.gitpod 2022-12-16 15:58:22 +00:00
d47d5dd819 build and run project finally, in gitpod 2022-12-16 16:52:37 +01:00
1919d79e43 fix url host parsing 2022-12-16 15:50:43 +00:00
ab08cd9e34 add sync await/done 2022-12-16 16:46:26 +01:00
2522bdd0a2 add onOpen: ignore to postgres port 2022-12-16 16:42:02 +01:00
f9b6aefffe create .env generation script 2022-12-16 16:39:29 +01:00
2ba6658a0b add CORS to server, input appUrl 2022-12-16 15:04:08 +00:00
dbc46f27a3 add postgres port 2022-12-16 14:12:43 +00:00
f21e1caed1 trying this now 2022-12-16 15:09:43 +01:00
4ffe2a6330 add 2022-12-16 15:03:22 +01:00
1bc0438872 remove 2022-12-16 15:03:06 +01:00
57fb9fdaea add dockerfile support to gitpod.yml 2022-12-16 14:01:17 +00:00
58ce641f18 add postgres to gitpod 2022-12-16 13:56:08 +00:00
5f4e7802e4 Merge branch 'main' into feature/configure-gitpod 2022-12-16 13:44:46 +00:00
42d3109ae1 Merge pull request #1128 from AmruthPillai/dependabot/gradle/app/org.jetbrains.kotlin.android-1.7.22
Bump org.jetbrains.kotlin.android from 1.7.21 to 1.7.22 in /app
2022-12-16 14:43:57 +01:00
f7ca7b97fa Merge pull request #1127 from AmruthPillai/dependabot/docker/server/playwright-v1.28.1-focal
Bump playwright from v1.28.0-focal to v1.28.1-focal in /server
2022-12-16 14:43:51 +01:00
f5d8a54134 Merge pull request #1130 from Jack-Kingdom/main
Fix: wait for networkidle event to ensure image load
2022-12-16 14:43:43 +01:00
eaec14dc62 initial gitpod configuration 2022-12-16 13:42:03 +00:00
c93b3264cd Bump playwright from v1.28.0-focal to v1.28.1-focal in /server
Bumps playwright from v1.28.0-focal to v1.28.1-focal.

---
updated-dependencies:
- dependency-name: playwright
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-16 13:34:56 +00:00
bf41aa9c6c feat(sentry): remove sentry integration 2022-12-16 14:34:15 +01:00
8af6bfd5ae Fix: wait for networkidle event to ensure image load 2022-12-10 02:55:38 +08:00
ab08c10874 Bump org.jetbrains.kotlin.android from 1.7.21 to 1.7.22 in /app
Bumps [org.jetbrains.kotlin.android](https://github.com/JetBrains/kotlin) from 1.7.21 to 1.7.22.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.7.21...v1.7.22)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin.android
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-05 02:08:23 +00:00
9af9a0284e set sentry user ID, if available and applicable 2022-12-03 00:15:08 +01:00
716a05032d one more attempt to fix sentry auth issue 2022-12-02 23:54:25 +01:00
43e43e7d76 one more attempt to fix sentry auth issue 2022-12-02 23:44:51 +01:00
c91af3668d attempt to fix sentry auth issue 2022-12-02 23:32:04 +01:00
52f41f0b3b bump version to v3.6.15 2022-12-02 23:22:54 +01:00
3b709d606b Merge pull request #1120 from AmruthPillai/feature/sentry-integration
[Feature] Sentry Integration (Optional for Self Hosted)
2022-12-02 23:21:59 +01:00
2e5fafac62 remove unnecessary envs 2022-12-02 23:21:00 +01:00
ea2aee2d25 add release version to sentry ci process 2022-12-02 23:16:48 +01:00
e36fbb5f64 Update .env.example 2022-12-02 22:13:07 +01:00
5221ef707b Merge branch 'main' into feature/sentry-integration 2022-12-02 22:10:58 +01:00
f0df806f01 remove link underline style 2022-12-02 22:10:08 +01:00
9d01d6a833 update version ot 3.6.14 2022-12-02 13:59:13 +01:00
1914ebb9ae fix links in PDF 2022-12-02 13:55:56 +01:00
686dba90c9 Merge pull request #1114 from tryallthethings/pdf-template-fix
Fix for links in PDFs, template fix
2022-12-02 13:41:37 +01:00
95dc3bf571 Merge pull request #1108 from tryallthethings/translation-fix
Translation fix
2022-12-02 13:37:35 +01:00
1c8fdbf848 Merge pull request #1107 from tryallthethings/main
fix: made some missing texts translatable
2022-12-02 13:37:25 +01:00
d8357c9959 Fix: Every other instance of invoked clsx hence adding it here as well. 2022-11-26 14:37:48 +01:00
90e994377b Fix: Adding quotation marks seems to fix #1112 2022-11-26 14:36:56 +01:00
82c6ee6d5d fix: Updated German translation. A lot of minor changes as well as rephrasing of whole sentences. This translation is now also 100% formal, instead of a mix of formal and informal. 2022-11-25 18:42:37 +01:00
7b615e73c3 fix: Changed German language description to formal 2022-11-25 18:42:00 +01:00
268e4a87fe Revert "fix: made some missing texts translatable"
This reverts commit deb4e0a0de.
2022-11-25 18:39:09 +01:00
73f8eb84c9 Revert "fix: Updated German translation. A lot of minor changes as well as rephrasing of whole sentences."
This reverts commit e0a42fd928.
2022-11-25 18:39:07 +01:00
a31ef89996 Revert "fix: Changed German language description to formal"
This reverts commit d6bca7ebab.
2022-11-25 18:38:55 +01:00
d6bca7ebab fix: Changed German language description to formal 2022-11-25 18:29:55 +01:00
e0a42fd928 fix: Updated German translation. A lot of minor changes as well as rephrasing of whole sentences. 2022-11-25 18:27:28 +01:00
deb4e0a0de fix: made some missing texts translatable
BREAKING CHANGE: locales without the new fields will display the field name
2022-11-25 18:22:29 +01:00
a687062866 Merge pull request #1105 from tryallthethings/patch-3
Update date.ts
2022-11-25 18:10:11 +01:00
700439c8a8 Update date.ts
Added a common date format for Germany.
2022-11-25 18:00:08 +01:00
fb09283e53 add some more properties for sentry 2022-11-25 13:07:40 +01:00
88ac365e03 use v1.28.0-focal instead of next-jammy 2022-11-25 11:52:14 +01:00
aec78cf875 lay the ground work for sentry integration 2022-11-25 11:32:57 +01:00
77c587681b using fetch instead of axios, should fix the issue 2022-11-24 22:25:23 +01:00
7ac8b906d9 add await 2022-11-24 22:16:00 +01:00
e9a5f86a6a using fetch instead of axios, server side 2022-11-24 22:14:01 +01:00
7238a3b50e some more logs 2022-11-24 22:01:00 +01:00
ebe13fa82e push a bunch of console.logs 2022-11-24 21:45:42 +01:00
6ee290a625 add logs to check what's wrong 2022-11-24 21:31:43 +01:00
355 changed files with 12271 additions and 6496 deletions

View File

@ -2,7 +2,7 @@
/app
# Build Artifacts
**/.turbo
/schema/dist
/server/dist
/client/.next

View File

@ -1,7 +1,3 @@
# Turbo Cache (Optional)
TURBO_TEAM=
TURBO_TOKEN=
# Server + Client
TZ=UTC
PUBLIC_URL=http://localhost:3000
@ -15,7 +11,7 @@ POSTGRES_PASSWORD=postgres
# Server
SECRET_KEY=
POSTGRES_HOST=postgres
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_SSL_CERT=
JWT_SECRET=
@ -36,5 +32,5 @@ STORAGE_ACCESS_KEY=
STORAGE_SECRET_KEY=
PDF_DELETION_TIME=345600000
# Flags (Client)
PUBLIC_FLAG_DISABLE_SIGNUPS=false
# Client
PUBLIC_FLAG_DISABLE_SIGNUPS=false

View File

@ -1,12 +1,23 @@
{
"ignorePatterns": ["/app"],
"parser": "@typescript-eslint/parser",
"extends": ["plugin:@typescript-eslint/recommended"],
"plugins": ["@typescript-eslint/eslint-plugin", "simple-import-sort"],
"plugins": ["@typescript-eslint/eslint-plugin", "unused-imports", "simple-import-sort"],
"rules": {
// ESLint
"no-unused-vars": "off",
// Unused Imports
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"warn",
{
"vars": "all",
"args": "none",
"varsIgnorePattern": "^_",
"argsIgnorePattern": "^_"
}
],
// Simple Import Sort
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
@ -14,6 +25,7 @@
// TypeScript ESLint
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off"

View File

@ -1,43 +0,0 @@
---
name: Bug Report
about: Create a report to help improve
title: '[BUG] '
labels: bug
assignees: ''
---
**Describe the bug**
<!-- A clear and concise description of what the bug is. -->
**Product Flavor**
- [ ] Managed (https://rxresu.me)
- [ ] Self Hosted
**To Reproduce**
<!-- Steps to reproduce the behavior: -->
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->
**Screenshots**
<!-- If applicable, add screenshots to help explain your problem. -->
**Desktop (please complete the following information):**
- OS: <!--[e.g. iOS]-->
- Browser <!--[e.g. chrome, safari]-->
- Version <!--[e.g. 22]-->
**Additional context**
<!-- Add any other context about the problem here. -->

75
.github/ISSUE_TEMPLATE/bug-report.yaml vendored Normal file
View File

@ -0,0 +1,75 @@
name: 🐞 Bug Report
description: Create a bug report to help improve Reactive Resume.
title: "[Bug] <title>"
labels: [Bug, Needs Triage]
assignees: "AmruthPillai"
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: Yes, I have searched the existing issues
required: true
- type: dropdown
id: variant
attributes:
label: Product Variant
description: What variant of Reactive Resume are you using?
options:
- Cloud (http://rxresu.me)
- Self-Hosted
validations:
required: true
- type: textarea
attributes:
label: Current Behavior
description: A concise description of what you're experiencing.
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: false
- type: textarea
attributes:
label: Steps To Reproduce
description: Detailed steps to reproduce the behavior, so that it can be easily diagnosed.
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: false
- type: dropdown
id: browsers
attributes:
label: What browsers are you seeing the problem on?
multiple: true
options:
- Firefox
- Chrome
- Safari
- Microsoft Edge
validations:
required: false
- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the issue you are encountering!
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false

View File

@ -1,23 +0,0 @@
---
name: Feature Request
about: Suggest an idea for this project
title: '[FEATURE] '
labels: enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
**Describe the solution you'd like**
<!-- A clear and concise description of what you want to happen. -->
**Describe alternatives you've considered**
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
**Additional context**
<!-- Add any other context or screenshots about the feature request here. -->

View File

@ -0,0 +1,22 @@
name: ✨ Feature Request
description: Suggest an feature or idea that you would like to see in Reactive Resume.
title: "[Feature] <title>"
labels: [Feature, Needs Triage]
assignees: "AmruthPillai"
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the feature you requested.
options:
- label: Yes, I have searched the existing issues and it doesn't exist
required: true
- type: textarea
attributes:
label: Feature Description
description: A concise description of what feature you would like to see in Reactive Resume.
validations:
required: true

142
.github/workflows/build-deploy.yml vendored Normal file
View File

@ -0,0 +1,142 @@
name: Build and Deploy
on:
workflow_dispatch:
release:
types: [published]
jobs:
build-amd64:
name: Build (amd64)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image:
- client
- server
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.3
- name: Retrieve version from package.json
id: version
uses: martinbeentjes/npm-get-version-action@v1.3.1
- name: Docker Metadaata
id: meta
uses: docker/metadata-action@v4.6.0
with:
images: amruthpillai/reactive-resume
tags: |
type=raw,value=${{ matrix.image }}-latest
type=raw,value=${{ matrix.image }}-${{ steps.version.outputs.current-version }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2.2.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.9.0
- name: Login to Docker Hub
uses: docker/login-action@v2.2.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2.2.0
with:
registry: ghcr.io
username: $GITHUB_REPOSITORY_OWNER
password: ${{ secrets.GH_TOKEN }}
- name: Build and Push
id: build
uses: docker/build-push-action@v4.1.1
with:
context: .
push: true
platforms: linux/amd64
file: ${{ matrix.image }}/Dockerfile
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
build-args: |
TURBO_TOKEN=${{ secrets.TURBO_TOKEN }}
build-arm64:
name: Build (arm64)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image:
- client
- server
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.3
- name: Retrieve version from package.json
id: version
uses: martinbeentjes/npm-get-version-action@v1.3.1
- name: Docker Metadaata
id: meta
uses: docker/metadata-action@v4.6.0
with:
images: amruthpillai/reactive-resume
tags: |
type=raw,value=${{ matrix.image }}-latest
type=raw,value=${{ matrix.image }}-${{ steps.version.outputs.current-version }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2.2.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.9.0
- name: Login to Docker Hub
uses: docker/login-action@v2.2.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2.2.0
with:
registry: ghcr.io
username: $GITHUB_REPOSITORY_OWNER
password: ${{ secrets.GH_TOKEN }}
- name: Build and Push
id: build
uses: docker/build-push-action@v4.1.1
with:
context: .
push: true
platforms: linux/arm64
file: ${{ matrix.image }}/Dockerfile
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
build-args: |
TURBO_TOKEN=${{ secrets.TURBO_TOKEN }}
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: build-amd64
steps:
- name: Install DigitalOcean CLI
uses: digitalocean/action-doctl@v2.3.0
with:
token: ${{ secrets.DIGITALOCEAN_TOKEN }}
- name: Create Deployment with Latest Version
run: doctl apps create-deployment ${{ secrets.DIGITALOCEAN_APP_ID }} --wait --force-rebuild

View File

@ -1,28 +0,0 @@
name: Deploy Latest Version on DigitalOcean
on:
workflow_run:
workflows:
- Build and Push Docker Image
types:
- completed
jobs:
on-success:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Install DigitalOcean CLI
uses: digitalocean/action-doctl@v2.2.0
with:
token: ${{ secrets.DIGITALOCEAN_TOKEN }}
- name: Create Deployment with Latest Version
run: doctl apps create-deployment ${{ secrets.DIGITALOCEAN_APP_ID }} --wait --force-rebuild
on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- name: Abruptly end the worklfow
run: exit 1

View File

@ -1,62 +0,0 @@
name: Build and Push Docker Image
on:
workflow_dispatch:
release:
types: [published]
jobs:
build_matrix:
name: Build and Push Docker Image
runs-on: ubuntu-latest
env:
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
strategy:
matrix:
image: [client, server]
steps:
- name: Checkout the repository
uses: actions/checkout@v3.1.0
- id: version
name: App Version
uses: martinbeentjes/npm-get-version-action@v1.2.3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2.1.0
with:
platforms: amd64
- id: buildx
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.2.1
- name: Login to Docker Hub
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.1.0
with:
registry: ghcr.io
username: $GITHUB_REPOSITORY_OWNER
password: ${{ secrets.GH_TOKEN }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v3.2.0
with:
context: .
push: true
platforms: linux/amd64
file: ${{ matrix.image }}/Dockerfile
tags: |
amruthpillai/reactive-resume:${{ matrix.image }}-latest
amruthpillai/reactive-resume:${{ matrix.image }}-${{ steps.version.outputs.current-version }}
ghcr.io/amruthpillai/reactive-resume:${{ matrix.image }}-latest
ghcr.io/amruthpillai/reactive-resume:${{ matrix.image }}-${{ steps.version.outputs.current-version }}

8
.gitignore vendored
View File

@ -1,6 +1,8 @@
# Environment Variables
.env
.env.*
*.env
!.env.gitpod
!.env.example
# Project Dependencies
@ -9,8 +11,8 @@ node_modules
# macOS
.DS_Store
# Turbo
.turbo
# Intellij
.idea
# Turborepo
.turbo

41
.gitpod.yml Normal file
View File

@ -0,0 +1,41 @@
tasks:
- name: Run PostgreSQL Database
command: docker run --name postgres -p 5432:5432 -e POSTGRES_PASSWORD=postgres -d postgres
- name: Install Project Dependencies
command: |
pnpm install
pnpm dlx playwright install --with-deps chromium
gp sync-done deps
- name: Generate Environment Variables
init: gp sync-await deps
command: |
if [ -f .env ]; then
echo "Found .env in workspace, skipping generation"
else
pnpm generate-env
fi
gp sync-done env
- name: Build and Run Project
init: gp sync-await env
command: |
pnpm build
pnpm start
ports:
# PostgreSQL
- port: 5432
onOpen: ignore
visibility: private
# Client
- port: 3100
onOpen: ignore
visibility: public
# Client
- port: 3000
onOpen: open-browser
visibility: public

View File

@ -1,4 +1,4 @@
<img src="https://rxresu.me/images/logos/logo.png" alt="Reactive Resume" width="256px" height="256px" />
<img src="/client/public/logo/dark.svg" alt="Reactive Resume" width="256px" height="256px" />
# Reactive Resume
@ -6,7 +6,8 @@
[![Project License](https://img.shields.io/github/license/AmruthPillai/Reactive-Resume?style=flat-square)](https://github.com/AmruthPillai/Reactive-Resume/blob/main/LICENSE)
[![Crowdin](https://badges.crowdin.net/reactive-resume/localized.svg)](https://translate.rxresu.me)
[![Docker Pulls](https://img.shields.io/docker/pulls/amruthpillai/reactive-resume?style=flat-square)](https://hub.docker.com/r/amruthpillai/reactive-resume)
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/AmruthPillai/Reactive-Resume/Build%20and%20Push%20Docker%20Image?label=docker%20build&style=flat-square)
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/AmruthPillai/Reactive-Resume/docker-build-push.yml?branch=main&label=docker%20build&style=flat-square)
[![Gitpod](https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod)](https://gitpod.io/#https://github.com/AmruthPillai/Reactive-Resume)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FAmruthPillai%2FReactive-Resume.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FAmruthPillai%2FReactive-Resume?ref=badge_shield)
## [Go to App](https://rxresu.me) | [Docs](https://docs.rxresu.me)
@ -18,7 +19,7 @@ You have complete control over what goes into your resume, how it looks, what co
## Table of Contents
- [Reactive Resume](#reactive-resume)
- [Go to App Docs](https://docs.rxresu.me)
- [Go to App | Docs](#go-to-app--docs)
- [Table of Contents](#table-of-contents)
- [Features](#features)
- [Languages](#languages)
@ -29,6 +30,7 @@ You have complete control over what goes into your resume, how it looks, what co
- [Donations](#donations)
- [GitHub Sponsor](#github-sponsor)
- [PayPal](#paypal)
- [GitHub Star History](#github-star-history)
- [Infrastructure](#infrastructure)
- [Contributors Wall](#contributors-wall)
- [License](#license)
@ -104,6 +106,10 @@ The docs include an extensive [Tutorial](https://docs.rxresu.me/tutorial) sectio
## Build from Source
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/AmruthPillai/Reactive-Resume)
Initially building the image and project on Gitpod will take at least ~10 minutes, so please be patient on first launch.
For extensive information on how to build the app on your local machine, head over to the docs [Source Code](https://docs.rxresu.me/source-code) section.
## Contributing
@ -129,6 +135,10 @@ Reactive Resume would be nothing without the folks who supported me and kept the
### [GitHub Sponsor](https://github.com/sponsors/AmruthPillai)
### [PayPal](https://paypal.me/RajaRajanA)
## GitHub Star History
[![Star History Chart](https://api.star-history.com/svg?repos=AmruthPillai/Reactive-Resume&type=Date)](https://star-history.com/#AmruthPillai/Reactive-Resume&Date)
## Infrastructure
- [Next.js](https://nextjs.org/), frontend

View File

@ -12,8 +12,8 @@ android {
targetSdk 32
versionCode 3
versionName "1.0"
resConfigs 'en'
resConfigs "en"
}
buildTypes {
@ -38,6 +38,7 @@ android {
buildFeatures {
viewBinding true
}
namespace 'me.rxresu.app'
}
dependencies {

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="me.rxresu.app">
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET"/>

View File

@ -6,7 +6,6 @@ import android.webkit.WebView
import androidx.appcompat.app.AppCompatActivity
class MainActivity : AppCompatActivity() {
private lateinit var webView: WebView
private var url = "https://rxresu.me"

View File

@ -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.21' apply false
id 'com.android.application' version '7.4.2' apply false
id 'com.android.library' version '7.4.2' apply false
id 'org.jetbrains.kotlin.android' version '1.9.0' apply false
}
task clean(type: Delete) {

View File

@ -1,6 +1,6 @@
#Wed Mar 09 21:34:49 CET 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

View File

@ -12,6 +12,9 @@
"@next/next/no-img-element": "off",
"@next/next/no-sync-scripts": "off",
// React
"react/no-unescaped-entities": "off",
// React Hooks
"react-hooks/exhaustive-deps": "off",

View File

@ -2,12 +2,12 @@ FROM node:lts-alpine AS base
WORKDIR /app
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
RUN apk add --no-cache g++ git make curl python3 libc6-compat \
&& corepack enable && corepack prepare pnpm@latest --activate
FROM base as dependencies
COPY package.json pnpm-*.yaml turbo.json ./
COPY package.json pnpm-*.yaml ./
COPY ./schema/package.json ./schema/package.json
COPY ./client/package.json ./client/package.json
@ -21,17 +21,14 @@ 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
ARG TURBO_TEAM
ARG TURBO_TOKEN
ENV TURBO_TOKEN=$TURBO_TOKEN
ENV TURBO_TEAM $TURBO_TEAM
ENV TURBO_TOKEN $TURBO_TOKEN
RUN pnpm run build --filter client
RUN pnpm exec turbo --filter client build
FROM base as production
COPY --from=builder /app/package.json /app/pnpm-*.yaml /app/turbo.json ./
COPY --from=builder /app/package.json /app/pnpm-*.yaml ./
COPY --from=builder /app/client/package.json ./client/package.json
RUN pnpm install --filter client --prod --frozen-lockfile --workspace-root
@ -45,7 +42,4 @@ EXPOSE 3000
ENV PORT 3000
HEALTHCHECK --interval=30s --timeout=20s --retries=3 --start-period=15s \
CMD curl -fSs localhost:3000 || exit 1
CMD [ "pnpm", "run", "start", "--filter", "client" ]
CMD [ "pnpm", "run", "--filter", "client", "start" ]

View File

@ -0,0 +1,43 @@
FROM node:20-alpine AS base
FROM base AS deps
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
RUN \
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
elif [ -f package-lock.json ]; then npm ci; \
elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i --frozen-lockfile; \
else echo "Lockfile not found." && exit 1; \
fi
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
ENV NEXT_TELEMETRY_DISABLED 1
RUN yarn global add pnpm && pnpm build
FROM base AS runner
WORKDIR /app
ENV NODE_ENV production
ENV NEXT_TELEMETRY_DISABLED 1
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
COPY --from=builder /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
USER nextjs
EXPOSE 3000
ENV PORT 3000
CMD ["node", "client/server.js"]

View File

@ -15,7 +15,7 @@
.controller {
@apply z-20 flex items-center justify-center shadow-lg;
@apply flex rounded-l-full rounded-r-full px-4;
@apply bg-neutral-50 dark:bg-neutral-800;
@apply bg-zinc-50 dark:bg-zinc-900;
@apply opacity-70 transition-opacity duration-200 hover:opacity-100;
> button {
@ -23,6 +23,6 @@
}
> hr {
@apply mx-3 h-5 w-0.5 bg-neutral-900/40 dark:bg-neutral-50/20;
@apply mx-3 h-5 w-0.5 bg-zinc-900/40 dark:bg-zinc-50/20;
}
}

View File

@ -12,13 +12,12 @@ import {
ZoomOut,
} from '@mui/icons-material';
import { ButtonBase, Divider, Tooltip, useMediaQuery, useTheme } from '@mui/material';
import clsx from 'clsx';
import dayjs from 'dayjs';
import { get } from 'lodash';
import get from 'lodash/get';
import { useTranslation } from 'next-i18next';
import toast from 'react-hot-toast';
import { useMutation } from 'react-query';
import { ReactZoomPanPinchRef } from 'react-zoom-pan-pinch';
import { ReactZoomPanPinchHandlers } from 'react-zoom-pan-pinch';
import { ActionCreators } from 'redux-undo';
import { ServerError } from '@/services/axios';
@ -26,10 +25,11 @@ import { printResumeAsPdf, PrintResumeAsPdfParams } from '@/services/printer';
import { togglePageBreakLine, togglePageOrientation, toggleSidebar } from '@/store/build/buildSlice';
import { useAppDispatch, useAppSelector } from '@/store/hooks';
import getResumeUrl from '@/utils/getResumeUrl';
import { cn } from '@/utils/styles';
import styles from './ArtboardController.module.scss';
const ArtboardController: React.FC<ReactZoomPanPinchRef> = ({ zoomIn, zoomOut, centerView }) => {
const ArtboardController: React.FC<ReactZoomPanPinchHandlers> = ({ zoomIn, zoomOut, centerView }) => {
const { t } = useTranslation();
const theme = useTheme();
@ -60,7 +60,7 @@ const ArtboardController: React.FC<ReactZoomPanPinchRef> = ({ zoomIn, zoomOut, c
const url = getResumeUrl(resume, { withHost: true });
await navigator.clipboard.writeText(url);
toast.success(t<string>('common.toast.success.resume-link-copied'));
toast.success(t('common.toast.success.resume-link-copied'));
};
const handleExportPDF = async () => {
@ -77,40 +77,40 @@ const ArtboardController: React.FC<ReactZoomPanPinchRef> = ({ zoomIn, zoomOut, c
return (
<div
className={clsx({
className={cn({
[styles.container]: true,
[styles.pushLeft]: left.open,
[styles.pushRight]: right.open,
})}
>
<div className={styles.controller}>
<Tooltip arrow placement="top" title={t<string>('builder.controller.tooltip.undo')}>
<ButtonBase onClick={handleUndo} className={clsx({ 'pointer-events-none opacity-50': past.length < 2 })}>
<Tooltip arrow placement="top" title={t('builder.controller.tooltip.undo')}>
<ButtonBase onClick={handleUndo} className={cn({ 'pointer-events-none opacity-50': past.length < 2 })}>
<UndoOutlined fontSize="medium" />
</ButtonBase>
</Tooltip>
<Tooltip arrow placement="top" title={t<string>('builder.controller.tooltip.redo')}>
<ButtonBase onClick={handleRedo} className={clsx({ 'pointer-events-none opacity-50': future.length === 0 })}>
<Tooltip arrow placement="top" title={t('builder.controller.tooltip.redo')}>
<ButtonBase onClick={handleRedo} className={cn({ 'pointer-events-none opacity-50': future.length === 0 })}>
<RedoOutlined fontSize="medium" />
</ButtonBase>
</Tooltip>
<Divider />
<Tooltip arrow placement="top" title={t<string>('builder.controller.tooltip.zoom-in')}>
<Tooltip arrow placement="top" title={t('builder.controller.tooltip.zoom-in')}>
<ButtonBase onClick={() => zoomIn(0.25)}>
<ZoomIn fontSize="medium" />
</ButtonBase>
</Tooltip>
<Tooltip arrow placement="top" title={t<string>('builder.controller.tooltip.zoom-out')}>
<Tooltip arrow placement="top" title={t('builder.controller.tooltip.zoom-out')}>
<ButtonBase onClick={() => zoomOut(0.25)}>
<ZoomOut fontSize="medium" />
</ButtonBase>
</Tooltip>
<Tooltip arrow placement="top" title={t<string>('builder.controller.tooltip.center-artboard')}>
<Tooltip arrow placement="top" title={t('builder.controller.tooltip.center-artboard')}>
<ButtonBase onClick={() => centerView(0.95)}>
<FilterCenterFocus fontSize="medium" />
</ButtonBase>
@ -120,10 +120,10 @@ const ArtboardController: React.FC<ReactZoomPanPinchRef> = ({ zoomIn, zoomOut, c
{isDesktop && (
<>
<Tooltip arrow placement="top" title={t<string>('builder.controller.tooltip.toggle-orientation')}>
<Tooltip arrow placement="top" title={t('builder.controller.tooltip.toggle-orientation')}>
<ButtonBase
onClick={handleTogglePageOrientation}
className={clsx({ 'pointer-events-none opacity-50': pages.length === 1 })}
className={cn({ 'pointer-events-none opacity-50': pages.length === 1 })}
>
{orientation === 'vertical' ? (
<AlignHorizontalCenter fontSize="medium" />
@ -133,13 +133,13 @@ const ArtboardController: React.FC<ReactZoomPanPinchRef> = ({ zoomIn, zoomOut, c
</ButtonBase>
</Tooltip>
<Tooltip arrow placement="top" title={t<string>('builder.controller.tooltip.toggle-page-break-line')}>
<Tooltip arrow placement="top" title={t('builder.controller.tooltip.toggle-page-break-line')}>
<ButtonBase onClick={handleTogglePageBreakLine}>
<InsertPageBreak fontSize="medium" />
</ButtonBase>
</Tooltip>
<Tooltip arrow placement="top" title={t<string>('builder.controller.tooltip.toggle-sidebars')}>
<Tooltip arrow placement="top" title={t('builder.controller.tooltip.toggle-sidebars')}>
<ButtonBase onClick={handleToggleSidebar}>
<ViewSidebar fontSize="medium" />
</ButtonBase>
@ -149,13 +149,13 @@ const ArtboardController: React.FC<ReactZoomPanPinchRef> = ({ zoomIn, zoomOut, c
</>
)}
<Tooltip arrow placement="top" title={t<string>('builder.controller.tooltip.copy-link')}>
<Tooltip arrow placement="top" title={t('builder.controller.tooltip.copy-link')}>
<ButtonBase onClick={handleCopyLink}>
<Link fontSize="medium" />
</ButtonBase>
</Tooltip>
<Tooltip arrow placement="top" title={t<string>('builder.controller.tooltip.export-pdf')}>
<Tooltip arrow placement="top" title={t('builder.controller.tooltip.export-pdf')}>
<ButtonBase onClick={handleExportPDF} disabled={isLoading}>
<Download fontSize="medium" />
</ButtonBase>

View File

@ -1,7 +1,7 @@
.center {
@apply mx-0 flex flex-grow pt-12 lg:pt-16;
@apply transition-[margin-left,margin-right] duration-200;
@apply bg-neutral-200 dark:bg-neutral-900;
@apply bg-zinc-100 dark:bg-zinc-900;
}
.wrapper {

View File

@ -1,9 +1,9 @@
import clsx from 'clsx';
import get from 'lodash/get';
import isEmpty from 'lodash/isEmpty';
import { TransformComponent, TransformWrapper } from 'react-zoom-pan-pinch';
import { useAppSelector } from '@/store/hooks';
import { cn } from '@/utils/styles';
import ArtboardController from './ArtboardController';
import styles from './Center.module.scss';
@ -19,7 +19,7 @@ const Center = () => {
if (isEmpty(resume)) return null;
return (
<div className={clsx(styles.center)}>
<div className={cn(styles.center)}>
<Header />
<TransformWrapper
@ -35,7 +35,7 @@ const Center = () => {
<>
<TransformComponent wrapperClass={styles.wrapper}>
<div
className={clsx({
className={cn({
[styles.artboard]: true,
'flex-col': orientation === 'vertical',
})}

View File

@ -1,10 +1,10 @@
.header {
@apply mx-0 flex justify-between shadow;
@apply bg-neutral-800 text-neutral-100;
@apply bg-zinc-900 text-zinc-100;
@apply transition-[margin-left,margin-right] duration-200;
button > svg {
@apply text-base text-neutral-100;
@apply text-base text-zinc-100;
}
}

View File

@ -20,14 +20,13 @@ import {
useMediaQuery,
useTheme,
} from '@mui/material';
import { Resume } from '@reactive-resume/schema';
import clsx from 'clsx';
import get from 'lodash/get';
import { useRouter } from 'next/router';
import { useTranslation } from 'next-i18next';
import { useEffect, useMemo, useState } from 'react';
import toast from 'react-hot-toast';
import { useMutation } from 'react-query';
import { Resume } from 'schema';
import { RESUMES_QUERY } from '@/constants/index';
import { ServerError } from '@/services/axios';
@ -37,6 +36,7 @@ import { setSidebarState, toggleSidebar } from '@/store/build/buildSlice';
import { useAppDispatch, useAppSelector } from '@/store/hooks';
import { setModalState } from '@/store/modal/modalSlice';
import getResumeUrl from '@/utils/getResumeUrl';
import { cn } from '@/utils/styles';
import styles from './Header.module.scss';
@ -53,13 +53,12 @@ const Header = () => {
const [anchorEl, setAnchorEl] = useState<HTMLButtonElement | null>(null);
const { mutateAsync: duplicateMutation } = useMutation<Resume, ServerError, DuplicateResumeParams>(duplicateResume);
const { mutateAsync: deleteMutation } = useMutation<void, ServerError, DeleteResumeParams>(deleteResume);
const resume = useAppSelector((state) => state.resume.present);
const { left, right } = useAppSelector((state) => state.build.sidebar);
const { mutateAsync: deleteMutation } = useMutation<void, ServerError, DeleteResumeParams>(deleteResume);
const { mutateAsync: duplicateMutation } = useMutation<Resume, ServerError, DuplicateResumeParams>(duplicateResume);
const name = useMemo(() => get(resume, 'name'), [resume]);
useEffect(() => {
@ -103,7 +102,7 @@ const Header = () => {
},
},
},
})
}),
);
};
@ -133,14 +132,14 @@ const Header = () => {
const url = getResumeUrl(resume, { withHost: true });
await navigator.clipboard.writeText(url);
toast.success(t<string>('common.toast.success.resume-link-copied'));
toast.success(t('common.toast.success.resume-link-copied'));
};
return (
<AppBar elevation={0} position="fixed">
<Toolbar
variant="regular"
className={clsx({
className={cn({
[styles.header]: true,
[styles.pushLeft]: left.open,
[styles.pushRight]: right.open,
@ -166,14 +165,14 @@ const Header = () => {
<ListItemIcon>
<DriveFileRenameOutline className="scale-90" />
</ListItemIcon>
<ListItemText>{t<string>('builder.header.menu.rename')}</ListItemText>
<ListItemText>{t('builder.header.menu.rename')}</ListItemText>
</MenuItem>
<MenuItem onClick={handleDuplicate}>
<ListItemIcon>
<CopyAll className="scale-90" />
</ListItemIcon>
<ListItemText>{t<string>('builder.header.menu.duplicate')}</ListItemText>
<ListItemText>{t('builder.header.menu.duplicate')}</ListItemText>
</MenuItem>
{resume.public ? (
@ -181,27 +180,27 @@ const Header = () => {
<ListItemIcon>
<LinkIcon className="scale-90" />
</ListItemIcon>
<ListItemText>{t<string>('builder.header.menu.share-link')}</ListItemText>
<ListItemText>{t('builder.header.menu.share-link')}</ListItemText>
</MenuItem>
) : (
<Tooltip arrow placement="right" title={t<string>('builder.header.menu.tooltips.share-link')}>
<Tooltip arrow placement="right" title={t('builder.header.menu.tooltips.share-link')}>
<div>
<MenuItem>
<ListItemIcon>
<LinkIcon className="scale-90" />
</ListItemIcon>
<ListItemText>{t<string>('builder.header.menu.share-link')}</ListItemText>
<ListItemText>{t('builder.header.menu.share-link')}</ListItemText>
</MenuItem>
</div>
</Tooltip>
)}
<Tooltip arrow placement="right" title={t<string>('builder.header.menu.tooltips.delete')}>
<Tooltip arrow placement="right" title={t('builder.header.menu.tooltips.delete')}>
<MenuItem onClick={handleDelete}>
<ListItemIcon>
<Delete className="scale-90" />
</ListItemIcon>
<ListItemText>{t<string>('builder.header.menu.delete')}</ListItemText>
<ListItemText>{t('builder.header.menu.delete')}</ListItemText>
</MenuItem>
</Tooltip>
</Menu>

View File

@ -18,8 +18,8 @@
content: 'Page Break';
top: calc(297mm - 19px);
@apply absolute w-full border-b border-dashed border-neutral-800/75;
@apply flex items-end justify-end pr-2 pb-0.5 text-xs font-bold text-neutral-800/75;
@apply absolute w-full border-b border-dashed border-zinc-900/75;
@apply flex items-end justify-end pr-2 pb-0.5 text-xs font-bold text-zinc-900/75;
@apply print:hidden;
:global(.preview-mode) &,

View File

@ -1,10 +1,10 @@
import { css } from '@emotion/css';
import { CustomCSS, PageConfig, ThemeConfig, Typography } from '@reactive-resume/schema';
import clsx from 'clsx';
import get from 'lodash/get';
import isEmpty from 'lodash/isEmpty';
import { useTranslation } from 'next-i18next';
import { useMemo } from 'react';
import { CustomCSS, PageConfig, ThemeConfig, Typography } from 'schema';
import { useAppSelector } from '@/store/hooks';
import templateMap from '@/templates/templateMap';
@ -49,9 +49,7 @@ const Page: React.FC<Props> = ({ page, showPageNumbers = false }) => {
{TemplatePage && <TemplatePage page={page} />}
</div>
{showPageNumbers && (
<h4 className={styles.pageNumber}>{`${t<string>('builder.common.glossary.page')} ${page + 1}`}</h4>
)}
{showPageNumbers && <h4 className={styles.pageNumber}>{`${t('builder.common.glossary.page')} ${page + 1}`}</h4>}
</div>
);
};

View File

@ -1,12 +1,12 @@
.container {
@apply h-screen w-[95vw] md:w-[70vw] lg:w-[50vw] xl:w-[30vw] 2xl:w-[28vw];
@apply bg-neutral-50 text-neutral-900 dark:bg-neutral-900 dark:text-neutral-50;
@apply relative flex border-r-2 border-neutral-50/10;
@apply bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100;
@apply relative flex border-r-2 border-zinc-100/10;
nav {
@apply absolute inset-y-0 left-0;
@apply w-14 py-4 md:w-16 md:px-2;
@apply bg-neutral-100 shadow dark:bg-neutral-800;
@apply bg-zinc-100 shadow dark:bg-zinc-900;
@apply flex flex-col items-center justify-between;
hr {
@ -29,7 +29,7 @@
> section {
@apply grid gap-4;
@apply pt-5 pb-7 first:pt-0;
@apply border-b border-neutral-900/10 last:border-b-0 dark:border-neutral-50/10;
@apply border-b border-zinc-900/10 last:border-b-0 dark:border-zinc-100/10;
hr {
@apply my-2;

View File

@ -1,14 +1,14 @@
import { Add, Star } from '@mui/icons-material';
import { Button, Divider, IconButton, SwipeableDrawer, Tooltip, useMediaQuery, useTheme } from '@mui/material';
import { Section as SectionRecord } from '@reactive-resume/schema';
import cloneDeep from 'lodash/cloneDeep';
import get from 'lodash/get';
import Link from 'next/link';
import { useTranslation } from 'next-i18next';
import React, { ReactComponentElement, useMemo } from 'react';
import { Section as SectionRecord } from 'schema';
import { validate } from 'uuid';
import Logo from '@/components/shared/Logo';
import Icon from '@/components/shared/Icon';
import { getCustomSections, getSectionsByType, left } from '@/config/sections';
import { setSidebarState } from '@/store/build/buildSlice';
import { useAppDispatch, useAppSelector } from '@/store/hooks';
@ -27,6 +27,7 @@ const LeftSidebar = () => {
const isDesktop = useMediaQuery(theme.breakpoints.up('lg'));
const sections = useAppSelector((state) => state.resume.present.sections);
const { open } = useAppSelector((state) => state.build.sidebar.left);
const customSections = useMemo(() => getCustomSections(sections), [sections]);
@ -68,7 +69,7 @@ const LeftSidebar = () => {
sectionsComponents.push(
<section key={id} id={id}>
{component}
</section>
</section>,
);
if (addMore) {
@ -88,7 +89,7 @@ const LeftSidebar = () => {
elements.push(
<section key={newId} id={`section-${newId}`}>
{newComponent}
</section>
</section>,
);
}
sectionsComponents.push(...elements);
@ -108,10 +109,12 @@ const LeftSidebar = () => {
variant={isDesktop ? 'persistent' : 'temporary'}
>
<div className={styles.container}>
<nav className="overflow-y-scroll">
<nav className="overflow-y-auto">
<div>
<Link href="/dashboard">
<Logo size={40} />
<IconButton>
<Icon size={24} />
</IconButton>
</Link>
<Divider />
</div>
@ -122,14 +125,19 @@ const LeftSidebar = () => {
arrow
key={id}
placement="right"
title={get(sections, `${id}.name`, t<string>(`builder.leftSidebar.sections.${id}.heading`)) as string}
title={t(`builder.leftSidebar.sections.${id}.heading`, get(sections, `${id}.name`))}
>
<IconButton onClick={() => handleClick(id)}>{icon}</IconButton>
</Tooltip>
))}
{customSections.map(({ id }) => (
<Tooltip key={id} title={get(sections, `${id}.name`, '') as string} placement="right" arrow>
<Tooltip
key={id}
title={t(`builder.leftSidebar.sections.${id}.heading`, get(sections, `${id}.name`))}
placement="right"
arrow
>
<IconButton onClick={() => id && handleClick(id)}>
<Star />
</IconButton>
@ -151,8 +159,8 @@ const LeftSidebar = () => {
<div className="py-6 text-right">
<Button fullWidth variant="outlined" startIcon={<Add />} onClick={handleAddSection}>
{t<string>('builder.common.actions.add', {
token: t<string>('builder.leftSidebar.sections.section.heading'),
{t('builder.common.actions.add', {
token: t('builder.leftSidebar.sections.section.heading'),
})}
</Button>
</div>

View File

@ -24,7 +24,7 @@ const Basics = () => {
return (
<>
<Heading path="sections.basics" name={t<string>('builder.leftSidebar.sections.basics.heading')} />
<Heading path="sections.basics" name={t('builder.leftSidebar.sections.basics.heading')} />
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
<div className="grid items-center gap-4 sm:col-span-2 sm:grid-cols-3">
@ -33,10 +33,10 @@ const Basics = () => {
</div>
<div className="grid w-full gap-2 sm:col-span-2">
<ResumeInput label={t<string>('builder.leftSidebar.sections.basics.name.label')} path="basics.name" />
<ResumeInput label={t('builder.leftSidebar.sections.basics.name.label')} path="basics.name" />
<Button variant="outlined" startIcon={<PhotoFilter />} onClick={handleClick}>
{t<string>('builder.leftSidebar.sections.basics.actions.photo-filters')}
{t('builder.leftSidebar.sections.basics.actions.photo-filters')}
</Button>
<Popover
@ -59,28 +59,24 @@ const Basics = () => {
<ResumeInput
type="date"
label={t<string>('builder.leftSidebar.sections.basics.birthdate.label')}
label={t('builder.leftSidebar.sections.basics.birthdate.label')}
path="basics.birthdate"
className="sm:col-span-2"
/>
<ResumeInput
label={t<string>('builder.common.form.email.label')}
path="basics.email"
className="sm:col-span-2"
/>
<ResumeInput label={t<string>('builder.common.form.phone.label')} path="basics.phone" />
<ResumeInput label={t<string>('builder.common.form.url.label')} path="basics.website" />
<ResumeInput label={t('builder.common.form.email.label')} path="basics.email" className="sm:col-span-2" />
<ResumeInput label={t('builder.common.form.phone.label')} path="basics.phone" />
<ResumeInput label={t('builder.common.form.url.label')} path="basics.website" />
<Divider className="sm:col-span-2" />
<ResumeInput
label={t<string>('builder.leftSidebar.sections.basics.headline.label')}
label={t('builder.leftSidebar.sections.basics.headline.label')}
path="basics.headline"
className="sm:col-span-2"
/>
<ResumeInput
type="textarea"
label={t<string>('builder.common.form.summary.label')}
label={t('builder.common.form.summary.label')}
path="basics.summary"
className="sm:col-span-2"
markdownSupported

View File

@ -8,28 +8,19 @@ const Location = () => {
return (
<>
<Heading path="sections.location" name={t<string>('builder.leftSidebar.sections.location.heading')} />
<Heading path="sections.location" name={t('builder.leftSidebar.sections.location.heading')} />
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
<ResumeInput
label={t<string>('builder.leftSidebar.sections.location.address.label')}
label={t('builder.leftSidebar.sections.location.address.label')}
path="basics.location.address"
className="sm:col-span-2"
/>
<ResumeInput label={t('builder.leftSidebar.sections.location.city.label')} path="basics.location.city" />
<ResumeInput label={t('builder.leftSidebar.sections.location.region.label')} path="basics.location.region" />
<ResumeInput label={t('builder.leftSidebar.sections.location.country.label')} path="basics.location.country" />
<ResumeInput
label={t<string>('builder.leftSidebar.sections.location.city.label')}
path="basics.location.city"
/>
<ResumeInput
label={t<string>('builder.leftSidebar.sections.location.region.label')}
path="basics.location.region"
/>
<ResumeInput
label={t<string>('builder.leftSidebar.sections.location.country.label')}
path="basics.location.country"
/>
<ResumeInput
label={t<string>('builder.leftSidebar.sections.location.postal-code.label')}
label={t('builder.leftSidebar.sections.location.postal-code.label')}
path="basics.location.postalCode"
/>
</div>

View File

@ -1,8 +1,8 @@
import { Circle, Square, SquareRounded } from '@mui/icons-material';
import { Checkbox, Divider, FormControlLabel, Slider, ToggleButton, ToggleButtonGroup } from '@mui/material';
import { Photo, PhotoShape } from '@reactive-resume/schema';
import get from 'lodash/get';
import { useTranslation } from 'next-i18next';
import { Photo, PhotoShape } from 'schema';
import { useAppDispatch, useAppSelector } from '@/store/hooks';
import { setResumeState } from '@/store/resume/resumeSlice';
@ -30,9 +30,9 @@ const PhotoFilters = () => {
const handleSetBorder = (value: boolean) => dispatch(setResumeState({ path: 'basics.photo.filters.border', value }));
return (
<div className="flex flex-col gap-2 p-5 dark:bg-neutral-800">
<div className="flex flex-col gap-2 p-5 dark:bg-zinc-900">
<div>
<h4 className="font-medium">{t<string>('builder.leftSidebar.sections.basics.photo-filters.size.heading')}</h4>
<h4 className="font-medium">{t('builder.leftSidebar.sections.basics.photo-filters.size.heading')}</h4>
<div className="mx-2">
<Slider
@ -54,20 +54,18 @@ const PhotoFilters = () => {
<Divider />
<div>
<h4 className="font-medium">
{t<string>('builder.leftSidebar.sections.basics.photo-filters.effects.heading')}
</h4>
<h4 className="font-medium">{t('builder.leftSidebar.sections.basics.photo-filters.effects.heading')}</h4>
<div className="flex items-center">
<FormControlLabel
label={t<string>('builder.leftSidebar.sections.basics.photo-filters.effects.grayscale.label')}
label={t('builder.leftSidebar.sections.basics.photo-filters.effects.grayscale.label')}
control={
<Checkbox color="secondary" checked={grayscale} onChange={(_, value) => handleSetGrayscale(value)} />
}
/>
<FormControlLabel
label={t<string>('builder.leftSidebar.sections.basics.photo-filters.effects.border.label')}
label={t('builder.leftSidebar.sections.basics.photo-filters.effects.border.label')}
control={<Checkbox color="secondary" checked={border} onChange={(_, value) => handleSetBorder(value)} />}
/>
</div>
@ -76,7 +74,7 @@ const PhotoFilters = () => {
<Divider />
<div className="flex flex-col gap-2">
<h4 className="font-medium">{t<string>('builder.leftSidebar.sections.basics.photo-filters.shape.heading')}</h4>
<h4 className="font-medium">{t('builder.leftSidebar.sections.basics.photo-filters.shape.heading')}</h4>
<ToggleButtonGroup exclusive value={shape} onChange={(_, value) => handleChangeShape(value)}>
<ToggleButton size="small" value="square" className="w-14">

View File

@ -1,11 +1,11 @@
import { Avatar, IconButton, Skeleton, Tooltip } from '@mui/material';
import { Photo, Resume } from '@reactive-resume/schema';
import get from 'lodash/get';
import isEmpty from 'lodash/isEmpty';
import { useTranslation } from 'next-i18next';
import React, { useRef } from 'react';
import toast from 'react-hot-toast';
import { useMutation } from 'react-query';
import { Photo, Resume } from 'schema';
import { ServerError } from '@/services/axios';
import { deletePhoto, DeletePhotoParams, uploadPhoto, UploadPhotoParams } from '@/services/resume';
@ -49,7 +49,7 @@ const PhotoUpload: React.FC = () => {
const file = event.target.files[0];
if (file.size > FILE_UPLOAD_MAX_SIZE) {
toast.error(t<string>('common.toast.error.upload-photo-size'));
toast.error(t('common.toast.error.upload-photo-size'));
return;
}
@ -67,8 +67,8 @@ const PhotoUpload: React.FC = () => {
<Tooltip
title={
isEmpty(photo.url)
? (t<string>('builder.leftSidebar.sections.basics.photo-upload.tooltip.upload') as string)
: (t<string>('builder.leftSidebar.sections.basics.photo-upload.tooltip.remove') as string)
? (t('builder.leftSidebar.sections.basics.photo-upload.tooltip.upload') as string)
: (t('builder.leftSidebar.sections.basics.photo-upload.tooltip.remove') as string)
}
>
<Avatar sx={{ width: 96, height: 96 }} src={photo.url} />

View File

@ -1,7 +1,7 @@
import { Add } from '@mui/icons-material';
import { Button } from '@mui/material';
import { ListItem } from '@reactive-resume/schema';
import { useTranslation } from 'next-i18next';
import { ListItem } from 'schema';
import Heading from '@/components/shared/Heading';
import List from '@/components/shared/List';
@ -28,7 +28,7 @@ const Profiles = () => {
return (
<>
<Heading path="sections.profiles" name={t<string>('builder.leftSidebar.sections.profiles.heading')} />
<Heading path="sections.profiles" name={t('builder.leftSidebar.sections.profiles.heading')} />
<List
path="basics.profiles"
@ -40,8 +40,8 @@ const Profiles = () => {
<footer className="flex justify-end">
<Button variant="outlined" startIcon={<Add />} onClick={handleAdd}>
{t<string>('builder.common.actions.add', {
token: t<string>('builder.leftSidebar.sections.profiles.heading', { count: 1 }),
{t('builder.common.actions.add', {
token: t('builder.leftSidebar.sections.profiles.heading', { count: 1 }),
})}
</Button>
</footer>

View File

@ -1,9 +1,9 @@
import { Add } from '@mui/icons-material';
import { Button } from '@mui/material';
import { ListItem, Section as SectionRecord, SectionType } from '@reactive-resume/schema';
import clsx from 'clsx';
import get from 'lodash/get';
import { useTranslation } from 'next-i18next';
import { ListItem, Section as SectionRecord, SectionType } from 'schema';
import { validate } from 'uuid';
import Heading from '@/components/shared/Heading';
@ -98,14 +98,16 @@ const Section: React.FC<Props> = ({
<SectionSettings path={path} />
<Button variant="outlined" startIcon={<Add />} onClick={handleAdd}>
{t<string>('builder.common.actions.add', { token: heading })}
{t('builder.common.actions.add', {
token: t(`builder.leftSidebar.${path}.heading`, { defaultValue: heading }),
})}
</Button>
</footer>
{addMore ? (
<div className="py-6 text-right">
<Button fullWidth variant="outlined" startIcon={<Add />} onClick={handleDuplicateSection}>
{t<string>('builder.common.actions.duplicate')}
{t('builder.common.actions.duplicate')}
</Button>
</div>
) : (

View File

@ -32,7 +32,7 @@ const SectionSettings: React.FC<Props> = ({ path }) => {
return (
<div>
<Tooltip title={t<string>('builder.common.columns.tooltip')}>
<Tooltip title={t('builder.common.columns.tooltip')}>
<ButtonBase onClick={handleClick} sx={{ padding: 1, borderRadius: 1 }} className="opacity-50 hover:opacity-75">
<ViewWeek /> <span className="ml-1.5 text-xs">{columns}</span>
</ButtonBase>
@ -47,8 +47,8 @@ const SectionSettings: React.FC<Props> = ({ path }) => {
horizontal: 'left',
}}
>
<div className="p-5 dark:bg-neutral-800">
<h4 className="mb-2 font-medium">{t<string>('builder.common.columns.heading')}</h4>
<div className="p-5 dark:bg-zinc-900">
<h4 className="mb-2 font-medium">{t('builder.common.columns.heading')}</h4>
<ToggleButtonGroup exclusive value={columns} onChange={(_, value: number) => handleSetColumns(value)}>
{[1, 2, 3, 4].map((index) => (

View File

@ -1,12 +1,12 @@
.container {
@apply h-screen w-[95vw] md:w-[70vw] lg:w-[50vw] xl:w-[30vw] 2xl:w-[28vw];
@apply bg-neutral-50 text-neutral-900 dark:bg-neutral-900 dark:text-neutral-50;
@apply relative flex border-l-2 border-neutral-50/10;
@apply bg-zinc-50 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-50;
@apply relative flex border-l-2 border-zinc-50/10;
nav {
@apply absolute inset-y-0 right-0;
@apply w-12 py-4 md:w-16 md:px-2;
@apply bg-neutral-100 shadow dark:bg-neutral-800;
@apply bg-zinc-100 shadow dark:bg-zinc-900;
@apply flex flex-col items-center justify-between;
hr {
@ -29,7 +29,7 @@
> section {
@apply grid gap-4;
@apply pt-5 pb-7 first:pt-0;
@apply border-b border-neutral-900/10 last:border-b-0 dark:border-neutral-50/10;
@apply border-b border-zinc-900/10 last:border-b-0 dark:border-zinc-50/10;
hr {
@apply my-2;

View File

@ -1,5 +1,5 @@
import { Divider, IconButton, SwipeableDrawer, Tooltip, useMediaQuery, useTheme } from '@mui/material';
import { capitalize } from 'lodash';
import capitalize from 'lodash/capitalize';
import { useTranslation } from 'next-i18next';
import Avatar from '@/components/shared/Avatar';
@ -43,9 +43,9 @@ const RightSidebar = () => {
variant={isDesktop ? 'persistent' : 'temporary'}
>
<div className={styles.container}>
<nav className="overflow-y-scroll">
<nav className="overflow-y-auto">
<div>
<Avatar size={40} />
<Avatar size={24} />
<Divider />
</div>
@ -55,7 +55,7 @@ const RightSidebar = () => {
key={id}
arrow
placement="right"
title={t<string>(`builder.rightSidebar.sections.${id}.heading`, { defaultValue: capitalize(id) })}
title={t(`builder.rightSidebar.sections.${id}.heading`, { defaultValue: capitalize(id) })}
>
<IconButton onClick={() => handleClick(id)}>{icon}</IconButton>
</Tooltip>

View File

@ -1,10 +1,10 @@
import Editor from '@monaco-editor/react';
import { useTheme } from '@mui/material';
import { CustomCSS as CustomCSSType } from '@reactive-resume/schema';
import clsx from 'clsx';
import get from 'lodash/get';
import { useTranslation } from 'next-i18next';
import React from 'react';
import { CustomCSS as CustomCSSType } from 'schema';
import Heading from '@/components/shared/Heading';
import { useAppDispatch, useAppSelector } from '@/store/hooks';
@ -18,7 +18,7 @@ const CustomCSS = () => {
const dispatch = useAppDispatch();
const customCSS: CustomCSSType = useAppSelector((state) =>
get(state.resume.present, 'metadata.css', {} as CustomCSSType)
get(state.resume.present, 'metadata.css', {} as CustomCSSType),
);
const handleChange = (value: string | undefined) => {
@ -27,7 +27,7 @@ const CustomCSS = () => {
return (
<>
<Heading path="metadata.css" name={t<string>('builder.rightSidebar.sections.css.heading')} isHideable />
<Heading path="metadata.css" name={t('builder.rightSidebar.sections.css.heading')} isHideable />
<Editor
height="200px"

View File

@ -20,12 +20,12 @@ const Export = () => {
const pdfListItemText = {
normal: {
primary: t<string>('builder.rightSidebar.sections.export.pdf.normal.primary'),
secondary: t<string>('builder.rightSidebar.sections.export.pdf.normal.secondary'),
primary: t('builder.rightSidebar.sections.export.pdf.normal.primary'),
secondary: t('builder.rightSidebar.sections.export.pdf.normal.secondary'),
},
loading: {
primary: t<string>('builder.rightSidebar.sections.export.pdf.loading.primary'),
secondary: t<string>('builder.rightSidebar.sections.export.pdf.loading.secondary'),
primary: t('builder.rightSidebar.sections.export.pdf.loading.primary'),
secondary: t('builder.rightSidebar.sections.export.pdf.loading.secondary'),
},
};
@ -55,7 +55,7 @@ const Export = () => {
return (
<>
<Heading path="metadata.export" name={t<string>('builder.rightSidebar.sections.export.heading')} />
<Heading path="metadata.export" name={t('builder.rightSidebar.sections.export.heading')} />
<List sx={{ padding: 0 }}>
<ListItem sx={{ padding: 0 }}>
@ -63,8 +63,8 @@ const Export = () => {
<Schema />
<ListItemText
primary={t<string>('builder.rightSidebar.sections.export.json.primary')}
secondary={t<string>('builder.rightSidebar.sections.export.json.secondary')}
primary={t('builder.rightSidebar.sections.export.json.primary')}
secondary={t('builder.rightSidebar.sections.export.json.secondary')}
/>
</ListItemButton>
</ListItem>

View File

@ -1,6 +1,6 @@
.page {
@apply relative border pl-4 pb-4 dark:border-neutral-100/10;
@apply rounded bg-neutral-100 dark:bg-neutral-800;
@apply relative border pl-4 pb-4 dark:border-zinc-100/10;
@apply rounded bg-zinc-100 dark:bg-zinc-900;
.delete {
@apply opacity-50 hover:opacity-75;
@ -28,14 +28,14 @@
.base {
@apply absolute inset-0 w-4/5;
@apply rounded bg-neutral-200 dark:bg-neutral-700;
@apply rounded bg-zinc-200 dark:bg-zinc-800;
}
}
.section {
@apply relative my-3 w-full px-4 py-2;
@apply cursor-move break-all rounded text-xs capitalize;
@apply bg-neutral-800/90 text-neutral-50 dark:bg-neutral-50/90 dark:text-neutral-800;
@apply bg-zinc-900/90 text-zinc-50 dark:bg-zinc-50/90 dark:text-zinc-900;
&.disabled {
@apply opacity-60;

View File

@ -60,9 +60,9 @@ const Layout = () => {
<>
<Heading
path="metadata.layout"
name={t<string>('builder.rightSidebar.sections.layout.heading')}
name={t('builder.rightSidebar.sections.layout.heading')}
action={
<Tooltip title={t<string>('builder.rightSidebar.sections.layout.tooltip.reset-layout')}>
<Tooltip title={t('builder.rightSidebar.sections.layout.tooltip.reset-layout')}>
<IconButton onClick={handleResetLayout}>
<Restore />
</IconButton>
@ -76,14 +76,14 @@ const Layout = () => {
<div key={pageIndex} className={styles.page}>
<div className="flex items-center justify-between pr-3">
<p className={styles.heading}>
{t<string>('builder.common.glossary.page')} {pageIndex + 1}
{t('builder.common.glossary.page')} {pageIndex + 1}
</p>
<div className={clsx(styles.delete, { hidden: pageIndex === 0 })}>
<Tooltip
title={
t<string>('builder.common.actions.delete', {
token: t<string>('builder.common.glossary.page'),
t('builder.common.actions.delete', {
token: t('builder.common.glossary.page'),
}) as string
}
>
@ -136,7 +136,7 @@ const Layout = () => {
<div className="flex items-center justify-end">
<Button variant="outlined" startIcon={<Add />} onClick={handleAddPage}>
{t<string>('builder.common.actions.add', { token: t<string>('builder.common.glossary.page') })}
{t('builder.common.actions.add', { token: t('builder.common.glossary.page') })}
</Button>
</div>
</DragDropContext>

View File

@ -3,7 +3,7 @@
.section {
@apply grid gap-2 rounded p-6;
@apply bg-neutral-100 dark:bg-neutral-800;
@apply bg-zinc-100 dark:bg-zinc-900;
h2 {
@apply inline-flex items-center gap-2 text-base font-medium;

View File

@ -3,7 +3,7 @@ import { Button } from '@mui/material';
import { useTranslation } from 'next-i18next';
import Heading from '@/components/shared/Heading';
import { DOCS_URL, DONATION_URL, GITHUB_ISSUES_URL, GITHUB_URL } from '@/constants/index';
import { DOCS_URL, DONATION_URL, GITHUB_ISSUES_URL, GITHUB_URL, REDDIT_URL } from '@/constants/index';
import styles from './Links.module.scss';
@ -12,47 +12,51 @@ const Links = () => {
return (
<>
<Heading path="metadata.links" name={t<string>('builder.rightSidebar.sections.links.heading')} />
<Heading path="metadata.links" name={t('builder.rightSidebar.sections.links.heading')} />
<div className={styles.container}>
<div className={styles.section}>
<h2>
<Savings fontSize="small" />
{t<string>('builder.rightSidebar.sections.links.donate.heading')}
{t('builder.rightSidebar.sections.links.donate.heading')}
</h2>
<p>{t<string>('builder.rightSidebar.sections.links.donate.body')}</p>
<p>{t('builder.rightSidebar.sections.links.donate.body')}</p>
<a href={DONATION_URL} target="_blank" rel="noreferrer">
<Button startIcon={<Coffee />}>{t<string>('builder.rightSidebar.sections.links.donate.button')}</Button>
<Button startIcon={<Coffee />}>{t('builder.rightSidebar.sections.links.donate.button')}</Button>
</a>
</div>
<div className={styles.section}>
<h2>
<BugReport fontSize="small" />
{t<string>('builder.rightSidebar.sections.links.bugs-features.heading')}
{t('builder.rightSidebar.sections.links.bugs-features.heading')}
</h2>
<p>{t<string>('builder.rightSidebar.sections.links.bugs-features.body')}</p>
<p>{t('builder.rightSidebar.sections.links.bugs-features.body')}</p>
<a href={GITHUB_ISSUES_URL} target="_blank" rel="noreferrer">
<Button startIcon={<GitHub />}>
{t<string>('builder.rightSidebar.sections.links.bugs-features.button')}
</Button>
<Button startIcon={<GitHub />}>{t('builder.rightSidebar.sections.links.bugs-features.button')}</Button>
</a>
</div>
<div>
<a href={GITHUB_URL} target="_blank" rel="noreferrer">
<Button variant="text" startIcon={<Link />}>
{t<string>('builder.rightSidebar.sections.links.github')}
{t('builder.rightSidebar.sections.links.github')}
</Button>
</a>
<a href={REDDIT_URL} target="_blank" rel="noreferrer">
<Button variant="text" startIcon={<Link />}>
{t('builder.rightSidebar.sections.links.reddit')}
</Button>
</a>
<a href={DOCS_URL} target="_blank" rel="noreferrer">
<Button variant="text" startIcon={<Link />}>
{t<string>('builder.rightSidebar.sections.links.docs')}
{t('builder.rightSidebar.sections.links.docs')}
</Button>
</a>
</div>

View File

@ -10,13 +10,13 @@ import {
Switch,
TextField,
} from '@mui/material';
import { DateConfig, PageConfig, Resume } from '@reactive-resume/schema';
import dayjs from 'dayjs';
import get from 'lodash/get';
import { useRouter } from 'next/router';
import { useTranslation } from 'next-i18next';
import { useMemo, useState } from 'react';
import { useMutation } from 'react-query';
import { DateConfig, PageConfig, Resume } from 'schema';
import Heading from '@/components/shared/Heading';
import ThemeSwitch from '@/components/shared/ThemeSwitch';
@ -51,11 +51,11 @@ const Settings = () => {
const pageConfig: PageConfig | undefined = useMemo(() => get(resume, 'metadata.page'), [resume]);
const isDarkMode = useMemo(() => theme === 'dark', [theme]);
const exampleDateString = useMemo(() => `Eg. ${dayjs().utc().format(dateConfig.format)}`, [dateConfig.format]);
const exampleDateString = useMemo(() => `Eg. ${dayjs().format(dateConfig.format)}`, [dateConfig.format]);
const themeString = useMemo(() => (isDarkMode ? 'Matte Black Everything' : 'As bright as your future'), [isDarkMode]);
const { mutateAsync: loadSampleDataMutation } = useMutation<Resume, ServerError, LoadSampleDataParams>(
loadSampleData
loadSampleData,
);
const { mutateAsync: resetResumeMutation } = useMutation<Resume, ServerError, ResetResumeParams>(resetResume);
@ -96,13 +96,13 @@ const Settings = () => {
return (
<>
<Heading path="metadata.settings" name={t<string>('builder.rightSidebar.sections.settings.heading')} />
<Heading path="metadata.settings" name={t('builder.rightSidebar.sections.settings.heading')} />
<List disablePadding>
{/* Global Settings */}
<>
<ListSubheader disableSticky className="rounded">
{t<string>('builder.rightSidebar.sections.settings.global.heading')}
{t('builder.rightSidebar.sections.settings.global.heading')}
</ListSubheader>
<ListItem>
@ -110,7 +110,7 @@ const Settings = () => {
<Palette />
</ListItemIcon>
<ListItemText
primary={t<string>('builder.rightSidebar.sections.settings.global.theme.primary')}
primary={t('builder.rightSidebar.sections.settings.global.theme.primary')}
secondary={themeString}
/>
<ThemeSwitch checked={isDarkMode} onChange={(_, value: boolean) => handleSetTheme(value)} />
@ -119,8 +119,8 @@ const Settings = () => {
<ListItem className="flex-col">
<ListItemText
className="w-full"
primary={t<string>('builder.rightSidebar.sections.settings.global.date.primary')}
secondary={t<string>('builder.rightSidebar.sections.settings.global.date.secondary')}
primary={t('builder.rightSidebar.sections.settings.global.date.primary')}
secondary={t('builder.rightSidebar.sections.settings.global.date.secondary')}
/>
<Autocomplete<string, false, true, false>
disableClearable
@ -135,8 +135,8 @@ const Settings = () => {
<ListItem className="flex-col">
<ListItemText
className="w-full"
primary={t<string>('builder.rightSidebar.sections.settings.global.language.primary')}
secondary={t<string>('builder.rightSidebar.sections.settings.global.language.secondary')}
primary={t('builder.rightSidebar.sections.settings.global.language.primary')}
secondary={t('builder.rightSidebar.sections.settings.global.language.secondary')}
/>
<Autocomplete<Language, false, true, false>
disableClearable
@ -160,14 +160,14 @@ const Settings = () => {
{/* Page Settings */}
<>
<ListSubheader disableSticky className="rounded">
{t<string>('builder.rightSidebar.sections.settings.page.heading')}
{t('builder.rightSidebar.sections.settings.page.heading')}
</ListSubheader>
<ListItem className="flex-col">
<ListItemText
className="w-full"
primary={t<string>('builder.rightSidebar.sections.settings.page.format.primary')}
secondary={t<string>('builder.rightSidebar.sections.settings.page.format.secondary')}
primary={t('builder.rightSidebar.sections.settings.page.format.primary')}
secondary={t('builder.rightSidebar.sections.settings.page.format.secondary')}
/>
<Autocomplete<PageConfig['format'], false, true, false>
disableClearable
@ -182,11 +182,11 @@ const Settings = () => {
<ListItem>
<ListItemText
primary={t<string>('builder.rightSidebar.sections.settings.page.orientation.primary')}
primary={t('builder.rightSidebar.sections.settings.page.orientation.primary')}
secondary={
pages.length === 1
? t<string>('builder.rightSidebar.sections.settings.page.orientation.disabled')
: t<string>('builder.rightSidebar.sections.settings.page.orientation.secondary')
? t('builder.rightSidebar.sections.settings.page.orientation.disabled')
: t('builder.rightSidebar.sections.settings.page.orientation.secondary')
}
/>
<Switch
@ -199,8 +199,8 @@ const Settings = () => {
<ListItem>
<ListItemText
primary={t<string>('builder.rightSidebar.sections.settings.page.break-line.primary')}
secondary={t<string>('builder.rightSidebar.sections.settings.page.break-line.secondary')}
primary={t('builder.rightSidebar.sections.settings.page.break-line.primary')}
secondary={t('builder.rightSidebar.sections.settings.page.break-line.secondary')}
/>
<Switch color="secondary" checked={breakLine} onChange={() => dispatch(togglePageBreakLine())} />
</ListItem>
@ -209,7 +209,7 @@ const Settings = () => {
{/* Resume Settings */}
<>
<ListSubheader disableSticky className="rounded">
{t<string>('builder.rightSidebar.sections.settings.resume.heading')}
{t('builder.rightSidebar.sections.settings.resume.heading')}
</ListSubheader>
<ListItem disableGutters>
@ -218,8 +218,8 @@ const Settings = () => {
<Anchor />
</ListItemIcon>
<ListItemText
primary={t<string>('builder.rightSidebar.sections.settings.resume.sample.primary')}
secondary={t<string>('builder.rightSidebar.sections.settings.resume.sample.secondary')}
primary={t('builder.rightSidebar.sections.settings.resume.sample.primary')}
secondary={t('builder.rightSidebar.sections.settings.resume.sample.secondary')}
/>
</ListItemButton>
</ListItem>
@ -231,11 +231,9 @@ const Settings = () => {
</ListItemIcon>
<ListItemText
primary={
confirmReset
? 'Are you sure?'
: t<string>('builder.rightSidebar.sections.settings.resume.reset.primary')
confirmReset ? 'Are you sure?' : t('builder.rightSidebar.sections.settings.resume.reset.primary')
}
secondary={t<string>('builder.rightSidebar.sections.settings.resume.reset.secondary')}
secondary={t('builder.rightSidebar.sections.settings.resume.reset.secondary')}
/>
</ListItemButton>
</ListItem>

View File

@ -29,19 +29,19 @@ const Sharing = () => {
await navigator.clipboard.writeText(text);
toast.success(t<string>('common.toast.success.resume-link-copied'));
toast.success(t('common.toast.success.resume-link-copied'));
};
return (
<>
<Heading path="metadata.sharing" name={t<string>('builder.rightSidebar.sections.sharing.heading')} />
<Heading path="metadata.sharing" name={t('builder.rightSidebar.sections.sharing.heading')} />
<List sx={{ padding: 0 }}>
<ListItem className="flex flex-col" sx={{ padding: 0 }}>
<div className="flex w-full items-center justify-between">
<ListItemText
primary={t<string>('builder.rightSidebar.sections.sharing.visibility.title')}
secondary={t<string>('builder.rightSidebar.sections.sharing.visibility.subtitle')}
primary={t('builder.rightSidebar.sections.sharing.visibility.title')}
secondary={t('builder.rightSidebar.sections.sharing.visibility.subtitle')}
/>
<Switch color="secondary" checked={isPublic} onChange={(_, value) => handleSetVisibility(value)} />
</div>
@ -63,7 +63,7 @@ const Sharing = () => {
<div className="mt-1 flex w-full">
<FormControlLabel
label={t<string>('builder.rightSidebar.sections.sharing.short-url.label')}
label={t('builder.rightSidebar.sections.sharing.short-url.label')}
control={
<Checkbox className="mr-1" checked={showShortUrl} onChange={(_, value) => setShowShortUrl(value)} />
}

View File

@ -24,7 +24,7 @@ const Templates = () => {
return (
<>
<Heading path="metadata.templates" name={t<string>('builder.rightSidebar.sections.templates.heading')} />
<Heading path="metadata.templates" name={t('builder.rightSidebar.sections.templates.heading')} />
<div className={styles.container}>
{Object.values(templateMap).map((template) => (

View File

@ -1,6 +1,6 @@
import { ThemeConfig } from '@reactive-resume/schema';
import get from 'lodash/get';
import { useTranslation } from 'next-i18next';
import { ThemeConfig } from 'schema';
import ColorAvatar from '@/components/shared/ColorAvatar';
import ColorPicker from '@/components/shared/ColorPicker';
@ -17,7 +17,7 @@ const Theme = () => {
const dispatch = useAppDispatch();
const { background, text, primary } = useAppSelector<ThemeConfig>((state) =>
get(state.resume.present, 'metadata.theme')
get(state.resume.present, 'metadata.theme'),
);
const handleChange = (property: string, color: string) => {
@ -26,7 +26,7 @@ const Theme = () => {
return (
<>
<Heading path="metadata.theme" name={t<string>('builder.rightSidebar.sections.theme.heading')} />
<Heading path="metadata.theme" name={t('builder.rightSidebar.sections.theme.heading')} />
<div className={styles.container}>
<div className={styles.colorOptions}>
@ -36,18 +36,18 @@ const Theme = () => {
</div>
<ColorPicker
label={t<string>('builder.rightSidebar.sections.theme.form.primary.label')}
label={t('builder.rightSidebar.sections.theme.form.primary.label')}
color={primary}
className="col-span-2"
onChange={(color) => handleChange('primary', color)}
/>
<ColorPicker
label={t<string>('builder.rightSidebar.sections.theme.form.background.label')}
label={t('builder.rightSidebar.sections.theme.form.background.label')}
color={background}
onChange={(color) => handleChange('background', color)}
/>
<ColorPicker
label={t<string>('builder.rightSidebar.sections.theme.form.text.label')}
label={t('builder.rightSidebar.sections.theme.form.text.label')}
color={text}
onChange={(color) => handleChange('text', color)}
/>

View File

@ -1,9 +1,9 @@
import { Autocomplete, Skeleton, Slider, TextField } from '@mui/material';
import { Font, TypeCategory, TypeProperty, Typography as TypographyType } from '@reactive-resume/schema';
import get from 'lodash/get';
import isEmpty from 'lodash/isEmpty';
import { useTranslation } from 'next-i18next';
import { useQuery } from 'react-query';
import { Font, TypeCategory, TypeProperty, Typography as TypographyType } from 'schema';
import Heading from '@/components/shared/Heading';
import { FONTS_QUERY } from '@/constants/index';
@ -46,7 +46,7 @@ const Widgets: React.FC<WidgetProps> = ({ label, category }) => {
setResumeState({
path: `metadata.typography.${property}.${category}`,
value: property === 'family' ? (value as Font).family : value,
})
}),
);
};
@ -64,7 +64,7 @@ const Widgets: React.FC<WidgetProps> = ({ label, category }) => {
step={1}
marks={[
{ value: 12, label: '12px' },
{ value: 24, label: t<string>('builder.rightSidebar.sections.typography.form.font-size.label') },
{ value: 24, label: t('builder.rightSidebar.sections.typography.form.font-size.label') },
{ value: 36, label: '36px' },
]}
valueLabelDisplay="auto"
@ -82,10 +82,7 @@ const Widgets: React.FC<WidgetProps> = ({ label, category }) => {
value={fonts.find((font) => font.family === family[category])}
onChange={(_, font: Font | null) => handleChange('family', font)}
renderInput={(params) => (
<TextField
{...params}
label={t<string>('builder.rightSidebar.sections.typography.form.font-family.label')}
/>
<TextField {...params} label={t('builder.rightSidebar.sections.typography.form.font-family.label')} />
)}
/>
</div>
@ -98,13 +95,10 @@ const Typography = () => {
return (
<>
<Heading path="metadata.typography" name={t<string>('builder.rightSidebar.sections.typography.heading')} />
<Heading path="metadata.typography" name={t('builder.rightSidebar.sections.typography.heading')} />
<Widgets
label={t<string>('builder.rightSidebar.sections.typography.widgets.headings.label')}
category="heading"
/>
<Widgets label={t<string>('builder.rightSidebar.sections.typography.widgets.body.label')} category="body" />
<Widgets label={t('builder.rightSidebar.sections.typography.widgets.headings.label')} category="heading" />
<Widgets label={t('builder.rightSidebar.sections.typography.widgets.body.label')} category="body" />
</>
);
};

View File

@ -5,7 +5,7 @@
aspect-ratio: 1 / 1.41;
@apply flex items-center justify-center shadow;
@apply cursor-pointer rounded-sm bg-neutral-100 transition-opacity hover:opacity-80 dark:bg-neutral-800;
@apply cursor-pointer rounded-sm bg-zinc-100 transition-opacity hover:opacity-80 dark:bg-zinc-900;
}
footer {

View File

@ -5,7 +5,7 @@
aspect-ratio: 1 / 1.41;
@apply relative cursor-pointer rounded-sm shadow;
@apply bg-neutral-100 transition-opacity hover:opacity-80 dark:bg-neutral-800;
@apply bg-zinc-100 transition-opacity hover:opacity-80 dark:bg-zinc-900;
}
footer {

View File

@ -7,7 +7,6 @@ import {
OpenInNew,
} from '@mui/icons-material';
import { ButtonBase, ListItemIcon, ListItemText, Menu, MenuItem, Tooltip } from '@mui/material';
import { Resume } from '@reactive-resume/schema';
import Image from 'next/image';
import Link from 'next/link';
import { useRouter } from 'next/router';
@ -15,6 +14,7 @@ import { useTranslation } from 'next-i18next';
import { useState } from 'react';
import toast from 'react-hot-toast';
import { useMutation } from 'react-query';
import { Resume } from 'schema';
import { RESUMES_QUERY } from '@/constants/index';
import { ServerError } from '@/services/axios';
@ -76,7 +76,7 @@ const ResumePreview: React.FC<Props> = ({ resume }) => {
},
},
},
})
}),
);
};
@ -94,7 +94,7 @@ const ResumePreview: React.FC<Props> = ({ resume }) => {
const url = getResumeUrl(resume, { withHost: true });
await navigator.clipboard.writeText(url);
toast.success(t<string>('common.toast.success.resume-link-copied'));
toast.success(t('common.toast.success.resume-link-copied'));
};
const handleDelete = async () => {
@ -122,7 +122,7 @@ const ResumePreview: React.FC<Props> = ({ resume }) => {
<footer>
<div className={styles.meta}>
<p>{resume.name}</p>
<p>{t<string>('dashboard.resume.timestamp', { timestamp: getRelativeTime(resume.updatedAt) })}</p>
<p>{t('dashboard.resume.timestamp', { timestamp: getRelativeTime(resume.updatedAt) })}</p>
</div>
<ButtonBase className={styles.menu} onClick={handleOpenMenu}>
@ -134,21 +134,21 @@ const ResumePreview: React.FC<Props> = ({ resume }) => {
<ListItemIcon>
<OpenInNew className="scale-90" />
</ListItemIcon>
<ListItemText>{t<string>('dashboard.resume.menu.open')}</ListItemText>
<ListItemText>{t('dashboard.resume.menu.open')}</ListItemText>
</MenuItem>
<MenuItem onClick={handleRename}>
<ListItemIcon>
<DriveFileRenameOutline className="scale-90" />
</ListItemIcon>
<ListItemText>{t<string>('dashboard.resume.menu.rename')}</ListItemText>
<ListItemText>{t('dashboard.resume.menu.rename')}</ListItemText>
</MenuItem>
<MenuItem onClick={handleDuplicate}>
<ListItemIcon>
<ContentCopy className="scale-90" />
</ListItemIcon>
<ListItemText>{t<string>('dashboard.resume.menu.duplicate')}</ListItemText>
<ListItemText>{t('dashboard.resume.menu.duplicate')}</ListItemText>
</MenuItem>
{resume.public ? (
@ -156,27 +156,27 @@ const ResumePreview: React.FC<Props> = ({ resume }) => {
<ListItemIcon>
<LinkIcon className="scale-90" />
</ListItemIcon>
<ListItemText>{t<string>('dashboard.resume.menu.share-link')}</ListItemText>
<ListItemText>{t('dashboard.resume.menu.share-link')}</ListItemText>
</MenuItem>
) : (
<Tooltip arrow placement="right" title={t<string>('dashboard.resume.menu.tooltips.share-link')}>
<Tooltip arrow placement="right" title={t('dashboard.resume.menu.tooltips.share-link')}>
<div>
<MenuItem>
<ListItemIcon>
<LinkIcon className="scale-90" />
</ListItemIcon>
<ListItemText>{t<string>('dashboard.resume.menu.share-link')}</ListItemText>
<ListItemText>{t('dashboard.resume.menu.share-link')}</ListItemText>
</MenuItem>
</div>
</Tooltip>
)}
<Tooltip arrow placement="right" title={t<string>('dashboard.resume.menu.tooltips.delete')}>
<Tooltip arrow placement="right" title={t('dashboard.resume.menu.tooltips.delete')}>
<MenuItem onClick={handleDelete}>
<ListItemIcon>
<DeleteOutline className="scale-90" />
</ListItemIcon>
<ListItemText>{t<string>('dashboard.resume.menu.delete')}</ListItemText>
<ListItemText>{t('dashboard.resume.menu.delete')}</ListItemText>
</MenuItem>
</Tooltip>
</Menu>

View File

@ -0,0 +1,44 @@
import { Button } from '@mui/material';
import Link from 'next/link';
import { useTranslation } from 'next-i18next';
import { FLAG_DISABLE_SIGNUPS } from '@/constants/flags';
import { logout } from '@/store/auth/authSlice';
import { useAppDispatch, useAppSelector } from '@/store/hooks';
import { setModalState } from '@/store/modal/modalSlice';
const HomeActions = () => {
const { t } = useTranslation();
const dispatch = useAppDispatch();
const isLoggedIn = useAppSelector((state) => state.auth.isLoggedIn);
const handleLogin = () => dispatch(setModalState({ modal: 'auth.login', state: { open: true } }));
const handleRegister = () => dispatch(setModalState({ modal: 'auth.register', state: { open: true } }));
const handleLogout = () => dispatch(logout());
return isLoggedIn ? (
<>
<Link href="/dashboard" passHref>
<Button size="large">{t('landing.actions.app')}</Button>
</Link>
<Button size="large" variant="outlined" onClick={handleLogout}>
{t('landing.actions.logout')}
</Button>
</>
) : (
<>
<Button size="large" onClick={handleLogin}>
{t('landing.actions.login')}
</Button>
<Button size="large" variant="outlined" onClick={handleRegister} disabled={FLAG_DISABLE_SIGNUPS}>
{t('landing.actions.register')}
</Button>
</>
);
};
export default HomeActions;

View File

@ -0,0 +1,16 @@
const HeroBackground = () => (
<div
aria-hidden="true"
className="absolute left-[calc(50%-4rem)] top-10 -z-10 transform-gpu blur-3xl sm:left-[calc(50%-18rem)] lg:left-48 lg:top-[calc(50%-30rem)] xl:left-[calc(50%-24rem)]"
>
<div
className="aspect-[1108/632] h-96 w-[69.25rem] bg-gradient-to-r from-[#6f8cbb] to-[#c93b37] opacity-40 dark:opacity-20"
style={{
clipPath:
'polygon(73.6% 51.7%, 91.7% 11.8%, 100% 46.4%, 97.4% 82.2%, 92.5% 84.9%, 75.7% 64%, 55.3% 47.5%, 46.5% 49.4%, 45% 62.9%, 50.3% 87.2%, 21.3% 64.1%, 0.1% 100%, 5.4% 51.1%, 21.4% 63.9%, 58.9% 0.2%, 73.6% 51.7%)',
}}
/>
</div>
);
export default HeroBackground;

View File

@ -0,0 +1,47 @@
import GitHubButton from 'react-github-btn';
import { useAppSelector } from '@/store/hooks';
import { Copyright } from '../shared/Copyright';
import Logo from '../shared/Logo';
import { Separator } from '../ui/Separator';
const Footer = () => {
const theme = useAppSelector((state) => state.build.theme);
return (
<footer className="fixed inset-x-0 bottom-0 -z-50 h-[450px] bg-zinc-50 dark:bg-zinc-950">
<Separator />
<div className="container grid py-12 sm:grid-cols-3 lg:grid-cols-4">
<div className="flex flex-col gap-y-2">
<Logo size={96} className="-ml-2" />
<h2 className="text-xl font-medium">Reactive Resume</h2>
<p className="prose prose-sm prose-zinc leading-relaxed opacity-60 dark:prose-invert">
A free and open-source resume builder that simplifies the tasks of creating, updating, and sharing your
resume.
</p>
<div className="mt-6">
<GitHubButton
data-size="large"
data-show-count="true"
data-icon="octicon-star"
data-color-scheme={theme ? 'dark' : 'light'}
href="https://github.com/AmruthPillai/Reactive-Resume"
aria-label="Star AmruthPillai/Reactive-Resume on GitHub"
>
Star
</GitHubButton>
</div>
<Copyright className="mt-4" />
</div>
</div>
</footer>
);
};
export default Footer;

View File

@ -0,0 +1,24 @@
import Link from 'next/link';
import Logo from '../shared/Logo';
import HomeActions from './Actions';
const Header = () => (
<header className="fixed inset-x-0 top-0 z-50">
<nav className="bg-gradient-to-b from-zinc-50 to-transparent py-3 dark:from-zinc-950">
<div className="container flex items-center justify-between">
<div className="lg:flex-1">
<Link href="/">
<Logo size={48} />
</Link>
</div>
<div className="space-x-4">
<HomeActions />
</div>
</div>
</nav>
</header>
);
export default Header;

View File

@ -0,0 +1,28 @@
const HeroPattern = () => (
<svg
aria-hidden="true"
className="absolute inset-0 -z-10 h-full w-full stroke-zinc-950/10 opacity-60 [mask-image:radial-gradient(100%_100%_at_top_right,white,transparent)] dark:stroke-zinc-50/10 dark:opacity-40"
>
<defs>
<pattern
id="983e3e4c-de6d-4c3f-8d64-b9761d1534cc"
width={200}
height={200}
x="50%"
y={-1}
patternUnits="userSpaceOnUse"
>
<path d="M.5 200V.5H200" fill="none" />
</pattern>
</defs>
<svg x="50%" y={-1} className="overflow-visible fill-zinc-100/20 dark:fill-zinc-900/20">
<path
d="M-200 0h201v201h-201Z M600 0h201v201h-201Z M-400 600h201v201h-201Z M200 800h201v201h-201Z"
strokeWidth={0}
/>
</svg>
<rect width="100%" height="100%" strokeWidth={0} fill="url(#983e3e4c-de6d-4c3f-8d64-b9761d1534cc)" />
</svg>
);
export default HeroPattern;

View File

@ -1,6 +1,6 @@
.testimony {
@apply grid gap-2;
@apply rounded border-2 p-4 dark:border-neutral-800;
@apply rounded border-2 p-4 dark:border-zinc-900;
blockquote {
@apply text-justify text-xs leading-normal opacity-90;

View File

@ -0,0 +1,51 @@
import { cn } from '@/utils/styles';
type LogoProps = { brand: string };
const Logo = ({ brand }: LogoProps) => (
<div className={cn('col-span-2 col-start-2 sm:col-start-auto lg:col-span-1', brand === 'twilio' && 'sm:col-start-2')}>
{/* Show on Light Theme */}
<img
className="block max-h-12 object-contain dark:hidden"
src={`/images/brand-logos/dark/${brand}.svg`}
alt={brand}
width={212}
height={48}
/>
{/* Show on Dark Theme */}
<img
className="hidden max-h-12 object-contain dark:block"
src={`/images/brand-logos/light/${brand}.svg`}
alt={brand}
width={212}
height={48}
/>
</div>
);
const logoList: string[] = ['amazon', 'google', 'postman', 'twilio', 'zalando'];
const LogoSection = () => (
<section className="relative py-24 sm:py-32">
<div className="mx-auto max-w-7xl px-6 lg:px-8">
<p className="text-center text-lg leading-relaxed">
Reactive Resume has helped people land jobs at these great companies:
</p>
<div className="mx-auto mt-10 grid max-w-lg grid-cols-4 items-center gap-x-8 gap-y-10 sm:max-w-xl sm:grid-cols-6 sm:gap-x-10 lg:mx-0 lg:max-w-none lg:grid-cols-5">
{logoList.map((brand) => (
<Logo key={brand} brand={brand} />
))}
</div>
<p className="mx-auto mt-8 max-w-sm text-center leading-relaxed">
If this app has helped you with your job hunt, let me know by reaching out through{' '}
<a href="https://www.amruthpillai.com/#contact" target="_blank" rel="noreferrer" className="hover:underline">
this contact form
</a>
.
</p>
</div>
</section>
);
export default LogoSection;

View File

@ -0,0 +1,27 @@
type Statistic = {
name: string;
value: string;
};
const stats: Statistic[] = [
{ name: 'GitHub Stars', value: '11,800+' },
{ name: 'Users Signed Up', value: '300,000+' },
{ name: 'Resumes Generated', value: '400,000+' },
];
const StatsSection = () => (
<section className="relative py-24 sm:py-32">
<div className="mx-auto max-w-7xl px-6 lg:px-8">
<dl className="grid grid-cols-1 gap-x-8 gap-y-16 text-center lg:grid-cols-3">
{stats.map((stat, index) => (
<div key={index} className="mx-auto flex max-w-xs flex-col gap-y-4">
<dt className="text-base leading-7 opacity-60">{stat.name}</dt>
<dd className="order-first text-3xl font-semibold tracking-tight sm:text-5xl">{stat.value}</dd>
</div>
))}
</dl>
</div>
</section>
);
export default StatsSection;

View File

@ -6,15 +6,17 @@ import { useState } from 'react';
import { logout } from '@/store/auth/authSlice';
import { useAppDispatch, useAppSelector } from '@/store/hooks';
import { setModalState } from '@/store/modal/modalSlice';
import getGravatarUrl from '@/utils/getGravatarUrl';
import styles from './Avatar.module.scss';
type Props = {
size?: number;
interactive?: boolean;
};
const Avatar: React.FC<Props> = ({ size = 64 }) => {
const Avatar: React.FC<Props> = ({ size = 64, interactive = true }) => {
const router = useRouter();
const { t } = useTranslation();
@ -34,6 +36,11 @@ const Avatar: React.FC<Props> = ({ size = 64 }) => {
setAnchorEl(null);
};
const handleOpenProfile = () => {
dispatch(setModalState({ modal: 'auth.profile', state: { open: true } }));
handleClose();
};
const handleLogout = () => {
dispatch(logout());
handleClose();
@ -43,7 +50,7 @@ const Avatar: React.FC<Props> = ({ size = 64 }) => {
return (
<>
<IconButton onClick={handleOpen}>
<IconButton onClick={handleOpen} disabled={!interactive}>
<Image
width={size}
height={size}
@ -54,14 +61,14 @@ const Avatar: React.FC<Props> = ({ size = 64 }) => {
</IconButton>
<Menu anchorEl={anchorEl} onClose={handleClose} open={Boolean(anchorEl)}>
<MenuItem>
<MenuItem onClick={handleOpenProfile}>
<div>
<span className="text-xs opacity-50">{t<string>('common.avatar.menu.greeting')}</span>
<span className="text-xs opacity-50">{t('common.avatar.menu.greeting')},</span>
<p>{user?.name}</p>
</div>
</MenuItem>
<Divider />
<MenuItem onClick={handleLogout}>{t<string>('common.avatar.menu.logout')}</MenuItem>
<MenuItem onClick={handleLogout}>{t('common.avatar.menu.logout')}</MenuItem>
</Menu>
</>
);

View File

@ -1,7 +1,7 @@
.content {
@apply rounded px-6 text-sm shadow lg:w-1/2 xl:w-2/5;
@apply absolute inset-4 sm:inset-x-4 sm:inset-y-auto lg:inset-auto;
@apply overflow-scroll bg-neutral-50 dark:bg-neutral-900 lg:overflow-auto;
@apply overflow-scroll bg-zinc-100 dark:bg-zinc-900 lg:overflow-auto;
@apply max-h-[90vh] min-h-fit;
&::-webkit-scrollbar {
@ -10,7 +10,7 @@
}
.header {
@apply sticky top-0 left-0 right-0 z-50 bg-neutral-50 pt-6 dark:bg-neutral-900;
@apply sticky top-0 left-0 right-0 z-50 bg-zinc-100 pt-6 dark:bg-zinc-900;
@apply flex items-center justify-between;
@apply w-full border-b pb-5 dark:border-white/10;
@ -33,7 +33,7 @@
}
.footer {
@apply sticky bottom-0 left-0 right-0 z-50 bg-neutral-50 pb-6 dark:bg-neutral-900;
@apply sticky bottom-0 left-0 right-0 z-50 bg-zinc-100 pb-6 dark:bg-zinc-900;
@apply flex items-center justify-end gap-x-4;
@apply w-full border-t pt-5 dark:border-white/10;
}

View File

@ -0,0 +1,19 @@
import clsx from 'clsx';
type Props = {
className?: string;
};
export const Copyright = ({ className }: Props) => (
<div
className={clsx('prose prose-sm prose-zinc flex flex-col gap-y-1 text-xs opacity-40 dark:prose-invert', className)}
>
<span className="font-medium">v4.0.0</span>
<span>
Licensed under <a href="https://github.com/AmruthPillai/Reactive-Resume/blob/main/LICENSE">MIT</a>
</span>
<span>
A passion project by <a href="https://www.amruthpillai.com/">Amruth Pillai</a>
</span>
</div>
);

View File

@ -10,7 +10,7 @@ const Footer: React.FC<Props> = ({ className }) => {
return (
<div className={clsx('text-xs', className)}>
<p>{t<string>('common.footer.license')}</p>
<p>{t('common.footer.license')}</p>
<p>
<Trans t={t} i18nKey="common.footer.credit">

View File

@ -62,7 +62,7 @@ const Heading: React.FC<Props> = ({
{editMode ? (
<TextField size="small" value={heading} className="w-3/4" onChange={handleChange} />
) : (
<h1>{heading}</h1>
<h1>{t(`builder.leftSidebar.${path}.heading`, { defaultValue: heading })}</h1>
)}
</div>
@ -72,19 +72,19 @@ const Heading: React.FC<Props> = ({
})}
>
{isEditable && (
<Tooltip title={t<string>('builder.common.tooltip.rename-section')}>
<Tooltip title={t('builder.common.tooltip.rename-section')}>
<IconButton onClick={toggleEditMode}>{editMode ? <Check /> : <DriveFileRenameOutline />}</IconButton>
</Tooltip>
)}
{isHideable && (
<Tooltip title={t<string>('builder.common.tooltip.toggle-visibility')}>
<Tooltip title={t('builder.common.tooltip.toggle-visibility')}>
<IconButton onClick={toggleVisibility}>{visibility ? <Visibility /> : <VisibilityOff />}</IconButton>
</Tooltip>
)}
{isDeletable && (
<Tooltip title={t<string>('builder.common.tooltip.delete-section')}>
<Tooltip title={t('builder.common.tooltip.delete-section')}>
<IconButton onClick={handleDelete}>
<Delete />
</IconButton>

View File

@ -0,0 +1,27 @@
import clsx from 'clsx';
import Image from 'next/image';
import { useAppSelector } from '@/store/hooks';
type Props = {
className?: string;
size?: 256 | 96 | 64 | 48 | 40 | 32 | 24 | 16;
};
const Icon: React.FC<Props> = ({ size = 64, className }) => {
const theme = useAppSelector((state) => state.build.theme);
const iconTheme = theme === 'light' ? 'dark' : 'light';
return (
<Image
alt="Reactive Resume"
src={`/icon/${iconTheme}.svg`}
className={clsx('rounded', className)}
width={size}
height={size}
priority
/>
);
};
export default Icon;

View File

@ -1,5 +1,5 @@
.container {
@apply rounded-lg border dark:border-neutral-50/10;
@apply rounded-lg border dark:border-zinc-50/10;
.empty {
@apply py-8 text-center;

View File

@ -1,4 +1,3 @@
import { ListItem as ListItemType } from '@reactive-resume/schema';
import clsx from 'clsx';
import get from 'lodash/get';
import isArray from 'lodash/isArray';
@ -8,6 +7,7 @@ import { useTranslation } from 'next-i18next';
import { useCallback } from 'react';
import { DndProvider } from 'react-dnd';
import { HTML5Backend } from 'react-dnd-html5-backend';
import { ListItem as ListItemType } from 'schema';
import { useAppDispatch, useAppSelector } from '@/store/hooks';
import { deleteItem, setResumeState } from '@/store/resume/resumeSlice';
@ -60,13 +60,13 @@ const List: React.FC<Props> = ({
dispatch(setResumeState({ path, value: newList }));
},
[list, dispatch, path]
[list, dispatch, path],
);
return (
<DndProvider backend={HTML5Backend}>
<div className={clsx(styles.container, className)}>
{isEmpty(list) && <div className={styles.empty}>{t<string>('builder.common.list.empty-text')}</div>}
{isEmpty(list) && <div className={styles.empty}>{t('builder.common.list.empty-text')}</div>}
{list.map((item, index) => {
const title = get(item, titleKey, '');

View File

@ -1,7 +1,7 @@
.item {
@apply flex items-center justify-between;
@apply py-5 pl-5 pr-2;
@apply border-b border-neutral-900/10 last:border-0 dark:border-neutral-50/10;
@apply border-b border-zinc-900/10 last:border-0 dark:border-zinc-50/10;
@apply cursor-move transition-opacity;
.meta {

View File

@ -1,11 +1,11 @@
import { DeleteOutline, DriveFileRenameOutline, FileCopy, MoreVert } from '@mui/icons-material';
import { Divider, IconButton, ListItemIcon, ListItemText, Menu, MenuItem, Tooltip } from '@mui/material';
import { ListItem as ListItemType } from '@reactive-resume/schema';
import clsx from 'clsx';
import isFunction from 'lodash/isFunction';
import { useTranslation } from 'next-i18next';
import React, { useRef, useState } from 'react';
import { DropTargetMonitor, useDrag, useDrop, XYCoord } from 'react-dnd';
import { ListItem as ListItemType } from 'schema';
import styles from './ListItem.module.scss';
@ -126,25 +126,25 @@ const ListItem: React.FC<Props> = ({ item, path, index, title, subtitle, onMove,
<ListItemIcon>
<DriveFileRenameOutline className="scale-90" />
</ListItemIcon>
<ListItemText>{t<string>('builder.common.list.actions.edit')}</ListItemText>
<ListItemText>{t('builder.common.list.actions.edit')}</ListItemText>
</MenuItem>
<MenuItem onClick={() => handleDuplicate(item)}>
<ListItemIcon>
<FileCopy className="scale-90" />
</ListItemIcon>
<ListItemText>{t<string>('builder.common.list.actions.duplicate')}</ListItemText>
<ListItemText>{t('builder.common.list.actions.duplicate')}</ListItemText>
</MenuItem>
<Divider />
<Tooltip arrow placement="right" title={t<string>('builder.common.tooltip.delete-item')}>
<Tooltip arrow placement="right" title={t('builder.common.tooltip.delete-item')}>
<div>
<MenuItem onClick={() => handleDelete(item)}>
<ListItemIcon>
<DeleteOutline className="scale-90" />
</ListItemIcon>
<ListItemText>{t<string>('builder.common.list.actions.delete')}</ListItemText>
<ListItemText>{t('builder.common.list.actions.delete')}</ListItemText>
</MenuItem>
</div>
</Tooltip>

View File

@ -1,11 +1,26 @@
import clsx from 'clsx';
import Image from 'next/image';
import { useAppSelector } from '@/store/hooks';
type Props = {
size?: 256 | 64 | 48 | 40 | 32;
className?: string;
size?: 256 | 96 | 64 | 48 | 40 | 32 | 24 | 16;
};
const Logo: React.FC<Props> = ({ size = 64 }) => (
<Image alt="Reactive Resume" src="/images/logos/logo.svg" className="rounded" width={size} height={size} priority />
);
const Logo: React.FC<Props> = ({ size = 64, className }) => {
const theme = useAppSelector((state) => state.build.theme);
return (
<Image
alt="Reactive Resume"
src={`/logo/${theme}.svg`}
className={clsx('rounded', className)}
width={size}
height={size}
priority
/>
);
};
export default Logo;

View File

@ -1,6 +1,9 @@
import clsx from 'clsx';
import { isEmpty } from 'lodash';
import isEmpty from 'lodash/isEmpty';
import ReactMarkdown from 'react-markdown';
import rehypeKatex from 'rehype-katex';
import remarkGfm from 'remark-gfm';
import remarkMath from 'remark-math';
type Props = {
children?: string;
@ -11,7 +14,11 @@ const Markdown: React.FC<Props> = ({ className, children }) => {
if (!children || isEmpty(children)) return null;
return (
<ReactMarkdown remarkPlugins={[]} className={clsx('markdown', className)}>
<ReactMarkdown
className={clsx('markdown', className)}
remarkPlugins={[remarkGfm, remarkMath]}
rehypePlugins={[rehypeKatex]}
>
{children}
</ReactMarkdown>
);

View File

@ -1,7 +1,6 @@
import { TextField } from '@mui/material';
import { DatePicker } from '@mui/x-date-pickers';
import { DatePicker } from '@mui/x-date-pickers/DatePicker';
import dayjs from 'dayjs';
import { isEmpty } from 'lodash';
import get from 'lodash/get';
import { useEffect, useState } from 'react';
@ -22,7 +21,6 @@ const ResumeInput: React.FC<Props> = ({ type = 'text', label, path, className, m
const dispatch = useAppDispatch();
const stateValue = useAppSelector((state) => get(state.resume.present, path, ''));
const dateFormat = useAppSelector((state) => state.resume.present.metadata.date.format);
useEffect(() => {
setValue(stateValue);
@ -57,16 +55,13 @@ const ResumeInput: React.FC<Props> = ({ type = 'text', label, path, className, m
if (type === 'date') {
return (
<DatePicker
showToolbar
openTo="year"
label={label}
value={value}
toolbarFormat={dateFormat}
views={['year', 'month', 'day']}
renderInput={(params) => <TextField {...params} error={false} className={className} />}
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
isEmpty(keyboardInputValue) && onChangeValue('');
date && dayjs(date).isValid() && onChangeValue(dayjs(date).format('YYYY-MM-DD'));
value={dayjs(value)}
slots={{ textField: (params) => <TextField {...params} error={false} className={className} /> }}
onChange={(date: dayjs.Dayjs | null) => {
if (!date) return onChangeValue('');
if (dayjs(date).isValid()) return onChangeValue(dayjs(date).format('YYYY-MM-DD'));
}}
/>
);

View File

@ -0,0 +1,25 @@
import * as SeparatorPrimitive from '@radix-ui/react-separator';
import * as React from 'react';
import { cn } from '@/utils/styles';
const Separator = React.forwardRef<
React.ElementRef<typeof SeparatorPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
>(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (
<SeparatorPrimitive.Root
ref={ref}
decorative={decorative}
orientation={orientation}
className={cn(
'shrink-0 dark:bg-zinc-900 bg-zinc-100',
orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',
className,
)}
{...props}
/>
));
Separator.displayName = SeparatorPrimitive.Root.displayName;
export { Separator };

View File

@ -13,7 +13,7 @@ export const languages: Language[] = [
{ code: 'ca', name: 'Catalan', localName: 'Valencian' },
{ code: 'cs', name: 'Czech', localName: 'čeština' },
{ code: 'da', name: 'Danish', localName: 'Dansk' },
{ code: 'de', name: 'German', localName: 'Deutsch' },
{ code: 'de', name: 'German', localName: 'Deutsch Formell / Sie' },
{ code: 'el', name: 'Greek', localName: 'Ελληνικά' },
{ code: 'en', name: 'English' },
{ code: 'es', name: 'Spanish', localName: 'Español' },
@ -37,6 +37,7 @@ export const languages: Language[] = [
{ code: 'or', name: 'Odia', localName: 'ଓଡ଼ିଆ' },
{ code: 'pl', name: 'Polish', localName: 'Polski' },
{ code: 'pt', name: 'Portuguese', localName: 'Português' },
{ code: 'pt-BR', name: 'Brazilian Portuguese', localName: 'Brasil' },
{ code: 'ro', name: 'Romanian', localName: 'limba română' },
{ code: 'ru', name: 'Russian', localName: 'русский' },
{ code: 'sr', name: 'Serbian', localName: 'српски језик' },

View File

@ -23,8 +23,8 @@ import {
VolunteerActivism,
Work,
} from '@mui/icons-material';
import { Section as SectionRecord, SectionType } from '@reactive-resume/schema';
import isEmpty from 'lodash/isEmpty';
import { Section as SectionRecord, SectionType } from 'schema';
import Basics from '@/components/build/LeftSidebar/sections/Basics';
import Location from '@/components/build/LeftSidebar/sections/Location';

View File

@ -3,7 +3,7 @@ import { createTheme, ThemeOptions } from '@mui/material/styles';
const theme: ThemeOptions = {
typography: {
fontSize: 12,
fontFamily: 'Inter, sans-serif',
fontFamily: '"IBM Plex Sans", sans-serif',
},
components: {
MuiButton: {
@ -48,6 +48,15 @@ const theme: ThemeOptions = {
},
},
},
MuiModal: {
defaultProps: {
componentsProps: {
backdrop: {
className: 'backdrop-blur-sm',
},
},
},
},
},
};
@ -55,8 +64,9 @@ export const lightTheme = createTheme({
...theme,
palette: {
mode: 'light',
primary: { main: '#404040' }, // neutral[700]
secondary: { main: '#0d9488' }, // teal[600]
background: { default: '#fafafa', paper: '#f4f4f5' },
primary: { main: '#18181b' },
secondary: { main: '#14b8a6' },
},
});
@ -64,7 +74,8 @@ export const darkTheme = createTheme({
...theme,
palette: {
mode: 'dark',
primary: { main: '#f5f5f5' }, // neutral[100]
secondary: { main: '#2dd4bf' }, // teal[400]
background: { default: '#09090b', paper: '#18181b' },
primary: { main: '#f4f4f5' },
secondary: { main: '#0d9488' },
},
});

View File

@ -13,6 +13,11 @@ export const DOCS_URL = 'https://docs.rxresu.me';
export const DONATION_URL = 'https://paypal.me/RajaRajanA';
export const TRANSLATE_URL = 'https://translate.rxresu.me/';
export const DIGITALOCEAN_URL = 'https://pillai.xyz/digitalocean';
export const REDDIT_URL = 'https://www.reddit.com/r/reactiveresume/';
export const GITHUB_URL = 'https://github.com/AmruthPillai/Reactive-Resume';
export const PRODUCT_HUNT_URL = 'https://www.producthunt.com/posts/reactive-resume-v3';
export const GITHUB_ISSUES_URL = 'https://github.com/AmruthPillai/Reactive-Resume/issues/new/choose';
// Default Error Message
export const DEFAULT_ERROR_MESSAGE =
'Something went wrong while performing this action, please report this issue on GitHub.';

11
client/constants/tilt.ts Normal file
View File

@ -0,0 +1,11 @@
import { ReactParallaxTiltProps } from 'react-parallax-tilt';
export const defaultTiltProps: ReactParallaxTiltProps = {
scale: 1.05,
tiltMaxAngleX: 8,
tiltMaxAngleY: 8,
perspective: 1400,
glareEnable: true,
glareMaxOpacity: 0.1,
glareColor: '#fafafa',
};

View File

@ -54,16 +54,16 @@ const ForgotPasswordModal: React.FC = () => {
<BaseModal
icon={<Password />}
isOpen={isOpen}
heading={t<string>('modals.auth.forgot-password.heading')}
heading={t('modals.auth.forgot-password.heading')}
handleClose={handleClose}
footerChildren={
<Button type="submit" disabled={isLoading} onClick={handleSubmit(onSubmit)}>
{t<string>('modals.auth.forgot-password.actions.send-email')}
{t('modals.auth.forgot-password.actions.send-email')}
</Button>
}
>
<div className="grid gap-4">
<p>{t<string>('modals.auth.forgot-password.body')}</p>
<p>{t('modals.auth.forgot-password.body')}</p>
<form className="grid gap-4 xl:w-2/3">
<Controller
@ -72,7 +72,7 @@ const ForgotPasswordModal: React.FC = () => {
render={({ field, fieldState }) => (
<TextField
autoFocus
label={t<string>('modals.auth.forgot-password.form.email.label')}
label={t('modals.auth.forgot-password.form.email.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -81,7 +81,7 @@ const ForgotPasswordModal: React.FC = () => {
/>
</form>
<p className="text-xs">{t<string>('modals.auth.forgot-password.help-text')}</p>
<p className="text-xs">{t('modals.auth.forgot-password.help-text')}</p>
</div>
</BaseModal>
</>

View File

@ -4,7 +4,7 @@ import { Login, Visibility, VisibilityOff } from '@mui/icons-material';
import { Button, IconButton, InputAdornment, TextField } from '@mui/material';
import { CredentialResponse, GoogleLogin } from '@react-oauth/google';
import Joi from 'joi';
import { isEmpty } from 'lodash';
import isEmpty from 'lodash/isEmpty';
import { Trans, useTranslation } from 'next-i18next';
import { useMemo, useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
@ -53,7 +53,7 @@ const LoginModal: React.FC = () => {
const { mutateAsync: loginMutation } = useMutation<void, ServerError, LoginParams>(login);
const { mutateAsync: loginWithGoogleMutation } = useMutation<void, ServerError, LoginWithGoogleParams>(
loginWithGoogle
loginWithGoogle,
);
const handleClose = () => {
@ -62,14 +62,7 @@ const LoginModal: React.FC = () => {
};
const onSubmit = async ({ identifier, password }: FormData) => {
await loginMutation(
{ identifier, password },
{
onError: (error) => {
toast.error(error.message);
},
}
);
await loginMutation({ identifier, password });
handleClose();
};
@ -86,14 +79,14 @@ const LoginModal: React.FC = () => {
const handleLoginWithGoogle = async (response: CredentialResponse) => {
if (response.credential) {
await loginWithGoogleMutation({ credential: response.credential }, { onError: handleLoginWithGoogleError });
await loginWithGoogleMutation({ credential: response.credential }, { onError: handleGoogleLoginError });
handleClose();
}
};
const handleLoginWithGoogleError = () => {
toast("Please try logging in using email/password, or use another browser that supports Google's One Tap API.");
const handleGoogleLoginError = () => {
toast.error("Google doesn't seem to be responding, please try logging in using email/password instead.");
};
const PasswordVisibility = (): React.ReactElement => {
@ -112,21 +105,21 @@ const LoginModal: React.FC = () => {
<BaseModal
icon={<Login />}
isOpen={isOpen}
heading={t<string>('modals.auth.login.heading')}
heading={t('modals.auth.login.heading')}
handleClose={handleClose}
footerChildren={
<div className="flex gap-4">
{!isEmpty(env('GOOGLE_CLIENT_ID')) && (
<GoogleLogin onSuccess={handleLoginWithGoogle} onError={handleLoginWithGoogleError} />
<GoogleLogin onSuccess={handleLoginWithGoogle} onError={handleGoogleLoginError} />
)}
<Button type="submit" onClick={handleSubmit(onSubmit)} disabled={isLoading}>
{t<string>('modals.auth.login.actions.login')}
{t('modals.auth.login.actions.login')}
</Button>
</div>
}
>
<p>{t<string>('modals.auth.login.body')}</p>
<p>{t('modals.auth.login.body')}</p>
<form className="grid gap-4 xl:w-2/3">
<Controller
@ -135,9 +128,9 @@ const LoginModal: React.FC = () => {
render={({ field, fieldState }) => (
<TextField
autoFocus
label={t<string>('modals.auth.login.form.username.label')}
label={t('modals.auth.login.form.username.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message || t<string>('modals.auth.login.form.username.help-text')}
helperText={fieldState.error?.message || t('modals.auth.login.form.username.help-text')}
{...field}
/>
)}
@ -149,7 +142,7 @@ const LoginModal: React.FC = () => {
render={({ field, fieldState }) => (
<TextField
type={showPassword ? 'text' : 'password'}
label={t<string>('modals.auth.login.form.password.label')}
label={t('modals.auth.login.form.password.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
InputProps={{ endAdornment: <PasswordVisibility /> }}

View File

@ -4,7 +4,7 @@ import { HowToReg } from '@mui/icons-material';
import { Button, TextField } from '@mui/material';
import { CredentialResponse, GoogleLogin } from '@react-oauth/google';
import Joi from 'joi';
import { isEmpty } from 'lodash';
import isEmpty from 'lodash/isEmpty';
import { Trans, useTranslation } from 'next-i18next';
import { Controller, useForm } from 'react-hook-form';
import toast from 'react-hot-toast';
@ -61,7 +61,7 @@ const RegisterModal: React.FC = () => {
const { mutateAsync, isLoading } = useMutation<void, ServerError, RegisterParams>(registerUser);
const { mutateAsync: loginWithGoogleMutation } = useMutation<void, ServerError, LoginWithGoogleParams>(
loginWithGoogle
loginWithGoogle,
);
const handleClose = () => {
@ -81,35 +81,35 @@ const RegisterModal: React.FC = () => {
const handleLoginWithGoogle = async (response: CredentialResponse) => {
if (response.credential) {
await loginWithGoogleMutation({ credential: response.credential }, { onError: handleLoginWithGoogleError });
await loginWithGoogleMutation({ credential: response.credential }, { onError: handleGoogleLoginError });
handleClose();
}
};
const handleLoginWithGoogleError = () => {
toast("Please try logging in using email/password, or use another browser that supports Google's One Tap API.");
const handleGoogleLoginError = () => {
toast("Google doesn't seem to be responding, please try logging in using email/password instead.");
};
return (
<BaseModal
icon={<HowToReg />}
isOpen={isOpen}
heading={t<string>('modals.auth.register.heading')}
heading={t('modals.auth.register.heading')}
handleClose={handleClose}
footerChildren={
<div className="flex gap-4">
{!isEmpty(env('GOOGLE_CLIENT_ID')) && (
<GoogleLogin onSuccess={handleLoginWithGoogle} onError={handleLoginWithGoogleError} />
<GoogleLogin onSuccess={handleLoginWithGoogle} onError={handleGoogleLoginError} />
)}
<Button type="submit" onClick={handleSubmit(onSubmit)} disabled={isLoading}>
{t<string>('modals.auth.register.actions.register')}
{t('modals.auth.register.actions.register')}
</Button>
</div>
}
>
<p>{t<string>('modals.auth.register.body')}</p>
<p>{t('modals.auth.register.body')}</p>
<form className="grid gap-4 md:grid-cols-2">
<Controller
@ -118,7 +118,7 @@ const RegisterModal: React.FC = () => {
render={({ field, fieldState }) => (
<TextField
autoFocus
label={t<string>('modals.auth.register.form.name.label')}
label={t('modals.auth.register.form.name.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -131,7 +131,7 @@ const RegisterModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<TextField
label={t<string>('modals.auth.register.form.username.label')}
label={t('modals.auth.register.form.username.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -145,7 +145,7 @@ const RegisterModal: React.FC = () => {
render={({ field, fieldState }) => (
<TextField
type="email"
label={t<string>('modals.auth.register.form.email.label')}
label={t('modals.auth.register.form.email.label')}
className="col-span-2"
error={!!fieldState.error}
helperText={fieldState.error?.message}
@ -160,7 +160,7 @@ const RegisterModal: React.FC = () => {
render={({ field, fieldState }) => (
<TextField
type="password"
label={t<string>('modals.auth.register.form.password.label')}
label={t('modals.auth.register.form.password.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -174,7 +174,7 @@ const RegisterModal: React.FC = () => {
render={({ field, fieldState }) => (
<TextField
type="password"
label={t<string>('modals.auth.register.form.confirm-password.label')}
label={t('modals.auth.register.form.confirm-password.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}

View File

@ -65,15 +65,15 @@ const ResetPasswordModal: React.FC = () => {
<BaseModal
icon={<LockReset />}
isOpen={isOpen}
heading={t<string>('modals.auth.reset-password.heading')}
heading={t('modals.auth.reset-password.heading')}
handleClose={handleClose}
footerChildren={
<Button type="submit" disabled={isLoading} onClick={handleSubmit(onSubmit)}>
{t<string>('modals.auth.reset-password.actions.set-password')}
{t('modals.auth.reset-password.actions.set-password')}
</Button>
}
>
<p>{t<string>('modals.auth.reset-password.body')}</p>
<p>{t('modals.auth.reset-password.body')}</p>
<form className="grid gap-4 md:grid-cols-2">
<Controller
@ -83,7 +83,7 @@ const ResetPasswordModal: React.FC = () => {
<TextField
autoFocus
type="password"
label={t<string>('modals.auth.reset-password.form.password.label')}
label={t('modals.auth.reset-password.form.password.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -97,7 +97,7 @@ const ResetPasswordModal: React.FC = () => {
render={({ field, fieldState }) => (
<TextField
type="password"
label={t<string>('modals.auth.reset-password.form.confirm-password.label')}
label={t('modals.auth.reset-password.form.confirm-password.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}

View File

@ -0,0 +1,159 @@
import { joiResolver } from '@hookform/resolvers/joi';
import { CrisisAlert, ManageAccounts } from '@mui/icons-material';
import { Button, Divider, TextField } from '@mui/material';
import Joi from 'joi';
import { useRouter } from 'next/router';
import { Trans, useTranslation } from 'next-i18next';
import { useEffect, useMemo, useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { useMutation } from 'react-query';
import Avatar from '@/components/shared/Avatar';
import BaseModal from '@/components/shared/BaseModal';
import { deleteAccount, updateProfile, UpdateProfileParams } from '@/services/auth';
import { ServerError } from '@/services/axios';
import { useAppDispatch, useAppSelector } from '@/store/hooks';
import { setModalState } from '@/store/modal/modalSlice';
type FormData = {
name: string;
email: string;
};
const defaultState: FormData = {
name: '',
email: '',
};
const schema = Joi.object({
name: Joi.string().required(),
email: Joi.string()
.email({ tlds: { allow: false } })
.required(),
});
const UserProfileModal = () => {
const router = useRouter();
const { t } = useTranslation();
const dispatch = useAppDispatch();
const [deleteText, setDeleteText] = useState<string>('');
const isDeleteTextValid = useMemo(() => deleteText.toLowerCase() === 'delete', [deleteText]);
const user = useAppSelector((state) => state.auth.user);
const { open: isOpen } = useAppSelector((state) => state.modal['auth.profile']);
const { mutateAsync: deleteAccountMutation } = useMutation<void, ServerError>(deleteAccount);
const { mutateAsync: updateProfileMutation } = useMutation<void, ServerError, UpdateProfileParams>(updateProfile);
const { reset, getFieldState, control, handleSubmit } = useForm<FormData>({
defaultValues: defaultState,
resolver: joiResolver(schema),
});
useEffect(() => {
if (user && !getFieldState('name').isTouched && !getFieldState('email').isTouched) {
reset({ name: user.name, email: user.email });
}
}, [user]);
const handleClose = () => {
dispatch(setModalState({ modal: 'auth.profile', state: { open: false } }));
};
const handleUpdate = handleSubmit(async (data) => {
handleClose();
await updateProfileMutation({ name: data.name });
});
const handleDelete = async () => {
await deleteAccountMutation();
handleClose();
router.push('/');
};
return (
<BaseModal isOpen={isOpen} handleClose={handleClose} heading="Your Account" icon={<ManageAccounts />}>
<div className="grid gap-4">
<form className="grid gap-4 xl:w-2/3">
<div className="flex items-center gap-4">
<Avatar interactive={false} />
<div className="grid flex-1 gap-1.5">
<Controller
name="name"
control={control}
render={({ field, fieldState }) => (
<TextField
autoFocus
label={t('modals.auth.profile.form.name.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
/>
)}
/>
<p className="pl-4 text-[10.25px] opacity-50">
<Trans t={t} i18nKey="modals.auth.profile.form.avatar.help-text">
You can update your profile picture on{' '}
<a href="https://gravatar.com/" target="_blank" rel="noreferrer">
Gravatar
</a>
</Trans>
</p>
</div>
</div>
<Controller
name="email"
control={control}
render={({ field, fieldState }) => (
<TextField
disabled
label={t('modals.auth.profile.form.email.label')}
error={!!fieldState.error}
helperText={t('modals.auth.profile.form.email.help-text')}
{...field}
/>
)}
/>
<div>
<Button onClick={handleUpdate}>{t('modals.auth.profile.actions.save')}</Button>
</div>
</form>
<div className="my-2">
<Divider />
</div>
<div className="flex items-center gap-2">
<CrisisAlert />
<h5 className="font-medium">{t('modals.auth.profile.delete-account.heading')}</h5>
</div>
<p className="text-xs opacity-75">{t('modals.auth.profile.delete-account.body', { keyword: 'delete' })}</p>
<div className="flex max-w-xs flex-col gap-4">
<TextField
value={deleteText}
placeholder="Type 'delete' to confirm"
onChange={(e) => setDeleteText(e.target.value)}
/>
<div>
<Button variant="contained" color="error" disabled={!isDeleteTextValid} onClick={handleDelete}>
{t('modals.auth.profile.delete-account.actions.delete')}
</Button>
</div>
</div>
</div>
</BaseModal>
);
};
export default UserProfileModal;

View File

@ -1,8 +1,8 @@
import { joiResolver } from '@hookform/resolvers/joi';
import { Add, DriveFileRenameOutline } from '@mui/icons-material';
import { Button, TextField } from '@mui/material';
import { DatePicker } from '@mui/x-date-pickers';
import { Award, SectionPath } from '@reactive-resume/schema';
import { DatePicker } from '@mui/x-date-pickers/DatePicker';
import { Award, SectionPath } from 'schema';
import dayjs from 'dayjs';
import Joi from 'joi';
import get from 'lodash/get';
@ -50,8 +50,8 @@ const AwardModal: React.FC = () => {
const item: FormData = get(payload, 'item', null);
const isEditMode = useMemo(() => !!item, [item]);
const addText = useMemo(() => t<string>('builder.common.actions.add', { token: heading }), [t, heading]);
const editText = useMemo(() => t<string>('builder.common.actions.edit', { token: heading }), [t, heading]);
const addText = useMemo(() => t('builder.common.actions.add', { token: heading }), [t, heading]);
const editText = useMemo(() => t('builder.common.actions.edit', { token: heading }), [t, heading]);
const { reset, control, handleSubmit } = useForm<FormData>({
defaultValues: defaultState,
@ -73,7 +73,7 @@ const AwardModal: React.FC = () => {
setModalState({
modal: `builder.${path}`,
state: { open: false },
})
}),
);
reset(defaultState);
@ -101,7 +101,7 @@ const AwardModal: React.FC = () => {
<TextField
required
autoFocus
label={t<string>('builder.common.form.title.label')}
label={t('builder.common.form.title.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -115,7 +115,7 @@ const AwardModal: React.FC = () => {
render={({ field, fieldState }) => (
<TextField
required
label={t<string>('builder.leftSidebar.sections.awards.form.awarder.label')}
label={t('builder.leftSidebar.sections.awards.form.awarder.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -128,21 +128,23 @@ const AwardModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<DatePicker
{...field}
openTo="year"
label={t<string>('builder.common.form.date.label')}
inputRef={field.ref}
label={t('builder.common.form.date.label')}
value={dayjs(field.value)}
views={['year', 'month', 'day']}
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
isEmpty(keyboardInputValue) && field.onChange('');
date && dayjs(date).utc().isValid() && field.onChange(dayjs(date).utc().toISOString());
slots={{
textField: (params) => (
<TextField
{...params}
error={!!fieldState.error}
helperText={fieldState.error?.message || params.inputProps?.placeholder}
/>
),
}}
onChange={(date: dayjs.Dayjs | null) => {
date && dayjs(date).isValid() && field.onChange(dayjs(date).format('YYYY-MM-DD'));
}}
renderInput={(params) => (
<TextField
{...params}
error={!!fieldState.error}
helperText={fieldState.error?.message || params.inputProps?.placeholder}
/>
)}
/>
)}
/>
@ -152,7 +154,7 @@ const AwardModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<TextField
label={t<string>('builder.common.form.url.label')}
label={t('builder.common.form.url.label')}
placeholder="https://"
error={!!fieldState.error}
helperText={fieldState.error?.message}
@ -169,7 +171,7 @@ const AwardModal: React.FC = () => {
multiline
minRows={3}
maxRows={6}
label={t<string>('builder.common.form.summary.label')}
label={t('builder.common.form.summary.label')}
className="col-span-2"
error={!!fieldState.error}
helperText={fieldState.error?.message || <MarkdownSupported />}

View File

@ -1,8 +1,8 @@
import { joiResolver } from '@hookform/resolvers/joi';
import { Add, DriveFileRenameOutline } from '@mui/icons-material';
import { Button, TextField } from '@mui/material';
import { DatePicker } from '@mui/x-date-pickers';
import { Certificate, SectionPath } from '@reactive-resume/schema';
import { DatePicker } from '@mui/x-date-pickers/DatePicker';
import { Certificate, SectionPath } from 'schema';
import dayjs from 'dayjs';
import Joi from 'joi';
import get from 'lodash/get';
@ -50,8 +50,8 @@ const CertificateModal: React.FC = () => {
const isEditMode = useMemo(() => !!item, [item]);
const addText = useMemo(() => t<string>('builder.common.actions.add', { token: heading }), [t, heading]);
const editText = useMemo(() => t<string>('builder.common.actions.edit', { token: heading }), [t, heading]);
const addText = useMemo(() => t('builder.common.actions.add', { token: heading }), [t, heading]);
const editText = useMemo(() => t('builder.common.actions.edit', { token: heading }), [t, heading]);
const { reset, control, handleSubmit } = useForm<FormData>({
defaultValues: defaultState,
@ -73,7 +73,7 @@ const CertificateModal: React.FC = () => {
setModalState({
modal: `builder.${path}`,
state: { open: false },
})
}),
);
reset(defaultState);
@ -101,7 +101,7 @@ const CertificateModal: React.FC = () => {
<TextField
required
autoFocus
label={t<string>('builder.common.form.name.label')}
label={t('builder.common.form.name.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -115,7 +115,7 @@ const CertificateModal: React.FC = () => {
render={({ field, fieldState }) => (
<TextField
required
label={t<string>('builder.leftSidebar.sections.certifications.form.issuer.label')}
label={t('builder.leftSidebar.sections.certifications.form.issuer.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -128,21 +128,23 @@ const CertificateModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<DatePicker
{...field}
openTo="year"
label={t<string>('builder.common.form.date.label')}
inputRef={field.ref}
label={t('builder.common.form.date.label')}
value={dayjs(field.value)}
views={['year', 'month', 'day']}
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
isEmpty(keyboardInputValue) && field.onChange('');
date && dayjs(date).utc().isValid() && field.onChange(dayjs(date).utc().toISOString());
slots={{
textField: (params) => (
<TextField
{...params}
error={!!fieldState.error}
helperText={fieldState.error?.message || params.inputProps?.placeholder}
/>
),
}}
onChange={(date: dayjs.Dayjs | null) => {
date && dayjs(date).isValid() && field.onChange(dayjs(date).format('YYYY-MM-DD'));
}}
renderInput={(params) => (
<TextField
{...params}
error={!!fieldState.error}
helperText={fieldState.error?.message || params.inputProps?.placeholder}
/>
)}
/>
)}
/>
@ -152,7 +154,7 @@ const CertificateModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<TextField
label={t<string>('builder.common.form.url.label')}
label={t('builder.common.form.url.label')}
placeholder="https://"
error={!!fieldState.error}
helperText={fieldState.error?.message}
@ -169,7 +171,7 @@ const CertificateModal: React.FC = () => {
multiline
minRows={3}
maxRows={6}
label={t<string>('builder.common.form.summary.label')}
label={t('builder.common.form.summary.label')}
className="col-span-2"
error={!!fieldState.error}
helperText={fieldState.error?.message || <MarkdownSupported />}

View File

@ -1,8 +1,7 @@
import { joiResolver } from '@hookform/resolvers/joi';
import { Add, DriveFileRenameOutline } from '@mui/icons-material';
import { Button, Slider, TextField } from '@mui/material';
import { DatePicker } from '@mui/x-date-pickers';
import { Custom } from '@reactive-resume/schema';
import { DatePicker } from '@mui/x-date-pickers/DatePicker';
import dayjs from 'dayjs';
import Joi from 'joi';
import get from 'lodash/get';
@ -10,6 +9,7 @@ import isEmpty from 'lodash/isEmpty';
import { useTranslation } from 'next-i18next';
import { useEffect, useMemo } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Custom } from 'schema';
import ArrayInput from '@/components/shared/ArrayInput';
import BaseModal from '@/components/shared/BaseModal';
@ -68,8 +68,8 @@ const CustomModal: React.FC = () => {
const heading = useAppSelector((state) => get(state.resume.present, `${path}.name`));
const addText = useMemo(() => t<string>('builder.common.actions.add', { token: heading }), [t, heading]);
const editText = useMemo(() => t<string>('builder.common.actions.edit', { token: heading }), [t, heading]);
const addText = useMemo(() => t('builder.common.actions.add', { token: heading }), [t, heading]);
const editText = useMemo(() => t('builder.common.actions.edit', { token: heading }), [t, heading]);
const { reset, control, handleSubmit } = useForm<FormData>({
defaultValues: defaultState,
@ -91,7 +91,7 @@ const CustomModal: React.FC = () => {
setModalState({
modal: 'builder.sections.custom',
state: { open: false },
})
}),
);
reset(defaultState);
@ -119,7 +119,7 @@ const CustomModal: React.FC = () => {
<TextField
required
autoFocus
label={t<string>('builder.common.form.title.label')}
label={t('builder.common.form.title.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -132,7 +132,7 @@ const CustomModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<TextField
label={t<string>('builder.common.form.subtitle.label')}
label={t('builder.common.form.subtitle.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -145,21 +145,23 @@ const CustomModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<DatePicker
{...field}
openTo="year"
label={t<string>('builder.common.form.start-date.label')}
inputRef={field.ref}
label={t('builder.common.form.start-date.label')}
value={dayjs(field.value)}
views={['year', 'month', 'day']}
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
isEmpty(keyboardInputValue) && field.onChange('');
date && dayjs(date).utc().isValid() && field.onChange(dayjs(date).utc().toISOString());
slots={{
textField: (params) => (
<TextField
{...params}
error={!!fieldState.error}
helperText={fieldState.error?.message || params.inputProps?.placeholder}
/>
),
}}
onChange={(date: dayjs.Dayjs | null) => {
date && dayjs(date).isValid() && field.onChange(dayjs(date).format('YYYY-MM-DD'));
}}
renderInput={(params) => (
<TextField
{...params}
error={!!fieldState.error}
helperText={fieldState.error?.message || params.inputProps?.placeholder}
/>
)}
/>
)}
/>
@ -169,21 +171,23 @@ const CustomModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<DatePicker
{...field}
openTo="year"
label={t<string>('builder.common.form.end-date.label')}
inputRef={field.ref}
label={t('builder.common.form.end-date.label')}
value={dayjs(field.value)}
views={['year', 'month', 'day']}
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
isEmpty(keyboardInputValue) && field.onChange('');
date && dayjs(date).utc().isValid() && field.onChange(dayjs(date).utc().toISOString());
slots={{
textField: (params) => (
<TextField
{...params}
error={!!fieldState.error}
helperText={fieldState.error?.message || t('builder.common.form.end-date.help-text')}
/>
),
}}
onChange={(date: dayjs.Dayjs | null) => {
date && dayjs(date).isValid() && field.onChange(dayjs(date).format('YYYY-MM-DD'));
}}
renderInput={(params) => (
<TextField
{...params}
error={!!fieldState.error}
helperText={fieldState.error?.message || 'Leave this field blank, if still present'}
/>
)}
/>
)}
/>
@ -193,7 +197,7 @@ const CustomModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<TextField
label={t<string>('builder.common.form.url.label')}
label={t('builder.common.form.url.label')}
placeholder="https://"
className="col-span-2"
error={!!fieldState.error}
@ -208,7 +212,7 @@ const CustomModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<TextField
label={t<string>('builder.common.form.level.label')}
label={t('builder.common.form.level.label')}
className="col-span-2"
error={!!fieldState.error}
helperText={fieldState.error?.message}
@ -222,11 +226,13 @@ const CustomModal: React.FC = () => {
control={control}
render={({ field }) => (
<div className="col-span-2">
<h4 className="mb-3 font-semibold">{t<string>('builder.common.form.levelNum.label')}</h4>
<h4 className="mb-3 font-semibold">{t('builder.common.form.levelNum.label')}</h4>
<div className="px-10">
<Slider
{...field}
name={field.name}
value={field.value}
onChange={(_, value) => field.onChange(value as number)}
marks={[
{
value: 0,
@ -246,7 +252,7 @@ const CustomModal: React.FC = () => {
defaultValue={0}
color="secondary"
valueLabelDisplay="auto"
aria-label={t<string>('builder.common.form.levelNum.label')}
aria-label={t('builder.common.form.levelNum.label')}
/>
</div>
</div>
@ -263,7 +269,7 @@ const CustomModal: React.FC = () => {
maxRows={6}
className="col-span-2"
error={!!fieldState.error}
label={t<string>('builder.common.form.summary.label')}
label={t('builder.common.form.summary.label')}
helperText={fieldState.error?.message || <MarkdownSupported />}
{...field}
/>
@ -275,7 +281,7 @@ const CustomModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<ArrayInput
label={t<string>('builder.common.form.keywords.label')}
label={t('builder.common.form.keywords.label')}
value={field.value as string[]}
onChange={field.onChange}
errors={fieldState.error}

View File

@ -1,8 +1,8 @@
import { joiResolver } from '@hookform/resolvers/joi';
import { Add, DriveFileRenameOutline } from '@mui/icons-material';
import { Button, TextField } from '@mui/material';
import { DatePicker } from '@mui/x-date-pickers';
import { Education, SectionPath } from '@reactive-resume/schema';
import { DatePicker } from '@mui/x-date-pickers/DatePicker';
import { Education, SectionPath } from 'schema';
import dayjs from 'dayjs';
import Joi from 'joi';
import get from 'lodash/get';
@ -63,8 +63,8 @@ const EducationModal: React.FC = () => {
const item: FormData = get(payload, 'item', null);
const isEditMode = useMemo(() => !!item, [item]);
const addText = useMemo(() => t<string>('builder.common.actions.add', { token: heading }), [t, heading]);
const editText = useMemo(() => t<string>('builder.common.actions.edit', { token: heading }), [t, heading]);
const addText = useMemo(() => t('builder.common.actions.add', { token: heading }), [t, heading]);
const editText = useMemo(() => t('builder.common.actions.edit', { token: heading }), [t, heading]);
const { reset, control, handleSubmit } = useForm<FormData>({
defaultValues: defaultState,
@ -86,7 +86,7 @@ const EducationModal: React.FC = () => {
setModalState({
modal: `builder.${path}`,
state: { open: false },
})
}),
);
reset(defaultState);
@ -114,7 +114,7 @@ const EducationModal: React.FC = () => {
<TextField
required
autoFocus
label={t<string>('builder.leftSidebar.sections.education.form.institution.label')}
label={t('builder.leftSidebar.sections.education.form.institution.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -128,7 +128,7 @@ const EducationModal: React.FC = () => {
render={({ field, fieldState }) => (
<TextField
required
label={t<string>('builder.leftSidebar.sections.education.form.degree.label')}
label={t('builder.leftSidebar.sections.education.form.degree.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -141,7 +141,7 @@ const EducationModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<TextField
label={t<string>('builder.leftSidebar.sections.education.form.area-study.label')}
label={t('builder.leftSidebar.sections.education.form.area-study.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -154,7 +154,7 @@ const EducationModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<TextField
label={t<string>('builder.leftSidebar.sections.education.form.grade.label')}
label={t('builder.leftSidebar.sections.education.form.grade.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -167,21 +167,23 @@ const EducationModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<DatePicker
{...field}
openTo="year"
label={t<string>('builder.common.form.start-date.label')}
inputRef={field.ref}
label={t('builder.common.form.start-date.label')}
value={dayjs(field.value)}
views={['year', 'month', 'day']}
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
isEmpty(keyboardInputValue) && field.onChange('');
date && dayjs(date).utc().isValid() && field.onChange(dayjs(date).utc().toISOString());
slots={{
textField: (params) => (
<TextField
{...params}
error={!!fieldState.error}
helperText={fieldState.error?.message || params.inputProps?.placeholder}
/>
),
}}
onChange={(date: dayjs.Dayjs | null) => {
date && dayjs(date).isValid() && field.onChange(dayjs(date).format('YYYY-MM-DD'));
}}
renderInput={(params) => (
<TextField
{...params}
error={!!fieldState.error}
helperText={fieldState.error?.message || params.inputProps?.placeholder}
/>
)}
/>
)}
/>
@ -191,21 +193,23 @@ const EducationModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<DatePicker
{...field}
openTo="year"
label={t<string>('builder.common.form.end-date.label')}
inputRef={field.ref}
label={t('builder.common.form.end-date.label')}
value={dayjs(field.value)}
views={['year', 'month', 'day']}
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
isEmpty(keyboardInputValue) && field.onChange('');
date && dayjs(date).utc().isValid() && field.onChange(dayjs(date).utc().toISOString());
slots={{
textField: (params) => (
<TextField
{...params}
error={!!fieldState.error}
helperText={fieldState.error?.message || t('builder.common.form.end-date.help-text')}
/>
),
}}
onChange={(date: dayjs.Dayjs | null) => {
date && dayjs(date).isValid() && field.onChange(dayjs(date).format('YYYY-MM-DD'));
}}
renderInput={(params) => (
<TextField
{...params}
error={!!fieldState.error}
helperText={fieldState.error?.message || t<string>('builder.common.form.end-date.help-text')}
/>
)}
/>
)}
/>
@ -215,7 +219,7 @@ const EducationModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<TextField
label={t<string>('builder.common.form.url.label')}
label={t('builder.common.form.url.label')}
placeholder="https://"
className="col-span-2"
error={!!fieldState.error}
@ -233,7 +237,7 @@ const EducationModal: React.FC = () => {
multiline
minRows={3}
maxRows={6}
label={t<string>('builder.common.form.summary.label')}
label={t('builder.common.form.summary.label')}
className="col-span-2"
error={!!fieldState.error}
helperText={fieldState.error?.message || <MarkdownSupported />}
@ -247,7 +251,7 @@ const EducationModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<ArrayInput
label={t<string>('builder.leftSidebar.sections.education.form.courses.label')}
label={t('builder.leftSidebar.sections.education.form.courses.label')}
value={field.value as string[]}
onChange={field.onChange}
errors={fieldState.error}

View File

@ -1,7 +1,7 @@
import { joiResolver } from '@hookform/resolvers/joi';
import { Add, DriveFileRenameOutline } from '@mui/icons-material';
import { Button, TextField } from '@mui/material';
import { Interest, SectionPath } from '@reactive-resume/schema';
import { Interest, SectionPath } from 'schema';
import Joi from 'joi';
import get from 'lodash/get';
import isEmpty from 'lodash/isEmpty';
@ -41,8 +41,8 @@ const InterestModal: React.FC = () => {
const item: FormData = get(payload, 'item', null);
const isEditMode = useMemo(() => !!item, [item]);
const addText = useMemo(() => t<string>('builder.common.actions.add', { token: heading }), [t, heading]);
const editText = useMemo(() => t<string>('builder.common.actions.edit', { token: heading }), [t, heading]);
const addText = useMemo(() => t('builder.common.actions.add', { token: heading }), [t, heading]);
const editText = useMemo(() => t('builder.common.actions.edit', { token: heading }), [t, heading]);
const { reset, control, handleSubmit } = useForm<FormData>({
defaultValues: defaultState,
@ -64,7 +64,7 @@ const InterestModal: React.FC = () => {
setModalState({
modal: `builder.${path}`,
state: { open: false },
})
}),
);
reset(defaultState);
@ -92,7 +92,7 @@ const InterestModal: React.FC = () => {
<TextField
required
autoFocus
label={t<string>('builder.common.form.name.label')}
label={t('builder.common.form.name.label')}
className="col-span-2"
error={!!fieldState.error}
helperText={fieldState.error?.message}
@ -106,7 +106,7 @@ const InterestModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<ArrayInput
label={t<string>('builder.common.form.keywords.label')}
label={t('builder.common.form.keywords.label')}
value={field.value as string[]}
onChange={field.onChange}
errors={fieldState.error}

View File

@ -1,13 +1,13 @@
import { joiResolver } from '@hookform/resolvers/joi';
import { Add, DriveFileRenameOutline } from '@mui/icons-material';
import { Button, Slider, TextField } from '@mui/material';
import { Language, SectionPath } from '@reactive-resume/schema';
import Joi from 'joi';
import get from 'lodash/get';
import isEmpty from 'lodash/isEmpty';
import { useTranslation } from 'next-i18next';
import { useEffect, useMemo } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Language, SectionPath } from 'schema';
import BaseModal from '@/components/shared/BaseModal';
import { useAppDispatch, useAppSelector } from '@/store/hooks';
@ -42,8 +42,8 @@ const LanguageModal: React.FC = () => {
const item: FormData = get(payload, 'item', null);
const isEditMode = useMemo(() => !!item, [item]);
const addText = useMemo(() => t<string>('builder.common.actions.add', { token: heading }), [t, heading]);
const editText = useMemo(() => t<string>('builder.common.actions.edit', { token: heading }), [t, heading]);
const addText = useMemo(() => t('builder.common.actions.add', { token: heading }), [t, heading]);
const editText = useMemo(() => t('builder.common.actions.edit', { token: heading }), [t, heading]);
const { reset, control, handleSubmit } = useForm<FormData>({
defaultValues: defaultState,
@ -65,7 +65,7 @@ const LanguageModal: React.FC = () => {
setModalState({
modal: `builder.${path}`,
state: { open: false },
})
}),
);
reset(defaultState);
@ -93,7 +93,7 @@ const LanguageModal: React.FC = () => {
<TextField
required
autoFocus
label={t<string>('builder.common.form.name.label')}
label={t('builder.common.form.name.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -107,7 +107,7 @@ const LanguageModal: React.FC = () => {
render={({ field, fieldState }) => (
<TextField
required
label={t<string>('builder.common.form.level.label')}
label={t('builder.common.form.level.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -120,11 +120,13 @@ const LanguageModal: React.FC = () => {
control={control}
render={({ field }) => (
<div className="col-span-2">
<h4 className="mb-3 font-semibold">{t<string>('builder.common.form.levelNum.label')}</h4>
<h4 className="mb-3 font-semibold">{t('builder.common.form.levelNum.label')}</h4>
<div className="px-10">
<Slider
{...field}
name={field.name}
value={field.value}
onChange={(_, value) => field.onChange(value as number)}
marks={[
{
value: 0,
@ -144,7 +146,7 @@ const LanguageModal: React.FC = () => {
defaultValue={0}
color="secondary"
valueLabelDisplay="auto"
aria-label={t<string>('builder.common.form.levelNum.label')}
aria-label={t('builder.common.form.levelNum.label')}
/>
</div>
</div>

View File

@ -1,7 +1,7 @@
import { joiResolver } from '@hookform/resolvers/joi';
import { Add, AlternateEmail, DriveFileRenameOutline } from '@mui/icons-material';
import { Button, TextField } from '@mui/material';
import { Profile } from '@reactive-resume/schema';
import { Profile } from 'schema';
import Joi from 'joi';
import get from 'lodash/get';
import isEmpty from 'lodash/isEmpty';
@ -42,11 +42,11 @@ const ProfileModal: React.FC = () => {
const item: FormData = get(payload, 'item', null);
const isEditMode = useMemo(() => !!item, [item]);
const addText = t<string>('builder.common.actions.add', {
token: t<string>('builder.leftSidebar.sections.profiles.heading', { count: 1 }),
const addText = t('builder.common.actions.add', {
token: t('builder.leftSidebar.sections.profiles.heading', { count: 1 }),
});
const editText = t<string>('builder.common.actions.edit', {
token: t<string>('builder.leftSidebar.sections.profiles.heading', { count: 1 }),
const editText = t('builder.common.actions.edit', {
token: t('builder.leftSidebar.sections.profiles.heading', { count: 1 }),
});
const { reset, control, handleSubmit } = useForm<FormData>({
@ -69,7 +69,7 @@ const ProfileModal: React.FC = () => {
setModalState({
modal: `builder.${path}`,
state: { open: false },
})
}),
);
reset(defaultState);
@ -97,7 +97,7 @@ const ProfileModal: React.FC = () => {
<TextField
required
autoFocus
label={t<string>('builder.leftSidebar.sections.profiles.form.network.label')}
label={t('builder.leftSidebar.sections.profiles.form.network.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -111,7 +111,7 @@ const ProfileModal: React.FC = () => {
render={({ field, fieldState }) => (
<TextField
required
label={t<string>('builder.leftSidebar.sections.profiles.form.username.label')}
label={t('builder.leftSidebar.sections.profiles.form.username.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
InputProps={{
@ -127,7 +127,7 @@ const ProfileModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<TextField
label={t<string>('builder.common.form.url.label')}
label={t('builder.common.form.url.label')}
className="col-span-2"
placeholder="https://"
error={!!fieldState.error}

View File

@ -1,8 +1,8 @@
import { joiResolver } from '@hookform/resolvers/joi';
import { Add, DriveFileRenameOutline } from '@mui/icons-material';
import { Button, TextField } from '@mui/material';
import { DatePicker } from '@mui/x-date-pickers';
import { Project, SectionPath } from '@reactive-resume/schema';
import { DatePicker } from '@mui/x-date-pickers/DatePicker';
import { Project, SectionPath } from 'schema';
import dayjs from 'dayjs';
import Joi from 'joi';
import get from 'lodash/get';
@ -59,8 +59,8 @@ const ProjectModal: React.FC = () => {
const item: FormData = get(payload, 'item', null);
const isEditMode = useMemo(() => !!item, [item]);
const addText = useMemo(() => t<string>('builder.common.actions.add', { token: heading }), [t, heading]);
const editText = useMemo(() => t<string>('builder.common.actions.edit', { token: heading }), [t, heading]);
const addText = useMemo(() => t('builder.common.actions.add', { token: heading }), [t, heading]);
const editText = useMemo(() => t('builder.common.actions.edit', { token: heading }), [t, heading]);
const { reset, control, handleSubmit } = useForm<FormData>({
defaultValues: defaultState,
@ -82,7 +82,7 @@ const ProjectModal: React.FC = () => {
setModalState({
modal: `builder.${path}`,
state: { open: false },
})
}),
);
reset(defaultState);
@ -110,7 +110,7 @@ const ProjectModal: React.FC = () => {
<TextField
required
autoFocus
label={t<string>('builder.common.form.name.label')}
label={t('builder.common.form.name.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -124,7 +124,7 @@ const ProjectModal: React.FC = () => {
render={({ field, fieldState }) => (
<TextField
required
label={t<string>('builder.common.form.description.label')}
label={t('builder.common.form.description.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -137,21 +137,23 @@ const ProjectModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<DatePicker
{...field}
openTo="year"
label={t<string>('builder.common.form.start-date.label')}
inputRef={field.ref}
label={t('builder.common.form.start-date.label')}
value={dayjs(field.value)}
views={['year', 'month', 'day']}
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
isEmpty(keyboardInputValue) && field.onChange('');
date && dayjs(date).utc().isValid() && field.onChange(dayjs(date).utc().toISOString());
slots={{
textField: (params) => (
<TextField
{...params}
error={!!fieldState.error}
helperText={fieldState.error?.message || params.inputProps?.placeholder}
/>
),
}}
onChange={(date: dayjs.Dayjs | null) => {
date && dayjs(date).isValid() && field.onChange(dayjs(date).format('YYYY-MM-DD'));
}}
renderInput={(params) => (
<TextField
{...params}
error={!!fieldState.error}
helperText={fieldState.error?.message || params.inputProps?.placeholder}
/>
)}
/>
)}
/>
@ -161,21 +163,23 @@ const ProjectModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<DatePicker
{...field}
openTo="year"
label={t<string>('builder.common.form.end-date.label')}
inputRef={field.ref}
label={t('builder.common.form.end-date.label')}
value={dayjs(field.value)}
views={['year', 'month', 'day']}
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
isEmpty(keyboardInputValue) && field.onChange('');
date && dayjs(date).utc().isValid() && field.onChange(dayjs(date).utc().toISOString());
slots={{
textField: (params) => (
<TextField
{...params}
error={!!fieldState.error}
helperText={fieldState.error?.message || t('builder.common.form.end-date.help-text')}
/>
),
}}
onChange={(date: dayjs.Dayjs | null) => {
date && dayjs(date).isValid() && field.onChange(dayjs(date).format('YYYY-MM-DD'));
}}
renderInput={(params) => (
<TextField
{...params}
error={!!fieldState.error}
helperText={fieldState.error?.message || 'Leave this field blank, if still present'}
/>
)}
/>
)}
/>
@ -185,7 +189,7 @@ const ProjectModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<TextField
label={t<string>('builder.common.form.url.label')}
label={t('builder.common.form.url.label')}
placeholder="https://"
className="col-span-2"
error={!!fieldState.error}
@ -203,7 +207,7 @@ const ProjectModal: React.FC = () => {
multiline
minRows={3}
maxRows={6}
label={t<string>('builder.common.form.summary.label')}
label={t('builder.common.form.summary.label')}
className="col-span-2"
error={!!fieldState.error}
helperText={fieldState.error?.message || <MarkdownSupported />}
@ -217,7 +221,7 @@ const ProjectModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<ArrayInput
label={t<string>('builder.common.form.keywords.label')}
label={t('builder.common.form.keywords.label')}
value={field.value as string[]}
onChange={field.onChange}
errors={fieldState.error}

View File

@ -1,8 +1,8 @@
import { joiResolver } from '@hookform/resolvers/joi';
import { Add, DriveFileRenameOutline } from '@mui/icons-material';
import { Button, TextField } from '@mui/material';
import { DatePicker } from '@mui/x-date-pickers';
import { Publication, SectionPath } from '@reactive-resume/schema';
import { DatePicker } from '@mui/x-date-pickers/DatePicker';
import { Publication, SectionPath } from 'schema';
import dayjs from 'dayjs';
import Joi from 'joi';
import get from 'lodash/get';
@ -50,8 +50,8 @@ const PublicationModal: React.FC = () => {
const item: FormData = get(payload, 'item', null);
const isEditMode = useMemo(() => !!item, [item]);
const addText = useMemo(() => t<string>('builder.common.actions.add', { token: heading }), [t, heading]);
const editText = useMemo(() => t<string>('builder.common.actions.edit', { token: heading }), [t, heading]);
const addText = useMemo(() => t('builder.common.actions.add', { token: heading }), [t, heading]);
const editText = useMemo(() => t('builder.common.actions.edit', { token: heading }), [t, heading]);
const { reset, control, handleSubmit } = useForm<FormData>({
defaultValues: defaultState,
@ -73,7 +73,7 @@ const PublicationModal: React.FC = () => {
setModalState({
modal: `builder.${path}`,
state: { open: false },
})
}),
);
reset(defaultState);
@ -101,7 +101,7 @@ const PublicationModal: React.FC = () => {
<TextField
required
autoFocus
label={t<string>('builder.common.form.name.label')}
label={t('builder.common.form.name.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -115,7 +115,7 @@ const PublicationModal: React.FC = () => {
render={({ field, fieldState }) => (
<TextField
required
label={t<string>('builder.leftSidebar.sections.publications.form.publisher.label')}
label={t('builder.leftSidebar.sections.publications.form.publisher.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -128,21 +128,23 @@ const PublicationModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<DatePicker
{...field}
openTo="year"
label={t<string>('builder.common.form.date.label')}
inputRef={field.ref}
label={t('builder.common.form.date.label')}
value={dayjs(field.value)}
views={['year', 'month', 'day']}
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
isEmpty(keyboardInputValue) && field.onChange('');
date && dayjs(date).utc().isValid() && field.onChange(dayjs(date).utc().toISOString());
slots={{
textField: (params) => (
<TextField
{...params}
error={!!fieldState.error}
helperText={fieldState.error?.message || params.inputProps?.placeholder}
/>
),
}}
onChange={(date: dayjs.Dayjs | null) => {
date && dayjs(date).isValid() && field.onChange(dayjs(date).format('YYYY-MM-DD'));
}}
renderInput={(params) => (
<TextField
{...params}
error={!!fieldState.error}
helperText={fieldState.error?.message || params.inputProps?.placeholder}
/>
)}
/>
)}
/>
@ -152,7 +154,7 @@ const PublicationModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<TextField
label={t<string>('builder.common.form.url.label')}
label={t('builder.common.form.url.label')}
placeholder="https://"
error={!!fieldState.error}
helperText={fieldState.error?.message}
@ -169,7 +171,7 @@ const PublicationModal: React.FC = () => {
multiline
minRows={3}
maxRows={6}
label={t<string>('builder.common.form.summary.label')}
label={t('builder.common.form.summary.label')}
className="col-span-2"
error={!!fieldState.error}
helperText={fieldState.error?.message || <MarkdownSupported />}

View File

@ -1,7 +1,7 @@
import { joiResolver } from '@hookform/resolvers/joi';
import { Add, DriveFileRenameOutline } from '@mui/icons-material';
import { Button, TextField } from '@mui/material';
import { Reference, SectionPath } from '@reactive-resume/schema';
import { Reference, SectionPath } from 'schema';
import Joi from 'joi';
import get from 'lodash/get';
import isEmpty from 'lodash/isEmpty';
@ -47,8 +47,8 @@ const ReferenceModal: React.FC = () => {
const item: FormData = get(payload, 'item', null);
const isEditMode = useMemo(() => !!item, [item]);
const addText = useMemo(() => t<string>('builder.common.actions.add', { token: heading }), [t, heading]);
const editText = useMemo(() => t<string>('builder.common.actions.edit', { token: heading }), [t, heading]);
const addText = useMemo(() => t('builder.common.actions.add', { token: heading }), [t, heading]);
const editText = useMemo(() => t('builder.common.actions.edit', { token: heading }), [t, heading]);
const { reset, control, handleSubmit } = useForm<FormData>({
defaultValues: defaultState,
@ -70,7 +70,7 @@ const ReferenceModal: React.FC = () => {
setModalState({
modal: `builder.${path}`,
state: { open: false },
})
}),
);
reset(defaultState);
@ -98,7 +98,7 @@ const ReferenceModal: React.FC = () => {
<TextField
required
autoFocus
label={t<string>('builder.common.form.name.label')}
label={t('builder.common.form.name.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -112,7 +112,7 @@ const ReferenceModal: React.FC = () => {
render={({ field, fieldState }) => (
<TextField
required
label={t<string>('builder.leftSidebar.sections.references.form.relationship.label')}
label={t('builder.leftSidebar.sections.references.form.relationship.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -125,7 +125,7 @@ const ReferenceModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<TextField
label={t<string>('builder.common.form.phone.label')}
label={t('builder.common.form.phone.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -138,7 +138,7 @@ const ReferenceModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<TextField
label={t<string>('builder.common.form.email.label')}
label={t('builder.common.form.email.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -154,7 +154,7 @@ const ReferenceModal: React.FC = () => {
multiline
minRows={3}
maxRows={6}
label={t<string>('builder.common.form.summary.label')}
label={t('builder.common.form.summary.label')}
className="col-span-2"
error={!!fieldState.error}
helperText={fieldState.error?.message || <MarkdownSupported />}

View File

@ -1,13 +1,13 @@
import { joiResolver } from '@hookform/resolvers/joi';
import { Add, DriveFileRenameOutline } from '@mui/icons-material';
import { Button, Slider, TextField } from '@mui/material';
import { SectionPath, Skill } from '@reactive-resume/schema';
import Joi from 'joi';
import get from 'lodash/get';
import isEmpty from 'lodash/isEmpty';
import { useTranslation } from 'next-i18next';
import { useEffect, useMemo } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { SectionPath, Skill } from 'schema';
import ArrayInput from '@/components/shared/ArrayInput';
import BaseModal from '@/components/shared/BaseModal';
@ -45,8 +45,8 @@ const SkillModal: React.FC = () => {
const item: FormData = get(payload, 'item', null);
const isEditMode = useMemo(() => !!item, [item]);
const addText = useMemo(() => t<string>('builder.common.actions.add', { token: heading }), [t, heading]);
const editText = useMemo(() => t<string>('builder.common.actions.edit', { token: heading }), [t, heading]);
const addText = useMemo(() => t('builder.common.actions.add', { token: heading }), [t, heading]);
const editText = useMemo(() => t('builder.common.actions.edit', { token: heading }), [t, heading]);
const { reset, control, handleSubmit } = useForm<FormData>({
defaultValues: defaultState,
@ -68,7 +68,7 @@ const SkillModal: React.FC = () => {
setModalState({
modal: `builder.${path}`,
state: { open: false },
})
}),
);
reset(defaultState);
@ -96,7 +96,7 @@ const SkillModal: React.FC = () => {
<TextField
required
autoFocus
label={t<string>('builder.common.form.name.label')}
label={t('builder.common.form.name.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -109,7 +109,7 @@ const SkillModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<TextField
label={t<string>('builder.common.form.level.label')}
label={t('builder.common.form.level.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -122,11 +122,13 @@ const SkillModal: React.FC = () => {
control={control}
render={({ field }) => (
<div className="col-span-2">
<h4 className="mb-3 font-semibold">{t<string>('builder.common.form.levelNum.label')}</h4>
<h4 className="mb-3 font-semibold">{t('builder.common.form.levelNum.label')}</h4>
<div className="px-3">
<Slider
{...field}
name={field.name}
value={field.value}
onChange={(_, value) => field.onChange(value as number)}
marks={[
{
value: 0,
@ -146,7 +148,7 @@ const SkillModal: React.FC = () => {
defaultValue={0}
color="secondary"
valueLabelDisplay="auto"
aria-label={t<string>('builder.common.form.levelNum.label')}
aria-label={t('builder.common.form.levelNum.label')}
/>
</div>
</div>
@ -158,7 +160,7 @@ const SkillModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<ArrayInput
label={t<string>('builder.common.form.keywords.label')}
label={t('builder.common.form.keywords.label')}
value={field.value}
onChange={field.onChange}
errors={fieldState.error}

View File

@ -1,8 +1,8 @@
import { joiResolver } from '@hookform/resolvers/joi';
import { Add, DriveFileRenameOutline } from '@mui/icons-material';
import { Button, TextField } from '@mui/material';
import { DatePicker } from '@mui/x-date-pickers';
import { SectionPath, Volunteer } from '@reactive-resume/schema';
import { DatePicker } from '@mui/x-date-pickers/DatePicker';
import { SectionPath, Volunteer } from 'schema';
import dayjs from 'dayjs';
import Joi from 'joi';
import get from 'lodash/get';
@ -56,8 +56,8 @@ const VolunteerModal: React.FC = () => {
const item: FormData = get(payload, 'item', null);
const isEditMode = useMemo(() => !!item, [item]);
const addText = useMemo(() => t<string>('builder.common.actions.add', { token: heading }), [t, heading]);
const editText = useMemo(() => t<string>('builder.common.actions.edit', { token: heading }), [t, heading]);
const addText = useMemo(() => t('builder.common.actions.add', { token: heading }), [t, heading]);
const editText = useMemo(() => t('builder.common.actions.edit', { token: heading }), [t, heading]);
const { reset, control, handleSubmit } = useForm<FormData>({
defaultValues: defaultState,
@ -79,7 +79,7 @@ const VolunteerModal: React.FC = () => {
setModalState({
modal: `builder.${path}`,
state: { open: false },
})
}),
);
reset(defaultState);
@ -107,7 +107,7 @@ const VolunteerModal: React.FC = () => {
<TextField
required
autoFocus
label={t<string>('builder.leftSidebar.sections.volunteer.form.organization.label')}
label={t('builder.leftSidebar.sections.volunteer.form.organization.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -121,7 +121,7 @@ const VolunteerModal: React.FC = () => {
render={({ field, fieldState }) => (
<TextField
required
label={t<string>('builder.common.form.position.label')}
label={t('builder.common.form.position.label')}
error={!!fieldState.error}
helperText={fieldState.error?.message}
{...field}
@ -134,21 +134,23 @@ const VolunteerModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<DatePicker
{...field}
openTo="year"
label={t<string>('builder.common.form.start-date.label')}
inputRef={field.ref}
label={t('builder.common.form.start-date.label')}
value={dayjs(field.value)}
views={['year', 'month', 'day']}
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
isEmpty(keyboardInputValue) && field.onChange('');
date && dayjs(date).utc().isValid() && field.onChange(dayjs(date).utc().toISOString());
slots={{
textField: (params) => (
<TextField
{...params}
error={!!fieldState.error}
helperText={fieldState.error?.message || params.inputProps?.placeholder}
/>
),
}}
onChange={(date: dayjs.Dayjs | null) => {
date && dayjs(date).isValid() && field.onChange(dayjs(date).format('YYYY-MM-DD'));
}}
renderInput={(params) => (
<TextField
{...params}
error={!!fieldState.error}
helperText={fieldState.error?.message || params.inputProps?.placeholder}
/>
)}
/>
)}
/>
@ -158,21 +160,23 @@ const VolunteerModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<DatePicker
{...field}
openTo="year"
label={t<string>('builder.common.form.end-date.label')}
inputRef={field.ref}
label={t('builder.common.form.end-date.label')}
value={dayjs(field.value)}
views={['year', 'month', 'day']}
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
isEmpty(keyboardInputValue) && field.onChange('');
date && dayjs(date).utc().isValid() && field.onChange(dayjs(date).utc().toISOString());
slots={{
textField: (params) => (
<TextField
{...params}
error={!!fieldState.error}
helperText={fieldState.error?.message || t('builder.common.form.end-date.help-text')}
/>
),
}}
onChange={(date: dayjs.Dayjs | null) => {
date && dayjs(date).isValid() && field.onChange(dayjs(date).format('YYYY-MM-DD'));
}}
renderInput={(params) => (
<TextField
{...params}
error={!!fieldState.error}
helperText={fieldState.error?.message || 'Leave this field blank, if still present'}
/>
)}
/>
)}
/>
@ -182,7 +186,7 @@ const VolunteerModal: React.FC = () => {
control={control}
render={({ field, fieldState }) => (
<TextField
label={t<string>('builder.common.form.url.label')}
label={t('builder.common.form.url.label')}
placeholder="https://"
className="col-span-2"
error={!!fieldState.error}
@ -200,7 +204,7 @@ const VolunteerModal: React.FC = () => {
multiline
minRows={3}
maxRows={6}
label={t<string>('builder.common.form.summary.label')}
label={t('builder.common.form.summary.label')}
className="col-span-2"
error={!!fieldState.error}
helperText={fieldState.error?.message || <MarkdownSupported />}

Some files were not shown because too many files have changed in this diff Show More