Commit Graph

48 Commits

Author SHA1 Message Date
boojack d114b630d2
feat: add prettier sort import plugin (#2058) 2023-07-31 22:26:45 +08:00
Ajay Kumbhare 1780225da5
feat: add typeScript support to enforce valid translation keys (#1954)
* #1952 Fix incorrect localization key for sign-up failure message

* feat: add typeScript support to enforce valid translation keys

* feat: add typeScript support to enforce valid translation keys

* fix lint errors

* fix lint error
2023-07-15 10:27:37 +08:00
boojack 437e05bd2f
chore: update header style (#1945) 2023-07-13 23:15:11 +08:00
Lincoln Nogueira 557278fac0
feat: improve i18n support as a whole (#1526)
* feat: improve i18n support as a whole

- Remove dayjs in favor of /helpers/datetime.ts, which uses
Intl.DateTimeFormat and Date. Dayjs is not exactly i18n friendly
and has several locale related opened issues.

- Move/refactor date/time code from /helpers/utils.ts to
/helpers/datetime.ts.

- Fix Daily Review weekday not changing according to selected date.

- Localize Daily review weekday and month.

- Load i18n listed strings from /locales/{locale}.json in a dynamic way.
This makes much easier to add new locales, by just adding a properly
named json file and listing it only in /web/src/i18n.ts and
/api/user_setting.go.

- Fallback languages are now set in /web/src/i18n.ts.

- Full language codes are now preffered, but they fallback to 2-letter
codes when not available.

- The locale dropdown is now populated dynamically from the available
locales. Locale names are populated by the browser via
Intl.DisplayNames(locale).

- /web/src/i18n.ts now exports a type TLocale from availableLocales
array. This is used only by findNearestLanguageMatch(). As I was unable
to use this type in ".d.ts" files, I switched the Locale type from
/web/src/types/i18n.d.ts to string.

- Move pretty much all hardcoded text strings to i18n strings.

- Add pt-BR translation.

- Remove site.ts and move its content to a i18n string.

- Rename zh.json to zh-Hans.json to get the correct language name on
selector dropdown.

- Remove pt_BR.json and replace with pt-BR.json.

- Some minor layout spacing fixes to accommodate larger texts.

- Improve some error messages.

* Delete .yarnrc.yml

* Delete package-lock.json

* fix: 158:28  error  Insert `⏎`  prettier/prettier
2023-04-15 08:56:03 +08:00
boojack 1ea65c0b60
chore: update logo (#1442)
* chore: update logo

* chore: update
2023-04-02 09:54:52 +08:00
boojack 89ab57d738
refactor: update import prefix with alias (#1433) 2023-04-01 16:03:14 +08:00
boojack 50f36e3ed5
chore: upgrade version to `0.11.2` (#1336) 2023-03-11 13:20:24 +08:00
boojack a9218ed5f0
refactor: filter store (#1331) 2023-03-11 09:13:54 +08:00
boojack 390e29f850
chore: remove part of less files (#1314) 2023-03-08 22:05:43 +08:00
boojack dd625d8edc
chore: update links reference (#1243) 2023-03-04 15:06:01 +08:00
Zeng1998 7b7061846c
chore: open url in other tabs (#1173)
* chore: open url in other tabs

* update: add `rel="noreferrer"`
2023-02-27 19:50:43 +08:00
boojack 24b21aa9d7
chore: update version to `0.9.1` (#882) 2022-12-31 15:40:53 +08:00
boojack 9f25badde3
chore: update logo format to png (#830) 2022-12-23 00:21:53 +08:00
Zeng1998 55695f2189
feat: `esc` key to exit multiple dialogs (#692)
* fix: `esc` key to exit multiple dialogs

* update

* update

* update

* Update web/src/components/Dialog/BaseDialog.tsx

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-12-18 10:09:12 +00:00
boojack ef621a444f
refactor: introducing `use{Module}Store` instead of service (#768)
* refactor: introducing `useEditorStore`

* refactor: update

* chore: update
2022-12-18 15:25:18 +08:00
boojack 66418d4210
feat: get image only when cors error (#721) 2022-12-10 13:20:48 +08:00
boojack c5200ca31b
feat: dark mode for dialogs (#643) 2022-11-30 20:34:16 +08:00
Zeng1998 54271c1598
chore: fix some typos (#587) 2022-11-26 06:23:29 +00:00
boojack a0667abec8
chore: update data initial requests (#538) 2022-11-22 23:45:11 +08:00
Steven 6c1cc1d283 chore: use conditional rendering instead of OnlyWhen 2022-09-20 23:30:25 +08:00
Steven 366afdd1e4 feat: use `i18next` 2022-09-19 22:27:50 +08:00
Steven b884327a53 chore: update eslint rules 2022-09-04 06:48:19 +08:00
Steven d3b26f7126 chore: update about dialog 2022-09-02 20:12:13 +08:00
Steven a7a01df79a chore: update i18n 2022-08-19 21:30:31 +08:00
boojack 90b881502d
feat: add `user_setting` model (#145)
* feat: add `user_setting` model

* chore: add global store

* chore: update settings in web

* chore: update `i18n` example
2022-08-13 14:35:33 +08:00
boojack 646a41e931 chore: add `i18n` based with `useContext` 2022-08-07 22:48:22 +08:00
boojack c703f281d9 chore: update feather icon 2022-07-30 00:29:20 +08:00
boojack 2b8078a19b chore: add `CommonDialog` 2022-07-28 20:19:14 +08:00
boojack 93ba2f4fab chore: fix icon style 2022-07-17 10:29:12 +08:00
boojack 9417797b99 chore: use `fontawesome` instead of `material icons` 2022-07-17 09:58:56 +08:00
boojack 8a91b0ad9d chore: add github badge 2022-07-15 22:17:11 +08:00
boojack 536627007d
feat: schema migration handler (#100)
* chore: update about site dialog

* feat: schema migration

* chore: lint with golangci
2022-07-02 10:47:16 +08:00
boojack b52c16c43f chore: use `axios` instead of `fetch` 2022-05-22 12:02:58 +08:00
boojack 7b668f17f5 chore: rename repo 2022-05-21 12:33:18 +08:00
boojack 3fdc5bb2b1 chore: update demo user 2022-05-20 06:48:55 +08:00
boojack 6fe1db42b5 chore: update store types 2022-05-19 18:32:49 +08:00
boojack 74ab42069f chore: add service version 2022-05-17 21:21:13 +08:00
STEVEN 615cec3066
feat: import data from json (#53) 2022-05-15 22:21:13 +08:00
boojack fcb5e2ee5a chore: update deploy guide in readme 2022-05-02 09:40:38 +08:00
email fc12e0e3fb chore: update readme 2022-04-03 22:14:43 +08:00
email f7a4419877 chore: update about site dialog 2022-03-24 00:28:27 +08:00
STEVEN b597d40470
refactor: use tailwindcss in less (#34)
* reduce less
2022-03-11 04:54:11 +08:00
email 226e9c156a feat: change main language to english 2022-02-04 22:48:22 +08:00
email aed1004f39 feat: add star-history embed iframe; 2022-01-07 21:36:49 +08:00
steven 3dc71a6ec7 web: update about site dialog 2021-12-12 14:39:53 +08:00
steven bdaeb3a68b web: update restful api 2021-12-09 21:45:48 +08:00
steven b8c01524c5 web: update memo editor and about me 2021-12-09 10:23:20 +08:00
LeeShuang 06bffd0ba5 migrate frontend 2021-12-08 23:43:52 +08:00