Commit Graph

20 Commits (dd833588505349b3bcba1efb2bb3d8dcbcfb69ba)

Author SHA1 Message Date
boojack d114b630d2
feat: add prettier sort import plugin (#2058) 2 years ago
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
2 years ago
boojack d71bfce1a0
chore: add usage into heatmap (#1443) 2 years ago
boojack 89ab57d738
refactor: update import prefix with alias (#1433) 2 years ago
Wujiao233 b8ab43aa25
feat: support swipe to switch img on touchscreen (#970)
* feat: support swipe to switch img on touchscreen

* fix: fix two or more fingers touch

* fix lint
2 years ago
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>
2 years ago
Zeng1998 91220ea4a6
fix: reset image state in gallery (#730) 2 years ago
Zeng1998 e92407d9ec
feat: image preview enhancement (#682) 2 years ago
Zhou Yunliang 91a61e058a
feat: view all images of a memo (#393)
* feat: view all images of a memo

* fix: function arguments

* refactor: unified image preview

* refactor: image preview for resource dialog

Co-authored-by: XQ <qiaobingxue1998@163.com>
3 years ago
Steven 2a11aed881 chore: update dialog event listener 3 years ago
boojack c703f281d9 chore: update feather icon 3 years ago
boojack 2b8078a19b chore: add `CommonDialog` 3 years ago
boojack 93ba2f4fab chore: fix icon style 3 years ago
boojack 9417797b99 chore: use `fontawesome` instead of `material icons` 3 years ago
boojack 65ade1fc87 chore: update todo block 3 years ago
boojack 8cb9675965
chore: download image by one click (#94)
chore: download image by clicking
3 years ago
boojack 8cb3994022 chore: update sharing image preview 3 years ago
boojack b52c16c43f chore: use `axios` instead of `fetch` 3 years ago
email 226e9c156a feat: change main language to english 3 years ago
LeeShuang 06bffd0ba5 migrate frontend 3 years ago