Commit Graph

215 Commits

Author SHA1 Message Date
boojack c2bab22460 chore(editor): add a Markdown mode corner label 2026-10-26 20:55:48 +08:00
johnnyjoygh 6387991fdd chore(web): update focus mode
- Bump @usememos/editor to 26.10.27: Markdown mode now highlights syntax
  inside table cells, so a URL anchor in a table-cell link, such as
  [Kappa](/memos/abc#ikebukuro), reads as part of the URL instead of a
  tag.
  Refs usememos/memos#6480 (item 13).
- Focus mode: a narrower sheet (max-w-3xl) with larger text through
  MEMO_FOCUS_EDITOR_THEME; its header shows only the memo's time ("Now"
  before it has one) and the exit button; toggling it runs a view
  transition that grows the frame out of its place on the page and back,
  instant under reduced motion or without view transitions.
- Markdown mode's + menu item uses Lucide's CodeXml instead of the
  pilcrow.
2026-10-26 08:40:24 +08:00
Johnny 0bfa31e89e feat(web): editor 26.10.26 with Markdown mode, checklist chip and plain tags in source mode (#6498) 2026-10-24 19:48:46 +08:00
Johnny 28719a925f fix(web): keep blurred memo content out of the detail sidebar (#6494) 2026-10-23 07:43:31 +08:00
tongjin 901bf9f4cc feat(markdown): allow Bilibili player iframes (#6490)
Co-authored-by: johnnyjoygh <johnnyjoygg@gmail.com>
2026-10-23 07:32:36 +08:00
Johnny 9576bd53ac feat: filter memos by attachments and images (#6492) 2026-10-22 18:58:45 +08:00
johnnyjoygh 24cce5ca27 perf(editor): replace highlight.js with Highlights tokens 2026-10-21 21:46:11 +08:00
johnnyjoygh c640884067 chore(ui): refine shared controls and floating surfaces
Use neutral, theme-aware surfaces and consistent density for hints,
menus, dialogs, and form controls. Restore visible field focus and use
Base UI tabs for keyboard navigation and RTL support.
2026-10-21 21:32:32 +08:00
johnnyjoygh ccc1f82393 refactor: keep link preview and double-click edit as device preferences
Link preview was a Timeline view option, so it reset to on everywhere else.
Double-click to edit was an instance setting an admin chose for everyone.
Both are presentation choices for one browser, so they now live in a single
localStorage-backed store shared by every memo view and are toggled from
Settings > Preferences under "This device".

MemoRelatedSetting.enable_double_click_edit is removed from the API and
storage protos and reactions becomes field 1; stored rows that still carry
the old key load unchanged. The admin Memo page keeps only reactions.
2026-10-21 07:34:33 +08:00
boojack 48259e6022 docs: sync README branding from .github 2026-10-20 21:15:48 +08:00
boojack 07538326a9 chore: apply the brand copy and reshape the README
Take the tagline, one-liner, and short description from the rewritten
BRAND.md in usememos/.github and use the serif lockup and the light and
dark timeline previews published there. The README now leads with what a
visitor gets, keeps the quick start to one command plus the URL to open,
drops badges that repeat the sidebar, and carries the star-history
badges
instead of the chart. The local Georgia wordmark is removed.

In the app, the about page, manifest, and English locales carry the same
copy. The identity label uses the theme's serif stack at the wordmark's
weight and spacing rather than a vendored face. The about tagline sizes
to its column so neither sentence breaks mid-line, and the version chip
is the single place for build identity: a release links to its tag and a
development build links to its commit, so the Build commit row and its
locale label are gone.
2026-10-18 20:53:48 +08:00
boojack 3bea6df030 refactor(web): one memo component, MemoEditor, with view and edit modes (#6481) 2026-10-18 12:11:55 +08:00
johnnyjoygh 1a51572406 feat(web): add source mode to the memo composer
The composer can show the whole memo as Markdown text and edit it as
plain
text, using the editor's new source mode.

- Turn it on from the + menu ("Source Mode"); a small "Source" tag in
  the
  editor's corner names the mode and switches back to rich text. The
  first
  line leaves room for the tag.
- The choice is remembered per device and applies to every composer.
- Tags and tasks are read from the Markdown text in source mode, so tag
  suggestions still skip tags the memo already has; the checklist chip
  is
  hidden because it cannot apply.
- A saved caret remembers its mode and is not restored in the other one.
- DropdownMenuCheckboxItem gains `indicator="end"` for a trailing check,
  replacing a className override in the sidebar Tags menu.
2026-10-17 00:21:56 +08:00
johnnyjoygh b736c0202c chore(web): bump @usememos/editor to 26.10.16
- Tag autocomplete follows the backend tag grammar: `hello#work` and `C#`
  now match while typing, so the test expectations move with it.
- A titled link (`[url](url "title")`) is no longer treated as a bare URL
  for link-preview cards, since the card would drop its title.
2026-10-17 00:20:58 +08:00
johnnyjoygh e051129f1d chore(brand): adopt SVG bird logo across app and README
Share logo and identity typography across navigation, auth, and About
while preserving custom branding.

Use a transparent blue favicon and Celadon installation icons with
refreshed cache versions.
2026-10-16 09:23:19 +08:00
johnnyjoygh af07ca804c chore(web): bump @usememos/editor to 26.10.15
Quotes and callouts can hold lists, so a quote with a bullet list
renders
instead of showing its Markdown source, and callouts take the Linear and
Notion style: a tinted box with the type's icon.
2026-10-16 07:38:58 +08:00
Johnny 42ae244767 chore(web): bump @usememos/editor to 26.10.14 (#6479) 2026-10-15 20:49:28 +08:00
Johnny e0dbf5eeb1 feat(usage): store usage limits as an ordered list of entries (#6472) 2026-10-15 08:01:32 +08:00
Johnny ca4d2a8125 fix(web): keep sidebar menus anchored while scrolling (#6474) 2026-10-15 07:44:31 +08:00
Johnny f9d277f6bd chore: switch release versions to YY.MM.N (#6469) 2026-10-14 19:26:59 +08:00
johnnyjoygh fa90981671 fix(web): load managed attachment images on instances served over http 2026-10-14 08:36:21 +08:00
Johnny 5cfe9c09dd feat(web): replace CodeMirror and react-markdown with @usememos/editor (#6466) 2026-10-14 07:34:48 +08:00
johnnyjoygh 7bdf6f275b chore(auth): show SSO loading state inside the provider button 2026-10-12 23:02:26 +08:00
johnnyjoygh 9e3a164dff feat(usage): add default limits and explicit rule targets
Move memo content size into usage limits, with 8 KiB content and 32 MiB
upload defaults when settings are absent. Represent stored rule targets
with all_users or a positive user_id, and use that same schema for
deployment configuration.

Rename the memo count metric, remove reserved proto declarations, and
renumber fields and enums for the unreleased schema. Synchronize
enforcement, settings UI, generated clients, and tests.
2026-10-12 22:35:39 +08:00
johnnyjoygh a80fe19ee1 chore: fix assets cache 2026-10-12 09:22:58 +08:00
Johnny a668bb8f7e fix(web): stamp new memos with the time of saving under a date filter (#6457) 2026-10-11 22:51:15 +08:00
boojack 7cb288864b refactor: move the upload size limit to usage limits
The instance-wide maximum upload size in the storage setting and the
per-user UPLOAD_BYTES usage limit were two caps on the same thing, with
a
rule that the per-user value could only lower the instance value. The
storage setting field is removed, and the all-users UPLOAD_BYTES usage
limit is the only per-file cap. A user's own limit replaces the default
in either direction, and no limit means any file size.

- Remove upload_size_limit_mb from the API and store storage settings,
  the 32 MiB store default, and the deployment config check.
- Drop the FILE_TOO_LARGE error; every refusal is QUOTA_EXCEEDED with
  metric UPLOAD_BYTES.
- Split usagelimit.CheckFileSize out of CheckUpload and call it from
  memo import, so import is no longer a bypass.
- Remove the Maximum upload size field from the Storage section and the
  instance-limit warning from the usage limits dialog.

The old value is not carried over. Instances that relied on the default
accept any file size until an admin sets a limit.
2026-10-11 22:08:13 +08:00
boojack 1a5886d7c1 feat: add per-user usage limits (#6456) 2026-10-11 21:25:40 +08:00
Johnny d775160283 fix: harden instance admin, health, and mail header handling (#6454) 2026-10-11 10:52:03 +08:00
Kunpeng Xie f9c895c51b fix(web): restore list ordering after editing a new memo (#6451) 2026-10-11 09:17:46 +08:00
Johnny d5df8915f7 feat(auth): automatically start SSO when it is the only option (#6450) 2026-10-10 08:37:50 +08:00
Wally 4eb6fb77e8 feat(web): pinch to zoom and swipe between images in the preview dialog (#6448) 2026-10-09 08:40:12 +08:00
Wally a2ccca7a92 fix(web): pan zoomed images in the preview dialog (#6414) 2026-10-08 22:51:37 +08:00
ABird af38e75e2d refactor(api)!: drop the v1 version marker (#6447) 2026-10-08 21:49:37 +08:00
boojack b1fa9aefcc chore: tweak action orders in memo action menu 2026-10-07 07:38:44 +08:00
boojack d2560e0877 chore: tweak memo actions 2026-10-07 07:22:42 +08:00
boojack cfb16a8ced chore: polish markdown rendering rhythm and heading scale
- Drop the top margin of the first block so a leading heading sits flush
  with the memo header; headings also reset when they open a nested
  block.
- Calmer heading scale (24/20/18px, semibold, no h1/h2 rules) shared
  with
  the editor's heading lines via headingTypeClass, so edit and view
  match.
- Headings get more space above than below to bind to their content.
- Unify block spacing (mb-2, no top margin) across code, table, mermaid;
  give hr a real section break (my-4).
- Trim trailing margins inside list items so nested lists don't add
  gaps;
  mute list markers.
- Inline code sizes relative to its context; blockquotes drop italics
  (poor CJK obliques) for a quieter neutral border; images get rounded
  corners matching attachments.
2026-10-07 07:19:00 +08:00
boojack 698460dfeb chore: apply BRAND.md copy to the app (#6417) 2026-10-02 11:34:58 +08:00
lemoana 1724f0bd26 fix: preserve whitespace outside Markdown marks (#6404) 2026-10-02 09:36:43 +08:00
johnnyjoygh a80576a6de chore: polish space selector from the visibility menu
The composer's visibility control becomes AudienceMenu, a dropdown that
replaces the popover with a nested Space select, and it replaces the
Move to Space dialog.

- Visibility options come first, as two-line rows (label, then a
  description that wraps for long translations) in a 224px menu.
- Space is an optional row below them that never names the empty state:
  "Add to space" until one is chosen, then the Space itself. The
  selected Space in the submenu toggles back off (a check at rest, an ✕
  on hover, focus, or touch). A Space the author has left stays listed
  so it can be removed.
- Editing a top-level memo the user can manage now offers the Space row;
  comments never do, and a new memo composed inside a Space stays fixed
  to it. A Space change is saved with the edit, sending space and
  visibility together, and shows "Memo moved".
- The Move to Space dialog and its More submenu entry are removed.
- Copy: "Add to space", "Remove from {{space}}", the Space audience is
  now "Members · Everyone in {{space}}", shorter English descriptions,
  and short Russian visibility labels.

The sidebar scope menu gets the same row grammar: its Browse/Spaces half
and account half used different insets, icon sizes, row heights, and
text sizes. Every row now has 4px section padding, 28px height, 13px
text, and a 20px leading slot with a 14px glyph, so icons, the avatar,
and Space marks share a column and all text starts at the same x.
Section labels reuse SidebarSectionHeader, the Spaces "+" lines up with
the row chevrons, and the Inbox chip uses the 11px step.
2026-09-28 20:20:21 +08:00
johnnyjoygh cb42e326ba chore: tweak about page 2026-09-27 22:58:52 +08:00
johnnyjoygh 594ccd02c5 feat(editor): add Space selection to memo visibility setting
Close #6374
2026-09-27 20:58:27 +08:00
johnnyjoygh 65d2278a2e feat(web): make calendar and map readable with several authors
Explore and other creator-less scopes mix authors, but the calendar and
map were built for one person's memos.

Calendar:
- Excerpts lead with their author's avatar when no creator is selected.
- From xl the grid always makes room for the day panel instead of being
  covered; the panel narrows (to its 320px minimum) so columns keep
  preview width, and cells between 64 and 100px use a slim preview.
- Cells with no room for a preview (phones) carry one mark under the
  date: the first photo, else the day's authors in a mixed scope, else a
  glyph of written lines.

Map:
- Pins follow the calendar's mark order: the memo's first photo, else
  its author's avatar in a mixed scope, else the dot. Hover text names
  the author, and updates once authors resolve.
- A place label is its author's words: the panel title uses one only
  when it speaks for every selected memo, and "Write here" never copies
  another author's label into a new memo.
- Guests are not asked to add a location, and the tile error no longer
  says "your memos".

Shared day/place panel: pin marks only in a single creator's scope,
creators resolved in one batch, and an empty day says so.
2026-09-27 10:01:07 +08:00
johnnyjoygh 0db0025d32 fix(web): show the Space mark beside the creator in the sidebar switcher
With a creator and a Space both selected, the switcher trigger showed
only
the creator avatar, hiding which Space was active. It now shows the
creator
avatar, a hairline slash, and the Space mark with its title; the creator
name moves to the tooltip so the Space title keeps the width.

User avatars are now always round, separating people from square Space
marks, and the instance logo keeps its square shape. In the trigger the
avatar draws 22px inside the Space mark's 24px slot so the solid circle
does not outweigh the pale tile.

Closes #6381
2026-09-27 08:57:37 +08:00
beemines 68db65243a feat(editor): transcribe existing audio attachments (#6375)
Co-authored-by: Bee mines <Beemines82@gmail.com>
Co-authored-by: boojack <stevenlgtm@gmail.com>
2026-09-26 19:04:58 +08:00
boojack 88f13675d8 chore: tweak user default avatar display 2026-09-26 18:49:05 +08:00
boojack 10919ab498 chore(views): remove built-in Tasks and improve empty states 2026-09-26 18:29:05 +08:00
boojack 153625210b chore: open calendar and map to guests, simplify navigation
Calendar and Map are reading views like Timeline, so signed-out visitors
can now open them and see the memos readable to them. Their Space
variants still require sign-in, and composing stays signed-in only.

Navigation:
- Guests get Timeline, Calendar, Map; Attachments stays signed-in only.
  The About pill is gone; About lives in the scope menu and the common
  sidebar for everyone.
- One NavPill renders every nav control, from a single destination list.
- A memo list without a creator is Explore, so Timeline sends guests
  there directly instead of through the Home redirect.

Scope menu:
- One UserMenu for both cases: preferences, then account pages when
  signed in. Guests sign in from the sidebar footer only.
- Guests no longer see a Browse control whose only option is Explore.
- Theme and Language are submenus instead of dialogs; a choice applies
  at once, saved to the account or kept locally for guests.
- The system theme listener reads the latest preference, so local guest
  choices follow OS changes correctly.
2026-09-26 17:09:15 +08:00
boojack c5e7d65c12 chore: make individual memos easier to open
Timestamp: the card timestamp was a button that navigated in script, so
it
had no URL preview and could not be opened in a new tab. It is now a
real
link that keeps the origin page and underlines on hover. On the memo's
own
page it renders as plain text, since the link would point at itself.

Action menu: ordered by how often each action is used, showing only what
applies:

- Owner: Open, Edit, Pin | Archive, one task action, Copy > (link,
  content),
  then More > (Move, Delete) when the memo can move, otherwise Delete.
- Archived: Restore | Delete.
- Comment: Edit | task action, Copy | Delete.
- Viewer: Open, Copy.

Open is a real link (new DropdownMenuLinkItem kit wrapper), hidden on
the
memo's own page. Check all / Uncheck all collapse into one item chosen
by
whether tasks are still open. Move only appears when there is a Space to
move to or leave, and a comment's copied link lands on the comment
inside
its parent memo.

Detail sidebar: remove the back-to-origin row. It duplicated browser
back
and the navigation above it, pushed a new history entry instead of going
back, sat inside the mobile drawer, and labelled most origins as Home.
Returning to the origin after archive or delete is unchanged.

Refs #6359
2026-09-26 13:05:58 +08:00
boojack 26be2a9663 feat(navigation): unify creator and space browsing scopes (#6378) 2026-09-26 11:36:31 +08:00