Commit graph

46 commits

Author SHA1 Message Date
Steven
b7215f46a6 refactor(web): use Radix Checkbox and remove memoTypeStats
- Replace native input with Radix UI Checkbox in TaskListItem for better accessibility and consistent styling
- Remove memoTypeStats tracking and display (link count, todo count, code count)
- Remove StatCard component and related type definitions
- Simplify statistics to only track activity calendar data and tags

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 08:36:15 +08:00
Steven
4c1d1c70d1 refactor: rename workspace to instance throughout codebase
Remove work-related terminology by renaming "workspace" to "instance"
across the entire application. This change better reflects that Memos
is a self-hosted tool suitable for personal and non-work use cases.

Breaking Changes:
- API endpoints: /api/v1/workspace/* → /api/v1/instance/*
- gRPC service: WorkspaceService → InstanceService
- Proto types: WorkspaceSetting → InstanceSetting
- Frontend translation keys: workspace-section → instance-section

Backend Changes:
- Renamed proto definitions and regenerated code
- Updated all store layer methods and database drivers
- Renamed service implementations and API handlers
- Updated cache from workspaceSettingCache to instanceSettingCache

Frontend Changes:
- Renamed service client: workspaceServiceClient → instanceServiceClient
- Updated all React components and state management
- Refactored stores: workspace.ts → instance.ts
- Updated all 32 locale translation files

All tests pass and both backend and frontend build successfully.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 23:35:35 +08:00
Steven
1d7efb1580 refactor(web): unify memo stats/filters with context-aware MainLayout
Create unified architecture for memo statistics, filters, and sorting
across all pages (Home, Explore, Archived, Profile) with proper
visibility filtering and consistent data flow.

Key changes:
- Rename HomeLayout → MainLayout to reflect broader usage
- Create useFilteredMemoStats hook for unified stats computation
- Create useMemoFilters/useMemoSorting hooks to eliminate duplication
- Refactor all pages to use unified hooks (~147 lines removed)
- Move Explore route under MainLayout (was sibling before)
- Fix masonry column calculation threshold (1024px → 688px+)

Architecture improvements:
- MainLayout computes filter/stats per route context
- Stats/tags based on same filter as memo list (consistency)
- Proper visibility filtering (PUBLIC/PROTECTED) on Explore
- MemoExplorer/StatisticsView accept stats as required props
- Eliminated optional fallbacks and redundant data fetching

Benefits:
- Single source of truth for stats computation
- Stats remain static (don't change with user filters)
- Reduced code duplication across 4 pages
- Better maintainability and type safety
- Proper security (no private memo leakage on Explore)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 08:46:52 +08:00
Johnny
f907619752 chore: move frontend store 2025-07-07 22:44:08 +08:00
Johnny
240d89fbca feat: migrate dialogs 2025-07-06 22:01:55 +08:00
Johnny
673026ffa1 chore: update statistics view 2025-05-31 09:43:24 +08:00
Johnny
5a2f18da69 refactor(frontend): retire redux 2025-02-09 11:43:55 +08:00
Chris Curry
d81174ad7c
feat: optimize filters sync (#4260)
* refactor: add bi-directional filters sync between filterStore and searchParams

* fix: tag redirection from memos detail page, https://github.com/usememos/memos/issues/4232
2025-01-04 23:42:49 +08:00
Steven
cd38ec93ed feat: implement memo filters 2024-07-26 00:46:48 +08:00
Steven
c313596144 feat: update memo editor 2024-07-22 09:57:40 +08:00
Martin MacDonald
aec5927d31
feat: add hook for generating different date times (#3524)
* Added hook for generating different date times

* Fixed up logic to destructure the datetime params

---------

Co-authored-by: Martin MacDonald <martinmacdonald@Martins-MacBook-Pro.local>
2024-06-05 19:52:07 +08:00
Steven
8c0bee3840 chore: tweak refresh button 2024-06-01 23:27:35 +08:00
Steven
f0e5a72271 feat: update search memo filter 2024-05-27 23:25:25 +08:00
Steven
86db6d0254 chore: tweak user api definition 2024-03-18 12:56:52 +08:00
Steven
d7889d9903 chore: tweak url filters 2024-01-26 08:39:53 +08:00
Steven
6fac116d8c chore: update user store 2023-12-26 23:05:33 +08:00
Steven
8e325f9986 chore: return username in user response 2023-12-23 19:23:39 +08:00
Steven
df5aeb6d88 chore: remove v1 prefix in store name 2023-12-23 08:48:11 +08:00
Steven
e83d483454 refactor(frontend): use auth service 2023-12-01 09:15:02 +08:00
Steven
0ea0645258 chore: add use reponsive width 2023-11-10 11:22:32 +08:00
Steven
d4e54f343d feat: update memo detail page 2023-09-23 20:14:07 +08:00
Steven
bff41a8957 fix: invalid username checks 2023-09-18 22:34:31 +08:00
Steven
04595a5fb1 chore: update resource icons 2023-09-13 09:12:51 +08:00
Steven
3ad0832516 chore: use user v2 api in frontend 2023-09-10 22:03:12 +08:00
boojack
b9b795bf0e
chore: add react use (#2157)
* chore: add react use

* chore: update
2023-08-21 02:35:53 +08:00
boojack
d114b630d2
feat: add prettier sort import plugin (#2058) 2023-07-31 22:26:45 +08:00
João Nuno Mota
3314fe8b0e
fix: failed eslint checks (#1616) 2023-05-01 08:38:35 +08:00
CorrectRoadH
f7a1680f72
fix: only delete last file when select multiple files #1576 (#1578)
* fix the bug can't delete multiple files #1576

* using useEvent instead of useRef

* delete unused code

* delete unused code

* change hook file name

* refactor the useEvent

* delete unnecessary export

* fix import

* Apply suggestions from code review

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-04-28 16:17:08 +00:00
boojack
fab3dac70a
chore: remove useListStyle hook (#1434) 2023-04-01 16:38:39 +08:00
boojack
89ab57d738
refactor: update import prefix with alias (#1433) 2023-04-01 16:03:14 +08:00
CorrectRoadH
7d89fcc892
feat: add list style for resource dashboard (#1389)
* stash: file upload

* feat: add style button

* feat: add style of list

* feat: add checkbox for list

* feat: support file upload by drag

* feat: beautify the ui

* feat: support file upload

* stash

* fix: the resource is incorrectly when upload multiple files

* feat: beautify the ui

* chore: reduce unused line

* stash

* chore: deleted unused line

* chore: deleted unused line

* chore

* chore: change the function declare

* feat: support to prompt file is too large

* feat:drop prompt to cover all element

* fix: eslint

* fix: the name of i18n

* chore: refactor the import deps

* feat: beautify the ui

* feat: support the style of button

* feat: beautify the switch ui

* chore: refactor the component

* chore: refactor the resource item dropdown

* feat: use memo to reduce unused computing in drop

* feat: use memo to reduce the calc of resource list

* chore:change name

* Update web/src/locales/en.json

Co-authored-by: boojack <stevenlgtm@gmail.com>

* chore: the import of  deps

* fix: the window size of fecting data

* feat: support to save the state of style

* remove pnpm-lock

* merge main

* chore: simpify the statement

* fix: delete conflict marker

* feat: add i18n for select

* feat:support dark mode

* eslint

* feat: delete the storage of resource style

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-03-26 19:32:53 +08:00
boojack
10430a66c3
chore: debounce search text input (#943)
* chore: debounce search text input

* chore: update
2023-01-13 22:33:52 +08:00
Zeng1998
a41745c9ae
feat: editor enhancement for order list (#763) 2022-12-18 11:02:42 +08:00
boojack
14f9f29348
chore: update user setting appearance (#654) 2022-12-02 20:00:34 +08:00
boojack
7c6d7226f5
feat: update appearance selector (#645) 2022-12-01 20:57:19 +08:00
Stephen Zhou
eaebc6dcef
fix: apperance can not auto switch (#644) 2022-12-01 19:39:58 +08:00
Zeng1998
54271c1598
chore: fix some typos (#587) 2022-11-26 06:23:29 +00:00
Stephen Zhou
90c85103c3
feat: dark mode support for auth page (#569)
* feat: dark mode support for auth page

* chore: update
2022-11-26 11:20:22 +08:00
Stephen Zhou
3775d5c9c2
feat: folding options (#459)
* feat: folding options

* chore: update

* chore: update

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-11-14 22:06:05 +08:00
Steven
366afdd1e4 feat: use i18next 2022-09-19 22:27:50 +08:00
Steven
660908e436 chore: add react-router 2022-09-16 22:48:41 +08:00
boojack
646a41e931 chore: add i18n based with useContext 2022-08-07 22:48:22 +08:00
boojack
cc2e5ab6fd chore: update router 2022-05-28 07:38:06 +08:00
email
eae858e20b fix: type error 2022-04-15 09:27:38 +08:00
steven
73812cd58d feat: add eslint to frontend 2021-12-13 17:23:35 +08:00
LeeShuang
06bffd0ba5 migrate frontend 2021-12-08 23:43:52 +08:00