Commit Graph

20 Commits

Author SHA1 Message Date
d114b630d2 feat: add prettier sort import plugin (#2058) 2023-07-31 22:26:45 +08:00
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
d71bfce1a0 chore: add usage into heatmap (#1443) 2023-04-02 11:56:09 +08:00
89ab57d738 refactor: update import prefix with alias (#1433) 2023-04-01 16:03:14 +08:00
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
2023-01-19 20:57:03 +08:00
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
91220ea4a6 fix: reset image state in gallery (#730) 2022-12-11 20:14:55 +08:00
e92407d9ec feat: image preview enhancement (#682) 2022-12-06 09:38:01 +08:00
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>
2022-11-02 12:00:28 +00:00
2a11aed881 chore: update dialog event listener 2022-08-30 07:41:28 +08:00
c703f281d9 chore: update feather icon 2022-07-30 00:29:20 +08:00
2b8078a19b chore: add CommonDialog 2022-07-28 20:19:14 +08:00
93ba2f4fab chore: fix icon style 2022-07-17 10:29:12 +08:00
9417797b99 chore: use fontawesome instead of material icons 2022-07-17 09:58:56 +08:00
65ade1fc87 chore: update todo block 2022-07-03 11:24:57 +08:00
8cb9675965 chore: download image by one click (#94)
chore: download image by clicking
2022-06-28 21:56:06 +08:00
8cb3994022 chore: update sharing image preview 2022-06-25 09:58:00 +08:00
b52c16c43f chore: use axios instead of fetch 2022-05-22 12:02:58 +08:00
226e9c156a feat: change main language to english 2022-02-04 22:48:22 +08:00
06bffd0ba5 migrate frontend 2021-12-08 23:43:52 +08:00