Commit graph

407 commits

Author SHA1 Message Date
ti777777 38f05fd6f2
chore: fix tag in http_getter.go (#2500)
Update http_getter.go

fix tag in  http_getter.go
2023-11-11 23:21:15 +08:00
Steven 7e545533cf chore: update resource cache control 2023-11-07 07:24:41 +08:00
Steven 834b58fbbd feat: add version update inbox message 2023-11-06 22:53:55 +08:00
Steven 21ad6cc871 chore: update tag service creator 2023-11-06 08:05:07 +08:00
Steven c24181b2be chore: fix jwt checks 2023-11-05 23:39:30 +08:00
Steven 39a0e69b04 chore: update function name 2023-11-05 23:28:09 +08:00
Steven e60e47f76f chore: update user definition 2023-11-05 23:03:43 +08:00
Steven e67820cabe chore: update list user api permission 2023-11-05 22:35:09 +08:00
Steven 137e64b0dd chore: update metrics 2023-11-05 21:41:47 +08:00
Steven ac81d856f6 chore: delete resource file sync 2023-10-28 10:42:39 +08:00
Steven 480c53d7a2 chore: fix id converter 2023-10-28 09:04:32 +08:00
Steven 2b7d7c95a5 chore: update inbox detect 2023-10-28 09:02:02 +08:00
Steven 0ee938c38b chore: remove unused inbox status 2023-10-28 02:49:35 +08:00
Steven 3c36cc2953 feat: add inbox ui 2023-10-28 02:43:46 +08:00
Steven 79bb3253b6 chore: add activity service 2023-10-28 00:21:53 +08:00
Steven 18107248aa chore: rename list inbox 2023-10-28 00:08:42 +08:00
Steven 36b4ba33fa chore: remove outdated activity definition 2023-10-27 23:11:56 +08:00
Steven 58e771a1d7 chore: combine v2 services 2023-10-27 09:07:35 +08:00
Steven e876ed3717 feat: impl part of inbox service 2023-10-27 09:01:17 +08:00
Athurg Gooth 215981dfde
chore: remote context.Context pointer (#2448)
remote context.Context pointer
2023-10-26 20:21:44 +08:00
Steven 5b3af827e1 chore: move common packages to internal 2023-10-26 09:02:50 +08:00
Athurg Gooth 064c930aed
fix: validate username before create token (#2439)
Validate username before create token
2023-10-25 12:05:44 +08:00
Athurg Gooth 043357d7dc
fix: list token for others failed (#2440)
Fix list token for others failed
2023-10-25 12:05:30 +08:00
Athurg Gooth 496cde87b2
feat: list access tokens by admin (#2434)
* Allow admin user list access_tokens of anyone

* fix undefined variable

* Update api/v2/user_service.go

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-10-24 18:51:01 +08:00
Athurg Gooth 79bbe4b82a
feat: support filter creator in /api/v2/memos (#2432)
* Add creator_id param in /api/v2/memos

* make creator_id optional
2023-10-23 21:32:58 +08:00
Steven bfd2dbfee2 chore: fix update resource api 2023-10-21 12:41:55 +08:00
Steven 89a073adc0 chore: implement create user api v2 2023-10-21 12:19:06 +08:00
Athurg Gooth fd5d51ee54
fix: some fields of profile leaked without auth (#2408)
* fix some fields of profile leaked without auth

* protect driver and dsn of profile
2023-10-20 17:41:21 +08:00
Steven 6f2ca6c87a chore: update find memo api 2023-10-20 08:48:52 +08:00
Athurg Gooth 0bfcff676c
feat: add support for remember sign in (#2402) 2023-10-18 20:38:49 -05:00
Steven 21c70e7993 feat: update memo relations dialog 2023-10-19 00:18:07 +08:00
Steven a5df36eff2 chore: update metrics 2023-10-17 23:44:16 +08:00
guopeng 73f59eaf09
fix: storage setting changed don't take effect (#2385)
* fix: Storage setting changed don't take effect

* fix: Storage setting changed don't take effect

* fix: Storage setting changed don't take effect
2023-10-16 08:07:21 -05:00
Steven c58820fa64 chore: update username regexp 2023-10-14 13:42:27 +08:00
Steven d95a6ce898 chore: add ar locale item 2023-10-14 00:25:01 +08:00
Athurg Gooth ed2e299797
fix: invalid type convert in apiv2 (#2380)
fix invalid type convert in apiv2
2023-10-13 09:53:58 -05:00
boojack bacc529391
chore: fix linter errors (#2381)
* chore: fix linter errors

* chore: update

* chore: update
2023-10-13 09:53:02 -05:00
Steven ed1ff11e80 chore: update 2023-10-13 00:13:13 +08:00
Steven ab2c86640b chore: move rate limiter to apiv1 2023-10-09 23:10:41 +08:00
Steven 31997936d6 chore: move resource public api 2023-10-08 19:40:30 +08:00
Steven b938c8d7b6 chore: only show comments in memo detail page 2023-10-08 00:42:02 +08:00
Steven 6ffc09d86a chore: remove unused httpmeta getter api 2023-10-06 23:03:36 +08:00
Steven 15eb95f964 chore: delete resource file synchronously 2023-10-06 19:02:40 +08:00
Steven 771fe394fd chore: fix initial guide 2023-10-05 15:50:16 +08:00
Steven 34ae9b0687 chore: update default storage back to database 2023-10-05 13:36:33 +08:00
Steven 7dc4bc5714 chore: update resource service 2023-10-03 23:44:14 +08:00
Steven 1542f3172a chore: update tag service 2023-10-03 09:39:39 +08:00
Steven be046cae8e chore: add parent field to memo 2023-10-01 16:27:40 +08:00
Steven 922de07751 feat: impl memo comment api 2023-10-01 14:44:10 +08:00
Steven 7549c807ac chore: update memo view activity 2023-10-01 14:14:33 +08:00
steven a928c4f845 chore: update error format 2023-09-29 13:04:54 +08:00
Steven 53090a7273 chore: show unused resources in dashboard 2023-09-27 08:09:30 +08:00
Steven 9d1c9fc505 chore: regenerate swagger docs 2023-09-27 00:52:42 +08:00
Steven 6007f48b7d chore: retire memo resource relation table 2023-09-27 00:40:16 +08:00
Steven 745902e8b1 chore: update access token order 2023-09-25 20:14:01 +08:00
Steven ad3487a9ac chore: update username matcher 2023-09-25 20:03:58 +08:00
Steven 5cec1a71da chore: update access token generator 2023-09-20 20:48:34 +08:00
Steven ae1e22931f chore: auto remove current access token when sign out 2023-09-20 19:24:26 +08:00
Steven 9bf1979fa8 fix: list resources 2023-09-19 08:24:24 +08:00
Steven b452d63fa6 chore: skip compose memo error 2023-09-18 22:41:49 +08:00
Steven 8fbd33be09 chore: update username matcher 2023-09-18 22:37:13 +08:00
Steven bff41a8957 fix: invalid username checks 2023-09-18 22:34:31 +08:00
Steven 2375001453 chore: fix acl interceptor 2023-09-18 21:50:59 +08:00
Vespa314 58026c52ea
fix: heatmap show on wrong date (#2243)
fix: heatmap show wrong date
2023-09-18 13:53:16 +08:00
Steven cd0ea6558d chore: update golangci-lint config 2023-09-17 22:55:13 +08:00
Steven 72ca4e74ee refactor: impl part of grpcweb 2023-09-17 19:20:03 +08:00
Steven fb1490c183 feat: impl resources list page 2023-09-16 11:48:53 +08:00
Steven 4424c8a231 chore: add resource service definition 2023-09-16 00:11:07 +08:00
steven e6a90a8be8 chore: register reflection grpc server 2023-09-15 17:57:45 +08:00
Steven e65282dcc5 chore: fix user state loader 2023-09-15 09:10:16 +08:00
Steven f5802a7d82 chore: update access token ui 2023-09-15 08:18:30 +08:00
Steven 33d9c13b7e chore: remove openid field from user 2023-09-14 22:57:27 +08:00
Steven 42bd9b194b feat: impl user access token api 2023-09-14 20:16:17 +08:00
Steven 8a796d12b4 chore: add user access token setting definition 2023-09-14 19:18:54 +08:00
Athurg Gooth c87df8791b
chore: optimize performance of /memo/stats (#2218)
Optimize performance of /memo/stats
2023-09-14 14:18:29 +08:00
Athurg Gooth 626ff5e3a7
feat: notify by telegram while new memo create by HTTP (#2215)
* Inject telegram bot into API service

* Add support for send telegram message

* Send notification by telegram while new memo post
2023-09-13 21:36:43 +08:00
Steven d63715d4d9 feat: implement list memos filter 2023-09-13 20:42:44 +08:00
Steven 3ad0832516 chore: use user v2 api in frontend 2023-09-10 22:03:12 +08:00
Steven 93f062d0b9 chore: update user v2 api 2023-09-10 18:56:24 +08:00
Steven 3df550927d chore: update user profile page 2023-09-10 10:33:22 +08:00
boojack 8b1f7c52aa
choer: add system setting api (#2194) 2023-09-06 21:54:12 +08:00
boojack 18fb02a1ec
chore: update swag docs (#2178)
* chore: update swag docs

* chore: update
2023-08-26 08:07:43 +08:00
boojack 4af0d03e93
chore: add user profile page (#2175)
chore: some enhancements
2023-08-25 23:10:51 +08:00
boojack e266d88edd
chore: add acl config (#2128) 2023-08-13 00:06:03 +08:00
YuNing Chen 409d686f7d
chore: minor cleanup (#2124) 2023-08-11 22:34:08 +08:00
Jianwei Zhang c835231d32
feat: add header into resource response (#2120)
Update - add header for get resource
2023-08-10 23:45:30 +08:00
boojack 723c444910
chore: update server tests (#2118) 2023-08-10 09:01:38 +08:00
boojack 35f2d399e2
chore: update api v1 docs (#2117)
* chore: update apiv1 docs

* chore: update
2023-08-09 22:30:27 +08:00
Lincoln Nogueira 4491c75135
feat: add SwaggerUI and v1 API docs (#2115)
* - Refactor several API routes from anonymous functions to regular definitions. Required to add parseable documentation comments.

- Add API documentation comments using Swag Declarative Comments Format

- Add echo-swagger to serve Swagger-UI at /api/index.html

- Fix error response from extraneous parameter resourceId to relatedMemoId in DELETE("/memo/:memoId/relation/:relatedMemoId/type/:relationType")

- Add an auto-generated ./docs/api/v1.md for quick reference on repo (generated by swagger-markdown)

- Add auxiliary scripts to generate docs.go and swagger.yaml

* fix: golangci-lint errors

* fix: go fmt flag in swag scripts
2023-08-09 21:53:06 +08:00
boojack 5d5d8de9fe
fix: get all memo api (#2091) 2023-08-06 10:14:30 +08:00
boojack 218159bf83
chore: remove openai setting section (#2084) 2023-08-05 21:39:12 +08:00
boojack 238f896907
feat: add system service (#2083)
* feat: add system service

* chore: update
2023-08-05 21:30:23 +08:00
boojack 3df9da91b4
chore: update get memo api (#2079) 2023-08-05 19:51:32 +08:00
boojack 57dd1fc49f
chore: initial memo service definition (#2077)
* chore: initial memo service definition

* chore: update

* chore: update

* chore: update
2023-08-05 09:32:52 +08:00
boojack 7c5296cf35
chore: update id type to int32 (#2076) 2023-08-04 21:55:07 +08:00
boojack 1ce82ba0d6
chore: remove shortcut related api (#2072) 2023-08-03 23:33:45 +08:00
boojack 5f819fc86f
chore: update auth middleware (#2057)
* chore: update auth middleware

* chore: update

* chore: update
2023-07-31 20:55:40 +08:00
boojack cc3a47fc65
feat: impl auth interceptor (#2055)
* feat: impl auth interceptor

* chore: update

* chore: update

* chore: update
2023-07-30 23:49:10 +08:00
Lilith c1cbfd5766
feat: add system setting to disable password-based login (#2039)
* system setting to disable password login

* fix linter warning

* fix indentation warning

* Prohibit disable-password-login if no identity providers are configured

* Warnings and explicit confirmation when en-/disabling password-login

- Disabling password login now gives a warning and requires a second
  confirmation which needs to be explicitly typed.
- (Re)Enabling password login now also gives a simple warning.
- Removing an identity provider while password-login is disabled now
  also warns about possible problems.

* Fix formatting

* Fix code-style

---------

Co-authored-by: traumweh <5042134-traumweh@users.noreply.gitlab.com>
2023-07-30 21:22:02 +08:00
boojack 9ef0f8a901
feat: add user setting field (#2054) 2023-07-30 09:53:24 +08:00
boojack 470fe1df49
feat: implement part of user service (#2053)
* feat: implement part of user service

* chore: update

* chore: update
2023-07-30 01:35:00 +08:00
boojack 89ba2a6540
feat: implement part of tag service (#2051)
* feat: add grpc gateway tempalte

* chore: update

* chore: move directory

* chore: update
2023-07-30 00:00:49 +08:00
boojack d8d6de9fca
fix: get user by username api (#2034) 2023-07-26 22:41:21 +08:00
boojack 56c321aeaa
revert: fix: exclude all punctuation chars except underscore in tags (#2033)
Revert "fix: exclude all punctuation chars except underscore in tags (#1974)"

This reverts commit 8c61531671.
2023-07-26 21:11:13 +08:00
Mason Sun a9eb605b0f
fix: auth api json format (#2021)
Update auth.go

api/v1/auth/相关接口未应用convertUserFromStore方法,会导致User对象获得类型存在问题,导致User定义的`json:`相关的字段转化失效。
导致输出json未被正确格式化
2023-07-23 19:11:29 +08:00
boojack 04b7a26c03
chore: fix request path (#2014) 2023-07-23 10:12:13 +08:00
boojack 28203bbaf9
chore: fix rss route (#2010) 2023-07-22 21:51:05 +08:00
boojack 9138ab8095
fix: rss route (#2008)
* fix: rss route

* chore: update
2023-07-22 12:58:17 +08:00
Ajay Kumbhare 55975a46d8
feat: add hindi language translation for i18n support (#2001) 2023-07-22 09:38:54 +08:00
Alexandr Tumaykin f91f09adea
feat: use username instead of uid (#1977)
* #1916 replace userId to username

* resolve

---------

Co-authored-by: Александр Тумайкин <AATumaykin@tsum.ru>
2023-07-20 19:48:39 +08:00
Athurg Gooth 336b32004d
feat: add AutoBackupInterval in SystemSetting (#1989)
Add AutoBackupInterval in SystemSetting page
2023-07-19 21:39:21 +08:00
Jianwei Zhang 8bcc2bd715
fix: access token will expired after 24h (#1988) 2023-07-19 08:45:30 +08:00
Felipe Martínez 8c61531671
fix: exclude all punctuation chars except underscore in tags (#1974)
* Change tag regex

* Update tests

* Add more tag tests
2023-07-18 01:53:07 +08:00
boojack 2effacd0a6
chore: add api docs (#1965) 2023-07-15 23:30:20 +08:00
boojack 40a30d46af
chore: update db connection params (#1960) 2023-07-15 10:26:19 +08:00
Felipe Martínez 2a7104e564
fix: exclude commas in tags (#1957) 2023-07-15 10:00:35 +08:00
Athurg Gooth d9b3501fae
feat: add support for auto backup db file (#1950)
Add support for auto backup db file
2023-07-14 20:05:07 +08:00
Athurg Gooth 06dbd87311
chore: split save resource asset (#1939)
* Move resource blob save into a independent function

* Support save resouce blob from Telegram like HTTP API

* Support save resouce blob download from URL to LocalStorage or S3

* fix typo
2023-07-14 11:14:10 +08:00
Athurg Gooth 3093f80d68
fix: visibility param override the user auth state (#1942)
fix visibility param override the user auth state
2023-07-13 15:20:15 +08:00
Athurg Gooth 11aa01ee2e
fix: visibility param override the user auth state (#1941)
fix visibility param override the user auth state
2023-07-13 14:56:43 +08:00
CorrectRoadH d8b6e92813
feat: implement memos chat backend function (#1934)
* feat: implment backend function

* eslint

* eslint

* eslint
2023-07-13 11:25:59 +08:00
boojack da70917b08
chore: update auth page (#1920)
* chore: update auth page

* chore: update
2023-07-09 21:13:26 +08:00
boojack 7e391bd53d
chore: remove resource public id (#1912)
* chore: remove resource public id

* chore: update
2023-07-08 11:29:50 +08:00
boojack 0e05c62a3b
chore: update common utils (#1908) 2023-07-06 22:53:38 +08:00
boojack a7573d5705
refactor: migrate memo to apiv1 (#1907)
* refactor: migrate memo to apiv1

* chore: update

* chore: update

* chore: update

* chore: upate

* chore: update

* chore: update
2023-07-06 21:56:42 +08:00
boojack 1fa9f162a5
refactor: migrate resource to apiv1 (#1901) 2023-07-06 00:01:40 +08:00
Athurg Gooth 2033b0c8fa
fix: skip auth on /api/v1/status to avoid sign up while token invalid (#1895)
Skip auth on /api/v1/status to avoid sign up while token invalid
2023-07-05 13:55:04 +08:00
boojack 5b6c98582e
refactor: migrate storage to apiv1 (#1890)
* refactor: migrate storage to apiv1

* chore: update

* chore: update

* chore: update
2023-07-04 10:05:57 +08:00
Athurg Gooth 833fd23820
fix: OpenID was disappear sometimes (#1886)
Fix openid was disapear sometimes
2023-07-03 19:10:24 +08:00
boojack 66e65e4dc1
refactor: migrate definition to api v1 (#1879)
* refactor: user api v1

* refactor: system setting to apiv1

* chore: remove unused definition

* chore: update

* chore: refactor: system setting

* chore: update

* refactor: migrate tag

* feat: migrate activity store

* refactor: migrate shortcut apiv1

* chore: update
2023-07-02 18:56:25 +08:00
boojack 9a8d43bf88
chore: update user store names (#1877)
* chore: update user store names

* chore: update
2023-07-02 14:27:23 +08:00
boojack 5fe644a3b6
chore: add jwt middleware in apiv1 (#1869) 2023-07-01 00:03:28 +08:00
CorrectRoadH a108f5e212
fix: ignore internalpath field when creating resource (#1868)
* fix/to_valid_token

* eslint

* revert

* fix/invalid_internalpath_file_upload
2023-06-30 23:50:55 +08:00
boojack 6a78887f1d
chore: update store types name (#1862) 2023-06-29 22:55:03 +08:00
boojack 7226a9ad47
chore: update idp store (#1856) 2023-06-26 23:46:01 +08:00
boojack b44f2b5ffb
chore: migrate user setting to api v1 package (#1855)
* chore: migrate to api v1 package

* chore: update
2023-06-26 23:06:53 +08:00
boojack b34aded376
refactor: migration idp api (#1842)
* refactor: migration idp api

* chore: update
2023-06-17 22:35:17 +08:00
boojack 4ed9a3a0ea
refactor: migrate auth routes to v1 package (#1841)
* feat: add api v1 packages

* chore: migrate auth to v1

* chore: update test
2023-06-17 21:25:46 +08:00
May Kittens Devour Your Soul 8f7001cd9f
feat: add croatian locale (#1822)
* Create hr.json

Croatian Language

* Update user_setting.go

* Update i18n.ts

* Update hr.json

* Update web/src/i18n.ts

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-06-14 22:09:19 +08:00
Athurg Gooth e6c9f2a00e
feat: add support for download resource from link (#1800)
* Add support for download resource from link

* Parse external link and add file ext name from mime info

* Add zh-Hans locale for `download-link`

* fix typo on code and comments

* Update server/resource.go

---------

Co-authored-by: Athurg Feng <athurg@gooth.org>
Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-06-08 14:35:33 +00:00
kakik0u c396cc9649
feat: add japanese locale (#1802)
* Add japanese

* Add japanese setting files

---------

Co-authored-by: barappe <121844712+barappe@users.noreply.github.com>
2023-06-08 13:50:48 +08:00
zhangpeng ac5d8b47ca
chore: modify the error message when registering a Host user (#1804)
* Modify the error message

* modify the error message
2023-06-07 12:12:23 +08:00
boojack 11a385cda6
chore: update upgrade version view (#1791) 2023-06-03 14:32:04 +08:00
Athurg Gooth 845297ec03
refactor: change all Robot to Bot (#1767)
* Change all `Robot` to `Bot`

* Change all `r` of `Bot` to `b`

* Change `Robot` to `bot` in comments

* Fix typo

---------

Co-authored-by: Athurg Feng <athurg@gooth.org>
2023-05-29 19:49:05 +08:00
Athurg Gooth ce64894abe
feat: add telegram proxy support (#1764)
* Add support for reverse proxy of telegram API

* Add Telegram API proxy hint

---------

Co-authored-by: Athurg Feng <athurg@gooth.org>
2023-05-29 13:29:21 +08:00
boojack e0e59c5831
feat: display memo with updated ts (#1760) 2023-05-28 01:50:09 +08:00
Athurg Gooth 8628d1e4b2
feat: add Telegram bot config UI (#1747)
* Add retry wait for telegram.GetUpdates

* Add support to set telegram robot token from UI

* Change validator of UserSettingTelegramUserID

* Add support to set telegram user id from UI

* Fix typescript check

* Add validator for SystemSettingTelegramRobotTokenName

* Optimize error notice while config telegram params

* Change for review

* Fix telegram user id could not be empty

* Fix telegram robot could not be empty

* Fix for eslint (again)

* Update web/src/components/Settings/SystemSection.tsx

---------

Co-authored-by: Athurg Feng <athurg@gooth.org>
Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-05-26 19:16:51 +08:00
Athurg Gooth 4ea5426e18
feat: add support for content search (#1728)
* Change MemoFind.ContentSearch to slice

* Add support for content search

* Change for go-simple sugguest

---------

Co-authored-by: Athurg Feng <athurg@gooth.org>
2023-05-26 18:51:18 +08:00
Athurg Gooth 1282fe732e
feat: implement telegram bot plugin (#1740) 2023-05-26 09:43:51 +08:00
boojack de8014dfe8
feat: resource store cache (#1742) 2023-05-26 00:38:27 +08:00