Commit Graph

17 Commits

Author SHA1 Message Date
Omar López 3641d5e46e
[CAL-493] Implements tRCP on event types (#923)
* Removes unused component

* Refactors useLocale

We don't need to pass the locale prop everywhere

* Event type fixes

* Extracts CreateNewEventDialog

* Implements tRCP for event types
2021-10-15 20:07:00 +01:00
Omar López c2c37b701e
Zomars/fixes trpc typo (#957) 2021-10-14 19:22:01 +00:00
Omar López 0861d7cc61
Ends the war between tRPC and next-i18next (#939)
* Ends the war between tRPC and next-i18next

* Locale fixes

* Linting

* Linting

* trpc i18n (not working) (#942)

* simplify i18n handler and remove redundant(?) fn check

* split up viewer to a "logged in only" and "public"

* wip -- skip first render

Co-authored-by: Omar López <zomars@me.com>

* Linting

* I18n fixes

* We don't need serverSideTranslations in every page anymore

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Alex Johansson <alexander@n1s.se>
2021-10-14 13:57:49 +03:00
Alex Johansson ec6b897191
integration page follow ups (#912)
### Internals

- Replace `lodash.*` packages with plain `lodash` & replace `lodash.*` imports with `lodash/` - should have no impact on bundle size and opens up for us to use all of lodash
- Update `viewer.me` to cherry-pick what we actually need on that query to avoid leaking extra context info
- Update `getIntegrations` to never include `.key`-property to avoid leaking 

### Visual

- Update calendars so `primary` is displayed last
- Update connected calendars so they are in ascending order in which you connected them
2021-10-13 13:35:25 +02:00
Alex Johansson c3dc18643e
`/integrations` facelift (#858) 2021-10-12 11:35:44 +02:00
Alex Johansson 8cbf880af6
add locale to trpc context (#897) 2021-10-11 12:03:50 +00:00
Mihai C 35dd3f088c
fix: move cancelled upcoming booking to cancelled tab (#883)
* fix: move cancelled upcoming booking to cancelled tab

* fix: lint

* Update server/routers/viewer.tsx

Co-authored-by: Mihai Colceriu <colceriumi@gmail.com>

* fix: also for past bookings

Co-authored-by: Alex Johansson <alexander@n1s.se>
2021-10-08 18:58:37 +03:00
Mihai C 2c9b301b77
Feat/i18n crowdin (#752)
* feat: add crowdin and supported languages

* fix: main branch name

* feat: test crowdin integration

* feat: add crowdin config skeleton

* feat: update crowdin.yml

* fix: remove ro translation

* test: en translation

* test: en translation

* New Crowdin translations by Github Action (#735)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* test: en translation

* fix: separate upload/download workflows

* wip

* New Crowdin translations by Github Action (#738)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* wip

* wip

* wip

* wip

* wip

* typo

* wip

* wip

* update crowdin config

* update

* chore: support i18n de,es,fr,it,pt,ru,ro,en

* chore: extract i18n strings

* chore: extract booking components strings for i18n

* wip

* extract more strings

* wip

* fallback to getServerSideProps for now

* New Crowdin translations by Github Action (#874)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* fix: minor fixes on the datepicker

* fix: add dutch lang

* fix: linting issues

* fix: string

* fix: update GHA

* cleanup trpc

* fix linting

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
2021-10-08 14:43:48 +03:00
Omar López 58de920951
Refactors custom input form & dialog (#853) 2021-10-07 15:43:20 +00:00
Alex van Andel 89e5da15df
Fixes weekStart & automatic theme adjust checkbox (#847) 2021-10-02 20:16:51 +00:00
Alex Johansson eb93e778bd
simplify `/bookings/[status]` logic (#845) 2021-10-02 13:29:26 +00:00
Alex Johansson 60298f6eeb
resize image before storing (#831)
* resize image fn

* wip

* simplify transform

* comment

* fix

* rm log

* allow pass-through for non-base-64

Co-authored-by: Alex van Andel <me@alexvanandel.com>
2021-09-30 21:37:29 +01:00
Omar López dc6841e761
Bookings UI improvements (#826) 2021-09-30 11:46:39 +01:00
Alex van Andel a30381f229
Lowercase username try #3 (#821)
3 times is a charm.. can't believe this took 3 tries.
2021-09-29 15:58:25 +01:00
Omar López dd9f801872
cal 485 prevent users from changing their username to premium ones (#799)
* Makes userRequired middleware

* Prevent users from changing usernames to premium ones

* refactor on zomars' branch (#801)

* rename `profile` -> `mutation`

* `createProtectedRouter()` helper

* move profile mutation to `viewer.`

* simplify checkUsername

* Auto scrolls to error when there is one

* Renames username helpers

* Follows db convention

Co-authored-by: Alex Johansson <alexander@n1s.se>
Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
2021-09-28 09:57:30 +01:00
Alex Johansson 649e79bdc7
statically render profile pages (#615) 2021-09-27 17:09:19 +01:00
Alex Johansson 34300650e4
add tRPC (#614)
* add trpc

* trpc specific

* fix deps

* lint fix

* upgrade prisma

* nativeTypes

* nope, not needed

* fix app propviders

* Revert "upgrade prisma"

This reverts commit e6f2d2542a.

* rev

* up trpc

* simplify

* wip - bookings page with trpc

* bookings using trpc

* fix `Shell` props

* call it viewerRouter instead

* cleanuop

* ssg helper

* fix lint

* fix types

* skip

* add `useRedirectToLoginIfUnauthenticated`

* exhaustive-deps

* fix callbackUrl

* rewrite `/availability` using trpc

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-09-27 14:47:55 +00:00