Compare commits

...

4249 Commits

Author SHA1 Message Date
johnnyjoygh 5c5d866a5b fix(auth): provision SSO users atomically 2026-07-25 01:12:15 +08:00
Chad Harp 03e34bd0da fix(mcp): accept canonical resource names in path params and keep error results schema-valid (#6108) 2026-07-24 00:15:13 +08:00
boojack 41dd3d1740 chore(main): release 0.30.0-rc.2 (#6096) 2026-07-20 23:35:59 +08:00
boojack cc20327b8a chore(access-token): default expiration to never 2026-07-20 20:03:05 +08:00
boojack b7d5d09f8a fix(api): update UID compatibility
Use the original UID format consistently across API, username, and store validation so UUID-based callers continue to work. Regenerate API documentation and add regression coverage for UUID memo IDs.
2026-07-20 19:41:55 +08:00
boojack d149a96566 chore(release): enable prerelease 2026-07-20 08:54:41 +08:00
johnnyjoygh 249b331596 perf(web): reduce memo feed startup and rendering work 2026-07-20 00:15:26 +08:00
johnnyjoygh 7c78320999 chore: cleanup docs 2026-07-19 23:51:11 +08:00
johnnyjoygh 06ecef33bc chore(web): update about page and access token settings 2026-07-19 22:23:51 +08:00
johnnyjoygh f94697496b docs: polish README and add web clipper 2026-07-18 23:43:21 +08:00
johnnyjoygh 6c1055f483 perf(web): deduplicate explore data requests
Share canonical user and memo query caches across creator, reaction, comment, mention, and relation lookups. Reuse list data for relation snippets and cover overlapping queries with regression tests.
2026-07-18 23:25:59 +08:00
johnnyjoygh 88c6ee8ebc perf(web): reduce demo bandwidth usage
- Cache fingerprinted frontend assets for one month.
- Load media, rich renderers, dialogs, and editors only when needed.
- Simplify seeded demo content and cover deferred-loading behavior.
2026-07-18 22:06:14 +08:00
johnnyjoygh 0bfeb91d50 fix(api): show clean RPC error messages 2026-07-18 11:20:15 +08:00
johnnyjoygh 84776cc106 fix(api): align resource IDs with AIP conventions
Validate new user-provided IDs using the AIP-122 format while retaining legacy UID compatibility. Correct resource annotations and canonical names returned by user stats.
2026-07-18 11:12:28 +08:00
johnnyjoygh 715306ea66 chore: enrich access tokens setting page
Settings drops the all-in-one bordered card for a de-carded layout in
the property-rail design language: a sticky table-of-contents rail at
md+ (Settings wordmark, uppercase group labels, quiet anchor rows) and
a horizontally swipeable chip strip below md, replacing the mobile
section dropdown. Nav items are real anchors with aria-current, and
switching sections scrolls back to the top.

Access Tokens becomes a first-class section with an explainer panel:
what a PAT is and a copyable curl example (real instance origin,
memos_pat_ prefix) beside token-safety guidelines in a two-column band,
with a Learn more docs link and the tokens table beneath. Successful
PAT authentication now records the token's lastUsedAt asynchronously
inside resolveBearer, with a clone-before-mutate cache guard and
monotonic writes in the store, surfaced in a Last used column.

Also localizes the create dialog's 90 Days label, lets the My Account
row wrap instead of clipping on narrow screens, and drops the dead
select-section key from all locales.
2026-07-18 10:41:53 +08:00
Dedy F. Setyawan 2d01420c23 fix(web): align radio button group indicator (#6097)
Signed-off-by: Dedy F. Setyawan <dedyfajars@gmail.com>
2026-07-18 01:47:45 +08:00
boojack 469c995cc0 chore: dump demo data
Login on the demo instance is SSO-only, so visitors always arrive as a
fresh user and consume seed content through Explore. Rebuild the seed
around that funnel: four personas (steven the maintainer, alice, ben,
zoe), a public feed mixing short captures with long-form anchors, and
protected memos that visibly appear after sign-in to teach the
visibility model.

Every headline feature is now demonstrated: nested tags, memo
references, comments with mentions, reactions, locations, a database-
stored image attachment, and a rendering test memo covering math,
mermaid, code, tables, and task lists.
2026-07-17 00:14:01 +08:00
boojack d4b5a1695b feat(web): redesign memo detail sidebar as property rail
Rework MemoDetailSidebar into a Linear-style rail: a quiet icon action
cluster (pin, copy link, share image, share links) followed by
label/value property rows for visibility, created/edited times, author,
and location, then hairline-separated sections for tags, attachments,
relations, and the outline. Attachments and reference relations were
previously not surfaced in the sidebar at all.

- Visibility is editable in place, reusing VisibilitySelector with a
  new compact size variant that matches the 13px row grammar
- Pin toggle and visibility changes go through useUpdateMemo
- MemoOutline gains active-section tracking (scroll-spy), depth
  indentation, and tick-rail styling; drops the animated underline
  and native title tooltips
- Widen the detail rail from w-56 to w-60
2026-07-16 23:59:31 +08:00
boojack e497895bf3 feat(web): restore scroll position across navigation 2026-07-16 22:31:00 +08:00
boojack 773e56e537 fix(web): position tooltip arrows outside content
Closes #6095
2026-07-15 22:29:38 +08:00
boojack 49516395da chore(release): disable prerelease 2026-07-15 21:53:27 +08:00
boojack 57d579a2a2 chore(main): release 0.30.0-rc.1 (#6015) 2026-07-15 00:19:47 +08:00
boojack 3350abe815 chore(release): enable release candidate versioning 2026-07-14 21:56:28 +08:00
boojack df1967df91 fix(editor): restore CodeMirror default spacing
Remove the zero-padding line override that replaced CodeMirror's built-in horizontal spacing and caused the editor content regression reported in #6093.

Disable completion icons through CodeMirror configuration, preserve placeholder and dark-theme contrast, and remove redundant editor style overrides.

Fixes #6093
2026-07-14 21:35:55 +08:00
boojack 8d9849e13f chore: redesign about page as identity hero
Rebuild /about around an identity hero: instance branding with custom
profile fallbacks, a demo badge, and version/commit chips linked to the
GitHub release and commit. Dev builds show a plain version chip and hide
the unknown-commit chip.

Project links become an annotated directory (homepage, docs, API docs,
GitHub repo), followed by an MIT license note. The bird sprite gallery
moves out of the page, and the version/commit block leaves the settings
sidebar now that /about owns build info.
2026-07-14 20:54:29 +08:00
boojack 1e91cfba9d fix(auth): stabilize SSO option loading 2026-07-14 20:06:54 +08:00
boojack 9c3bd44a1b chore(web): migrate UI primitives to Base UI 2026-07-14 09:06:40 +08:00
boojack 0038295bbc feat(config): provision settings from secret files
- Load IdPs and supported instance-setting groups as runtime overlays from /etc/secrets.
- Reject API mutations of deployment-managed resources and serialize authentication safety checks across database drivers.
- Preserve upgrade compatibility, demo SSO policy, stable IdP ordering, and driver-specific transaction retries.
2026-07-13 22:34:24 +08:00
boojack 564da949cb chore(auth): redesign sign-in and sign-up pages with panel layout
Rebuild the auth pages around a shared AuthPageLayout card with a
three-tier guidance hierarchy: the form (or provider buttons) on top,
a centered switch sentence below it, and a quiet explore band anchored
to the card foot on public instances.

- add AuthPageLayout (brand row, chip, empty state, link prompt,
  explore band gated by instance URL with hideExplore opt-out)
- extract CredentialFields shared by sign-in and sign-up forms
- extract IdentityProviderButtons; fetch the provider list via a
  cached TanStack Query hook with an enabled flag
- cover every instance config: SSO-only, password-only, registrations
  closed, private instance, nothing enabled, first-run setup, admin
- promote /auth/signup, /auth/admin, /auth/callback to ROUTES and add
  appendSearchParams for param-preserving auth links
- move the explore link out of AuthFooter (selectors only now)
- refresh en and zh-Hans auth strings; drop dead keys
2026-07-13 19:40:31 +08:00
boojack a9fcd459f6 chore(demo): harden SSO-only demo experience 2026-07-13 00:31:15 +08:00
boojack ad6d009767 feat(auth): bootstrap identity providers from secret files
- scan /etc/secrets for memos-idp-*.json after migrations and demo seeding
- reconcile protobuf JSON identity providers by stable UID
- validate all discovered providers before applying updates
2026-07-13 00:08:15 +08:00
boojack 6c17e87cf6 fix(auth): support OAuth client auth auto-detection
- support providers requiring client_secret_basic while preserving POST fallback
- stop logging user-info claims and mapped profile data
- cover both client authentication styles with PKCE
2026-07-12 23:34:33 +08:00
boojack 4bc3928029 fix(user): implement ListUsers pagination
Rework ListUsers to match the ListMemos pagination contract: opaque
PageToken, normalizePageSize, DB-level limit+1 look-ahead, and a
next_page_token. Adds Offset to store.FindUser with an OFFSET clause in
all three dialects, and an `id DESC` ORDER BY tiebreaker so offset pages
stay stable when created_ts ties.

Also align pagination across list endpoints:
- Bump DefaultPageSize 10 -> 50 to match the documented default; use
  normalizePageSize in ListAttachments.
- Remove the never-implemented total_size field from all six list
  responses (ListUsers, ListAttachments, ListMemoComments,
  ListMemoReactions, ListUserSettings, ListPersonalAccessTokens) and
  regenerate.
- useListUsers now pages through next_page_token so the admin members
  view still loads every user past the default page size.
2026-07-12 20:51:04 +08:00
Yuhang Wang 375e2bc60e fix(i18n): complete missing Simplified Chinese translations (#6084) 2026-07-12 19:55:37 +08:00
boojack 3fe145083f chore: reorganize backend and frontend modules
- remove the unused internal cron package
- split API service implementations by responsibility
- clarify frontend shared-module ownership
2026-07-12 17:59:12 +08:00
TowyTowy c9b356b46a fix(memo): populate parent relation in comment webhook payload (#6083)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-12 17:23:58 +08:00
boojack 9203a22ed1 chore(editor): update focus and save workflows
- preserve grid layout while the editor is in focus mode\n- extract save orchestration into a dedicated lifecycle hook\n- simplify code formatting controls in the toolbar
2026-07-12 17:23:36 +08:00
boojack 42ad4105c1 fix(editor): align CodeMirror markdown event handling
- intercept file paste and drop before CodeMirror inserts file text
- reconfigure localized placeholders without remounting the editor
- add regression coverage and document the CodeMirror review
2026-07-10 18:59:33 +08:00
boojack a9ac008a68 fix(editor): let CodeMirror own caret layout
Keep caret and placeholder behavior on CodeMirror's standard extensions, and move height and scrolling to the editor elements so empty space stays interactive across browsers.\n\n- disable unused multi-cursor selection\n- upgrade CodeMirror state and view patches
2026-07-10 08:51:16 +08:00
boojack 0150040056 chore(web): upgrade typescript to 7.0
TS 7.0 is the native compiler and stays CLI-compatible, so the tsc-based lint is unchanged. Verified pnpm lint and pnpm build pass.
2026-07-09 21:38:32 +08:00
boojack 730c24592f fix(web): stabilize multi-column memo layout 2026-07-09 20:56:35 +08:00
boojack 5329e60407 fix(web): fill the editor host so the caret shows in empty space
The CodeMirror editor only grew to its content height, so in focus mode
(where the host is tall) the empty area below the text was bare host
markup outside the editor. Clicking there could not focus the editor or
place the caret, so it appeared to vanish in "empty" space. Give
.cm-editor height:100% — it collapses to auto in normal (auto-height)
mode and only fills when the host has a definite height.

Fixes #6076
2026-07-08 23:37:47 +08:00
boojack 83552c35be fix(ci): stamp canary image with semantic version
The canary workflow passed VERSION=canary as a build-arg, so the demo
instance reported "canary" as its version. Derive the version from the
latest git tag instead (e.g. 0.29.1) so the app reports a real semver.
The `canary` image tag is unchanged.
2026-07-08 21:58:00 +08:00
boojack a72ae804c0 fix(web): keep the multi-column feed balanced
Newly-created memos were pinned to column one and never released, and cards
that grew after placement (late images/comments) never rebalanced, so the
columns drifted badly out of balance.

- Leave the priority (just-created) memo's column assignment transient, so a
  superseded memo rebalances instead of piling up in column one forever.
- Self-heal: re-pack from a clean slate when a late height change leaves the
  columns lopsided, adopting it only when it meaningfully shrinks the spread.
- Animate only the adopted rebalance; resizes, column-count changes, growth
  reflows and first paint stay instant so widths and positions stay in lockstep.
2026-07-08 21:51:02 +08:00
boojack dc41480ece chore(web): replace memo list skeleton with a simple delayed spinner
The card-shaped skeleton never matched the loaded memos (heights vary
with markdown, images, and tags), making the swap feel jarring. Use the
same centered spinner the grid layout already used, still gated behind
the 250ms delay so fast loads render no indicator at all.

Ref https://github.com/orgs/usememos/discussions/6066
2026-07-07 23:49:43 +08:00
boojack 41ff22b0cc feat(filter): fold now.getXxx() accessors for dynamic date-part filters
Timestamp accessors previously compiled only on schema fields, so a saved
shortcut like created_ts.getMonth() == now.getMonth() && created_ts.getDate()
== now.getDate() ("on this day") failed with unknown identifier "now" and the
only workaround froze literal month/day values into the filter.

Accessors on `now` now fold to literal date parts of the frozen per-compile
clock (UTC, CEL bases: 0-based month/day-of-week), so such filters re-resolve
on every query. Comparisons are also normalized for the renderer: a folded
literal on the left swaps operands with the operator mirrored, and
literal-vs-literal comparisons fold to a constant condition.
2026-07-07 22:53:21 +08:00
johnnyjoygh e3c231fcac feat(web): add code block and strikethrough to formatting toolbar
Reorganize the toolbar into inline marks (bold, italic, strikethrough,
inline code) and blocks (lists, fenced code block), with the Type glyph
for the paragraph/heading picker. Marks derive from the shared MARKS
table; code block toggling reuses the same selection-probe lookup so
toggle-off always agrees with the button's active state. A fresh empty
strikethrough pair (~~~~) parses as a tilde code fence, so empty-pair
removal and code-block detection recognize doubled mark tokens.
2026-07-07 22:08:33 +08:00
johnnyjoygh 475b04f765 chore(proto): regenerate with updated protoc plugins 2026-07-07 21:18:06 +08:00
johnnyjoygh 620db61f7c chore(web): unify compact truncation into a single ClampedSection
Compact cards previously had two truncation systems taped together: a
text-only clamp inside MemoContent (144px, no re-measure on image load,
fade tinted to the wrong surface) and a whole-tile cap in ColumnGrid
(hard clip mid-image, no affordance), later joined by a content-shape
rule choosing an owner per card — which could still stack two Show-more
buttons and silently broke footnote navigation in clamped cards.

Now there is exactly one mechanism: ClampedSection measures its content
and folds anything taller than 420px to a 360px preview with a fade and
a Show more/less toggle. MemoBody wraps the whole body in it (reactions
stay outside, never hidden); ColumnGrid is pure packing again and never
clips; MemoContent is a stateless renderer whose `compact` prop only
informs footnote-link behavior; MemoPreview uses a static CSS bound in
place of its previously inert toggle.

Deltas: text-only compact previews grow from ~6 rows to the same 360px
image cards get, and pinned memos clamp like any card (pinned means
ordering and a badge, not size).
2026-07-07 21:01:19 +08:00
weifanglab 9fae524221 refactor: use slices.Contains to simplify code (#6069)
Signed-off-by: weifanglab <weifanglab@outlook.com>
2026-07-07 09:25:38 +08:00
boojack 14a1c9a53b chore(web): icon layout switcher with radio semantics
Replace the layout Select with a lean 28px segmented control: Rows3 /
Columns2 / Columns3 / Infinity icons on a quiet muted track, only the
active option filled. Each option carries a tooltip with a label and an
honest description of the ceiling semantics ("up to N columns when the
width allows").

The control is a proper radiogroup — roving tabindex, arrow-key
movement, aria-checked — restoring the single-choice semantics the
Select used to provide. Options derive from ViewContext's canonical
value list, and one exhaustive record maps each value to its icon and
wording, so a future column option fails to compile until both exist.

The Compact mode row now stays visible in multi-column layouts, shown
as on and locked (multi-column always renders compact tiles); the
stored preference is untouched and resurfaces at a single column.
2026-07-07 09:24:48 +08:00
boojack 177d65a90e feat(web): add max-columns memo feed layout
Replace the single-column-only feed with a max-columns model: one
Columns setting (1 / 2 / 3 / ∞) where 1 is the reading list and
anything wider packs into a Google-Keep-style column grid. There is
deliberately no separate list/grid mode — the setting is a ceiling,
and widths that only fit one column fall back to the flow list.

- ColumnGrid: absolute-positioned packing that only translates cards,
  so appends and reorders never remount them; sticky column assignment
  keeps existing cards in place when new memos arrive; tiles are capped
  at 360px with a fade; columns clamp to 420px and center.
- Column one is the action column: the composer and active filters
  stack as its first tile, and a just-created memo is pinned directly
  beneath them.
- Multi-column always renders compact cards (policy centralized in
  PagedMemoList and threaded through renderer(memo, { compact })).
- Setting persists in ViewContext localStorage; the settings menu
  derives its options from the context's canonical value list.
2026-07-06 23:55:36 +08:00
boojack d1cef7a9ab feat(auth): add private instance mode derived from instance_url
Run the instance in private mode when instance_url is not configured: the API rejects anonymous requests except the auth-bootstrap set (sign-in, token refresh, instance profile/settings, SSO providers, share-link access) plus first-run user creation, and the web UI redirects anonymous visitors to /auth instead of /explore. Setting instance_url keeps the current public behavior. Access tokens and personal access tokens are never gated.

Enforcement lives in a shared Authorizer used by both the Connect interceptor and the gRPC-gateway middleware; the file server applies the same rule to public-memo attachments and avatars. Also merges the duplicated Authenticate/AuthenticateToUser token dispatch behind resolveBearer, dedups the AuthContext unauthenticated state, extracts the redirect decision into a pure shouldGatePrivateInstance helper, and prints the access mode at startup.
2026-07-05 22:48:00 +08:00
boojack 1794d0dc51 chore(editor): flatten insert menu
- Insert menu: replace the nested "More" submenu with a flat dropdown —
  insert actions plus inline Focus Mode and Formatting-toolbar toggles.
- Formatting toolbar: remove the link button and its window.prompt flow;
  the link command stays in the shared catalog for future surfaces.
2026-07-05 20:43:02 +08:00
Archit Goyal b787bfa75f feat(web): add untagged shortcut filter example (#6065) 2026-07-05 19:31:58 +08:00
boojack 3a55edd917 fix(scripts): prevent entrypoint restart loop when MEMOS_UID=0
The root-drop guard only checked `id -u = 0`, so when the target user was
also root (MEMOS_UID=0, common under rootless Docker with userns-remap)
su-exec re-execed back into root, re-entered the block, and looped forever
without ever reaching the memos binary — the container hung with no logs.

Add a MEMOS_ENTRYPOINT_SWITCHED marker (preserved across the su-exec
re-exec) so the privilege drop runs at most once, and log the resolved
UID:GID on startup so this path is never silent again.

Closes #6061
2026-07-03 22:02:53 +08:00
boojack 16b47b3be4 chore: tweak readme
Removed HTML sponsor section and updated sponsors list.

Signed-off-by: boojack <stevenlgtm@gmail.com>
2026-07-03 09:21:44 +08:00
boojack c349c1549e fix(editor): make formatting commands toggle and convert correctly
Bold (and italic/code) now remove an empty just-inserted delimiter pair instead of nesting more asterisks, and strip real marks whichever way the selection was made; clicking Link inside a link unwraps it instead of inserting [](); the three list modes convert between each other (bullet on a task line no longer leaves '[ ] ...' behind), toggle off any ordered number, respect indentation, and apply across multi-line selections; list/heading edits keep the cursor in place (task insert on an empty line lands after the marker).

Structurally, highlight and toggle now share one line-mode detector so they cannot disagree; the heading regex is shared with headingDecorations, so indented headings render styled; one MARKS table drives all inline-mark behavior; run("link") is total (URL doubles as label on empty selection, now inserted inline rather than as its own block); the unused getSelectedText contract method and the dead markdown-list-detection.ts util are removed.

Known divergence, not addressed here: markdown-task-actions.ts TASK_LINE_REGEXP accepts ordered task items ('1. [ ]') which the editor's TASK_LINE does not; the viewer toggles such checkboxes but the editor toolbar won't detect them.
2026-07-02 20:41:46 +08:00
boojack ba609c5cb8 chore(editor): toggleable formatting toolbar
Add a localStorage-backed insert-menu toggle (default off) that surfaces the formatting toolbar outside focus mode, and redesign it as a lean inline row: ghost icon buttons grouped by thin dividers, a level-reflecting heading glyph (pilcrow / H1-H3), and the active command as the only filled control.

Also keep the editor focused when using the toolbar: command buttons preventDefault on mousedown, and the dropdown menus return focus to the editor on close.
2026-07-02 09:19:34 +08:00
grandpig 76aee4e177 refactor: use the built-in max/min to simplify the code (#6060)
Signed-off-by: grandpig <grandpig@outlook.com>
2026-07-02 08:35:47 +08:00
boojack 0e1d821fb8 feat(mcp): expose create_attachment tool
Add AttachmentService_CreateAttachment to the curated MCP allowlist so
agents can upload files (inline base64 content) alongside memos, closing
the gap where the MCP server could list/get/delete attachments but not
create them.

Closes #6057
2026-07-01 22:15:58 +08:00
blackflytech 0820fc2d6c refactor: use slices.Backward to simplify the code (#6058)
Signed-off-by: blackflytech <blackflytech@outlook.com>
2026-07-01 18:38:24 +08:00
boojack 10200606db feat(markdown): render and navigate GFM footnotes
Footnote definitions previously vanished on display. Two underlying issues:

- rehype-sanitize re-clobbered `id` attributes with a second `user-content-`
  prefix while leaving hrefs untouched, so footnote refs/backrefs pointed at
  ids that didn't exist. Disable clobbering (ids are already namespaced by
  remark-rehype) so anchors match their targets.
- Footnote anchors went through the external Link (target="_blank"), opening a
  blank tab instead of navigating. Route in-page `#` anchors through a new
  AnchorLink: scroll within the memo when shown in full, else navigate to the
  memo detail page with the hash, where MemoDetail scrolls it into view.

Also style the footnotes section GitHub-style: thin separator, smaller muted
text, and un-underlined ref/backref links.
2026-06-29 22:46:41 +08:00
boojack 3b601b8416 fix(location): truncate long address in memo location chip
The location chip used the kit Button (shrink-0 + whitespace-nowrap),
which grew unbounded so its inner truncate span never fired and long
addresses overflowed the memo card. Replace with a raw button that
caps width (max-w-full min-w-0) and truncates the address text,
matching the existing LocationDisplayEditor pattern.
2026-06-29 20:27:52 +08:00
johnnyjoygh 5a73d7d3e5 refactor: rebuild the editor on CodeMirror as decorated source
Rebuild the memo editor as a single CodeMirror 6 "decorated source"
editor. The document is the raw markdown, stored verbatim and styled in
place (markers stay visible), so the editor never serializes a tree back
to markdown — removing the round-trip fidelity bug class (inline images,
setext headings, ordered-list indentation, HTML entities) that the old
editor needed per-case patches for.

- MemoEditor/Editor: CodeMirror 6 + lang-markdown (GFM). Tokens, heading
  lines, #tag/@mention, and the autocomplete popover are styled in plain
  CSS (Editor/editor.css) with theme tokens, not a CSS-in-JS theme.
- Tab/Shift-Tab nest/outdent list items (marker-aware, ordered items
  renumbered so nesting is CommonMark-valid); Escape blurs; #tag
  autocomplete sourced from useTagCounts.
- Focus-mode toolbar reimplemented as markdown-text ops; active state read
  from the Lezer tree via the backend-agnostic formatting/commands catalog.
- Remove the old serialize-back-to-markdown editor (its Editor dir,
  PlainEditor, the editor-mode system) and its now-unused dependencies
  (marked, textarea-caret, and the rich-text editor packages).
- Consolidate toolbar components under Toolbar/. Read-only MemoContent
  rendering is unchanged.
2026-06-28 22:59:14 +08:00
Santhosh Thottingal 281e0dc17c fix(tags): include combining marks in tag character class (#6051) 2026-06-28 10:41:41 +08:00
boojack 047175dbed chore(mcp): improve tool discoverability, add orientation tools and evals
Make the OpenAPI-driven MCP surface more usable by agents, following the
mcp-builder guidance.

- Enrich proto descriptions (single source of truth, flows to OpenAPI + MCP
  tool descriptions): document the memo `filter` CEL grammar with fields and
  examples (replacing the dangling "Refer to Shortcut.filter"), clarify the
  created_ts/updated_ts vs create_time/update_time naming, the visibility
  enum, the declarative replace semantics of Set* ops, and steer tag filters
  to `"x" in tags` (not the unsupported `tag == "x"`).
- Mark SetMemoAttachments / SetMemoRelations idempotent via a per-operation
  override the HTTP-method heuristic can't express.
- Curate two read-only orientation tools: shortcut_list_shortcuts (surfaces
  reusable CEL filters) and auth_get_current_user (the single allowed
  auth/identity op, for resolving the current user); guard test updated to
  keep the rest of the auth/user surface excluded.
- Add a task-level evaluation suite (server/router/mcp/evals) with 10
  verified questions, pinned to the deterministic demo seed.
2026-06-27 10:32:42 +08:00
boojack daa71d0456 feat(editor): recognize and style @mentions in the rich editor
Mirror the #tag mark so the TipTap editor styles @username while typing
and on load, matching the read-only view. A shared mention grammar
(utils/mention-grammar.ts) feeds both the editor tokenizer and the
read-only remark renderer so they can't drift.

Styling only -- no autocomplete dropdown (ListUsers is admin-only and
there is no user-search RPC). Bare emails still autolink to mailto: and
are never treated as mentions: the tokenizer's start() skips email-glued
@s so marked's GFM autolinker keeps seeing the whole address.
2026-06-26 09:28:41 +08:00
boojack eb826455b6 chore(webhook): reveal-later signing secret flow
Generate webhook signing secrets server-side and let users reveal them on
demand, replacing the create-dialog secret controls that surfaced internal
mask state (Status / Generate & Copy / Clear / Pending) to users.

- Add owner-gated GetUserWebhookSigningSecret RPC — the only path that
  returns the secret; list/create/update responses still omit it.
- Generate the secret server-side on create (webhook.GenerateSigningSecret),
  so validity no longer depends on the client.
- Rename UserWebhook.has_signing_secret -> signing_secret_set for parity
  with the existing api_key_set field.
- Create dialog drops the secret section to a one-line note; the generated
  secret is shown once right after create and revealable from Edit later.
2026-06-26 09:03:24 +08:00
Woookash c6d65bcf3f chore: i18n polish translations (#6050) 2026-06-26 00:36:37 +08:00
Yiges.M.x. c703b05dab feat: add webhook edit UI and signing secret status indicator (#6027) 2026-06-25 22:26:20 +08:00
boojack 9e84f61029 fix(web): delay loading skeleton to avoid flash on fast loads
Render the memo list skeleton only after loading exceeds a short delay
(SKELETON_LOADING_DELAY_MS). Fast/self-hosted loads now finish before the
threshold and never flash the skeleton, while slow loads still show it.

Close #6047
2026-06-25 22:02:39 +08:00
boojack e3e4ae1051 feat(web): add link preview view setting
Add a persisted "Link preview" toggle (default on) to the memo
display-settings popover, mirroring the compact-mode setting. When turned
off, link-preview cards are hidden across all memo views and the metadata
request is skipped (the gate sits at the paragraph renderer and reads the
preference from ViewContext). Resolves the request in #6045.
2026-06-25 20:45:51 +08:00
greymoth a5c10a7221 i18n(ja): complete Japanese translations — fill 24 missing keys (#6048) 2026-06-25 18:11:23 +08:00
boojack 5f7e038aa7 fix(editor): support backslash-escaping literal #tags
Memos layers #tag syntax on top of CommonMark, but there was no way to
write a literal "#NAS" — it always became a clickable tag (issue #6035).

Handle escapes lexically, the way TipTap/prosemirror-markdown do, with no
"escaped tag" node in the document model:

- Parse: marked's built-in backslash escape already turns "\#NAS" into
  plain text; the read-only renderer (remark-tag) now honors the same
  escape by lexing from the original source slice and falling back to the
  prior value-based parse when it can't faithfully reconstruct the text.
- Serialize: a tag-aware Markdown extension (tagMarkdown.ts) backslash-
  escapes a "#" that would re-parse into a tag, skipping links and code
  where tags never form.
- The editor's #tag lexing moves to the canonical @tiptap/markdown
  markdownTokenizer; tag-in-link skipping moves to a tree pass so the
  editor and renderer agree.

The capped tag-run grammar is consolidated into utils/tag-grammar.ts
(TAG_RUN), shared by the tokenizer, the serialize-escape, and the
renderer so they can't drift. README documents why the markdown manager
is worked around in three places.
2026-06-23 23:00:54 +08:00
boojack 20c19ef82d feat(storage): add insecure_skip_tls_verify option for S3
Adds an opt-in toggle to skip TLS certificate verification when connecting
to the S3 endpoint, for self-hosted S3-compatible backends (e.g. rustfs,
MinIO) that use self-signed certificates. Exposed in both the store/API
protos and the storage settings UI, mirroring the existing use_path_style
toggle. When enabled, the AWS client uses an HTTP transport with
InsecureSkipVerify; default behavior is unchanged.

This governs backend-initiated S3 calls (uploads, deletes, thumbnails, and
image/document streaming). Video/audio playback redirects the browser to a
presigned URL, so that path still requires the browser to trust the cert.

Closes #6039
2026-06-23 00:04:54 +08:00
boojack 1e3ec38fa1 refactor(editor): modularize formatting and simplify editor state
Behavior-preserving restructure of the MemoEditor subsystem for simplicity
and extensibility:

- Add a data-driven command catalog (editorCommands.ts) as the single source
  for formatting verbs; the toolbar, active-state hook, and WYSIWYG handle all
  derive from it, so adding a verb is a one-file change.
- Add a createSuggestionExtension factory; TagSuggestion consumes it, so new
  `/` or `@` triggers reuse the shared popup in ~10 lines.
- Collapse FormattingController into a single EditorController with an optional
  `formatting` capability; PlainEditor is an honest textarea fallback (no faked
  formatting); replace stringly-typed isActive with typed getActiveFormats.
- Move audio-recorder state out of the reducer into useAudioRecorder, keeping a
  single recorderBusy flag in the store.
- Convert the editor context to an external store (useSyncExternalStore) with
  per-slice subscriptions, so typing no longer re-renders the toolbar, insert
  menu, or metadata.
- Extract the shared #tag lexing grammar (tag-grammar.ts) used by both the
  editor tokenizer and the remark renderer.
- Remove dead reducer actions/cases and fix a preview blob-URL leak on the
  upload path.

Add tests for the command catalog, suggestion factory, and autosave.
2026-06-22 23:51:59 +08:00
boojack 26f4b73cb9 feat(filter): standard CEL now variable, time accessors, set ops
Replace the custom now() function with an idiomatic `now` timestamp variable (host-injected, frozen once per compile) and retype created_ts/updated_ts/create_time to CEL timestamp. Filters now use standard timestamp/duration arithmetic, e.g. `created_ts >= now - duration("24h")` and `timestamp("2025-01-01T00:00:00Z")`.

Add standard CEL surface that compiles to SQL across SQLite/MySQL/Postgres: timestamp accessors (getFullYear/getMonth/getDate/getDayOfWeek/..., with 0-based month and weekday normalized), ext.Sets() (sets.contains/intersects/equivalent over tags), tags.exists_one(), size() on string fields, and division/modulo folding. A frozen clock is injectable for deterministic tests.

BREAKING CHANGE: now() is removed (use the `now` variable) and time fields are timestamps, so bare-epoch comparisons need timestamp(<epoch>). Existing saved shortcuts using the old syntax must be updated.
2026-06-22 22:42:44 +08:00
johnnyjoygh cafa56f1a8 chore: make compact mode an opt-in view setting
Memo list views hard-coded compact rendering, truncating long memos by
default. Make full content the default and add a persisted 'Compact mode'
toggle (default off) in the display-settings popover, backed by the
localStorage ViewContext. Wire Home/Explore/Archived/UserProfile to read
it; add the compact-mode label across all locales.
2026-06-21 22:55:56 +08:00
johnnyjoygh 8fa2ff4423 fix(mcp): allow reverse-proxied instances to serve /mcp
The go-sdk Streamable HTTP handler enables DNS-rebinding protection that
rejects any request whose Host header is non-loopback while the server is
bound to a loopback address. memos is commonly run bound to loopback behind a
reverse proxy (e.g. the public demo), so every /mcp request was rejected with
"403 Forbidden: invalid Host header" before authentication ran.

Disable the SDK's localhost protection and rely on memos' own Origin/Host
allowlist (isAllowedMCPOrigin) for CSRF / DNS-rebinding protection. Add a
regression test covering the proxied shape and confirming disallowed origins
are still rejected.
2026-06-21 22:20:00 +08:00
johnnyjoygh 96cb65320b fix(instance): add needs_setup so admin-less instances aren't treated as fresh
The frontend keyed first-run setup off a null InstanceProfile.admin, but a
null admin only means "no admin-role user exists" — which also happens on a
populated instance that has lost all its admins. Such an instance was wrongly
redirected to signup, where the new account is created as a normal user (the
first-user promotion only triggers when there are zero users), leaving the
instance permanently admin-less.

Add an explicit InstanceProfile.needs_setup derived from user count == 0, and
switch the signup redirect and host tip to use it. admin stays for display only.
2026-06-21 22:14:15 +08:00
johnnyjoygh 6eb17864df feat: surface newly created memo above pinned list 2026-06-21 14:11:46 +08:00
johnnyjoygh deddf71d7b feat(editor): add focus-mode formatting toolbar
Add a rich-text formatting toolbar as the focus-mode header when the
WYSIWYG editor is active: heading dropdown, bold/italic/code, lists, and
link, with a priority+overflow responsive layout and live active-state
highlighting. The toolbar is a self-contained component driven through a
new FormattingController surface routed via EditorContent.

Remove the now-redundant slash-command feature (/todo, /code, /link,
/table) and its "Type / for commands" hint, since the toolbar covers
those actions; the shared suggestion renderer stays for #tag.
2026-06-21 11:57:45 +08:00
johnnyjoygh f727ad217c fix(comments): list all memo comments via pagination
Memo detail only showed the first 10 comments: the frontend requested
pageSize=0, which the backend normalizes to DefaultPageSize (10), and the
returned nextPageToken was never followed.

Add useInfiniteMemoComments (mirrors useInfiniteMemos) so the detail page
paginates through every comment, with a "Load more" control in
MemoCommentSection. Page size defaults to DEFAULT_LIST_MEMOS_PAGE_SIZE to
match the memo list convention.
2026-06-21 09:55:37 +08:00
johnnyjoygh f5a60263b2 chore(ui): align frontend on shadcn kit
Design system:
- add semantic --success/--warning OKLCH tokens across themes; replace
  hardcoded green/amber feedback colors and their manual dark: overrides
- drop the unused @emotion dependency

Kit usage:
- migrate raw <button>/<input> to ui-kit components (actions) or
  <div>/<span> (non-action surfaces); keep genuinely custom looks as
  raw HTML with their own styles
- make kit usage prop-only (no className overrides): add Button
  size="icon-sm", Badge "warning" variant + "pill" shape
- extract a shared Tabs primitive (segmented/underline) and migrate
  Inboxes + UserProfile onto it
- tokenize z-index tiers as z-overlay/z-dropdown/z-tooltip
- export variant types (ButtonVariant/Size, BadgeVariant/Shape, TabsVariant)
- document the kit and its policy in components/ui/README.md
2026-06-21 09:17:04 +08:00
boojack 3b07f78fd8 chore: tweak demo data
- Trim sponsor memo to CodeRabbit + SSD Nodes, concise single-tier layout
- Add a demo personal access token (Bearer memos_pat_demo) for the admin user
- Stagger memo created_ts relative to seed time so the demo timeline always
  looks recent; lead the pinned section with the Welcome memo
- Unpin the Scratchpad promo and drop the fixed "June" movie-marathon label
2026-06-19 13:38:02 +08:00
boojack f0e4a5624f feat(filter): expand CEL filter surface with startsWith/endsWith, matches(), and all()
Let users write three more CEL constructs in the filter field, each compiled to
SQL across SQLite/MySQL/Postgres:

- Scalar startsWith()/endsWith() on content/filename/mime_type (case-insensitive)
- matches() regex: PG ~, MySQL/SQLite REGEXP (Go-backed SQLite fn), validated at
  compile time via cel.ValidateRegexLiterals()
- all() comprehension over tags via per-element subqueries, non-empty required

Also: contains() now escapes LIKE metacharacters (%, _, \); cross-dialect render
tests plus behavioral tests; cel-go bumped to v0.28.1; new operators surfaced in
the frontend shortcut guide.
2026-06-15 23:22:28 +08:00
boojack 817561df8f fix(editor): collapse lingering select-all selection after delete
Ctrl+A creates a whole-document AllSelection; deleting it (Backspace, Delete, or Cut) maps the AllSelection onto the now-empty paragraph instead of collapsing to a caret, so the view paints a "selected" empty block. A ProseMirror appendTransaction now collapses a leftover AllSelection to a caret after any doc-changing edit.
2026-06-15 09:33:16 +08:00
ManJieqi 46685b1906 chore: update Chinese translations in zh-Hans.json (#6033)
Signed-off-by: ManJieqi <40858189+manjieqi@users.noreply.github.com>
2026-06-14 23:23:18 +08:00
boojack 385fa22056 fix(cors): open API to any origin for token auth, keep cookies same-origin
Reflect any Origin so token-authenticated clients (Access Token V2 / PAT)
can call the API cross-origin, but emit Access-Control-Allow-Credentials
only for trusted origins (same host / configured InstanceURL). This keeps
the SameSite=Lax refresh cookie unreadable by untrusted (incl. same-site
subdomain) origins. Origin: null is not reflected.

Note for operators: cross-origin token access is now open by default; if
you front memos with a caching proxy, ensure it honors `Vary: Origin`.
2026-06-14 23:20:34 +08:00
boojack 00225db922 refactor(web): share markdown element styles between viewer and editor
Extract the Tailwind classes for common markdown elements (paragraph,
blockquote, lists, inline code, link, hr, headings) into a single
markdownStyles.ts consumed by both the read-only MemoContent components
and the WYSIWYG editor, replacing the duplicated per-element strings and
the .memo-wysiwyg CSS block. Heading classes are precomputed per level so
the hot renderHTML path is a lookup, not a cn() merge.

Also require at least one character after `#` before opening the tag
suggestion menu so a bare `#` (or `# ` heading) no longer conflicts with
markdown headings.
2026-06-13 22:17:00 +08:00
boojack 2c0efeba7c refactor(web): rename editor dirs and simplify raw mode to a plain textarea 2026-06-13 01:08:38 +08:00
boojack 797f1ff15d feat(web): markdown WYSIWYG editor with raw-mode toggle (#6030)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 09:34:51 +08:00
boojack 8080bd10e1 docs: add README for mcp 2026-06-09 23:54:58 +08:00
boojack f497f009ce fix(webhook): fail loud on malformed signing secret and add tests
Follow-up to #6013. The signing path silently fell back to using the raw
secret string as the HMAC key when a whsec_-prefixed secret had invalid
base64, producing signatures no receiver could verify with no server-side
signal.

- Extract resolveSigningKey helper that errors on invalid whsec_ base64
- Post returns that error (logged by the async dispatcher); ValidateSigningSecret
  rejects it at write time so a bad secret is never stored
- Fix stale comment referencing a nonexistent Authorization header
- Add Go tests: key derivation, secret validation, end-to-end signature
  round-trip, and the invariant that the secret never leaks into API responses
2026-06-09 22:58:10 +08:00
Yiges.M.x. 063a44498d feat: add optional webhook signing secret (Standard Webhooks HMAC-SHA256) (#6013) 2026-06-09 22:45:01 +08:00
boojack 1052c04d33 fix(web): improve mobile control spacing 2026-06-09 21:04:47 +08:00
boojack 418398587c feat(i18n): add searchable locale picker 2026-06-09 09:33:17 +08:00
boojack 777d227eb9 feat: add OpenAPI-driven MCP support (#6026) 2026-06-09 09:16:50 +08:00
boojack a47d04954e feat(i18n): expand European locale coverage 2026-06-09 09:07:28 +08:00
boojack 6870e863de chore(github): improve issue templates with structured triage fields
Add area dropdowns, reproduction requirements, regression info, and
compatibility sections to reduce back-and-forth on bug reports and
feature requests.
2026-06-08 22:21:33 +08:00
boojack ecbe2ab797 fix(memo): preserve expanded todo list state 2026-06-08 19:11:29 +08:00
ay5399 8f1377324f fix(editor): wire Ctrl+B and Ctrl+I markdown shortcuts to textarea (#6016)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: boojack <stevenlgtm@gmail.com>
2026-06-08 00:24:05 +08:00
boojack 9eabb554d5 feat(settings): move tag metadata to user settings (#6017) 2026-06-07 23:58:00 +08:00
boojack a50ce09e81 fix(markdown): ignore tags inside links 2026-06-06 00:01:28 +08:00
boojack 5e71c0a737 docs: rewrite agent repository guide 2026-06-05 09:17:22 +08:00
boojack 2a4638b332 chore: remove MCP server 2026-06-05 08:38:57 +08:00
boojack 5f194da7d3 chore(main): release 0.29.1 (#5985) 2026-06-05 08:06:30 +08:00
boojack bb76949fc0 chore(server): centralize CORS policy 2026-06-04 22:37:41 +08:00
boojack d69f1aab27 chore: tweak demo data 2026-06-03 00:21:45 +08:00
boojack 0e2a9a9c0c fix(web): render video attachment posters on mobile 2026-06-02 23:08:16 +08:00
goingforstudying-ctrl e8d32e87d1 fix: support <meta name=description> in link previews (#6000)
Co-authored-by: goingforstudying-ctrl <goingforstudying-ctrl@users.noreply.github.com>
2026-06-02 23:02:21 +08:00
boojack 0d31e3c2fb chore(media): add zoom controls to preview dialog 2026-06-02 22:46:07 +08:00
boojack fadc974364 docs: consolidate agent guidance 2026-05-31 18:53:37 +08:00
boojack 53abb8020e refactor(frontend): remove react-use dependency 2026-05-31 18:32:17 +08:00
boojack 7c3bff4e98 fix(markdown): keep task item content in one grid column 2026-05-27 23:57:23 +08:00
boojack f22c4bd5c2 chore(main): release 0.29.0 (#5909) 2026-05-27 20:48:29 +08:00
boojack e0bb3a2e68 fix(editor): wrap selected text when pasting URL 2026-05-27 20:36:27 +08:00
boojack 648b3bd812 feat(memo): add task list quick actions (#5983) 2026-05-27 09:13:55 +08:00
boojack e564c1a993 chore: update about page 2026-05-26 21:14:59 +08:00
boojack e53b7d96e7 fix: delete user cleanup (#5981) 2026-05-25 22:10:29 +08:00
boojack d1208a68e9 chore: update sponsors 2026-05-25 20:39:25 +09:00
boojack 3c3382a3c6 fix: avoid update event on memo create attachments (#5961) 2026-05-16 21:18:44 +08:00
boojack 858f7419b4 chore(seed): tweak seed data 2026-05-15 09:04:28 +08:00
boojack 63d6431d3e chore: update images in README for dark mode
Signed-off-by: boojack <stevenlgtm@gmail.com>
2026-05-15 08:33:19 +08:00
Santosh Yadav ddcaf5f25c chore: fix coderabbit logo for light and dark theme (#5954) 2026-05-15 07:10:27 +08:00
boojack ab2b08a21e chore(seed): refresh demo memos and sponsor showcase 2026-05-15 00:23:11 +08:00
boojack 727480d49d chore: revamp sponsors section in README
Updated the featured sponsors section to include a table layout and added new sponsor information.

Signed-off-by: boojack <stevenlgtm@gmail.com>
2026-05-14 23:56:57 +08:00
boojack 439ddaebf5 refactor(placeholder): extract tile sprite strip 2026-05-14 20:38:00 +08:00
boojack 411ba7b34c feat(about): add about page with bird sprites 2026-05-14 20:30:37 +08:00
boojack 638e4f398e feat(placeholder): add woodpecker tilemap 2026-05-14 09:35:11 +08:00
boojack cf55f11072 feat(frontend): add pixel bird tilemaps 2026-05-14 00:03:21 +08:00
boojack ca2bc4eb84 chore: render placeholder ascii pieces as components 2026-05-13 09:06:23 +08:00
boojack aa5cb455e9 refactor(web): use / as the home route instead of /home
Home now lives at `/` directly. Unauthenticated visitors are sent to
`/explore` by the landing gate; old `/home` URLs redirect to `/` for
bookmark compatibility.
2026-05-12 23:17:46 +08:00
boojack 8c16ffa1f1 feat: add <Placeholder> component with ASCII bird states (#5949)
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 22:48:37 +08:00
Mayank Saini f1e2a06b46 feat: add configurable --log-level flag (#5934)
Signed-off-by: boojack <stevenlgtm@gmail.com>
Co-authored-by: boojack <stevenlgtm@gmail.com>
2026-05-12 21:10:05 +08:00
boojack a6024eebf1 perf: lazy load heavy first-screen dependencies (#5947) 2026-05-12 20:11:39 +08:00
boojack 7f1f53ffc4 fix(s3presign): preserve motion media payload 2026-05-09 22:51:56 +08:00
boojack 511c04bca2 chore: fix linter 2026-05-09 19:08:21 +08:00
boojack f3f059b2f7 chore: add batch get settings API 2026-05-09 09:30:28 +08:00
boojack 21303e879d fix(sse): stream initial response and refresh tokens 2026-05-09 09:15:50 +08:00
boojack 88ac3ec31e feat(stats): support filtered all-user stats
- Add state and filter inputs to ListAllUserStats and reuse it for explore/archive sidebar stats.
- Reduce duplicate home initialization requests by sharing stats/settings data paths.
- Include memo paragraph regression coverage from the current working tree.
2026-05-09 09:11:04 +08:00
boojack c49e75f91f chore: avoid copying memo protobuf locks 2026-05-09 08:32:00 +08:00
boojack 078488ca81 fix(httpgetter): prevent DNS rebinding in link metadata fetch 2026-05-08 23:24:16 +08:00
boojack 4a1e401bd9 fix(memo): enforce parent visibility for comments 2026-05-08 23:22:56 +08:00
boojack 1df6479443 feat: add dedicated shortcuts page (#5942) 2026-05-08 23:06:12 +08:00
boojack 02096836c3 test: stabilize backend tests in CI
- Avoid requiring built frontend assets in cache header tests.
- Skip Testcontainers-backed store tests when Docker is unavailable.
2026-05-08 22:24:54 +08:00
boojack b6f42cbe6b chore: upgrade frontend to React 19 (#5940) 2026-05-08 22:10:48 +08:00
boojack 084f40bc9e fix(frontend): correct static cache headers 2026-05-08 21:25:05 +08:00
boojack 4f0556e23f chore: update sponsors
Added sponsorship information for InstaPods.

Signed-off-by: boojack <stevenlgtm@gmail.com>
2026-05-08 19:48:30 +08:00
hchengting bcbcb03894 chore: update zh-Hant translation (#5930) 2026-05-04 20:18:00 +08:00
boojack 5ccba98adc refactor: split STT and Audio-LLM into separate interfaces (#5928) 2026-05-03 00:21:58 +08:00
boojack 238f27dea1 feat(transcription): explicit STT settings with provider, model, prompt (#5926) 2026-05-02 19:35:18 +08:00
boojack ef55013418 feat(memo): create memos on the selected calendar date (#5925) 2026-05-02 11:53:50 +08:00
Steven d349fe4409 chore(theme): rebalance dark palette for readability 2026-05-02 09:11:46 +08:00
Steven 8daef1dc89 feat(activity-calendar): aggregate by ViewContext.timeBasis
Fixes the inconsistency where switching the memo list to update_time
left the activity heatmap aggregating by created_time. The heatmap
now follows the same time basis as the list it sits next to.

Backend
- UserStats gains memo_updated_timestamps (additive proto field, tag 8).
- GetUserStats and ListAllUserStats populate it alongside the existing
  memo_created_timestamps. No DB migration; memo.updated_ts already
  exists on every row.

Frontend
- useFilteredMemoStats reads timeBasis from ViewContext and selects
  the matching timestamp source.
- StatisticsView and MonthNavigator forward timeBasis through to
  MonthCalendar / YearCalendar so tooltip text matches the basis
  ("X memos in DATE" vs "X memos updated on DATE").
- Falls back to memoCreatedTimestamps when an old server returns an
  empty memoUpdatedTimestamps array (detected by length divergence,
  since protobuf-es deserializes missing repeated fields as []).

Tests
- Backend: TestGetUserStats_MemoUpdatedTimestamps verifies the field
  is populated and reflects post-creation updates.
- Frontend: filtered-memo-stats covers create/update source switching
  and the old-server fallback path; activity-calendar-tooltip covers
  basis-aware label selection.

Spec and implementation plan committed under docs/superpowers/.
2026-05-02 00:26:53 +08:00
Steven ea0625da45 feat(stats): admin instance resource statistics 2026-05-01 23:15:56 +08:00
Steven cd4f28ae10 feat(notification): add smtp email settings
- Add admin notification email settings UI and test-email RPC
- Dispatch privacy-first comment and mention emails through server notification layer
- Keep SMTP secrets write-only and require passwords when SMTP identity changes
2026-05-01 18:48:21 +08:00
Steven 35bf761b8c fix(security): enforce attachment ownership on memo updates 2026-05-01 18:23:53 +08:00
Tokenicrat 词元 603781f792 fix(frontend): use correct url path for memos in sitemap.xml (#5921) 2026-05-01 16:08:31 +08:00
Steven a0b6417689 chore: bump pnpm to 11.0.1 and align list test assertions 2026-04-30 20:05:39 +08:00
boojack e008b1a23c fix(markdown): align list items with checkboxes 2026-04-30 08:49:49 +08:00
boojack 1df3fe7955 fix(user): omit internal settings from list responses (#5917) 2026-04-30 08:49:03 +08:00
boojack 0bc56694b0 feat: render link metadata cards 2026-04-29 23:23:52 +08:00
boojack 9c5c604944 feat: add link metadata endpoints 2026-04-29 22:38:08 +08:00
memoclaw c7242324a1 fix(fileserver): preserve HDR image metadata in thumbnails 2026-04-29 21:32:10 +08:00
memoclaw 267f90a3ff chore: refactor Settings UI structure (#5912)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
2026-04-29 09:30:58 +08:00
boojack 14480bfc46 chore(settings): improve storage tags and memo panels 2026-04-28 23:28:01 +08:00
boojack ee65e90a39 chore: upgrade pnpm to 11 (#5911) 2026-04-28 22:16:22 +08:00
Chyna 328396a97f fix(web): sync avatar changes immediately after profile update (#5903)
Signed-off-by: Chyna <68607983+chyna-gvng@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-04-28 21:57:58 +08:00
Mostafa Attia 9353848603 chore: increased muted text contrast in dark theme (#5902) 2026-04-28 20:03:24 +08:00
boojack 616487fa37 chore: update backend and frontend dependencies (#5900)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
2026-04-28 08:25:26 +08:00
boojack 18e729fe00 chore(memo): simplify markdown task list rendering 2026-04-27 23:22:29 +08:00
boojack 9e310bf93c chore(memo): clarify displayed update time 2026-04-27 21:50:41 +08:00
boojack 9bf648ac91 chore(main): release 0.28.0 (#5866) 2026-04-27 08:56:00 +08:00
boojack 94ce1e5347 chore(settings): show build commit in version info 2026-04-27 08:51:11 +08:00
boojack e2c60845ea fix(markdown): split mixed task and bullet lists 2026-04-26 23:25:29 +08:00
boojack c268551a16 feat(memos): choose created or updated time for memos (#5894) 2026-04-26 11:50:26 +08:00
boojack 3949a252db style(web): refine scrollbar styling 2026-04-26 00:24:45 +08:00
boojack 34c90dd5e1 chore: remove duplicate tags from share image preview 2026-04-25 22:22:49 +08:00
boojack 0fb83a745d fix(auth): harden authorization and username validation (#5890) 2026-04-25 21:24:16 +08:00
boojack ee1799851e feat: redesign account and SSO management (#5886) 2026-04-24 09:08:58 +08:00
boojack 30c0611a82 fix: fix legacy username auth flows (#5885) 2026-04-23 22:35:38 +08:00
boojack d688914b28 feat(auth): add SSO user identity linkage (#5883) 2026-04-23 08:51:45 +08:00
boojack 50638040f6 fix: reduce list memo query overhead (#5880) 2026-04-22 09:31:48 +08:00
boojack ebc0e10f07 docs: refine SSO identity linkage design (#5879) 2026-04-22 09:09:15 +08:00
boojack b5863d76be fix(web): preserve task checkbox state (#5867) 2026-04-20 23:27:00 +08:00
wndnjs0 d98f665919 fix: disable modal prop on DropdownMenu to prevent scroll disappearing (#5861) 2026-04-20 21:38:28 +08:00
boojack 765a8c6e28 chore(main): release 0.27.1 (#5855) 2026-04-19 13:17:09 +08:00
George Wu bbded584ce fix: user resource names can be uuidv4 from idp sub claim (#5856) 2026-04-19 13:05:08 +08:00
boojack f8a304bae3 fix(release): inject build version into artifacts 2026-04-19 12:02:32 +08:00
boojack cfe2cf4cf5 chore(main): release 0.27.1 (#5854) 2026-04-19 10:55:16 +08:00
boojack 01be01f4b7 fix: mixed-case user resource names (#5853) 2026-04-19 10:44:25 +08:00
boojack 1fd6a2a385 chore(main): release 0.27.0 (#5843)
Signed-off-by: boojack <stevenlgtm@gmail.com>
2026-04-19 04:02:50 +08:00
boojack 583c3d24f4 feat(mcp): harden tool exposure and side effects (#5850) 2026-04-18 22:28:35 +08:00
wndnjs0 0fc1dab28b fix: add unix socket file permission setting (755 -> 660) (#5849) 2026-04-18 13:21:03 +08:00
boojack 88cb58ab64 refactor(web/routing): guard-based auth flow, migrate tests to Vitest (#5848) 2026-04-18 01:06:54 +08:00
boojack 587f5b1b6c chore(github): simplify issue templates 2026-04-17 23:54:17 +08:00
boojack ff6389a5ef fix(api): appease image size lint 2026-04-16 23:21:07 +08:00
boojack c45663761d fix(api): reduce memory pressure in backend paths 2026-04-16 23:08:48 +08:00
boojack 8479e1d5a3 test: close SSE response body explicitly 2026-04-16 22:57:31 +08:00
boojack a5ddd5adaf fix(server): close SSE clients during shutdown
Close long-lived SSE streams before HTTP shutdown so graceful shutdown is not held until the deadline. Also wait for background runners before closing the store to make shutdown ordering explicit.
2026-04-16 22:49:10 +08:00
boojack a7fd1dacc9 refactor(ai): use official provider SDKs (#5845) 2026-04-16 22:27:57 +08:00
boojack f394e9469a chore: add release-please automation (#5842) 2026-04-15 23:04:10 +08:00
Mattia Borda 5be530dbac chore: update Italian translation for 'cancel' key (#5841)
Signed-off-by: Mattia Borda <mattiagiovanni.borda@icloud.com>
2026-04-15 21:01:57 +08:00
boojack 411d8335e7 chore: set native color scheme for dark themes (#5840) 2026-04-15 20:55:41 +08:00
boojack a3a5b52d60 chore: tweak location picker 2026-04-15 20:07:36 +08:00
boojack ab5332901f fix: hide transcribe button without AI provider 2026-04-14 21:47:59 +08:00
boojack 35504cc8bd feat(web): add demo mode banner (#5836) 2026-04-14 09:08:17 +08:00
boojack 101704c8ea feat(ai): add BYOK audio transcription (#5832) 2026-04-13 22:09:24 +08:00
boojack 0ad0fec8d4 feat(ai): add Anthropic provider option 2026-04-12 21:42:17 +08:00
memoclaw d87539a1e1 feat: add Gemini transcription provider (#5830)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
2026-04-12 21:12:03 +08:00
memoclaw 83ed32f119 feat(ai): add instance AI providers and transcription (#5829)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
2026-04-12 19:23:34 +08:00
boojack 40fd700fb8 fix(fileserver): render SVG attachment previews 2026-04-12 10:41:38 +08:00
boojack efeb28c872 fix: remove duplicate Japanese locale keys 2026-04-12 10:34:20 +08:00
Takuro Onoue 0f7c7eb75e i18n: refine and normalize Japanese locale strings (#5826)
Signed-off-by: Takuro Onoue <kusanaginoturugi@gmail.com>
2026-04-11 22:15:26 +08:00
boojack 2523d966f4 chore(web): improve navigation accessibility 2026-04-10 22:27:29 +08:00
boojack fee7fcd660 fix(frontend): restore sitemap and robots routes 2026-04-10 22:23:00 +08:00
boojack 8cdcd7b284 refactor(attachments): extract visual gallery layout and tile style tokens 2026-04-10 08:55:20 +08:00
boojack 9ca71229a6 fix: preserve draft content when tab is suspended or editor remounts
Gate auto-save on initialization to prevent empty content from overwriting
cached drafts on remount. Flush drafts synchronously on visibilitychange/
pagehide so Chromium tab suspension cannot drop pending debounced saves.
Restore cached draft over saved memo content when they differ (inline editing).
2026-04-10 08:48:50 +08:00
boojack 938c405b0f refactor: move embedded content styles from global CSS to Tailwind 2026-04-08 23:34:49 +08:00
boojack 124708f164 chore: refactor attachment media layout and insert menu organization 2026-04-08 23:28:49 +08:00
boojack 7e21b728b3 fix: harden memo content iframe and HTML sanitization 2026-04-08 21:10:35 +08:00
boojack 2d682ae176 refactor(attachments): compact audio item layout and playback logic
Made-with: Cursor
2026-04-07 21:47:06 +08:00
boojack 5b78023fd5 Polish share-as-image UI and sidebar sharing actions
Made-with: Cursor
2026-04-07 21:07:40 +08:00
boojack e51985a29f feat(memo-editor): add compact live waveform recorder panel (#5817) 2026-04-07 20:40:34 +08:00
boojack 61c963841b chore(web): polish dark theme and calendar UI
- simplify ActivityCalendar state handling and shared max-count utilities
- remove calendar ring styling and darken the default dark theme primary colors
- tighten the audio recorder panel layout and action sizing
2026-04-06 22:44:11 +08:00
memoclaw 24fc8ab8ca feat(mentions): add memo mention parsing, notifications, and rendering (#5811)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
2026-04-06 22:16:53 +08:00
boojack 38fc22b754 feat(memo): add image sharing in detail view
Keep the unpublished image-sharing flow scoped to memo detail pages.

- add a dedicated share-image preview and export pipeline
- measure the rendered memo card so preview and exported image stay aligned
- move the entry point into the detail sidebar and drawer only
2026-04-06 18:30:01 +08:00
boojack 2cbc70762b refactor(attachments): simplify the attachment library
- split attachment page states and primitives into focused components
- unify card and list item presentation across media, audio, documents, and unused uploads
- move attachment paging and cleanup flows onto shared query and view-model hooks
2026-04-06 17:39:58 +08:00
boojack 7ac9989d43 fix(map): align dark mode map styling 2026-04-06 17:38:56 +08:00
boojack 15d8ec10d5 chore: update locale translations for new i18n entries 2026-04-06 16:11:21 +08:00
boojack 067d7ff0ce chore: refactor memo editor audio recording flow 2026-04-06 15:46:38 +08:00
boojack c3e7e2c316 fix: normalize attachment MIME types before validation 2026-04-06 14:05:24 +08:00
boojack aafcc21ae6 fix: improve image preview dialog and live photo trigger 2026-04-06 13:41:27 +08:00
boojack 6b0487dcd8 fix: unify live photo previews around LIVE badge playback 2026-04-06 11:56:58 +08:00
boojack 065e817470 fix: backend tests action 2026-04-06 11:19:31 +08:00
boojack 10a955fd62 refactor: move plugin packages under internal 2026-04-06 11:10:32 +08:00
boojack 4b4e719470 feat(attachments): add Live Photo and Motion Photo support (#5810) 2026-04-06 10:47:01 +08:00
boojack 894b3eb045 fix(map): refine Leaflet controls and memo map styling 2026-04-06 08:45:54 +08:00
boojack 25feef3aad fix(api): tolerate missing related users in memo conversions (#5809) 2026-04-06 08:23:18 +08:00
boojack 87d411bc70 docs(agents): align contributor guidance with current CI workflows (#5808) 2026-04-06 08:02:21 +08:00
memoclaw f403f8c03c refactor: simplify memo metadata components 2026-04-02 22:30:21 +08:00
memoclaw 0e4d2d25ca refactor: simplify audio attachment playback component 2026-04-02 21:56:01 +08:00
Serhat 9676e72533 i18n: complete Turkish (tr) translations to 100% coverage (#5802)
Signed-off-by: Serhat <49079271+onwp@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-04-01 19:25:18 +08:00
memoclaw c0d5854f67 feat(editor): add voice note recording to the memo composer (#5801)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
2026-04-01 09:36:33 +08:00
memoclaw a0d83e1a9e fix(web): refine attachment media layout 2026-04-01 08:40:36 +08:00
memoclaw cdbe40a390 chore: update security.md 2026-04-01 08:39:49 +08:00
memoclaw 63a17d897d refactor: split audio attachment view into reusable components 2026-03-31 23:03:38 +08:00
memoclaw 1921b57662 fix(tags): allow blur-only tag metadata (#5800)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
2026-03-31 21:38:55 +08:00
boojack 201c8a8ea9 chore: add rc release handling 2026-03-31 08:34:36 +08:00
boojack 0e89407ee9 fix(filter): enforce CEL syntax semantics
Reject non-standard truthy numeric expressions in filters and document the parser as a supported subset of standard CEL syntax.

- remove legacy filter rewrites
- support standard equality in tag exists predicates
- add regression coverage for accepted and rejected expressions
2026-03-31 08:10:49 +08:00
boojack d3f6e8ee31 chore: harden MCP access control and origin validation 2026-03-31 00:12:28 +08:00
boojack 7c708ee27e chore: add migration upgrade coverage (#5796) 2026-03-30 23:51:57 +08:00
memoclaw e520b637fd fix: prevent stale comment drafts from being restored 2026-03-30 22:37:07 +08:00
memoclaw acbc914dea fix(webhooks): trigger memo updates for attachment and relation changes (#5795)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
2026-03-30 20:01:16 +08:00
memoclaw 9610ed8fc8 fix(lint): correct goimports struct literal alignment after removing write-only credential fields (#5794)
Co-authored-by: Claude <noreply@anthropic.com>
2026-03-29 20:31:09 +08:00
memoclaw 9d3a74bccc fix(api): make credentials write-only and restrict sensitive settings to admins
Security fixes for credential leakage across three resources:

- NOTIFICATION setting: restrict GetInstanceSetting to admin-only
  (was publicly accessible, exposing SMTP credentials)
- SMTP password: never return SmtpPassword in API responses (write-only)
- S3 secret: never return AccessKeySecret in API responses (write-only)
- OAuth2 ClientSecret: never return in API responses for any role
  (was previously returned to admins); remove redactIdentityProviderResponse
  in favor of omitting the field at the conversion layer
- Preserve-on-empty: when updating settings with an empty credential
  field, preserve the existing stored value instead of overwriting
  (applies to SmtpPassword, AccessKeySecret, and ClientSecret)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 07:34:00 +08:00
memoclaw c53677fcba fix(api): improve SSE hub design and fix double-broadcast on comments
- Fix duplicate SSE event on comment creation: CreateMemoComment now
  suppresses the redundant memo.created broadcast from the inner
  CreateMemo call, emitting only memo.comment.created
- Extract reaction event-building IIFEs into buildMemoReactionSSEEvent
  helper, removing duplicated inline DB-fetch logic
- Promote resolveSSEAudienceCreatorID from method to free function
  (resolveSSECreatorID) since it never used the receiver
- Add userID to SSE connect/disconnect log lines for traceability
- Change canReceive default from permissive (return true) to
  deny-with-warning for unknown visibility types
- Add comprehensive tests covering all new helpers, visibility edge
  cases, slow-client drop behavior, and the double-broadcast fix

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 07:33:40 +08:00
boojack d720efb6e6 chore: tweak featured sponsors
Removed the old sponsors table and replaced it with individual sponsor links and descriptions.

Signed-off-by: boojack <stevenlgtm@gmail.com>
2026-03-29 02:17:29 +08:00
memoclaw 4add9b04ad fix: prevent local attachment uploads from overwriting files 2026-03-26 21:46:51 +08:00
memoclaw a24d420922 fix(api): restrict user email exposure to self and admins (#5784)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
2026-03-25 22:02:08 +08:00
memoclaw acddef1f3d fix(api): switch user resource names to usernames (#5779)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
2026-03-25 09:11:17 +08:00
boojack 2327f4e3a6 chore: revamp featured sponsors in README
Updated featured sponsors section with new layout and content.

Signed-off-by: boojack <stevenlgtm@gmail.com>
2026-03-25 00:02:26 +08:00
boojack 60a7d49874 chore: add InstaPods promotion to README
Signed-off-by: boojack <stevenlgtm@gmail.com>
2026-03-24 23:46:37 +08:00
memoclaw 4818bf3559 refactor(store): remove synthetic system bot user lookup (#5778)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
2026-03-24 22:16:30 +08:00
memoclaw 4f6730a12e chore: show compact attachment count instead of thumbnails in comment previews
When truncate mode is active (comment list), display an inline file icon
with attachment count instead of rendering full image thumbnails.
2026-03-24 19:30:39 +08:00
memoclaw 6a03917f6e chore: upgrade TypeScript to 6.0.2 2026-03-24 08:45:56 +08:00
memoclaw bb7f4978e5 refactor(web): consolidate SharedMemo into MemoDetail (#5773)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
2026-03-24 08:40:49 +08:00
memoclaw 6b30579903 feat: add outline navigation to memo detail sidebar (#5771)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 00:20:40 +08:00
memoclaw 2aaca27bd5 refactor(web): improve MemoDetail and sidebar maintainability (#5769)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
2026-03-23 22:51:24 +08:00
memoclaw e176b28c80 feat(memo-preview): support comment metadata in previews (#5768)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
2026-03-23 21:51:30 +08:00
memoclaw 22519b57a0 fix(web): prevent MemoContent prop leaks 2026-03-23 20:34:14 +08:00
memoclaw 45b21530d9 feat: add blur_content attribute to tag metadata settings (#5767)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-23 19:42:27 +08:00
memoclaw 9e04049632 feat: treat tag setting keys as anchored regex patterns (#5759)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-22 08:07:45 +08:00
memoclaw 9ded59a1aa refactor(web): improve Settings page maintainability and consistency (#5757)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-21 15:05:48 +08:00
memoclaw d5de325ff4 refactor(web): simplify main layout sidebar structure (#5756)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
2026-03-21 12:54:18 +08:00
memoclaw 4177898054 refactor(web): consolidate memo metadata components into MemoMetadata (#5755)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-21 09:04:15 +08:00
memoclaw ac077ac3d3 refactor(web): improve MemoView and MemoEditor maintainability (#5754)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-21 07:20:18 +08:00
memoclaw 7b4f3a9fa5 refactor(memo): simplify MemoDetail error handling, drop memo.failed-to-load i18n key
The failed-to-load key was only used for non-ConnectError exceptions, which
are unreachable in practice since the Connect RPC client always wraps errors
as ConnectError. Use (error as Error).message as a plain fallback instead.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-20 20:19:44 +08:00
memoclaw 5f6f624635 i18n: add missing auth.protected-memo-notice and memo.failed-to-load fallbacks to all locales
30 locale files were missing the two keys added in the auth redirect PR.
Added English fallback strings so all locales render properly until
community translations are contributed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-20 19:41:12 +08:00
xun zhao 7601708ae4 Redirect unauthenticated protected memo access to sign in (#5738) 2026-03-20 19:40:19 +08:00
fiatcode 551ee1d81f fix(auth): recover session via refresh cookie when localStorage is empty (#5748) 2026-03-20 19:21:11 +08:00
memoclaw be00abe852 fix: sync html lang attribute with active locale (#5753)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-20 19:17:30 +08:00
google-labs-jules[bot] ff32869d2f chore: improve access to default fields in cron parser (#5750)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-20 18:50:07 +08:00
google-labs-jules[bot] e0cc247823 chore: optimize multi-user RSS feed generation by fixing N+1 query (#5749)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-03-20 18:09:24 +08:00
google-labs-jules[bot] 23a7e99a21 chore: optimize unreact network requests (#5747)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: boojack <stevenlgtm@gmail.com>
2026-03-20 18:08:28 +08:00
memoclaw a7cabb7ce6 refactor(web): remove masonry memo layout (#5746)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
2026-03-20 09:01:43 +08:00
memoclaw 05810e7882 fix(memo-editor): scope Cmd+Enter save to the active editor (#5745)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
2026-03-20 08:43:01 +08:00
memoclaw e0334cf0a8 refactor: restructure i18n locale keys for better maintainability (#5744)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-20 05:56:56 +08:00
memoclaw 6f1f3d81c5 chore: remove disallow_public_visibility setting (#5743)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-20 00:00:51 +08:00
memoclaw 3f3133d6e2 feat(memo): add share links for private memos (#5742)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
2026-03-19 23:47:22 +08:00
memoclaw e164517773 test: remove raw SQL migration backfill test setup 2026-03-19 19:54:39 +08:00
memoclaw f759b416af refactor(inbox): store memo comment payloads without activity records (#5741)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
2026-03-19 19:33:25 +08:00
memoclaw a249d06e2e feat(instance): add notification transport setting (#5737)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
2026-03-19 09:18:28 +08:00
boojack 65d14fbb63 feat(instance): add canonical tag metadata setting (#5736) 2026-03-19 08:54:43 +08:00
boojack 330291d4d9 feat(user): add per-user tag metadata settings (#5735) 2026-03-18 23:15:14 +08:00
boojack 04f239a2fc fix(api): remove public activity service (#5734) 2026-03-18 22:42:57 +08:00
Nix 89c6902895 feat(i18n): update sse connect label in Chinese (#5732) 2026-03-18 18:53:09 +08:00
Johnny 0ba4c0f397 feat(cli): add version subcommand (#5731) 2026-03-18 08:41:34 +08:00
johnnyjoygh f90d9a49a7 fix: improve installer compatibility and docs 2026-03-17 20:46:18 +08:00
johnnyjoygh 1ed542c21d feat: add GitHub release installer and release workflow 2026-03-17 20:16:16 +08:00
memoclaw 12e2205cb6 chore(backend): update Go toolchain and dependencies (#5730) 2026-03-16 21:07:52 +08:00
memoclaw 6f5f0d94e8 chore(web): update frontend dependencies and Node runtime (#5729) 2026-03-16 20:37:16 +08:00
memoclaw 1e688b2a5d feat: extract title from first H1 heading into memo property (#5726)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 11:05:03 +08:00
memoclaw b8e9ee2b26 feat(mcp): enhance MCP server with full capabilities and new tools (#5720)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 18:15:52 +08:00
boojack d0b0652a7c chore: tweak README (#5717)
Signed-off-by: boojack <stevenlgtm@gmail.com>
2026-03-12 23:16:59 +08:00
memoclaw f4154d090b fix: restrict archived memo access to creator only (#5707)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 20:15:08 +08:00
memoclaw 8f43e8075b fix: correct typos in comments, error messages, and identifiers (#5704)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 18:40:17 +08:00
memoclaw bdd3554b89 fix: handle chunk load errors after redeployment with auto-reload (#5703)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 10:45:16 +08:00
memoclaw e5b9392fcd chore: use issue types instead of labels for bug/feature templates
Replace `labels: [bug]` and `labels: [enhancement]` with `type: Bug`
and `type: Feature` to leverage GitHub's native issue types already
configured on this repo.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 18:49:27 +08:00
memoclaw 1bfd121d7d chore: improve GitHub issue templates (#5700)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 18:25:10 +08:00
memoclaw 2ccb98a6cb fix: render audio attachments as inline players (#5699)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 17:57:48 +08:00
memoclaw 4503679155 enhance: improve link memo dialog with rich previews (#5697)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 17:54:13 +08:00
memoclaw e70149af5f enhance: polish PWA manifest and meta tags (#5695)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 14:02:13 +08:00
memoclaw cd5816c428 feat: add --allow-private-webhooks flag to bypass SSRF protection (#5694)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 13:46:03 +08:00
memoclaw 851e090ff9 chore: align branding with brand guidelines (#5693)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 11:32:36 +08:00
memoclaw 1e82714a52 perf: batch load memo relations when listing memos (#5692)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 11:19:19 +08:00
memoclaw 3d4f793f97 fix: include plain URLs and tags in memo snippet generation (#5688)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 22:03:45 +08:00
memoclaw 92d937b1aa feat: replace auto-increment ID with UID for identity provider resource names (#5687)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 21:01:22 +08:00
memoclaw f0c4489468 chore: move storage setting migration to v0.27.0 (#5686)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 19:44:36 +08:00
Peter Etelej 3010f10eaf fix: access token refresh on web app (#5681) 2026-03-05 19:29:21 +08:00
memoclaw 334dfef714 docs: streamline AGENTS.md and simplify CLAUDE.md (#5685)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 19:28:09 +08:00
boojack 5a17614a6e chore: tweak CODEOWNERS
Signed-off-by: boojack <stevenlgtm@gmail.com>
2026-03-05 19:14:16 +08:00
memoclaw b44d9c4629 docs: add CLAUDE.md for Claude Code quick reference (#5683)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 09:42:48 +08:00
longhe.li 0729779e04 fix: toggle focus mode do not reset editor height (#5504)
Signed-off-by: longhe.li <lilonghe@outlook.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-04 22:13:58 +08:00
thefatcode 2c3f9e3bfb fix: clear content search filter when selecting shortcut (#5499) 2026-03-04 22:12:41 +08:00
Ashour Badine 3ea6ea3108 fix: tag parsing truncates emojis with variation selectors (#5496) 2026-03-04 22:10:40 +08:00
Steven ce441644af fix: ensure comment divs span full width in MemoDetail 2026-03-04 19:13:58 +08:00
Biplav Barua def123232a feat: implement ListActivities pagination (#5468) 2026-03-04 19:08:47 +08:00
Steven c36934f348 chore: add featured sponsor section for Warp 2026-03-04 08:51:29 +08:00
Steven 0cf8805184 refactor(sse): move status indicator to avatar badge
Replace the standalone SSE dot above UserMenu with a small badge
overlaid on the bottom-right of the user avatar. Only visible when
status is connecting (yellow) or disconnected (red) — invisible in the
normal connected state, removing constant visual noise.
2026-03-03 23:25:01 +08:00
milvasic ea0892a8b2 feat: add live refresh via Server-Sent Events (SSE) with visual indicator (#5638)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: milvasic <milvasic@users.noreply.github.com>
2026-03-03 22:56:12 +08:00
Steven a69e405c95 refactor: remove dead code and deduplicate comment amount logic 2026-03-03 22:30:25 +08:00
Steven 3a5d3c8ff9 feat: show inline comment preview in list view
Add a comment preview section below memo cards in list view, displaying
up to 3 comment snippets with a "View all" link. Removes the old comment
count icon from the memo header in favor of this richer inline display.
Comment preview is hidden in memo detail view.
2026-03-03 21:40:56 +08:00
Steven 3e4c052f44 chore: unify table style 2026-03-03 21:07:28 +08:00
Steven 4321887a02 chore: fix linter 2026-03-03 08:50:57 +08:00
Lincoln Nogueira d0764fb0be i18n: update all locale translations (#5679) 2026-03-03 08:49:08 +08:00
Steven 98859eb5e5 fix(routing): redirect unauthenticated users to /explore when public visibility is allowed 2026-03-03 08:48:54 +08:00
Steven 737acbba2f fix(markdown): support height/width attributes on img elements 2026-03-02 22:45:36 +08:00
boojack ec3ab350d9 chore: tweak sponsor assets
Signed-off-by: boojack <stevenlgtm@gmail.com>
2026-03-02 22:31:20 +08:00
Steven dfab67f035 chore(seed): polish demo data with realistic multi-user content 2026-03-02 21:50:47 +08:00
Steven 6b37fcc01b fix: improve KaTeX and Mermaid error handling and overflow 2026-03-02 21:11:07 +08:00
Steven 7f753bf6d7 refactor(theme): consolidate theme system and polish dark mode colors
- Reduce themes from 6 to 4: system, light, dark, paper
  - Remove midnight (too similar to dark) and whitewall (too similar to light)
  - Drop all unused tokens: chart-*, sidebar-primary, sidebar-border,
    sidebar-ring, shadow-2xs, tracking-normal, spacing
  - Remove redundant @theme inline blocks from dynamic theme files
    (Tailwind only processes them at compile time, not at runtime)
  - Move shared tokens (fonts, radius) to default.css only

- Polish dark mode color palette
  - Consistent cool-slate hue (h265) across all surfaces
  - Proper surface layering: sidebar(0.07) → bg(0.09) → card(0.13) →
    popover(0.17) → secondary(0.19) → muted(0.21) → accent(0.22)
  - Foreground softened to 0.82 (from 0.9) — comfortable off-white
  - Accent more chromatic than muted (0.012 vs 0.008) — hover feels interactive
  - Popover elevated above card (0.17 vs 0.13) — floating elements visible
  - Destructive more vivid (0.62/c0.20) — clearly red on dark surfaces
  - Input border (0.25) more distinct than layout border (0.21)
  - Sidebar foreground (0.68) dimmer than content foreground (0.82)

- Fix inline code background invisible in dark mode (#5674)
  - Muted was same lightness as card — increased to 0.21 for clear contrast
2026-03-02 09:30:57 +08:00
Johnny 803d488a5f feat(mcp): refactor MCP server to standard protocol structure
- Replace PAT-only auth with optional auth supporting both PAT and JWT
  via auth.Authenticator.Authenticate(); unauthenticated requests see
  only public memos, matching REST API visibility semantics
- Inline auth middleware into mcp.go following fileserver pattern;
  remove auth_middleware.go
- Introduce memoJSON response type that correctly serialises store.Memo
  (including Payload.Tags and Payload.Property) without proto marshalling
- Add tools: list_memo_comments, create_memo_comment, list_tags
- Extend list_memos with state (NORMAL/ARCHIVED), order_by_pinned, and
  page parameters
- Extend update_memo with pinned and state parameters
- Extract #tags from content on create/update via regex to pre-populate
  Payload.Tags without requiring a full markdown service rebuild
- Add MCP Resources: memo://memos/{uid} template returns memo as
  Markdown with YAML frontmatter, allowing clients to read memos by URI
- Add MCP Prompts: capture (save a thought) and review (search + summarise)
2026-03-01 23:10:23 +08:00
Johnny 16576be111 chore: polish MemoDetailSidebar for consistent structure and styles 2026-03-01 21:22:11 +08:00
Johnny 9628d3de21 fix: detect legacy installations with empty schema version 2026-03-01 20:59:39 +08:00
Johnny 7c1defba01 feat(webhook): dispatch webhook on memo comment creation 2026-03-01 20:11:23 +08:00
Johnny 53a8a436ba chore: fix frontend linter 2026-03-01 19:51:52 +08:00
Johnny 78efa6802e feat(store): change default storage type to local filesystem
Add migration scripts for existing instances without a storage setting
to explicitly preserve DATABASE as their storage type, ensuring backward
compatibility. Change the default for new installations to LOCAL to
improve out-of-the-box performance.
2026-03-01 19:42:01 +08:00
Johnny 026ea92f7b fix(editor): show newly linked memos when editing a memo with attachments 2026-03-01 19:16:57 +08:00
Johnny 252b3eff90 test(store): add tests for CreateMemo with custom timestamps 2026-03-01 19:08:27 +08:00
Mudkip 09d73e8b6e fix(mysql): handle CreateMemo custom timestamps with FROM_UNIXTIME (#5673) 2026-03-01 19:01:54 +08:00
mostapko 104d2ec0a6 feat(ui): allow navigating between images with arrows in preview dialog (#5669) 2026-03-01 11:30:47 +08:00
Steven 664b8c5629 fix(ui): unify metadata component styles across MemoView and MemoEditor
Align header padding, text color, background tokens, and item row styles
across CodeBlock, AttachmentList, RelationList, and LocationDisplay so all
metadata panels follow the same visual pattern.
2026-02-26 23:18:11 +08:00
Steven 2be4a52e1a ci: extend stale workflow to cover PRs and improve clarity
- Add PR stale/close handling alongside issues
- Reduce close grace period from 7 to 3 days
- Add inline comments explaining the two-phase stale behavior
- Rename workflow and job names for clarity
2026-02-26 22:44:47 +08:00
Kevin Zhang 54d6d8c644 chore: update documentation link in README (#5663)
Signed-off-by: Kevin Zhang <ztm0929@icloud.com>
2026-02-26 18:18:06 +08:00
milvasic 6b0736b293 fix(ui): show comment editor above the comment list (#5662) 2026-02-26 08:50:27 +08:00
Steven f7ac6a0191 refactor: auth token refresh flow and simplify user hooks 2026-02-25 22:08:18 +08:00
Steven 333c9df233 fix(web): refresh memo detail cache after editor save 2026-02-25 20:03:09 +08:00
Steven bbdc998646 fix(web): use BroadcastChannel to sync token refreshes across tabs
When multiple tabs are open and a token expires, each tab independently
attempts a refresh. With server-side token rotation this causes all but
the first tab to fail, logging the user out.

Add a BroadcastChannel (memos_token_sync) so that when any tab
successfully refreshes, it broadcasts the new token to all other tabs.
Receiving tabs adopt the token in-memory immediately, skipping their own
refresh request and avoiding conflicts with token rotation.

Falls back gracefully when BroadcastChannel is unavailable (e.g. some
privacy modes).
2026-02-24 23:31:59 +08:00
Steven 26d10212c6 refactor: consolidate duplicated auth logic into auth package
Add ApplyToContext and AuthenticateToUser helpers to the auth package,
then remove the duplicated auth code spread across the MCP middleware,
file server, Connect interceptor, and gRPC-Gateway middleware.

- auth.ApplyToContext: single place to set claims/user into context after Authenticate()
- auth.AuthenticateToUser: resolves any credential (bearer token or refresh cookie) to a *store.User
- MCP middleware: replaced manual PAT DB lookup + expiry check with Authenticator.AuthenticateByPAT
- File server: replaced authenticateByBearerToken/authenticateByRefreshToken with AuthenticateToUser
- Connect interceptor + Gateway middleware: replaced duplicated context-setting block with ApplyToContext
- MCPService now accepts secret to construct its own Authenticator
2026-02-24 23:08:16 +08:00
Steven 47d9414702 feat: add MCP server with PAT authentication
Embeds a Model Context Protocol (MCP) server into the Memos HTTP
process, exposing memo operations as MCP tools at POST/GET /mcp using
Streamable HTTP transport.

Authentication is PAT-only — requests without a valid personal access
token receive HTTP 401. Six tools are exposed: list_memos, get_memo,
create_memo, update_memo, delete_memo, and search_memos, all scoped to the authenticated user.
2026-02-24 22:54:51 +08:00
Steven 71263736b0 chore: fix codeowners 2026-02-23 20:10:18 +08:00
Mudkip ff3e4c5cfe fix: avoid truncating memo batch attachments (#5654) 2026-02-23 20:09:39 +08:00
Steven 9ecd7b876b fix(web): fix spurious logout on page reload with expired access token
Two bugs caused users to be redirected to /auth too frequently:

1. Race condition in Promise.all([initInstance(), initAuth()]):
   initInstance() makes a gRPC request whose auth interceptor calls
   getAccessToken() synchronously. When the access token was expired,
   getAccessToken() eagerly deleted it from localStorage as a "cleanup"
   side-effect. By the time initAuth() ran and checked hasStoredToken(),
   localStorage was already empty, so it skipped the getCurrentUser()
   call and the token refresh cycle entirely — logging the user out even
   when the refresh-token cookie was still valid. Fix: remove the
   localStorage deletion from getAccessToken(); clearAccessToken()
   (called on confirmed auth failure and logout) handles proper cleanup.

2. React Query retry: 1 caused a second refresh+redirect attempt after
   auth failures. The auth interceptor already handles token refresh and
   request retry internally. If it still throws Unauthenticated, the
   redirect is already in flight — a React Query retry only fires another
   failed refresh and a redundant redirectOnAuthFailure() call. Fix: use
   a shouldRetry function that skips retries for Unauthenticated errors
   while keeping the existing once-retry behaviour for other errors.
2026-02-23 14:08:59 +08:00
Steven 03c30b8ccb fix(web): fix explore page showing private tags and improve stats hook
The explore page sidebar was showing tags from the current user's private
memos because the default ListMemos query applies a server-side OR filter
(creator_id == X || visibility in [...]), mixing private content in.

Fix by using a visibility-scoped ListMemos request in the explore context
so private memos are always excluded via the AND'd server auth filter.

Also consolidate two always-firing useMemos calls into one context-aware
query, unify activity stats computation with countBy across all branches,
and extract a toDateString helper to remove duplicated formatting logic.
2026-02-23 13:15:01 +08:00
Steven 1cea9b0a78 fix(web): make MonthNavigator month label reactive to language changes
Use useTranslation() hook instead of the static i18n import so that
the month label re-computes when the language changes.
2026-02-23 11:04:04 +08:00
Steven 704503e556 fix(store): allow memo/attachment deletion when local file is missing
Fixes two bugs reported in #5603:

1. store/attachment.go: ignore os.ErrNotExist when removing a local
   attachment file so that a missing file on disk (broken state from
   failed uploads) no longer blocks deletion of the DB record, allowing
   memos referencing corrupt attachments to be deleted normally.

2. memo_attachment_service.go: add nil guard on GetAttachment result
   before dereferencing it in SetMemoAttachments, preventing a nil
   pointer panic when an attachment UID no longer exists in the DB.
2026-02-23 10:26:40 +08:00
Steven 17fc8383df fix(web): improve MemoEditor layout and timestamp popover styling 2026-02-23 10:20:00 +08:00
Steven 150371d211 fix(webhook): remediate SSRF vulnerability in webhook dispatcher
- Add plugin/webhook/validate.go as single source of truth for SSRF
  protection: reserved CIDR list parsed once at init(), isReservedIP(),
  and exported ValidateURL() used at registration/update time
- Replace unguarded http.Client in webhook.go with safeClient whose
  Transport uses a custom DialContext that re-resolves hostnames at
  dial time, defeating DNS rebinding attacks
- Call webhook.ValidateURL() in CreateUserWebhook and both
  UpdateUserWebhook paths to reject non-http/https schemes and
  reserved/private IP targets before persisting
- Strip internal service response body from non-2xx error log messages
  to prevent data leakage via application logs
2026-02-23 10:14:24 +08:00
Steven f43965de00 chore: bump version 2026-02-22 18:06:58 +08:00
Steven c3061002f3 fix(web): persist auth token in localStorage for cross-tab sessions
Switch from sessionStorage to localStorage so the auth token survives
across tabs and browser restarts, matching standard platform behavior.
Also guard the signup redirect in App.tsx behind profileLoaded to avoid
a false redirect when the instance profile fetch fails.
2026-02-22 13:55:46 +08:00
Steven 4aaebc507e fix(web): skip GetCurrentUser on init when no token is stored
When no token exists in sessionStorage, AuthContext.initialize() was
still calling GetCurrentUser, triggering the auth interceptor to attempt
RefreshToken and retry — producing a burst of 5+ auth API calls in under
a second that reverse proxies with rate limiting (e.g. CrowdSec) flag as
brute force.

Add hasStoredToken() to auth-state and bail out of initialize() early
when there is definitively no session to restore. The refresh flow for
expired tokens is preserved since hasStoredToken() checks for presence
regardless of expiry.

Fixes #5647
2026-02-22 13:40:34 +08:00
Steven b8bca6bacf fix(web): scope task list item index to memo content container
The closest() selector was targeting a CSS class that never existed on
the container, causing fallback to document.body and collecting task
items across all visible memos. This caused index collisions when
multiple memos with todo lists were on the page.

Adds data-memo-content attribute to the container and updates the
selector accordingly.

Fixes #5635
2026-02-22 13:20:29 +08:00
Steven 2ab476ef2e fix(web): memoize useNavigateTo to prevent infinite view transition loop
Wrapping the returned function in useCallback prevents a new reference
on every render, which was causing an infinite startViewTransition loop
on the initial signup page (fresh install with no admin).

Fixes #5626
2026-02-22 13:16:59 +08:00
Steven 6eaab52e48 fix(web): handle delete memo errors and only run post-delete actions on success 2026-02-22 13:00:36 +08:00
milvasic 1d9d4cd797 fix: invalidate comments query on comment reaction and delete (#5641) 2026-02-22 12:58:56 +08:00
Kaki021 122ac94273 fix(web): ensure default memo visibility is correctly applied (#5623) 2026-02-14 16:58:58 +08:00
Steven 861b58cbf3 refactor(web): extract NsfwOverlay into standalone component with flexbox centering 2026-02-12 23:19:54 +08:00
Steven aeb1e5fe40 perf(web): eliminate redundant fetch when opening inline memo editor 2026-02-12 23:02:25 +08:00
Steven 69485eecb3 chore: tweak readme 2026-02-12 22:35:58 +08:00
Johnny 6402618c26 feat(web): replace EditableTimestamp with inline editor timestamp popover 2026-02-11 23:45:53 +08:00
Johnny 566fdccae6 fix(web): allow calendar year picker to go back to 1970 2026-02-11 22:58:25 +08:00
Johnny 177a74e82b fix: allow ampersand in tags to support compound tags 2026-02-11 22:55:45 +08:00
boojack f7d370dba1 chore: tweak readme
Signed-off-by: boojack <stevenlgtm@gmail.com>
2026-02-10 23:04:35 +08:00
Steven 47e2ace690 fix(web): redirect to auth page instead of explore on session expiry
Fixes #5617
2026-02-10 21:15:44 +08:00
Steven 27063d4850 chore(ci): auto-upload binaries to GitHub Release on publish 2026-02-10 20:51:05 +08:00
Steven 71e8a06463 chore: upgrade Echo v4 to v5.0.3 2026-02-10 09:15:27 +08:00
boojack cdadead6c9 chore: add SSD Nodes sponsorship
Signed-off-by: boojack <stevenlgtm@gmail.com>
2026-02-10 08:27:18 +08:00
Steven 2b19d8a969 fix(tests): update PAT tests to accept both custom and SQL errors
The PostgreSQL implementation returns 'PAT not found' when no rows match,
while SQLite/MySQL return 'sql: no rows in result set' from QueryRowContext.

Both behaviors are correct - the key fix is that PostgreSQL no longer
throws JSONB errors on missing/malformed data.

Changes:
- Update test assertions to accept either error type
- Fix comment punctuation for godot linter
- Maintain backward compatibility across all database drivers
2026-02-09 21:09:19 +08:00
Steven d9e8387d63 fix(postgres): handle missing PAT data gracefully and add comprehensive tests
Fixes #5612, #5611

Root cause: PostgreSQL's jsonb_array_elements() throws errors when the
'tokens' key is missing or malformed, while SQLite/MySQL return NULL
gracefully. This caused:
- 502 errors when creating admin after v0.25.3 → v0.26.0 upgrade
- Settings not persisting and users unable to stay logged in

Changes to store/db/postgres/user_setting.go:
- Remove strict JSONB operations from GetUserByPATHash query
- Fetch all PERSONAL_ACCESS_TOKENS rows and filter in Go
- Skip malformed/invalid JSON rows with continue (error recovery)
- Match SQLite/MySQL's forgiving error handling

New integration tests (store/test/user_setting_test.go):
- TestUserSettingGetUserByPATHashNoTokensKey
- TestUserSettingGetUserByPATHashEmptyTokensArray
- TestUserSettingGetUserByPATHashWithOtherUsers

New PostgreSQL-specific tests (store/db/postgres/user_setting_test.go):
- TestGetUserByPATHashWithMissingData (comprehensive edge cases)
- TestGetUserByPATHashPerformance (100+ users)
- TestUpsertUserSetting (basic upsert)

Test coverage:
 Missing PERSONAL_ACCESS_TOKENS key
 Empty/malformed JSON data
 Multiple users with mixed valid/invalid data
 Performance with 100+ users
 Error recovery without crashes

Benefits:
- No database migration required (TEXT column works fine)
- Backward compatible with v0.25.3 upgrades
- Handles missing/corrupt data gracefully
- Consistent behavior across all database drivers
2026-02-09 21:02:09 +08:00
MuLingQwQ b5108b4f97 fix(web): calendar navigation should use current page path (#5605) 2026-02-09 20:40:12 +08:00
Johnny b623162d37 chore: fix static check linter warnings 2026-02-08 21:37:02 +08:00
Johnny ba615172b0 chore: bump version 2026-02-08 21:28:11 +08:00
Johnny 984d9b461b fix: gracefully handle deleted memos in activity service to prevent inbox crashes 2026-02-08 21:26:18 +08:00
Johnny a69056a1c2 fix: handle underscores in environment variables correctly 2026-02-08 20:38:43 +08:00
Johnny f827296d6b chore: fix broken links 2026-02-08 19:46:03 +08:00
Johnny d9dc5be200 fix: replace echo.NewHTTPError with status.Errorf 2026-02-08 19:23:34 +08:00
Johnny c4176b4ef1 fix: videos attachment 2026-02-07 16:03:52 +08:00
Steven 81ef53b398 fix: prevent 401 errors on window focus when token expires
Fixes #5589

When the page returns from background to foreground after the JWT
token expires (~15 min), React Query's automatic refetch-on-focus
triggers multiple API calls simultaneously. These all fail with 401
Unauthorized, leaving the user with empty content.

Solution:
- Add useTokenRefreshOnFocus hook that listens to visibilitychange
- Proactively refresh token BEFORE React Query refetches
- Uses 2-minute buffer to catch expiring tokens early
- Graceful error handling - logs error but doesn't block

Changes:
- Created web/src/hooks/useTokenRefreshOnFocus.ts
- Updated isTokenExpired() to accept optional buffer parameter
- Exported refreshAccessToken() for use by the hook
- Integrated hook into AppInitializer (only when user authenticated)
2026-02-05 22:14:48 +08:00
Steven 86f780d1a4 chore: tweak security report email 2026-02-05 19:43:19 +08:00
Steven cf65f0867b refactor: remove hide-scrollbar utility
Removed the hide-scrollbar CSS class and all its usages throughout the
codebase. Hiding scrollbars can hurt UX by making it unclear when
content is scrollable.

Changes:
- Removed hide-scrollbar CSS definition from index.css
- Removed hide-scrollbar class from Navigation component (2 instances)
- Removed hide-scrollbar class from MemoDetailSidebar (2 instances)
- Removed hide-scrollbar class from TagsSection
- Removed hide-scrollbar class from ShortcutsSection

Components now use standard browser scrollbar behavior, which provides
better visual feedback to users about scrollable content. Modern
browsers already handle scrollbar appearance elegantly.
2026-02-04 20:24:54 +08:00
Steven 74b63b278c perf: disable tooltips in year calendar to fix lag
Fixed issue #5579 where the calendar selection dialog was very laggy.

The root cause was rendering ~365 individual Tooltip components when
opening the year calendar view (one per day with activity). This created
a huge number of DOM nodes and event listeners that caused significant
performance issues.

Changes:
- Added disableTooltips prop to MonthCalendar and CalendarCell components
- Disabled tooltips in YearCalendar's small month views
- Removed unnecessary TooltipProvider wrapper in YearCalendar
- Tooltips remain enabled in the default month calendar view

Performance improvements:
- Eliminates ~365 tooltip instances when dialog opens
- Reduces initial render time significantly
- Makes dialog interactions smooth and responsive

Users can still click on dates to drill down for details if needed.
2026-02-04 20:14:55 +08:00
Steven e7605d90da fix: shortcut edit button opens create dialog instead of edit dialog
Fixed issue #5576 where clicking the edit button on a shortcut would
incorrectly open a create dialog instead of an edit dialog.

The root cause was an incorrect useEffect that was watching the shortcut
state itself instead of the initialShortcut prop. When the dialog was
opened for editing, the state wasn't properly reinitializing with the
existing shortcut data.

Changed the useEffect to:
- Watch initialShortcut as the dependency
- Reinitialize the shortcut state when initialShortcut changes
- Properly distinguishes between create (initialShortcut undefined) and
  edit (initialShortcut has data) modes
2026-02-04 20:03:53 +08:00
memory_clear f9bf903eea chore: update access token deletion message description for zh-Hans (#5573)
Signed-off-by: memory_clear <83893503+MemoryClear@users.noreply.github.com>
2026-02-04 19:54:51 +08:00
Steven 6bb383a4a5 fix: prevent CTRL+Enter save while editor is loading content (#5581)
- Add validation check for loading state before allowing save
- Prevents false "Content, attachment, or file required" error
- Occurs when user presses CTRL+Enter immediately after opening edit mode
- Editor state may still be loading when keyboard shortcut fires

Closes #5581
2026-02-03 23:55:07 +08:00
Steven b4fea8c647 fix: nested task list display and checkbox interaction (#5575)
- Fix nested task lists not showing proper indentation
- Use simple CSS cascade with [&_ul.contains-task-list]:ml-6
- Fix checkbox clicks toggling wrong tasks in nested lists
- Search from memo root container for global task indexing
- Remove complex selectors in favor of standard approach
- Match behavior of GitHub, Notion, and other platforms

Closes #5575
2026-02-03 23:45:45 +08:00
Steven cf0a285ef1 fix(auth): make PKCE optional for OAuth sign-in (#5570)
Fixes issue where OAuth sign-in fails with 'Cannot read properties of
undefined (reading 'digest')' when accessing Memos over HTTP.

The crypto.subtle API is only available in secure contexts (HTTPS or
localhost), but PKCE (RFC 7636) is optional per OAuth 2.0 standards.

Changes:
- Make PKCE generation optional with graceful fallback
- Use PKCE when crypto.subtle available (HTTPS/localhost)
- Fall back to standard OAuth flow when unavailable (HTTP)
- Log warning to console when PKCE unavailable
- Only include code_challenge in auth URL when PKCE enabled

The backend already supports optional PKCE (empty codeVerifier), so no
backend changes needed. This fix aligns frontend behavior with backend.

Benefits:
- OAuth sign-in works on HTTP deployments (reverse proxy scenarios)
- Enhanced security (PKCE) still used when HTTPS available
- Backward compatible with OAuth providers that don't support PKCE

Fixes #5570
2026-02-02 23:28:21 +08:00
Steven 7465fbb4cc refactor: improve GitHub Actions workflows structure and maintainability
- Add build-binaries workflow for multi-platform binary releases
- Rename workflows for conciseness:
  - demo-render-deploy.yml → demo-deploy.yml
  - build-and-push-canary-image.yml → build-canary-image.yml
  - build-and-push-stable-image.yml → build-stable-image.yml
- Centralize version config with env variables (GO_VERSION, NODE_VERSION, PNPM_VERSION)
- Standardize step names across all workflows
- Add concurrency controls to prevent redundant runs
- Update Node.js (20→22) and pnpm (9→10) versions to match build-binaries
- Improve job names with descriptive labels
- Add consistent comments and formatting
- Set artifact retention to 60 days for binary builds
2026-02-02 23:15:15 +08:00
Steven 4033f64b9a feat: add build binaries workflow for multi-platform releases
- Add workflow_dispatch trigger for manual binary builds
- Build for linux (amd64, arm64, arm/v7), darwin (amd64, arm64), windows (amd64)
- Package as tar.gz (Unix) and zip (Windows)
- Generate build summary with artifact sizes
2026-02-02 22:54:30 +08:00
Steven 29412f4690 refactor: simplify NSFW implementation by inlining logic
- Remove unused showNsfwContent prop (was only used in MemoDetail to pre-reveal NSFW, which defeats the purpose)
- Inline useNsfwContent hook logic directly into MemoView.tsx (only 3 lines, no reusability benefit)
- Delete web/src/components/MemoView/hooks/useNsfwContent.ts
- NSFW content now consistently starts hidden across all pages
- Maintains same user experience: click to reveal, no toggle back

This removes unnecessary indirection and prop threading while preserving functionality.
2026-02-02 22:06:04 +08:00
Steven 6db58fae11 fix: prevent private memos from disappearing during token refresh (#5565)
Root cause: enabled={isInitialized && !!user} prevented displaying cached
data when user auth state transitioned during token refresh.

Changes:
- Remove !!user check from Home page enabled condition
- Add clearAccessToken() in redirectOnAuthFailure for clean logout

Fixes #5565
2026-02-02 21:45:24 +08:00
Steven 8770b186e4 fix: add Unicode case-insensitive search for SQLite (#5559)
Add custom memos_unicode_lower() SQLite function to enable proper
case-insensitive text search for non-English languages (Cyrillic,
Greek, CJK, etc.).

Previously, SQLite's LOWER() only worked for ASCII characters due to
modernc.org/sqlite lacking ICU extension. This caused searches for
non-English text to be case-sensitive (e.g., searching 'блины' wouldn't
find 'Блины').

Changes:
- Add store/db/sqlite/functions.go with Unicode case folding function
- Register custom function using golang.org/x/text/cases.Fold()
- Update filter renderer to use custom function for SQLite dialect
- Add test for Unicode case-insensitive search
- Make golang.org/x/text a direct dependency

Fixes #5559
2026-02-02 21:10:07 +08:00
Damian Jankowski c14843fa62 chore: view memo URL updated (#5569) 2026-02-02 20:39:33 +08:00
Steven 2db57b139a fix: handle pasted files in memo editor
Fixes #5568
2026-02-02 20:36:08 +08:00
Steven 0dbc35a2ba fix: restore access token creation flow
Fixes #5563
2026-02-02 20:31:22 +08:00
Steven e1c8101d29 fix: preserve tag case when extracting markdown tags
Fixes #5566
2026-02-02 20:07:06 +08:00
Steven 34c341c88c chore: fix update user request name in member dialog
Fixed #5564
2026-02-02 19:52:46 +08:00
Steven b8029c70ef chore: fix OAuth callback double-run state error 2026-02-02 09:07:55 +08:00
Johnny d14cfa1c4f fix: auto-fix permission issues when upgrading from 0.25.3 to 0.26.0
Fixes #5551

The Docker image now runs as non-root (UID 10001) for security, but this
breaks upgrades from 0.25.3 where data files were owned by root.

Changes:
- Dockerfile: Keep USER as root, install su-exec
- entrypoint.sh: Fix ownership of /var/opt/memos, then drop to non-root
- Supports custom MEMOS_UID/MEMOS_GID env vars for flexibility

This allows seamless upgrades without manual chown on the host.
2026-02-01 08:37:06 +08:00
Johnny 1696c6c414 fix: add nil check for currentUser in DeleteUser
Defense-in-depth fix: Add missing nil check before accessing
currentUser.ID and currentUser.Role in DeleteUser function.

While the auth interceptor should block unauthenticated requests,
this check prevents potential nil pointer panic if fetchCurrentUser
returns (nil, nil).
2026-01-31 23:08:09 +08:00
Johnny c7b48b800f fix: add access control checks for attachments, comments, and reactions
Security fixes for multiple authorization bypass vulnerabilities:

- GetAttachment: Add visibility check via checkAttachmentAccess helper
- UpdateAttachment: Add ownership check (creator or admin only)
- Fileserver: Require creator/admin auth for unlinked attachments
- ListMemoAttachments: Add memo visibility check
- CreateMemoComment: Add memo visibility check for target memo
- ListMemoReactions: Add memo visibility check
- UpsertMemoReaction: Add memo visibility check

All checks follow the existing pattern used in GetMemo for consistency.
2026-01-31 23:02:30 +08:00
Johnny 86fab0cf4c fix(fileserver): use streaming for video/audio to prevent memory exhaustion
- Add serveMediaStream() to stream video/audio without loading into memory
- Use http.ServeFile for local files (zero-copy, handles range requests)
- Redirect to S3 presigned URLs for S3-stored media files
- Refactor for better maintainability:
  - Extract constants and pre-compile lookup maps
  - Consolidate duplicated S3 client creation logic
  - Split authentication into focused helper methods
  - Group code by responsibility with section comments
  - Add setSecurityHeaders() and setMediaHeaders() helpers
2026-01-31 22:01:28 +08:00
Ganesh M 27de96d440 fix(ui): math render (#5549) 2026-01-31 21:46:19 +08:00
Johnny 8cd9c591d4 chore: deprecate remove completed tasks action
- Remove menu item and dialog from MemoActionMenu
- Remove removeCompletedTasks() and hasCompletedTasks() utilities
- Remove translation keys from all 34 locale files
- Feature was not aligned with standard note-taking UX patterns
2026-01-31 21:03:05 +08:00
Johnny 5396c126b8 chore: extract task list class names to constants
- Add TASK_LIST_CLASS and TASK_LIST_ITEM_CLASS constants
- Replace hardcoded 'contains-task-list' and 'task-list-item' strings
- Improve maintainability and prevent typos
2026-01-31 20:53:55 +08:00
Johnny 97ba15450f chore: prevent unnecessary API calls when timestamp unchanged in MemoDetailSidebar
- Add same value check before updating createTime/updateTime
- Skip request if new timestamp equals current timestamp
- Simplify callback handlers and improve code readability
- Use .some() instead of .filter().length for cleaner code
2026-01-31 15:12:27 +08:00
Johnny f7a81296fb style: enhance ActivityCalendar components with improved styling and layout adjustments 2026-01-30 00:13:58 +08:00
Johnny fcb9e377c1 chore: streamline memo editor insert menu 2026-01-29 23:34:40 +08:00
Steven b32cba35c6 fix: add nil check for AnyResponse in WrapUnary method to prevent caching issues 2026-01-29 21:32:54 +08:00
Steven b0558824c4 feat: update instance profile to use admin user instead of initialized flag
- Changed InstanceProfile to include admin user field
- Updated GetInstanceProfile method to retrieve admin user
- Modified related tests to reflect changes in admin user retrieval
- Removed owner cache logic and tests, introducing new admin cache tests
2026-01-28 23:27:53 +08:00
Johnny 81022123a1 chore: simplify page loading logic 2026-01-27 23:37:32 +08:00
cui c5d9770fd1 typo: lenght to length (#5539) 2026-01-27 22:21:55 +08:00
Johnny 6731eccded feat: add EditableTimestamp component for inline date editing in MemoDetailSidebar 2026-01-26 23:23:14 +08:00
Johnny a7b0d71f6e feat: implement EXIF metadata stripping for image uploads 2026-01-26 22:18:44 +08:00
Brent Bilis 2f7c8dcea7 fix(ui): correct calendar header month parsing (#5532)
Co-authored-by: Local Admin <root@localhost>
2026-01-26 22:01:11 +08:00
Johnny e1888153f8 chore: polish dark styles 2026-01-26 21:59:36 +08:00
Johnny 98eaff1277 style: adjust spacing and background colors for improved UI consistency across components 2026-01-26 21:49:26 +08:00
Johnny 72c7965c8f chore: enable binary format for transport 2026-01-26 21:16:06 +08:00
Salman Chishti a8dbc1fd5e chore: upgrade GitHub Actions for Node 24 compatibility (#5527)
Signed-off-by: Salman Muin Kayser Chishti <13schishti@gmail.com>
2026-01-26 09:02:57 +08:00
itzmk21 f22b3dad25 chore(i18n): update British English spelling (#5529) 2026-01-26 08:48:43 +08:00
Salman Chishti 1e82723e88 chore: upgrade GitHub Actions to latest versions (#5528)
Signed-off-by: Salman Muin Kayser Chishti <13schishti@gmail.com>
2026-01-26 08:48:07 +08:00
XIN_____ 45945a1df7 chore: update Chinese translation (#5519) 2026-01-23 23:32:58 +08:00
Pádraic Slattery 7fbf3bed85 chore: update outdated GitHub Actions versions (#5522) 2026-01-23 23:22:14 +08:00
Johnny ad327a4a8d fix: adjust compact mode styling for MemoContent component 2026-01-23 09:11:33 +08:00
Johnny 7154ce0228 feat: implement markdown components for enhanced rendering 2026-01-23 09:04:42 +08:00
Steven c0d6224155 chore: enable compact mode for list view 2026-01-22 22:52:14 +08:00
Steven 6c9ea31de0 chore: add translation for saving status in EditorToolbar 2026-01-22 22:31:19 +08:00
Steven 501e8f1eae chore: implement read-write lock for owner cache 2026-01-22 22:11:47 +08:00
Steven edcddf3c95 chore: fix tests 2026-01-22 21:59:23 +08:00
Steven fd29a98c90 chore: fix linter 2026-01-22 21:03:05 +08:00
Steven ba099b72ed feat: update InstanceProfile to include initialization status
- Removed the owner field from InstanceProfile as it is no longer needed.
- Added an initialized field to InstanceProfile to indicate if the instance has completed first-time setup.
- Updated GetInstanceProfile method to set initialized based on the existence of an admin user.
- Modified tests to reflect changes in InstanceProfile and ensure correct behavior regarding instance initialization.
- Adjusted frontend logic to redirect users based on the initialized status instead of the owner field.
2026-01-22 20:59:40 +08:00
Steven c240b70591 feat: add enabled option to useInfiniteMemos and PagedMemoList for conditional fetching 2026-01-22 20:21:16 +08:00
Steven 956ae0ebc5 fix: prevent browser caching of API responses in MetadataInterceptor 2026-01-21 08:12:23 +08:00
Steven 9cc970a3ea chore: fix data directory handling 2026-01-21 08:02:25 +08:00
Steven 4180613fc0 fix: update demo mode handling 2026-01-21 07:36:30 +08:00
Johnny 324f795965 fix: improve default data directory handling 2026-01-20 23:55:46 +08:00
Johnny d3ed069ddb refactor: remove environment variable binding for instance URL 2026-01-20 23:45:59 +08:00
Johnny 0f3c9a467d refactor: migrate HOST roles to ADMIN
- Updated the isSuperUser function to only check for ADMIN role.
- Added SQL migration scripts for MySQL, PostgreSQL, and SQLite to change user roles from HOST to ADMIN.
- Created a new SQLite migration to alter the user table structure and ensure data integrity during the migration process.
2026-01-20 23:38:30 +08:00
Johnny 47ebb04dc3 refactor: remove mode flag and introduce explicit demo flag 2026-01-20 22:58:33 +08:00
Johnny 05f31e457e fix: add mmap size setting to database connection to prevent OOM errors 2026-01-20 21:53:31 +08:00
Johnny 552318209b fix: resolve flaky migration tests and add stable upgrade test (#5514) 2026-01-20 19:25:00 +08:00
Steven 00f21b86e2 chore: remove redundant tests 2026-01-20 09:12:36 +08:00
Steven d8b5bd61ab chore: tweak sponsor assets 2026-01-20 08:58:25 +08:00
Johnny 7089db06c2 test: enhance memo filter tests with COALESCE for JSON extraction and add migration data persistence tests 2026-01-19 23:09:17 +08:00
Johnny af2a2588bf chore(test): add edge case tests for user settings shortcuts and JSON fields 2026-01-19 22:50:14 +08:00
Johnny dc7ec8a8ad feat: allow setting custom timestamps when creating memos and comments
Allow API users to set custom create_time, update_time, and display_time
when creating memos and comments. This enables importing historical data
with accurate timestamps.

Changes:
- Update proto definitions: change create_time and update_time from
  OUTPUT_ONLY to OPTIONAL to allow setting on creation
- Modify CreateMemo service to handle custom timestamps from request
- Update database drivers (SQLite, MySQL, PostgreSQL) to support
  inserting custom timestamps when provided
- Add comprehensive test coverage for custom timestamp functionality
- Maintain backward compatibility: auto-generated timestamps still
  work when custom values are not provided
- Fix golangci-lint issues in plugin/filter (godot and revive)

Fixes #5483
2026-01-17 12:56:03 +08:00
Johnny cbf46a2988 feat(filter): add CEL list comprehension support for tag filtering
Add support for CEL exists() comprehension with startsWith, endsWith, and
contains predicates to enable powerful tag filtering patterns.

Features:
- tags.exists(t, t.startsWith("prefix")) - Match tags by prefix
- tags.exists(t, t.endsWith("suffix")) - Match tags by suffix
- tags.exists(t, t.contains("substring")) - Match tags by substring
- Negation: !tags.exists(...) to exclude matching tags
- Works with all operators (AND, OR, NOT) and other filters

Implementation:
- Added ListComprehensionCondition IR type for comprehension expressions
- Parser detects exists() macro and extracts predicates
- Renderer generates optimized SQL for SQLite, MySQL, PostgreSQL
- Proper NULL/empty array handling across all database dialects
- Helper functions reduce code duplication

Design decisions:
- Only exists() supported (all() rejected at parse time with clear error)
- Only simple predicates (matches() excluded to avoid regex complexity)
- Fail-fast validation with helpful error messages

Tests:
- Comprehensive test suite covering all predicates and edge cases
- Tests for NULL/empty arrays, combined filters, negation
- Real-world use case test for Issue #5480 (archive workflow)
- All tests pass on SQLite, MySQL, PostgreSQL

Closes #5480
2026-01-17 12:36:39 +08:00
zz4zz f600fffe93 fix: use stable memos image tag (#5482) 2026-01-14 23:56:27 +08:00
Johnny 4bd0f29ee5 fix: resolve linter warning and cache race condition
- Suppress revive redundant-test-main-exit warning with //nolint
- Fix data race in cache.Clear() by using Delete() instead of map replacement
- Both changes maintain correct behavior while fixing CI failures
2026-01-14 23:50:37 +08:00
Johnny db57f4456a fix: resolve data races in store tests with atomic operations
Fix all data races detected by -race flag in parallel store tests.

Problems fixed:
1. TestMain not propagating exit code
   - Was: m.Run(); return
   - Now: os.Exit(m.Run())

2. Data races on global DSN variables
   - mysqlBaseDSN and postgresBaseDSN written in sync.Once
   - Read outside Once without synchronization
   - Race detector: write/read without happens-before relationship

3. Data races on container pointers
   - mysqlContainer, postgresContainer, testDockerNetwork
   - Same pattern: write in Once, read in cleanup

Solution: Use atomic operations
- atomic.Value for DSN strings (Store/Load)
- atomic.Pointer for container pointers (Store/Load)
- Provides proper memory synchronization
- Race-free reads and writes

Why sync.Once alone wasn't enough:
- sync.Once guarantees function runs once
- Does NOT provide memory barrier for variables written inside
- Reads outside Once have no synchronization with writes
- Race detector correctly flags this as violation

Technical details:
- atomic.Value.Store() provides release semantics
- atomic.Value.Load() provides acquire semantics
- Guarantees happens-before relationship per Go memory model
- All 159 parallel tests can safely access globals

Impact:
- Tests now pass with -race flag
- No performance degradation (atomic ops are fast)
- Maintains parallel execution benefits (8-10x speedup)
- Proper Go memory model compliance

Related: Issues #2, #3 from race analysis
2026-01-14 23:37:12 +08:00
Johnny e082adf7b6 fix: set DRIVER=sqlite in CI to prevent TestMain from spawning child processes
Problem:
- store/test/TestMain checks if DRIVER env var is set
- If not set, it runs tests for all 3 drivers (sqlite, mysql, postgres)
  by spawning child 'go test' processes
- This conflicts with t.Parallel() in individual tests
- CI workflow didn't set DRIVER, triggering multi-driver execution

Solution:
- Set DRIVER=sqlite in GitHub Actions workflow
- TestMain will run tests once with SQLite driver
- Tests run in parallel with t.Parallel() as intended
- Avoids spawning child processes and race conditions

Why SQLite:
- Fastest test execution (no container startup)
- Sufficient for CI validation
- MySQL/Postgres can be tested locally when needed

This fixes the 'table already exists' errors and test flakiness
in CI while maintaining parallel execution benefits.
2026-01-14 22:50:30 +08:00
Johnny 411e8fc5b0 perf: enable parallel execution for all store tests
Add t.Parallel() to all 159 test functions in store/test/

Benefits:
- Tests run in parallel (8-16 concurrent on typical CI)
- Each test already has isolated database (safe to parallelize)
- No shared state between tests
- Go test runner handles synchronization

Expected performance:
- SQLite tests: 4-6min → 30-45sec (87% faster)
- MySQL tests: 6-8min → 45-60sec (88% faster)
- Better CPU utilization (10-15% → 80-95%)

Why it's safe:
- NewTestingStore() creates isolated DB per test
- No global state mutations
- Each test uses t.TempDir() for file isolation
- Container-based tests use unique database names

Impact on CI workflow:
- Backend tests workflow: 4-6min → 1-2min total
- Store test group: 3-4min → 20-30sec
- 8-10x speedup from parallelization alone
2026-01-14 22:44:19 +08:00
Johnny 07b837b6f6 perf: optimize backend tests with parallel execution
Major improvements:
- Split tests into 4 parallel groups (store, server, plugin, other)
  * 3-4x faster test execution (4-6min → 1-2min)

- Enable golangci-lint cache (was disabled)
  * Saves 20-30s on lint checks

- Remove unnecessary flags
  * check-latest: API call overhead
  * --verbose: unnecessary output
  * skip-cache: disabled caching

- Add race detector (-race)
  * Better concurrency bug detection
  * Only 10-20% overhead

- Add coverage tracking
  * Per-group coverage upload to Codecov
  * Better visibility into test quality

- Add concurrency control
  * Cancel outdated PR runs
  * Saves runner minutes

- Clean up output processing
  * Remove test.log and complex awk/sed parsing
  * GitHub Actions shows output by default

Performance impact:
- Setup: 30s → 10s (2-3x faster)
- Tests: Sequential → 4 parallel jobs (3-4x faster)
- Total: 4-6min → 1-2min (~70% faster)
2026-01-14 22:34:46 +08:00
Johnny d7c5641246 fix: correct manifest merge step in workflows
- Re-run docker/metadata-action in merge job to generate proper JSON
- Use steps.meta.outputs.json instead of needs.prepare.outputs.tags
- Remove unused prepare job outputs (tags, labels)
- Simplify workflow dependency chain

This fixes the jq parse error when creating multi-arch manifests.
2026-01-14 22:28:26 +08:00
Johnny d1d2d86900 perf: optimize CI/CD workflows and Docker builds
- Implement parallel matrix builds for multi-platform images (~50% faster)
- Add pnpm store caching for 20-40s savings on cache hits
- Use --frozen-lockfile for faster, deterministic installs
- Optimize Dockerfile: CGO_ENABLED=0, -trimpath, static linking
- Reduce Docker layers and improve caching strategy
- Enhance .dockerignore to exclude unnecessary files (~1MB saved)

Build time improvements:
- Canary: 12-18min → 6-10min
- Stable: 17-27min → 8-12min
2026-01-14 22:12:28 +08:00
Johnny 253e79c111 style: remove unnecessary font-weight classes for cleaner UI 2026-01-13 23:19:43 +08:00
Steven 73c301072b refactor: simplify editor scroll logic
- Extract `scrollToCaret` helper to deduplicate scroll logic
- Unify precise scroll behavior for both manual triggers and auto-scroll
2026-01-13 21:23:23 +08:00
Steven 4e34ef22bf fix: improve editor auto-scroll and Safari IME handling (#5469)
- Use `textarea-caret` for precise cursor position calculation instead of line approximation
- Update `scrollToCursor` to scroll to the actual cursor position
- Fix Safari double-enter issue with IME in list completion
2026-01-13 21:19:31 +08:00
Steven 61dbca8dc2 fix: prevent browser cache from serving stale memo data (#5470)
This fixes a critical data loss issue where users editing the same memo
on multiple devices would overwrite each other's changes due to aggressive
browser caching, particularly in Chromium-based browsers and PWAs.

Changes:
- Backend: Add Cache-Control headers to all API responses to prevent
  browser HTTP caching
- Frontend: Force fresh fetch from server when opening memo editor by
  invalidating React Query cache
- Frontend: Reduce memo query staleTime from 60s to 10s for better
  collaborative editing support

Fixes #5470
2026-01-13 20:55:21 +08:00
Johnny c45a59549a fix: replace os.Exit with panic for clearer error handling 2026-01-12 23:36:48 +08:00
Johnny 69b62cccdb test: optimize store tests performance by reusing docker image and reducing build context 2026-01-12 23:30:56 +08:00
Johnny f58533003b fix: clean up memo_relation and attachments when deleting memo
Fixes #5472

Move cleanup logic to store.DeleteMemo to ensure data consistency:
- Delete memo_relation records where memo is source (MemoID) or target (RelatedMemoID)
- Delete attachments linked to the memo (including S3/local files)

This prevents stale COMMENT records in memo_relation after deleting
a memo that has comments.
2026-01-12 23:18:04 +08:00
Johnny 6899c2f66a chore: fix golangci-lint 2026-01-12 22:32:38 +08:00
Johnny 31f634b71a chore: add more tests 2026-01-12 22:28:42 +08:00
Johnny 8f9ff5634c chore: remove redundant icon 2026-01-12 09:11:08 +08:00
Johnny 9a3451b9d1 fix(editor): filter RelationList to only show referencing memos
- Filter out COMMENT type relations, only show REFERENCE type
- When editing a memo, only show relations where current memo is the source
- Pass memoName through EditorMetadata to RelationList for filtering
2026-01-11 22:41:20 +08:00
Johnny 7053edae27 fix: allow guests to view public memo comments
Add ListMemoComments to public endpoints whitelist so unauthenticated
users can see public comments. The service layer already filters
comments by visibility (only PUBLIC for guests).

Fixes #5471
2026-01-11 22:35:12 +08:00
Faizaan pochi da2dd80e2f fix: return Unauthenticated instead of PermissionDenied on token expiration (#5454) 2026-01-08 23:21:33 +08:00
Jongho Hong 07eac279d0 chore(i18n): add missing Korean translations (#5456)
Signed-off-by: Jongho Hong <myodan@pm.me>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-08 23:13:21 +08:00
Johnny 1e8505bfeb chore: fix tests 2026-01-08 23:06:28 +08:00
Johnny af6a0726d8 chore: drop redundant indexes in sqlite migration 2026-01-08 22:53:46 +08:00
Johnny 1985205dc2 chore: remove memo_organizer table 2026-01-08 22:28:13 +08:00
Johnny f4cf2e9559 test: improve migration tests stability and maintainability
- Fix linting issues and address testcontainers deprecation in store/test/containers.go
- Extract MemosStartupWaitStrategy for consistent container health checks
- Refactor migrator_test.go to use a consolidated testMigration helper, reducing duplication
- Add store/test/Dockerfile for optimized local test image builds
2026-01-07 23:04:12 +08:00
Om vataliya 013ea52519 fix: apply theme and locale changes immediately on login screen (#5440) (#5442) 2026-01-07 21:58:47 +08:00
Faizaan pochi 7c3fcc297d fix: allow public memo API access without authentication (#5451) 2026-01-07 20:52:04 +08:00
Johnny 14fb38f375 fix: attachment table name 2026-01-07 20:44:21 +08:00
Johnny c29c1d3e1f fix: seed data 2026-01-07 20:41:16 +08:00
Johnny cc9a214be8 revert: revert system_setting to instance_setting rename changes
Reverts only the system_setting → instance_setting rename related changes from commit d326c71.
Keeps the resource → attachment rename changes intact.

- Reverts table name back to system_setting in all database drivers (MySQL, PostgreSQL, SQLite)
- Removes migration files for the system_setting rename
- Reverts LATEST.sql files to use system_setting table
2026-01-07 20:38:02 +08:00
Johnny e75862de31 chore: fix tests 2026-01-07 09:17:34 +08:00
Johnny 79f1edc9ba chore: bump version 2026-01-07 09:08:20 +08:00
Johnny 9ccb658768 fix: sign up redirect 2026-01-07 08:50:10 +08:00
Johnny 64b487d4af chore: fix seed data 2026-01-07 08:34:42 +08:00
Johnny d326c71078 refactor(db): rename tables for clarity - resource→attachment, system_setting→instance_setting 2026-01-06 23:36:42 +08:00
Johnny 01669685b4 fix(ci): remove invalid revive rule 'use-waitgroup-go' from golangci-lint config 2026-01-06 21:12:40 +08:00
Johnny 1f755f74a4 fix(web): make login screen theme selector reactive
This fixes an issue where the theme selector on the login screen would not update its display value after selection because the component was not re-rendering. Added local state to track the current theme. Validated that this pattern is unique to the unauthenticated context.
2026-01-06 20:51:45 +08:00
Steven fb4f3e70dc fix: resolve golangci-lint issues 2026-01-06 20:41:24 +08:00
Steven e1941e7843 fix: attachment type checks 2026-01-06 20:37:04 +08:00
Faizaan pochi 874a4a7142 fix: KaTeX math rendering with underscores (#5438) 2026-01-06 20:16:01 +08:00
Steven 62646853eb chore: tweak comments display 2026-01-06 19:08:03 +08:00
Steven ed66e0fec2 chore: fix linter 2026-01-06 09:08:27 +08:00
Steven 5a8e1845e2 fix: reaction button in mobile view 2026-01-06 09:06:52 +08:00
Johnny d68ca84832 fix: delete unused attachments by using filter 2026-01-05 22:43:57 +08:00
Johnny 4b110d0d38 fix: cursor position after slash commands 2026-01-05 22:24:13 +08:00
Steven 15646a8989 chore: fix linter 2026-01-05 21:57:07 +08:00
Steven e268a1fe9c chore: tweak memo content renderer 2026-01-05 21:50:49 +08:00
Steven ac37738148 fix: default visibility setting 2026-01-05 21:46:35 +08:00
lif 86013d6c2a fix(scripts): add file existence check in file_env (#5424)
Signed-off-by: majiayu000 <1835304752@qq.com>
2026-01-04 19:18:48 +08:00
lif cbbb585b2e fix(frontend): ensure attachments are properly linked when creating memos (#5428)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 19:17:14 +08:00
Sheep-realms b7b658358e chore: update simplified chinese localization (#5422) 2026-01-04 19:10:24 +08:00
Roman Teitge 8cf99f5200 Update german translations (#5419)
Signed-off-by: Roman Teitge <83205200+rteitge@users.noreply.github.com>
2026-01-04 19:10:08 +08:00
Steven 06d1c60aaf chore: tweak domain format 2026-01-03 20:43:10 +08:00
Johnny d2b421213f chore: optimize RelationList and unify RelationCard usage 2026-01-03 14:27:12 +08:00
Johnny 77e9376e03 chore: improve metadata section UI consistency and maintainability 2026-01-03 13:54:47 +08:00
Johnny 5612fb8f41 feat: add HDR image and video support
- Add HDR detection utilities for wide color gamut formats (HEIC, HEIF, WebP)
- Apply colorSpace attribute to image/video elements for HDR-capable files
- Update frontend components (AttachmentCard, PreviewImageDialog, AttachmentList)
- Expand backend thumbnail generation to support HEIC, HEIF, WebP formats
- Add Color-Gamut response headers to advertise wide gamut support
- Extend avatar MIME type validation for HDR formats

Supported formats:
- Images: HEIC, HEIF, WebP, PNG, JPEG
- Videos: MP4, QuickTime, Matroska, WebM (VP9 Profile 2)

Browser support:
- Safari 14.1+, Chrome 118+, Edge 118+
- Gracefully degrades to sRGB on unsupported browsers
2026-01-03 13:16:56 +08:00
Johnny e761ef8684 chore: move memo-metadata components to MemoView and MemoEditor
- Remove shared memo-metadata folder
- Move metadata display components (AttachmentList, LocationDisplay, RelationList) to MemoView/components/metadata
- Move attachment types and utilities (LocalFile, AttachmentItem, toAttachmentItems) to MemoEditor/types/attachment
- Simplify AttachmentList and AttachmentCard to work directly with Attachment proto
- Update all imports across MemoEditor and MemoView components
- Better separation of concerns: MemoView handles display, MemoEditor handles local files + attachments
2026-01-03 13:07:53 +08:00
Johnny a6e8ba7fb2 refactor: consolidate MemoEditor components (#5409) 2026-01-03 12:49:13 +08:00
Johnny a630b70ba9 chore: add .worktrees to gitignore 2026-01-03 12:44:37 +08:00
Guillaume e85a3da899 chore: add missing French locale translations (#5405)
Co-authored-by: Guillaume Reichenbach <guillaume.reichenbach@reflet-digital.com>
2026-01-03 07:46:24 +08:00
Lynchi 7b35a2672f chore: unify the Chinese localization of ellipsis (#5404)
Signed-off-by: Lynchi <77619755+Linqi1234@users.noreply.github.com>
2026-01-03 07:45:07 +08:00
Johnny d2acebcc53 fix: auth checks in reaction selector 2026-01-02 23:36:41 +08:00
Johnny ef8e3cfb99 chore: remove unused keyboard shortcuts 2026-01-02 09:57:09 +08:00
Johnny 02f39c2a59 refactor: replace generic LeafletMap with dedicated LocationPicker 2026-01-02 09:36:30 +08:00
Johnny f66c750075 chore: simplify attachment file writing 2025-12-31 21:54:37 +08:00
Johnny bd02de9895 chore: add store tests (#5397) 2025-12-31 21:26:35 +08:00
Johnny 12f32acd09 chore: remove dnd-kit dependencies 2025-12-31 09:32:23 +08:00
Johnny be1b758d30 refactor: simplify memo-metadata components 2025-12-31 09:27:37 +08:00
Johnny d7284fe867 refactor: nest reaction resource names under memos 2025-12-30 23:29:54 +08:00
Johnny c2aea5a4b7 feat: implement refresh token rotation with sliding window sessions in the auth service 2025-12-30 23:00:15 +08:00
Johnny d55af9b527 refactor: standardize loading indicators by using Spinner for route fallbacks and specializing Skeleton for memo lists 2025-12-30 21:54:22 +08:00
Johnny 61e94e8b08 refactor: replace i18n language change with loadLocale 2025-12-30 21:07:56 +08:00
Johnny 0735c11d75 feat: implement memo map in user profile 2025-12-30 20:41:44 +08:00
Johnny f416eb00b0 refactor(web): simplify Skeleton component structure 2025-12-30 08:58:01 +08:00
Johnny d7478b8003 perf: optimize memory usage for statistics and image processing 2025-12-30 00:06:23 +08:00
Johnny b826e90276 refactor: polish ActivityCalendar components with modern design 2025-12-29 23:40:35 +08:00
Johnny 5d677828a6 refactor: remove NSFW content settings from instance configuration 2025-12-29 20:13:54 +08:00
Johnny 96a91ebff0 chore: add week days to calendar 2025-12-29 08:59:08 +08:00
Johnny ea3371badb chore: add ActivityCalendar components 2025-12-28 19:59:36 +08:00
Johnny 78aa41336a feat: implement attachment filtering functionality 2025-12-28 18:47:59 +08:00
Johnny 955ff0cad6 refactor: optimize user fetching in MemoCommentMessage and MemoReactionListView components 2025-12-28 17:50:43 +08:00
Johnny 115d1bacd7 refactor: replace MemoSkeleton with a new Skeleton component for improved loading states 2025-12-28 17:31:21 +08:00
Johnny 792d58b74d refactor: consolidate and update type definitions across MemoEditor components 2025-12-28 13:17:02 +08:00
Johnny 40585607f4 refactor: streamline MemoView component and related hooks, removing unused code and integrating user data 2025-12-28 12:59:55 +08:00
Johnny 64ae13839a fix: add missing @types/hast dependency 2025-12-28 12:49:41 +08:00
Johnny 85f4fc7a75 refactor: remove MemoContentContext and integrate MemoViewContext
- Deleted MemoContentContext and its associated types.
- Updated Tag and TaskListItem components to use MemoViewContext instead.
- Refactored MemoContent component to eliminate context provider and directly use derived values.
- Simplified MemoViewContext to only include essential data.
- Enhanced error handling in various components by introducing a centralized error handling utility.
- Improved type safety across components and hooks by refining TypeScript definitions.
- Updated remark plugins to enhance tag parsing and preserve node types.
2025-12-28 12:46:12 +08:00
Johnny ab650ac86d chore: remove unused dependency react-simple-pull-to-refresh from lockfile 2025-12-27 10:26:27 +08:00
Johnny d711d724bb chore: clean up unused imports and parameters across components 2025-12-27 10:18:38 +08:00
Johnny 0ad75b8f08 refactor: replace useResponsiveWidth with useMediaQuery across components 2025-12-26 23:44:52 +08:00
boojack d21610cce1 chore: add @johnnyjoygh as a code owner
Signed-off-by: boojack <stevenlgtm@gmail.com>
2025-12-26 23:04:16 +08:00
Steven 12fdf930a6 fix: invalidate React Query cache after memo reaction changes 2025-12-26 00:13:44 +08:00
Steven 9f5a7bb889 docs: create AGENTS.md for AI agents and remove outdated CLAUDE.md
- Remove outdated CLAUDE.md with obsolete architecture references
- Create comprehensive AGENTS.md covering:
  - Backend: Go, gRPC, Connect RPC, store layer, migrations
  - Frontend: React, React Query, Context API, state management
  - Development commands, workflows, and testing patterns
  - Code conventions, configuration, CI/CD, and security notes
2025-12-25 23:48:16 +08:00
Steven 6523891982 fix: react hooks order violation in MemoDetail when creating comments
Replace dynamic hook mapping with useMemoComments hook to fetch all comments
via listMemoComments API, ensuring consistent hook order across renders and
fixing page load failure after comment creation.
2025-12-25 23:40:42 +08:00
Steven c4dfb85400 fix: ensure dispatch is used for actions in useMemoInit hook 2025-12-25 23:17:34 +08:00
Steven 28e4ade009 fix: register Catalan and Galician locales in i18n configuration
The translation files ca.json and gl.json existed but weren't registered in the locales array, preventing users from selecting these languages.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-25 08:52:51 +08:00
Steven d4e08ae2bd refactor(react-query): optimize config, add error boundary, and remove JSDoc
This commit combines multiple improvements to the React Query migration:

Performance Optimization:
- Increase default staleTime from 10s to 30s for better performance
- Reduces unnecessary network requests while maintaining data freshness

Error Handling:
- Add ErrorBoundary component with user-friendly error UI
- Integrated at app root level for comprehensive coverage
- Provides error details and reload option

Documentation:
- Add docs/auth-architecture.md explaining AuthContext design decisions
- Document why AuthContext is preferred over React Query for current user

Code Cleanup:
- Remove all JSDoc comments from hooks and components
- Keep essential inline comments for clarity
- Simplifies code readability

Files modified:
- src/lib/query-client.ts - Optimized staleTime
- src/main.tsx - Added ErrorBoundary wrapper
- src/components/ErrorBoundary.tsx - New component
- src/hooks/useMemoQueries.ts - Removed JSDoc
- src/hooks/useUserQueries.ts - Removed JSDoc
- src/components/PagedMemoList/PagedMemoList.tsx - Removed JSDoc
- docs/auth-architecture.md - New documentation

All changes verified with TypeScript compilation and production build.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-25 08:47:36 +08:00
ghose eed935ce44 feat: contribution New Locale: Galician (gl, gl_ES) (#5376)
Signed-off-by: ghose <704948+xmgz@users.noreply.github.com>
2025-12-25 08:38:24 +08:00
dwojtas 9821d6ace4 chore: add missing keys to Polish translation, based on the en.json file (#5380) 2025-12-25 08:37:14 +08:00
Steven b2e2b6426c perf(react-query): fix context re-renders and improve type safety
Optimizes React Query migration with performance and consistency improvements:

Performance:
- Memoize AuthContext and InstanceContext provider values to prevent unnecessary re-renders
- Convert InstanceContext getter functions to useMemo hooks
- Fix refetchSettings to avoid state dependency that caused frequent recreations

Type Safety:
- Replace 'any' types in useAttachmentQueries with proper protobuf types
- Add Attachment and ListAttachmentsRequest type imports

Query Key Consistency:
- Replace hardcoded ["users", "stats"] with userKeys.stats() factory function
- Ensures consistent cache key management across mutations

Developer Experience:
- Rename unused useCurrentUser to useCurrentUserQuery to avoid confusion
- Add documentation explaining AuthContext-based vs React Query current user hooks
- Update internal references in useNotifications and useTagCounts

All changes verified with TypeScript compilation and build tests.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-25 08:29:34 +08:00
Johnny f87f728b0f feat: react query migration (#5379) 2025-12-24 22:59:18 +08:00
Johnny 4109fe3245 chore(MemoEditor): enhance focus mode handling and improve editor layout 2025-12-23 20:11:38 +08:00
Johnny 595daaa163 style: organize imports in MemoView hooks 2025-12-23 19:33:31 +08:00
Johnny 0f9322ea11 fix(MemoEditor): dispatch toggleFocusMode action properly
- Wrap actions.toggleFocusMode() with dispatch() call
- Create toggleFocusMode helper function for callbacks
- Fix focus mode not toggling due to action not being dispatched
2025-12-23 19:30:38 +08:00
Johnny 201a0466e9 fix(MemoEditor): restore focus mode functionality
- Add useFocusMode hook to lock body scroll in focus mode
- Add 'f' key keyboard shortcut to toggle focus mode
- Add FocusModeExitButton inside editor
- Import and wire up all focus mode components and hooks
- Update useKeyboard to handle focus mode toggle
2025-12-23 19:20:21 +08:00
Johnny ca84241b8a fix(MemoEditor): restore focus mode styles
- Import and use FOCUS_MODE_STYLES from constants
- Apply proper fixed positioning, shadow, and spacing in focus mode
- Add transition animation for smooth mode switching
- Replace empty 'focus-mode' class with actual Tailwind utilities
2025-12-23 19:18:24 +08:00
Johnny f2bc115a1d fix(MemoEditor): restore wrapper styles removed by refactoring
- Add back Tailwind utility classes for proper layout
- Restore padding, border, background, and flex styles
- Fix missing styles on memo-editor-wrapper element
2025-12-23 19:17:00 +08:00
Johnny 735dd1fe4b style(MemoView): restore comments and formatting
- Add back descriptive comments removed by editor refactoring commit
- Restore original timestamp calculation format in MemoHeader
- Improve code readability with section comments
2025-12-23 19:05:29 +08:00
Johnny e61d594ded refactor(MemoView): improve maintainability and code organization
Complete refactoring of MemoView components for better code quality:

- Split useMemoViewState into individual hook files (useMemoActions,
  useKeyboardShortcuts, useNsfwContent, useImagePreview, useMemoCreator)
  for single responsibility principle
- Consolidate types closer to usage - move hook-specific types to
  respective files, keep only component props in shared types.ts
- Optimize context with separate static/dynamic memoization to reduce
  unnecessary re-renders
- Simplify barrel exports to only expose public API (MemoView component
  and MemoViewProps type)
- Add comprehensive JSDoc documentation to all public APIs with usage
  examples

Benefits:
- Better maintainability: each hook file has one clear purpose
- Improved performance: context optimization prevents unnecessary re-renders
- Enhanced developer experience: clear documentation and encapsulation
- Cleaner architecture: public API is minimal, internal details hidden

All automated checks pass (TypeScript compilation, linter, production build).
2025-12-23 19:01:57 +08:00
Johnny 1b11e8c841 refactor(editor): complete state machine and services migration
BREAKING CHANGE: MemoEditor internal architecture completely refactored

## Summary

Refactored MemoEditor from hooks-based state management to a three-layer
architecture (Presentation → State → Services) using useReducer pattern.

## Changes

### Architecture
- **State Layer** (5 new files): types, actions, reducer, context, barrel export
- **Service Layer** (6 new files): error, validation, upload, cache, memo services + barrel
- **Component Layer** (3 new files): EditorToolbar, EditorContent, EditorMetadata
- **Simplified Hooks** (3 new files): useMemoInit, useAutoSave, useKeyboard

### Code Reduction
- Main component: ~380 lines → ~140 lines (-63%)
- Hooks removed: 5 old hooks (useMemoEditorState, useMemoSave, etc.)
- Total lines removed: 508 lines of old code
- Utility hooks preserved: 8 hooks still in use (useLocation, useDragAndDrop, etc.)

### Improvements
-  Predictable state transitions with useReducer
-  Testable business logic in pure service functions
-  Cleaner component code (presentation only)
-  Better separation of concerns
-  Type-safe actions with discriminated unions
-  Centralized error handling

## Statistics
- Files changed: 26
- Commits created: 25 (squashed into 1)
- New files: 17
- Removed files: 5
- TypeScript errors: 0
- Lint errors: 0

## Testing
Manual testing required for:
- Editor functionality (create, edit, save)
- Drag and drop
- Focus mode
- Keyboard shortcuts (Cmd/Ctrl + Enter)
- Auto-save to localStorage
2025-12-23 08:38:02 +08:00
Johnny 8a7c976758 refactor: streamline tag sorting and update coordinate handling in MemoEditor components 2025-12-22 22:54:09 +08:00
Johnny d537591005 feat: add slash commands tooltip to InsertMenu 2025-12-22 22:42:23 +08:00
Steven f9dd7ad853 style: improve code block styling and formatting
- Adjust CodeBlock styling for better layout and spacing
- Reorganize copy button positioning with absolute positioning
- Simplify button styling and reduce icon sizes
- Wrap MermaidBlock in pre tag for consistent structure
- Format useDropdownMenuSubHoverDelay hook call for readability

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-22 21:27:50 +08:00
Steven dfc0d376d1 refactor: extract submenu hover delay logic into reusable hook
- Create useDropdownMenuSubHoverDelay hook in dropdown-menu component
- Encapsulates hover delay behavior for preventing accidental submenu closure
- Eliminates code duplication at component usage sites
- Simplifies InsertMenu by removing 45 lines of timeout/state management code
- Hook provides handleTriggerEnter/Leave and handleContentEnter/Leave handlers
- Configurable closeDelay parameter (default 150ms)

This makes the hover behavior pattern reusable across any dropdown menu submenus.

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-22 21:04:00 +08:00
Steven 332d32bd35 fix: render dates correctly in memo detail sidebar and link dialog
Convert protobuf Timestamp objects to Date before formatting
to prevent "[object Object]" from appearing in the UI.

Fixes #5368
2025-12-22 20:24:04 +08:00
Steven be7ef74698 fix: eliminate duplicate API requests by deduplicating user fetch calls
- Add request deduplication to getOrFetchUser using RequestDeduplicator
- Consolidates multiple simultaneous calls for same user into single API request
- Prevents duplicate 401 errors and wasted network traffic
- Matches pattern already used by fetchUsers and fetchUserStats
- Remove backwards compatibility aliases (getOrFetchUserByName, getOrFetchUserByUsername)
- Update all call sites to use canonical getOrFetchUser method

Fixes issue where PagedMemoList, useMemoViewState, MainLayout, and UserProfile
were making duplicate user fetch requests when loading user data.

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-22 20:12:44 +08:00
Johnny 5828f34aae feat: implement scheduler plugin
- Added `scheduler` package with core functionalities for job scheduling.
- Implemented job registration, execution, and graceful shutdown mechanisms.
- Introduced middleware support for logging, recovery from panics, and timeout handling.
- Developed cron expression parser to support both 5-field and 6-field formats.
- Created comprehensive integration and unit tests for scheduler, job definitions, middleware, and parser functionalities.
- Enhanced logging capabilities to track job execution and errors.
2025-12-20 15:43:25 +08:00
Johnny b55a0314f8 feat: add Email Plugin with SMTP functionality
- Implemented the Email Plugin for self-hosted Memos instances, providing SMTP email sending capabilities.
- Created configuration structure for SMTP settings with validation.
- Developed message structure for email content with validation and formatting.
- Added synchronous and asynchronous email sending methods.
- Implemented error handling and logging for email sending processes.
- Included tests for client, configuration, and message functionalities to ensure reliability.
- Updated documentation to reflect new features and usage instructions.
2025-12-20 14:23:15 +08:00
Johnny 319a7cac94 chore: fix remark tag parse 2025-12-20 13:50:32 +08:00
Johnny 6b0f90f355 chore: prevent sensitive data caching 2025-12-20 12:33:16 +08:00
Johnny eaef04a0a0 chore: fix linter 2025-12-20 11:55:00 +08:00
Steven d236ef1611 feat(web): add glassmorphism map controls with Google Maps integration
- Add custom zoom controls with modern glassmorphism styling
- Add "Open in Google Maps" button for location markers
- Refactor to React component architecture with proper Leaflet integration
- Create reusable GlassButton component for maintainability
- Use React 18 createRoot for portal rendering
- Replace imperative DOM manipulation with declarative React patterns
- Add coordinate display to location metadata

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-20 00:18:01 +08:00
Steven d0c3908168 refactor: remove deprecated Sessions and AccessTokens settings
- Remove ListSessions and RevokeSession RPC endpoints
- Remove Session message and SessionsSetting from UserSetting
- Remove ACCESS_TOKENS key and AccessTokensSetting
- Update references to use RefreshTokensUserSetting with its own ClientInfo
- Remove UserSessionsSection frontend component
- Clean up user store to remove session and access token settings
- Regenerate protobuf files

The system now uses:
- REFRESH_TOKENS for session management with sliding expiration
- PERSONAL_ACCESS_TOKENS for long-lived API tokens
2025-12-19 08:35:57 +08:00
Steven a6c32908a0 refactor(auth): remove legacy session cookie authentication
- Remove SessionCookieName and SessionSlidingDuration constants
- Remove ExtractSessionCookieFromHeader() function
- Remove SessionIDContextKey and GetSessionID() function
- Remove sessionID parameter from SetUserInContext()
- Remove SessionID field from AuthResult struct
- Remove session cookie extraction from middleware
- Update documentation to reflect JWT + PAT only auth

Session cookies were never being set since migration to refresh token
authentication. This change removes ~50 lines of dead code and clarifies
that the system uses JWT access tokens, refresh tokens, and PATs only.
2025-12-19 00:09:08 +08:00
Steven b0aeb06f85 refactor(web): improve auth flow and eliminate route duplication
- Extract route paths to router/routes.ts as single source of truth
- Refactor connect.ts auth interceptor with better structure and error handling
  - Add TokenRefreshManager class to prevent race conditions
  - Implement smart redirect logic for public/private routes
  - Support unauthenticated access to explore and user profile pages
  - Add proper error handling for missing access tokens
  - Extract magic strings to named constants
- Maintain backward compatibility by aliasing Routes to ROUTES

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 22:14:30 +08:00
Johnny 50606a850e fix(auth): resolve token refresh and persistence issues
- Fix cookie expiration timezone to use GMT (RFC 6265 compliance)
- Use Connect RPC client for token refresh instead of fetch
- Fix error code checking (numeric Code.Unauthenticated instead of string)
- Prevent infinite redirect loop when already on /auth page
- Fix protobuf Timestamp conversion using timestampDate helper
- Store access token in sessionStorage to avoid unnecessary refreshes on page reload
- Add refresh token cookie fallback for attachment authentication
- Improve error handling with proper type checking

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 20:56:54 +08:00
Johnny 7932f6d0d0 refactor: user auth improvements (#5360) 2025-12-18 18:15:51 +08:00
Johnny 2c2ef53737 chore: fix frontend linter 2025-12-17 09:04:05 +08:00
Johnny ea14280cb3 feat: enhance attachment handling with MIME type validation 2025-12-17 08:58:43 +08:00
Johnny 642271a831 feat: add iframe support for embedded videos in markdown content 2025-12-17 08:52:59 +08:00
Johnny 310590b278 chore: fix golang checks 2025-12-16 22:53:36 +08:00
Johnny 40e129b8af refactor(auth): streamline session authentication and cookie handling 2025-12-16 22:23:59 +08:00
Steven 87b8c2b2d2 refactor(web): rename grpcweb.ts to connect.ts and enable binary format
- Rename grpcweb.ts to connect.ts to reflect ConnectRPC usage
- Enable binary protobuf format for improved performance
- Update all imports across 26 files from @/grpcweb to @/connect

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-16 20:15:16 +08:00
Steven 6926764b91 fix: allow unauthenticated CreateUser for first user registration
Add CreateUser to PublicMethods ACL whitelist to fix "authentication required"
error during first-time setup. The CreateUser method already has proper security
logic that automatically assigns HOST role to the first user and enforces
DisallowUserRegistration setting for subsequent users.

Fixes #5352

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 23:18:30 +08:00
Steven b1a52f20ed fix(web): add clipboard fallback for CodeBlock copy button in non-secure contexts
The CodeBlock component was refactored in v0.25.3 to use navigator.clipboard.writeText(),
which requires HTTPS or localhost. This caused the copy button to fail silently for users
accessing Memos over HTTP.

This fix adds a fallback to the copy-to-clipboard library (already used by all other
copy operations in the codebase) when the native clipboard API is unavailable or fails,
ensuring the copy button works reliably in all deployment scenarios.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 22:51:34 +08:00
Steven a2ddf05933 chore: fix linter 2025-12-15 19:58:58 +08:00
Steven 1b3318f886 refactor(web): improve ActivityCalendar maintainability and add Calendar page
- Extract shared utilities and constants to eliminate code duplication
- Create dedicated Calendar page with year view and month grid
- Add date filter navigation with bidirectional URL sync
- Fix useTodayDate memoization bug causing stale date references
- Standardize naming conventions (get vs generate functions)
- Add comprehensive type exports and proper store encapsulation
- Implement size variants for compact calendar display

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 19:47:46 +08:00
Johnny d14e66daf5 fix: openapi generation (#5349) 2025-12-15 10:55:04 +08:00
Davide Truffa 8659f69da0 chore(locales): update Italian translation (#5346) 2025-12-15 10:05:32 +08:00
Johnny 09afa579e4 chore: implement session sliding expiration and JWT authentication
- Added UpdateSessionLastAccessed method to update session access time.
- Enhanced Authenticate method to support both session cookie and JWT token authentication.
- Introduced AuthResult struct to encapsulate authentication results.
- Added SetUserInContext function to simplify context management for authenticated users.

refactor(auth): streamline gRPC and HTTP authentication

- Removed gRPC authentication interceptor and replaced it with a unified approach using GatewayAuthMiddleware for HTTP requests.
- Updated Connect interceptors to utilize the new authentication logic.
- Consolidated public and admin-only method checks into service layer for better maintainability.

chore(api): clean up unused code and improve documentation

- Removed deprecated logger interceptor and unused gRPC server code.
- Updated ACL configuration documentation for clarity on public and admin-only methods.
- Enhanced metadata handling in Connect RPC to ensure consistent header access.

fix(server): simplify server startup and shutdown process

- Eliminated cmux dependency for handling HTTP and gRPC traffic.
- Streamlined server initialization and shutdown logic for better performance and readability.
2025-12-15 10:04:11 +08:00
Steven 65a19df4be fix(backend): correct generic type parameter in withHeaderCarrier helper
Problem:
The withHeaderCarrier generic function had a type mismatch that caused compilation
errors in CI. The function used `T proto.Message` constraint, but Connect's Response
type expects the non-pointer message type while protobuf methods return pointers.

Error from CI:
  type T of resp does not match *T (cannot infer T)

This occurred because:
- Connect methods expect: *connect.Response[v1pb.CreateSessionResponse]
- Service methods return: (*v1pb.CreateSessionResponse, error)
- Old signature: fn func(context.Context) (T, error) with T proto.Message
- This caused T to be inferred as *v1pb.CreateSessionResponse
- Leading to return type: *connect.Response[*v1pb.CreateSessionResponse] (wrong!)

Solution:
Changed generic signature to explicitly handle the pointer/non-pointer distinction:
- New signature: fn func(context.Context) (*T, error) with T any
- T is now the non-pointer type (e.g., v1pb.CreateSessionResponse)
- fn returns *T (e.g., *v1pb.CreateSessionResponse)
- Return type is correctly: *connect.Response[T] (e.g., *connect.Response[v1pb.CreateSessionResponse])

Also removed unused "google.golang.org/protobuf/proto" import and improved documentation
to clarify the T vs *T distinction.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-12 08:06:13 +08:00
Steven 06a0f8d618 fix(web): convert visibility enum values to string names in filter expressions
Problem:
The Explore page filter was sending visibility filter as:
  visibility in ["3", "2"]
when it should send:
  visibility in ["PUBLIC", "PROTECTED"]

The backend CEL filter parser expects string enum names, not numeric values.
This caused the Explore page to return no memos even when public memos existed.

Solution:
- Added getVisibilityName() helper to convert Visibility enum values to string names
- Updated useMemoFilters to use getVisibilityName() when building visibility filter
- Follows same pattern as existing getInstanceSettingKeyName() and getUserSettingKeyName()
- Added validation to warn on invalid enum values

Files changed:
- web/src/store/common.ts: Add getVisibilityName() helper with validation
- web/src/hooks/useMemoFilters.ts: Use getVisibilityName() in visibility filter

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-12 08:03:25 +08:00
Steven 3d893a7394 fix(backend): implement protocol-agnostic header setting for dual gRPC/Connect-RPC support
Problem:
The codebase supports both native gRPC and Connect-RPC protocols, but auth
service was using grpc.SetHeader() which only works for native gRPC. This
caused "failed to set grpc header" errors when using Connect-RPC clients
(browsers using nice-grpc-web).

Solution:
- Created HeaderCarrier pattern for protocol-agnostic header setting
- HeaderCarrier stores headers in context for Connect-RPC requests
- Falls back to grpc.SetHeader for native gRPC requests
- Updated auth service to use SetResponseHeader() instead of grpc.SetHeader()
- Refactored Connect wrappers to use withHeaderCarrier() helper to eliminate
  code duplication

Additional fixes:
- Allow public methods when gRPC metadata is missing in ACL interceptor
- Properly handle ParseSessionCookieValue errors instead of ignoring them
- Fix buildSessionCookie to gracefully handle missing metadata

Files changed:
- server/router/api/v1/header_carrier.go: New protocol-agnostic header carrier
- server/router/api/v1/auth_service.go: Use SetResponseHeader, handle missing metadata
- server/router/api/v1/connect_services.go: Use withHeaderCarrier helper
- server/router/api/v1/acl.go: Allow public methods without metadata
- server/router/api/v1/connect_interceptors.go: Handle ParseSessionCookieValue errors

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-12 07:46:28 +08:00
Steven 8a7e00886d fix(web): convert enum values to string names in API resource paths
Frontend was incorrectly using numeric enum values (e.g., 1, 2, 3) instead
of string names (e.g., "GENERAL", "STORAGE") when constructing API resource
paths. This caused the backend to fail with "unsupported instance setting
key: INSTANCE_SETTING_KEY_UNSPECIFIED" errors during initialization.

Changes:
- Add helper functions in store/common.ts to convert enum values to names
  - getInstanceSettingKeyName() and buildInstanceSettingName()
  - getUserSettingKeyName() and buildUserSettingName()
- Update instance store to use string enum names in API calls
- Update user store to use string enum names in API calls
- Update all components to use new helper functions for setting names

Fixes enum string conversion for:
- InstanceSetting_Key (6 locations)
- UserSetting_Key (2 locations)

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-11 20:08:11 +08:00
Johnny edd3ced9bf refactor: migrate to connect-rpc (#5338) 2025-12-11 19:49:07 +08:00
Steven 8af8b9d238 fix(web): use AST parsing for task detection to handle code blocks correctly
Fixes #5319. Checkboxes inside code blocks were incorrectly counted when
toggling tasks, causing the wrong checkbox to be checked. Replaced regex-based
task detection with mdast AST parsing which properly ignores code block content.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 08:26:16 +08:00
Steven 3dc740c752 refactor(web): improve locale/theme preference initialization
- Extract preference logic into dedicated hooks (useUserLocale, useUserTheme)
- Add applyLocaleEarly() for consistent early application
- Remove applyUserPreferences() from user store (now redundant)
- Simplify App.tsx by moving effects to custom hooks
- Make locale/theme handling consistent and reactive
- Clean up manual preference calls from sign-in flows

Fixes locale not overriding localStorage on user login.
Improves maintainability with better separation of concerns.
2025-12-11 07:59:52 +08:00
spaghetti-coder 7479205e21 fix(ui): change focus search bar shortcut overlapping with url shortcut (#5336) 2025-12-11 07:56:20 +08:00
XIN_____ baf33af980 chore: add 'all' translation to zh-Hans and zh-Hant (#5333) 2025-12-11 07:53:20 +08:00
Shivam Kumar 41358ed3ba fix(theme): improve text contrast in default dark mode (#5323)
Signed-off-by: boojack <stevenlgtm@gmail.com>
Co-authored-by: boojack <stevenlgtm@gmail.com>
2025-12-11 07:53:02 +08:00
xiaolinny 6beb3fcde0 chore: fix some typos in comments (#5332)
Signed-off-by: xiaolinny <xiaolincode@outlook.com>
2025-12-11 07:50:16 +08:00
Steven 48ce4ccc26 fix(web): disable setext header syntax (#5314)
Add custom remark plugin to prevent setext headers (headers using === or --- underlines) from being recognized by the markdown parser. The plugin disables the setextUnderline construct at the micromark parser level.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-09 09:07:54 +08:00
Steven 1cf047707b refactor: migrate binary file serving from gRPC to dedicated HTTP fileserver
Migrates attachment and avatar binary serving from gRPC endpoints to a new dedicated HTTP fileserver package, fixing Safari video playback issues and improving architectural separation.

Key changes:
- Created server/router/fileserver package for all binary file serving
- Removed GetAttachmentBinary and GetUserAvatar gRPC endpoints from proto
- Implemented native HTTP handlers with full range request support
- Added authentication support (session cookies + JWT) to fileserver
- New avatar endpoint supports lookup by user ID or username
- Eliminated duplicate auth constants (imports from api/v1)

HTTP endpoints:
- Attachments: /file/attachments/:uid/:filename (unchanged URL)
- Avatars: /file/users/:identifier/avatar (new URL format)

This fixes Safari video/audio playback by using http.ServeContent() which properly handles HTTP 206 Partial Content responses and range request headers.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-09 08:53:52 +08:00
spaghetti-coder 9ea27ee61f fix(ui): fix todo command does nothing (#5329) 2025-12-09 08:20:57 +08:00
spaghetti-coder 618db89f4f fix(ui): remove unsupported highlight command (#5328) 2025-12-09 07:57:28 +08:00
XIN_____ 2a876436e0 chore: add 'auto-expand' translation in zh-Hans.json (#5326) 2025-12-08 21:03:57 +08:00
Steven 4668c4714b refactor(web): improve MemoContent security and maintainability
Security improvements:
- Add rehype-sanitize for XSS protection in markdown content
- Remove DOMPurify and deprecated __html code block feature
- Extract sanitize schema to constants with comprehensive documentation

Maintainability improvements:
- Extract SANITIZE_SCHEMA to constants.ts for better organization
- Create utils.ts with shared code extraction utilities
- Refactor CodeBlock and MermaidBlock to use shared utilities
- Rename PreProps to CodeBlockProps for clarity
- Reduce code duplication across components

Dependency cleanup:
- Remove explicit katex dependency (now transitive via rehype-katex)
- Remove @matejmazur/react-katex (unused)
- Remove dompurify (replaced by rehype-sanitize)
- Update vite config to remove katex-vendor chunk

Changes: 7 files changed, 84 insertions(+), 100 deletions(-)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 22:45:22 +08:00
Steven d9f8bc80f0 feat(web): add LaTeX math rendering support to MemoContent
Integrates remark-math and rehype-katex plugins to enable LaTeX mathematical expressions in memos. Users can now write inline math ($...$) and display math ($$...$$) using standard LaTeX syntax.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 22:08:45 +08:00
Steven 81da20c905 refactor: simplify theme/locale to user preferences and improve initialization
Remove theme and locale from instance settings to eliminate duplication and
simplify the codebase. These are user-specific preferences and should only
exist in user settings, not instance-wide settings.

Backend changes:
- Remove theme from InstanceGeneralSetting proto
- Remove locale from InstanceCustomProfile proto
- Update instance service converters to remove theme/locale handling
- Simplify RSS feed to use static locale

Frontend changes:
- Remove theme/locale from instanceStore state
- Create unified initialization flow with clear fallback priority:
  * Theme: user setting → localStorage → system preference
  * Locale: user setting → browser language
- Add applyUserPreferences() to centralize theme/locale application
- Simplify App.tsx by removing redundant state synchronization
- Update all components to use new helper functions:
  * getThemeWithFallback() for theme resolution
  * getLocaleWithFallback() for locale resolution
- Remove theme/locale selectors from instance profile dialog

Theme utilities refactor:
- Organize code into clear sections with JSDoc comments
- Extract localStorage operations into getStoredTheme/setStoredTheme helpers
- Split DOM manipulation into focused functions
- Improve type safety with Theme and ResolvedTheme types
- Reduce code duplication and improve maintainability

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 09:08:46 +08:00
Steven 8154a411a9 fix(web): allow only one active tag filter at a time
Previously, clicking multiple tags would add them all as active filters. Now clicking a new tag automatically clears any existing tag filters before applying the new one, ensuring only one tag can be filtered at a time. Clicking an already-active tag still deselects it.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 08:40:43 +08:00
Johnny a863154224 docs: update Memos Codebase Guide for clarity and structure 2025-12-02 08:19:20 +08:00
Steven 0610257562 refactor(store): remove deprecated migration_history table and backward compatibility code
Complete removal of migration_history system in favor of instance_setting based schema versioning.

Changes:
- Remove migration_history table creation from all LATEST.sql files
- Delete all migration_history model and implementation files (~300 lines)
- Remove FindMigrationHistoryList and UpsertMigrationHistory from Driver interface
- Replace complex backward compatibility functions with simple version check
- Update health check to use instance_setting instead of migration_history
- Simplify checkMinimumUpgradeVersion to detect pre-v0.22 installations

Breaking change:
Users on versions < v0.22.0 (May 2024) must upgrade to v0.25.x first before upgrading to this version.
Clear error message with upgrade instructions will be shown for old installations.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 22:54:30 +08:00
Steven fae5eac31b fix(web): fix infinite loop in MemoEditor and improve React/MobX integration
- Wrap all setter functions in useMemoEditorState with useCallback to ensure stable references
  This prevents infinite loops when setters are used in useEffect dependencies (fixes "Maximum update depth exceeded" error)
- Extract MobX observable values in useMemoFilters and useMemoSorting before using them in useMemo dependencies
  This prevents React from tracking MobX observables directly, improving reliability
- Add comprehensive documentation explaining the design decisions for future maintainability

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 08:54:40 +08:00
Steven d1492007ab fix(store): filter inbox notifications by message type at database level
Add MessageType filter to FindInbox to exclude legacy VERSION_UPDATE
notifications from inbox queries. This resolves the issue where users
saw notification counts but no items displayed, as VERSION_UPDATE
entries cannot be rendered in the new UserNotification API.

Changes:
- Add MessageType field to FindInbox struct for database-level filtering
- Implement JSON extraction filters in SQLite, MySQL, and PostgreSQL drivers
- Update ListUserNotifications to filter MEMO_COMMENT type at store level

This approach improves performance by filtering at the database rather
than in application code, reducing unnecessary data transfer for users
with many legacy inbox entries.

Fixes #5278

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 08:43:05 +08:00
Steven 17e116b977 chore: fix linter 2025-12-01 08:27:23 +08:00
Johnny 545323d12c refactor(rss): comprehensive RSS service improvements
Major performance and standards compliance improvements to RSS feed generation:

Performance optimizations:
- Fix N+1 query problem by batch loading attachments (101 queries → 2-3)
- Add in-memory caching with 1-hour TTL and LRU eviction
- Implement ETag-based conditional requests (304 Not Modified)
- Add database-level pagination with LIMIT clause
- Clean up expired cache entries to prevent memory leaks

RSS 2.0 compliance:
- Add item titles extracted from memo content
- Include both description and content:encoded fields
- Add author information (name and email)
- Set proper Last-Modified headers
- Use specific application/rss+xml content type

Code quality:
- Fix potential index out of bounds panic in title generation
- Improve markdown heading stripping with regex (handles # to ######)
- Add proper HTTP caching headers (Cache-Control, ETag, Last-Modified)
- Thread-safe cache implementation with RWMutex
- Better error handling and edge case coverage

The RSS backend now follows industry best practices with optimal
performance, full standards compliance, and production-ready reliability.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 00:28:23 +08:00
Johnny 1a9bd32cf1 feat(auth): add PKCE support and enhance OAuth security
Implements critical OAuth 2.0 security improvements to protect against authorization code interception attacks and improve provider compatibility:

- Add PKCE (RFC 7636) support with SHA-256 code challenge/verifier
- Fix access token extraction to use standard field instead of Extra()
- Add OAuth error parameter handling (access_denied, invalid_scope, etc.)
- Maintain backward compatibility for non-PKCE flows

This brings the OAuth implementation up to modern security standards as recommended by Auth0, Okta, and the OAuth 2.0 Security Best Current Practice (RFC 8252).

Backend changes:
- Add code_verifier parameter to ExchangeToken with PKCE support
- Use token.AccessToken for better provider compatibility
- Update proto definition with optional code_verifier field

Frontend changes:
- Generate cryptographically secure PKCE parameters
- Include code_challenge in authorization requests
- Handle and display OAuth provider errors gracefully
- Pass code_verifier during token exchange

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 00:04:26 +08:00
Johnny a6a8997f4c chore: tweak comments 2025-11-30 13:16:02 +08:00
Johnny 07072b75a7 chore: reorganize reaction components 2025-11-30 12:48:21 +08:00
Johnny 6dcf7cc74c chore: enhance MemoView component structure 2025-11-30 12:41:24 +08:00
Johnny 7aa8262ef2 chore: streamline MemoEditor components and remove unused code 2025-11-30 12:30:00 +08:00
Huang Youchuan 26cb357685 fix: update user session retrieval to use user.ID instead of userID (#5294)
Co-authored-by: huangyouchuan <huangyouchuan@letu.com>
2025-11-30 11:45:16 +08:00
Johnny ee9d9603ee chore: remove goreleaser 2025-11-30 11:42:46 +08:00
Johnny 2516cdf2b4 refactor: clean up MemoView and MemoEditor component architecture
This commit refactors MemoView and MemoEditor components for better
maintainability, introducing React Context, custom hooks, and improved
folder structure.

MemoView improvements:
- Introduce MemoViewContext to eliminate prop drilling
- Reduce MemoHeader props from 18 to 8
- Reduce MemoBody props from 9 to 4
- Extract custom hooks: useMemoViewDerivedState, useMemoEditor,
  useMemoHandlers for better separation of concerns
- Fix React hooks ordering bug in edit mode

MemoEditor improvements:
- Extract state management into useMemoEditorState hook
- Extract keyboard handling into useMemoEditorKeyboard hook
- Extract event handlers into useMemoEditorHandlers hook
- Extract initialization logic into useMemoEditorInit hook
- Reduce main component from 461 to 317 lines (31% reduction)

Folder structure cleanup:
- Move SortableItem to memo-metadata (correct location)
- Move ErrorBoundary to components folder
- Flatten Toolbar/InsertMenu structure (remove unnecessary nesting)
- Consolidate hooks in main hooks folder
- Consolidate types in main types folder

Benefits:
- Better separation of concerns
- Improved testability
- Easier maintenance
- Cleaner code organization
- No functionality changes

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 11:15:20 +08:00
Johnny bb7e0cdb79 refactor: remove enable link preview setting
- Remove enable_link_preview field from proto definitions
- Remove setting UI from MemoRelatedSettings component
- Remove translations from all 33 locale files
- Regenerate proto files

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 10:34:22 +08:00
Johnny 5fb6f8eccf refactor: remove legacy disable markdown shortcuts setting
- Remove disable_markdown_shortcuts field from proto definitions
- Remove setting UI from MemoRelatedSettings component
- Enable markdown shortcuts permanently in MemoEditor
- Remove translations from all 32 locale files
- Fix TypeScript error in useMemoSave hook by using typed translation function

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 10:30:55 +08:00
Johnny 2b7b70ebfe chore: fix linter 2025-11-30 10:15:20 +08:00
Johnny 1ef11f7470 refactor: implement MemoView component with subcomponents and hooks
- Added MemoView component to display a single memo card with full functionality including creator info, memo content, attachments, reactions, and comments.
- Created MemoBody and MemoHeader subcomponents to separate concerns and improve maintainability.
- Introduced custom hooks for managing memo actions, keyboard shortcuts, NSFW content visibility, and image preview.
- Implemented reaction handling with new ReactionSelector and ReactionView components.
- Added TypeScript types for better type safety and clarity.
- Established constants for memo card styling and keyboard shortcuts.
- Removed legacy ReactionSelector and ReactionView components from the previous structure.
2025-11-29 23:21:35 +08:00
Johnny 50199fe998 feat: add LocationDialog and related hooks for location management in MemoEditor
- Implemented LocationDialog component for selecting and entering location coordinates.
- Created useLocation hook to manage location state and updates.
- Added LocationState type for managing location data.
- Introduced useLinkMemo hook for linking memos with search functionality.
- Added VisibilitySelector component for selecting memo visibility.
- Refactored MemoEditor to integrate new hooks and components for improved functionality.
- Removed obsolete handlers and streamlined memo save logic with useMemoSave hook.
- Enhanced focus mode functionality with dedicated components for overlay and exit button.
2025-11-28 09:21:53 +08:00
Chriss c1765fc246 feat: add midnight theme (#5288) 2025-11-27 21:21:57 +08:00
Steven 07a030ddfd fix(postgres): update tag filtering SQL to ensure proper type casting for LIKE comparisons 2025-11-26 23:04:07 +08:00
Steven 50f49fc00d chore: update demo data 2025-11-26 21:58:56 +08:00
Steven 05f7c9606b fix: add HTML sanitization and dynamic theme loading 2025-11-26 20:34:52 +08:00
Steven 363bc9f455 fix(web): add missing tag styles and unify primary color across themes
Tags were missing CSS styles, appearing as plain text. Added text-primary
styling to Tag component and updated default theme primary color to match
other themes (blue hue 250, chroma 0.08) for consistency.

Fixes #5282

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 20:25:28 +08:00
Steven 5a16f8009f fix(markdown): render single newlines as line breaks
Add remark-breaks plugin to render single newlines as <br> tags,
matching GitHub Flavored Markdown behavior.

Fixes https://github.com/usememos/memos/issues/5277

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 20:13:57 +08:00
김강현 ef033d21de chore(i18n): add missing Korean translations (#5285) 2025-11-26 20:02:57 +08:00
김강현 b7c9f0e6ff chore(i18n): improve Korean locale translations for copy and delete actions (#5280) 2025-11-26 12:34:54 +08:00
Steven 424f11f227 fix(store): fix PostgreSQL tag filtering type inference error
Resolves issue where tag filtering in PostgreSQL databases failed with "operator does not exist: jsonb ~~ unknown" error. The hierarchical tag filtering feature introduced in commit 5e47f25b generated SQL with implicit type placeholders that PostgreSQL couldn't infer.

The fix explicitly casts the LIKE comparison placeholder to text (::text) in the PostgreSQL dialect, ensuring proper type resolution for the query parameter.

Fixes #5275

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 07:40:39 +08:00
Steven 68c17469a3 fix(markdown): fix UTF-8 truncation for CJK characters in snippet generation
The truncateAtWord function was slicing strings by byte position instead of
character position. When truncating text with multi-byte UTF-8 characters
(like CJK), this could cut in the middle of a character, creating invalid
UTF-8 and causing gRPC marshaling errors.

Fixed by converting to runes before truncation to ensure we always cut at
proper character boundaries. Added test cases for CJK characters.

Fixes #5276

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 07:34:28 +08:00
Steven e17cd163c6 chore: bump version 2025-11-25 22:17:45 +08:00
Steven eb541d04cc fix(web): resolve tag sidebar filtering and reactivity issues
This fixes multiple issues with the tag sidebar and activity calendar:

1. Tag disappearing bug: When filtering by a tag, the sidebar now shows all tags instead of only the selected tag
2. Activity calendar filtering: Calendar now shows full activity history instead of filtered results
3. Auto-update on memo changes: Sidebar tags and calendar now update automatically when creating/editing memos without requiring manual page refresh

Technical changes:
- Modified useFilteredMemoStats to fetch unfiltered UserStats from backend API for Home/Profile pages
- Fixed key mismatch bug in userStore where stats were stored with inconsistent keys
- Added statsStateId update in fetchUserStats to trigger reactivity
- Updated MainLayout to pass appropriate userName based on page context
- Archived/Explore pages continue to compute from cached memos (correct behavior)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 22:17:01 +08:00
Steven 8ec4c9ab63 fix(web): update time locale when language is changed
Pass i18n.language to time display components to ensure locale updates
when the user switches languages in UserMenu. Changes:

- MemoView: Pass i18n.language to toLocaleString() and <relative-time> lang attribute
- MonthNavigator: Wrap with observer to make component reactive to i18n.language changes

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 21:37:04 +08:00
Steven ef6456a4f5 refactor(web): restructure MemoEditor with custom hooks and improved error handling
Extract reusable logic into custom hooks (useLocalFileManager, useDragAndDrop, useDebounce, useAbortController), add ErrorBoundary for resilience, and centralize constants. Fix cursor positioning bugs, useEffect dependency issues, and add geocoding request cancellation. Improve performance with debounced localStorage writes and ref-based flags.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 21:29:54 +08:00
Johnny 1832b59190 fix(css): standardize color variable values in default-dark theme 2025-11-25 09:02:57 +08:00
Steven 5e95a77f50 chore: update color variables in default-dark theme for improved contrast 2025-11-24 21:59:24 +08:00
Steven b5de847107 chore(web): add external link icon for memo attachments 2025-11-24 21:56:14 +08:00
Steven 424e599980 refactor(web): optimize memo statistics fetching by using cached data from memo store 2025-11-24 21:37:12 +08:00
Steven 72f93c5379 feat(web): enhance file upload handling with local file support and preview 2025-11-24 21:31:18 +08:00
Steven 1d582e0f39 chore: upgrade dependencies 2025-11-24 20:18:52 +08:00
Richard Szegh 455eef9fa3 feat(web): add ability to delete unused attachments (#5272) 2025-11-24 11:55:53 +08:00
Johnny 60d977c0bf fix: add period to comment for golangci-lint compliance 2025-11-23 23:47:17 +08:00
Johnny b78d4c2568 refactor(markdown): use Unicode categories for tag validation
Replace custom character whitelist with Unicode standards-based validation:

- Use unicode.IsLetter/IsNumber/IsSymbol instead of hardcoded lists
- Remove manual UTF-8 byte checking for CJK punctuation
- Add proper rune-based length limiting (MAX_TAG_LENGTH = 100)
- Improve international character support (CJK, Arabic, Cyrillic, etc.)
- Add emoji support via unicode.IsSymbol

Benefits:
- Cleaner, more maintainable code (~50 lines removed)
- Standards-based approach following Unicode categories
- Better UTF-8 safety with utf8.DecodeRune
- Consistent validation between Go backend and TypeScript frontend

All existing tests pass with improved Unicode handling.
2025-11-23 23:45:10 +08:00
Steven d69435c97c chore(docs): update security policy to prevent public vulnerability disclosure
- Direct security reports to email only instead of public GitHub issues
- Set clear expectations: no CVEs during beta (v0.x) phase
- Add security best practices for self-hosted deployments
- Plan formal vulnerability disclosure program for v1.0+

Addresses #5255
2025-11-21 09:13:40 +08:00
gitkeniwo a533ba02dc fix: add load more button and pagination to attachments page (#5258) 2025-11-21 09:04:41 +08:00
Steven edfbd6b073 fix(web): refresh sidebar tags when creating/updating memos
The sidebar tag list wasn't updating when users created new memos with tags
or modified existing memo tags. This was because useFilteredMemoStats hook
only refetched when filter/state/orderBy changed.

Now the hook observes memoStore.state.stateId, which changes whenever memos
are created, updated, or deleted. This triggers automatic refetch and the
sidebar updates immediately with the latest tag counts.

Fixes tag refresh issue in sidebar
2025-11-19 22:30:00 +08:00
Steven cabd0d61c6 fix(web): resolve Leaflet DOM cleanup error causing app crashes
- Add MapCleanup component to properly remove Leaflet map instances on unmount
- Fix LocationMarker initialization with useRef to prevent re-initialization
- Remove problematic key prop in LocationDialog that caused unnecessary remounts
- Fix goimports formatting in tag parser

Fixes #5260
2025-11-19 22:21:01 +08:00
Steven 3989100a27 fix(parser): handle additional Unicode punctuation in tag parsing 2025-11-19 22:19:56 +08:00
Steven 64e9d82d67 fix(parser): support Unicode characters in tags
Fixes #5264

Chinese, Japanese, Korean, and other Unicode characters are now
properly recognized in hashtags, following the standard hashtag
parsing conventions used by Twitter, Instagram, and GitHub.

Changes:
- Updated tag parser to allow Unicode letters and digits
- Tags stop at whitespace and punctuation (both ASCII and CJK)
- Allow dash, underscore, forward slash in tags
- Added comprehensive tests for CJK characters and emoji

Examples:
- #测试 → recognized as tag '测试'
- #日本語 → recognized as tag '日本語'
- #한국어 → recognized as tag '한국어'
- #测试。→ recognized as tag '测试' (stops at punctuation)
- #work/测试/项目 → hierarchical tag with Unicode
2025-11-19 22:06:11 +08:00
Neo 4de8712cb0 fix: keyboard shortcuts (#5250) 2025-11-17 08:55:57 +08:00
Johnny 357118804e feat(web): add Focus Mode UI entry in Insert Menu
Add discoverable UI entry point for Focus Mode via Insert Menu submenu:

UI Changes:
- Add "View" submenu to Insert Menu (+ button dropdown)
- Nested menu with Focus Mode option (ChatGPT-style pattern)
- Display keyboard shortcut hint (⌘⇧F) next to menu item
- Uses DropdownMenuSub components from Radix UI

User Access Methods:
1. Keyboard: Cmd/Ctrl+Shift+F (primary, power users)
2. Mouse: + menu → View → Focus Mode (discoverable)
3. Mobile: Touch-friendly menu access

Benefits:
- Improves discoverability for new users
- Doesn't clutter main editor UI
- Educates users about keyboard shortcut
- Extensible for future view options (typewriter, reading mode, etc.)
- Follows familiar UI patterns (ChatGPT, Notion)

Files Modified:
- web/src/components/MemoEditor/ActionButton/InsertMenu.tsx
  * Add DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent
  * Add View submenu with Focus Mode entry
  * Add onToggleFocusMode prop
- web/src/components/MemoEditor/index.tsx
  * Pass toggleFocusMode to InsertMenu component
- web/src/locales/en.json
  * Add "editor.view" translation key
2025-11-17 08:55:10 +08:00
Johnny c8162ff3cc feat(web): add Focus Mode for distraction-free writing
Add keyboard-activated Focus Mode to provide an immersive writing experience:

Features:
- Toggle with Cmd/Ctrl+Shift+F (matches GitHub, Google Docs)
- Exit with Escape, toggle shortcut, button click, or backdrop click
- Expands editor to ~80-90% of viewport with centered layout
- Semi-transparent backdrop with blur effect
- Maintains all editor functionality (attachments, shortcuts, etc.)
- Smooth 300ms transitions

Responsive Design:
- Mobile (< 640px): 8px margins, 50vh min-height
- Tablet (640-768px): 16px margins
- Desktop (> 768px): 32px margins, 60vh min-height, 1024px max-width

Implementation:
- Centralized constants for easy maintenance (FOCUS_MODE_STYLES)
- Extracted keyboard shortcuts and heights to named constants
- JSDoc documentation for all new functions and interfaces
- TypeScript type safety with 'as const'
- Explicit positioning (top/left/right/bottom) to avoid width overflow

Files Modified:
- web/src/components/MemoEditor/index.tsx - Main Focus Mode logic
- web/src/components/MemoEditor/Editor/index.tsx - Height adjustments
- web/src/locales/en.json - Translation keys

Design follows industry standards (GitHub Focus Mode, Notion, Obsidian)
and maintains code quality with single source of truth pattern.
2025-11-16 23:15:36 +08:00
Steven 156908c77f chore(web): migrate from ESLint+Prettier to Biome
- Install @biomejs/biome@2.3.5 as unified linter and formatter
- Remove ESLint, Prettier and all related plugins (221 packages removed)
- Migrate linting rules from ESLint to Biome configuration
- Migrate formatting rules from Prettier to Biome configuration
- Exclude auto-generated proto files from linting (src/types/proto/**)
- Exclude CSS files from Biome (Tailwind syntax not yet supported)
- Update package.json scripts:
  - lint: tsc + biome check
  - lint:fix: biome check --write
  - format: biome format --write
- Auto-fix import organization across 60+ files
- Fix duplicate key in Russian locale (ru.json)
- Update CLAUDE.md documentation to reflect Biome usage

Benefits:
- 10-100x faster linting performance
- Simplified toolchain with single configuration file
- 221 fewer npm dependencies
- Unified linting, formatting, and import organization
2025-11-14 23:58:07 +08:00
Johnny 64111369d3 fix(web): refactor task list styles to follow GitHub standard (#5253)
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-14 23:37:00 +08:00
Steven d1b2c0308b chore: add demo user access token for testing purposes 2025-11-11 08:31:05 +08:00
Steven dc398cf6a7 chore(web): unify metadata badge styling and fix event handling
- Remove MetadataBadge component and inline styles consistently
- Add pointer/mouse event handlers to prevent drag interference
- Fix LocationDisplay mode handling and popover interaction
- Clean up RelationList empty state logic
2025-11-10 21:53:56 +08:00
boojack 659c63165b chore: add Vercel OSS Program badge
Added Vercel OSS Program badge to README.

Signed-off-by: boojack <stevenlgtm@gmail.com>
2025-11-10 20:18:41 +08:00
Johnny 9a100d55be chore(server): remove profiler code and endpoints (#5244)
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-10 20:17:21 +08:00
Simon bb3d808e0e feat: allow closing image preview via backdrop click (#5243) 2025-11-10 19:12:45 +08:00
Johnny 6fc0ef7cc2 chore(web): remove redundant and minimal README files
Removed 3 markdown files that provided no useful documentation:
- web/README.md: Single line "The frontend of Memos" (redundant)
- web/src/components/kit/README.md: Single line "Base components" (minimal)
- web/MARKDOWN_STYLE_GUIDE.md: Outdated styling guide (no longer applicable)

Kept comprehensive documentation files:
- web/src/components/MasonryView/README.md (implementation details)
- web/src/themes/COLOR_GUIDE.md (design system guide)
- web/src/components/ConfirmDialog/README.md (component API docs)
- web/src/store/README.md (architecture patterns)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 14:21:10 +08:00
Johnny fa3e0fc7f9 fix(web): make MermaidBlock reactive to system theme changes and improve code quality
- Add system theme listener to detect OS theme changes in real-time
- Refactor to eliminate duplicate theme preference extraction
- Simplify getMermaidTheme function from switch statement to ternary
- Move render guard outside async function for better readability
- Update comments to be more concise and focused

The component now properly re-renders Mermaid diagrams when the OS theme changes while using "system" theme preference.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 14:19:11 +08:00
Johnny fb736c20d3 feat(web): add Mermaid diagram support in markdown (#5242)
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-09 14:13:10 +08:00
Johnny 5925e3cfc1 chore(web): simplify command system and improve editor UX (#5242)
Streamlines the command suggestion interface and fixes list auto-completion behavior:

- Remove command descriptions for cleaner suggestion popup UI
- Replace PaperclipIcon with FileIcon for semantic accuracy
- Fix list auto-completion to avoid extra newline when exiting list mode
- Add explanatory comments for cursor offset positions
- Improve dependency array in useListAutoCompletion hook

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 13:09:50 +08:00
Johnny fc43f86571 chore(web): unify Location/Attachments/Relations components (#5241)
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-09 07:23:31 +08:00
Johnny a2ccf6b201 feat(web): improve list auto-completion and tag insertion UX (#5240)
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-09 01:26:29 +08:00
Johnny e8b0273473 chore(web): improve CommandSuggestions and TagSuggestions components (#5239)
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-09 01:05:24 +08:00
Johnny bd21338fdb fix(web): markdown list auto-completion creates new line correctly (#5238)
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-08 10:47:10 +08:00
Johnny c54fcf7aa7 refactor(web): redesign Settings components (#5237)
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-08 10:32:55 +08:00
Steven 805bb4e741 chore(github): streamline issue templates with validation and better structure
Improve bug report and feature request templates to reduce duplicate submissions and gather better information:

Bug Report Template:
- Add pre-submission checklist requiring users to search existing issues and test on latest version/demo
- Add dropdown for issue location (stable, dev, demo site, older version)
- Restructure fields with clearer labels and better placeholders
- Add "Expected Behavior" section for clarity
- Combine screenshots and context with helpful prompts

Feature Request Template:
- Add pre-submission checklist to confirm issue search
- Expand feature type categories (API/Backend, Integrations/Plugins, Security/Privacy, Performance)
- Add "Problem or Use Case" field to understand the underlying need
- Add "Alternatives Considered" section
- Improve placeholders with specific examples

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-08 10:28:51 +08:00
boojack 906412013f refactor(api): remove test_auth.go and inline test helpers (#5235)
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-08 09:53:29 +08:00
boojack 13fea64d15 fix(api): implement custom memo ID support in CreateMemo (#5234)
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-08 09:43:10 +08:00
Steven ef9eee19d6 fix: implement tag suggestions functionality
Backend changes:
- Fix ListAllUserStats to calculate and return tag statistics
- Previously only returned name and timestamps, missing TagCount
- Now properly aggregates tags, pinned memos, and memo type stats

Frontend changes:
- Initialize user stats on app startup to populate tag data
- Show all tags when typing just '#' (fix empty Fuse.js search)
- Auto-refresh stats after creating/updating/deleting memos
- Fix Checkbox component ref warning with forwardRef

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-08 09:15:38 +08:00
boojack 7d4d1e8517 feat(web): standardize theme system with auto sync option (#5231)
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-08 00:41:21 +08:00
Steven 8f29db2f49 fix(server): prevent memory exhaustion in thumbnail generation
Address high memory usage when opening resource tab (fixes #5183) by implementing:

1. Concurrency control: Limit thumbnail generation to 3 concurrent operations using semaphore to prevent memory exhaustion when many images are requested simultaneously

2. S3 optimization: Skip server-side thumbnail generation for S3-stored images by default. S3 images now use presigned URLs directly, avoiding:
   - Downloading large images from S3 into server memory
   - Decoding and resizing images on the server
   - High memory consumption during batch requests

3. Memory management improvements:
   - Explicitly clear blob and decoded image from memory after use
   - Restructure thumbnail cache check to avoid unnecessary semaphore acquisition
   - Double-check pattern to prevent duplicate generation while waiting

This restores the original S3 behavior before commit e4f6345 while maintaining thumbnail support for local/database storage.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 09:04:21 +08:00
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 8f136ffa75 fix(api): correct user registration logic and first-user detection
- Changed first-user detection to check for any users instead of only HOST users
- Moved registration setting check before role assignment to properly block unauthorized registrations
- Fixed role assignment logic to ensure unauthenticated users always get USER role
- Updated test cases to create host user first when not testing first-user scenario

This ensures the first user is always created as HOST and registration settings are properly enforced for subsequent user creation.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 23:41:47 +08:00
boojack 21d31e3609 fix(security): implement security review recommendations (#5228)
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-06 23:32:27 +08:00
Elliott bb8fa90496 feat(i18n): add missing translations for zh-Hans (closes #5209) (#5229) 2025-11-06 22:32:03 +08:00
Steven 32d47abef2 fix(api): use correct instance setting method in user registration
Replace non-existent GetWorkspaceGeneralSetting with GetInstanceGeneralSetting
to properly check if user registration is allowed. This fixes a compilation
error that was preventing tests from running.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 20:00:35 +08:00
Florian Dewald 769dcd0cf9 fix(security): add missing authorization checks to various services (#5217) 2025-11-06 19:42:44 +08:00
boojack df93120f60 chore: add Claude Code GitHub workflow (#5227) 2025-11-06 19:40:01 +08:00
boojack 6cff7972d5 fix(web): fix tag syntax rendering on first line (#5226)
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-06 19:29:16 +08:00
Steven 8f0658e90d feat(web): enhance inbox notifications and user profile layouts
- Polish inbox notification items with improved visual hierarchy
  - Add original memo snippet with left border indicator
  - Redesign comment preview with gradient background and primary accent
  - Increase spacing and improve typography with consistent sizing
  - Add ring borders to avatars and refined icon badges
  - Enhance loading and error states with better skeleton designs
  - Improve hover states and transitions throughout

- Redesign user profile header layout
  - Create full-width centered header with avatar and user info
  - Add horizontal layout for profile actions
  - Improve responsive design with proper flex wrapping
  - Allow memo list to use full width for masonry layout

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 08:41:30 +08:00
Steven 71d0dbaf41 chore: fix linter 2025-11-05 23:59:24 +08:00
Steven 89b0b81bdc fix(web): add required headers for Nominatim reverse geocoding API
Nominatim's usage policy requires a User-Agent header to identify the application. Added User-Agent and Accept headers to the reverse geocoding fetch request, and improved error handling to check HTTP response status.

Fixes #5222

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 23:47:44 +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
boojack d98ee36178 chore: standardize and improve API structure (#5224)
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-05 22:36:51 +08:00
Florian Dewald 5f57f48673 fix(security): validate attachment filenames (#5218) 2025-11-05 08:48:55 +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
Steven d30ff2898f fix(web): correct task checkbox toggling in multi-section memos
Fixed a bug where clicking checkboxes in task lists would toggle the wrong
checkbox when a memo contained multiple sections with separate task lists.

The issue was that TaskListItem was counting tasks only within the immediate
parent list (ul/ol), but the toggleTaskAtIndex function counts all tasks
globally across the entire memo. This caused index misalignment.

Changes:
- Add containerRef to MemoContentContext for proper task scoping
- Pass memoContentContainerRef through context in MemoContent component
- Update TaskListItem to count all tasks within the container scope

This ensures task indices are calculated consistently with the markdown
manipulation logic, fixing checkbox toggling in complex multi-section memos.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-04 09:25:15 +08:00
Claude 9b72963e08 feat: replace HomeSidebar with MemoExplorer and MemoExplorerDrawer components 2025-11-02 23:31:29 +08:00
Claude dc9470f71c feat: implement OAuth state management with CSRF protection and cleanup functionality 2025-11-02 23:23:44 +08:00
Claude fb01b49ecf feat: add VisuallyHidden component and enhance LocationDialog accessibility 2025-11-02 23:02:08 +08:00
Claude 638b22a20d chore: implement InsertMenu with file upload and memo linking functionality 2025-11-02 22:53:07 +08:00
Steven 93964827ad refactor: redesign memo editor action bar UI
- Replace multiple action buttons with unified InsertMenu dropdown
- Consolidate upload, link memo, and location into single + button
- Redesign VisibilitySelector with text-based dropdown UI
- Unify badge styling for location, attachments, and links
  - Consistent height (h-7), padding, gaps, and border styles
  - Secondary foreground text color with hover states
  - Max width with truncation for long content
- Add image thumbnails in attachment badges
- Simplify button hierarchy with ghost variant for save/cancel
- Remove obsolete components (TagSelector, MarkdownMenu, etc.)
- Extract LocationView to separate component for better organization

Fixes #5196
2025-10-31 21:29:58 +08:00
Steven 1ced0bcdbd chore: fix linter 2025-10-31 08:36:12 +08:00
Steven bc1550e926 refactor(api): migrate inbox functionality to user notifications
- Remove standalone InboxService and move functionality to UserService
- Rename inbox to user notifications for better API consistency
- Add ListUserNotifications, UpdateUserNotification, DeleteUserNotification methods
- Update frontend components to use new notification endpoints
- Update store layer to support new notification model

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-31 08:33:09 +08:00
Steven e915e3a46b refactor(web): refactor MemoFilters component and add comprehensive filter support
- Refactored MemoFilters.tsx for better maintainability:
  * Centralized filter configuration with FILTER_CONFIGS object
  * Added TypeScript interfaces for type safety
  * Removed separate FactorIcon component
  * Extracted handleRemoveFilter function
  * Improved imports organization

- Polished MemoFilters UI styles:
  * Changed to modern pill/badge design with rounded-full
  * Enhanced spacing and color schemes
  * Added smooth transitions and hover effects
  * Improved interactive remove button with destructive color hints
  * Better text readability with font-medium

- Added comprehensive filter support to all pages:
  * Explore page: Added full filter support (was missing)
  * Archived page: Enhanced from basic to full filter support
  * UserProfile page: Enhanced from basic to full filter support
  * All pages now support: content search, tag search, pinned, hasLink, hasTaskList, hasCode, and displayTime filters

- Consistency improvements:
  * All pages using PagedMemoList now have identical filter logic
  * Respects workspace settings for display time (created/updated)
  * Unified filter behavior across Home, Explore, Archived, and UserProfile pages
2025-10-30 22:52:58 +08:00
Steven 1e954070b9 refactor(web): improve memo component skeleton and loading states 2025-10-30 22:25:19 +08:00
Steven 5e47f25bf5 feat(store): add hierarchical tag filtering support
Tag filters now support hierarchical matching where searching for a tag (e.g., "book") will match both the exact tag and any tags with that prefix (e.g., "book/fiction", "book/non-fiction"). This applies across all database backends (SQLite, MySQL, PostgreSQL) with corresponding test updates.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-30 00:21:53 +08:00
boojack a2bfba6928 chore: update readme
Added LambdaTest to sponsorship section

Signed-off-by: boojack <stevenlgtm@gmail.com>
2025-10-30 00:16:40 +08:00
Steven f65633e8a9 chore: fix linter issues in backend and frontend
- Remove extra blank line in memo_service.go (goimports)
- Remove invalid fields from CreateMemoRequest call (validateOnly, requestId)
- Clean up unnecessary comments

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-29 23:41:20 +08:00
Steven 243ecf14b0 refactor(api): remove DeleteMemoTag and RenameMemoTag endpoints
BREAKING CHANGE: Removed DeleteMemoTag and RenameMemoTag API endpoints
for better API consistency. Tags should now be managed by updating memo
content directly via UpdateMemo endpoint.

Backend changes:
- Remove RenameMemoTag and DeleteMemoTag RPC methods from proto
- Remove backend implementations in memo_service.go
- Regenerate protocol buffers (Go, TypeScript, OpenAPI)

Frontend changes:
- Remove RenameTagDialog component
- Simplify TagsSection to remove rename/delete functionality
- Improve tag styling with active state highlighting
- Add smooth transitions and better hover interactions
- Polish TagTree component for consistency
- Tags now only support click-to-filter (no inline editing)

Style improvements:
- Active tags highlighted with primary color and font-medium
- Consistent hover states across flat and tree views
- Better spacing and visual hierarchy
- Improved empty state styling

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-29 23:32:47 +08:00
Steven d794c0bf8b feat(web): improve loading performance with skeleton screens and parallel fetches
- Add MemoSkeleton component for smooth initial page load experience
- Integrate skeleton loader into PagedMemoList during initial fetch
- Parallelize user settings and shortcuts API calls (~50% faster session init)
- Batch-fetch memo creators in parallel to eliminate individual loading spinners
- Pass showCreator prop to Explore page for proper skeleton rendering

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 23:53:35 +08:00
Steven 2371bbb1b7 feat(web): add quick language and theme switchers to user menu
- Add language and theme selector submenus to UserMenu component for quick access
- Refactor shared utilities: extract THEME_OPTIONS constant and getLocaleDisplayName() function
- Update LocaleSelect and ThemeSelect to use shared utilities, eliminating code duplication
- Make UserMenu reactive with MobX observer for real-time setting updates
- Fix language switching reactivity by immediately updating workspaceStore.state.locale
- Add scrollable menu support for language selector (max-h-[90vh])
- Apply same instant locale update to PreferencesSection for consistency

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 22:32:25 +08:00
Steven d693142dd4 feat(web): enhance code blocks with copy button and fix link navigation
Add custom code block renderer with language display and copy functionality. Links now open in new windows, and clicking image links no longer triggers both link navigation and image preview.

- Add CodeBlock component with copy-to-clipboard button and language label
- Configure all markdown links to open in new windows with target="_blank"
- Fix image link behavior to prevent duplicate actions when clicked

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 22:06:07 +08:00
Steven b00df8a9d1 fix(web): remove error notifications for location geocoding failures
Remove disruptive error toasts when reverse geocoding or geolocation fails.
Instead, silently fall back to using coordinates as the location placeholder.
This improves UX for users in regions where OpenStreetMap is restricted
(e.g., China) or when CSP blocks external API calls.

Fixes #5198, #5197

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 21:28:29 +08:00
Steven 5f7c758f38 fix(web): make layout and direction settings reactive in UI
Fixed issue #5194 where changing the layout (List/Masonry) or sort direction
didn't update the UI until page refresh. The root cause was that ViewState
fields weren't marked as MobX observables, so the UI didn't react to changes
even though values were being persisted to localStorage.

Solution: Added constructor to ViewState that marks orderByTimeAsc and layout
fields as observable, following the same pattern used in other stores like
MemoFilterState.

Fixes #5194

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 07:58:15 +08:00
Steven 91a7e927a5 fix(server): reduce static asset cache to prevent stale files after redeploy
Changed Cache-Control max-age from 7 days to 1 hour with immutable directive.
This prevents users from experiencing blank pages or JS errors when accessing
frequently redeployed instances (e.g., demo environments) where old cached
assets may reference files that no longer exist after redeployment.

Since Vite generates content-hashed filenames, the immutable directive prevents
unnecessary revalidation while the shorter cache duration ensures fresh assets
are served within an hour of redeployment.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 07:55:02 +08:00
Steven 2197178dd7 chore: update README for clarity and consistency 2025-10-28 07:46:45 +08:00
boojack d516f9aab2 chore: tweak readme
Signed-off-by: boojack <stevenlgtm@gmail.com>
2025-10-27 23:41:24 +08:00
Steven f635d85bcf chore: fix reactions seed data
- Add comprehensive inline documentation for auth services
- Document session-based and token-based authentication flows
- Clarify authentication priority and validation logic
- Add detailed comments for JWT token structure and claims
- Fix reactions seed data to use memo UIDs instead of numeric IDs

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 20:27:27 +08:00
Claude f241b590a2 chore: update demo data 2025-10-27 09:20:26 +08:00
Claude 596b894ca0 chore: remove unused syntax
- Removed the wikilink extension from markdown services in test and API service.
- Deleted the DefaultLink and WikiLink components, simplifying link handling.
- Updated ConditionalComponent to remove wikilink checks.
- Adjusted MemoContent to exclude wikilink handling in markdown rendering.
- Refined markdown styles for compact rendering, enhancing readability.
- Added a Markdown Styling Guide to document the new compact styling approach.
2025-10-27 08:31:57 +08:00
Claude 7eec424274 chore: remove references handling from markdown extraction 2025-10-27 00:12:24 +08:00
Claude 6cb96ef65e chore: add missing punctuation in comments 2025-10-26 11:58:34 +08:00
Claude 739fd2cde6 refactor: update markdown parser
- Removed the `nodes` field from the `Memo` interface in `memo_service.ts`.
- Updated the `createBaseMemo` function and the `Memo` message functions to reflect the removal of `nodes`.
- Cleaned up the serialization and deserialization logic accordingly.

chore: remove code-inspector-plugin from Vite configuration

- Deleted the `codeInspectorPlugin` from the Vite configuration in `vite.config.mts`.
- Simplified the plugins array to include only `react` and `tailwindcss`.
2025-10-26 11:28:40 +08:00
Steven bfad0708e2 fix(web): make memoFilterStore reactive by marking fields as observable
Fixes the root cause of non-reactive filtering. The MemoFilterState class
was not marking its fields as observable in MobX, so changes to the filters
array were not being tracked.

Added makeObservable configuration to mark:
- filters and shortcut as observable
- addFilter, removeFilter, removeFiltersByFactor, clearAllFilters, setShortcut as actions

This ensures that when tags are clicked and filters are added/removed,
MobX observer components will re-render and fetch new data.

Related to #5189

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-25 07:01:27 +08:00
Steven e0b1153269 fix(web): resolve MobX observable reactivity issue in filter computation
Fixes filtering functionality that was broken due to improper use of
useMemo with MobX observables. The issue occurred because useMemo's
dependency array uses reference equality, but MobX observable arrays
are mutated in place (reference doesn't change when items are added/removed).

Changes:
- Remove useMemo from filter computation in Home, UserProfile, and Archived pages
- Calculate filters directly in render since components are already MobX observers
- Fix typo: memoFitler -> memoFilter in Archived.tsx

This ensures filters are recalculated whenever memoFilterStore.filters changes,
making tag clicks and other filter interactions work correctly.

Fixes #5189

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-25 06:59:13 +08:00
Steven 46ce0bc62e fix(store): correct PostgreSQL placeholder generation in IN clauses
Fixes a regression introduced in v0.25.2 where PostgreSQL IN clause
placeholders were not properly incremented, causing all parameters to
use the same placeholder index (e.g., $1, $1, $1 instead of $1, $2, $3).

This bug affected:
- ListReactions (ContentIDList) - caused "failed to list reactions" errors
- ListAttachments (MemoIDList)
- ListMemos (IDList and UIDList)

The fix combines placeholder generation and argument appending into a
single loop to ensure proper incrementing.

Fixes #5188

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-25 06:47:06 +08:00
Steven 0c0d2a6294 chore: bump version 2025-10-24 08:15:32 +08:00
Claude 455665a16b docs: enhance README with improved feature descriptions and formatting 2025-10-23 22:25:54 +08:00
boojack f2f2a5159c chore: tweak README to enhance sponsorship and clarity
Updated README to include sponsorship details and enhance clarity on features and benefits.

Signed-off-by: boojack <stevenlgtm@gmail.com>
2025-10-23 21:49:15 +08:00
Florian Dewald e4f6345342 feat: generate thumbnails for images stored in S3 and generate thumbnails with a maximum size (#5179) 2025-10-23 21:29:22 +08:00
Claude 16425ed650 feat(web): improve ReactionSelector UX with hover visibility
- Add hover-based visibility for reaction selector in memo cards
- Show reaction selector only on card hover or when popover is open
- Add onOpenChange callback to ReactionSelector for state management
- Reorder action buttons for better visual hierarchy
- Simplify conditional rendering of comment link
2025-10-23 21:20:15 +08:00
Claude 16e0049490 chore: improve layout and spacing in LocationSelector 2025-10-23 20:21:00 +08:00
Claude 7079790d4f feat: add copy content functionality to MemoActionMenu 2025-10-23 20:05:31 +08:00
Claude 686d31b357 feat: enhance attachment store with MobX observables and actions 2025-10-23 19:55:44 +08:00
Claude e35f16306e feat: add id as final tie-breaker in ListMemos 2025-10-23 19:44:41 +08:00
Steven c177871ab4 chore: remove outdated dependabot configuration and agents documentation 2025-10-23 19:16:21 +08:00
Steven f5624fa682 refactor: standardize MobX store architecture with base classes and utilities
Refactored all stores to follow consistent patterns and best practices while keeping MobX:

New Infrastructure:
- Created base-store.ts with StandardState base class and factory functions
- Added store-utils.ts with RequestDeduplicator, StoreError, and OptimisticUpdate helpers
- Added config.ts for MobX configuration and strict mode
- Created comprehensive README.md with architecture guide and examples

Server State Stores (API data):
- attachment.ts: Added request deduplication, error handling, computed properties, delete/clear methods
- workspace.ts: Added Theme type validation, computed memoization, improved initialization
- memo.ts: Enhanced with optimistic updates, request deduplication, structured errors
- user.ts: Fixed temporal coupling, added computed memoization, request deduplication

Client State Stores (UI state):
- view.ts: Added helper methods (toggleSortOrder, setLayout, resetToDefaults), input validation
- memoFilter.ts: Added utility methods (hasFilter, clearAllFilters, removeFiltersByFactor)

Improvements:
- Request deduplication prevents duplicate API calls (all server stores)
- Computed property memoization improves performance
- Structured error handling with error codes
- Optimistic updates for better UX (memo updates)
- Comprehensive JSDoc documentation
- Type-safe APIs with proper exports
- Clear separation between server and client state

All stores now follow consistent patterns for better maintainability and easier onboarding.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 19:13:42 +08:00
dependabot[bot] cce52585c4 chore: bump actions/setup-node from 4 to 5 (#5134)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-22 22:41:45 +08:00
Steven c09ea5a8ab chore: remove basic filter support from ListAttachments method 2025-10-22 22:41:24 +08:00
Steven 2e31bee1de fix: add missing period to comment per golangci-lint 2025-10-22 22:32:24 +08:00
Steven 9121ddbad9 feat(api): support username lookup in GetUser endpoint
- Update GetUser to accept both numeric IDs and username strings (users/{id} or users/{username})
- Implement CEL filter parsing for username-based lookups
- Update proto documentation to reflect dual lookup capability
- Simplify frontend user store to use GetUser instead of ListUsers filter
- Update ListUsers filter documentation to show current capabilities
2025-10-22 21:48:34 +08:00
Steven 4d4325eba5 chore: update component styles for consistency 2025-10-22 20:21:58 +08:00
Steven b4341dd123 fix(web): make reaction selector responsive with scrolling
- Replace fixed width (max-w-56) with responsive viewport-based width
- Use 90vw on mobile and max-w-md on desktop for better adaptability
- Add vertical scrolling with max-h-64 overflow-y-auto
- Increase grid columns to 8 on medium+ screens for better space utilization
- Ensures all reactions are accessible regardless of quantity

Fixes #5117

Co-authored-by: GitHub Copilot <noreply@github.com>
2025-10-22 19:31:58 +08:00
dependabot[bot] 07b523e4b2 chore: bump actions/setup-go from 5 to 6 (#5135)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-22 19:23:39 +08:00
dependabot[bot] 7a58250195 chore: bump actions/stale from 9.1.0 to 10.0.0 (#5136)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-22 19:23:25 +08:00
Simon 290cdf5d4f chore: use input type datetime-local instead of text (#5174) 2025-10-22 09:04:37 +08:00
Steven 2d4361d5fe chore: update memo content formatting and enhance link styling 2025-10-22 08:50:09 +08:00
Steven d8f7a4e739 chore: tweak demo data 2025-10-21 23:41:46 +08:00
Steven 81e852e3b5 chore: update gomark dependency 2025-10-21 23:09:27 +08:00
Steven b19e736f10 chore: tweak demo data 2025-10-20 23:58:49 +08:00
Steven b4ea7d843f feat: enhance memo sorting functionality to support multiple fields 2025-10-20 23:41:58 +08:00
Steven 95de5cc700 refactor: update migration history methods 2025-10-20 23:05:50 +08:00
Johnny bc7decf642 refactor: remove unused constants 2025-10-16 20:40:46 +08:00
Copilot b685ffacdf refactor: memo filter
- Updated memo and reaction filtering logic to use a unified engine for compiling filter expressions into SQL statements.
- Removed redundant filter parsing and conversion code from ListMemoRelations, ListReactions, and ListAttachments methods.
- Introduced IDList and UIDList fields in FindMemo and FindReaction structs to support filtering by multiple IDs.
- Removed old filter test files for reactions and attachments, as the filtering logic has been centralized.
- Updated tests for memo filtering to reflect the new SQL statement compilation approach.
- Ensured that unsupported user filters return an error in ListUsers method.
2025-10-16 09:22:52 +08:00
Steven 228cc6105d chore: update StatCard component for improved icon and count rendering in StatisticsView 2025-10-14 23:15:16 +08:00
Steven 56758f107c chore: refactor ActivityCalendar to use a calendar matrix and improve cell rendering 2025-10-14 21:12:43 +08:00
Steven 5011eb5d70 feat: enhance LocationSelector with improved geolocation handling 2025-10-14 20:23:14 +08:00
Ben Mitchinson 12c4aeeccc feat: lat/long input fields (#5152)
Signed-off-by: Ben Mitchinson <mitchinson.dev@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-14 20:07:01 +08:00
Steven 435cc7b177 feat: implement masonry layout with responsive columns and memo height tracking 2025-10-14 19:46:09 +08:00
Copilot 3245613a88 chore: cleanup components naming 2025-10-12 18:58:37 +08:00
asttool 54e3c13435 refactor: use WaitGroup.Go to simplify code (#5162)
Signed-off-by: asttool <asttool@outlook.com>
2025-10-10 22:28:35 +08:00
Huang Cheng Ting d7e751997d chore: update zh-Hant translation (#5159) 2025-10-09 21:30:55 +08:00
Nic Luckie 20233c7051 feat(web): add accessible ConfirmDialog and migrate confirmations; and Markdown-safe descriptions (#5111)
Signed-off-by: Nic Luckie <nicolasluckie@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-09 00:40:08 +08:00
Johnny 4056a1bada chore: update sponsors 2025-10-08 20:42:15 +08:00
Johnny efe6013c36 fix: add user authentication checks 2025-10-08 20:30:05 +08:00
Claude f6e025d583 feat: implement theme management with system preference detection and early application 2025-10-08 09:51:49 +08:00
dependabot[bot] 3514180721 chore: bump golang.org/x/crypto from 0.41.0 to 0.42.0 (#5141)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-08 09:30:37 +08:00
dependabot[bot] 184e975664 chore: bump mobx-react-lite from 4.1.0 to 4.1.1 in /web (#5137)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-08 09:28:40 +08:00
dependabot[bot] 1db86bcd30 chore: bump typescript-eslint from 8.44.0 to 8.45.0 in /web (#5138)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-08 09:28:31 +08:00
dependabot[bot] 0f19713fce chore: bump github.com/aws/aws-sdk-go-v2/config from 1.31.6 to 1.31.12 (#5139)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-08 09:28:25 +08:00
dependabot[bot] ca62b8cd0c chore: bump google.golang.org/protobuf from 1.36.8 to 1.36.9 (#5140)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-08 09:28:17 +08:00
dependabot[bot] cca33af8fd chore: bump google.golang.org/grpc from 1.75.0 to 1.75.1 (#5142)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-08 09:28:06 +08:00
dependabot[bot] 763a0d0dea chore: bump golang.org/x/mod from 0.27.0 to 0.28.0 (#5143)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-08 09:27:58 +08:00
dependabot[bot] 498facdfbe chore: bump lucide-react from 0.486.0 to 0.544.0 in /web (#5144)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-08 09:27:48 +08:00
dependabot[bot] 698b08ae8d chore: bump tw-animate-css from 1.3.8 to 1.4.0 in /web (#5145)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-08 09:27:39 +08:00
dependabot[bot] e3890ca9be chore: bump typescript from 5.9.2 to 5.9.3 in /web (#5146)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-07 00:14:11 +08:00
boojack bcfcb1b554 docs: add sponsor section for Warp in README (#5127) 2025-10-01 05:25:42 +08:00
Claude c3a961229e fix: update cell opacity colors to use primary theme instead of destructive 2025-09-29 15:01:46 +08:00
github-actions[bot] 074c580214 chore: bump gomark
- Bump protoc-gen-go version from v1.36.8 to v1.36.9 in multiple generated files.
- Enhance OpenAPI descriptions for various endpoints to improve clarity and readability.
- Fix typo in the description list handling in the markdown service.
- Update HTMLElement component to handle children and self-closing tags correctly.
- Modify types in the markdown service to include children and self-closing properties for HTML elements.
2025-09-28 16:15:55 +08:00
Steven 8d8cc83fd8 chore: tweak assets link 2025-09-26 20:47:54 +08:00
Steven 7ab57f8ed2 chore: upgrade frontend dependencies 2025-09-17 21:51:58 +08:00
Steven 6d1485d168 fix: reset state on dialog close and improve dialog open handling 2025-09-17 21:51:46 +08:00
Steven 5ad2038b1a feat: update gomark dependency and refactor markdown parsing logic 2025-09-17 21:09:30 +08:00
Steven b7f792cbf7 chore: tweak development instructions 2025-09-17 08:48:27 +08:00
Steven f44b0850f4 feat: enhance CodeBlock component with theme-aware syntax highlighting 2025-09-16 19:08:28 +08:00
Steven c3d4f8e9d1 feat: implement user-specific SQL converter for filtering in user service 2025-09-10 21:05:26 +08:00
Steven 383553d3c8 feat: add DOMPurify for sanitizing HTML content in CodeBlock component 2025-09-10 20:52:51 +08:00
Giacomo Cerquone f4e23727bb fix: avoid hiding reaction selector and keep it always shown for mobile (#5079) 2025-09-09 11:35:21 +08:00
Giacomo Cerquone 60123de318 fix: update useEffect dependency to location.key so drawer is closed also when re-navigating to current route (#5077) 2025-09-08 16:26:18 +08:00
dependabot[bot] 3be1b3a1e3 chore: bump @radix-ui/react-checkbox from 1.3.2 to 1.3.3 in /web (#5062)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-03 22:57:34 +08:00
dependabot[bot] fb8a997248 chore: bump @radix-ui/react-dropdown-menu from 2.1.15 to 2.1.16 in /web (#5063)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-03 22:57:11 +08:00
dependabot[bot] b2a259d0ff chore: bump react-router-dom from 7.7.1 to 7.8.2 in /web (#5061)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-03 21:01:44 +08:00
dependabot[bot] b8fe953833 chore: bump @radix-ui/react-select from 2.2.5 to 2.2.6 in /web (#5065)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-03 21:01:34 +08:00
Steven 5a1af7b240 fix: adjust badge height 2025-09-02 23:18:11 +08:00
dependabot[bot] 0c516c83bd chore: bump nice-grpc-web from 3.3.7 to 3.3.8 in /web (#5056)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-02 22:56:34 +08:00
dependabot[bot] 9c67bbbbba chore: bump tw-animate-css from 1.3.6 to 1.3.7 in /web (#5053)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-02 22:56:23 +08:00
dependabot[bot] 74a44ac3e2 chore: bump actions/checkout from 4 to 5 (#5052)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-02 22:56:08 +08:00
dependabot[bot] fdbcd20ad1 chore: bump react-hot-toast from 2.5.2 to 2.6.0 in /web (#5051)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-02 22:55:57 +08:00
dependabot[bot] 56fd9fd7d5 chore: bump @bufbuild/protobuf from 2.6.2 to 2.7.0 in /web (#5057)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-02 22:21:47 +08:00
dependabot[bot] 9c456c3b72 chore: bump i18next from 25.3.2 to 25.4.2 in /web (#5058)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-02 22:21:34 +08:00
dependabot[bot] 1954eeb37b chore: bump github.com/spf13/cobra from 0.0.3 to 1.10.1 (#5059)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-02 22:21:21 +08:00
Johnny ebff15149b fix: use Fprint instead of Fprintf for development mode message 2025-08-31 20:38:07 +08:00
Johnny 3a7538f787 chore: fix linter 2025-08-31 20:29:40 +08:00
Johnny a373673087 chore: go mod tidy 2025-08-31 20:24:18 +08:00
Johnny 7cc2df9254 chore: fix linter 2025-08-31 20:22:32 +08:00
Johnny 3d1c197764 chore: upgrade golangci-lint version to v2.4.0 2025-08-31 19:50:55 +08:00
Johnny 9557150a87 chore: upgrade go version to 1.25 2025-08-31 19:45:41 +08:00
Johnny e427344e82 chore: upgrade dependencies 2025-08-31 13:14:10 +08:00
Johnny 12ab7e9dde chore: tweak docs 2025-08-27 21:35:04 +08:00
Johnny 3ba3f610c9 chore: upgrade typescript-eslint 2025-08-27 19:54:17 +08:00
Johnny 0b4252d1a3 chore: fix linter 2025-08-25 19:52:53 +08:00
Johnny cf29684882 chore: tweak links 2025-08-25 19:51:01 +08:00
Johnny 01c6aca788 chore: update readme with star history section 2025-08-24 22:43:49 +08:00
Xiang Jaywhen 016efe50a2 fix: update the link of Installation Guide (#5024)
Signed-off-by: Xiang Jaywhen <jaywhenx@gmail.com>
2025-08-24 20:24:46 +08:00
varsnotwars e2454a8ae4 chore: add test for ListMemos (#5015) 2025-08-19 21:57:38 +08:00
boojack c5a61ba89e chore: tweak README.md
Signed-off-by: boojack <stevenlgtm@gmail.com>
2025-08-18 22:13:58 +08:00
Steven 0d658088dc chore: bump version to 0.25.1 2025-08-18 20:21:30 +08:00
Steven e07e9f2e9f fix: theme selector 2025-08-18 20:08:53 +08:00
varsnotwars fbcdf0fba7 fix update theme not saving (#5012) 2025-08-18 01:39:48 +00:00
Johnny 01d3f2f86c chore: tweak dark theme 2025-08-17 21:11:54 +08:00
Johnny e93f3cbb8b refactor: unify theme and apperance 2025-08-17 11:27:59 +08:00
varsnotwars 4eb5b67baf feat: attachments by id (#5008) 2025-08-15 22:02:29 +08:00
Amazingca a3add85c95 fix: Update SSO login flow to encode redirect_uri (#5006)
Signed-off-by: Amazingca <autumn@amazingca.dev>
2025-08-15 08:45:19 +08:00
varsnotwars a9508b2546 chore: simplify convert reaction (#5001) 2025-08-14 00:06:23 +08:00
Sara Vieira 51d643c780 chore: default type to text/plain (#4993)
Signed-off-by: Sara Vieira <hey@iamsaravieira.com>
Co-authored-by: boojack <stevenlgtm@gmail.com>
2025-08-13 20:09:02 +08:00
Liu Chao ba7dfb7d98 fix: OpenAPI Parameter Conflict in DeleteMemoTag Endpoint (#4985)
Signed-off-by: ChaoLiu <chaoliu719@gmail.com>
2025-08-13 07:14:18 +08:00
Huang Cheng Ting 5ba81d629c fix: prevent default focus behavior on open and close events in sheet (#4998) 2025-08-13 07:13:45 +08:00
Johnny 76ca258f23 chore: simplify update user settings 2025-08-11 23:19:56 +08:00
Huang Cheng Ting d86756f104 feat: add an option to auto expand subtags in tree mode (#4994) 2025-08-11 23:05:36 +08:00
varsnotwars 3fd305dce7 fix: preferences being overwritten (#4990) 2025-08-11 22:57:52 +08:00
Neo c76ffb0fe4 chore: adds a check to only query reactions when there are actual memos (#4984) 2025-08-10 14:25:35 +08:00
Jason Shawn D' Souza 1dd25634fd fix: Midi files show up as playable (#4991) 2025-08-10 14:23:41 +08:00
Neo 6b507ff600 fix: pinned shortcut comparison operators (#4987) 2025-08-10 14:22:54 +08:00
varsnotwars 9f8921d3b9 fix: preference not being saved (#4980)
Signed-off-by: varsnotwars <varsnotwars@protonmail.com>
Co-authored-by: Johnny <yourselfhosted@gmail.com>
2025-08-08 22:50:46 +08:00
Sara Vieira 1f1add1a48 fix: add mime type check for file types (#4981) 2025-08-08 20:39:16 +08:00
Tobias Waslowski 15c146cfc5 feat(editor): create text-based autocompleting commands (#4971) 2025-08-08 18:55:59 +08:00
varsnotwars f4bdfa28a0 feat: filter/method for reactions by content_id (#4969) 2025-08-08 00:00:51 +08:00
Brandon Sprague 931ddb7c1c chore: add a new LOG_STACKTRACES option (#4973) 2025-08-07 23:56:21 +08:00
Johnny 8576001c83 fix: nl.json
Signed-off-by: Johnny <yourselfhosted@gmail.com>
2025-08-07 14:43:35 +08:00
Stephan Paternotte 1043fc8fba chore: update nl.json (#4974)
Signed-off-by: Stephan Paternotte <Stephan-P@users.noreply.github.com>
2025-08-07 14:40:53 +08:00
Colin Holzman 8319516d1a fix: boolean filters (#4966) 2025-08-06 21:06:15 +08:00
johnnyjoy 66b4f583a5 fix: linter 2025-08-06 20:22:20 +08:00
aarohee-he 0f2390a0b7 feat: add tooltips to editor buttons (#4934)
Co-authored-by: Anthony Cooper <antcoop096@gmail.com>
Co-authored-by: aarohee-he <aarohee-he@users.noreply.github.com>
Co-authored-by: Mishti Gala <mishtigala19@gmail.com>
2025-08-06 10:15:06 +08:00
boojack 13957472eb chore: merge visibility selector into save button
Signed-off-by: boojack <stevenlgtm@gmail.com>
2025-08-06 00:03:59 +08:00
johnnyjoy a5e441b622 chore: tweak dark mdoe styles 2025-08-05 21:07:59 +08:00
Liu Chao 3427ae75ba fix: resolve gRPC Gateway connection issue when server address is empty (#4968)
Signed-off-by: ChaoLiu <chaoliu719@gmail.com>
2025-08-05 19:42:20 +08:00
johnnyjoy 506b477d50 fix: get user by username 2025-08-04 19:56:12 +08:00
varsnotwars fa2fa8a5d7 refactor: remove call to db for parent memo name (#4947) 2025-08-04 19:39:52 +08:00
Huang Cheng Ting 896a3dccf2 chore: update zh-Hant translation (#4962) 2025-08-04 19:38:58 +08:00
johnnyjoy 34fb3f1514 chore: fix linter 2025-08-03 19:55:04 +08:00
Colin Holzman aae7ec8d1f fix: calendar filter (#4942) 2025-08-03 19:11:09 +08:00
Maximilian Krauß 4d6042e35f fix(tags): ensure JSON array elements are properly formatted in SQL queries (#4944) 2025-08-03 19:10:59 +08:00
XIN_____ 9c60165ba1 chore: update zh-Hans.json (#4940) 2025-08-03 19:10:49 +08:00
Andrea Marchetta 71464779dd fix: change itemCount into an Int64 (#4945) 2025-08-03 19:07:17 +08:00
dependabot[bot] 07e270564a chore: bump golang.org/x/net from 0.40.0 to 0.42.0 (#4948)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-03 19:05:49 +08:00
dependabot[bot] 94b58f0691 chore: bump google.golang.org/grpc from 1.72.2 to 1.74.2 (#4949)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-03 19:05:40 +08:00
dependabot[bot] 5a7693c90a chore: bump github.com/google/cel-go from 0.25.0 to 0.26.0 (#4951)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-03 19:05:30 +08:00
dependabot[bot] 11685c1f4d chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager from 1.17.82 to 1.18.2 (#4952)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-03 19:05:22 +08:00
dependabot[bot] a5711e893a chore: bump code-inspector-plugin from 0.18.3 to 1.0.4 in /web (#4954)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-03 19:05:17 +08:00
johnnyjoy b2a2151eaf chore: bump frontend dependencies 2025-08-03 18:17:21 +08:00
dependabot[bot] 9b06275f4c chore: bump vite from 7.0.1 to 7.0.6 in /web (#4957)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-03 12:46:05 +08:00
Colin Holzman 671f4bf88b fix: shortcuts list (#4936) 2025-07-31 19:52:13 +08:00
XIN_____ 79c7fcc8b6 chore: update zh-Hans.json (#4933) 2025-07-31 19:50:29 +08:00
Colin Holzman 6005d0f3f7 chore: use MEMOS_INSTANCE_URL for "Copy Link" (#4930) 2025-07-30 18:57:39 +08:00
Steven 1fcafd807e chore: enable memo comments by default 2025-07-29 22:31:18 +08:00
Johnny 5074268f4f fix: action styles in memo editor 2025-07-29 22:10:31 +08:00
Maximilian Krauß e724a7ef72 fix: disable profiler in production mode (#4925) 2025-07-29 19:22:41 +08:00
johnnyjoy 9971cbeed4 chore: fix linter 2025-07-29 19:20:59 +08:00
Johnny 8f51791da8 chore: update user setting definition 2025-07-29 09:21:51 +08:00
Johnny 3b8bfe72ea fix: linter 2025-07-27 23:35:01 +08:00
johnnyjoy c5d497a1f0 chore: update user settings 2025-07-27 23:12:42 +08:00
johnnyjoy 3f56ce47d2 chore: update definition of workspace setting 2025-07-27 15:50:09 +08:00
Anthony Cooper 53d3978507 chore: add hyperlink for 'releases page' (#4914) 2025-07-24 12:51:02 +08:00
Steven c5d2d15278 chore: fix eslint 2025-07-23 23:41:59 +08:00
Steven f78b277462 chore: simplify add memo relation 2025-07-23 23:34:30 +08:00
johnnyjoy 9b5b7b1ea2 Merge branch 'main' of https://github.com/usememos/memos 2025-07-23 22:22:15 +08:00
johnnyjoy c5767bf9d6 fix: eslint 2025-07-23 22:22:12 +08:00
Maximilian Krauß 2c7eb23343 feat(inbox): handles errors while fetching and adds possibility to delete items (#4908) 2025-07-23 14:21:26 +00:00
johnnyjoy db63b1949a chore: fix creator id format 2025-07-23 22:18:47 +08:00
johnnyjoy 9ea2f9f686 fix: linter 2025-07-23 22:13:48 +08:00
johnnyjoy ed23cbc011 refactor: memo filter 2025-07-23 22:10:16 +08:00
Steven 1a75d19a89 fix: memo filter for sqlite 2025-07-22 23:39:52 +08:00
Steven ac386c218d fix: workspace setting keys 2025-07-22 22:59:54 +08:00
Steven c133f5528a fix: workspace setting keys in frontend 2025-07-22 22:45:47 +08:00
johnnyjoy 6e45e9f8b6 refactor: deprecate old filter 2025-07-22 21:25:57 +08:00
johnnyjoy 7098721617 chore: fix linter 2025-07-22 21:15:23 +08:00
johnnyjoy e24f92b719 fix: tests 2025-07-22 21:13:24 +08:00
johnnyjoy b55904a428 feat: support more filter factors 2025-07-22 19:18:08 +08:00
Johnny 1a3fc4d874 fix: media width 2025-07-21 23:55:28 +08:00
johnnyjoy 6d9770b9c8 chore: move filter to filters 2025-07-21 21:52:00 +08:00
johnnyjoy 7481fe10bf chore: remove order by pinned 2025-07-21 21:45:10 +08:00
Johnny 71181b1640 chore: update openapi version 2025-07-20 12:02:16 +08:00
Huang Cheng Ting f675324994 chore: update zh-Hant translation (#4895) 2025-07-18 19:27:03 +08:00
Steven d7ced7b738 fix: code block style in dark mode 2025-07-18 19:25:29 +08:00
Johnny 74769b3332 fix: user state 2025-07-17 22:36:28 +08:00
Johnny e3735d2de3 fix: storage setting 2025-07-17 22:02:40 +08:00
Johnny f09897e4b6 fix: dialog state 2025-07-17 21:58:00 +08:00
Huang Cheng Ting 6119a4b965 chore: update zh-Hant translation (#4889) 2025-07-17 21:24:29 +08:00
Maximilian Krauß c4baba8527 fix(syntax-highlighting): adds missing CSS imports to CodeBlock.tsx (#4890) 2025-07-17 21:23:42 +08:00
Anthony Cooper 1f88e3e2d2 chore: Docker hyperlink in README (#4887) 2025-07-17 12:12:48 +08:00
Johnny 40130350c5 fix: args offset for postgres 2025-07-17 00:05:07 +08:00
Steven 834f92f67c chore: fix linter 2025-07-16 22:24:50 +08:00
Steven 0398df1d21 chore: update migrator comments 2025-07-16 21:59:37 +08:00
Jovane Castro a8db132110 chore(i18n): update hindi translation (#4858) 2025-07-16 21:46:18 +08:00
XIN_____ 84eacebfbb chore: update zh text i18n (#4844) 2025-07-16 21:46:09 +08:00
Jovane Castro 72b5186a56 chore(i18n): update croatian translation (#4859) 2025-07-16 21:45:58 +08:00
Steven 54e6ca37a2 chore: tweak props definition 2025-07-15 23:51:28 +08:00
Steven 8df0dea304 chore: remove fixed theme color 2025-07-15 23:26:07 +08:00
Jovane Castro 7683b26658 chore(i18n): update farsi translation (#4855) 2025-07-15 23:21:16 +08:00
Jovane Castro 4066af989c chore(i18n): update spanish translation (#4854) 2025-07-15 23:20:52 +08:00
Jovane Castro 8ef13468c7 chore(i18n): update hungarian translation (#4860) 2025-07-15 23:20:15 +08:00
Jovane Castro 2d4b5a1044 chore(i18n): update german translation (#4853) 2025-07-15 19:25:33 +08:00
Jovane Castro a21112427b chore(i18n): update french translation (#4856) 2025-07-15 19:25:21 +08:00
Jovane Castro 5a53f7178c chore(i18n): update italian translation (#4861) 2025-07-15 19:25:10 +08:00
Jovane Castro 74d35f7e33 chore(i18n): update japanese translation (#4862) 2025-07-15 19:24:59 +08:00
Jovane Castro 163038d5e0 chore(i18n): update georgian translation (#4863) 2025-07-15 19:24:49 +08:00
Jovane Castro af60f81f96 chore(i18n): update korean translation (#4864) 2025-07-15 18:15:25 +08:00
Jovane Castro c79b114972 chore(i18n): update marathi translation (#4865) 2025-07-15 18:14:41 +08:00
Jovane Castro a95104a0d4 chore(i18n): update norwegian translation (#4866) 2025-07-15 18:14:30 +08:00
Jovane Castro ff38347272 chore(i18n): update dutch translation (#4867) 2025-07-15 18:14:19 +08:00
Jovane Castro 4659b932d0 chore(i18n): update polish translation (#4868) 2025-07-15 18:14:09 +08:00
Jovane Castro d9e13baa37 chore(i18n): update portuguese-Brazil translation (#4869) 2025-07-15 18:13:58 +08:00
Jovane Castro 4551a0c52d chore(i18n): update portuguese translation (#4870) 2025-07-15 18:13:40 +08:00
Jovane Castro bd1f675051 chore(i18n): update slovenian translation (#4871) 2025-07-15 18:13:19 +08:00
Jovane Castro b4046f339e chore(i18n): update swedish translation (#4872) 2025-07-15 18:12:56 +08:00
Jovane Castro d9d63bf174 chore(i18n): update thai translation (#4873) 2025-07-14 23:26:17 +08:00
Jovane Castro d2dcf26104 chore(i18n): update turkish translation (#4874) 2025-07-14 23:26:06 +08:00
Johnny 1c408ff5a9 chore: remove unused main file 2025-07-14 23:18:24 +08:00
Jovane Castro 78387bec83 chore(i18n): update ukrainian translation (#4875) 2025-07-14 23:14:06 +08:00
Dedy F. Setyawan def61a8877 fix(i18n): Improve Indonesian translation (#4849) 2025-07-12 21:29:51 +08:00
Anthony Cooper 02641ef10a chore: hyperlinks in README Prerequisites (#4848) 2025-07-12 21:29:34 +08:00
unuunn 08883b58a7 updated Russian translation (#4840) 2025-07-10 07:38:56 +08:00
unuunn 9eafb9bc26 feat: highlight pinned memos (#4843) 2025-07-10 07:38:33 +08:00
unuunn 452f47c4b9 set HasCode only for CodeBlock (#4842) 2025-07-10 07:37:33 +08:00
Steven 29b683d5db fix: dialog styles 2025-07-09 21:48:02 +08:00
Steven e8862e3ca9 chore: update claude.md 2025-07-09 21:13:54 +08:00
Amar Singh Rathour b779dd2e54 fix: correct avatar URL generation to resolve 404 errors (#4839) 2025-07-09 21:05:52 +08:00
Dedy F. Setyawan e803d7bc0f feat(i18n): update Indonesian (id) translations (#4838) 2025-07-09 18:08:36 +08:00
unuunn 8732575ea4 fix: dayjs - ISO 8601 compatible DATE_TIME_FORMAT (#4829) 2025-07-09 00:16:10 +08:00
XIN_____ 0b1b471ee4 chore: update zh-Hant.json (#4833) 2025-07-08 23:03:35 +08:00
Steven 3ac4a03229 chore: update i18n 2025-07-08 20:33:44 +08:00
Steven c1708df7a2 chore: use select/dropdown instead of popover 2025-07-08 20:25:56 +08:00
Jovane Castro d32924ec48 chore: update i18n for Arabic locale (#4825) 2025-07-08 19:57:50 +08:00
Jovane Castro 1e582baf1c chore: update i18n for Catalan locale (#4826) 2025-07-08 19:57:14 +08:00
Jovane Castro eeb18e5deb chore: update i18n for Czech locale (#4827) 2025-07-08 19:57:08 +08:00
Kevin b074aefc34 chore: enhance site.webmanifest in firefox (#4828)
Signed-off-by: Kevin <16837578+KevinStaude@users.noreply.github.com>
2025-07-08 19:56:46 +08:00
Steven 533591af2b chore: theme in user setting 2025-07-08 19:50:04 +08:00
Johnny f907619752 chore: move frontend store 2025-07-07 22:44:08 +08:00
Johnny 12fdf5292d chore: tweak form style 2025-07-07 22:33:49 +08:00
johnnyjoy 239671eb87 chore: tweak tag style 2025-07-07 22:20:17 +08:00
Johnny e55ed8a9c7 chore: new theme whitewall 2025-07-07 20:13:55 +08:00
Johnny 1b3083b216 feat: themes (#4824) 2025-07-07 20:13:22 +08:00
Johnny 3426a791b6 chore: update tag styles 2025-07-07 08:58:09 +08:00
Johnny fb13d2e63d chore: tweak colors 2025-07-07 08:46:53 +08:00
Johnny d8d88c2505 fix: creator view 2025-07-06 22:51:28 +08:00
Johnny f2e27c16a1 chore: tweak colors 2025-07-06 22:26:54 +08:00
Johnny 240d89fbca feat: migrate dialogs 2025-07-06 22:01:55 +08:00
Jovane Castro f70138535c chore: update i18n for pt-BR text (#4819) 2025-07-06 13:59:50 +08:00
Johnny 35928ce5ba chore: unify colors 2025-07-06 13:55:08 +08:00
Jovane Castro 2e474d37fd chore: update i18n for pt-BR locale (#4817) 2025-07-05 19:32:57 +08:00
dependabot[bot] d60aee7823 chore: bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.80.0 to 1.82.0 (#4806)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-05 19:32:25 +08:00
Johnny 41fdc7a484 chore: fix frontend linter 2025-07-05 11:44:01 +08:00
Johnny a3de61a141 chore: fix dark mode 2025-07-05 11:40:49 +08:00
XIN_____ cf16795a98 chore: update zh text (#4797) 2025-07-05 11:28:30 +08:00
dependabot[bot] 3c512939a8 chore: bump github.com/go-sql-driver/mysql from 1.9.2 to 1.9.3 (#4807)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-05 11:27:57 +08:00
Johnny db4b1f5fde chore: tweak styles 2025-07-05 11:26:59 +08:00
Johnny 91be2f68d1 feat: variant colors (#4816) 2025-07-04 23:03:13 +08:00
dependabot[bot] b164c15976 chore: bump @types/node from 22.15.34 to 24.0.8 in /web (#4802)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-03 22:55:35 +08:00
dependabot[bot] f8fa0985fb chore: bump tailwind-merge from 2.6.0 to 3.3.1 in /web (#4801)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-03 22:39:25 +08:00
dependabot[bot] 1e09bf9a4f chore: bump vite from 6.3.5 to 7.0.0 in /web (#4805)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-03 22:39:10 +08:00
dependabot[bot] 17cd19588d chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager from 1.17.77 to 1.17.82 (#4808)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-03 22:34:19 +08:00
dependabot[bot] 49004f230f chore: bump golang.org/x/mod from 0.24.0 to 0.25.0 (#4809)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-03 22:34:11 +08:00
Steven fda19c2d73 chore: update 2025-07-03 22:33:31 +08:00
Steven 046c6c83e1 chore: fix linter formats 2025-07-03 22:28:45 +08:00
Copilot e3a2dadb4b fix: tag count regression - remove double increment causing off-by-one error (#4800)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: boojack <24653555+boojack@users.noreply.github.com>
2025-07-02 20:17:19 +08:00
Steven 0df3171b64 chore: remove command 2025-07-01 20:14:42 +08:00
boojack 0cabdbe020 chore: rename Popover.tsx to popover.tsx
Signed-off-by: boojack <stevenlgtm@gmail.com>
2025-07-01 19:43:46 +08:00
Steven 49766ed920 chore: update frontend instructions 2025-07-01 19:42:25 +08:00
Johnny 493832aeb4 refactor: unify components 2025-07-01 19:29:48 +08:00
Steven 50a41a39a6 chore: tweak instructions 2025-06-30 19:49:18 +08:00
XIN_____ 98d1238674 chore: update i18n text for zh-hans (#4790) 2025-06-28 16:06:32 +08:00
Steven c18d6927ba chore: update user session table 2025-06-27 00:00:06 +08:00
johnnyjoy 1fffc41f79 feat: sliding expiration for user sessions 2025-06-26 23:03:28 +08:00
XIN_____ e93d695aa8 chore: update i18n for zh text (#4785)
* Update zh-Hans.json

* Update zh-Hant.json

Co-authored-by: @kiss-fire <iamtaoxin@gmail.com>

---------

Co-authored-by: @kiss-fire <iamtaoxin@gmail.com>
2025-06-26 08:44:32 +08:00
Johnny 3e24f8cf62 fix: seed data 2025-06-25 10:07:24 +08:00
Steven 42d1650c6d chore: tweak auth service 2025-06-24 23:31:37 +08:00
Steven 6e1b01cb68 chore: bump version 2025-06-24 23:06:57 +08:00
XIN_____ 3a7995c733 chore: update i18n text for zh-hans and zh-hant (#4784)
chore: update i18n text for zh-hant
2025-06-24 21:59:03 +08:00
johnnyjoy 976bd332fe chore: fix linter 2025-06-24 21:55:27 +08:00
johnnyjoy d6a75bba4c refactor: webhook service 2025-06-24 21:28:21 +08:00
jinjingroad 03399a6007 refactor: use the built-in max/min to simplify the code (#4781)
Signed-off-by: jinjingroad <jinjingroad@sina.com>
2025-06-24 07:12:02 +08:00
Johnny e6e460493c refactor: general user setting 2025-06-23 23:23:57 +08:00
Johnny 9b15936873 refactor: clean unused fields 2025-06-23 22:55:14 +08:00
Johnny 778a5eb184 refactor: memo filter 2025-06-23 22:38:44 +08:00
Johnny 52a5ca2ef4 chore: update get attachment binary 2025-06-23 21:20:59 +08:00
Steven 697e54758d fix: frontend linter 2025-06-23 21:20:37 +08:00
Steven 83febf9928 chore: clean resource definition 2025-06-23 21:08:25 +08:00
Steven 5821bb7a65 chore: update auth service 2025-06-23 20:31:18 +08:00
Steven 59eae4465a chore: update user session section 2025-06-23 20:12:29 +08:00
Johnny b8a37c7229 chore: fix linter 2025-06-23 09:27:06 +08:00
XIN_____ bbd984a754 chore: update i18n for zh (#4780)
* feat: add i18n text for zh

* feat: add i18n text for zh-hant
2025-06-23 09:14:49 +08:00
Johnny 4e3a4e36f6 feat: implement user sessions 2025-06-23 09:13:51 +08:00
Johnny 6e4d1d9100 fix: auth context 2025-06-22 22:58:00 +08:00
johnnyjoy 45df653f37 fix: navigation overflow style 2025-06-22 18:49:12 +08:00
Johnny a2bfa82a88 fix: linter 2025-06-22 14:13:27 +08:00
Johnny 77b7fc4441 feat: implement user session 2025-06-22 12:46:13 +08:00
Johnny 741fe35c2a refactor: rename session methods in auth service 2025-06-21 00:00:58 +08:00
Johnny cb96d4e76d fix: embedded attachment 2025-06-18 23:10:41 +08:00
Steven df52bf5e63 fix: tag count 2025-06-18 22:49:03 +08:00
Steven 35df62a96c chore: remove duplicated prefix from enums 2025-06-18 22:40:54 +08:00
XIN_____ d27639f147 chore: update i18n zh-Hans and zh-Hant (#4778)
* Update zh-Hans.json

* Update zh-Hant.json

Co-authored-by: @kiss-fire <iamtaoxin@gmail.com>

---------

Co-authored-by: @kiss-fire <iamtaoxin@gmail.com>
2025-06-18 20:46:37 +08:00
Steven d71fd2f84a refactor: auth service 2025-06-18 20:25:46 +08:00
Steven 9972a77d9e refactor: memo service 2025-06-18 19:58:38 +08:00
Steven 91c2a4cef9 refactor: inbox service 2025-06-18 19:06:09 +08:00
Steven a4920d464b refactor: attachment service part2 2025-06-18 00:09:19 +08:00
Steven bb5809cae4 refactor: attachment service 2025-06-17 22:15:19 +08:00
Steven 174b1a0361 chore: fix linter 2025-06-17 21:04:28 +08:00
Steven 760c164328 chore: add server tests 2025-06-17 20:56:10 +08:00
Steven f6e5da4499 refator: activity service 2025-06-17 09:00:03 +08:00
Steven 4a20b529df chore: add CLAUDE.md 2025-06-17 08:51:43 +08:00
Steven 8e8e246ab2 chore: add server tests 2025-06-17 00:29:42 +08:00
Steven dac059a7f7 refactor: identity provider service 2025-06-16 23:56:28 +08:00
Steven 8d8e9b3b30 refactor: shortcut service 2025-06-16 23:10:50 +08:00
Steven 1ea4cc453c refactor: workspace setting service 2025-06-16 22:51:26 +08:00
Steven da906c665c chore: tweak workspace service 2025-06-16 22:20:10 +08:00
Steven 3b0c87591f refactor: webhook service 2025-06-16 22:10:43 +08:00
Steven c9ab03e1a0 refactor: user service 2025-06-16 21:49:38 +08:00
Steven 330282d8b2 chore: tweak styles 2025-06-16 20:48:08 +08:00
Johnny f467264e7d chore: remove memopayload runonce 2025-06-16 20:24:57 +08:00
Johnny 38b6c3afb9 chore: fix linter 2025-06-15 10:27:24 +08:00
Johnny 3fd29f6493 refactor: schema migrator 2025-06-15 10:23:18 +08:00
XIN_____ d386b83b7b chore: update i18n text for zh (#4771)
* feat: add i18n text

* feat: add i18n text for zh
2025-06-12 23:09:04 +08:00
Steven c9c07a599c chore: unify action names 2025-06-11 23:39:29 +08:00
Steven efc0dc9aea chore: update trim in Autocomplete 2025-06-11 23:21:48 +08:00
Johnny acb71dfb69 chore: tweak button styles 2025-06-10 22:51:42 +08:00
KidLoveToPlay df8d1d4f3d fix: trim queryText and split by regex (#4766) 2025-06-09 22:13:39 +08:00
Johnny f2a01d9ccb chore: use popover instead of dropdown/menu 2025-06-08 23:21:23 +08:00
Johnny 522da2a114 fix: border color 2025-06-08 00:39:51 +08:00
Johnny f5c64849d2 chore: upgrade tailwindcss to v4 2025-06-07 10:15:12 +08:00
Ezmana a50253d311 chore: add missing lines and French translations (#4761)
Adding missing lines and translations
2025-06-06 19:18:48 +08:00
Steven add099b89d chore: update rollup options 2025-06-05 23:09:15 +08:00
Steven 786c6f672e chore: remove prevent default for enter keydown 2025-06-05 23:08:55 +08:00
boojack cc36422e43 chore: tweak README.md 2025-06-05 09:43:41 +08:00
Steven fe71b01f2d chore: polish readme 2025-06-04 23:10:31 +08:00
johnnyjoy c84dcddbf6 chore: always show visibility label 2025-06-04 22:05:51 +08:00
johnnyjoy 8d9396247b fix: external newline 2025-06-04 21:28:58 +08:00
Maya Doshi efb8e7ab0c fix: broken resource urls in RSS feed (#4753)
fix: resource url generation in rss feed
2025-06-04 09:06:34 +08:00
johnnyjoy 94d1e20570 chore: update date time format 2025-06-03 21:22:14 +08:00
Steven 6d319900d6 fix: date format 2025-06-03 09:24:38 +08:00
Johnny b942643785 chore: tweak seed data 2025-06-02 20:06:45 +08:00
Lincoln Nogueira 44e710ce4a fix: downgrade modernc.org/libc to v1.65.7 (#4745)
`modernc.org/libc` version on go.mod must match whatever is on `modernc.org/sqlite`'s [go.mod](https://gitlab.com/cznic/sqlite/-/blob/v1.37.1/go.mod#L9) file to prevent sqlite-related issues.

See:
  - <https://pkg.go.dev/modernc.org/sqlite#hdr-Fragile_modernc_org_libc_dependency>
  - <https://gitlab.com/cznic/sqlite/-/issues/177>
2025-06-02 18:19:57 +08:00
Johnny d20362e722 chore: tweak stat card 2025-06-02 10:20:11 +08:00
Johnny 1594c1ce3e chore: bump version 2025-06-02 09:39:57 +08:00
Johnny 3343dc73f7 chore: update navigator 2025-06-02 09:39:50 +08:00
Johnny 663e56747f chore: replace switch kit 2025-06-02 01:01:29 +08:00
Johnny ff0f275431 chore: fix golangci-lint version 2025-06-02 00:34:45 +08:00
dependabot[bot] 136c1d7aa6 chore: bump golangci/golangci-lint-action from 7 to 8 (#4744)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 7 to 8.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v7...v8)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-02 00:32:53 +08:00
dependabot[bot] 7c9215b513 chore: bump i18next from 24.2.3 to 25.2.1 in /web (#4742)
Bumps [i18next](https://github.com/i18next/i18next) from 24.2.3 to 25.2.1.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v24.2.3...v25.2.1)

---
updated-dependencies:
- dependency-name: i18next
  dependency-version: 25.2.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-02 00:32:27 +08:00
Johnny d4425a6aa1 chore: upgrade dependencies 2025-06-02 00:27:35 +08:00
Johnny e6fe088ac0 chore: fix missing observer 2025-06-01 09:22:33 +08:00
Johnny fd99e10962 chore: tweak sidebar 2025-06-01 09:13:44 +08:00
Johnny 2595e32f83 chore: simplify date editor 2025-05-31 11:14:47 +08:00
Johnny 673026ffa1 chore: update statistics view 2025-05-31 09:43:24 +08:00
Johnny 376b25a69c chore: fix visibility selector style (#4733) 2025-05-31 09:15:28 +08:00
Steven f1b365f928 refactor: clean packages 2025-05-29 21:44:43 +08:00
Johnny 2bde296217 chore: add demo deployment to Render action 2025-05-29 08:38:01 +08:00
Johnny ea4e7a1606 refactor: memo editor (#4730) 2025-05-29 07:46:40 +08:00
Maximilian Krauß 77d3853f73 fix: inherits memo visibility for default comment visibility (#4728) 2025-05-28 22:18:41 +08:00
Steven a317f9e653 fix: linter 2025-05-28 21:21:27 +08:00
Steven de3e55c2e6 feat: support now() time functions 2025-05-28 21:18:49 +08:00
Steven f5ecb66fb8 feat: implement height-based masonry view 2025-05-28 08:27:15 +08:00
Steven 8520e30721 fix: handle type assertion safely 2025-05-27 23:44:39 +08:00
Steven ef6f80d925 chore: fix linter 2025-05-27 23:22:32 +08:00
Steven 81ae42518e chore: fix linter 2025-05-27 22:49:56 +08:00
Maximilian Krauß eca91d5c0c feat(rss): use server title and description for RSS feed, if configured (#4717) 2025-05-27 22:10:23 +08:00
Steven ad2c5f0d05 refactor: store cache 2025-05-27 22:06:41 +08:00
Steven c23aebd648 refactor: memo filter store 2025-05-27 21:14:18 +08:00
Steven f12d7ae8bc chore: add asynchronous webhook dispatch 2025-05-27 20:01:04 +08:00
Jonathan Fok kan 7c05a9b997 fix(editor): prevent race condition and ensure correct list continuation on Enter (#4716)
* fix(editor): Prevent race condition and ensure correct list continuation on Enter

_

* fix: always insert newline after preventing default Enter key behavior
2025-05-27 19:57:33 +08:00
Johnny d76f988bb5 fix: edit for comment 2025-05-27 08:38:14 +08:00
Steven 785c250f3c refactor: migrate memo store 2025-05-27 08:26:13 +08:00
Steven dcd68bc5f4 refactor: migrate resource store to v2 2025-05-27 07:55:00 +08:00
Steven 46900f9807 refactor: move store prefixes to common module 2025-05-27 07:49:46 +08:00
Steven 46be6b0ff6 fix: missing service handler 2025-05-26 23:22:10 +08:00
Steven b89d8f5342 feat: implement hasTaskList filter 2025-05-26 22:37:59 +08:00
Steven cbf5687dd9 chore: remove unused action 2025-05-26 21:50:36 +08:00
eya46 4924b23884 fix: state mismatch in Storage and System pages (#4719)
* fix: sync storage setting state

* fix: sync customProfile state
2025-05-26 21:50:10 +08:00
Steven 64b27d5a4e refactor: shortcut service 2025-05-26 21:45:14 +08:00
dabeeduu 6964c1df05 fix: make the save button disabled after a successful update (#4721)
* fix: make the save button disabled after a successful update

* fix: fixing formatting error

---------

Co-authored-by: didi <didi@localhost.localdomain>
2025-05-26 14:50:13 +08:00
Brian c6e6b7b93b feat: add infinite scrolling for memos (#4715)
* feat(WIP): add prop-driven infinite scroll

* feat(WIP): add global toggle for infinite scrolling under settings

* feat: integrate newly added scroll-mode selection state with backend for persists across refreshes

* fix: default to infinite scrolling over load more button & remove redundant setting option

* fix: rectify linting issues

* Update web/src/components/PagedMemoList/PagedMemoList.tsx

---------

Co-authored-by: Johnny <yourselfhosted@gmail.com>
2025-05-25 23:12:47 +08:00
Steven 46d5307d7f fix: prevent XSS for specific content types 2025-05-22 00:05:33 +08:00
Dimitris Zervas c2528c57f0 feat: automatically add a new table row in the editor when pressing enter (#4706)
Automatically add a new table row in the editor when pressing enter
2025-05-21 20:11:53 +08:00
Steven 72babbb393 fix: dark mode of highlight.js 2025-05-20 23:58:22 +08:00
johnnyjoy f9c0621c15 refactor: root layout 2025-05-19 22:15:11 +08:00
johnnyjoy ee99afd7a4 chore: enable location by default 2025-05-19 21:25:51 +08:00
Johnny d4ebf293f3 chore: fix format 2025-05-19 10:03:05 +08:00
Jake Howard 0440888571 chore: hide "or" when password auth disabled (#4699)
This makes the UI cleaner, instead only showing the "Sign in with ..." buttons.
2025-05-19 09:59:52 +08:00
Steven 606924b4c9 chore: unify form styles 2025-05-15 22:15:01 +08:00
johnnyjoy f9e07a2245 feat: support update user's role 2025-05-15 19:36:15 +08:00
Simon ead2d70082 fix: remove duplicated “Enable” in settings label (#4692)
remove duplicated “Enable” in settings label
2025-05-15 15:08:50 +08:00
Steven 1f79ee575b fix: create user with avatar url for sqlite 2025-05-14 23:45:02 +08:00
johnnyjoy 21935abe3f chore: update canary build action 2025-05-14 22:24:54 +08:00
johnnyjoy ca79990679 refactor: merge sign in requests 2025-05-14 22:13:52 +08:00
johnnyjoy a0f68895ab chore: add more logs for oauth2 2025-05-14 20:38:14 +08:00
johnnyjoy 733f16816b chore: bump mui 2025-05-13 23:28:15 +08:00
johnnyjoy 43d176f272 fix: idp config convert 2025-05-13 20:40:54 +08:00
johnnyjoy 966a108d52 chore: check signin with sso 2025-05-13 20:36:00 +08:00
Steven fa1ad7dc72 chore: update list padding 2025-05-12 22:39:25 +08:00
啥也不会的帆 f6054b6138 fix: preview image window proportion error (#4689) 2025-05-12 21:32:01 +08:00
Johnny 87798801fc fix: list styles 2025-05-12 09:09:09 +08:00
johnnyjoy 446447a20c chore: update stable build action 2025-05-11 18:04:15 +08:00
Pavel Stržínek 070b392942 chore: Czech locale update (#4685)
* cs locale updated

* cs locale update
2025-05-11 17:45:32 +08:00
Johnny 9c7899781f chore: update alt text of deepwiki badge 2025-05-09 14:58:58 +08:00
johnnyjoy cd5abd9e60 chore: update nsfw description 2025-05-08 21:18:46 +08:00
johnnyjoy ccfa9983e9 fix: user avatar url 2025-05-08 20:28:00 +08:00
mousemin 30f37f6a05 feat: enhance site.webmanifest in chrome (#4676)
Update site.webmanifest
2025-05-07 22:47:55 +08:00
Sergey Gorbunov e23ade1f8b feat: support listening on a UNIX socket (#4654) 2025-05-07 22:12:05 +08:00
johnnyjoy 2a92baf52c fix: filter args of postgres 2025-05-06 21:19:13 +08:00
Johnny 1328e0b861 chore: remove issue-translator 2025-05-03 16:16:01 +08:00
dependabot[bot] c3273f8f97 chore: bump @vitejs/plugin-legacy from 6.0.2 to 6.1.1 in /web (#4661)
Bumps [@vitejs/plugin-legacy](https://github.com/vitejs/vite/tree/HEAD/packages/plugin-legacy) from 6.0.2 to 6.1.1.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/plugin-legacy/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.1.1/packages/plugin-legacy)

---
updated-dependencies:
- dependency-name: "@vitejs/plugin-legacy"
  dependency-version: 6.1.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-03 16:15:21 +08:00
dependabot[bot] 24650140b2 chore: bump @types/node from 22.13.10 to 22.15.3 in /web (#4660)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.13.10 to 22.15.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 22.15.3
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-03 16:10:17 +08:00
dependabot[bot] f6b5b26cda chore: bump eslint from 9.23.0 to 9.25.1 in /web (#4663)
Bumps [eslint](https://github.com/eslint/eslint) from 9.23.0 to 9.25.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.23.0...v9.25.1)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 9.25.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-03 16:10:08 +08:00
dependabot[bot] 0ab7082c7c chore: bump mobx from 6.13.6 to 6.13.7 in /web (#4662)
Bumps [mobx](https://github.com/mobxjs/mobx) from 6.13.6 to 6.13.7.
- [Release notes](https://github.com/mobxjs/mobx/releases)
- [Commits](https://github.com/mobxjs/mobx/compare/mobx@6.13.6...mobx@6.13.7)

---
updated-dependencies:
- dependency-name: mobx
  dependency-version: 6.13.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-03 14:27:06 +08:00
dependabot[bot] 8550176cfa chore: bump golang.org/x/crypto from 0.35.0 to 0.37.0 (#4665)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.35.0 to 0.37.0.
- [Commits](https://github.com/golang/crypto/compare/v0.35.0...v0.37.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.37.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-03 14:26:28 +08:00
dependabot[bot] fdcef4d3a7 chore: bump golang.org/x/net from 0.35.0 to 0.39.0 (#4666)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.35.0 to 0.39.0.
- [Commits](https://github.com/golang/net/compare/v0.35.0...v0.39.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.39.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-03 14:26:19 +08:00
dependabot[bot] a266c4c6a5 chore: bump github.com/golang-jwt/jwt/v5 from 5.2.1 to 5.2.2 (#4667)
Bumps [github.com/golang-jwt/jwt/v5](https://github.com/golang-jwt/jwt) from 5.2.1 to 5.2.2.
- [Release notes](https://github.com/golang-jwt/jwt/releases)
- [Changelog](https://github.com/golang-jwt/jwt/blob/main/VERSION_HISTORY.md)
- [Commits](https://github.com/golang-jwt/jwt/compare/v5.2.1...v5.2.2)

---
updated-dependencies:
- dependency-name: github.com/golang-jwt/jwt/v5
  dependency-version: 5.2.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-03 14:17:07 +08:00
dependabot[bot] 0c692c48af chore: bump modernc.org/sqlite from 1.36.0 to 1.37.0 (#4668)
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.36.0 to 1.37.0.
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.36.0...v1.37.0)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-version: 1.37.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-03 14:16:59 +08:00
dependabot[bot] b5f68576ff chore: bump golang.org/x/mod from 0.23.0 to 0.24.0 (#4669)
Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.23.0 to 0.24.0.
- [Commits](https://github.com/golang/mod/compare/v0.23.0...v0.24.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-version: 0.24.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-03 14:16:51 +08:00
boojack 75f5c4c0b2 chore: add deepwiki badge 2025-04-28 13:51:41 +08:00
João Tiago a46301fa77 feat: support child tags in NSFW blur feature (#4640)
* fix: add support for child nsfw tags

* fix: correctly detect child tags of custom NSFW tags

* Update web/src/components/MemoView.tsx

---------

Co-authored-by: Johnny <yourselfhosted@gmail.com>
2025-04-26 16:23:15 +08:00
johnnyjoy 411a91122b fix: linter error 2025-04-24 10:11:35 +08:00
johnnyjoy eb33a604b2 feat: support mapping avatar url from oauth2 2025-04-24 10:07:24 +08:00
Steven e41916408a chore: update dockerfile 2025-04-21 22:26:18 +08:00
Johnny 0f965c6fe0 chore: add action cache 2025-04-21 21:39:09 +08:00
Johnny 33907539cd chore: merge release action 2025-04-21 21:26:46 +08:00
johnnyjoy dc5f37ebba chore: remove unused demo dockfile 2025-04-21 21:16:38 +08:00
Johnny 7e1368028b chore: add dockerfile.demo 2025-04-21 09:02:38 +08:00
Johnny fdc0553cfb chore: move frontend build to action 2025-04-19 23:10:32 +08:00
Simon bb892be5b3 feat: improve visual feedback in MemoEditor for drag/drop file uploads (#4634)
* improve drag/drop file upload UI

* fix eslint errors

* use tailwind for cursor styles

* fix eslint issues
2025-04-18 23:49:59 +08:00
Johnny d38f4699c2 chore: try build arm/v7 2025-04-17 23:28:33 +08:00
Steven 1a121e350b chore: update gitignore 2025-04-17 23:11:36 +08:00
RichardYe 76ed1b5cc5 feat: set locale based on browser language when user is not logged in (#4635)
* feat: set locale based on browser language when user is not logged in

* docs: comments for locale fallback logic
2025-04-17 20:02:41 +08:00
Steven f6e4e504fe chore: remove armv7 2025-04-16 23:05:27 +08:00
Steven aa272670ce chore: upgrade buf 2025-04-16 23:00:11 +08:00
Steven 7475a30fe9 chore: update docker platforms 2025-04-16 22:50:31 +08:00
Steven e2f5c61e30 fix: docker username in actions 2025-04-16 22:39:58 +08:00
Steven 02f8e0da41 chore: update actions 2025-04-16 22:39:15 +08:00
RichardYe ebccef6033 fix: shutdown gRPC server gracefully (#4626)
fix: add graceful shutdown for gRPC server
2025-04-15 22:58:25 +00:00
Steven 789a9cc5a2 fix: padding left of list 2025-04-14 23:00:36 +08:00
Steven a6be658f42 fix: list memo comments 2025-04-14 22:51:11 +08:00
Johnny b94682dc4f chore: fix linter 2025-04-12 22:16:32 +08:00
Johnny 18b9b9d18f chore: implement memo filter in list memo relations 2025-04-12 22:13:18 +08:00
Johnny 08f9b18ced fix: list memo relations 2025-04-12 22:02:13 +08:00
Johnny 2f6dc2b51f fix: padding of list 2025-04-10 23:06:14 +08:00
Johnny 7632c52c0c chore: bump version 2025-04-10 22:52:03 +08:00
Johnny 97b23f46e6 chore: remove resource title 2025-04-09 22:58:53 +08:00
倒霉狐狸 ebf13c4dff chore: caching resource files accelerates second requests (#4614)
* cache assets files

* Apply suggestions from code review

* Update server/router/frontend/frontend.go

* Update server/router/frontend/frontend.go

---------

Co-authored-by: Johnny <yourselfhosted@gmail.com>
2025-04-09 22:22:03 +08:00
Johnny 3cc0e255ce fix: memo filter for postgres 2025-04-08 23:46:08 +08:00
Johnny f5d5ebea6f chore: hide actions for comment 2025-04-06 22:58:43 +08:00
Johnny aa8cf44c41 chore: fix entrypoint.sh 2025-04-06 22:44:19 +08:00
Johnny 9dde9f332f chore: move dockerfile 2025-04-06 22:40:26 +08:00
dependabot[bot] 052d5d41fe chore: bump github.com/grpc-ecosystem/grpc-gateway/v2 from 2.26.1 to 2.26.3 (#4586)
chore: bump github.com/grpc-ecosystem/grpc-gateway/v2

Bumps [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway) from 2.26.1 to 2.26.3.
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.26.1...v2.26.3)

---
updated-dependencies:
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-02 23:08:48 +08:00
dependabot[bot] bec0acc66a chore: bump golang.org/x/oauth2 from 0.27.0 to 0.28.0 (#4587)
Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.27.0 to 0.28.0.
- [Commits](https://github.com/golang/oauth2/compare/v0.27.0...v0.28.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-02 22:56:28 +08:00
Steven 3d610a78f2 chore: update golangci config 2025-04-02 22:53:17 +08:00
Steven ec17c4b015 chore: update linter ci 2025-04-02 22:51:22 +08:00
Steven 2cf2126d64 fix: golangci config 2025-04-02 22:47:34 +08:00
Steven 2aca8180d1 chore: update golangci config 2025-04-02 22:16:05 +08:00
Steven 0430de8713 chore: fix golangci version 2025-04-02 22:10:19 +08:00
dependabot[bot] 76737b5542 chore: bump golangci/golangci-lint-action from 6 to 7 (#4584)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6 to 7.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v6...v7)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-02 18:17:02 +08:00
dependabot[bot] 39f85e9d68 chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager from 1.17.64 to 1.17.70 (#4585)
chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager

Bumps [github.com/aws/aws-sdk-go-v2/feature/s3/manager](https://github.com/aws/aws-sdk-go-v2) from 1.17.64 to 1.17.70.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/credentials/v1.17.64...feature/s3/manager/v1.17.70)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/feature/s3/manager
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-02 18:16:49 +08:00
dependabot[bot] ebc2cc2970 chore: bump google.golang.org/grpc from 1.70.0 to 1.71.1 (#4588)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.70.0 to 1.71.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.70.0...v1.71.1)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-02 18:16:27 +08:00
dependabot[bot] d1fb602988 chore: bump google.golang.org/protobuf from 1.36.5 to 1.36.6 (#4589)
Bumps google.golang.org/protobuf from 1.36.5 to 1.36.6.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-02 18:16:11 +08:00
dependabot[bot] c43762a9b6 chore: bump lucide-react from 0.453.0 to 0.486.0 in /web (#4590)
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.453.0 to 0.486.0.
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.486.0/packages/lucide-react)

---
updated-dependencies:
- dependency-name: lucide-react
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-02 18:15:58 +08:00
dependabot[bot] 28074c1404 chore: bump nice-grpc-web from 3.3.6 to 3.3.7 in /web (#4591)
Bumps [nice-grpc-web](https://github.com/deeplay-io/nice-grpc) from 3.3.6 to 3.3.7.
- [Release notes](https://github.com/deeplay-io/nice-grpc/releases)
- [Commits](https://github.com/deeplay-io/nice-grpc/compare/nice-grpc-web@3.3.6...nice-grpc-web@3.3.7)

---
updated-dependencies:
- dependency-name: nice-grpc-web
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-02 18:15:46 +08:00
dependabot[bot] 2458bc98f2 chore: bump i18next from 24.2.2 to 24.2.3 in /web (#4592)
Bumps [i18next](https://github.com/i18next/i18next) from 24.2.2 to 24.2.3.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v24.2.2...v24.2.3)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-02 18:15:03 +08:00
dependabot[bot] d98520acba chore: bump @trivago/prettier-plugin-sort-imports from 4.3.0 to 5.2.2 in /web (#4593)
chore: bump @trivago/prettier-plugin-sort-imports in /web

Bumps [@trivago/prettier-plugin-sort-imports](https://github.com/trivago/prettier-plugin-sort-imports) from 4.3.0 to 5.2.2.
- [Release notes](https://github.com/trivago/prettier-plugin-sort-imports/releases)
- [Changelog](https://github.com/trivago/prettier-plugin-sort-imports/blob/main/CHANGELOG.md)
- [Commits](https://github.com/trivago/prettier-plugin-sort-imports/compare/v4.3.0...v5.2.2)

---
updated-dependencies:
- dependency-name: "@trivago/prettier-plugin-sort-imports"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-02 18:14:46 +08:00
dependabot[bot] 3dac75f48c chore: bump react-datepicker from 7.6.0 to 8.2.1 in /web (#4594)
Bumps [react-datepicker](https://github.com/Hacker0x01/react-datepicker) from 7.6.0 to 8.2.1.
- [Release notes](https://github.com/Hacker0x01/react-datepicker/releases)
- [Commits](https://github.com/Hacker0x01/react-datepicker/compare/v7.6.0...v8.2.1)

---
updated-dependencies:
- dependency-name: react-datepicker
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-02 09:44:20 +08:00
Steven 4f39e00868 chore: fix lint 2025-04-01 20:06:54 +08:00
Johnny b770042a8a refactor: migrate eslint 2025-04-01 00:04:43 +08:00
cmuangs d649d326ef fix: remove errors.Wrap(nil) (#4576)
* Fix errors.Wrap(nil)

* fix resource_test failure where resource does not exist
2025-03-31 12:56:51 +08:00
Shawn 88b38ff2c0 fix: aws-chunked encoding is not supported with the specified x-amz-content-sha256 value for some s3 providers (#4575)
Co-authored-by: Shawn L. <shawn@sola.sh>
2025-03-31 08:49:48 +08:00
Johnny 09c50a8419 fix: codeblock highlight 2025-03-30 23:49:51 +08:00
johnnyjoy 8e6d9b4943 chore: buf generate 2025-03-30 13:16:42 +08:00
Anubhav Singh a63d9b471b feat: update ItalicNode to use repeated children instead of content (#4566)
* feat: update ItalicNode to use repeated children instead of content

* chore: update gomark dependency to latest version

---------

Co-authored-by: Anubhav Singh <anubhav@mail.techindika.com>
2025-03-28 16:15:03 +08:00
olavlan 8bdd1ec009 feat: add norwegian bokmål (nb) translation (#4561)
* add locale file for norwegian (nb)

* correct spelling
2025-03-27 13:14:12 +08:00
Anubhav Singh 194a49367c fix: incorrect checkbox state after removing checked items #4549 (#4552)
Co-authored-by: Anubhav Singh <anubhav@mail.techindika.com>
2025-03-25 21:59:30 +08:00
johnny 44df17aecc chore: bump version 2025-03-23 11:32:09 +08:00
Austin Pearce c4f094d22b fix: BrandBanner to use NavLink (#4536)
* Fix BrandBanner to use NavLink

* Apply suggestions from code review

---------

Co-authored-by: Johnny <yourselfhosted@gmail.com>
2025-03-18 21:18:22 +08:00
XIN_____ 3d0f7285f9 feat: add i18n for Pinned (#4535)
Co-authored-by: Johnny <yourselfhosted@gmail.com>
2025-03-18 21:17:09 +08:00
Johnny d63ef81c9d chore: update common locale 2025-03-18 09:04:47 +08:00
Amir Ehsandar 7b23bdcfcf fix: allow admins to uncheck disallow password if applicable (#4532)
- closes #4469
2025-03-18 09:00:50 +08:00
Steven 9b957edd1f chore: fix linter 2025-03-17 21:52:35 +08:00
Steven 8164986fcc chore: move store test 2025-03-17 21:51:02 +08:00
Steven fdf9d9f506 chore: move resource name test 2025-03-17 21:41:21 +08:00
XIN_____ b79755dd09 feat: update zh-hans i18n (#4531)
* feat: update zh-hans i18n

* Update zh-Hans.json

Co-authored-by: taosin <xinxintao@foxmail.com>

---------

Co-authored-by: KissFire <53330905+kiss-fire@users.noreply.github.com>
2025-03-17 18:22:13 +08:00
Amir Ehsandar 2e9b9368db fix: prevent double effect on image modal wheel event (#4522)
- escape key closes the modal
- zooming is a bit smoother
2025-03-16 10:28:59 +08:00
Amir Ehsandar c0643ff6fa fix: use valid query parameters for postgres (#4515) 2025-03-15 12:59:00 +08:00
Steven 6b042fe16e chore: always show full content when pinned 2025-03-14 20:13:54 +08:00
Steven ea3a534ce5 chore: fix typo 2025-03-14 20:01:10 +08:00
Steven f1f0253e8d fix: typo 2025-03-14 19:55:25 +08:00
George Wu fae7b5d3e8 fix: typo s/contnet/content (#4507) 2025-03-14 14:54:55 +08:00
XIN_____ be18a7b77b chore: update i18n for resource page (#4505)
* chore: update i18n for resources

* Update Resources.tsx

Co-authored-by: kiss-fire <iamtaoxin@gmail.com>

---------

Co-authored-by: kiss-fire <iamtaoxin@gmail.com>
2025-03-14 13:04:07 +08:00
Amir Ehsandar 32c69bbb52 fix: user stats changes based on selected tab (#4504)
- set partial only the relevant user stats instead of only adding up stats
2025-03-14 13:02:47 +08:00
Amir Ehsandar e75ef0964d feat: implement grpc health service checking database connection (#4499) 2025-03-14 08:43:01 +08:00
Johnny fc7dc58720 chore: move archived route 2025-03-13 20:38:14 +08:00
Lincoln Nogueira e8e393a9cb chore(i18n): tidy (#4497)
- sort all keys alphabetically for easier side-by-side translation

- remove keys from other locales that don't exist anymore in `en.json`

- remove keys from other locales that have missing {{interpolations}}

- add missing entries to pt-BR
2025-03-13 20:37:50 +08:00
XIN_____ 1762496e79 chore: update zh-hans text for rename-tag (#4496)
* Update RenameTagDialog.tsx

Co-authored-by: kiss-fire <iamtaoxin@gmail.com>

* Update zh-Hans.json

Co-authored-by: kiss-fire <iamtaoxin@gmail.com>

---------

Co-authored-by: kiss-fire <iamtaoxin@gmail.com>
2025-03-13 20:00:22 +08:00
Johnny 34ab88348e chore: sort by pinned 2025-03-13 19:57:12 +08:00
Johnny d794e6db76 chore: remove internal frontend cache 2025-03-13 11:23:27 +08:00
XIN_____ 81e40d9b18 chore: update i18n for tag reame (#4493)
* feat: update i18n for zh-hans

* Update zh-Hans.json

---------

Co-authored-by: KissFire <53330905+kiss-fire@users.noreply.github.com>
2025-03-13 09:20:46 +08:00
Johnny fc5962f6a4 feat: show pinned count 2025-03-12 23:33:51 +08:00
Johnny fb3c17d0e9 chore: update mobile header 2025-03-12 22:21:22 +08:00
Johnny 0dfcb1a7c8 feat: total memo count 2025-03-12 22:15:46 +08:00
Johnny 3349311b51 chore: update frontend dependencies 2025-03-12 21:05:32 +08:00
Heiko 775673d17f fix: update README.md (#4492)
Fixed link for contribution
2025-03-12 20:35:10 +08:00
XIN_____ 1edb9e6774 feat: update i18n for zh-hans (#4488)
* chore:memo filter support i18n for zh-hans

* feat: restore addFilter method value field in StatisticsView.tsx

* chore: change getFilterDisplayText for i18n

* chore: add string type in utils/i18n

* feat: using switch to avoid change TranslationType

* feat: eslint check

* feat: eslint fix
2025-03-12 16:54:04 +08:00
Simon 690f28bed8 feat: add loading spinner during file upload process (#4491)
* show LoaderIcon while uploading file

* fix spacing for eslint
2025-03-12 09:56:22 +08:00
Johnny 7a438be08d chore: update user stats 2025-03-12 09:14:43 +08:00
Johnny e3a4f49c5c feat: implement creator_id factor 2025-03-11 22:00:57 +08:00
Johnny ba52a786f9 chore: update canary image 2025-03-11 10:23:38 +08:00
wrrrzr b0392954f4 Add executable permission to scripts/build.sh (#4486) 2025-03-11 09:00:42 +08:00
Johnny 7123a2cf51 chore: remove sort by pinned 2025-03-10 21:32:17 +08:00
Johnny ff13e0f353 chore: add legacy plugin 2025-03-10 18:57:48 +08:00
Johnny 925e97882e feat: support pinned factor 2025-03-10 18:52:12 +08:00
Johnny 90119c1af8 refactor: move memo property 2025-03-07 22:53:35 +08:00
Johnny 3401def442 chore: simplify memo filters 2025-03-06 23:10:20 +08:00
Johnny 16a0872972 chore: enable auto compact by default 2025-03-06 23:02:12 +08:00
Johnny 56ad8ab3bd refactor: view store 2025-03-06 21:38:54 +08:00
Johnny 2e0467e3d1 fix: mobile header 2025-03-06 20:46:16 +08:00
Lincoln Nogueira d7d3568ba4 chore(i18n): update pt-BR (#4471) 2025-03-06 09:21:44 +08:00
Johnny c668073cf3 chore: update resource view 2025-03-05 23:08:44 +08:00
Johnny 92a44e26b9 chore: remove emoji regex 2025-03-04 22:56:46 +08:00
XIN_____ 6ed6b86a75 chore: update i18n zh-hans (#4467)
* Update MemoDisplaySettingMenu.tsx

Masonry View

* Update en.json

* Update zh-Hans.json
2025-03-04 22:43:48 +08:00
Johnny 36d458fe88 chore: update masonry scale 2025-03-03 22:41:18 +08:00
Johnny 7592e5fe76 fix: masonry state 2025-03-03 09:23:40 +08:00
Johnny d6be20b917 feat: implement masonry view 2025-03-02 23:27:12 +08:00
Johnny a8713ec639 chore: update backend dependencies 2025-03-02 21:58:46 +08:00
Johnny 32da704be6 chore: update frontend dependencies 2025-03-02 21:55:55 +08:00
dependabot[bot] 858053e3b1 chore: bump @dnd-kit/sortable from 8.0.0 to 10.0.0 in /web (#4454)
Bumps [@dnd-kit/sortable](https://github.com/clauderic/dnd-kit/tree/HEAD/packages/sortable) from 8.0.0 to 10.0.0.
- [Release notes](https://github.com/clauderic/dnd-kit/releases)
- [Changelog](https://github.com/clauderic/dnd-kit/blob/master/packages/sortable/CHANGELOG.md)
- [Commits](https://github.com/clauderic/dnd-kit/commits/@dnd-kit/sortable@10.0.0/packages/sortable)

---
updated-dependencies:
- dependency-name: "@dnd-kit/sortable"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-02 17:47:19 +08:00
dependabot[bot] b36e2b630a chore: bump @bufbuild/buf from 1.48.0 to 1.50.0 in /web (#4452)
Bumps [@bufbuild/buf](https://github.com/bufbuild/buf) from 1.48.0 to 1.50.0.
- [Release notes](https://github.com/bufbuild/buf/releases)
- [Changelog](https://github.com/bufbuild/buf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bufbuild/buf/compare/v1.48.0...v1.50.0)

---
updated-dependencies:
- dependency-name: "@bufbuild/buf"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-02 17:47:09 +08:00
dependabot[bot] c24ad79b36 chore: bump vite from 6.0.6 to 6.2.0 in /web (#4451)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.0.6 to 6.2.0.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/create-vite@6.2.0/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-02 17:46:59 +08:00
dependabot[bot] 9a0a1f0baf chore: bump i18next from 24.2.0 to 24.2.2 in /web (#4453)
Bumps [i18next](https://github.com/i18next/i18next) from 24.2.0 to 24.2.2.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v24.2.0...v24.2.2)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-02 17:46:50 +08:00
dependabot[bot] 8ab77442f5 chore: bump fuse.js from 7.0.0 to 7.1.0 in /web (#4455)
Bumps [fuse.js](https://github.com/krisk/Fuse) from 7.0.0 to 7.1.0.
- [Release notes](https://github.com/krisk/Fuse/releases)
- [Changelog](https://github.com/krisk/Fuse/blob/main/CHANGELOG.md)
- [Commits](https://github.com/krisk/Fuse/compare/v7.0.0...v7.1.0)

---
updated-dependencies:
- dependency-name: fuse.js
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-02 17:46:25 +08:00
dependabot[bot] ea9db2ff56 chore: bump github.com/aws/aws-sdk-go-v2/credentials from 1.17.48 to 1.17.61 (#4460)
chore: bump github.com/aws/aws-sdk-go-v2/credentials

Bumps [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2) from 1.17.48 to 1.17.61.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/credentials/v1.17.48...credentials/v1.17.61)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/credentials
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-02 17:46:12 +08:00
Johnny 8acded1f23 chore: fix linter 2025-03-02 15:40:16 +08:00
Johnny 372fc3655a refactor: retire less 2025-03-02 15:34:21 +08:00
dependabot[bot] 4ed6862423 chore: bump pnpm/action-setup from 4.0.0 to 4.1.0 (#4456)
Bumps [pnpm/action-setup](https://github.com/pnpm/action-setup) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/pnpm/action-setup/releases)
- [Commits](https://github.com/pnpm/action-setup/compare/v4.0.0...v4.1.0)

---
updated-dependencies:
- dependency-name: pnpm/action-setup
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-02 12:21:42 +08:00
dependabot[bot] 69ea9eac94 chore: bump google.golang.org/protobuf from 1.35.2 to 1.36.5 (#4458)
Bumps google.golang.org/protobuf from 1.35.2 to 1.36.5.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-02 12:21:30 +08:00
dependabot[bot] 459e8e9589 chore: bump modernc.org/sqlite from 1.34.2 to 1.36.0 (#4457)
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.34.2 to 1.36.0.
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.34.2...v1.36.0)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-02 12:21:17 +08:00
dependabot[bot] d107373ae9 chore: bump github.com/google/cel-go from 0.23.2 to 0.24.1 (#4459)
Bumps [github.com/google/cel-go](https://github.com/google/cel-go) from 0.23.2 to 0.24.1.
- [Release notes](https://github.com/google/cel-go/releases)
- [Commits](https://github.com/google/cel-go/compare/v0.23.2...v0.24.1)

---
updated-dependencies:
- dependency-name: github.com/google/cel-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-02 12:21:06 +08:00
dependabot[bot] 4e5b9d39b3 chore: bump github.com/spf13/cobra from 1.8.1 to 1.9.1 (#4461)
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.8.1 to 1.9.1.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v1.8.1...v1.9.1)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-02 12:20:50 +08:00
xt 7651c454fd chore: chinese localization enhancements (#4450)
* Chinese localization enhancements

* Fix for eslint

* Chinese localization fixed
2025-02-28 17:45:50 +08:00
Johnny 5562282822 chore: update demo site 2025-02-27 23:05:43 +08:00
Johnny 47b41bce85 refactor: move memo relation definition 2025-02-27 15:28:36 +08:00
Johnny ba98fddbaf chore: go mod tidy 2025-02-27 15:12:25 +08:00
Johnny 5bb4a300db chore: bump gomark 2025-02-27 15:10:39 +08:00
Johnny 012405f7fd refactor: user stats state 2025-02-26 22:58:22 +08:00
Johnny 81502d9092 fix: stats requests 2025-02-26 22:32:26 +08:00
Johnny b897b243e5 feat: dynamic fetch user stats 2025-02-26 22:29:59 +08:00
Johnny 5d1075a647 refactor: update home layout 2025-02-26 22:14:07 +08:00
Johnny 0da3859878 chore: bump version to 0.24.1 2025-02-26 21:41:57 +08:00
Johnny b56aa397b2 chore: update assets routes 2025-02-26 21:40:28 +08:00
Johnny f60906ce33 chore: tweak vite config 2025-02-26 21:21:46 +08:00
nbb 5962c6d04b feat: optimize initial load performance by implementing lazy loading and code splitting (#4445) 2025-02-26 13:16:05 +08:00
Johnny bef67638c1 chore: fix home route 2025-02-25 23:34:55 +08:00
Johnny 8e4e745ba9 chore: update navigation 2025-02-25 23:13:48 +08:00
XIN_____ 3a7b24bd01 chore: add cursor-pointer to memo's display time (#4441)
feat: memo title add cursor-pointer when mouse hover
2025-02-25 10:13:04 +08:00
Johnny 271a8c8c28 refactor: home layout 2025-02-24 23:42:35 +08:00
Johnny 9107a941ca chore: update linter config 2025-02-24 22:21:07 +08:00
Johnny f98c519834 fix: linter 2025-02-24 22:04:25 +08:00
Johnny 66a4b04454 chore: update readme 2025-02-24 22:01:36 +08:00
Johnny 0200ce7681 chore: upgrade golangci-lint 2025-02-24 21:50:39 +08:00
Johnny bbca130d62 chore: bump golang version 2025-02-24 21:47:57 +08:00
XIN_____ a0fabaf012 chore: update cn-zh i18n (#4435) 2025-02-24 10:43:24 +08:00
Michael Baumgarten 9f01b451df feat: match sublist indentation when adding a new item (#4433)
* match sublist indentation

* recursively get last node

* fix linting issues
2025-02-22 20:48:39 +08:00
MHZ 964ae16851 feat: support YouTube video thumbnail in link preview (#4427) 2025-02-22 20:46:58 +08:00
MHZ f17774cb3b feat: prevent attackers from exploiting redirect attack GetLinkMetadata API (#4428)
fix: Prevent attackers from exploiting redirect attack GetLinkMetadata API.
2025-02-21 17:29:17 +08:00
Johnny bc97b66f36 fix: serial updates 2025-02-20 21:38:36 +08:00
johnnyjoy f15fd42ed5 fix: inboxes state 2025-02-20 20:51:08 +08:00
johnnyjoy 7a685d6435 fix: fetch user by username 2025-02-20 20:43:28 +08:00
XIN_____ 1ebe2e9aae chore: update chinese i18n for settings section (#4424) 2025-02-20 20:21:59 +08:00
Johnny ea165db751 chore: update README.md 2025-02-20 17:43:47 +08:00
Johnny c088c5b26a feat: render emoji from shortcut title 2025-02-19 22:13:32 +08:00
Johnny 37eceabc94 chore: fix memo view gap 2025-02-19 22:02:41 +08:00
Johnny cdbaf805b7 chore: pnpm install 2025-02-19 22:00:12 +08:00
Johnny e528203cde chore: remove unused deps 2025-02-19 21:59:45 +08:00
MHZ f8c973c938 fix: prevent previewing internal network web pages. (#4421) 2025-02-19 21:55:24 +08:00
Johnny 2aaaef79f7 chore: fix tests 2025-02-18 22:32:30 +08:00
Johnny 2dc7766fd0 fix: content contains for postgres 2025-02-18 22:28:25 +08:00
taosin 00932d18f5 feat: update i18n zh-hans (#4416) 2025-02-18 10:47:01 +08:00
taosin 6fdfe6b118 chore: update chinese i18n (#4414) 2025-02-17 17:52:18 +08:00
ProjectOrangeJuice 9f25bb2034 feat: trim space on webhook url (#4411) 2025-02-17 10:16:01 +08:00
MHZ 174b8b048a feat: support blur processing for NSFW content with customizable NSFW tags (#4407) 2025-02-16 23:35:31 +08:00
Johnny 47a9b434e6 fix: translate in members section 2025-02-16 22:34:35 +08:00
Johnny 5686fdfb0a chore: handle redirect 2025-02-16 22:17:48 +08:00
Johnny f5394a3e32 chore: update golangci config 2025-02-16 21:42:33 +08:00
Johnny 9299c216e2 chore: move migration to 0.24.0 2025-02-16 21:02:18 +08:00
taosin a7fef80384 chore: update chinese i18n at member setting section (#4405) 2025-02-16 21:00:37 +08:00
Chris Dzombak d25f355392 chore: allow storing resource references >256 chars long in mysql (#4408)
fix: allow storing resource references >256 chars long in mysql
2025-02-16 18:20:51 +08:00
boojack 04d7ba48e5 chore: remove default gzip middleware 2025-02-13 22:00:55 +08:00
Johnny 920b0f64f2 chore: extract auth footer 2025-02-12 22:05:58 +08:00
taosin 3c71ee9d7b chore: update i18n chinese (#4400) 2025-02-12 16:43:44 +08:00
xt 4cd2aa6f32 chore: chinese localization enhancements (#4397)
* Chinese localization enhancements

* Fix for eslint
2025-02-12 10:13:09 +08:00
Johnny 7a57b5c6e7 refactor: user store 2025-02-11 21:29:16 +08:00
Johnny 11b9c240e9 refactor: workspace setting store 2025-02-11 21:23:46 +08:00
Kevin Clark e27f6f0c52 chore: update LICENSE (#4394)
This PR updates the Copyright information for memos.
Related to usememos/memos#4393
2025-02-11 15:45:20 +08:00
Johnny 9027430646 fix: store reactive 2025-02-10 22:20:07 +08:00
CyberSlinger 01a9bb2d49 feat: add zh hans text (#4384)
* feat: test dev push

* feat: add zh Hans text

* feat: restore readme

* feat: update zh hans text

* feat: add tag for properties label

* feat: updarte zh hans translation

* feat: add tab
2025-02-10 10:19:19 +08:00
Simon c9edac9d5a chore: update i18n Ukrainian (#4385)
* Update uk.json

* Update uk.json

* Update uk.json

* Update uk.json

* Update uk.json

* Update uk.json

* Update uk.json
2025-02-10 10:18:55 +08:00
Martin Hartl ae85dff5e4 chore: add id to RSS feed items (#4383) 2025-02-09 22:24:23 +08:00
Johnny 6abd51fe5a chore: update resource storage type comment 2025-02-09 12:56:30 +08:00
Johnny 49332851d4 chore: go mod tidy 2025-02-09 11:50:16 +08:00
Johnny 0a429a899f chore: remove version update activity 2025-02-09 11:48:53 +08:00
Johnny 983323ceef chore: remove debug code 2025-02-09 11:44:15 +08:00
Johnny 5a2f18da69 refactor(frontend): retire redux 2025-02-09 11:43:55 +08:00
johnnyjoy 13f6fa7b37 refactor: remove default visibility in workspace setting 2025-02-08 11:40:31 +08:00
Steven 9957f8e290 chore: move dsn output to dev mode 2025-02-07 20:59:14 +08:00
Steven 4dfe078f3e chore: tweak memo link is rss 2025-02-07 20:55:38 +08:00
Steven f6ad49754a chore: update url of memo detail page 2025-02-07 20:51:04 +08:00
shungiku 8be0ddfb35 chore: add datepicker to calendar month (#4379)
Co-authored-by: shungiku <79780196+shungikuk@users.noreply.github.com>
2025-02-07 12:53:02 +08:00
Steven e09819da53 chore: add MemoFilters to explore sidebar 2025-02-06 23:35:25 +08:00
Steven 2ed3e34636 refactor: update root layout 2025-02-06 23:20:37 +08:00
johnnyjoy 505fee1abb chore: add noreferrer to external links 2025-02-06 20:19:58 +08:00
johnnyjoy 3a3ffe633d chore: remove latest tag 2025-02-06 19:48:51 +08:00
johnnyjoy 0e303181a9 chore: update action's title 2025-02-06 19:45:05 +08:00
johnnyjoy 849bf66612 fix: remove outdated factor 2025-02-06 19:38:53 +08:00
𝗦𝗵𝗟𝗲𝗿𝗣 48988a8814 fea: improve Turkish Locales (#4375) 2025-02-06 19:11:02 +08:00
Steven dfacb33abe chore: update release action by branch 2025-02-06 09:15:12 +08:00
Steven 84ef3558ab chore: update release action by branch 2025-02-06 09:12:42 +08:00
wzc90 3f33ccd906 fix: update 01__memo_pinned.sql (#4370) 2025-02-06 09:08:31 +08:00
Steven 7996586488 chore: fix migration script for sqlite 2025-02-05 20:56:46 +08:00
johnnyjoy 54a48b58d7 chore: remove random field 2025-02-05 20:48:27 +08:00
johnnyjoy 2a8c4cb750 chore: update styles 2025-02-05 20:30:22 +08:00
johnnyjoy 07336f0392 chore: update condition concat check 2025-02-05 20:07:38 +08:00
johnnyjoy 64dfadb538 chore: update readme 2025-02-05 19:51:09 +08:00
johnnyjoy 732a7d0bbf chore: add fa locale 2025-02-05 19:26:34 +08:00
spidtzz d8b3a69c31 feat: add Farsi(Persian) localazation (#4364)
Add files via upload
2025-02-05 19:19:29 +08:00
shungiku c2210b65ee fix: calendar coloring issue (#4352)
* fix: calendar coloring issue

* fix: calendar coloring issue

* fix: calendar coloring issue

* fix: calendar coloring issue

* fix: calendar coloring issue

* chore: adjust calendar color for dark theme
2025-02-05 11:13:25 +08:00
RoccoSmit 03267d6d37 feat: search for multiple words (#4362) 2025-02-04 21:04:36 +08:00
johnnyjoy 6c088e09d9 chore: fix import order 2025-02-03 18:35:16 +08:00
johnnyjoy a7ca63434b feat: validate shortcut's filter 2025-02-03 18:34:31 +08:00
johnnyjoy 8f35086da7 chore: update docs link 2025-02-03 18:23:50 +08:00
johnnyjoy ff04fdc459 feat: support more operators in filter 2025-02-03 18:23:09 +08:00
johnnyjoy 03189ee3b2 chore: remove corepack in dockerfile 2025-02-03 17:50:33 +08:00
johnnyjoy f25acfe8e2 chore: fix linter 2025-02-03 17:34:46 +08:00
johnnyjoy e0e735d14d feat: support memo filter for mysql and postgres 2025-02-03 17:14:53 +08:00
hchengting 0f8b7b7fe6 fix: show loader icon while refreshing (#4358) 2025-02-03 15:59:46 +08:00
johnnyjoy 503c892abf chore: buf generate 2025-02-03 15:09:37 +08:00
johnnyjoy b734d429ec chore: fix linter warning 2025-02-03 13:08:13 +08:00
johnnyjoy 364f005ee5 fix: filter 2025-02-03 12:44:01 +08:00
johnnyjoy 2db86f6644 feat: implement shortcut components 2025-02-03 12:26:44 +08:00
johnnyjoy 3a085f3639 chore: fix filter tests 2025-02-03 12:01:34 +08:00
johnnyjoy 8e586d348e chore: fix tag filter 2025-02-03 11:45:26 +08:00
johnnyjoy bf5a29524a chore: remove drop index 2025-02-03 11:45:15 +08:00
johnnyjoy 6682917931 chore: add validate only to create shortcut 2025-02-03 11:45:05 +08:00
johnnyjoy 81e8aed6ab chore: move part of memo filter 2025-02-02 20:28:24 +08:00
johnnyjoy fafd6d81c7 chore: fix linter warning 2025-02-02 18:50:51 +08:00
johnnyjoy be5e24c0eb refactor: renovate list memos endpoint 2025-02-02 18:43:26 +08:00
johnnyjoy 14c72fa7df feat: implement shortcuts 2025-02-02 17:11:52 +08:00
johnnyjoy b9a0c56163 feat: support more factors in filter 2025-02-02 16:12:44 +08:00
johnnyjoy 2a392b8f8d chore: fix import order 2025-02-02 13:52:45 +08:00
johnnyjoy f31800456e chore: fix import order 2025-02-02 13:52:29 +08:00
johnnyjoy 58a867e4da fix: linter warning 2025-02-02 13:50:36 +08:00
johnnyjoy 2d731c5cc5 feat: memo filter for sqlite 2025-02-02 13:35:57 +08:00
johnnyjoy 0af08d9c06 chore: add if exists to postgres 2025-02-02 13:19:56 +08:00
johnnyjoy e6cd761787 chore: remove cgo 2025-02-02 13:07:11 +08:00
dependabot[bot] 66db662e33 chore: bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.66.3 to 1.75.2 (#4346)
chore: bump github.com/aws/aws-sdk-go-v2/service/s3

Bumps [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2) from 1.66.3 to 1.75.2.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.66.3...service/s3/v1.75.2)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/s3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-02 09:41:26 +08:00
dependabot[bot] 9f99a7de35 chore: bump @types/leaflet from 1.9.15 to 1.9.16 in /web (#4340)
Bumps [@types/leaflet](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/leaflet) from 1.9.15 to 1.9.16.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/leaflet)

---
updated-dependencies:
- dependency-name: "@types/leaflet"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-02 09:40:43 +08:00
dependabot[bot] ed3923e1ba chore: bump typescript from 5.7.2 to 5.7.3 in /web (#4341)
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.7.2 to 5.7.3.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.7.2...v5.7.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-02 09:40:30 +08:00
dependabot[bot] 0eed9d5839 chore: bump less from 4.2.1 to 4.2.2 in /web (#4342)
Bumps [less](https://github.com/less/less.js) from 4.2.1 to 4.2.2.
- [Release notes](https://github.com/less/less.js/releases)
- [Changelog](https://github.com/less/less.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/less/less.js/compare/v4.2.1...v4.2.2)

---
updated-dependencies:
- dependency-name: less
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-02 09:40:21 +08:00
dependabot[bot] a80e407dc5 chore: bump @radix-ui/react-popover from 1.1.4 to 1.1.5 in /web (#4343)
Bumps [@radix-ui/react-popover](https://github.com/radix-ui/primitives) from 1.1.4 to 1.1.5.
- [Changelog](https://github.com/radix-ui/primitives/blob/main/release-process.md)
- [Commits](https://github.com/radix-ui/primitives/commits)

---
updated-dependencies:
- dependency-name: "@radix-ui/react-popover"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-02 09:40:13 +08:00
dependabot[bot] 2322f989ea chore: bump actions/stale from 9.0.0 to 9.1.0 (#4344)
Bumps [actions/stale](https://github.com/actions/stale) from 9.0.0 to 9.1.0.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v9.0.0...v9.1.0)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-02 09:40:04 +08:00
dependabot[bot] 00dd54bae4 chore: bump github.com/lithammer/shortuuid/v4 from 4.0.0 to 4.2.0 (#4345)
Bumps [github.com/lithammer/shortuuid/v4](https://github.com/lithammer/shortuuid) from 4.0.0 to 4.2.0.
- [Release notes](https://github.com/lithammer/shortuuid/releases)
- [Commits](https://github.com/lithammer/shortuuid/compare/v4.0.0...v4.2.0)

---
updated-dependencies:
- dependency-name: github.com/lithammer/shortuuid/v4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-02 09:39:55 +08:00
dependabot[bot] e034254807 chore: bump github.com/google/cel-go from 0.22.1 to 0.23.2 (#4347)
Bumps [github.com/google/cel-go](https://github.com/google/cel-go) from 0.22.1 to 0.23.2.
- [Release notes](https://github.com/google/cel-go/releases)
- [Commits](https://github.com/google/cel-go/compare/v0.22.1...v0.23.2)

---
updated-dependencies:
- dependency-name: github.com/google/cel-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-02 09:39:42 +08:00
dependabot[bot] 1e9d8f7460 chore: bump golang.org/x/net from 0.33.0 to 0.34.0 (#4348)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.33.0 to 0.34.0.
- [Commits](https://github.com/golang/net/compare/v0.33.0...v0.34.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-02 09:39:33 +08:00
dependabot[bot] cda5a5baa4 chore: bump github.com/aws/aws-sdk-go-v2 from 1.32.7 to 1.36.0 (#4349)
Bumps [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) from 1.32.7 to 1.36.0.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.32.7...v1.36.0)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-02 09:39:21 +08:00
dependabot[bot] 7a21391446 chore: bump @github/relative-time-element from 4.4.4 to 4.4.5 in /web (#4339)
Bumps [@github/relative-time-element](https://github.com/github/relative-time-element) from 4.4.4 to 4.4.5.
- [Release notes](https://github.com/github/relative-time-element/releases)
- [Commits](https://github.com/github/relative-time-element/compare/v4.4.4...v4.4.5)

---
updated-dependencies:
- dependency-name: "@github/relative-time-element"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-02 09:36:29 +08:00
Xiao Wei 37a81f9d28 fix: migrate sql error (#4338)
* fix: migrate sql error

sqlite not support postgres sql

* Apply suggestions from code review

---------

Co-authored-by: Johnny <yourselfhosted@gmail.com>
2025-02-01 22:11:17 +08:00
johnnyjoy 0b85cb567e chore(frontend): fix clsx 2025-02-01 22:04:29 +08:00
johnnyjoy 57014e392f feat: get user by username 2025-02-01 18:00:22 +08:00
johnnyjoy 45c16f9d52 chore: fix linter 2025-02-01 12:53:48 +08:00
johnnyjoy 0dcd0904e8 refactor: remove resource uid 2025-02-01 12:50:15 +08:00
johnnyjoy 97d12db3d5 refactor: renovate create memo 2025-02-01 11:48:22 +08:00
johnnyjoy 98aa0b73c5 refactor: retire memo uid 2025-02-01 11:28:07 +08:00
johnnyjoy b0119f320a chore: tweak migration scripts 2025-02-01 11:19:36 +08:00
johnnyjoy 5e770dda52 refactor: memo name 2025-02-01 11:17:36 +08:00
RoccoSmit 2f4c5d7bc2 fix: cancel out of no changes save (#4335)
Cancel out of trying to save
2025-02-01 08:30:04 +08:00
johnnyjoy 9bd6d17864 chore: add migration script 2025-01-31 22:00:05 +08:00
johnnyjoy 39d4d4f4f3 chore: update migrate scripts 2025-01-31 21:05:20 +08:00
johnnyjoy d605faeffa refactor: move pinned to memo 2025-01-31 20:58:18 +08:00
johnnyjoy 2058a8ab7b chore: move references to memo property 2025-01-31 14:18:07 +08:00
thehijacker 3fa690964e chore: update Slovenian translation (#4329)
Co-authored-by: Andrej Kralj <andrej.kralj@gmail.com>
2025-01-31 13:39:07 +08:00
Viacheslav Potoropin 7ed3a12a64 fix: internal error on pin/unpin (#4332) 2025-01-31 13:38:43 +08:00
Zero King 5ec3150e0e fix: use correct separator in migration file name (#4327)
Fixes: e913271f15 ("refactor: move tags from property to payload (#4229)")
2025-01-30 12:26:14 +08:00
johnnyjoy 75fd4223bf chore: bump version 2025-01-29 23:41:50 +08:00
changchiakai 9172e47c33 chore: update zh-Hant (#4324)
Update zh-Hant

Co-authored-by: changchiakai <changeric1031@gmail.com>
2025-01-29 09:56:20 +08:00
Philipp Mundhenk 63bbeb9ca3 chore: link to SSO Documentation (#4319)
* Update SSOSection.tsx

linked to SSO (links to Authentik, Authelia, Keycloak), instead of Keycloak only

* Update id.json

* Update uk.json

* Update fr.json

* Update pt-PT.json

* Update vi.json

* Update uk.json

* Update de.json

* Update en.json
2025-01-26 23:03:56 +08:00
Pavel Stržínek 0435a67aa7 feat: czech locale support (#4316) 2025-01-26 23:03:11 +08:00
johnnyjoy 0334a4845f chore: tweak calendar styles 2025-01-21 22:55:57 +08:00
johnnyjoy ef3b7ac6ae chore: update tag icon 2025-01-21 22:55:35 +08:00
johnnyjoy f9b1df5d13 fix: tags container 2025-01-21 22:46:09 +08:00
Comix d9a92b2ef8 feat: support path style of s3 url (#4304)
Signed-off-by: ComixHe <ComixHe1895@outlook.com>
2025-01-21 18:02:21 +08:00
johnnyjoy 702c092289 chore: update auth message 2025-01-20 19:38:50 +08:00
johnnyjoy 409d64b839 chore: update memo comment in activity 2025-01-20 19:34:23 +08:00
johnnyjoy f1308ddd27 refactor: update part of resource identifier 2025-01-19 23:03:22 +08:00
johnnyjoy cda18a37c0 chore: remove docs 2025-01-19 10:50:49 +08:00
johnnyjoy 3c0d011085 chore(dev): update build guides 2025-01-19 10:46:35 +08:00
johnnyjoy f1eacfefb0 chore(dev): update build directory 2025-01-19 10:33:04 +08:00
Steven edc3f1d9d9 chore: retire unused memo view 2025-01-16 09:20:01 +08:00
Steven 147458347b chore: tweak user stats in frontend 2025-01-16 09:12:47 +08:00
johnnyjoy 6904dc16af chore: fix linter 2025-01-15 22:33:18 +08:00
johnnyjoy c76ab87a0a refactor: update list user stats 2025-01-15 19:25:36 +08:00
Steven 8b65d248b1 fix: memo filter 2025-01-14 00:05:33 +08:00
johnnyjoy ee96465be0 feat: list user stats 2025-01-13 23:14:44 +08:00
johnnyjoy cde058c72a chore: tweak theme code 2025-01-13 19:46:06 +08:00
Query&mut NinjaStyle, &Ryder 94517490f5 fix: mermaid diagrams in dark mode (#4289)
* fix #4257 fixed ui for mermaid diagrams in dark mode

* fixed linting issues

* added dynamic color theme for mermaid diagrams

* now mermaid block uses theme according to the system as well when 'follow system' is selected

* refactored code for mermaid theme logic

* refactored mermaid code to use const instead of function call

---------

Co-authored-by: root <root@DESKTOP-G3MCU14>
2025-01-13 19:44:53 +08:00
johnnyjoy d050a6fd46 chore: update user stats 2025-01-11 20:12:02 +08:00
johnnyjoy 34c26a394a feat: implement user stats endpoint 2025-01-11 16:59:22 +08:00
Steven 5ff8ab9a61 chore: polish creator definition 2025-01-10 23:39:50 +08:00
Steven 8b7e9f5443 chore: remove unused user id 2025-01-10 23:35:00 +08:00
RoccoSmit 3081015692 feat: date picker navigation (#4286)
Added month and year dropdowns
2025-01-10 22:46:08 +08:00
johnnyjoy 2cd524e4fa chore: fix buf format 2025-01-10 22:29:57 +08:00
johnnyjoy a1be73cce3 chore: buf format 2025-01-10 22:26:19 +08:00
johnnyjoy c1498a1844 chore: retire webhook state 2025-01-10 22:24:12 +08:00
johnnyjoy 2a861ea430 refactor: tweak resource state in api 2025-01-10 22:20:23 +08:00
johnnyjoy 1caaef1c5b chore: fix memo compact mode 2025-01-10 21:47:00 +08:00
Query&mut NinjaStyle, &Ryder 972ebbae2f fix: compact mode storage (#4279)
fix #4274 now when checkbox is toggled the memo remembers the compact state

Co-authored-by: root <root@DESKTOP-G3MCU14>
2025-01-10 20:43:46 +08:00
johnnyjoy ac7121c21a chore: update archived page 2025-01-10 20:24:05 +08:00
johnnyjoy 5d40f38956 chore: fix name comments 2025-01-09 21:35:02 +08:00
Steven 840b16f041 chore: tweak back to top button 2025-01-08 22:59:08 +08:00
Steven 012ca1d780 fix: tag stats 2025-01-08 22:35:34 +08:00
johnnyjoy d9d6f73330 chore: fix memo converter 2025-01-08 20:57:34 +08:00
johnnyjoy 65da94521d chore: buf generate 2025-01-08 20:29:20 +08:00
Pierre Quillery cdadf133d0 chore: adding missing translations (#4273)
* Added missing translations strings (filters, about page, ...)

* Forgot one translation string.

* Fixed PR issues and added Access Token related missing translation strings.

* Fixed eslint issues.

* Fixed eslint issues #2.

* Fixed access token dialog translations, added missing webhook dialog translations.
2025-01-08 10:24:41 +08:00
Chris Curry 7b909fb772 feat: scroll to top (#4244) 2025-01-04 23:44:37 +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
tungerno e3d1967db8 chore: add missing german translations (#4268) 2025-01-04 23:42:29 +08:00
Pierre Quillery 50d09bb91e chore: added missing French translations (#4270)
Added missing French translations.
2025-01-04 23:42:09 +08:00
dependabot[bot] 828461d430 chore: bump golang.org/x/net from 0.30.0 to 0.33.0 (#4251)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.30.0 to 0.33.0.
- [Commits](https://github.com/golang/net/compare/v0.30.0...v0.33.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-02 10:23:29 +08:00
Chris Curry e3b378b03b feat: persist memo filters with url query (#4239)
* feat: persist memo filters with url query

- Implemented synchronization of memo filters with URL search parameters.
- Enhanced memo store to manage current request state for fetching memos, allowing for request cancellation, avoiding the race conditions.

* refactor: update import
2025-01-02 10:23:15 +08:00
dependabot[bot] 0e1ac30462 chore: bump react-router-dom from 6.28.1 to 7.1.1 in /web (#4246)
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.28.1 to 7.1.1.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@7.1.1/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-02 09:45:25 +08:00
dependabot[bot] 94c47cc520 chore: bump i18next from 23.16.8 to 24.2.0 in /web (#4247)
Bumps [i18next](https://github.com/i18next/i18next) from 23.16.8 to 24.2.0.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v23.16.8...v24.2.0)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-02 09:45:15 +08:00
dependabot[bot] 93f01f02e1 chore: bump @types/node from 22.10.2 to 22.10.3 in /web (#4248)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.10.2 to 22.10.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-02 09:45:05 +08:00
dependabot[bot] fd257ba900 chore: bump @mui/joy from 5.0.0-beta.48 to 5.0.0-beta.51 in /web (#4249)
Bumps [@mui/joy](https://github.com/mui/material-ui/tree/HEAD/packages/mui-joy) from 5.0.0-beta.48 to 5.0.0-beta.51.
- [Release notes](https://github.com/mui/material-ui/releases)
- [Changelog](https://github.com/mui/material-ui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mui/material-ui/commits/HEAD/packages/mui-joy)

---
updated-dependencies:
- dependency-name: "@mui/joy"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-02 09:44:55 +08:00
dependabot[bot] 00df48e594 chore: bump google.golang.org/grpc from 1.67.1 to 1.69.2 (#4250)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.67.1 to 1.69.2.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.67.1...v1.69.2)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-02 09:44:44 +08:00
dependabot[bot] 00c7ea229c chore: bump github.com/aws/aws-sdk-go-v2/config from 1.28.2 to 1.28.7 (#4252)
Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.28.2 to 1.28.7.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.28.2...config/v1.28.7)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/config
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-02 09:44:27 +08:00
dependabot[bot] 3b57b03e57 chore: bump golang.org/x/crypto from 0.29.0 to 0.31.0 (#4253)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.29.0 to 0.31.0.
- [Commits](https://github.com/golang/crypto/compare/v0.29.0...v0.31.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-02 09:44:18 +08:00
dependabot[bot] 2b681bf594 chore: bump golang.org/x/mod from 0.21.0 to 0.22.0 (#4254)
Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.21.0 to 0.22.0.
- [Commits](https://github.com/golang/mod/compare/v0.21.0...v0.22.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-02 09:44:08 +08:00
Steven aff6b8707d chore: upgrade frontend dependencies 2025-01-01 07:59:56 +08:00
Chris Curry bc0bac94ed refactor: enhance hyperlink handling in markdown shortcuts (#4238) 2024-12-30 17:46:24 +08:00
Hadley Rich 82b5c8ab07 feat: add sh entrypoint to allow MEMOS_DSN_FILE to load variable from secret (#4236)
Add sh entrypoint to allow MEMOS_DSN_FILE to load variable from secret
2024-12-30 17:46:02 +08:00
johnnyjoy 7817ad07f7 chore: fix linter 2024-12-30 09:18:11 +08:00
johnnyjoy 3220adbff9 refactor: split memo service 2024-12-26 20:13:05 +08:00
johnnyjoy a78bfffb17 chore: add output only flag 2024-12-26 20:06:42 +08:00
johnnyjoy 541e07af8c chroe: rebuild memo references 2024-12-26 20:04:36 +08:00
johnnyjoy 3b0be442de chore: update memo payload runner schedule 2024-12-26 20:01:15 +08:00
johnnyjoy 41d9c9d76e fix: order list starts 2024-12-25 22:43:26 +08:00
Johnny e913271f15 refactor: move tags from property to payload (#4229)
* refactor: move tags from property to payload

* chore: fix tests

* chore: drop memo tags

* chore: update

---------

Co-authored-by: Steven <stevenlgtm@gmail.com>
2024-12-24 15:23:15 +00:00
zjy4fun f15346e615 fix: optimize memoMap generation logic to ensure memoMap count matche… (#4214)
fix: optimize memoMap generation logic to ensure memoMap count matches memos
2024-12-20 13:22:48 +08:00
zjy4fun 7a77b4ba38 chore: fix css location compatibility issues on Safari (#4215)
chore: fix location compatibility issues on Safari

closes https://github.com/usememos/memos/issues/4190
2024-12-20 13:21:59 +08:00
RoccoSmit ce6ad4035d fix: limit the size of the resource list viewer (#4210)
Limit the size of the file upload box
2024-12-19 10:32:05 +08:00
Lincoln Nogueira 1c255d4e1f fix: panic on arm v5-v6-v7 builds (#4204)
- upgrade modernc.org/libc to v1.34.2

libc version on go.mod must match upstream's sqlite go.mod file to prevent similar issues.

https://pkg.go.dev/modernc.org/sqlite#hdr-Fragile_modernc_org_libc_dependency

```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGBUS: bus error code=0x2 addr=0x0 pc=0xdd8568]
```
2024-12-16 14:31:58 +08:00
Nikolay ea394d89b2 fix: add server name change in mobile header (#4195)
* [fix] add server name change in  mobile header

* Update web/src/components/MobileHeader.tsx

* Update web/src/components/MobileHeader.tsx

* Apply suggestions from code review

---------

Co-authored-by: Николай Витальевич Никоноров <nnv@bitt.moe>
Co-authored-by: Johnny <yourselfhosted@gmail.com>
2024-12-13 13:23:16 +08:00
johnnyjoy cb569c99fd chore: remove useCallback in fetching memo list 2024-12-07 12:26:21 +08:00
johnnyjoy 5a83f0c4fa chore: update frontend dependencies 2024-12-07 12:22:54 +08:00
johnnyjoy f1d6a6766e chore: revert bump react version 2024-12-07 12:19:55 +08:00
johnnyjoy 0a5111e4b0 chore: update i18n types definition 2024-12-07 12:16:38 +08:00
Johnny 67f8811f3f chore: tweak bug report template 2024-12-07 11:48:02 +08:00
Steven a97154e72d chore: bump react version 2024-12-06 22:16:18 +08:00
dependabot[bot] dd15012661 chore: bump github.com/stretchr/testify from 1.9.0 to 1.10.0 (#4164)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-03 09:00:44 +08:00
dependabot[bot] 6e88b4203b chore: bump github.com/google/cel-go from 0.22.0 to 0.22.1 (#4165)
Bumps [github.com/google/cel-go](https://github.com/google/cel-go) from 0.22.0 to 0.22.1.
- [Release notes](https://github.com/google/cel-go/releases)
- [Commits](https://github.com/google/cel-go/compare/v0.22.0...v0.22.1)

---
updated-dependencies:
- dependency-name: github.com/google/cel-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-03 09:00:34 +08:00
dependabot[bot] 6cdc90bc97 chore: bump google.golang.org/protobuf from 1.35.1 to 1.35.2 (#4166)
Bumps google.golang.org/protobuf from 1.35.1 to 1.35.2.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-03 09:00:24 +08:00
dependabot[bot] d06e67f57c chore: bump github.com/aws/aws-sdk-go-v2/credentials from 1.17.43 to 1.17.46 (#4167)
chore: bump github.com/aws/aws-sdk-go-v2/credentials

Bumps [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2) from 1.17.43 to 1.17.46.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/credentials/v1.17.43...credentials/v1.17.46)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/credentials
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-03 09:00:10 +08:00
dependabot[bot] 4e99de2692 chore: bump @bufbuild/buf from 1.46.0 to 1.47.2 in /web (#4169)
Bumps [@bufbuild/buf](https://github.com/bufbuild/buf) from 1.46.0 to 1.47.2.
- [Release notes](https://github.com/bufbuild/buf/releases)
- [Changelog](https://github.com/bufbuild/buf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bufbuild/buf/compare/v1.46.0...v1.47.2)

---
updated-dependencies:
- dependency-name: "@bufbuild/buf"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-03 08:59:59 +08:00
dependabot[bot] edb8db9914 chore: bump @reduxjs/toolkit from 2.3.0 to 2.4.0 in /web (#4170)
Bumps [@reduxjs/toolkit](https://github.com/reduxjs/redux-toolkit) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/reduxjs/redux-toolkit/releases)
- [Commits](https://github.com/reduxjs/redux-toolkit/compare/v2.3.0...v2.4.0)

---
updated-dependencies:
- dependency-name: "@reduxjs/toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-03 08:59:48 +08:00
dependabot[bot] 1e28f7abb5 chore: bump tailwind-merge from 2.5.4 to 2.5.5 in /web (#4171)
Bumps [tailwind-merge](https://github.com/dcastil/tailwind-merge) from 2.5.4 to 2.5.5.
- [Release notes](https://github.com/dcastil/tailwind-merge/releases)
- [Commits](https://github.com/dcastil/tailwind-merge/compare/v2.5.4...v2.5.5)

---
updated-dependencies:
- dependency-name: tailwind-merge
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-03 08:59:38 +08:00
dependabot[bot] 56c9e94ac4 chore: bump class-variance-authority from 0.7.0 to 0.7.1 in /web (#4172)
Bumps [class-variance-authority](https://github.com/joe-bell/cva) from 0.7.0 to 0.7.1.
- [Release notes](https://github.com/joe-bell/cva/releases)
- [Commits](https://github.com/joe-bell/cva/compare/v0.7.0...v0.7.1)

---
updated-dependencies:
- dependency-name: class-variance-authority
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-03 08:59:27 +08:00
dependabot[bot] 790004463b chore: bump less from 4.2.0 to 4.2.1 in /web (#4173)
Bumps [less](https://github.com/less/less.js) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/less/less.js/releases)
- [Changelog](https://github.com/less/less.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/less/less.js/commits)

---
updated-dependencies:
- dependency-name: less
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-03 08:59:16 +08:00
dependabot[bot] 77e4d6f6f1 chore: bump golang.org/x/crypto from 0.28.0 to 0.29.0 (#4168)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.28.0 to 0.29.0.
- [Commits](https://github.com/golang/crypto/compare/v0.28.0...v0.29.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-03 08:49:13 +08:00
Cheng 2aa3795e50 fix: search conditions affected by pull-to-refresh (#4159) 2024-11-29 22:13:41 +08:00
Query&mut NinjaStyle, &Ryder 009f4956ac fix: check IdP for disallow password auth
* fix #4144 now when there is no sso then the Disallow password auth is disabled

* fixed the import issue

* attempt fixing linting issues

---------

Co-authored-by: pransh62390 <63577123+pransh62390@users.noreply.github.com>
2024-11-29 12:23:17 +08:00
KidLoveToPlay 73d13cb97b chore: style fix to #4151 (#4153)
* chore: apply styles to the correct month

* chore: style fix
2024-11-28 10:23:28 +08:00
KidLoveToPlay 97ef5a8871 chore: apply styles to the correct month (#4151) 2024-11-27 14:00:50 +08:00
Madhur Jodhwani a51e363c7c chore: fix truncation of webhook url to avoid disappearance of Trash Icon (#4145)
* Fixed truncation of webhook url to avoid disappearance of Trash Icon

* fixing webhook truncation issue #4078

* Removing overflow-hidden

* resolving pipeline issues

* supporting on hover url display

---------

Co-authored-by: Madhur <madhur.jodhwani@accelya.com>
2024-11-25 14:19:04 +08:00
RoccoSmit 54ee2bf3ab feat: show less when memo expanded (#4143)
* Added show less action and language files

* Renaming type as suggested in pr review
2024-11-24 22:24:58 +08:00
johnnyjoy 2a1c0bba6c chore: remove unused reaction.proto 2024-11-21 23:08:03 +08:00
JP Hastings-Edrei fcc4abf5b8 feat: remove RSS titles (#4140)
This removes the content of the <title> element in the RSS feeds that Memo produces.

Why remove? Every RSS client I can find shows the <title> next to the <description> when viewing an item. This creates a duplicate (but often trimmed, so less useful) version of <description> right above the actual text the user wants to read (often in a much larger font). It similarly makes lists of items in some clients extremely tall, as 128 characters is a lot of hard-to-read text — especially when Memos renders links as their URL in titles.

Why an empty tag? The RSS 1.0 and 2.0 specs require that a <title> element is present.

Examples from elsewhere:
- micro.blog uses an empty <title /> element: https://www.manton.org/feed.xml
- Bluesky omits the <title> element: https://bsky.app/profile/did%3Aplc%3Aqvzn322kmcvd7xtnips5xaun/rss
- Mastodon omits the <title> element: https://mastodon.social/@scalzi.rss
2024-11-20 22:31:32 +08:00
Steven 51c80c37d1 revert: tweak reaction_type column type for mysql 2024-11-20 20:37:35 +08:00
Steven 9f2c1b2556 chore: tweak reaction_type column type for mysql 2024-11-20 20:35:03 +08:00
Steven 104948ae40 chore: set pull to refresh with screen size 2024-11-20 20:28:49 +08:00
Steven 7b70c203cc chore: buf generate 2024-11-20 20:22:21 +08:00
nlfox 3cbccde67e feat: add pull to refresh for PagedMemoList (#4128) 2024-11-19 23:34:47 +08:00
johnnyjoy 1424036ccd chore: use for...of 2024-11-17 22:04:49 +08:00
Andy An f6af564d4e feat: enhancement on UI/UX on user statistic view part. (#4122)
Enhancement on UI/UX on user statistic view part.
2024-11-17 09:47:41 +08:00
lcdgit f00751a6e0 feat: allow to remove done items (#4126)
* add remove done items

* i18n en add

* bug fix

* add i18n

* Modify the description

* Modify the description

* Modify the description

* remove remove_done_check_items setting

* fix the static checks

* fix the static checks

---------

Co-authored-by: mozhu <lcl_em@163.com>
2024-11-17 09:33:39 +08:00
johnnyjoy 80785de900 chore: remove unused script 2024-11-14 22:12:00 +08:00
Steven 378b6a51c1 chore: tweak default reactions 2024-11-13 08:33:12 +08:00
Steven f007185b8f chore: tweak form styles 2024-11-12 23:23:14 +08:00
RoccoSmit 142e97ab5a feat: navigate image view with keyboard keys (#4116)
* Navigate images with keyboard left and right keys

* Fix linting

* Adding missing "

* Added change to incorrect branch
2024-11-11 08:16:09 +08:00
RoccoSmit bcd8856732 fix: added missing " (#4119)
Added missing "
2024-11-11 08:14:17 +08:00
johnnyjoy 45d4d391d8 fix: air script in windows 2024-11-07 23:34:39 +08:00
johnnyjoy 2f8d347310 Merge branch 'main' of https://github.com/usememos/memos 2024-11-07 23:32:49 +08:00
johnnyjoy b4f9c09d85 chore: upgrade backend dependencies 2024-11-07 23:32:44 +08:00
Steven 5601daef40 chore: add semantic action 2024-11-06 21:15:53 +08:00
Steven ad50aec2db chore: update activity calendar 2024-11-06 21:14:36 +08:00
RoccoSmit 3b25a6bbec fix: handle missing reaction (#4094)
* migration version

* Updated test to match with current version set in version.go file

* updated logic to check if migration should run for fresh install

* Update test to test for version number set in version.go

* fixed test

* Revert "fixed test"

This reverts commit 4004d0e92b.

* Revert "Update test to test for version number set in version.go"

This reverts commit d304add5d6.

* Revert "updated logic to check if migration should run for fresh install"

This reverts commit b44dca2194.

* Revert "Updated test to match with current version set in version.go file"

This reverts commit 3ad0d889b6.

* Revert "migration version"

This reverts commit b13cfc346a.

* Added default reaction if no reation found

* Fixed static check issue

* Use emoji
2024-11-06 21:11:26 +08:00
johnnyjoy 3786fb8db2 chore(dev): add code inspector plugin 2024-11-06 19:28:18 +08:00
Steven 67c1a46346 chore: remove html renderer sanitizes 2024-11-05 22:44:37 +08:00
Steven 57c00734e2 fix: frontend build 2024-11-05 21:15:13 +08:00
Ngô Quốc Đạt e25792be9c chore: update vi translations (#4099) 2024-11-05 15:29:43 +08:00
Steven f5a0827a3f chore: update explore translate of zh-hans 2024-11-04 21:38:34 +08:00
Steven 04c6e262c3 chore: align colors 2024-11-04 21:30:50 +08:00
Simon f310207b9a chore: update i18n Ukrainian (#4096)
* Update uk.json

* Update uk.json
2024-11-04 20:04:20 +08:00
Steven 7b79c49414 chore: remove version tests 2024-11-03 22:55:09 +08:00
Steven b547720aa8 chore: add id to i18n locales 2024-11-03 22:48:39 +08:00
kiraware 3542a79420 feat: add Bahasa Indonesia (id) translation (#4092) 2024-11-03 22:45:49 +08:00
johnnyjoy 227cc26cb9 chore: align table styles for access token section 2024-11-03 20:28:42 +08:00
Steven f59daf839b chore: fix action 2024-11-02 20:00:00 +08:00
Steven ae957439ec chore: update build action 2024-11-02 19:56:07 +08:00
Steven 4b28dfddb6 fix: visibility selector overflow 2024-11-02 13:39:08 +08:00
dependabot[bot] 648db7e82a chore: bump uuid from 10.0.0 to 11.0.2 in /web (#4086)
Bumps [uuid](https://github.com/uuidjs/uuid) from 10.0.0 to 11.0.2.
- [Release notes](https://github.com/uuidjs/uuid/releases)
- [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/uuidjs/uuid/compare/v10.0.0...v11.0.2)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-02 11:58:31 +08:00
dependabot[bot] bd4e4b632a chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager from 1.17.25 to 1.17.35 (#4084)
chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager

Bumps [github.com/aws/aws-sdk-go-v2/feature/s3/manager](https://github.com/aws/aws-sdk-go-v2) from 1.17.25 to 1.17.35.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/credentials/v1.17.25...credentials/v1.17.35)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/feature/s3/manager
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-02 11:58:17 +08:00
dependabot[bot] a449988a7e chore: bump golang.org/x/crypto from 0.27.0 to 0.28.0 (#4085)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.27.0 to 0.28.0.
- [Commits](https://github.com/golang/crypto/compare/v0.27.0...v0.28.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-02 10:39:40 +08:00
dependabot[bot] 6be36d268a chore: bump @types/node from 22.8.0 to 22.8.6 in /web (#4087)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.8.0 to 22.8.6.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-02 10:39:25 +08:00
dependabot[bot] c1a13be778 chore: bump golang.org/x/net from 0.29.0 to 0.30.0 (#4082)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.29.0 to 0.30.0.
- [Commits](https://github.com/golang/net/compare/v0.29.0...v0.30.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-02 10:39:08 +08:00
dependabot[bot] d2c4a9e7b6 chore: bump github.com/aws/aws-sdk-go-v2 from 1.31.0 to 1.32.3 (#4083)
Bumps [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) from 1.31.0 to 1.32.3.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.31.0...v1.32.3)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-02 10:38:58 +08:00
dependabot[bot] bb9b6be19e chore: bump zustand from 4.5.5 to 5.0.1 in /web (#4090)
Bumps [zustand](https://github.com/pmndrs/zustand) from 4.5.5 to 5.0.1.
- [Release notes](https://github.com/pmndrs/zustand/releases)
- [Commits](https://github.com/pmndrs/zustand/compare/v4.5.5...v5.0.1)

---
updated-dependencies:
- dependency-name: zustand
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-02 10:38:39 +08:00
dependabot[bot] 183a22a928 chore: bump @bufbuild/buf from 1.45.0 to 1.46.0 in /web (#4088)
Bumps [@bufbuild/buf](https://github.com/bufbuild/buf) from 1.45.0 to 1.46.0.
- [Release notes](https://github.com/bufbuild/buf/releases)
- [Changelog](https://github.com/bufbuild/buf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bufbuild/buf/compare/v1.45.0...v1.46.0)

---
updated-dependencies:
- dependency-name: "@bufbuild/buf"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-02 10:38:04 +08:00
dependabot[bot] aea814de83 chore: bump @bufbuild/protobuf from 2.2.0 to 2.2.2 in /web (#4089)
Bumps [@bufbuild/protobuf](https://github.com/bufbuild/protobuf-es/tree/HEAD/packages/protobuf) from 2.2.0 to 2.2.2.
- [Release notes](https://github.com/bufbuild/protobuf-es/releases)
- [Commits](https://github.com/bufbuild/protobuf-es/commits/v2.2.2/packages/protobuf)

---
updated-dependencies:
- dependency-name: "@bufbuild/protobuf"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-02 10:36:27 +08:00
Daniel Pinto f44583e87d chore: allow some hardcoded strings to be translated (#4076)
Allow some hardcoded strings to be translated

Also add pt-PT translation for them
2024-11-02 10:36:11 +08:00
johnnyjoy 9a4fc2e015 chore: buf generate 2024-10-30 21:52:27 +08:00
Steven 67e474d4dd fix: linter warning 2024-10-30 20:19:08 +08:00
Steven c12425329b chore: fix action buttons 2024-10-29 00:18:02 +08:00
Steven db2b34a850 chore: update input source 2024-10-28 22:04:52 +08:00
Daniel Pinto 12bcf65f7d locale: Add pt-PT translations (#4064)
* locale: Add pt-PT translations

* fix str
2024-10-28 09:14:00 +08:00
Steven f373d8e88c chore: update checkbox source 2024-10-27 10:19:06 +08:00
Steven 963706aebd refactor: update button source 2024-10-26 21:36:05 +08:00
Steven 8635aed138 chore: update dependencies 2024-10-25 21:55:00 +08:00
new-aspect aa9649adf0 fix: automatic indentation follows previous lines in lists (#4048) (#4050)
* fix: automatic indentation follows previous lines in lists (#4048)

* fix: automatic indentation follows previous lines in lists (#4048)
change the position of this logic and recommit it
2024-10-25 19:16:59 +08:00
RoccoSmit 2851f11302 fix: use UTC date for calendar filter (#4046) 2024-10-23 22:52:20 +08:00
johnnyjoy 7e48d13834 fix: workspace setting state 2024-10-23 13:46:07 +08:00
Steven 4fcc682a15 chore: add beta badge to relation graph 2024-10-21 20:23:34 +08:00
Steven f9fec56560 chore: fix date picker position 2024-10-20 17:08:01 +08:00
johnnyjoy 2ebf3f2615 chore: fix math styles 2024-10-19 21:40:24 +08:00
johnnyjoy cf1be81de2 feat: use date-picker instead of raw datetime input 2024-10-19 21:30:02 +08:00
johnnyjoy 199d5680e6 chore: update inbox messages style 2024-10-19 21:01:02 +08:00
johnnyjoy 435bd5c44f fix: update relation graph checks 2024-10-19 20:53:53 +08:00
johnnyjoy 04d6329d0f feat: use hash router to sub-setting pages 2024-10-19 20:46:57 +08:00
johnnyjoy 085995ec3d chore: update setting title 2024-10-19 20:32:55 +08:00
johnnyjoy c3cb3770cc chore: tweak function names 2024-10-19 16:13:33 +08:00
johnnyjoy c2e820400e chore: regenerate api docs 2024-10-19 16:13:27 +08:00
d0zingcat 67dc9a3f0a chore: allow quick unpin (#4031)
Signed-off-by: d0zingcat <leewtang@gmail.com>
2024-10-19 16:05:14 +08:00
Matteo Vollero 19098940f7 chore: check currentUser and redirect to index if logged (#4021)
* If to check currentUser and redirect to index if logged

* Moved check into useEffect
2024-10-19 16:04:34 +08:00
d0zingcat e5cb2037e4 feat: allow to disable markdown shortcuts (#4025)
* add settting to disable markdown keymap

Signed-off-by: d0zingcat <leewtang@gmail.com>

* rename disable markdown shortcuts

Signed-off-by: d0zingcat <leewtang@gmail.com>

* fix lint

Signed-off-by: d0zingcat <leewtang@gmail.com>

---------

Signed-off-by: d0zingcat <leewtang@gmail.com>
2024-10-16 23:27:54 +08:00
Steven 009534f1cf chore: fix linter warning 2024-10-16 23:11:34 +08:00
Steven 68c2bd3837 chore: update memo relations 2024-10-16 23:09:20 +08:00
Steven 82da20e1c3 feat: implement graph of relations 2024-10-15 23:31:44 +08:00
Steven 952428c15d chore: update default max height 2024-10-15 20:38:17 +08:00
Steven cfe1765067 chore: tweak user statistics view 2024-10-15 20:30:24 +08:00
Steven c4b52c68b5 fix: max height of memo content compact mode 2024-10-15 20:07:55 +08:00
Steven 317cf06579 chore: tweak demo data 2024-10-14 23:35:19 +08:00
Steven 14712b42fa chore: add pagination to list inboxes 2024-10-14 23:32:39 +08:00
Steven b4d72e3349 fix: memo visibilities with filter 2024-10-14 21:31:44 +08:00
Steven 60a0ead0fa chore: add ka-GE locale 2024-10-14 20:31:45 +08:00
Aleksandre 69e93c1ab4 feat: support Georgian Language (#4016)
Create ge.json

Georgian language
2024-10-14 09:46:48 +08:00
Steven b2f60758bc chore: update workspace setting in demo mode 2024-10-12 09:21:00 +08:00
Steven 74498a726e chore: update package 2024-10-11 21:35:25 +08:00
Steven cab981c393 chore: fix linter errors 2024-10-11 21:27:08 +08:00
Steven 3370ecd4fc chore: ignore lint for tests 2024-10-11 21:22:04 +08:00
Steven 0a871b8960 chore: fix tests 2024-10-11 21:13:36 +08:00
RoccoSmit 35cf975e76 fix: apply system theme dynamically (#4010)
Remove appearance comparison
2024-10-11 21:05:52 +08:00
Steven 43d13a3edc chore: tweak linter 2024-10-11 21:05:07 +08:00
Steven f467f1d9f6 chore: update cron package 2024-10-11 19:59:14 +08:00
Steven 0b6f24a21a chore: update task complete 2024-10-10 23:22:18 +08:00
Steven d066d46f6e chore: tweak schema version 2024-10-10 22:30:46 +08:00
Steven d54c8065b5 chore: update demo data 2024-10-10 22:04:41 +08:00
Steven 2acad978d1 chore(frontend): add reactions setting 2024-10-10 22:04:35 +08:00
Steven e527b6a878 feat: move reaction type to setting 2024-10-10 21:06:32 +08:00
wjsoj 1f9d657065 feat: support set global Default memo visibility (#3989)
* feat: support set global Default memo visibility

* feat: Move to WorkspaceMemoRelatedSetting

* fix: goimports check failure

* chore: change item name to default_visibility

* fix: goimports check failure
2024-10-08 22:45:18 +08:00
Steven dc15e8f30f chore: implement memo metadata store 2024-10-08 22:22:45 +08:00
johnnyjoy 831c254d64 fix: update user fields 2024-10-08 19:52:49 +08:00
Roman 310f147911 feat: allow single letter user id (#3991)
* Allow single letter user id.

They do work - I use one and login using Authelia, but then I am not able to update the profile to update avatar or add comment because "Invalid username: r" errors

* Add test for the util with uid matcher

* Move the test to separate directory

* Use goimports on the test file

* Rename the test for a mroe matching name, add failing test

* Update the regexp so that two letter work

---------

Co-authored-by: Roman Kamyk <roman@kamyk.me>
2024-10-08 13:47:24 +08:00
Steven 0b2f08ad15 fix: memo view 2024-10-07 01:57:37 +08:00
Steven d11e7a3a9a chore: remove duplicated requests 2024-10-07 01:40:15 +08:00
Steven c401a07933 chore: update dependencies 2024-10-02 22:22:21 +08:00
RoccoSmit f0d43c9577 feat: add tag count to tree view (#3970)
* Add tag count to tree view

* Only display tag amounts > 1

* Updated tag amount var name to be more descriptive

* - Moved display logic to html in return
- Updated var names to closer match var passed in by TagSection component
2024-10-02 18:31:50 +08:00
dependabot[bot] 4ab06f5f11 chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager from 1.17.22 to 1.17.25 (#3978)
chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager

Bumps [github.com/aws/aws-sdk-go-v2/feature/s3/manager](https://github.com/aws/aws-sdk-go-v2) from 1.17.22 to 1.17.25.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/credentials/v1.17.22...credentials/v1.17.25)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/feature/s3/manager
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 11:37:42 +08:00
dependabot[bot] dab0f1907d chore: bump github.com/aws/aws-sdk-go-v2/config from 1.27.36 to 1.27.39 (#3976)
Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.27.36 to 1.27.39.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.27.36...config/v1.27.39)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/config
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 11:37:33 +08:00
dependabot[bot] e7949d0748 chore: bump vite from 5.4.7 to 5.4.8 in /web (#3981)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.7 to 5.4.8.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.8/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.8/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 11:37:16 +08:00
Xavier Hocquet 32123e0c21 feat: add month toggle on hover (#3972)
* Add month toggle on hover

* Lint
2024-10-02 11:37:05 +08:00
dependabot[bot] 4c0c7431c8 chore: bump google.golang.org/grpc from 1.67.0 to 1.67.1 (#3977)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.67.0 to 1.67.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.67.0...v1.67.1)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 11:36:12 +08:00
dependabot[bot] 25367bc000 chore: bump nice-grpc-web from 3.3.4 to 3.3.5 in /web (#3979)
Bumps [nice-grpc-web](https://github.com/deeplay-io/nice-grpc) from 3.3.4 to 3.3.5.
- [Release notes](https://github.com/deeplay-io/nice-grpc/releases)
- [Commits](https://github.com/deeplay-io/nice-grpc/compare/nice-grpc-web@3.3.4...nice-grpc-web@3.3.5)

---
updated-dependencies:
- dependency-name: nice-grpc-web
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 11:36:00 +08:00
dependabot[bot] 6cd86c0de1 chore: bump github.com/aws/aws-sdk-go-v2/credentials from 1.17.34 to 1.17.37 (#3975)
chore: bump github.com/aws/aws-sdk-go-v2/credentials

Bumps [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2) from 1.17.34 to 1.17.37.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/credentials/v1.17.34...credentials/v1.17.37)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/credentials
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 11:35:40 +08:00
dependabot[bot] 508146b052 chore: bump mermaid from 10.9.1 to 11.2.1 in /web (#3980)
Bumps [mermaid](https://github.com/mermaid-js/mermaid) from 10.9.1 to 11.2.1.
- [Release notes](https://github.com/mermaid-js/mermaid/releases)
- [Changelog](https://github.com/mermaid-js/mermaid/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/mermaid-js/mermaid/compare/v10.9.1...mermaid@11.2.1)

---
updated-dependencies:
- dependency-name: mermaid
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 11:35:28 +08:00
dependabot[bot] 143167386e chore: bump dompurify from 3.1.6 to 3.1.7 in /web (#3982)
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.1.6 to 3.1.7.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.1.6...3.1.7)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 07:43:34 +08:00
dependabot[bot] 938cfb4a69 chore: bump @types/node from 22.5.5 to 22.7.4 in /web (#3983)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.5.5 to 22.7.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 07:43:26 +08:00
dependabot[bot] 6965f0b89d chore: bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.63.0 to 1.63.3 (#3974)
chore: bump github.com/aws/aws-sdk-go-v2/service/s3

Bumps [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2) from 1.63.0 to 1.63.3.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.63.0...service/s3/v1.63.3)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/s3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 05:14:26 +08:00
ElTopo 0ba36ed7e0 chore: updated zh-Hans.json from current version of en.json (#3966) 2024-09-30 10:48:36 +08:00
Steven 771a977c9f chore: tweak words 2024-09-29 22:49:29 +08:00
Steven 69ad5178b3 chore: update MaxCallRecvMsgSize 2024-09-29 22:00:15 +08:00
Steven 2b86069f3b chore: update MaxRecvMsgSize 2024-09-29 21:58:06 +08:00
johnnyjoy d5d37c1d59 chore: bump gomark version 2024-09-28 21:55:58 +08:00
Steven cf4e660f41 chore: add memo location setting 2024-09-26 22:11:37 +08:00
Steven 95a50b6596 chore: tweak leaflet map 2024-09-26 22:04:05 +08:00
Steven 9c41c8d5c9 chore: fix marker icon 2024-09-26 09:20:33 +08:00
Steven 2837816ff7 chore: fix component state 2024-09-26 00:27:39 +08:00
Steven b144faf43a feat: add location selector 2024-09-26 00:03:17 +08:00
Steven 63989ab365 feat: add location to memo payload 2024-09-25 21:48:54 +08:00
Steven 92c41458a9 chore: fix release action 2024-09-25 20:03:27 +08:00
Steven a55afbd3ed chore: tweak build actions 2024-09-25 19:57:14 +08:00
boojack 9c4d25cc4d chore: update README.md 2024-09-25 19:47:12 +08:00
Steven 8b444be6ca chore: update tag search 2024-09-23 21:41:23 +08:00
Steven 171a89564e chore: tweak gen apidocs 2024-09-23 08:43:16 +08:00
RoccoSmit 6cbe957db2 fix: show future relative dates (#3946)
Show future relative dates
2024-09-22 22:24:46 +08:00
auphone 0711ac4ecb feat: allow mobile user zooming in image preview (#3880)
* Set viewport scalable in image preview dialog for mobile zooming and reset it on destroy

* Format with prettier

* move setViewportScalable() into useEffect

* use const instead of function
2024-09-22 21:48:01 +08:00
Steven ea881338a9 chore: add gradient block to compact mode 2024-09-22 21:15:46 +08:00
johnnyjoy 7817947f66 fix: clean duplicated requests 2024-09-22 19:51:55 +08:00
johnnyjoy 1f7a90cec4 chore: add spinner to paged memo list 2024-09-22 19:41:27 +08:00
johnnyjoy 339c38750f refactor: paged memo list container 2024-09-22 19:30:39 +08:00
johnnyjoy 41976cb894 feat: update memo endpoints 2024-09-22 15:43:46 +08:00
johnnyjoy c28516b35f chore: buf generate 2024-09-22 13:57:47 +08:00
Steven ca213437e9 feat: implement nesting lists 2024-09-21 20:02:47 +08:00
johnnyjoy 7a4d54bb3c chore: update error messages 2024-09-21 18:23:30 +08:00
johnnyjoy f102aeb9b9 chore: tweak golangci version 2024-09-21 18:10:05 +08:00
johnnyjoy a6de047b64 chore: fix actions 2024-09-21 17:54:51 +08:00
johnnyjoy 9130d981fa chore: fix actions 2024-09-21 17:37:57 +08:00
johnnyjoy b915eaa620 chore: bump dependencies 2024-09-21 17:36:53 +08:00
Johnny a81d7b3260 chore: revert "perf: reduce image size by 21.3MB" (#3942)
Revert "perf: reduce image size by 21.3MB (#3849)"

This reverts commit 0156c7e11f.
2024-09-21 17:33:01 +08:00
johnnyjoy 8cdc956e59 chore: update ts proto 2024-09-21 17:25:57 +08:00
John Regan 46830e31ec buf: specify version of stephenh-ts-proto plugin (#3941) 2024-09-21 07:36:37 +08:00
Sriniwas 2db67118fc fix: case insensetive memo search for postgres (#3938)
fix:case insensetive memo search for postgres #3892
2024-09-19 23:14:51 +08:00
thehijacker f6ebfdf7f9 feat: update Slovenian translation (#3935)
Updated Slovenian translation

Co-authored-by: Andrej Kralj <andrej.kralj@t-2.com>
2024-09-18 16:52:43 +08:00
Steven ec2b59bff5 chore: bump gomark 2024-09-17 20:41:13 +08:00
Steven d663313ca2 chore: fix frontend linter 2024-09-17 19:09:05 +08:00
Steven fbe0251eed feat: impl list renderer 2024-09-17 19:03:10 +08:00
johnnyjoy 759f7c6171 chore: fix workspace setting tests 2024-09-14 08:27:37 +08:00
johnnyjoy 1da0752922 chore: add schema version to workspace setting 2024-09-14 08:23:39 +08:00
Zisu Zhang b787d1c7b6 feat: support disable change username and nickname (#3911)
* feat: support disable change username and nickname

* chore: update UX
2024-09-12 13:45:04 +08:00
ti777777 6f3d5762ca fix: iframe rendering (#3916)
* fix iframe rendering

* fix eslint check
2024-09-12 08:54:33 +08:00
RoccoSmit 42bc769d5d fix: load server name and icon from settings (#3908) 2024-09-10 23:02:48 +08:00
Steven 4790e84b98 chore: use ratio instead of max width 2024-09-09 21:43:47 +08:00
Steven 76a9a343a5 chore: fix linter 2024-09-09 20:36:35 +08:00
RoccoSmit f695e93f20 fix: update first day logic for months starting on Sunday (#3896)
* Update calendar logic to accomodate for months starting on Sunday

* Apply suggestions from code review

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2024-09-09 09:19:12 +08:00
RoccoSmit 05d5fb4b04 chore: use translations for calendar days (#3895)
Use translations for calendar days
2024-09-08 20:24:59 +08:00
Haohan Yang 044d46c36d chore: replace unmatchedEmailAndPasswordError with unmatchedUsernameAndPasswordError` (#3889)
replace unmatchedEmailAndPasswordError with unmatchedUsernameAndPasswordError
2024-09-07 23:17:20 +08:00
Steven 88db037204 chore: fix linter warnings 2024-09-04 23:31:28 +08:00
Steven 4209575244 chore: tweak folder naming style 2024-09-04 23:29:18 +08:00
onee-only b664653306 test: add test for searching memos by tags (#3876) 2024-09-04 12:14:17 +08:00
Leo 95939ebcf1 fix: v0.22.5: start fail caused by incorrect migration file naming (#3873)
fix incorrect naming of migration file
2024-09-04 06:28:55 +08:00
Steven 9612c302c4 chore: bump version to v0.22.5 2024-09-03 22:17:46 +08:00
Steven 773ab96bd0 chore: update thumbnail generator 2024-09-03 22:09:02 +08:00
johnnyjoy 09586d032c chore: fix user checks 2024-09-03 20:48:23 +08:00
Steven fe01d68d2a fix: user role checks 2024-09-03 08:07:31 +08:00
johnnyjoy 5bbf57ece4 chore: update comments of find memo 2024-09-02 21:27:55 +08:00
johnnyjoy c5ef5b9040 chore: update readme 2024-09-02 21:25:42 +08:00
Johnny 971128af05 revert: chore: bump mermaid from 10.9.1 to 11.0.2 in /web (#3870)
Revert "chore: bump mermaid from 10.9.1 to 11.0.2 in /web (#3862)"

This reverts commit d13bb7648b.
2024-09-02 21:10:54 +08:00
johnnyjoy 40d59fc47a chore: fix user role checks 2024-09-02 21:04:25 +08:00
johnnyjoy 7a9f61967d feat: allow admin users to update other memos 2024-09-02 20:59:22 +08:00
johnnyjoy 8c6682bd77 chore: regenerate apidocs 2024-09-02 20:50:59 +08:00
dependabot[bot] d13bb7648b chore: bump mermaid from 10.9.1 to 11.0.2 in /web (#3862)
Bumps [mermaid](https://github.com/mermaid-js/mermaid) from 10.9.1 to 11.0.2.
- [Release notes](https://github.com/mermaid-js/mermaid/releases)
- [Changelog](https://github.com/mermaid-js/mermaid/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/mermaid-js/mermaid/compare/v10.9.1...mermaid@11.0.2)

---
updated-dependencies:
- dependency-name: mermaid
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 20:46:36 +08:00
dependabot[bot] 0b1ca218ce chore: bump lucide-react from 0.419.0 to 0.437.0 in /web (#3860)
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.419.0 to 0.437.0.
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.437.0/packages/lucide-react)

---
updated-dependencies:
- dependency-name: lucide-react
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 13:07:54 +08:00
dependabot[bot] 7bce4f5d7b chore: bump @types/react from 18.3.4 to 18.3.5 in /web (#3859)
Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.3.4 to 18.3.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 13:07:45 +08:00
dependabot[bot] c018af6249 chore: bump @types/node from 22.5.0 to 22.5.2 in /web (#3858)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.5.0 to 22.5.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 13:07:34 +08:00
dependabot[bot] 45d45d0936 chore: bump @bufbuild/buf from 1.38.0 to 1.39.0 in /web (#3861)
Bumps [@bufbuild/buf](https://github.com/bufbuild/buf) from 1.38.0 to 1.39.0.
- [Release notes](https://github.com/bufbuild/buf/releases)
- [Changelog](https://github.com/bufbuild/buf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bufbuild/buf/compare/v1.38.0...v1.39.0)

---
updated-dependencies:
- dependency-name: "@bufbuild/buf"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 13:07:18 +08:00
dependabot[bot] 04fad85afe chore: bump github.com/grpc-ecosystem/grpc-gateway/v2 from 2.21.0 to 2.22.0 (#3863)
chore: bump github.com/grpc-ecosystem/grpc-gateway/v2

Bumps [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway) from 2.21.0 to 2.22.0.
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.21.0...v2.22.0)

---
updated-dependencies:
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 13:06:52 +08:00
dependabot[bot] a654b12670 chore: bump golang.org/x/mod from 0.19.0 to 0.20.0 (#3864)
Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.19.0 to 0.20.0.
- [Commits](https://github.com/golang/mod/compare/v0.19.0...v0.20.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 13:03:01 +08:00
dependabot[bot] 2fac11936b chore: bump golang.org/x/oauth2 from 0.21.0 to 0.22.0 (#3866)
Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.21.0 to 0.22.0.
- [Commits](https://github.com/golang/oauth2/compare/v0.21.0...v0.22.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 13:02:53 +08:00
dependabot[bot] acc6c29d01 chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager from 1.17.9 to 1.17.16 (#3867)
chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager

Bumps [github.com/aws/aws-sdk-go-v2/feature/s3/manager](https://github.com/aws/aws-sdk-go-v2) from 1.17.9 to 1.17.16.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.17.9...credentials/v1.17.16)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/feature/s3/manager
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 09:20:36 +08:00
Steven be25fbe185 chore: tweak readme 2024-09-02 09:20:14 +08:00
Steven 4322bfa506 chore: tweak seed data 2024-09-01 22:51:02 +08:00
Steven fa2b01cfb1 chore: tweak latest schema file name 2024-09-01 22:11:15 +08:00
aqyuki 35b0bd82f4 chore: migrate of Docker compose v2 (#3857)
chore: rename docker-compose.yaml and remove deprecated field
2024-09-01 22:08:57 +08:00
RoccoSmit bfe57b9202 chore: set max thumbnail width to home/explore image max width (#3852)
* Set max thumbnail width to timeline img max width

* Prevent images less than thumbnail size from being scaled up

* Apply suggestions from code review

---------

Co-authored-by: boojack <24653555+boojack@users.noreply.github.com>
2024-08-31 03:37:07 +08:00
aqyuki 0156c7e11f perf: reduce image size by 21.3MB (#3849)
- Change base image to distroless (static-debian12)
- Remove unnecessary RUN instructions
- Add build options
  - add options to delete debug information
  - add options to remobe embedded paths
2024-08-30 19:36:34 +08:00
Steven 960af444fa chore: fix linter 2024-08-30 08:25:06 +08:00
Steven 20570fc771 refactor: resource thumbnail 2024-08-30 08:09:07 +08:00
RoccoSmit 9b1adfbbe9 feat: reintroducing thumbnails (#3821)
* Reintroducing thumbnails

* Aligned with linting rules

* making recomended code review change
- changed method names to start with lower case as they are not used outside of their package
- made receiver types for struct funcs to be pointers to not need to create copies

Trying to cover all linting issues
- converted slog warning to use attributes when logging warnings
- seperated imports to have package files in their own section

* Update go.mod

---------

Co-authored-by: boojack <24653555+boojack@users.noreply.github.com>
2024-08-29 21:01:57 +08:00
Steven 615aa94793 fix: base path of migrator 2024-08-29 20:40:50 +08:00
Steven 710961d336 chore: fix text color in dark mode 2024-08-29 20:39:24 +08:00
Steven bb86482b71 chore: tweak setting name 2024-08-29 08:28:11 +08:00
Steven f0abd792c7 chore: update auth service 2024-08-29 00:06:15 +08:00
Steven 1167df29d8 feat: add security related settings 2024-08-28 23:46:06 +08:00
Steven 4e5810e205 chore: update workspace setting section 2024-08-28 23:29:30 +08:00
Steven a8ea28066e chore: retire export memos 2024-08-28 23:20:32 +08:00
Steven 9bea6e1eea chore: go mod tidy 2024-08-28 22:56:17 +08:00
Michel Heusschen 2dbf92f7f1 perf: reduce bundle size by 21% with direct icon imports (#3844) 2024-08-28 22:55:28 +08:00
Steven d11bd30ec6 chore: tweak logger 2024-08-28 22:53:57 +08:00
Steven de980fb7d7 chore: update setting display name 2024-08-28 22:44:13 +08:00
Steven cce92f513c chore: tweak readme 2024-08-27 23:44:03 +08:00
Steven 7134ad4883 chore: fix migration history 2024-08-27 09:20:23 +08:00
Steven fbdfaf85d9 chore: update migrator 2024-08-26 22:50:46 +08:00
Steven ccd3fdcd38 chore: fix tests 2024-08-26 08:59:35 +08:00
Steven 70837f88cb chore: fix linter 2024-08-26 08:47:29 +08:00
Steven 525223c261 chore: add tests for migrator 2024-08-26 08:41:26 +08:00
Steven 96b9269cd3 chore: fix golangci linter 2024-08-24 22:38:22 +08:00
Steven 80f9b5b861 chore: fix golangci linter 2024-08-24 22:30:41 +08:00
Steven fb23f43431 chore: update golangci config 2024-08-24 20:39:46 +08:00
RoccoSmit eca9649be3 fix: cancel removes memo cache (#3826)
Clear local storage record of memo changes if chanes to a memo are cancelled
2024-08-24 06:48:16 +08:00
Steven 5f35ac5ca0 chore: update frontend dependencies 2024-08-22 23:38:11 +08:00
Steven b376a20fb4 chore: tweak linter warnings 2024-08-20 08:25:34 +08:00
Steven 2999f472dd chore: fix typo 2024-08-20 08:17:27 +08:00
Steven 45ddd05c42 chore: tweak linter warning 2024-08-20 08:13:52 +08:00
Steven d1280bc04f chore: implement memo property runner 2024-08-20 08:07:48 +08:00
Steven f4d6675363 chore: add enable memo comment setting 2024-08-19 09:13:44 +08:00
Steven 3c5aa41a78 feat: implement week start day setting 2024-08-18 23:18:45 +08:00
Steven 06c460b476 chore: tweak linter warning 2024-08-16 08:15:59 +08:00
Steven 07012e3f60 chore: remove unused files 2024-08-16 08:14:02 +08:00
Steven 1b6685d7cf chore: tweak linter warning 2024-08-16 08:12:09 +08:00
Steven 710d1b304e chore: update dev mode 2024-08-16 08:08:26 +08:00
Steven 6e901fc940 refactor: store migrator 2024-08-16 08:07:30 +08:00
Steven 1ae3afc0ba chore: tweak memo relation popover 2024-08-14 23:15:04 +08:00
Jakub Wołynko 18db78172c feat: add translation for collapse/expand button and update polish locale (#3811)
add: collapse, expand, polish locale
2024-08-14 18:02:02 +08:00
Steven aae3e8ae64 chore: update memo property checks 2024-08-13 23:29:40 +08:00
Steven 506d2ed8ca chore: tweak menu style 2024-08-13 23:28:02 +08:00
Steven c3f381c8c5 chore: add instance url to profile 2024-08-13 22:16:43 +08:00
Steven 9a27fdf855 chore: tweak load more button 2024-08-12 23:52:23 +08:00
Steven fc2cd43dc2 chore: tweak util tests 2024-08-12 23:44:04 +08:00
Mykal Machon c0826c43b0 fix: explicitly disabling autocapitalize and spellcheck (#3797)
fix #3747: removing autocapitalize and spellcheck
2024-08-12 12:24:37 +08:00
Steven 724db203f7 chore: tweak seed data 2024-08-08 23:45:26 +08:00
Steven 04b4fa1d02 chore: tweak icon button container 2024-08-07 22:56:47 +08:00
Steven 61b8cee31d chore: retire preview markdown dialog 2024-08-07 22:48:16 +08:00
Steven 4ad6028681 refactor: use popover instead of dialog for memo relations 2024-08-07 22:44:39 +08:00
tiltshiftfocus a5978e7657 fix: tag query for mysql (#3785) 2024-08-06 13:56:44 +08:00
Steven 158745704e feat: add memo display setting menu 2024-08-03 01:22:40 +08:00
dependabot[bot] 01819610c7 chore: bump modernc.org/sqlite from 1.30.2 to 1.31.1 (#3769)
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.30.2 to 1.31.1.
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.30.2...v1.31.1)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-02 08:14:15 +08:00
dependabot[bot] bc5e0b5daf chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager from 1.17.8 to 1.17.9 (#3770)
chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager

Bumps [github.com/aws/aws-sdk-go-v2/feature/s3/manager](https://github.com/aws/aws-sdk-go-v2) from 1.17.8 to 1.17.9.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.17.8...config/v1.17.9)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/feature/s3/manager
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-02 08:14:05 +08:00
dependabot[bot] 4924af5235 chore: bump github.com/grpc-ecosystem/grpc-gateway/v2 from 2.20.0 to 2.21.0 (#3771)
chore: bump github.com/grpc-ecosystem/grpc-gateway/v2

Bumps [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway) from 2.20.0 to 2.21.0.
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.20.0...v2.21.0)

---
updated-dependencies:
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-02 08:13:55 +08:00
dependabot[bot] 12a9165852 chore: bump react-router-dom from 6.25.1 to 6.26.0 in /web (#3772)
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.25.1 to 6.26.0.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.26.0/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-02 08:13:44 +08:00
dependabot[bot] 1fcb867e0f chore: bump react-i18next from 14.1.3 to 15.0.0 in /web (#3774)
Bumps [react-i18next](https://github.com/i18next/react-i18next) from 14.1.3 to 15.0.0.
- [Changelog](https://github.com/i18next/react-i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/react-i18next/compare/v14.1.3...v15.0.0)

---
updated-dependencies:
- dependency-name: react-i18next
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-02 08:13:35 +08:00
dependabot[bot] 222e9dfe58 chore: bump @types/node from 20.14.13 to 22.0.2 in /web (#3775)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.14.13 to 22.0.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-02 08:13:26 +08:00
dependabot[bot] 55a2e791aa chore: bump lucide-react from 0.399.0 to 0.419.0 in /web (#3773)
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.399.0 to 0.419.0.
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.419.0/packages/lucide-react)

---
updated-dependencies:
- dependency-name: lucide-react
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-02 08:01:36 +08:00
Steven 21f18f7c56 chore: tweak activity service definition 2024-08-01 23:40:16 +08:00
Steven cc91b1e512 chore: buf generate 2024-08-01 22:03:07 +08:00
Steven 26fa172641 chore(frontend): add order by time asc 2024-07-31 23:51:20 +08:00
Steven 6184375cbb chore: upgrade frontend dependencies 2024-07-31 23:51:00 +08:00
Steven 07667257d5 feat: support order by time asc 2024-07-31 23:34:00 +08:00
Steven ea70dd85bf chore: remove color in manifest 2024-07-31 23:09:13 +08:00
Steven 14194504ee chore: remove unused classnames 2024-07-29 23:12:27 +08:00
Steven 444ccc03ed chore: tweak default title 2024-07-29 23:09:46 +08:00
Noah Alderton 117077ac8f fix: dead link in README.md (#3750) 2024-07-28 17:41:47 +08:00
Steven 342b6ad696 chore: tweak seed data 2024-07-27 22:12:43 -04:00
Steven a948555166 fix: release action 2024-07-27 21:21:09 -04:00
Steven 4870433289 chore: tweak release action 2024-07-27 21:07:15 -04:00
Steven a1083e648f chore: fix resource display time 2024-07-27 20:54:42 -04:00
Steven 4b415e519e chore: tweak demo data 2024-07-28 00:24:16 +08:00
Steven 7564c40c8d chore: fix env init 2024-07-27 23:08:22 +08:00
Steven 8fd5365ac1 chore: tweak linter error 2024-07-27 22:19:53 +08:00
Steven a50f3b9382 chore: fix memos sorting 2024-07-27 22:15:47 +08:00
Steven 5ad00c3a50 chore: fix env binding 2024-07-27 21:57:13 +08:00
Steven 8bf7cdfd31 feat: add password auth flag 2024-07-27 19:24:37 +08:00
Steven b9006f8ce0 chore: tweak date utils 2024-07-27 17:21:22 +08:00
Steven 3d63d9d5fb chore: fix activity stats 2024-07-27 10:11:41 +08:00
Steven 139090fb8f chore: fix calendar timestamps 2024-07-27 09:47:12 +08:00
Steven bdc257d837 chore: tweak release actions 2024-07-26 23:30:16 +08:00
Andrew Williams c9c40bc876 chore: build release containers from tags rather than branches (#3739)
Fixes #3645, currently the release containers are build from the release branches, which are created in preparation for a release. This causes some users with automated CI/CD to either deploy a pre-release version or be notified of a release version before it has actually been released. 

This change switches the workflow to be triggered by tags, which are created on the release version.
2024-07-26 10:36:34 +08:00
Steven edc3b578d6 feat: implement search multi tags 2024-07-26 08:40:40 +08:00
Steven c6a09d9353 chore: update memo filter styles 2024-07-26 08:30:59 +08:00
Steven cd38ec93ed feat: implement memo filters 2024-07-26 00:46:48 +08:00
Steven b3b4aa9ddb chore: remove unused code 2024-07-24 23:53:07 +08:00
Steven c5900b355e chore: tweak signup checks 2024-07-24 23:38:51 +08:00
Steven 553e8d09dd chore: update public default value to false 2024-07-24 23:34:19 +08:00
Steven 22ec0cf2e3 chore: bump version 2024-07-23 22:11:53 +08:00
Steven 44e56844f5 chore: tweak search resources 2024-07-22 15:33:02 +08:00
dependabot[bot] 95fa145665 chore: bump @types/node from 20.14.9 to 20.14.11 in /web (#3726)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.14.9 to 20.14.11.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-22 15:32:35 +08:00
dependabot[bot] 84e2d40481 chore: bump @typescript-eslint/parser from 7.16.0 to 7.16.1 in /web (#3727)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 7.16.0 to 7.16.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.16.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-22 10:05:36 +08:00
dependabot[bot] 582c360787 chore: bump dayjs from 1.11.11 to 1.11.12 in /web (#3728)
Bumps [dayjs](https://github.com/iamkun/dayjs) from 1.11.11 to 1.11.12.
- [Release notes](https://github.com/iamkun/dayjs/releases)
- [Changelog](https://github.com/iamkun/dayjs/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/iamkun/dayjs/compare/v1.11.11...v1.11.12)

---
updated-dependencies:
- dependency-name: dayjs
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-22 10:05:26 +08:00
dependabot[bot] 756470099f chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager from 1.17.7 to 1.17.8 (#3729)
chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager

Bumps [github.com/aws/aws-sdk-go-v2/feature/s3/manager](https://github.com/aws/aws-sdk-go-v2) from 1.17.7 to 1.17.8.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/v1.17.8/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.17.7...v1.17.8)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/feature/s3/manager
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-22 10:05:15 +08:00
dependabot[bot] 0a6d7387d1 chore: bump vite from 5.3.1 to 5.3.4 in /web (#3730)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.3.1 to 5.3.4.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.3.4/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-22 10:05:01 +08:00
dependabot[bot] 511178389b chore: bump eslint-plugin-prettier from 5.1.3 to 5.2.1 in /web (#3731)
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 5.1.3 to 5.2.1.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v5.1.3...v5.2.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-22 10:04:49 +08:00
dependabot[bot] e5c214ba5c chore: bump github.com/aws/aws-sdk-go-v2/config from 1.27.26 to 1.27.27 (#3732)
Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.27.26 to 1.27.27.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.27.26...config/v1.27.27)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/config
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-22 10:04:23 +08:00
dependabot[bot] 7e7786077f chore: bump google.golang.org/grpc from 1.64.0 to 1.65.0 (#3733)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.64.0 to 1.65.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.64.0...v1.65.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-22 10:04:11 +08:00
dependabot[bot] 5f58bb368b chore: bump github.com/aws/aws-sdk-go-v2/credentials from 1.17.26 to 1.17.27 (#3734)
chore: bump github.com/aws/aws-sdk-go-v2/credentials

Bumps [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2) from 1.17.26 to 1.17.27.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/credentials/v1.17.26...credentials/v1.17.27)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/credentials
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-22 09:57:59 +08:00
Steven c313596144 feat: update memo editor 2024-07-22 09:57:40 +08:00
Johnny d2727e6825 chore: update dependabot schedule interval (#3725) 2024-07-21 20:49:42 +08:00
Steven 10c9bb081b chore: retire timeline page 2024-07-20 00:28:49 +08:00
Steven 17ecfb5cf5 fix: acl config 2024-07-19 20:54:51 +08:00
Steven c4a24bead6 chore(frontend): tweak memo relations 2024-07-19 20:52:52 +08:00
andrigamerita d264f45979 fix: code blocks of unknown languages cause HTML injection (#3711)
* fix: code blocks of unknown languages cause HTML injection

A code block of unknown language (that is, a language not treated as special by Memos and not handled by highlight.js) should fall back on rendering its plaintext content. However, the content is never properly escaped before it is appended to the DOM, and thus any string that happens to contain HTML is unsafely rendered. This commit fixes the issue by ensuring that, when none of the previous cases handle the text, any HTML entities are escaped first.

* Update CodeBlock.tsx to conform to eslint
2024-07-19 08:32:58 +08:00
andrigamerita af952807c7 feat: write memo UID in file names when exporting to Markdown (#3712)
When using the "export to Markdown" feature in Memos, the files included in the ZIP folder don't feature any kind of reference to their alphanumeric UID from the server's database, which completely breaks the point of links inside the files made with the `[[memos/<uid>]]` format, since it's impossible to know which Markdown file this kind of string inside other files refers to.

This pull request modifies the ExportMemos server function, to add the UID of every memo immediately after the date in the filename. For example, an exported memo would now be called: `YYYY-MM-DDThh:mm:ss+hh:mm-AbcDefGhiJklMnoPqrStu1-PUBLIC.md`.
2024-07-19 07:14:31 +08:00
Steven fefe2b0655 chore: fix build artifacts action 2024-07-17 23:16:09 +08:00
Steven 5704aaad08 chore: tweak embeded memo style 2024-07-17 22:48:22 +08:00
Steven ef7e2151dc chore: update memo relation list 2024-07-17 21:40:43 +08:00
Steven e2fd79200e feat: implement inline memo editor 2024-07-17 21:07:36 +08:00
Steven 956f21838d chore: fix popover z-index 2024-07-17 20:28:31 +08:00
Steven 878fea5f13 chore: use popover for update tag view setting 2024-07-17 08:46:52 +08:00
Steven 5a26b76511 chore: add memo content snippet 2024-07-17 08:18:37 +08:00
dependabot[bot] 0053977b14 chore: bump github.com/aws/aws-sdk-go-v2/config from 1.27.24 to 1.27.26 (#3691)
Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.27.24 to 1.27.26.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.27.24...config/v1.27.26)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/config
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-16 22:26:20 +08:00
dependabot[bot] e5c7571eb5 chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager from 1.17.4 to 1.17.7 (#3690)
chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager

Bumps [github.com/aws/aws-sdk-go-v2/feature/s3/manager](https://github.com/aws/aws-sdk-go-v2) from 1.17.4 to 1.17.7.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/v1.17.7/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.17.4...v1.17.7)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/feature/s3/manager
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-16 22:26:06 +08:00
dependabot[bot] daca7193b5 chore: bump github.com/aws/aws-sdk-go-v2/credentials from 1.17.24 to 1.17.26 (#3693)
chore: bump github.com/aws/aws-sdk-go-v2/credentials

Bumps [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2) from 1.17.24 to 1.17.26.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/credentials/v1.17.24...credentials/v1.17.26)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/credentials
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-16 22:24:48 +08:00
dependabot[bot] ca1d3b6eb1 chore: bump modernc.org/sqlite from 1.30.1 to 1.30.2 (#3692)
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.30.1 to 1.30.2.
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.30.1...v1.30.2)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-16 22:24:34 +08:00
dependabot[bot] fcdca5b270 chore: bump github.com/aws/aws-sdk-go-v2 from 1.30.1 to 1.30.3 (#3694)
Bumps [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) from 1.30.1 to 1.30.3.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.30.1...v1.30.3)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-16 22:23:46 +08:00
dependabot[bot] 07f79b9f7a chore: bump @mui/joy from 5.0.0-beta.36 to 5.0.0-beta.48 in /web (#3695)
Bumps [@mui/joy](https://github.com/mui/material-ui/tree/HEAD/packages/mui-joy) from 5.0.0-beta.36 to 5.0.0-beta.48.
- [Release notes](https://github.com/mui/material-ui/releases)
- [Changelog](https://github.com/mui/material-ui/blob/next/CHANGELOG.md)
- [Commits](https://github.com/mui/material-ui/commits/HEAD/packages/mui-joy)

---
updated-dependencies:
- dependency-name: "@mui/joy"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-16 22:23:26 +08:00
dependabot[bot] 41d9d3bc21 chore: bump prettier from 3.3.2 to 3.3.3 in /web (#3696)
Bumps [prettier](https://github.com/prettier/prettier) from 3.3.2 to 3.3.3.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.3.2...3.3.3)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-16 22:23:01 +08:00
dependabot[bot] fae951ae2b chore: bump @typescript-eslint/eslint-plugin from 7.15.0 to 7.16.0 in /web (#3697)
chore: bump @typescript-eslint/eslint-plugin in /web

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.15.0 to 7.16.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.16.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-16 22:22:44 +08:00
Steven 446e38f15b fix: memo content snippet 2024-07-16 22:19:48 +08:00
dependabot[bot] 7c9f967a07 chore: bump dompurify from 3.1.5 to 3.1.6 in /web (#3698)
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.1.5 to 3.1.6.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.1.5...3.1.6)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-16 09:43:40 +08:00
dependabot[bot] a5d36655e9 chore: bump tailwindcss from 3.4.4 to 3.4.5 in /web (#3699)
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.4.4 to 3.4.5.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/v3.4.5/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.4.4...v3.4.5)

---
updated-dependencies:
- dependency-name: tailwindcss
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-16 09:43:29 +08:00
Steven f2cfc528a6 chore: introduce tag view option 2024-07-15 22:55:59 +08:00
Steven 260a4f89fc chore: buf generate 2024-07-15 22:32:59 +08:00
Johnny 9909fd8a6f feat: add snippet field to memo message (#3689) 2024-07-15 08:08:08 +08:00
Johnny bcb8843245 chore: implement stringify markdown nodes endpoint (#3688) 2024-07-14 20:46:57 +08:00
Johnny 7c9e54afbd chore: update disallow public visibility setting name (#3687) 2024-07-14 20:23:19 +08:00
Steven 6825c1def4 fix: delete access token when sign out 2024-07-13 11:18:29 +08:00
Steven f374169a2b feat: implement html element renderer 2024-07-13 11:06:51 +08:00
Johnny 4ff3b89a8e chore: update i18n from Weblate (#3680)
* Added translation using Weblate (Catalan)

* Translated using Weblate (Catalan)

Currently translated at 25.0% (65 of 260 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/ca/

* Translated using Weblate (French)

Currently translated at 100.0% (260 of 260 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/fr/

---------

Co-authored-by: Carles Mateu <carlesm@carlesm.com>
Co-authored-by: Ezmana <ezmana.land@gmail.com>
2024-07-12 22:22:59 +08:00
Johnny 5a196e2f1a feat: update gomark version (#3679) 2024-07-12 22:17:03 +08:00
Steven 9449886d60 chore: fix linter 2024-07-12 08:36:55 +08:00
Steven 457cf92cc1 feat(api): implement get resource by uid 2024-07-11 23:43:44 +08:00
Steven 1ab2c89408 feat(api): implement get memo by uid 2024-07-11 23:31:50 +08:00
dependabot[bot] 34e938a1e3 chore: bump typescript from 5.5.2 to 5.5.3 in /web (#3664)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.5.2 to 5.5.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.5.2...v5.5.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-09 23:00:45 +08:00
dependabot[bot] b265445068 chore: bump golang.org/x/net from 0.26.0 to 0.27.0 (#3669)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.26.0 to 0.27.0.
- [Commits](https://github.com/golang/net/compare/v0.26.0...v0.27.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-09 22:59:52 +08:00
dependabot[bot] 37d13b5cbc chore: bump github.com/aws/aws-sdk-go-v2/config from 1.27.23 to 1.27.24 (#3667)
Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.27.23 to 1.27.24.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.27.23...config/v1.27.24)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/config
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-09 22:59:45 +08:00
dependabot[bot] fb4fdb326a chore: bump golang.org/x/crypto from 0.24.0 to 0.25.0 (#3668)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.24.0 to 0.25.0.
- [Commits](https://github.com/golang/crypto/compare/v0.24.0...v0.25.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-09 22:59:26 +08:00
dependabot[bot] 5623a0f065 chore: bump @typescript-eslint/parser from 7.14.1 to 7.16.0 in /web (#3672)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 7.14.1 to 7.16.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.16.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-09 22:59:12 +08:00
dependabot[bot] b220f14bec chore: bump katex from 0.16.10 to 0.16.11 in /web (#3663)
Bumps [katex](https://github.com/KaTeX/KaTeX) from 0.16.10 to 0.16.11.
- [Release notes](https://github.com/KaTeX/KaTeX/releases)
- [Changelog](https://github.com/KaTeX/KaTeX/blob/main/CHANGELOG.md)
- [Commits](https://github.com/KaTeX/KaTeX/compare/v0.16.10...v0.16.11)

---
updated-dependencies:
- dependency-name: katex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-09 22:59:03 +08:00
dependabot[bot] 3e4b33fb28 chore: bump highlight.js from 11.9.0 to 11.10.0 in /web (#3665)
Bumps [highlight.js](https://github.com/highlightjs/highlight.js) from 11.9.0 to 11.10.0.
- [Release notes](https://github.com/highlightjs/highlight.js/releases)
- [Changelog](https://github.com/highlightjs/highlight.js/blob/main/CHANGES.md)
- [Commits](https://github.com/highlightjs/highlight.js/compare/11.9.0...11.10.0)

---
updated-dependencies:
- dependency-name: highlight.js
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-09 18:13:36 +08:00
dependabot[bot] 08a43d0faa chore: bump @typescript-eslint/eslint-plugin from 7.14.1 to 7.15.0 in /web (#3666)
chore: bump @typescript-eslint/eslint-plugin in /web

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.14.1 to 7.15.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.15.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-09 18:13:24 +08:00
dependabot[bot] 36795abacc chore: bump golang.org/x/mod from 0.18.0 to 0.19.0 (#3670)
Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.18.0 to 0.19.0.
- [Commits](https://github.com/golang/mod/compare/v0.18.0...v0.19.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-09 18:12:49 +08:00
dependabot[bot] 9f7295a4ee chore: bump github.com/aws/aws-sdk-go-v2/credentials from 1.17.23 to 1.17.24 (#3671)
chore: bump github.com/aws/aws-sdk-go-v2/credentials

Bumps [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2) from 1.17.23 to 1.17.24.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/credentials/v1.17.23...credentials/v1.17.24)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/credentials
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-09 18:12:39 +08:00
Steven 626c972d9c chore: add properties to memo detail sidebar 2024-07-08 23:14:00 +08:00
Johnny 5e3ed201b4 fix: update mask of update memo (#3659) 2024-07-08 08:50:38 +08:00
Johnny eccddb1154 chore: add create time to memo detail sidebar (#3657) 2024-07-07 23:09:48 +08:00
dependabot[bot] a681b8e205 chore: bump github.com/aws/aws-sdk-go-v2/config from 1.27.21 to 1.27.23 (#3640)
Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.27.21 to 1.27.23.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.27.21...config/v1.27.23)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/config
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-06 16:48:24 +08:00
dependabot[bot] 881809926e chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager from 1.17.1 to 1.17.4 (#3649)
chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager

Bumps [github.com/aws/aws-sdk-go-v2/feature/s3/manager](https://github.com/aws/aws-sdk-go-v2) from 1.17.1 to 1.17.4.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/v1.17.4/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.17.1...v1.17.4)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/feature/s3/manager
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-06 16:48:15 +08:00
Johnny a98d16bcaa chore: update bug report template fields (#3656) 2024-07-06 14:16:44 +08:00
dependabot[bot] 46ca5bb8e7 chore: bump github.com/aws/aws-sdk-go-v2/credentials from 1.17.21 to 1.17.23 (#3637)
chore: bump github.com/aws/aws-sdk-go-v2/credentials

Bumps [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2) from 1.17.21 to 1.17.23.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/credentials/v1.17.21...credentials/v1.17.23)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/credentials
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-03 11:44:04 +08:00
dependabot[bot] b1f12d54a0 chore: bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.56.1 to 1.57.1 (#3644)
chore: bump github.com/aws/aws-sdk-go-v2/service/s3

Bumps [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2) from 1.56.1 to 1.57.1.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.56.1...service/s3/v1.57.1)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/s3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-02 23:15:39 +08:00
Johnny 4d2b953e23 chore: add enable link preview setting to memo related settings (#3647) 2024-07-02 22:00:38 +08:00
dependabot[bot] b57b6bae34 chore: bump postcss from 8.4.38 to 8.4.39 in /web (#3642)
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.38 to 8.4.39.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.38...8.4.39)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-02 08:25:51 +08:00
dependabot[bot] 90c67d5592 chore: bump @typescript-eslint/eslint-plugin from 7.13.1 to 7.14.1 in /web (#3641)
chore: bump @typescript-eslint/eslint-plugin in /web

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.13.1 to 7.14.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.14.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-02 08:25:38 +08:00
dependabot[bot] 4655c99c4e chore: bump @bufbuild/buf from 1.33.0 to 1.34.0 in /web (#3639)
Bumps [@bufbuild/buf](https://github.com/bufbuild/buf) from 1.33.0 to 1.34.0.
- [Release notes](https://github.com/bufbuild/buf/releases)
- [Changelog](https://github.com/bufbuild/buf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bufbuild/buf/compare/v1.33.0...v1.34.0)

---
updated-dependencies:
- dependency-name: "@bufbuild/buf"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-02 08:25:24 +08:00
dependabot[bot] 68e924e48c chore: bump @types/node from 20.14.2 to 20.14.9 in /web (#3638)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.14.2 to 20.14.9.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-02 08:25:13 +08:00
dependabot[bot] ee61bc7861 chore: bump react-router-dom from 6.23.1 to 6.24.0 in /web (#3636)
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.23.1 to 6.24.0.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.24.0/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-02 08:25:02 +08:00
Steven 3782d412f5 chore: upgrade gomark 2024-07-01 23:28:36 +08:00
dependabot[bot] de754079cc chore: bump zustand from 4.5.2 to 4.5.4 in /web (#3632)
Bumps [zustand](https://github.com/pmndrs/zustand) from 4.5.2 to 4.5.4.
- [Release notes](https://github.com/pmndrs/zustand/releases)
- [Commits](https://github.com/pmndrs/zustand/compare/v4.5.2...v4.5.4)

---
updated-dependencies:
- dependency-name: zustand
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 23:27:41 +08:00
dependabot[bot] df0dcb553b chore: bump typescript from 5.4.5 to 5.5.2 in /web (#3633)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.4.5 to 5.5.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.4.5...v5.5.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 23:27:33 +08:00
dependabot[bot] 584d73659e chore: bump @reduxjs/toolkit from 2.2.5 to 2.2.6 in /web (#3634)
Bumps [@reduxjs/toolkit](https://github.com/reduxjs/redux-toolkit) from 2.2.5 to 2.2.6.
- [Release notes](https://github.com/reduxjs/redux-toolkit/releases)
- [Commits](https://github.com/reduxjs/redux-toolkit/compare/v2.2.5...v2.2.6)

---
updated-dependencies:
- dependency-name: "@reduxjs/toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 23:27:22 +08:00
dependabot[bot] 122710801a chore: bump protobufjs from 7.3.0 to 7.3.2 in /web (#3631)
Bumps [protobufjs](https://github.com/protobufjs/protobuf.js) from 7.3.0 to 7.3.2.
- [Release notes](https://github.com/protobufjs/protobuf.js/releases)
- [Changelog](https://github.com/protobufjs/protobuf.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/protobufjs/protobuf.js/compare/protobufjs-v7.3.0...protobufjs-v7.3.2)

---
updated-dependencies:
- dependency-name: protobufjs
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 23:24:33 +08:00
Steven 1ad5d9bf0a chore: update confirm dialog 2024-07-01 23:22:39 +08:00
dependabot[bot] 4a3afffeef chore: bump lucide-react from 0.396.0 to 0.399.0 in /web (#3630)
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.396.0 to 0.399.0.
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.399.0/packages/lucide-react)

---
updated-dependencies:
- dependency-name: lucide-react
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 23:13:52 +08:00
Steven 291b815653 feat: implement memo detail sidebar 2024-07-01 23:06:10 +08:00
Steven 05c6edfe2f chore: tweak auth pages 2024-06-26 22:11:18 +08:00
dependabot[bot] 6325b3eef9 chore: bump @types/uuid from 9.0.8 to 10.0.0 in /web (#3616)
Bumps [@types/uuid](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/uuid) from 9.0.8 to 10.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/uuid)

---
updated-dependencies:
- dependency-name: "@types/uuid"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-26 08:11:39 +08:00
dependabot[bot] 80c57692e9 chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager from 1.16.24 to 1.17.1 (#3617)
chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager

Bumps [github.com/aws/aws-sdk-go-v2/feature/s3/manager](https://github.com/aws/aws-sdk-go-v2) from 1.16.24 to 1.17.1.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/v1.17.1/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/ram/v1.16.24...v1.17.1)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/feature/s3/manager
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-26 08:11:29 +08:00
dependabot[bot] 5828632613 chore: bump @typescript-eslint/parser from 7.13.0 to 7.14.1 in /web (#3620)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 7.13.0 to 7.14.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.14.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-26 08:11:18 +08:00
Roman Lomonosov b923988fd6 fix: can't change memo UID (#3621) 2024-06-26 07:18:00 +08:00
dependabot[bot] 9b090d909e chore: bump github.com/aws/aws-sdk-go-v2/config from 1.27.18 to 1.27.21 (#3612)
Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.27.18 to 1.27.21.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.27.18...config/v1.27.21)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/config
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-25 22:31:27 +08:00
dependabot[bot] 6abc272709 chore: bump lucide-react from 0.395.0 to 0.396.0 in /web (#3614)
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.395.0 to 0.396.0.
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.396.0/packages/lucide-react)

---
updated-dependencies:
- dependency-name: lucide-react
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-25 22:31:12 +08:00
dependabot[bot] 3752e7b638 chore: bump eslint-plugin-react from 7.34.2 to 7.34.3 in /web (#3618)
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.34.2 to 7.34.3.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.34.2...v7.34.3)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-25 22:30:56 +08:00
dependabot[bot] 9ba2adb4c4 chore: bump @typescript-eslint/eslint-plugin from 7.13.0 to 7.13.1 in /web (#3619)
chore: bump @typescript-eslint/eslint-plugin in /web

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.13.0 to 7.13.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.13.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-25 22:30:39 +08:00
Zeng1998 4f4fe9b26b fix: add charset=utf-8 for text content resources (#3608)
Co-authored-by: = <=>
2024-06-24 23:01:19 +08:00
Johnny ca463891f2 chore: fix linter warning for slog (#3604) 2024-06-22 16:39:40 +08:00
Mudkip e33244e64b fix: PATCH requests on /api/v1 not working (#3600)
* fix: PATCH requests on /api/v1

* Update server/server.go

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2024-06-21 18:16:55 +08:00
steven 33cd3ed8e3 chore: bump version 2024-06-21 18:16:35 +08:00
Ryo a09c669865 fix: allow cors for grpc gateway handler (#3574) 2024-06-21 18:13:59 +08:00
dependabot[bot] 759337996f chore: bump lucide-react from 0.383.0 to 0.395.0 in /web (#3584)
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.383.0 to 0.395.0.
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.395.0/packages/lucide-react)

---
updated-dependencies:
- dependency-name: lucide-react
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-19 22:11:05 +08:00
dependabot[bot] cee1d4b1ed chore: bump @typescript-eslint/eslint-plugin from 7.12.0 to 7.13.0 in /web (#3585)
chore: bump @typescript-eslint/eslint-plugin in /web

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.12.0 to 7.13.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.13.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-19 22:10:51 +08:00
dependabot[bot] 77b92f675a chore: bump @bufbuild/buf from 1.32.2 to 1.33.0 in /web (#3586)
Bumps [@bufbuild/buf](https://github.com/bufbuild/buf) from 1.32.2 to 1.33.0.
- [Release notes](https://github.com/bufbuild/buf/releases)
- [Changelog](https://github.com/bufbuild/buf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bufbuild/buf/compare/v1.32.2...v1.33.0)

---
updated-dependencies:
- dependency-name: "@bufbuild/buf"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-19 22:10:38 +08:00
dependabot[bot] 795700b161 chore: bump vite from 5.2.13 to 5.3.1 in /web (#3587)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.2.13 to 5.3.1.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.3.1/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-19 22:10:28 +08:00
dependabot[bot] 513ff9d2b0 chore: bump prettier from 3.3.1 to 3.3.2 in /web (#3588)
Bumps [prettier](https://github.com/prettier/prettier) from 3.3.1 to 3.3.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.3.1...3.3.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-19 22:10:10 +08:00
dependabot[bot] 84692404e1 chore: bump golang.org/x/oauth2 from 0.20.0 to 0.21.0 (#3583)
Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.20.0 to 0.21.0.
- [Commits](https://github.com/golang/oauth2/compare/v0.20.0...v0.21.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-19 22:09:34 +08:00
dependabot[bot] d5d0d14728 chore: bump github.com/gorilla/feeds from 1.1.2 to 1.2.0 (#3582)
Bumps [github.com/gorilla/feeds](https://github.com/gorilla/feeds) from 1.1.2 to 1.2.0.
- [Release notes](https://github.com/gorilla/feeds/releases)
- [Commits](https://github.com/gorilla/feeds/compare/v1.1.2...v1.2.0)

---
updated-dependencies:
- dependency-name: github.com/gorilla/feeds
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-19 22:09:02 +08:00
dependabot[bot] 9bec88eedc chore: bump github.com/spf13/cobra from 1.8.0 to 1.8.1 (#3581)
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v1.8.0...v1.8.1)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-19 22:08:53 +08:00
dependabot[bot] 1bf6db8154 chore: bump google.golang.org/protobuf from 1.34.1 to 1.34.2 (#3580)
Bumps google.golang.org/protobuf from 1.34.1 to 1.34.2.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-19 22:08:42 +08:00
dependabot[bot] 5fb649c3c3 chore: bump modernc.org/sqlite from 1.30.0 to 1.30.1 (#3579)
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.30.0 to 1.30.1.
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.30.0...v1.30.1)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-19 22:08:30 +08:00
dependabot[bot] b911e98e37 chore: bump docker/build-push-action from 5 to 6 (#3578)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-19 22:08:20 +08:00
Steven 0501f5198a chore: buf format 2024-06-19 22:07:51 +08:00
Johnny 736637a362 feat: add public flag instead of system setting to enable signup (#3589) 2024-06-19 22:03:12 +08:00
Steven 387bf48fc8 chore: update s3 config 2024-06-11 22:05:28 +08:00
dependabot[bot] e9d027ca3e chore: bump @typescript-eslint/parser from 7.12.0 to 7.13.0 in /web (#3558)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 7.12.0 to 7.13.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.13.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-11 10:48:03 +08:00
dependabot[bot] 0c378ec291 chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager from 1.16.21 to 1.16.24 (#3547)
chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager

Bumps [github.com/aws/aws-sdk-go-v2/feature/s3/manager](https://github.com/aws/aws-sdk-go-v2) from 1.16.21 to 1.16.24.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/ram/v1.16.21...service/ram/v1.16.24)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/feature/s3/manager
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-11 09:01:47 +08:00
dependabot[bot] 5836bf5a72 chore: bump golang.org/x/net from 0.25.0 to 0.26.0 (#3549)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.25.0 to 0.26.0.
- [Commits](https://github.com/golang/net/compare/v0.25.0...v0.26.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-11 08:59:43 +08:00
dependabot[bot] 7aba6bef21 chore: bump github.com/aws/aws-sdk-go-v2/config from 1.27.16 to 1.27.18 (#3550)
Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.27.16 to 1.27.18.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.27.16...config/v1.27.18)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/config
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-11 08:59:32 +08:00
dependabot[bot] f31a53caa7 chore: bump uuid from 9.0.1 to 10.0.0 in /web (#3556)
Bumps [uuid](https://github.com/uuidjs/uuid) from 9.0.1 to 10.0.0.
- [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/uuidjs/uuid/compare/v9.0.1...v10.0.0)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-11 08:59:08 +08:00
dependabot[bot] 28624514d1 chore: bump goreleaser/goreleaser-action from 5 to 6 (#3551)
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 5 to 6.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](https://github.com/goreleaser/goreleaser-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-10 23:35:09 +08:00
dependabot[bot] b42979edcc chore: bump golang.org/x/mod from 0.17.0 to 0.18.0 (#3548)
Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.17.0 to 0.18.0.
- [Commits](https://github.com/golang/mod/compare/v0.17.0...v0.18.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-10 23:34:45 +08:00
dependabot[bot] bc1b095812 chore: bump github.com/aws/aws-sdk-go-v2 from 1.27.0 to 1.27.2 (#3546)
Bumps [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) from 1.27.0 to 1.27.2.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.27.0...v1.27.2)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-10 23:34:24 +08:00
Ryo 2c819ace4e feat: return not found error instead internal error for local file not exist (#3543)
* chore: add `/.vscode` to `.gitignore`

* feat: return not found instead of internal for resource

* feat: check file not exist only if error not nil
2024-06-10 14:11:28 +08:00
andrigamerita e4a09c407c feat: write memo visibility in file names when exporting (#3538)
When using the dedicated feature in Memos' user settings to export all memos to Markdown files inside a ZIP folder, the output doesn't feature any kind of distinction for memos by their set visibility.
While this is not a big issue for personal backups, it can reveal itself problematic if exporting the data to share it with other people, or maybe deploy to a static site generator, because there is nothing in the files that distinguishes public memos from private or workspace-restricted ones.

This pull request simply modifies the ExportMemos server function, to add the Visibility status to the end of every exported file name inside the ZIP, right after the date (which is left intact). For example, the file for a public memo would now be called: `YYYY-MM-DDThh:mm:ss+hh:mm-PUBLIC.md`.

An alternative solution would have been to write this information in a YAML header at the beginning of every Markdown file, but, since those are not used anywhere else in the software, I decided to stick with what is already used for export metadata, the filename.
2024-06-09 19:22:13 +08:00
Steven da603053f2 chore: add th locale 2024-06-09 07:46:03 +08:00
boojack edda6ea4bd chore: update i18n with Weblate (#3540)
* Added translation using Weblate (Thai)

* Translated using Weblate (Thai)

Currently translated at 100.0% (260 of 260 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/th/

---------

Co-authored-by: NeneNeko <lennon.rin@gmail.com>
2024-06-09 07:43:59 +08:00
boojack 7b7ecc2daa chore: update i18n with Weblate (#3533)
* Translated using Weblate (Japanese)

Currently translated at 100.0% (260 of 260 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/ja/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (260 of 260 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/

---------

Co-authored-by: Somme4096 <somme4096@gmail.com>
Co-authored-by: Yuri <isyuricunha@duck.com>
2024-06-07 05:10:12 +08:00
Steven fa4521e0c5 chore: update gomark source 2024-06-06 23:09:13 +08:00
Steven 076aa2f8aa chore: remove memo filter 2024-06-05 23:18:14 +08:00
Steven f33571fec6 feat: update webhook request payload 2024-06-05 20:53:20 +08:00
Steven d159975994 chore: update statistics view 2024-06-05 20:46:35 +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 7375b87967 chore: tweak tooltips 2024-06-05 08:51:04 +08:00
Steven 54539aa047 chore: tweak seed data 2024-06-05 08:48:46 +08:00
Steven d0ac866eb1 chore: update statistics view 2024-06-05 08:48:40 +08:00
Steven 797f5a123c feat: add HasIncompleteTasks to memo property 2024-06-05 08:39:56 +08:00
Martin MacDonald f0817f2762 chore: update fetch tags args (#3515)
* Centralised the logic for filters to apply to tagging and updated components to pass in those params needed

* Fixed linting issue

* Split out params from options

* Fixed linting errors

---------

Co-authored-by: Martin MacDonald <martinmacdonald@Martins-MacBook-Pro.local>
2024-06-05 08:06:01 +08:00
Martin MacDonald 2ebd5c64bd fix: copy by reference (#3517)
* Fixed issue with copy by reference

* Fixed linting issues

---------

Co-authored-by: Martin MacDonald <martinmacdonald@Martins-MacBook-Pro.local>
2024-06-05 08:04:50 +08:00
Martin MacDonald 0977acbc7f fix: update uniqby key (#3518)
* Used correct uniqby key

* Put back filter

---------

Co-authored-by: Martin MacDonald <martinmacdonald@Martins-MacBook-Pro.local>
2024-06-05 08:03:56 +08:00
Steven e8ed437ca3 fix: purify html before render 2024-06-04 23:10:54 +08:00
Steven 2b49025f4a chore: update memo filters 2024-06-04 23:03:51 +08:00
Steven bddfe00b5c chore: bump version 2024-06-04 20:51:53 +08:00
dependabot[bot] aafddac65f chore: bump modernc.org/sqlite from 1.29.10 to 1.30.0 (#3510)
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.29.10 to 1.30.0.
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.29.10...v1.30.0)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-04 07:18:07 +08:00
dependabot[bot] b4113581b3 chore: bump github.com/spf13/viper from 1.18.2 to 1.19.0 (#3511)
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.18.2 to 1.19.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.18.2...v1.19.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/viper
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-04 07:17:40 +08:00
Steven e40b39033f chore: fix compact default value 2024-06-04 07:17:16 +08:00
Michael 616f306efe chore: update i18n with Weblate (#3509)
* Translated using Weblate (French)

Currently translated at 100.0% (260 of 260 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/fr/

* Translated using Weblate (Chinese (Traditional))

Currently translated at 100.0% (260 of 260 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hant/

---------

Co-authored-by: Ezmana <ezmana.land@gmail.com>
Co-authored-by: ti777777 <ti12272198686@yahoo.com.tw>
2024-06-03 23:57:59 +08:00
Steven 370ac32344 chore: regenerate pnpm-local.yaml 2024-06-03 23:51:29 +08:00
Steven 20b8a97a88 chore: retire outdate scripts 2024-06-03 23:50:59 +08:00
dependabot[bot] be6fc1ca4d chore: bump lucide-react from 0.378.0 to 0.383.0 in /web (#3507)
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.378.0 to 0.383.0.
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.383.0/packages/lucide-react)

---
updated-dependencies:
- dependency-name: lucide-react
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 23:40:00 +08:00
dependabot[bot] c41d53b4b6 chore: bump @types/node from 20.12.12 to 20.14.0 in /web (#3504)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.12.12 to 20.14.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 23:38:03 +08:00
Martin MacDonald 760dee4159 feat: delete memo comments when memo is deleted (#3491)
* Added logic to delete memo relation and memo comments recursively when a memo is deleted

* Fixed logic to only target comment types and added removing of broken references

* Fixed linting errors

---------

Co-authored-by: Martin MacDonald <martinmacdonald@Martins-MacBook-Pro.local>
2024-06-03 19:50:13 +08:00
Steven 08d37acffa chore: tweak readme 2024-06-02 14:31:54 +08:00
Michael c484b09c4c chore: update i18n with Weblate (#3499)
* Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (260 of 260 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (260 of 260 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/tr/

---------

Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
Co-authored-by: Oğuz Han <h4n.3545@gmail.com>
2024-06-02 14:06:05 +08:00
Steven 2e0d5412b4 chore: tweak webhook payload 2024-06-01 23:46:00 +08:00
Steven 8c0bee3840 chore: tweak refresh button 2024-06-01 23:27:35 +08:00
Steven 78f6064530 chore: tweak goreleaser action 2024-06-01 10:04:39 +08:00
Steven d7be24a0e1 chore: tweak goreleaser 2024-06-01 09:59:52 +08:00
Steven 5493f5f14e chore: regenerate dependencies 2024-06-01 09:58:47 +08:00
Steven 1dc686fa6c chore: update build artifacts 2024-06-01 09:49:47 +08:00
Steven 4e54ec38ff chore: update memo related settings 2024-06-01 09:05:09 +08:00
Steven 0657a1ef5b chore: fix memo editor cache 2024-06-01 08:48:54 +08:00
Michael 48546f05b3 chore: update i18n with Weblate (#3492)
* Translated using Weblate (Turkish)

Currently translated at 100.0% (259 of 259 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/tr/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (259 of 259 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/

* Apply suggestions from code review

---------

Co-authored-by: Oğuz Han <h4n.3545@gmail.com>
Co-authored-by: Coisini-H <2972186196@qq.com>
2024-06-01 08:42:01 +08:00
Steven 08a9291964 chore: update timeline filters 2024-05-31 09:06:03 +08:00
Steven 98f2cf6397 chore: tweak linter 2024-05-30 07:23:16 +08:00
Steven b1cc1255bb chore: tweak seed data 2024-05-30 07:21:10 +08:00
Steven b215426623 chore: update general setting 2024-05-30 07:19:38 +08:00
Steven 423861d48c fix: create idp in postgres 2024-05-29 23:22:20 +08:00
Michael f2b708c1b8 chore: update i18n with Weblate (#3483)
* Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (257 of 257 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (257 of 257 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/tr/

---------

Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
Co-authored-by: Ramazan SANCAR <ramazansancar4545@gmail.com>
2024-05-29 23:20:11 +08:00
Steven 0f4b7c5f4a feat: add more memo settings 2024-05-29 23:17:53 +08:00
Steven 1894ef161f chore: fix content search 2024-05-29 22:04:37 +08:00
Michael 98eb57b370 chore: update translation files (#3481)
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/

Co-authored-by: Hosted Weblate <hosted@weblate.org>
2024-05-29 08:05:14 +08:00
Steven cf70867470 chore: update tag section 2024-05-29 08:03:01 +08:00
Steven 719c22fef8 chore: update i18n 2024-05-29 07:39:16 +08:00
Steven 6010139291 chore: remove unused 2024-05-29 07:36:51 +08:00
Steven cbf556fee5 chore: fix memo cache key 2024-05-28 23:23:23 +08:00
Steven 93e848d170 chore: tweak root redirector 2024-05-28 19:59:29 +08:00
Steven 60b5b4815d chore: fix imports 2024-05-28 09:10:08 +08:00
dependabot[bot] 98bd4568e7 chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager from 1.16.20 to 1.16.21 (#3469)
chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager

Bumps [github.com/aws/aws-sdk-go-v2/feature/s3/manager](https://github.com/aws/aws-sdk-go-v2) from 1.16.20 to 1.16.21.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/ram/v1.16.20...service/ram/v1.16.21)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/feature/s3/manager
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-28 09:07:42 +08:00
dependabot[bot] c24225fd89 chore: bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.54.2 to 1.54.3 (#3471)
chore: bump github.com/aws/aws-sdk-go-v2/service/s3

Bumps [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2) from 1.54.2 to 1.54.3.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.54.2...service/s3/v1.54.3)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/s3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-28 09:06:53 +08:00
dependabot[bot] 5ea04ca596 chore: bump github.com/aws/aws-sdk-go-v2/config from 1.27.15 to 1.27.16 (#3472)
Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.27.15 to 1.27.16.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.27.15...config/v1.27.16)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/config
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-28 09:06:45 +08:00
Steven 0275a65781 chore: add last visited page 2024-05-28 09:05:59 +08:00
dependabot[bot] 239f28c1e0 chore: bump @vitejs/plugin-react from 4.2.1 to 4.3.0 in /web (#3467)
Bumps [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/tree/HEAD/packages/plugin-react) from 4.2.1 to 4.3.0.
- [Release notes](https://github.com/vitejs/vite-plugin-react/releases)
- [Changelog](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite-plugin-react/commits/v4.3.0/packages/plugin-react)

---
updated-dependencies:
- dependency-name: "@vitejs/plugin-react"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-28 06:07:43 +08:00
dependabot[bot] f78114da43 chore: bump github.com/aws/aws-sdk-go-v2/credentials from 1.17.15 to 1.17.16 (#3468)
chore: bump github.com/aws/aws-sdk-go-v2/credentials

Bumps [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2) from 1.17.15 to 1.17.16.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/credentials/v1.17.15...credentials/v1.17.16)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/credentials
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-27 23:37:05 +08:00
dependabot[bot] 75e76e1331 chore: bump @types/react from 18.3.2 to 18.3.3 in /web (#3466)
Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.3.2 to 18.3.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-27 23:36:53 +08:00
dependabot[bot] 9f83be1d48 chore: bump @typescript-eslint/parser from 7.9.0 to 7.10.0 in /web (#3465)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 7.9.0 to 7.10.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.10.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-27 23:36:43 +08:00
dependabot[bot] 250bdff4c5 chore: bump @bufbuild/buf from 1.32.0 to 1.32.1 in /web (#3464)
Bumps [@bufbuild/buf](https://github.com/bufbuild/buf) from 1.32.0 to 1.32.1.
- [Release notes](https://github.com/bufbuild/buf/releases)
- [Changelog](https://github.com/bufbuild/buf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bufbuild/buf/compare/v1.32.0...v1.32.1)

---
updated-dependencies:
- dependency-name: "@bufbuild/buf"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-27 23:36:33 +08:00
dependabot[bot] b8d4720e5e chore: bump i18next from 23.11.4 to 23.11.5 in /web (#3463)
Bumps [i18next](https://github.com/i18next/i18next) from 23.11.4 to 23.11.5.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v23.11.4...v23.11.5)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-27 23:36:24 +08:00
dependabot[bot] 3e11adc15b chore: bump modernc.org/sqlite from 1.29.9 to 1.29.10 (#3470)
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.29.9 to 1.29.10.
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.29.9...v1.29.10)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-27 23:36:09 +08:00
Steven e475f00ba1 chore: tweak seed data 2024-05-27 23:32:08 +08:00
Steven f0e5a72271 feat: update search memo filter 2024-05-27 23:25:25 +08:00
Steven ba0876a563 feat: update statistics view 2024-05-27 20:04:07 +08:00
Steven a423dac12c chore: tweak memo property 2024-05-27 19:43:57 +08:00
Steven 2b4c2b23b2 chore: tweak linter 2024-05-26 21:39:34 +08:00
Ryo 784fcbb698 feat: add panic recovery middleware for grpc and echo server (#3459) 2024-05-26 21:38:59 +08:00
Steven 1ccfa81cf3 chore: tweak common function 2024-05-26 11:02:23 +08:00
Steven a177800e83 chore: tweak error message 2024-05-25 11:05:35 +08:00
Steven d39cacf1f9 chore: tweak readme 2024-05-25 11:01:54 +08:00
Michael 8233a6ba1c chore: translated using Weblate (Marathi) (#3451)
Translated using Weblate (Marathi)

Currently translated at 100.0% (255 of 255 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/mr/

Co-authored-by: quaintdev <accounts@rohanrd.xyz>
2024-05-25 05:44:20 +08:00
quaintdev af71ac49bb feat(i18n): added marathi(mr) translations (#3449) 2024-05-25 05:43:37 +08:00
Steven 7d6dbb9487 fix: link hover handler 2024-05-22 23:25:04 +08:00
Steven 4070998f9f chore: fix linter 2024-05-22 21:55:13 +08:00
Steven d3235f75f3 chore: tweak memo definition 2024-05-22 21:52:41 +08:00
Steven e0600388b2 chore: implement memo property endpoint 2024-05-22 09:21:12 +08:00
Steven 16d3de63c2 chore: update resource binary endpoint 2024-05-21 21:25:21 +08:00
Michael 2c50d3469e chore: update i18n with weblate (#3435)
* Translated using Weblate (Ukrainian)

Currently translated at 58.0% (148 of 255 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/uk/

* Translated using Weblate (Ukrainian)

Currently translated at 58.0% (148 of 255 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/uk/

---------

Co-authored-by: LibreTranslate <noreply-mt-libretranslate@weblate.org>
Co-authored-by: Gregory Malets <gregory.malets@gmail.com>
2024-05-21 20:36:28 +08:00
Steven b5d2ff6e28 chore: fix linter 2024-05-21 00:08:57 +08:00
dependabot[bot] 3616194d03 chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager from 1.16.17 to 1.16.20 (#3415)
chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager

Bumps [github.com/aws/aws-sdk-go-v2/feature/s3/manager](https://github.com/aws/aws-sdk-go-v2) from 1.16.17 to 1.16.20.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/ram/v1.16.17...service/ram/v1.16.20)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/feature/s3/manager
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 00:04:02 +08:00
Steven 811c0757c4 chore: fix linter 2024-05-21 00:03:30 +08:00
dependabot[bot] 464b00ea0b chore: bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.53.2 to 1.54.2 (#3416)
chore: bump github.com/aws/aws-sdk-go-v2/service/s3

Bumps [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2) from 1.53.2 to 1.54.2.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.53.2...service/s3/v1.54.2)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/s3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 00:02:17 +08:00
dependabot[bot] a1e610fd8e chore: bump github.com/grpc-ecosystem/grpc-gateway/v2 from 2.19.1 to 2.20.0 (#3417)
chore: bump github.com/grpc-ecosystem/grpc-gateway/v2

Bumps [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway) from 2.19.1 to 2.20.0.
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.19.1...v2.20.0)

---
updated-dependencies:
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 00:02:08 +08:00
dependabot[bot] e813853624 chore: bump google.golang.org/grpc from 1.63.2 to 1.64.0 (#3418)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.63.2 to 1.64.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.63.2...v1.64.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 00:00:52 +08:00
dependabot[bot] b2f9496c96 chore: bump github.com/aws/aws-sdk-go-v2/config from 1.27.13 to 1.27.15 (#3414)
Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.27.13 to 1.27.15.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.27.13...config/v1.27.15)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/config
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 00:00:27 +08:00
dependabot[bot] f1392e220e chore: bump @typescript-eslint/parser from 7.8.0 to 7.9.0 in /web (#3423)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 7.8.0 to 7.9.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.9.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 00:00:06 +08:00
Steven f37b34544b chore: update user access token checks 2024-05-20 22:32:42 +08:00
Steven f54b05a521 chore: tweak comments 2024-05-20 22:15:51 +08:00
Steven 613c9e9416 chore: tweak version 2024-05-20 21:10:04 +08:00
Steven fb15386db2 chore: remove access token after sign out 2024-05-20 08:53:29 +08:00
Steven 21838d0aae chore: fix editor autocomplete 2024-05-20 08:49:55 +08:00
Timothy 52ebfd703c fix: update resource with id (#3405)
* chore: update presign expires

* fix: update resource with id

---------

Co-authored-by: timothy <timothy123890511@gmail.com>
2024-05-19 23:18:03 +08:00
Michael 8f6d38719f chore: update i18n from Weblate (#3399)
* Added translation using Weblate (Marathi)

* Translated using Weblate (Marathi)

Currently translated at 22.7% (58 of 255 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/mr/

---------

Co-authored-by: quaintdev <accounts@rohanrd.xyz>
2024-05-19 09:16:13 +08:00
Steven 93d06bc0f0 chore: tweak readme 2024-05-19 09:15:46 +08:00
Steven c25c57ab61 feat: support updating display time 2024-05-18 07:52:35 +08:00
Steven b0aad6f694 chore: tweak resource payload 2024-05-17 08:50:02 +08:00
Steven 0c251f9ab8 chore: fix resource delete handler 2024-05-16 21:53:12 +08:00
wzc90 0a9212f815 fix: memo find for mysql(#3387)
* Update memo.go

* Update store/db/mysql/memo.go

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

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2024-05-16 07:37:42 +08:00
Steven 537ae622d2 chore: filter inbox type 2024-05-15 23:22:23 +08:00
Steven 3e5e5b1f80 chore: fix search memos 2024-05-15 22:42:31 +08:00
wzc90 3ecbbf31a9 fix: migration scripts for mysql (#3384) 2024-05-15 17:34:59 +08:00
wzc90 deb1deb14c fix: resource create time format for mysql (#3381) 2024-05-15 15:51:43 +08:00
Steven c8ff3fa2ee chore: fix uploading flag 2024-05-15 09:08:34 +08:00
dependabot[bot] f67676ac43 chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager from 1.16.15 to 1.16.17 (#3367)
chore: bump github.com/aws/aws-sdk-go-v2/feature/s3/manager

Bumps [github.com/aws/aws-sdk-go-v2/feature/s3/manager](https://github.com/aws/aws-sdk-go-v2) from 1.16.15 to 1.16.17.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.16.15...service/ram/v1.16.17)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/feature/s3/manager
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-14 11:48:46 +08:00
dependabot[bot] 38c6c50681 chore: bump golangci/golangci-lint-action from 5 to 6 (#3365)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 5 to 6.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-14 11:46:44 +08:00
dependabot[bot] 74e0f5429a chore: bump pnpm/action-setup from 3.0.0 to 4.0.0 (#3366)
Bumps [pnpm/action-setup](https://github.com/pnpm/action-setup) from 3.0.0 to 4.0.0.
- [Release notes](https://github.com/pnpm/action-setup/releases)
- [Commits](https://github.com/pnpm/action-setup/compare/v3.0.0...v4.0.0)

---
updated-dependencies:
- dependency-name: pnpm/action-setup
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-14 11:46:35 +08:00
dependabot[bot] 3add70714f chore: bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.53.1 to 1.53.2 (#3369)
chore: bump github.com/aws/aws-sdk-go-v2/service/s3

Bumps [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2) from 1.53.1 to 1.53.2.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.53.1...service/s3/v1.53.2)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/s3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-14 11:46:28 +08:00
dependabot[bot] 78f0ae649a chore: bump golang.org/x/net from 0.24.0 to 0.25.0 (#3370)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.24.0 to 0.25.0.
- [Commits](https://github.com/golang/net/compare/v0.24.0...v0.25.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-14 08:12:52 +08:00
Steven 9265b8e2bd chore: update tags filter 2024-05-14 08:12:25 +08:00
Steven 2317204c50 fix: list idp 2024-05-14 07:04:17 +08:00
dependabot[bot] 32abc50af4 chore: bump github.com/aws/aws-sdk-go-v2/config from 1.27.11 to 1.27.13 (#3371) 2024-05-14 06:45:14 +08:00
Steven 0c673d49ef chore: retire memo tags 2024-05-13 22:12:56 +08:00
Steven d3744ccfa3 chore: tweak seed data 2024-05-13 22:07:44 +08:00
Steven c561362d62 feat: implement memo property 2024-05-13 22:04:37 +08:00
Steven 555b4fbe32 chore: update seed data 2024-05-13 20:27:24 +08:00
Steven 8948edf654 chore: impl memo payload definition 2024-05-13 20:24:11 +08:00
Steven 31e07c083d chore: fix types 2024-05-13 20:07:56 +08:00
Steven b8763905ba chore: tweak naming 2024-05-13 20:03:04 +08:00
Michael 62705fed39 chore: translated using Weblate (French) (#3358)
Translated using Weblate (French)

Currently translated at 100.0% (255 of 255 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/fr/

Co-authored-by: Ezmana <ezmana.land@gmail.com>
2024-05-13 10:18:33 +08:00
Michael 6df3cf808e chore: update seed data 2024-05-13 10:15:30 +08:00
Michael 6c481743de chore: translated using Weblate (Turkish) (#3356)
Translated using Weblate (Turkish)

Currently translated at 100.0% (255 of 255 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/tr/

Co-authored-by: Oğuz Han <h4n.3545@gmail.com>
2024-05-13 08:10:15 +08:00
Steven 83b9ea45b9 chore: tweak dark mode styles 2024-05-13 08:09:32 +08:00
Steven f79554371d chore: retire share dialog 2024-05-13 07:57:58 +08:00
Steven eda1983964 chore: return workspace setting with default value 2024-05-12 13:32:26 +08:00
Steven cf423026a5 chore: update store cache 2024-05-12 13:19:31 +08:00
Leo LI 93e8fa4912 fix: upgrade scripts for mysql
* Fix mysql db migration

* Update store/db/mysql/migration/prod/0.22/01__memo_tags.sql

* Update store/db/mysql/migration/prod/0.22/02__memo_payload.sql

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2024-05-12 12:34:21 +08:00
Steven bb076ce486 chore: update list workspace settings 2024-05-12 08:09:14 +08:00
Steven cf7718f8dc chore: update presign expires 2024-05-12 08:03:56 +08:00
Steven 29a22914cf fix: postgres upgrade script 2024-05-11 22:35:26 +08:00
Steven 087f60ba7b chore: fix user setting key checks 2024-05-11 21:14:21 +08:00
wzc90 d4157bcffa fix: upgrade scripts (#3347) 2024-05-11 17:43:13 +08:00
Michael ee984a8872 chore: translated using Weblate (Chinese (Simplified)) (#3345)
Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (255 of 255 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/

Co-authored-by: Coisini-H <2972186196@qq.com>
2024-05-11 16:00:33 +08:00
wzc90 80df8f8aed fix: upgrade scripts (#3344) 2024-05-11 15:38:14 +08:00
Michael a15025303b chore: update i18n with Weblate (#3339)
* Translated using Weblate (Japanese)

Currently translated at 100.0% (255 of 255 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/ja/

* Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (255 of 255 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/

* Translated using Weblate (Chinese (Traditional))

Currently translated at 99.6% (254 of 255 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hant/

---------

Co-authored-by: Somme4096 <somme4096@gmail.com>
Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
2024-05-11 08:15:40 +08:00
Lincoln Nogueira f45f673aec chore: respect supplied listening address (#3338) 2024-05-11 06:50:22 +08:00
Steven f30599fbd2 chore: fix scripts 2024-05-10 23:23:15 +08:00
Steven 041f9b1beb chore: bump version 2024-05-10 23:02:57 +08:00
boojack 3fbc4d8539 feat: implement drag and drop for resource order in editor (#3337)
* Implement drag and drop for resource order in editor

* chore: update

* chore: update

* chore: update
2024-05-10 20:34:35 +08:00
Steven 5f207c8f0c fix: math overflow 2024-05-10 06:21:47 +08:00
Michael fe5a0fe98a chore: update i18n with Weblate (#3335)
* Translated using Weblate (Japanese)

Currently translated at 100.0% (255 of 255 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/ja/

* Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (255 of 255 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/

---------

Co-authored-by: Somme4096 <somme4096@gmail.com>
Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2024-05-09 22:40:27 +08:00
Steven 584c669068 chore: tweak max width 2024-05-09 22:10:27 +08:00
Steven 46a085f8df chore: add datepicker to timeline 2024-05-09 20:31:37 +08:00
Steven e7a788fa71 chore: tweak memo detail page 2024-05-09 20:10:13 +08:00
Steven 942052b1ea chore: update grpc options 2024-05-09 20:08:18 +08:00
Steven deae53c1f1 chore: add dayjs to fix datetime format in safari 2024-05-09 08:52:34 +08:00
Steven 1d99dad435 feat: update timeline page 2024-05-09 07:56:00 +08:00
Steven 33133ea1a3 chore: tweak searchbar styles 2024-05-08 22:50:13 +08:00
Steven a4235bb4bf chore: tweak tags style 2024-05-08 22:31:22 +08:00
Steven e0977e53f7 chore: remove unused route 2024-05-08 22:15:29 +08:00
Michael 4e12744811 chore: update translation files (#3332)
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/

Co-authored-by: Hosted Weblate <hosted@weblate.org>
2024-05-08 21:35:19 +08:00
Steven 40a5503d45 chore: tweak i18n locales 2024-05-08 21:33:49 +08:00
Steven 16670b6b8d chore: tweak seed data 2024-05-08 20:08:53 +08:00
Michael d57e7d5a0b chore: update translation files (#3331)
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/

Co-authored-by: Hosted Weblate <hosted@weblate.org>
2024-05-08 20:06:05 +08:00
Steven f7f4206fa1 chore: fix linter 2024-05-08 20:05:16 +08:00
Steven 292861be16 chore: retire tag store 2024-05-08 20:03:18 +08:00
Steven d0655ece53 refactor: update memo tags 2024-05-08 20:03:01 +08:00
Steven 2c270438ec chore: update default service config 2024-05-08 06:57:53 +08:00
Jerwin Arnado a9caecf479 fix: Set max height to 50vh for better viewing for larger screens. (#3330)
Feature: Set max height to 50vh for better viewing for larger screens.
2024-05-07 23:19:20 +08:00
Steven d355e2c631 chore: tweak tags section 2024-05-07 22:11:46 +08:00
Steven 4950ea1c74 fix: grpc max message size 2024-05-07 22:10:27 +08:00
Steven f9258e41a0 chore: tweak max width 2024-05-07 22:10:08 +08:00
steven e16546f80a chore: handle legacy workspace setting 2024-05-07 22:07:44 +08:00
dependabot[bot] a73f979f96 chore: bump lucide-react from 0.368.0 to 0.378.0 in /web (#3313)
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.368.0 to 0.378.0.
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.378.0/packages/lucide-react)

---
updated-dependencies:
- dependency-name: lucide-react
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-07 08:53:35 +08:00
dependabot[bot] 41549a6951 chore: bump @types/node from 20.12.9 to 20.12.10 in /web (#3323)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.12.9 to 20.12.10.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-07 08:53:18 +08:00
dependabot[bot] 1e8346290c chore: bump @mui/joy from 5.0.0-beta.32 to 5.0.0-beta.36 in /web (#3317)
Bumps [@mui/joy](https://github.com/mui/material-ui/tree/HEAD/packages/mui-joy) from 5.0.0-beta.32 to 5.0.0-beta.36.
- [Release notes](https://github.com/mui/material-ui/releases)
- [Changelog](https://github.com/mui/material-ui/blob/next/CHANGELOG.md)
- [Commits](https://github.com/mui/material-ui/commits/HEAD/packages/mui-joy)

---
updated-dependencies:
- dependency-name: "@mui/joy"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-07 08:53:06 +08:00
dependabot[bot] 6a2701ee83 chore: bump react-redux from 9.1.1 to 9.1.2 in /web (#3316) 2024-05-07 05:11:26 +08:00
dependabot[bot] 68fcf250a0 chore: bump google.golang.org/protobuf from 1.33.0 to 1.34.1 (#3318) 2024-05-07 05:11:15 +08:00
dependabot[bot] 5aaf0b88fd chore: bump golang.org/x/oauth2 from 0.19.0 to 0.20.0 (#3319) 2024-05-07 05:11:04 +08:00
dependabot[bot] f9b0a2b693 chore: bump golang.org/x/crypto from 0.22.0 to 0.23.0 (#3320) 2024-05-07 05:10:52 +08:00
dependabot[bot] bf07a2cfe6 chore: bump modernc.org/sqlite from 1.29.8 to 1.29.9 (#3321) 2024-05-07 05:10:40 +08:00
Steven 776664105a chore: tweak content length limit 2024-05-06 19:12:30 +08:00
Michael b0ecb72eaa chore: translated using Weblate (Hungarian) (#3312)
Translated using Weblate (Hungarian)

Currently translated at 98.6% (299 of 303 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/hu/

Co-authored-by: Vermunds <33235701+Vermunds@users.noreply.github.com>
2024-05-06 08:03:52 +08:00
Steven af1ad2f2db chore: add memo content length limit setting 2024-05-06 08:02:39 +08:00
Nabiel Omar Syarif 56ceba2dec fix: fix deleting tag from tag lists (#3311) 2024-05-06 07:38:15 +08:00
Steven e32a585bbf chore: update resource dashboard 2024-05-06 07:37:48 +08:00
Steven dfc0889a4f chore: tweak package name 2024-05-06 07:18:54 +08:00
Michael da535c8dc6 chore: translated using Weblate (Chinese (Simplified)) (#3307)
Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (303 of 303 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/

Co-authored-by: Sung Kim <1740603900@qq.com>
2024-05-04 11:52:26 +08:00
Steven 10c57167cc chore: remove unused flags 2024-05-03 07:16:07 +08:00
Steven 5742f9ca13 fix: seed data 2024-05-03 07:02:08 +08:00
Steven e9831caca1 chore: remove unused field 2024-05-02 22:21:49 +08:00
Steven b23b6302de chore: tweak linter 2024-05-02 22:10:50 +08:00
Steven 74145157a0 chore: add presign background service 2024-05-02 22:08:45 +08:00
Steven 05f73a2236 chore: tweak linter 2024-05-02 21:46:47 +08:00
Steven 775b79338d chore: update object in s3 2024-05-02 21:44:17 +08:00
Steven 26545c855c refactor: implement s3 storage 2024-05-02 21:28:06 +08:00
Michael 355ea352aa chore: translated using Weblate (Chinese (Traditional)) (#3304)
Translated using Weblate (Chinese (Traditional))

Currently translated at 100.0% (303 of 303 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (303 of 303 strings)


Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hant/
Translation: memos-i18n/i18n

Co-authored-by: Yuri <isyuricunha@duck.com>
2024-05-02 20:23:12 +08:00
Steven 144269fbbc chore: fix router 2024-05-01 12:44:18 +08:00
Steven 590b626052 chore: update upload resources button 2024-05-01 10:43:09 +08:00
Steven 832ad92bac chore: update gitignore 2024-05-01 10:31:26 +08:00
Steven 20dd3e17f7 chore: rename router package 2024-05-01 10:28:32 +08:00
Steven 8ae4bc95dc chore: migrate auth package 2024-05-01 10:26:46 +08:00
Steven ff175bbb7e refactor: update resource binary request handler 2024-05-01 10:23:56 +08:00
Steven 6d3d71df30 chore: update frontend dependencies 2024-04-30 22:27:20 +08:00
Steven d668794c7c chore: update build docker image actions 2024-04-30 22:21:46 +08:00
Steven 33f52320f7 fix: remove lazy import components 2024-04-30 22:06:47 +08:00
Steven 6295979592 chore: add user avatar route 2024-04-30 22:06:34 +08:00
Michael cac6f42770 fix: server matchs 2024-04-30 10:18:04 +08:00
dependabot[bot] 00f1773495 chore: bump golangci/golangci-lint-action from 4 to 5 (#3298)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 4 to 5.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-29 23:28:15 +08:00
Steven 8a3845ff54 chore: remove external resource dialog 2024-04-29 22:57:47 +08:00
Steven 155c5baf2c refactor: add markdown service 2024-04-29 08:00:37 +08:00
Steven 4338234641 chore: retire storage related functions 2024-04-28 21:50:09 +08:00
Steven 320963098f refactor: update storage setting 2024-04-28 21:36:22 +08:00
Steven f25c7d9b24 fix: serve frontend assets 2024-04-28 08:36:33 +08:00
Steven d8aeec993c chore: replace classnames with clsx 2024-04-28 00:58:40 +08:00
Steven 1b291422e7 refactor: api version 2024-04-28 00:44:29 +08:00
Steven 8bba7f706e chore: update IME mode checks 2024-04-28 00:12:44 +08:00
Steven f9942002f9 chore: fix linter 2024-04-27 23:36:57 +08:00
Steven 92872118b9 refactor: tweak api definition 2024-04-27 23:14:58 +08:00
Steven 9b66ef5e26 chore: tweak api definition 2024-04-27 22:02:15 +08:00
Steven 04c78e180c chore: update buf dependencies 2024-04-27 00:37:45 +08:00
Michael cc2370e01e chore: update i18n with Weblate (#3287)
* Translated using Weblate (Japanese)

Currently translated at 91.0% (276 of 303 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/ja/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 99.6% (302 of 303 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/

---------

Co-authored-by: mirukupc <mirukupc.jp@gmail.com>
Co-authored-by: Coisini-H <2972186196@qq.com>
2024-04-27 00:32:58 +08:00
Steven 7217605831 chore: update gitignore 2024-04-27 00:26:04 +08:00
Steven a6a62eb79c chore: update gitignore 2024-04-27 00:25:47 +08:00
Steven 5f26c52b49 feat: add goreleaser 2024-04-27 00:22:27 +08:00
Steven 647602beac chore: update link preview 2024-04-25 21:01:13 +08:00
Steven 81d24f32a7 fix: memo comment keys 2024-04-25 09:10:11 +08:00
SkyWT 9bcd4f59a2 fix: editor IME composing event behavior (#3267)
* fix: editor IME composing event behavior

* fix: editor IME composing event behavior

* Update web/src/components/MemoEditor/hooks/useAutoComplete.ts

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2024-04-25 08:59:26 +08:00
Steven 205bf7ed0e chore: update link target 2024-04-24 22:02:11 +08:00
Steven cdcb61da17 chore: fix update storage 2024-04-24 09:18:33 +08:00
Michael 7f9af9b12c chore: translated using Weblate (French) (#3272)
Translated using Weblate (French)

Currently translated at 99.6% (302 of 303 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/fr/

Co-authored-by: Alexis <alexisl61@outlook.fr>
2024-04-24 06:22:57 +08:00
dependabot[bot] 6b253247cb chore: bump modernc.org/sqlite from 1.29.7 to 1.29.8 (#3266)
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.29.7 to 1.29.8.
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.29.7...v1.29.8)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-23 10:04:10 +08:00
Michael 761b4e115b chore: translated using Weblate (English) (#3259)
Translated using Weblate (English)

Currently translated at 100.0% (303 of 303 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/en/

Co-authored-by: noxonad <noxonad@proton.me>
2024-04-22 10:11:30 +08:00
Nabiel Omar Syarif 16f209eada fix: specify go toolchain in go.mod (fix #3252) (#3253) 2024-04-22 10:06:33 +08:00
刘明野 06a79a2e37 fix: tag dependencies (#3251)
fix: 修改tag名称后重新请求数据
2024-04-20 21:16:17 +08:00
Michael 330cc3dc89 chore: translated using Weblate (French) (#3249)
Translated using Weblate (French)

Currently translated at 99.6% (302 of 303 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/fr/

Co-authored-by: Alexis <alexisl61@outlook.fr>
2024-04-19 08:58:39 +08:00
Steven e8dfd579c3 chore: update background services 2024-04-18 23:34:35 +08:00
Steven 2a93b8d720 chore: tweak linter 2024-04-18 21:44:46 +08:00
Steven 5d967f41d9 chore: update server 2024-04-18 21:41:00 +08:00
Steven 339fecbfff chore: allow search comments 2024-04-18 21:04:10 +08:00
Steven 2cdcd17ba3 chore: tweak linter 2024-04-17 09:00:16 +08:00
Steven 14d4cfd5a4 chore: tweak store methods name 2024-04-17 08:56:52 +08:00
Michael 00d25b12c1 chore: translated using Weblate (Russian) (#3245)
Translated using Weblate (Russian)

Currently translated at 90.4% (274 of 303 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/ru/

Co-authored-by: sergeybutakov <pushkagun@gmail.com>
2024-04-16 22:38:20 +08:00
Steven 95df647265 chore: tweak comments 2024-04-16 22:33:25 +08:00
Steven f52e0e005a chore: update dependencies 2024-04-16 21:28:40 +08:00
Steven 70f3d131f6 chore: update pnpm version 2024-04-16 21:22:40 +08:00
Steven f7f139d65a chore: tweak typo 2024-04-16 21:15:17 +08:00
coderwander 162521885c chore: fix some typos in comments (#3243)
Signed-off-by: coderwander <770732124@qq.com>
2024-04-16 21:14:38 +08:00
dependabot[bot] b0b9513de7 chore: bump @types/react from 18.2.75 to 18.2.79 in /web (#3240)
Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.2.75 to 18.2.79.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 07:36:03 +08:00
dependabot[bot] f221f9bfe9 chore: bump i18next from 23.11.1 to 23.11.2 in /web (#3235)
Bumps [i18next](https://github.com/i18next/i18next) from 23.11.1 to 23.11.2.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v23.11.1...v23.11.2)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 07:08:40 +08:00
dependabot[bot] e831fa8190 chore: bump react-redux from 9.1.0 to 9.1.1 in /web (#3234)
Bumps [react-redux](https://github.com/reduxjs/react-redux) from 9.1.0 to 9.1.1.
- [Release notes](https://github.com/reduxjs/react-redux/releases)
- [Changelog](https://github.com/reduxjs/react-redux/blob/master/CHANGELOG.md)
- [Commits](https://github.com/reduxjs/react-redux/compare/v9.1.0...v9.1.1)

---
updated-dependencies:
- dependency-name: react-redux
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 07:08:23 +08:00
dependabot[bot] eae0b7115b chore: bump @types/react-dom from 18.2.24 to 18.2.25 in /web (#3233)
Bumps [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) from 18.2.24 to 18.2.25.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

---
updated-dependencies:
- dependency-name: "@types/react-dom"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 07:08:01 +08:00
dependabot[bot] 1f0fffda95 chore: bump lucide-react from 0.367.0 to 0.368.0 in /web (#3232)
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.367.0 to 0.368.0.
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.368.0/packages/lucide-react)

---
updated-dependencies:
- dependency-name: lucide-react
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 07:07:49 +08:00
Michael 404751f378 chore: update i18n with Weblate (#3230)
* Translated using Weblate (Turkish)

Currently translated at 100.0% (303 of 303 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/tr/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 99.6% (302 of 303 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/

---------

Co-authored-by: Oğuz Han <h4n.3545@gmail.com>
Co-authored-by: Coisini-H <2972186196@qq.com>
2024-04-15 11:19:52 +08:00
Steven f9dd29ae07 chore: tweak tag store 2024-04-14 22:20:09 +08:00
Steven 1f0bfd2169 chore: update tag store 2024-04-14 22:03:56 +08:00
Michael 4aa72306ff chore: update i18n with Weblate (#3227)
* Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (308 of 308 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 99.6% (307 of 308 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/

---------

Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
Co-authored-by: Coisini-H <2972186196@qq.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2024-04-14 21:27:55 +08:00
Eng Zer Jun 3b550a8ab8 chore: replace util.Min helper with built-in min (#3224) 2024-04-13 20:16:22 +08:00
Steven cb7886dc49 chore: retire telegram integration in frontend 2024-04-13 12:42:34 +08:00
Steven d00e4fdf17 chore: retire telegram plugin 2024-04-13 12:39:41 +08:00
Steven 9a2c423435 chore: update var-naming 2024-04-13 12:11:59 +08:00
Steven 49f8cfd5d1 chore: update jwt middleware 2024-04-13 12:10:57 +08:00
Steven b27004daae chore: retire unused plugin 2024-04-13 12:09:32 +08:00
Steven 75359854cc chore: fix resource routes 2024-04-13 12:07:53 +08:00
Steven cebc46adc7 chore: tweak store definition 2024-04-13 11:54:37 +08:00
Steven 6ee3b0f704 chore: go mod tidy 2024-04-13 11:02:29 +08:00
Steven bbd206e893 chore: retire legacy api 2024-04-13 11:01:16 +08:00
Steven cf4db17080 chore: fix linter 2024-04-13 10:53:39 +08:00
Steven c373131b89 chore: migrate idp service 2024-04-13 10:50:25 +08:00
Steven a77703260f chore: fix linter 2024-04-13 02:57:32 +08:00
Steven 8f51529c78 chore: implement storage service 2024-04-13 02:55:40 +08:00
Steven 707e5caf89 chore: update workspace setting store 2024-04-13 02:08:35 +08:00
Michael 17e8fc5408 chore: update i18n with Weblate (#3220)
* Translated using Weblate (Chinese (Simplified))

Currently translated at 98.0% (302 of 308 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 98.0% (302 of 308 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/

---------

Co-authored-by: Coisini-H <2972186196@qq.com>
Co-authored-by: LibreTranslate <noreply-mt-libretranslate@weblate.org>
2024-04-12 22:45:12 +08:00
Steven 074e7cf71a chore: fix resource path 2024-04-12 08:57:34 +08:00
Steven f5461264c5 chore: fix dialog background color 2024-04-12 08:44:19 +08:00
Michael e2ae32063e chore: translated using Weblate (Turkish) (#3215)
Translated using Weblate (Turkish)

Currently translated at 100.0% (300 of 300 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/tr/

Co-authored-by: Oğuz Han <h4n.3545@gmail.com>
2024-04-12 08:36:38 +08:00
Steven 133951328b chore: fix linter 2024-04-12 08:36:02 +08:00
imikod 257b8add8c chore: localization improvements (#3213)
* localization improvements

* typo fix

* fix linting error
2024-04-12 08:35:14 +08:00
Steven 755d5b83c6 chore: retire legacy setting api 2024-04-12 08:32:54 +08:00
Steven 3088cabe10 chore: tweak linter 2024-04-11 17:58:49 +08:00
Steven 3e6e56b008 refactor: update workspace store definition 2024-04-11 17:53:00 +08:00
Steven 6d842711e2 chore: fix dependencies 2024-04-10 23:34:29 +08:00
dependabot[bot] b84a0592bb chore: bump react-i18next from 11.18.6 to 14.1.0 in /web (#3210)
Bumps [react-i18next](https://github.com/i18next/react-i18next) from 11.18.6 to 14.1.0.
- [Changelog](https://github.com/i18next/react-i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/react-i18next/compare/v11.18.6...v14.1.0)

---
updated-dependencies:
- dependency-name: react-i18next
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-10 23:28:11 +08:00
dependabot[bot] 581a64d5c1 chore: bump lucide-react from 0.309.0 to 0.367.0 in /web (#3208)
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.309.0 to 0.367.0.
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.367.0/packages/lucide-react)

---
updated-dependencies:
- dependency-name: lucide-react
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-10 23:27:34 +08:00
dependabot[bot] 4537411109 chore: bump @typescript-eslint/eslint-plugin from 6.21.0 to 7.0.0 in /web (#3207)
chore: bump @typescript-eslint/eslint-plugin in /web

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.21.0 to 7.0.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.0.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-10 23:26:53 +08:00
dependabot[bot] d6b1326a2d chore: bump eslint-config-prettier from 8.10.0 to 9.1.0 in /web (#3206)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.10.0 to 9.1.0.
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v8.10.0...v9.1.0)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-10 23:26:36 +08:00
dependabot[bot] 9490e890c7 chore: bump i18next from 21.10.0 to 23.11.1 in /web (#3205)
Bumps [i18next](https://github.com/i18next/i18next) from 21.10.0 to 23.11.1.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v21.10.0...v23.11.1)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-10 23:26:22 +08:00
dependabot[bot] aed76165ea chore: bump @reduxjs/toolkit from 1.9.7 to 2.2.3 in /web (#3204)
Bumps [@reduxjs/toolkit](https://github.com/reduxjs/redux-toolkit) from 1.9.7 to 2.2.3.
- [Release notes](https://github.com/reduxjs/redux-toolkit/releases)
- [Commits](https://github.com/reduxjs/redux-toolkit/compare/v1.9.7...v2.2.3)

---
updated-dependencies:
- dependency-name: "@reduxjs/toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-10 23:26:11 +08:00
dependabot[bot] 51a90b0013 chore: bump golangci/golangci-lint-action from 3 to 4 (#3203)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3 to 4.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-10 23:25:53 +08:00
dependabot[bot] 7b1fe9fcfc chore: bump pnpm/action-setup from 2.4.0 to 3.0.0 (#3202)
Bumps [pnpm/action-setup](https://github.com/pnpm/action-setup) from 2.4.0 to 3.0.0.
- [Release notes](https://github.com/pnpm/action-setup/releases)
- [Commits](https://github.com/pnpm/action-setup/compare/v2.4.0...v3.0.0)

---
updated-dependencies:
- dependency-name: pnpm/action-setup
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-10 23:25:42 +08:00
Steven ec67f1b3c9 chore: add dependabot 2024-04-10 23:24:17 +08:00
Steven 97cfab1758 chore: upgrade dependencies 2024-04-10 23:19:59 +08:00
Steven eb251a097e chore: update workspace setting service 2024-04-10 23:01:01 +08:00
Steven 4c47e93fce chore: tweak workspace setting store 2024-04-10 22:31:55 +08:00
Michael af954db473 chore: update i18n with Weblate (#3201)
* Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (299 of 299 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (299 of 299 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/tr/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (299 of 299 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (299 of 299 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/

---------

Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
Co-authored-by: Oğuz Han <h4n.3545@gmail.com>
Co-authored-by: Coisini-H <2972186196@qq.com>
Co-authored-by: Weblate Translation Memory <noreply-mt-weblate-translation-memory@weblate.org>
2024-04-10 22:05:31 +08:00
Steven a376dc4dd6 chore: fix linter 2024-04-10 22:04:02 +08:00
Dubzer 8ee56bd29f feat: add code wrapping option on mobile devices (#3196)
* feat: add code wrapping option on mobile devices

* Minor changes

* oopsie
2024-04-10 22:03:47 +08:00
Steven 71c39ed554 chore: update workspace setting definition 2024-04-10 21:15:55 +08:00
Steven c93b1efbae chore: update workspace setting store 2024-04-10 20:05:17 +08:00
Steven 58ae3217ff chore: update auth callback messages 2024-04-09 21:23:17 +08:00
Steven 6028838f03 chore: update component name 2024-04-09 20:51:09 +08:00
Michael 000b3a7a2c chore: update i18n with weblate (#3195)
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/

Co-authored-by: Hosted Weblate <hosted@weblate.org>
2024-04-09 20:29:26 +08:00
Steven bbdd40b2b0 chore: add placeholder to comment editor 2024-04-09 20:01:19 +08:00
imikod 8356ebc46b chore: improve localization (#3190)
* improve localization

* follow suggestion
2024-04-09 16:11:32 +08:00
Steven fc95876617 chore: update memo creator display 2024-04-09 09:05:34 +08:00
Steven b1e196bb4f fix: delete memo reaction 2024-04-08 20:52:46 +08:00
Steven 6d10251cbd feat: impl list syntax auto complete to editor 2024-04-08 20:42:53 +08:00
Steven 436a6cb084 chore: fix text truncate 2024-04-08 19:20:16 +08:00
imikod 90ed908d2e fix: set navigation icons to not shrink (#3186) 2024-04-08 10:16:52 +08:00
Steven 756ab71302 chore: tweak truncate styles 2024-04-07 23:30:28 +08:00
Steven a6b09aa5b1 chore: add confirm dialog for disable password login setting 2024-04-07 23:22:59 +08:00
Steven ff81ea602d chore: tweak error message 2024-04-07 22:35:02 +08:00
Steven 8101a5e0b1 chore: add origin flag to config cors 2024-04-07 22:15:15 +08:00
Michael b5893aa60b chore: update i18n with Weblate (#3183)
* Translated using Weblate (French)

Currently translated at 100.0% (295 of 295 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/fr/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (295 of 295 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/tr/

---------

Co-authored-by: Ezmana <ezmana.land@gmail.com>
Co-authored-by: Oğuz Han <h4n.3545@gmail.com>
2024-04-07 10:13:12 +08:00
Steven bedf3b3025 chore: tweak embedded memo styles 2024-04-02 23:32:43 +08:00
The Anh Nguyen 09ffa7b818 chore: fix memo link (#3173) 2024-04-02 07:13:58 +08:00
Steven ba7dbc1fca chore: fix task node click handler 2024-04-01 21:38:18 +08:00
Steven 15ef57589e chore: go mod tidy 2024-04-01 21:35:58 +08:00
stayweek 5aa633948e chore: use the built-in slices library (#3172)
Signed-off-by: stayweek <jiangtengtao@outlook.com>
2024-04-01 17:16:29 +08:00
Steven b1297f5d01 chore: tweak linter 2024-04-01 00:41:25 +08:00
Steven 33e9b13665 chore: tweak linter 2024-04-01 00:34:51 +08:00
Steven b79f626a74 chore: fix memo comment inbox 2024-04-01 00:26:46 +08:00
Michael ec35a42fb5 chore: update i18n with Weblate (#3168)
* Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (295 of 295 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (295 of 295 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/

* Translated using Weblate (Chinese (Traditional))

Currently translated at 98.3% (290 of 295 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hant/

---------

Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
Co-authored-by: Coisini-H <2972186196@qq.com>
2024-04-01 00:07:03 +08:00
Michael 98c9ab70e2 chore: update translation files (#3166)
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/

Co-authored-by: Hosted Weblate <hosted@weblate.org>
2024-03-30 22:54:38 +08:00
Steven edc7645086 chore: fix linter 2024-03-30 15:01:19 +08:00
Steven cbebbca7d6 chore: add idp definition 2024-03-30 14:58:47 +08:00
Steven 4d62ed46cc chore: tweak words 2024-03-30 14:14:42 +08:00
Steven bb10bb200c chore: implement search random memos 2024-03-30 13:50:18 +08:00
Steven 03c93785f4 chore: implement list random users 2024-03-30 13:29:48 +08:00
The Anh Nguyen 2fe6d606ec feat: handle restore memo when is in archived memo detail page (#3165) 2024-03-30 13:06:08 +08:00
Steven c8baeb86ec chore: fix memo links 2024-03-30 13:04:40 +08:00
The Anh Nguyen 9a88e00df0 fix: link embedded content to uid instead of name (#3164) 2024-03-30 12:30:09 +08:00
Steven 54a3c25ebd chore: update memo resource name definition 2024-03-30 08:26:28 +08:00
Steven d84a88e805 chore: fix linter 2024-03-30 00:05:19 +08:00
Steven 5ab845d92e chore: fix linter 2024-03-30 00:02:34 +08:00
Steven 4f7a6cd6cc chore: fix default logo url 2024-03-29 23:12:30 +08:00
Steven c7aaf791e6 chore: tweak props naming 2024-03-29 22:49:19 +08:00
Michael 239348c403 chore: update i18n with Weblate (#3162)
* Translated using Weblate (Russian)

Currently translated at 85.1% (252 of 296 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/ru/

* Translated using Weblate (Vietnamese)

Currently translated at 91.8% (272 of 296 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/vi/

---------

Co-authored-by: LibreTranslate <noreply-mt-libretranslate@weblate.org>
Co-authored-by: The Anh Nguyen <anhntdev0@gmail.com>
2024-03-29 21:32:55 +08:00
Michael 9f803aa9bb chore: translated using Weblate (Russian) (#3161)
Translated using Weblate (Russian)

Currently translated at 85.1% (252 of 296 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/ru/

Co-authored-by: xyznetsov <invisiblesun2016@yandex.ru>
2024-03-29 21:29:49 +08:00
Steven 200a0d3e2b fix: memo relations 2024-03-29 21:27:38 +08:00
Steven ea6628066d chore: update sidebar components 2024-03-29 09:16:55 +08:00
Steven 526f46807e chore: tweak user list display 2024-03-29 08:37:07 +08:00
Michael bfaf06582c chore: translated using Weblate (Portuguese (Brazil)) (#3157)
Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (296 of 296 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/

Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
2024-03-29 08:20:56 +08:00
Steven 7331c598df fix: edit account dialog fields 2024-03-29 08:19:32 +08:00
The Anh Nguyen f7a445ac8b chore: update Vietnamese translation (#3155) 2024-03-29 08:07:02 +08:00
Steven 90679cc33a chore: add explore sidebar 2024-03-29 00:01:45 +08:00
Steven 192ee7acc0 chore: fix memo link 2024-03-28 22:53:22 +08:00
Michael 7d94256a2a chore: update i18n with Weblate (#3152)
* Translated using Weblate (Chinese (Traditional))

Currently translated at 98.3% (291 of 296 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hant/

* Translated using Weblate (Chinese (Traditional))

Currently translated at 98.3% (291 of 296 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hant/

---------

Co-authored-by: Weblate Translation Memory <noreply-mt-weblate-translation-memory@weblate.org>
Co-authored-by: Coisini-H <2972186196@qq.com>
2024-03-28 22:51:50 +08:00
Michael aed4c1392d chore: update i18n with Weblate (#3151)
* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (296 of 296 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/

* Translated using Weblate (Chinese (Traditional))

Currently translated at 98.3% (291 of 296 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hant/

---------

Co-authored-by: Coisini-H <2972186196@qq.com>
2024-03-28 22:48:32 +08:00
Paul 3605efc4d1 chore: removed sanitization logic (#3147)
* removed sanitization logic

* to avoid lint err
2024-03-28 22:44:44 +08:00
Dubzer a0846c2818 feat: add shortcut to edit the previous memo (#3122)
* Add shortcut to edit the previous memo

* Fix compilation

* Update web/src/components/MemoEditor/index.tsx

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

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2024-03-27 21:46:29 +08:00
Steven 2ebea4dba9 chore: fix workspace profile api 2024-03-27 18:51:11 +08:00
Steven 16cfef32d6 chore: tweak statistics translation 2024-03-26 23:49:37 +08:00
Steven f637deacfc chore: tweak tag list 2024-03-26 23:43:31 +08:00
Steven a07805907b chore: fix action run 2024-03-26 22:46:17 +08:00
Steven 2e87da4927 chore: update frontend dependencies 2024-03-26 22:35:11 +08:00
Steven d460e6bf41 fix: link node 2024-03-25 23:59:19 +08:00
Steven e703b4f70d fix: resource v1 definition 2024-03-24 22:35:10 +08:00
Steven be525fa3df chore: fix migration script 2024-03-23 01:03:11 +08:00
Steven d1e8af48c0 chore: tweak memo view styles 2024-03-23 00:58:15 +08:00
Steven 005305cd9a chore: update relative time display 2024-03-22 08:12:08 +08:00
Steven 8fd1dff484 chore: update migration scripts 2024-03-21 22:24:39 +08:00
Steven c5fa4fe304 chore: tweak imports order 2024-03-21 21:44:43 +08:00
Steven 8f37d7490c chore: fix linter 2024-03-21 21:42:44 +08:00
Steven 18d16abdb5 chore: update workspace service 2024-03-21 21:39:34 +08:00
Steven 1d83c68cb5 chore: update type definitions 2024-03-21 08:12:38 +08:00
Michael 861a1e4c9b chore: update i18n with Weblate (#3115)
* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (293 of 293 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (293 of 293 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/

---------

Co-authored-by: Coisini-H <2972186196@qq.com>
Co-authored-by: Weblate Translation Memory <noreply-mt-weblate-translation-memory@weblate.org>
2024-03-20 21:42:08 +08:00
Steven 26e5b70483 chore: upgrade frontend dependencies 2024-03-20 21:32:06 +08:00
Steven 7c5261b5d2 chore: tweak resource definition 2024-03-20 21:17:04 +08:00
Steven 7cc8b951a3 refactor: update resource id naming 2024-03-20 20:39:16 +08:00
Steven a3a4e37cb0 chore: update memo content styles 2024-03-20 09:07:54 +08:00
Steven 76c936357b chore: fix resource link 2024-03-20 08:51:32 +08:00
Steven 6db427e396 chore: update acl list 2024-03-20 08:18:43 +08:00
Steven 0a0ccbf6e1 chore: update acl list 2024-03-20 08:12:46 +08:00
Steven 96a7d0eb25 chore: tweak line height 2024-03-20 00:40:46 +08:00
Steven ed89cb8310 chore: update memo relation definition 2024-03-19 21:53:44 +08:00
Steven 722e356044 chore: update memo store 2024-03-19 20:55:33 +08:00
Steven efb15a0453 chore: tweak naming 2024-03-18 23:41:57 +08:00
Steven 5f2d6b22be chore: tweak memo structure 2024-03-18 23:23:53 +08:00
Steven 2dc8ed773c chore: tweak linter 2024-03-18 19:57:53 +08:00
Steven 86db6d0254 chore: tweak user api definition 2024-03-18 12:56:52 +08:00
Steven f3fb5e0c60 chore: tweak route enum 2024-03-18 12:07:44 +08:00
Steven 1e43c8d84b chore: disallow update workspace setting in demo mode 2024-03-17 19:18:45 +08:00
Steven cf207df672 chore: tweak link styles 2024-03-17 18:28:37 +08:00
Michael 5dd1251d1e chore: update i18n with Weblate (#3109)
* Translated using Weblate (Japanese)

Currently translated at 95.2% (279 of 293 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/ja/

* Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (293 of 293 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/

---------

Co-authored-by: Somme4096 <somme4096@gmail.com>
Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
2024-03-17 18:22:22 +08:00
sunxunle ea104a5e54 chore: fix typo (#3106) 2024-03-17 09:52:04 +08:00
Steven 335a0312f2 chore: tweak link styles 2024-03-16 23:35:36 +08:00
Mehad Nadeem 9c1e2f8137 feat: implemented link previews (frontend files) (#3074)
* feat: implmented link previews (frontend files)

* chore: updated frontend side for Link Previews

* chore: updated frontend gen types with the renamed (server) service file

* fix: passing errors

* chore: switched to using generated type instead of separate fields

* fix: passing linter error

* chore: updated Link.tsx

* chore: using `useResponsiveWidth` to render for different devices

* chore: refactored Link.tsx
2024-03-16 22:51:16 +08:00
Steven 14479347d8 chore: remove demo checks 2024-03-15 09:05:02 +08:00
Steven 0f48cfbb4e chore: tweak padding styles 2024-03-15 08:52:11 +08:00
Steven 606a30640d fix: check username in signup 2024-03-15 08:37:58 +08:00
Steven ab136e3310 chore: tweak styles 2024-03-15 00:12:22 +08:00
Michael 21af2a004d chore: translated using Weblate (French) (#3099)
Translated using Weblate (French)

Currently translated at 100.0% (293 of 293 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/fr/

Co-authored-by: Ezmana <ezmana.land@gmail.com>
2024-03-14 17:09:29 +08:00
Steven 115b5551b3 chore: tweak default avatar 2024-03-14 09:11:57 +08:00
Steven 15be18fa85 chore: update compace mode handler 2024-03-14 09:07:18 +08:00
Steven 9ce381abb9 chore: tweak user profile 2024-03-14 00:13:56 +08:00
Steven 2516431b20 chore: tweak memo content styles 2024-03-14 00:01:33 +08:00
Steven ded4da07a3 feat: use @github/relative-time-element to display time 2024-03-13 23:47:34 +08:00
Steven e795149186 chore: tweak memo view display 2024-03-13 22:30:59 +08:00
Steven 8fe6874b1b chore: add description field to user 2024-03-13 21:24:16 +08:00
boojack 7c1510e7a9 chore: update i18n with Weblate (#3090)
* Translated using Weblate (Spanish)

Currently translated at 95.4% (293 of 307 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/es/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (307 of 307 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/

---------

Co-authored-by: Hisiste <aditooliva@gmail.com>
Co-authored-by: keocheung <keocheung@outlook.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2024-03-13 20:55:04 +08:00
Steven e5fc107920 chore: tweak i18n locales 2024-03-13 20:51:19 +08:00
Steven 5d740c3813 chore: update link service 2024-03-13 20:25:27 +08:00
Mehad Nadeem 0abe20df72 feat: implemented link previews (server files) (#3073)
* feat: implmented link previews (server files)

* chore: updated variable name

* chore: renamed service file from `metadata_service.go` to `link_service.go`

* fix: passing errors

* fix: fixed linter warnong about `ctx`
2024-03-13 17:31:53 +08:00
Mehad Nadeem 4d41b68d4c feat: implemented link previews (proto files) (#3072)
* feat: implmented link previews (proto files)

* fix: passing proto linter errors

* chore: renamed MetadataService service in proto file.

* fix: removed unused files

* chore: removed meaningless comments from proto file
2024-03-13 16:52:59 +08:00
Lincoln Nogueira 7c87c1ff74 chore: update build scripts (#3085) 2024-03-13 08:50:56 +08:00
Steven 963c630428 chore: update readme with weblate 2024-03-13 08:25:38 +08:00
Steven 6b6edc3791 chore: update tg message handler 2024-03-12 22:48:53 +08:00
Mario Gómez 425e85f0f9 chore: fix spanish typos (#3083) 2024-03-12 21:48:02 +08:00
huajin tong 8e7f826ae6 chore: fix typo (#3080)
Signed-off-by: thirdkeyword <fliterdashen@gmail.com>
2024-03-12 17:05:49 +08:00
Michael 9ffc1515f4 chore: update i18n with Weblate (#3079)
* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (307 of 307 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (307 of 307 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/

---------

Co-authored-by: Matsuri <matsuri@vmoe.info>
Co-authored-by: keocheung <keocheung@outlook.com>
2024-03-12 13:14:56 +08:00
steven 8cdc0c7ffa chore: add delete tag action 2024-03-09 17:26:58 +08:00
zty 999a05307e fix: body overflow styles #3056
Co-authored-by: zty <zty.dev@outlook.com>
2024-03-09 14:09:31 +08:00
steven ed1954c58c chore: fix check setting value 2024-03-09 12:56:44 +08:00
steven 77bafba682 chore: update gomark.wasm 2024-03-09 12:47:20 +08:00
Michael 1540de2f44 chore: translated using Weblate (Korean) (#3060)
Translated using Weblate (Korean)

Currently translated at 95.1% (292 of 307 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/ko/

Co-authored-by: WonSeok <wonseok@duck.com>
2024-03-09 12:40:42 +08:00
Steven ed4b48c54f chore: update gomark.wasm 2024-03-08 00:34:34 +08:00
Michael 706e749275 chore: translated using Weblate (Portuguese (Brazil)) (#3050)
Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (307 of 307 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/

Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
2024-03-07 11:38:24 +08:00
Steven 845999292a chore: update frontend dependencies 2024-03-06 23:33:00 +08:00
Michael 240da335c1 chore(i18n): update translation files (#3042)
Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/

Co-authored-by: Hosted Weblate <hosted@weblate.org>
2024-03-05 11:44:51 +08:00
Steven f9f277695d chore: fix comment amount 2024-03-04 23:37:38 +08:00
Dubzer 6cbfbe9c07 chore: settings page improvements (#3034)
* Don't allow to select text on buttons in settings + refactoring

* Remove redundant useMemo

* Update web/src/pages/Setting.tsx

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

* Rename other constants too

* Rename AdminSection to ADMIN_SECTIONS

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2024-03-04 23:33:43 +08:00
Steven ec206104e5 chore: tweak i18n locale 2024-03-04 23:23:14 +08:00
Steven 342f341b3d chore: ignore import locale error 2024-03-04 13:16:55 +08:00
WonSeok f46b64a17d fix: check disallow public memo in Telegram(#3036) (#3037) 2024-03-04 11:24:09 +08:00
Steven 7d5f603482 chore: update compact view 2024-03-04 11:21:48 +08:00
Dubzer f0a521f5b8 feat: improve theming (#3032)
Add color-scheme and dark scrollbar styles
2024-03-04 09:35:40 +08:00
Steven 59314cdf80 chore: add compact mode to memo view 2024-03-04 01:11:34 +08:00
Steven ac0315334d chore: update i18n locales imports 2024-03-04 00:05:27 +08:00
Steven ac8a374ebd chore: bump version 2024-03-03 23:45:52 +08:00
Steven 95b02341eb chore: tweak logger 2024-03-03 23:45:32 +08:00
Steven d34273b186 chore: update memo icons style 2024-03-03 16:41:03 +08:00
Steven dcfb2b7de2 chore: tweak docs generate path 2024-03-03 15:05:42 +08:00
Steven ebcf43c997 chore: update gomark.wasm 2024-03-03 14:56:40 +08:00
Steven cfb50f19aa chore: tweak linter 2024-03-03 14:23:21 +08:00
Steven e441e3882b chore: update error logger 2024-03-03 14:20:59 +08:00
Steven c1da87a819 chore: update get request origin 2024-03-03 14:10:48 +08:00
jjaychen 3b089eeae3 fix: ignore "Tab" key down event when is composing in editor(#3026) (#3027) 2024-03-03 13:04:00 +08:00
Steven 9a8a1d017e chore: add comments icon 2024-03-02 11:29:21 +08:00
Steven 7e23ceb242 chore: fix frontend linter 2024-03-01 19:39:24 +08:00
Steven 898b3c3779 chore: update gomark.wasm 2024-03-01 19:31:00 +08:00
Steven 8eb01adb6f chore: go mod tidy 2024-02-29 23:56:20 +08:00
jg0312 621a8d4e20 chore: fix typo in build script's if statement (#3017)
missing 'i' in 'if' statement
2024-02-29 23:55:25 +08:00
Steven dfa78cac49 chore: update logger 2024-02-29 23:54:43 +08:00
Steven 12f4d3a10d chore: tweak default page size 2024-02-29 23:42:06 +08:00
Steven 00788bd8f8 chore: update actions 2024-02-29 09:21:55 +08:00
Steven 5f2a624c0c chore: tweak imports order 2024-02-29 01:32:59 +08:00
Steven 3e50bee7da chore: move api directory 2024-02-29 01:16:43 +08:00
Steven 1aa75847d6 chore: upgrade gomark 2024-02-29 01:07:53 +08:00
Steven 89a270cede chore: add username to cache key 2024-02-28 00:34:55 +08:00
Xylit 5526355621 fix: dark mode tag selection and suggestion (#3004)
* fix: use correct higlight color on selecting a tag in darkmode

* fix: take scrolling into account in tab suggestion

Issue: When editing a long memo and editing a tag somewhere where the user has
to scroll down to, the tag suggestions would be out of place (too far down)
because the scrolling wouldn't be taken into account.

Fix: Substract the suggestions div by the scroll amount.

* fix: don't show tag suggestion when on '#'

Fixes this issue like this:
1. Text #tag text
        ^ backspace here
2. Text#tag text
       ^ space
3. Text #tag text
        ^ tag suggestion opens
2024-02-27 09:16:56 +08:00
ercd 1ae9bf23a0 fix: telegram callback query handler dereferencing nil pointer if memo not found (#3003)
* fix: telegram callback query handler dereferencing nil pointer if memo not found

* chore: add an answer to callback query if memo not found
2024-02-27 00:03:08 +08:00
Zhiyuan Zheng 51a7934616 fix: firefox/safari to redirect to /explore in HomeLayout (#3001) 2024-02-26 13:38:24 +08:00
Mr. Lin 8d08cfe1c9 fix: incorrectly checking whether registration is allowed in the login v1 api (#2998)
fix: Incorrectly checking whether registration is allowed in the login interface, resulting in the inability to log in through apiv1
2024-02-26 13:36:17 +08:00
Steven b0f52ade7a chore: remove metric service 2024-02-24 23:32:39 +08:00
Steven 222d04fb22 chore: add fuse to get tag suggestions 2024-02-24 11:02:46 +08:00
Steven 68468927dd chore: tweak setting styles 2024-02-24 11:01:57 +08:00
Steven dfe29ec766 chore: tweak route layout 2024-02-24 10:18:53 +08:00
Steven db56e1b575 chore: fix user banner dropdown 2024-02-23 23:47:26 +08:00
Steven 5b92ac1775 chore: fix setting migrator 2024-02-23 09:16:34 +08:00
Steven f2eb9f1b8f chore: fix get workspace setting 2024-02-23 09:11:39 +08:00
Steven e602aeecc1 fix: update workspace general setting 2024-02-23 09:08:49 +08:00
Steven ce133ad69b chore: retire unused workspace settings 2024-02-23 08:40:33 +08:00
Steven e585578553 chore: tweak readme 2024-02-23 08:25:54 +08:00
Steven 4d9c929c32 chore: upgrade gomark 2024-02-23 08:22:39 +08:00
Steven 39bf850591 fix: embed memos callback 2024-02-22 23:17:15 +08:00
Steven 9cd835b979 chore: upgrade gomark wasm 2024-02-22 23:11:32 +08:00
Steven 0afdbe3332 chore: remove animation of spoiler 2024-02-22 19:25:24 +08:00
Steven 6b14d87521 chore: fix linter 2024-02-21 23:45:12 +08:00
Steven 51d58d3982 chore: add workspace setting migrator 2024-02-21 23:43:18 +08:00
Steven 4378816e44 chore: tweak i18n 2024-02-21 23:02:18 +08:00
Steven e7bbd850b2 chore: tweak spoiler animation 2024-02-21 21:31:34 +08:00
Steven c6162d3f38 chore: update dependencies 2024-02-21 21:24:31 +08:00
Steven ce32206677 chore: remove unused system setting 2024-02-21 21:15:28 +08:00
Steven 50a3af3b29 chore: fix get general setting 2024-02-21 20:44:35 +08:00
Steven 80b64c02fd chore: tweak workspace setting seeds 2024-02-21 20:25:25 +08:00
Steven 13b911ebf0 chore: add spoiler node 2024-02-20 23:55:54 +08:00
Steven 4a6da91719 chore: fix serve frontend flag 2024-02-20 23:24:13 +08:00
Steven fa62e8b59a chore: tweak linter errors 2024-02-20 23:07:42 +08:00
Steven 8e11826db1 chore: update workspace setting service 2024-02-20 23:02:01 +08:00
David Nguyen e6d0c00cf6 chore: update vi.json (#2980) 2024-02-20 17:57:06 +08:00
Kristián 03d67d5a00 feat: add mermaid support in codeblock (#2971) 2024-02-19 15:10:58 +08:00
Kazuki H a86117f613 feat: add new line if the cursor is on a character when adding a tag (#2960) 2024-02-19 08:54:47 +08:00
Søm fc1a2cf2fc chore: update ja.json (#2966) 2024-02-17 09:31:52 +08:00
Steven d22b772232 chore: add memo actions to memo detail page 2024-02-15 11:16:51 +08:00
Steven f1ec5775a7 chore: update inbox props 2024-02-14 09:44:35 +08:00
Bryan 4aa4417d91 chore: allow all 20x response status code in webhook (#2947) 2024-02-13 09:30:48 +08:00
Steven 606e574e19 chore: update enum type 2024-02-13 09:30:28 +08:00
Brilliant Hanabi ebe3678288 feat: add visibility select in ShareMemoDialog (#2941)
In ShareMemoDialog, user can change the visibility
of the memo, so that the memo can be set to public
to be viewed by anyone with the link.
2024-02-13 09:28:16 +08:00
Steven b3ca9969c4 chore: tweak linter 2024-02-09 22:18:55 +08:00
Steven 3dddd3ec4c chore: tweak reaction store 2024-02-09 21:59:45 +08:00
Brilliant Hanabi 81aa9b107f feat: add notice when sharing private links in MemoDetail (#2942) 2024-02-09 09:30:01 +08:00
Steven 60efd3ac32 chore: tweak memo view 2024-02-08 22:52:49 +08:00
Steven 4081a6f5ad chore: add more reactions 2024-02-08 21:20:51 +08:00
Lincoln Nogueira 334e489867 chore: improve docker-compose.dev (#2938) 2024-02-08 16:28:43 +08:00
Steven c7822515a1 chore: tweak view checks 2024-02-08 13:37:38 +08:00
Steven d86f0bac8c chore: implement reaction frontend 2024-02-08 13:25:15 +08:00
Steven e5f244cb50 chore: fix tests 2024-02-08 11:58:23 +08:00
Steven 3a5bc82d39 chore: implement reaction service 2024-02-08 11:54:59 +08:00
Steven a4fa67cd18 chore: update dependencies 2024-02-08 08:13:42 +08:00
Steven 43a2d6ce09 chore: tweak user setting 2024-02-08 08:06:55 +08:00
Mehad Nadeem d2434111b4 chore: impl compact mode setting (#2935)
* chore: backend/DB related files for compact view setting.

* fix: passing lint errors

* fix2: passing linter errors
2024-02-08 08:05:56 +08:00
Steven 559e427c50 chore: implement reaction store 2024-02-07 23:40:23 +08:00
Steven 99568236a3 chore: run buf generate 2024-02-07 21:51:30 +08:00
Mehad Nadeem 06fb2174c3 feat: add compact mode setting (Proto) (#2934)
* chore: proto related files for compact view setting.

* fix: pasing lint errors
2024-02-07 21:45:11 +08:00
Kazuki H 5ac17fc012 fix: displaying archived memos (#2933)
* fix: web: Archived: Show displayTime instead of updateTime

Archiving a memo is considered "updating" it, so the time it was
archived will be displayed, instead of the time it was created.

* fix: web: Archived: Add an option to fetch more memos

Just like on other pages, add a button to fetch more memos. Otherwise,
the user would only be able to load the latest 10 memos, as defined in
DEFAULT_MEMO_LIMIT.
2024-02-07 17:53:23 +08:00
Steven a76b86f18a chore: fix highlight code 2024-02-06 20:59:17 +08:00
Steven ded8001735 chore: fix v2 routes 2024-02-06 20:55:27 +08:00
Steven 185ec2ad2a chore: update inbox service 2024-02-06 19:46:25 +08:00
Steven 6b59c7670c chore: fix linter warning 2024-02-05 23:32:01 +08:00
Steven 434ef44f8c chore: add cookie builder 2024-02-05 23:28:29 +08:00
Steven 46ea16ef7e chore: fix cookie attrs 2024-02-05 22:14:58 +08:00
Steven 8f15e8773a chore: update cookie attrs 2024-02-05 21:42:23 +08:00
Steven 25efc33b24 chore: tweak timeline styles 2024-02-05 21:37:43 +08:00
Steven ba460382b0 chore: remove type-gen script 2024-02-05 20:42:01 +08:00
Steven e35225ff24 chore: fix resource url 2024-02-05 19:35:23 +08:00
Steven 397a7f00ef chore: add postinstall script 2024-02-05 19:29:47 +08:00
Steven 06eff151e7 chore: tweak memo find builder 2024-02-05 06:40:55 +08:00
Steven c30d7ab8f3 chore: update cors middleware 2024-02-05 06:10:10 +08:00
Steven ab4a670bec chore: add env example 2024-02-05 00:33:07 +08:00
Steven ce663efc14 chore: update cookie attrs 2024-02-05 00:11:36 +08:00
Steven 9e72432f19 chore: tweak cookie attrs 2024-02-05 00:10:54 +08:00
Steven b056c59dea chore: add vercel.json 2024-02-05 00:01:31 +08:00
Steven 15c90871d9 chore: update request base url 2024-02-04 23:48:26 +08:00
Steven be899cd027 chore: update eslint config 2024-02-04 22:52:47 +08:00
Steven 8773a3d2c1 chore: tweak assets folder 2024-02-04 22:45:51 +08:00
Steven d2603ee67b chore: upgrade frontend dependencies 2024-02-04 21:36:11 +08:00
Steven c92507728a chore: tweak filter checks 2024-02-04 21:07:14 +08:00
Steven eb4f7b47b7 chore: update memo find builder 2024-02-04 20:54:17 +08:00
Steven 1e07b70d23 chore: fix export memos 2024-02-04 20:20:14 +08:00
Athurg Gooth b8a9783db5 fix: signin error notification is not shown (#2908)
fix signin error notification is not shown
2024-02-04 14:25:51 +08:00
Ikko Eltociear Ashimine 82e72813f9 chore: fix typo in About.tsx (#2899) 2024-02-04 08:33:13 +08:00
Steven 57510ddee5 chore: update readme with used resources 2024-02-03 23:42:24 +08:00
Steven 00c47a0673 chore: fix menu z-index 2024-02-03 23:17:03 +08:00
Steven 374f3f7d96 chore: fix filter initial state 2024-02-03 22:03:56 +08:00
Steven 8340e6b247 chore: upgrade gomark 2024-02-03 21:52:54 +08:00
Steven 7f5148d490 chore: clean dropdown 2024-02-01 21:56:08 +08:00
Steven c522e1450a chore: update codeblock style 2024-02-01 21:38:28 +08:00
Steven c342c464a2 chore: update services comment 2024-02-01 21:26:09 +08:00
Steven f6f193af2d chore: format proto 2024-02-01 21:15:56 +08:00
Steven dd06278692 feat: add batch upsert tags 2024-02-01 21:13:42 +08:00
Steven fdd17ce849 chore: update memo content key 2024-02-01 20:40:43 +08:00
Elliot Chen 7cd3fcbc61 fix: wrong order of the timeline in the resource page & add webhook when create memos using Telegram bot (#2886)
* fix: wrong order in resource page timeline

* feat: add webhook when create memos using Telegram bot

* rename variables and fix typos for static checks
2024-02-01 20:24:58 +08:00
Steven e78311b3af fix: initial gomark wasm 2024-02-01 19:39:41 +08:00
Steven e3afad74ce fix: update initial wasm 2024-02-01 19:27:54 +08:00
Steven 554f93eccc fix: move initial wasm into app 2024-02-01 19:06:44 +08:00
Steven 79227021f5 chore: bump version 2024-01-31 23:08:33 +08:00
Steven b4f2a3bd14 chore: remove migrator 2024-01-31 22:58:43 +08:00
Steven 0b4914d880 chore: update generated node types 2024-01-31 22:42:51 +08:00
Steven 2f0b0e0071 chore: remove node definition 2024-01-31 22:32:09 +08:00
Steven 8ce6a32aac feat: use gomark wasm in frontend 2024-01-31 22:25:24 +08:00
Wen Sun 3158c4b8b5 fix: role error in api/v2 when the first user registers (#2875)
Fix role error in api/v2 when the first user registers
2024-01-31 19:55:52 +08:00
Steven 30ae4140f3 chore: update gomark source 2024-01-31 19:01:08 +08:00
Lincoln Nogueira 279cba0e6b chore: greatly speed up migrator and lower memory usage (#2874)
* chore: add en-GB language

* chore: remove en-GB contents

* chore: prevent visitors from breaking demo
- prevent disabling password login
- prevent updating `memos-demo` user
- prevent setting additional style
- prevent setting additional script
- add some error feedback to system settings UI

* Revert "chore: add en-GB language"

This reverts commit 2716377b04.

* chore: speed-up migrator and lower memory usage
- remove all Store indirections
- query database directly with prepared statements

* chore: fix golangci-lint warnings
2024-01-31 16:45:21 +08:00
Lincoln Nogueira 52539fc130 chore: prevent visitors from breaking demo (#2869)
* chore: add en-GB language

* chore: remove en-GB contents

* chore: prevent visitors from breaking demo
- prevent disabling password login
- prevent updating `memos-demo` user
- prevent setting additional style
- prevent setting additional script
- add some error feedback to system settings UI

* Revert "chore: add en-GB language"

This reverts commit 2716377b04.
2024-01-31 13:16:31 +08:00
Steven 49e3eb107c chore: update gomark wasm 2024-01-31 00:25:01 +08:00
Lincoln Nogueira e7d5dfe515 chore: add en-GB language (#2865)
* chore: add en-GB language

* chore: remove en-GB contents
2024-01-30 23:39:13 +08:00
Steven 28c7a75ea2 chore: fix import nodes 2024-01-30 22:15:05 +08:00
Steven 59d69a05fa feat: initial gomark wasm importer 2024-01-30 22:12:44 +08:00
Steven ad2d492dec chore: move preview memo content 2024-01-30 22:10:17 +08:00
Elliot Chen bee6f278ba fix: the same-storage check in the new pre-sign feature (#2860)
* fix: error check for the same oss-storage

* fix: conflict error2 variable in code refactor in s3.go

* chore: rename endpointUrl to endpointURL
2024-01-30 19:07:16 +08:00
Brilliant Hanabi 1bad0543d0 feat: add notice when sharing private links (#2809)
Co-authored-by: boojack <stevenlgtm@gmail.com>
2024-01-30 19:06:30 +08:00
Noah Alderton 73337331cb feat: export all user Memos as a .zip of Markdown files (#2854)
* Add gRPC Memos Export

* Update code style

* Add URL.revokeObjectURL

* Rename protobuf and ESLint fix

* Change MemosExport to ExportMemos
2024-01-30 16:42:54 +08:00
Wen Sun 50f7f131ea fix: month grouping error in timeline page (#2861) 2024-01-30 07:56:03 +08:00
Steven a16bde23f7 chore: tweak variable name 2024-01-29 23:15:47 +08:00
Steven c5a5f67fdb refactor: migrate auth service 2024-01-29 23:12:02 +08:00
Steven de8db63811 chore: rename workspace setting service 2024-01-29 22:43:40 +08:00
Steven dd9ee44a1f docs: regenerate swagger 2024-01-29 22:05:33 +08:00
Aleksandr Baryshnikov fa17dce046 feat: pre-signed URL for S3 storage (#2855)
Adds automatically background refresh of all external links if they are belongs to the current blob (S3) storage. The feature is disabled by default in order to keep backward compatibility.

The background go-routine spawns once during startup and periodically signs and updates external links if that links belongs to current S3 storage.

The original idea was to sign external links on-demand, however, with current architecture it will require duplicated code in plenty of places. If do it, the changes will be quite invasive and in the end pointless: I believe, the architecture will be eventually updated to give more scalable way for pluggable storage. For example - Upload/Download interface without hard dependency on external link. There are stubs already, but I don't feel confident enough to change significant part of the application architecture.
2024-01-29 21:12:29 +08:00
Steven cbcec80c5d chore: fix import order 2024-01-29 21:08:30 +08:00
Steven 2b7bd47b44 fix: rss routes 2024-01-29 21:04:35 +08:00
Steven 54c5039db3 chore: fix golang linter 2024-01-29 19:17:25 +08:00
Steven af646ce2de refactor: move gomark 2024-01-29 19:14:46 +08:00
Steven f4ac7ff529 chore: update memo resource url 2024-01-28 23:02:38 +08:00
Steven 55ecdae509 chore: fix auto link matcher 2024-01-28 22:13:19 +08:00
Steven ef73299340 chore: update resource name migrator 2024-01-28 21:40:24 +08:00
Steven 8c6292925e chore: update code block styles 2024-01-28 15:41:11 +08:00
Steven f05a89315c chore: fix list memos 2024-01-28 08:38:29 +08:00
Steven a4452d8a2f chore: update linter rules 2024-01-28 08:17:11 +08:00
Steven 5e74394643 chore: add resource name migrator 2024-01-28 07:58:53 +08:00
Steven f4e722c516 chore: remove latest tag 2024-01-28 07:46:08 +08:00
Steven 12275c6a34 chore: fix linter warning 2024-01-28 07:38:01 +08:00
Steven 21ef5a9bc0 chore: tweak workspace service 2024-01-28 07:35:42 +08:00
Steven 87b23940a6 chore: upgrade backend dependencies 2024-01-28 07:13:11 +08:00
Steven 11dd23f59b chore: tweak link checks 2024-01-28 07:04:35 +08:00
Lincoln Nogueira 887903b66b feat: add buf plugin to generate openapiv2 spec (#2843) 2024-01-28 06:16:37 +08:00
Steven 309fab222e chore: implement nested blockquote 2024-01-27 21:38:07 +08:00
Steven 1dc4f02b64 chore: update memo requests 2024-01-27 20:35:48 +08:00
Steven 8db90a040c chore: remove unused dependencies 2024-01-27 20:20:36 +08:00
Steven 932f636d84 chore: update codeblock renderer 2024-01-27 19:09:10 +08:00
Steven ed32b20c9e chore: update frontend dependencies 2024-01-27 17:28:06 +08:00
Steven 10d709c167 chore: fix highlight cursor 2024-01-27 12:35:01 +08:00
Steven 8455114eef chore: fix list memos request 2024-01-27 11:17:59 +08:00
Steven c26109cd36 chore: update list memos request 2024-01-27 11:14:17 +08:00
Steven 4b223c1e4c chore: update collapse sidebar 2024-01-27 05:27:42 +08:00
Steven b9cbe6626f chore: update tag rename 2024-01-27 05:26:32 +08:00
Steven 566171783d chore: tweak embedded memo style 2024-01-26 23:33:40 +08:00
Steven 7edb3598ea chore: update default request limit 2024-01-26 23:03:10 +08:00
Steven bc2d2d0cde feat: support set embedded content in UI 2024-01-26 22:51:57 +08:00
Steven e1977df14b chore: remove check underscores 2024-01-26 21:23:36 +08:00
Wei Zhang ddc89029b7 fix: use mysql to parse dsn (#2838)
Signed-off-by: Zhang Wei <kweizh@gmail.com>
2024-01-26 13:43:48 +08:00
Steven f8b9a83d4a chore: tweak default value 2024-01-26 09:22:47 +08:00
Steven 2f16b7065a chore: tweak scripts 2024-01-26 09:15:27 +08:00
Steven e5ff1829a5 chore: add Hungarian locale 2024-01-26 08:44:12 +08:00
Steven d7889d9903 chore: tweak url filters 2024-01-26 08:39:53 +08:00
Steven db3457e081 chore: bump version 2024-01-26 08:30:22 +08:00
Steven 4f2b00b4f3 chore: add migration scripts 2024-01-26 08:29:11 +08:00
Steven 79558028c0 feat: implement rename tag 2024-01-25 23:09:35 +08:00
Steven 70d1301dc3 chore: use filter in url params 2024-01-25 20:05:47 +08:00
Steven 6d5e1def76 chore: update member section 2024-01-25 19:49:39 +08:00
boojack a5bc2d0ed6 chore: update i18n from Weblate (#2832)
* Added translation using Weblate (Hungarian)

* Translated using Weblate (Hungarian)

Currently translated at 0.3% (1 of 317 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/hu/

* Translated using Weblate (Hungarian)

Currently translated at 71.2% (226 of 317 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/hu/

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/

* Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (316 of 316 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/

* Translated using Weblate (Chinese (Traditional))

Currently translated at 100.0% (316 of 316 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hant/

---------

Co-authored-by: Vermunds <com.github@weylus.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
Co-authored-by: ti777777 <ti12272198686@yahoo.com.tw>
2024-01-25 19:36:02 +08:00
Steven 08ac60cc70 chore: update memo relation dialog 2024-01-25 08:59:10 +08:00
Mudkip f654d3c90e fix: encode filename when using url prefix for resources (#2829)
* fix: encode filename when using url prefix for resources

* fix: only encode the last parts of filename

* fix: encode all parts in filepath
2024-01-24 11:28:26 +08:00
Steven 1b69b73eb9 chore: update calendar styles 2024-01-23 23:15:54 +08:00
Steven 3dbb254aeb chore: update referenced memo title from params 2024-01-23 21:54:15 +08:00
Steven fdb1779a59 chore: implement referenced content renderer 2024-01-23 21:47:17 +08:00
Steven a316e239ce chore: implement referenced content node 2024-01-23 21:40:59 +08:00
Steven d7f02b94e5 chore: fix linter 2024-01-23 21:27:05 +08:00
Steven d165d87288 refactor: markdown parser matchers 2024-01-23 21:23:40 +08:00
Steven bf905bba86 chore: remove unused date picker 2024-01-22 22:50:27 +08:00
Brilliant Hanabi 3a129d5cfb fix: avoid making memos public when disabled (#2816)
* fix: avoid making memos public when disabled in v2

* fix: avoid making memos public when disabled in v1
2024-01-22 20:51:33 +08:00
ti777777 024a818e91 chore: update zh-Hant (#2815) 2024-01-21 23:50:44 +08:00
Steven 54a24833a7 chore: fix resource seeds 2024-01-21 21:36:31 +08:00
Steven a620d140c5 chore: update embedded content renderers 2024-01-21 21:27:04 +08:00
Steven 370054e040 chore: implement collapsed navigation 2024-01-21 21:02:55 +08:00
Steven fae0b4e900 chore: update memo relation style 2024-01-21 11:22:25 +08:00
Steven c38404b5d5 chore: tweak get memo by name 2024-01-21 10:57:53 +08:00
Steven 4d48f50815 chore: use resource name in frontend 2024-01-21 10:55:49 +08:00
Steven 582cc6609c feat: add user-defined id to resource 2024-01-21 10:49:30 +08:00
Steven 40bd75c725 fix: create memo with resource name 2024-01-21 10:33:31 +08:00
Steven b2fc3076f6 chore: update memo store 2024-01-21 01:23:55 +08:00
Steven 288527914b chore: migrate memo route 2024-01-21 01:23:44 +08:00
Steven a2aea3747c chore: remove server tests 2024-01-20 23:51:24 +08:00
Steven 8382354ef7 feat: add user-defined name to memo 2024-01-20 23:48:35 +08:00
Steven 264e6e6e9c chore: tweak file name 2024-01-20 23:47:04 +08:00
Steven eb72609ea3 chore: update memo editor cache key 2024-01-20 20:52:11 +08:00
Brilliant Hanabi 776785ac90 chore: update zh-Hans & zh-Hant translations (#2804) 2024-01-20 20:27:20 +08:00
Steven d5f874e185 chore: handle resource not found 2024-01-20 12:47:43 +08:00
Steven 89d940d9b7 feat: implement params field for embedded content node 2024-01-20 12:41:08 +08:00
Mark Zhao bd1cf62761 feat: enable iframe rendering in markdown code block (#2799)
* enable iframe rendering in code block

* fix eslint issue
2024-01-20 11:36:45 +08:00
Steven 196facfacd feat: implement embedded resource renderer 2024-01-20 09:17:31 +08:00
Steven afe75fd9f2 chore: fix tokens split tests 2024-01-20 02:09:33 +08:00
Steven 8a34013558 feat: implement embedded memo renderer 2024-01-20 01:56:10 +08:00
Steven 67f5ac3657 feat: implement subscript and superscript renderer 2024-01-19 23:10:16 +08:00
Steven 7236552b6c feat: implement subscript and superscript parsers 2024-01-19 23:06:22 +08:00
Steven 1f5899d238 chore: update dependencies 2024-01-19 19:20:59 +08:00
Wen Sun ec4884ea04 fix: incorrect timeline month display (#2792)
Fix incorrect timeline month display
2024-01-19 18:07:08 +08:00
Elliot Chen 2e0619b4dc feat: add a webhook action for deleted memos (#2791) 2024-01-19 09:56:00 +08:00
Steven c9146bc749 chore: update code style 2024-01-19 07:06:28 +08:00
Steven f5b5bd64bc chore: tweak datetime.ts 2024-01-18 22:18:56 +08:00
Steven d31d9eb71c chore: remove unused nil checks 2024-01-18 19:23:45 +08:00
Steven f28b654057 chore: fix setting nil checks 2024-01-18 19:20:48 +08:00
Steven 8738b68a44 chore: tweak readme 2024-01-18 19:06:49 +08:00
Steven 42381fa154 chore: add stable build action 2024-01-18 18:49:06 +08:00
Steven 22427101f8 chore: add stale issue action 2024-01-18 16:18:18 +08:00
Steven 2a4ebf5774 chore: add search bar in archived page 2024-01-18 15:28:37 +08:00
Steven 5172e4df7c chore: create memo visibility when creating 2024-01-18 15:20:22 +08:00
Steven 893dd2c85e chore: add disable filter to renderer context 2024-01-18 14:52:57 +08:00
Steven d426f89cf0 chore: add time filter to timeline 2024-01-18 14:30:20 +08:00
Steven 7de3de5610 chore: fix go test warning 2024-01-18 11:45:59 +08:00
Steven 2856e66609 chore: fix go test 2024-01-18 11:42:57 +08:00
Steven 354011f994 chore: handle filter in user profile page 2024-01-18 11:38:45 +08:00
Steven 8ed827cd2d chore: update table node delimiter 2024-01-18 11:36:13 +08:00
Steven 05c0aeb789 feat: implement table renderer 2024-01-18 10:49:28 +08:00
Steven aecffe3402 feat: implement table parser 2024-01-18 10:21:08 +08:00
Mehad Nadeem 70e6b2bb82 chore: added tooltip for vacuum button (#2778)
* chore: added tooltip for vacuum button

- At the moment only has text for English language therefore other JSON files need to be updated accordingly

* Update en.json
2024-01-18 08:09:49 +08:00
Steven 54296f0437 chore: update filter in timeline 2024-01-18 08:06:59 +08:00
Steven 8fcd9332f7 chore: tweak timeline styles 2024-01-17 22:32:58 +08:00
Steven 1857362d03 fix: locale and appearance setting 2024-01-17 22:16:12 +08:00
Steven 6d7186fc81 feat: rebuild timeline page 2024-01-17 21:59:49 +08:00
Wen Sun e4488da96e fix: signup is not allowed if password login is disabled (#2776)
Signup is not allowed if password login is disabled

If password login is disabled in the system configuration, the "signup" in the "/auth" page disappears, but the user can manually enter "/auth/signup" to access the system by creating a new user.
2024-01-17 10:49:22 +08:00
Steven cc43d06d33 chore: update memo stats response 2024-01-17 09:17:33 +08:00
Steven 9ffd827028 fix: appearance and locale initial value 2024-01-16 22:53:45 +08:00
Hanqin Guan 15e6542f0d fix: server overrides user's locale/appearance (#2771) 2024-01-16 18:21:08 +08:00
Noah Alderton 24bb3e096a fix: DatePicker by passing in Timezone to API (#2770)
* Fix DatePicker by passing in Timezone to API

* Add some clarity
2024-01-16 18:02:09 +08:00
Lincoln Nogueira 5bcbbd4c52 chore: fix store tests on Windows (#2769)
It's just a matter of explicitly closing the database, so that TempDir.removeAll doesn't fail.
2024-01-16 13:51:26 +08:00
Noah Alderton ff13d977e9 feat: add URL paste handler (#2768)
* feat: Add URL paste handler

* Check if text highlighted for URL pasting
2024-01-16 10:06:16 +08:00
Wen Sun 1fdb8b7b01 fix: apply customized profile name in mobile header (#2723)
Fix mobile header title, apply customized profile name
2024-01-16 09:04:03 +08:00
Wen Sun f1ee88c4e1 fix: display system logo in user banner if user not logged in (#2747)
Display system logo in user banner if user not logged in
2024-01-16 09:03:27 +08:00
Noah Alderton b578afbc6a fix: DatePicker Local Date (#2766)
Fix DatePicker Local Date
2024-01-16 08:35:48 +08:00
Steven ad94e8e3c6 feat: implement highlight renderer 2024-01-15 22:54:18 +08:00
Steven 3f4b361fad feat: implement highlight parser 2024-01-15 22:30:06 +08:00
Steven 46bd470640 chore: update favicon 2024-01-15 21:10:41 +08:00
Steven fdbf2d8af2 chore: fix blockquote renderer 2024-01-15 20:41:37 +08:00
Steven 5a723f00fa chore: split editor keydown handler 2024-01-15 20:33:42 +08:00
Noah Alderton 728a9705ea feat: Markdown Editor Keyboard Shortcuts (#2763)
* Add bold and italic keyboard shortcut

* Add hyperlink keyboard shortcut support
2024-01-15 20:19:59 +08:00
THELOSTSOUL cd3a98c095 fix: change use-set priority (#2760)
The user settings(locale, appearance) are not in use when restart broswer
2024-01-15 20:08:14 +08:00
Wen Sun a22ad90174 fix: set memo resources error in mysql (#2761)
Fix error updating memo resources in mysql
2024-01-15 20:05:07 +08:00
Steven 5ebbed9115 chore: handle tag click 2024-01-15 08:15:34 +08:00
Steven 7ae4299df2 chore: implement create resource 2024-01-15 08:13:06 +08:00
Noah Alderton 3d23c01e26 feat: add additional favicon formats (#2752)
Add additional favicons
2024-01-15 07:54:33 +08:00
Lincoln Nogueira 089e04bcfd chore: use webp compression on logo (#2756)
- Logo size reduced from 310 KB to 36 KB.
- Point metadata image URL to local logo instead of remote
2024-01-14 22:21:03 +08:00
Steven 98762be1e5 feat: implement indent for list nodes 2024-01-14 22:19:03 +08:00
Steven d44e74bd1e chore: update editor actions 2024-01-14 21:47:03 +08:00
Steven 8e0ce4d678 fix: list memos with pinned 2024-01-14 20:51:52 +08:00
Steven 45cf158508 chore: fix max width of home section 2024-01-14 20:25:45 +08:00
Anish Kelkar 7340ae15f7 chore: delete .vscode directory (#2693)
* Delete .vscode directory

* web/.vscode deleted
2024-01-14 20:12:57 +08:00
Steven 6db7ad76da chore: update tag selector 2024-01-13 16:26:42 +08:00
Steven 4a407668bc chore: tweak dialog close button 2024-01-13 15:33:23 +08:00
Steven ab1fa44f00 feat: implement markdown buttons 2024-01-13 15:09:06 +08:00
Steven cd0004cf88 chore: update icon version 2024-01-13 15:08:58 +08:00
Steven 667aaf06a0 chore: update dependencies 2024-01-13 14:33:50 +08:00
Steven a8074d94e8 chore: update image attrs 2024-01-13 14:08:36 +08:00
Hanqin Guan 16e68fbfff fix: duplicated/reflexive relation in v2 api. (#2750) 2024-01-13 07:21:19 +08:00
Wen Sun 81942b3b98 chore: updating the default scopes of GitHub SSO (#2746)
Updating the default scopes of GitHub SSO

The scope of "user" in GitHub OAuth includes permissions to update a user's profile.
2024-01-12 14:02:11 +08:00
Athurg Gooth a7cda28fc7 fix: filename with space (#2745) 2024-01-12 14:01:19 +08:00
Steven 0c52f1ee6a chore: tweak home style 2024-01-12 08:08:24 +08:00
Steven 1994c20c54 chore: tweak setting page 2024-01-11 22:25:05 +08:00
Steven a1dda913c3 chore: fix tag selector position 2024-01-11 21:36:22 +08:00
Athurg Gooth d626de1875 fix: pnpm install failed in docker (#2732)
fix pnpm install failed in docker
2024-01-11 21:29:55 +08:00
Wen Sun 6cfd94cc69 fix: deleting inbox records that senders have been deleted (#2743)
Deleting inbox records that senders have been deleted
2024-01-11 21:29:22 +08:00
Athurg Gooth 79b68222ff chore: set image loading to lazy (#2733)
set image loading to lazy to avoid concurrent problem
2024-01-11 10:27:18 +08:00
Steven aaec46a39c chore: update find memo with updated time 2024-01-10 00:10:59 +08:00
Steven 9c663b1ba2 fix: merge mysql dsn with params 2024-01-10 00:03:47 +08:00
Steven 777ed899a3 chore: add memo uid 2024-01-08 21:48:26 +08:00
Steven ddcf1d669d chore: add max content length 2024-01-08 21:17:21 +08:00
Steven 32d02ba022 chore: fix horizontal rule matcher 2024-01-08 21:00:45 +08:00
Steven 5449342016 fix: auto link converters 2024-01-08 20:57:44 +08:00
Noah Alderton 43e42079a4 feat: export Memos as Markdown FIles (#2716) 2024-01-08 11:40:50 +08:00
Steven cafa7c5adc chore: update backend dependencies 2024-01-06 19:46:35 +08:00
Steven 1258c5a5b0 chore: update workspace setting proto 2024-01-06 19:46:21 +08:00
Steven 83141f9be2 chore: tweak navigation styles 2024-01-06 19:12:26 +08:00
Steven 4c59035757 chore: update about page 2024-01-06 19:01:11 +08:00
Steven 9459ae8265 chore: update postgres stmt builder 2024-01-06 17:12:10 +08:00
Steven 8893a302e2 chore: update logs 2024-01-06 16:58:58 +08:00
Steven d67eaaaee2 chore: update database migrator 2024-01-06 16:55:13 +08:00
Steven fd8333eeda chore: fix memo parent_id 2024-01-06 13:22:02 +08:00
Steven f5a1739472 chore: update memo detail checks 2024-01-06 10:03:36 +08:00
Steven a297cc3140 chore: exclude comments in memo list response 2024-01-06 09:48:11 +08:00
Steven 79c13c6f83 chore: fix edit memo params 2024-01-06 09:25:17 +08:00
Steven 8b9455d784 chore: fix memo resources position 2024-01-06 09:23:20 +08:00
Steven 501f8898f6 chore: fix postgres stmts 2024-01-05 21:27:16 +08:00
Steven ee13927607 chore: fix restore tag node 2024-01-05 18:50:28 +08:00
Steven d2a9aaa9d4 chore: update line break renderer 2024-01-05 09:18:37 +08:00
Steven f563b58a85 chore: fix renderer props 2024-01-05 08:47:43 +08:00
Steven ce2d37b90c chore: fix find sibling node 2024-01-05 08:43:30 +08:00
Steven 454cd4e24f feat: implement switchable task list node 2024-01-05 08:40:16 +08:00
Steven 6320d042c8 chore: update home padding styles 2024-01-04 22:50:46 +08:00
Steven d7ed59581c chore: fix math block matcher 2024-01-04 21:50:13 +08:00
Steven 9593b0b091 chore: fix link rel field 2024-01-04 21:26:56 +08:00
Steven ca53630410 chore: update drawer background 2024-01-04 21:11:22 +08:00
Steven f484c38745 chore: fix dependencies 2024-01-04 20:07:53 +08:00
Steven d12a2b0c38 feat: implement math expression parser 2024-01-04 20:05:29 +08:00
Steven c842b921bc chore: update backend dependencies 2024-01-04 19:15:25 +08:00
Wen Sun 6b2eec86c2 fix: image upload failed with cloudflare R2 (#2704)
Fix image upload failed with cloudflare R2
2024-01-04 19:08:54 +08:00
Steven 2eba4e2cd4 chore: update version 2024-01-04 08:36:45 +08:00
Steven 73baeaa0ad chore: tweak dark mode styles 2024-01-04 08:32:14 +08:00
Steven c58851bc97 chore: tweak accent color 2024-01-03 23:30:28 +08:00
Steven 96140f3875 chore: tweak dark mode styles 2024-01-03 23:12:50 +08:00
Lincoln Nogueira 369b8af109 chore: improve resource internal_path migrator (#2698)
* chore: improve internal path migrator
- handle mixed path styles
- handle Windows paths
- add tests

* chore: fix goimports error
2024-01-03 08:31:59 +08:00
Steven 914c0620c4 chore: add statistics view 2024-01-03 08:22:32 +08:00
Steven 138b69e36e chore: fix memo comment 2024-01-03 08:19:38 +08:00
Elliot Chen 3181c076b2 feat: add {uuid} in path template when using local storage or S3 (#2696)
Add {uuid} in path template when using local storage or S3

Add an addition tag `{uuid}` to the `replacePathTemplate`.

It is a workaround to leak the public links of a resource when using S3-based object storage. Currently, all resource blobs stored in S3 (R2, OSS) are set to be public. It is insecure as the resources for the private memos are also accessible on the Internet. Using an additional {uuid} might reduce this risk.

Meanwhile, it is also possible to avoid filename conflict
2024-01-02 20:57:55 +08:00
Noah Alderton 673809e07d fix: docker-compose.dev.yaml (#2695)
* Fix docker-compose.dev.yaml

* Add newline to .gitignore
2024-01-02 18:33:19 +08:00
Steven f74fa97b4a chore: traverse nodes to upsert tags 2024-01-02 08:56:30 +08:00
Steven c797099950 chore: update resource internal path migrator 2024-01-02 08:29:18 +08:00
Steven 0f8bfb6328 chore: update index.html 2023-12-29 08:28:17 +08:00
Steven 4cd01ece30 chore: update frontend metadata 2023-12-29 08:19:32 +08:00
Lincoln Nogueira 14b34edca3 chore: fix misuse of package path instead of filepath.path (#2684)
As stated by https://pkg.go.dev/path, "path" is mainly for URLs, "path.filepath" for file systems
2023-12-29 07:50:15 +08:00
Lincoln Nogueira 411e807dcc chore: use consistent relative paths for resources (#2683)
- always store resources with a relative path with forward slashes, which will be transformed as needed when the file is accessed

- fix an issue with thumbnail generation on Windows

- add several validations for local storage setting

- improve front-end error feedback when changing local storage

- add migrations to make existing resource paths relative (not needed, but improves database consistency)
2023-12-29 07:49:55 +08:00
Steven ea87a1dc0c chore: update memo content props 2023-12-28 22:57:51 +08:00
Steven 46f7cffc7b feat: implement restore nodes 2023-12-28 22:35:39 +08:00
Steven 2a6f054876 chore: update auto link parser 2023-12-28 21:32:44 +08:00
Steven 30dca18b79 chore: fix suspense wrapper 2023-12-28 08:34:06 +08:00
Steven 09c195c752 chore: update backend dependencies 2023-12-28 08:28:50 +08:00
Steven 2ae6d94e2c chore: update frontend dependencies 2023-12-28 08:27:06 +08:00
Steven 9ee4b75bbd chore: tweak memo detail styles 2023-12-27 23:25:02 +08:00
Steven cc40803b06 chore: update feature request template 2023-12-27 09:00:16 +08:00
Steven a0a03b0389 chore: tweak list memos request 2023-12-27 08:54:00 +08:00
Steven 0dfc367e56 chore: start grpc server 2023-12-27 08:50:02 +08:00
Steven c8d7f93dca feat: implement auto link parser 2023-12-27 08:44:51 +08:00
Steven 6fac116d8c chore: update user store 2023-12-26 23:05:33 +08:00
subks f48ff102c9 fix: eslint check failure after fixing #2672 (#2673) 2023-12-26 21:46:26 +08:00
subks bd5a0679ee fix: date format in share memo dialog (#2672)
fix: Date format in shareable Memo Images (#2668)
2023-12-26 17:50:09 +08:00
Steven fcfb76a103 chore: remove user urlsets in sitemap 2023-12-23 19:35:46 +08:00
Steven 8e325f9986 chore: return username in user response 2023-12-23 19:23:39 +08:00
Steven b8eaf1d57e chore: deprecate memo creation stats legacy api 2023-12-23 18:35:47 +08:00
Steven 42608cdd8f chore: fix server context 2023-12-23 17:59:15 +08:00
Steven 2cfa4c3b76 chore: tweak frontend routes register 2023-12-23 17:58:49 +08:00
Steven aa136a2776 chore: remove vite pwa plugin 2023-12-23 17:42:13 +08:00
Steven 68413a5371 chore: update frontend service 2023-12-23 17:04:52 +08:00
Steven 638f17a02c chore: update scripts 2023-12-23 15:12:25 +08:00
Steven 273d6a6986 chore: update dockerfile 2023-12-23 14:13:40 +08:00
Steven 953141813c chore: regenerate pnpm lock file 2023-12-23 12:01:26 +08:00
Leyang be2db3f170 feat: use vite plugin pwa for generate right sw.js (#2658)
Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-12-23 12:00:03 +08:00
Steven eefce6ade3 chore: implement webhook dispatch in v2 api 2023-12-23 11:17:35 +08:00
Steven c6ebb5552e chore: add 403 page 2023-12-23 10:08:23 +08:00
Steven 4d64d4bf25 chore: upgrade frontend dependencies 2023-12-23 09:47:43 +08:00
Steven 2ee4d7d745 chore: add startTransition to links 2023-12-23 08:55:43 +08:00
Steven 1b81999329 chore: skip invalida setting checks 2023-12-23 08:55:23 +08:00
Steven df5aeb6d88 chore: remove v1 prefix in store name 2023-12-23 08:48:11 +08:00
Steven df3303dcd3 chore: update list users 2023-12-23 08:35:54 +08:00
Steven c267074851 chore: prevent archive/delete current user 2023-12-23 08:05:05 +08:00
Steven 21874d0509 chore: fix navigation errors 2023-12-23 08:01:16 +08:00
Steven 7898df2876 chore: update issue templates 2023-12-23 08:00:59 +08:00
Steven b2ec0d1217 chore: add skip cache requesting 2023-12-22 20:30:28 +08:00
Steven 5673e29e51 chore: compose memo in backend 2023-12-22 20:18:31 +08:00
Steven feefaabce9 chore: update heatmap click handler 2023-12-22 20:07:17 +08:00
Steven 29b540ade3 chore: fix fetch memos 2023-12-22 19:47:46 +08:00
Steven 919f75af1a chore: update suspense loading 2023-12-22 19:27:09 +08:00
Steven 17e905085f chore: update acl config 2023-12-22 09:11:55 +08:00
Steven 34af969785 chore: fix list memos order by pinned 2023-12-22 09:09:03 +08:00
Steven fd9c3ccbae chore: implement useMemoList store 2023-12-22 09:01:30 +08:00
Steven a3feeceace chore: remove component v1 suffix 2023-12-22 08:29:02 +08:00
Steven 02265a6e1a chore: fix memo search 2023-12-22 00:31:29 +08:00
Steven 81524c38e9 chore: refactor memo module 2023-12-21 23:40:43 +08:00
Steven 671551bdc1 chore: update memo detail page 2023-12-21 22:42:06 +08:00
Steven 10c81ccba3 chore: fix type definition 2023-12-21 21:43:28 +08:00
Steven 9361613f23 chore: update timeline page 2023-12-21 21:24:08 +08:00
Athurg Gooth b14334220f fix: trim the dirname of attachment send by telegram bot (#2651) 2023-12-21 09:47:57 +08:00
Athurg Gooth f184d65267 fix: attachments send from telegram lost (#2650) 2023-12-21 09:47:25 +08:00
Steven b64e2ff6ff chore: implement list memo resources api 2023-12-20 23:46:04 +08:00
Steven cbdae24314 chore: update archived page 2023-12-20 23:23:26 +08:00
Steven 762cb25227 chore: update memo service 2023-12-20 23:14:15 +08:00
Steven fc01a796f8 chore: fix demo seed data 2023-12-20 08:18:56 +08:00
Steven feb700f325 chore: clear access token when user not found 2023-12-20 07:42:02 +08:00
Steven 5334fdf1b2 chore: use api v2 in archived page 2023-12-19 23:49:24 +08:00
Steven abc14217f6 chore: tweak padding styles 2023-12-19 23:09:57 +08:00
Steven af68cae6ea chore: regenerate swagger docs 2023-12-19 22:37:07 +08:00
Steven e0cacfc6d6 chore: retire auto backup for sqlite 2023-12-19 22:34:06 +08:00
Steven b575064d47 chore: tweak padding 2023-12-19 21:44:40 +08:00
Steven 6290234ad1 chore: fix button styles 2023-12-19 21:29:07 +08:00
Steven aeed25648a chore: tweak drawer background 2023-12-19 08:55:21 +08:00
Steven 43e7506ed5 chore: fix react-uses import 2023-12-19 08:45:47 +08:00
Steven a3a1bbe8de chore: tweak responsible styles 2023-12-19 08:41:41 +08:00
Steven fe4ec0b156 chore: rename navigator 2023-12-19 00:13:22 +08:00
Steven 7c5fdd1b06 chore: remove demo banner 2023-12-18 23:46:48 +08:00
Steven 4d54463aeb chore: add mobile header 2023-12-18 23:33:09 +08:00
Steven 40bc8df63d chore: fix container height 2023-12-18 23:01:39 +08:00
Steven 61de7c8a32 chore: fix demo banner 2023-12-18 22:29:29 +08:00
Steven d6656db20d feat: implement part of full-screen layout 2023-12-18 22:10:36 +08:00
Steven 15a091fe4c chore: fix offset params in explore page 2023-12-18 20:54:51 +08:00
Steven d8a0528135 chore: tweak variable names 2023-12-18 20:47:29 +08:00
Steven 16fb5faebd chore: revert go mod update 2023-12-18 19:40:39 +08:00
Steven 2c4b5d75b3 chore: fix html escaping 2023-12-17 23:37:00 +08:00
Steven 770607f93f fix: add markdown service to acl 2023-12-17 11:37:38 +08:00
Steven db0eff4743 chore: clean frontend dependencies 2023-12-17 11:25:10 +08:00
Steven 0793f96578 chore: update heading styles 2023-12-17 11:08:13 +08:00
Steven 8095d94c97 chore: deprecate marked 2023-12-17 11:02:16 +08:00
Steven bcfcd59642 chore: deprecate old MemoContent 2023-12-17 10:58:22 +08:00
Steven 5d677c3c57 chore: implement node renderer components 2023-12-17 10:49:49 +08:00
Steven 28c0549705 feat: add markdown service 2023-12-17 09:53:22 +08:00
Steven bb42042db4 chore: implement task list parser 2023-12-16 12:48:52 +08:00
Steven 1c7fb77e05 chore: update user setting names 2023-12-16 12:18:53 +08:00
Steven e8ca2ea5a0 chore: rename renderer package 2023-12-16 11:57:36 +08:00
Steven e43a445c34 chore: implement escaping character node 2023-12-16 11:47:29 +08:00
Steven 1237643028 chore: update parser tests 2023-12-16 11:34:55 +08:00
Steven aee0e31b0a chore: update parser functions 2023-12-16 10:38:05 +08:00
Steven 47af632c79 chore: update inline parser 2023-12-16 10:09:20 +08:00
Steven 7b0ceee57b chore: update memo metadata description 2023-12-16 09:23:45 +08:00
Steven bdc867d153 fix: heading render 2023-12-16 09:12:55 +08:00
Steven 6421fbc68a chore: implement list html render 2023-12-16 09:01:19 +08:00
Steven b00443c222 chore: implement list nodes 2023-12-16 08:51:29 +08:00
Steven a10b3d3821 chore: tweak custom profile 2023-12-15 22:57:53 +08:00
Steven 7735cfac31 chore: update seed data 2023-12-15 22:34:19 +08:00
Steven 749187e1e9 chore: update dockerfile 2023-12-15 21:46:11 +08:00
Steven a9812592fe chore: tweak editor border styles 2023-12-15 21:35:31 +08:00
Steven e4070f7753 chore: bump version 2023-12-15 21:11:04 +08:00
Steven ff53187eae chore: add sitemap and robots routes 2023-12-15 20:18:01 +08:00
Steven 89ef9b8531 chore: add instance url system setting 2023-12-15 19:39:37 +08:00
Steven 56b55ad941 chore: update memo metadata 2023-12-15 19:13:56 +08:00
Steven 24672e0c5e chore: update memo metadata 2023-12-15 08:12:10 +08:00
Steven 52743017a3 chore: implement memo route 2023-12-15 07:32:49 +08:00
Steven 6cf7192d6a chore: add ssr placeholder in index.html 2023-12-14 23:29:42 +08:00
Steven 6763dab4e5 chore: handle newline in block parsers 2023-12-14 22:55:46 +08:00
Steven e0290b94b4 chore: use gomark in rss api 2023-12-14 22:33:20 +08:00
Steven 242f64fa8e chore: implement html render 2023-12-14 22:21:23 +08:00
Steven 3edce174d6 chore: remove unused methods 2023-12-14 00:24:41 +08:00
Steven 5266a62685 chore: implement html renderer 2023-12-14 00:04:20 +08:00
Steven 43ef9eaced chore: implement part of html renderer 2023-12-13 23:50:05 +08:00
Steven 453707d18c feat: implement gomark parsers 2023-12-13 21:00:13 +08:00
Steven 2d9c5d16e1 chore: fix user string 2023-12-13 19:08:06 +08:00
Steven b20e0097cf chore: implement part of nodes 2023-12-13 09:06:47 +08:00
Steven dd83782522 chore: add line break node 2023-12-12 23:38:43 +08:00
Steven aa3632e2ac chore: implement gomark skeleton 2023-12-12 23:24:02 +08:00
boojack 7f1f6f77a0 chore: update i18n with weblate (#2614)
* Translated using Weblate (French)

Currently translated at 100.0% (317 of 317 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/fr/

* Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (317 of 317 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/

---------

Co-authored-by: Ezmana <ezmana.land@gmail.com>
Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
2023-12-12 21:06:13 +08:00
Steven 7eb5be0a4e chore: fix update user 2023-12-12 20:01:31 +08:00
Steven 603a6a4971 chore: fix vacuum memo 2023-12-12 19:56:15 +08:00
Cologler 6bda64064e fix: delete one memo will delete all memos on pgsql (#2611)
fix: delete single memo will all memos on pgsql

Close #2605
2023-12-12 19:52:39 +08:00
Steven ec7992553f chore: go mod update 2023-12-11 22:21:05 +08:00
Steven e5de8c08f5 chore: clean debug code 2023-12-11 22:20:57 +08:00
Steven c608877c3e chore: clean binary entries 2023-12-11 22:16:39 +08:00
Steven 52f399a154 chore: remove unused functions 2023-12-11 21:53:16 +08:00
Gabe Cook 88728906a8 fix(copydb): fix migration to Postgres (#2601)
* chore(copydb): Use query builder during setup

* fix(copydb): Fix migration to Postgres
2023-12-11 18:05:15 +08:00
boojack 0916ec35da chore: update i18n with Weblate (#2594)
* Translated using Weblate (French)

Currently translated at 100.0% (317 of 317 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/fr/

* Translated using Weblate (French)

Currently translated at 100.0% (317 of 317 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/fr/

---------

Co-authored-by: Ezmana <ezmana.land@gmail.com>
Co-authored-by: LibreTranslate <noreply-mt-libretranslate@weblate.org>
2023-12-10 15:49:29 +08:00
Steven 9f4f2e8e27 chore: fix user setting values 2023-12-10 11:57:31 +08:00
Steven 82009d3147 chore: tweak webhook section 2023-12-10 10:21:36 +08:00
Steven 0127e08a28 fix: data conflict handler 2023-12-10 10:07:26 +08:00
Steven d275713aff chore: fix timestamp type in postgres 2023-12-09 23:19:57 +08:00
Steven c50f4f4cb4 chore: update migration scripts 2023-12-09 22:18:05 +08:00
Steven fa34a7af4b chore: tweak memo parent styles 2023-12-09 19:32:16 +08:00
Steven 77b75aa6c4 chore: tweak memo display 2023-12-09 18:57:59 +08:00
Steven 9faee68dab chore: code clean 2023-12-09 18:57:18 +08:00
Steven 4f05c972d5 chore: fix jwt acl 2023-12-09 16:17:11 +08:00
Steven abda6ad041 chore: update latest schema 2023-12-09 12:05:45 +08:00
Steven 7fc7b19d64 chore: deprecate user setting legacy api 2023-12-08 22:41:47 +08:00
Steven b2d898dc15 chore: fix import order 2023-12-08 22:06:42 +08:00
Steven 15425093af chore: skip user setting key checks 2023-12-08 22:05:43 +08:00
K.B.Dharun Krishna b02aa2d5e5 chore: bump actions in workflows (#2588)
Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2023-12-08 09:55:18 +08:00
steven c68bfcc3b9 chore: fix user setting store 2023-12-08 09:54:32 +08:00
Athurg Gooth 2964cf93ab fix: visibility of user preference is empty (#2581)
Fix visibility of user preference is empty
2023-12-07 22:50:03 +08:00
Arnaud Brochard 787cf2a9fe feat: tables support (#2573)
* Tables support

* Linter fixes

* Regex Redos fix

* Fix empty row and variables proper naming

* Default cell style

* Now unncessary

* Support rows without a starting pipe char

* Striped rows

* Fix parsing issues

* Support tabs in separators
2023-12-07 22:49:49 +08:00
Athurg Gooth ed190cd41e fix: visibility of memo editor is empty (#2580)
Fix visibility of memo editor is empty
2023-12-06 23:17:26 +08:00
Steven 33dda9bf87 chore: fix auth status checks 2023-12-06 23:03:24 +08:00
Steven fa6693a7ae chore: update list memos 2023-12-06 22:44:49 +08:00
t.yang 055a327b5e fix: detail page user-avatar size have unexpected height (#2576)
Co-authored-by: tyangs.yang <tyangs.yang@hstong.com>
2023-12-06 10:58:33 +08:00
Athurg Gooth aff1b47072 chore: remove debug log (#2582)
Remove debug log
2023-12-06 10:57:55 +08:00
Athurg Gooth 5f86769255 fix: field type of row_status for table webhook (#2579)
Fix field type of row_status for table webhook
2023-12-06 10:57:03 +08:00
Irving Ou 9c18960f47 feat: support Postgres (#2569)
* skeleton of postgres

skeleton

* Adding Postgres specific db schema sql

* user test passed

* memo store test passed

* tag is working

* update user setting test done

* activity test done

* idp test passed

* inbox test done

* memo_organizer, UNTESTED

* memo relation test passed

* webhook test passed

* system setting test passed

* passed storage test

* pass resource test

* migration_history done

* fix memo_relation_test

* fixing server memo_relation test

* passes memo relation server test

* paess memo test

* final manual testing done

* final fixes

* final fixes cleanup

* sync schema

* lint

* lint

* lint

* lint

* lint
2023-12-03 13:31:29 +08:00
Webysther Sperandio 484efbbfe2 chore: update manifest.json (#2568) 2023-12-01 16:43:48 +08:00
Steven e83d483454 refactor(frontend): use auth service 2023-12-01 09:15:02 +08:00
Steven b944418257 fix: register auth service 2023-12-01 09:13:32 +08:00
Steven 4ddd3caec7 chore: update user setting api 2023-12-01 09:03:30 +08:00
Steven c1f55abaeb chore: update user setting api 2023-11-30 23:08:54 +08:00
Steven fff42ebc0d fix: check auth status 2023-11-30 21:52:02 +08:00
Steven 2437419b7f fix: add auth status checks 2023-11-30 20:58:36 +08:00
boojack e53cedaf14 chore: update i18n with weblate (#2562)
* Translated using Weblate (Polish)

Currently translated at 46.3% (147 of 317 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pl/

* Translated using Weblate (Polish)

Currently translated at 56.1% (178 of 317 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pl/

---------

Co-authored-by: igormakarowicz <igormakarowicz@gmail.com>
2023-11-30 19:34:50 +08:00
Steven 6d469fd997 chore: fix image size 2023-11-30 19:36:12 +08:00
boojack 9552cddc93 chore: update graph format 2023-11-29 09:00:29 +08:00
boojack 34181243e5 chore: update graph route 2023-11-28 23:06:19 +08:00
boojack a0eb891132 chore: update contributor graph source 2023-11-28 22:31:34 +08:00
Steven e136355408 chore: tweak setting button style 2023-11-28 21:15:24 +08:00
Steven 5069476dcc chore: add webhook metric 2023-11-28 21:15:10 +08:00
Steven f950750d56 chore: tweak storage list title 2023-11-28 21:03:21 +08:00
Steven 0026f9e54f chore(frontend): add webhooks section 2023-11-28 20:52:48 +08:00
Steven f8f73d117b chore: update healthz message 2023-11-26 23:33:34 +08:00
Steven 8586ebf098 chore: add /healthz endpoint 2023-11-26 23:06:50 +08:00
Steven 472afce98f chore: fix current user store 2023-11-25 22:58:17 +08:00
Steven a12844f5db chore: tweak seed data 2023-11-25 10:34:54 +08:00
Steven bc965f6afa chore: implement webhook dispatch in api v1 2023-11-25 10:31:58 +08:00
Steven db95b94c9a chore: implement webhook service 2023-11-24 23:04:36 +08:00
Steven 1a5bce49c2 chore: implement webhook store 2023-11-24 22:45:38 +08:00
Steven 436eb0e591 chore: tweak s3 comments 2023-11-24 21:55:09 +08:00
Hou Xiaoxuan e016244aba fix: remove ACL when set URLPrefix (#2532) 2023-11-23 23:20:11 +08:00
Steven d317b03832 feat: add search box in resources dashboard 2023-11-23 22:12:15 +08:00
Athurg Gooth 3e138405b3 chore: remove the max height limit for single media (#2545)
Remove the max-height limit for single media
2023-11-23 09:59:33 +08:00
Steven 0dd0714ad0 chore: update security 2023-11-23 08:55:57 +08:00
Steven 45d7d0d5f6 chore: migrate get current user 2023-11-23 08:50:33 +08:00
boojack c3db4ee236 chore: translated using Weblate (Portuguese (Brazil)) (#2543)
Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (316 of 316 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/

Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
2023-11-22 23:22:10 +08:00
Athurg Gooth 91296257fc chore: remove invalid access token from db (#2539)
Remove invalid access token from db
2023-11-22 23:20:45 +08:00
Steven e5f660a006 chore: migrate update user 2023-11-22 23:11:29 +08:00
Steven c0628ef95b chore: migrate create user 2023-11-22 22:58:04 +08:00
Steven c0b5070e46 chore: migrate delete user 2023-11-22 22:52:19 +08:00
Steven b1128fc786 chore: fix inline latext renderer 2023-11-22 22:38:03 +08:00
Steven bcd8a5a7a9 chore: migrate get tag suggestions 2023-11-22 22:33:02 +08:00
boojack 0cf280fa9a chore: translated using Weblate (Croatian) (#2541)
Translated using Weblate (Croatian)

Currently translated at 92.7% (293 of 316 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/hr/

Co-authored-by: May Kittens Devour Your Soul <yoshimitsu002@gmail.com>
2023-11-22 19:22:12 +08:00
Steven b11653658d chore: update readme 2023-11-21 20:39:48 +08:00
Cheng Jiang adf96a47bb fix: correct some Chinese translation inaccuracy (#2536)
Signed-off-by: Cheng Jiang <gabriel.chengj@gmail.com>
2023-11-21 10:58:19 +08:00
Steven 6529375a8b chore: update seed data 2023-11-19 23:58:35 +08:00
Steven e7e83874cd chore: upgrade version 2023-11-19 11:01:21 +08:00
Steven 7ef125e3af chore: update fetch tags 2023-11-19 11:01:04 +08:00
Steven dfa14689e4 chore: add click away event to date picker 2023-11-19 10:41:08 +08:00
Steven ec2995d64a chore: fix order by pinned 2023-11-19 09:42:59 +08:00
Steven 94c71cb834 chore: fix loading status 2023-11-19 09:38:04 +08:00
Steven 7f7ddf77b8 chore: update allow sign up default value 2023-11-18 12:51:07 +08:00
Steven 089cd3de87 chore: fix linter 2023-11-18 12:44:49 +08:00
zty 2d34615eac fix: parse inline latex as a inline element (#2525)
* fix:  parse inline latex as a inline element

* Update web/src/labs/marked/parser/InlineLatex.tsx

---------

Co-authored-by: zty <zty.dev@outlook.com>
Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-11-18 12:41:33 +08:00
Steven 4da3c1d5e5 chore: fix update user 2023-11-18 12:37:24 +08:00
zty 4f222bca5c fix: keep content and query param on save when access token is invalid (#2524)
fix:
keep content on save when access token is invalid

Co-authored-by: zty <zty.dev@outlook.com>
2023-11-17 10:01:14 +08:00
Steven 0bb0407f46 chore: add overflow tips to tag 2023-11-17 08:22:47 +08:00
Zexi 8bc117bce9 feat: optimize media resource display (#2518)
* feat: optimize media resource display

* fix: type error

* Update web/src/components/MemoResourceListView.tsx

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

* Update MemoResourceListView.tsx

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-11-17 08:03:26 +08:00
Athurg Gooth afd0e72e37 chore: skip timeout for blob upload (#2516)
Skip timeout for blob upload
2023-11-15 17:23:56 +08:00
Vespa314 d758ba2702 fix: allow host role update user info (#2515) 2023-11-15 11:43:49 +08:00
Leyang 0f126ec217 docs: add obsidian plugin (#2512) 2023-11-14 23:22:54 +08:00
Steven c1a6dc9bac chore: fix home sidebar max width 2023-11-14 23:23:05 +08:00
Athurg Gooth 6ee95a2c0c fix: clear localStorage while draft is empty (#2510)
* Clear localStorage while draft is empty

* change == into ===
2023-11-14 10:02:16 +08:00
Athurg Gooth 6814915c88 feat: backup file rotate (#2511)
Add support for rotate backup files
2023-11-13 22:12:25 +08:00
Athurg Gooth 52fdf8bccd fix: persist jwt expires by cookie (#2509)
fix pesist jwt expires by cookie
2023-11-13 13:52:04 +08:00
Mahoo Huang f67757f606 feat: add editor auto focus preference (#2498)
* feat: add editor auto focus perference

* feat: set editor auto focus
2023-11-13 13:51:52 +08:00
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
Vespa314 65022beb0d fix: duplicate memo filter in user profile page (#2502) 2023-11-11 23:20:53 +08:00
swebdev 5d81338aca fix: demo banner link for self-hosting guide (#2499) 2023-11-11 19:15:24 +08:00
Steven c288d49138 chore: fix decouple user name 2023-11-10 23:08:11 +08:00
Steven 0ea0645258 chore: add use reponsive width 2023-11-10 11:22:32 +08:00
steven 9227ca5b5b chore: update debounce ms 2023-11-09 08:52:02 +08:00
steven eb6b0ddead chore: update navigation 2023-11-09 08:46:26 +08:00
Steven dca90fb5d2 chore: update header 2023-11-09 08:27:46 +08:00
steven 172e27016b chore: upgrade frontend deps 2023-11-09 08:26:00 +08:00
steven 6da2ff7ffb chore: clean logs 2023-11-09 08:25:28 +08:00
Steven 6c433b452f chore: update user checks 2023-11-08 22:58:35 +08:00
Steven 65a34ee41a chore: update home sidebar 2023-11-08 22:18:12 +08:00
Steven 5ff0234c71 chore: update response styles 2023-11-08 22:10:15 +08:00
Steven e76509a577 chore: update header menu style in mobile view 2023-11-08 22:00:49 +08:00
Steven 4499f45b67 chore: deprecate daily review offset local setting 2023-11-08 21:49:03 +08:00
boojack 504d1768f2 chore: update i18n with Weblate (#2492)
* Translated using Weblate (Chinese (Traditional))

Currently translated at 91.7% (290 of 316 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hant/

* Translated using Weblate (Chinese (Traditional))

Currently translated at 100.0% (316 of 316 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hant/

---------

Co-authored-by: dwong33 <dwong@posteo.ch>
2023-11-08 13:02:24 +08:00
zty caea065594 feat: add share btn in more-action (#2491)
Co-authored-by: zty <zty.dev@outlook.com>
2023-11-08 10:34:07 +08:00
Athurg Gooth 2ee426386a fix: skip system_setting check while copydb (#2490)
Skip system_setting check while copydb
2023-11-08 10:06:27 +08:00
boojack 9df05fe0fa chore: update i18n from Weblate (#2489)
* Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (316 of 316 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/

* Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (316 of 316 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/

---------

Co-authored-by: LibreTranslate <noreply-mt-libretranslate@weblate.org>
Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
2023-11-07 22:39:27 +08:00
zty 184f79ef8e feat: support code in headings (#2488)
Co-authored-by: zty <zty.dev@outlook.com>
2023-11-07 22:38:38 +08:00
Athurg Gooth 35f0861d6e fix: prevent copydb to create a fresh memos (#2486)
Prevent copydb to create a fresh memos
2023-11-07 13:53:53 +08:00
Steven c4d27e7a78 chore: update backend dependencies 2023-11-07 07:36:16 +08:00
Steven 7e545533cf chore: update resource cache control 2023-11-07 07:24:41 +08:00
Steven 32cafbff9b chore: add OverflowTip kit component 2023-11-07 07:20:17 +08:00
Steven 9c4f72c96e chore: update tooltips 2023-11-07 07:06:38 +08:00
Steven 5e4493b227 chore: remove debug codes 2023-11-06 23:20:26 +08:00
Steven 834b58fbbd feat: add version update inbox message 2023-11-06 22:53:55 +08:00
Steven 342d1aeefb fix: version checker 2023-11-06 22:33:12 +08:00
Steven 363c107359 chore: update frontend deps 2023-11-06 21:08:09 +08:00
boojack 0458269e15 revert: "chore: add frontend type definitions" (#2483)
Revert "chore: add frontend type definitions (#2482)"

This reverts commit 64d4db81ca.
2023-11-06 21:01:17 +08:00
boojack 64d4db81ca chore: add frontend type definitions (#2482)
chore: update
2023-11-06 21:00:42 +08:00
Steven 865cc997a4 chore: remove upgrade version banner 2023-11-06 20:51:59 +08:00
Steven 981bfe0464 feat: add version checker 2023-11-06 20:49:02 +08:00
Steven 695fb1e0ca chore: update migration history store 2023-11-06 08:33:31 +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 3266c3a58a chore: update link styles 2023-11-05 22:26:09 +08:00
Steven ef820a1138 chore: fix memo editor padding in daily review 2023-11-05 21:42:02 +08:00
Steven 137e64b0dd chore: update metrics 2023-11-05 21:41:47 +08:00
Steven 982b0285c9 chore: fix date picker 2023-11-05 16:02:51 +08:00
Steven 405fc2b4d2 chore: simplify find migration history 2023-11-05 15:49:57 +08:00
Steven eacd3e1c17 chore: fix mysql latest schema 2023-11-05 15:38:45 +08:00
Christopher a62f1e15a6 fix: private memos being public (#2480)
* fix(web/memo): filter out public option

Filter out the public option if we have disabled public memos

* feat(api/memo): sanity check for disabled public memos

In case something goes wrong, we check the system setting on the backend in order to valdiate if we can create a public memo

* refactor(web/memo): disable public option

Seems like a better option than removing it, as it looks werid if you are looking at a memo that is previously public

* fix(web/memo): use translation keys

* chore(web/editor): remove unsused tooltip

* revert(api/memo): sanity check

* fix(web/memo): allow admins to create public memos

* chore(web/memo): remove unused import

* fix(web/memo): check for both host and admin

* fix(web/memo): remove warning text from MemoDetail
2023-11-05 01:19:54 +08:00
Zexi 8b0083ffc5 fix: auto fetch more (#2472)
* fix: auto fetch more

* feat: use union type
2023-11-03 05:16:55 +08:00
Athurg Gooth 5d69d89627 feat: week from monday in heatmap for zh-Hans and ko (#2457)
* week from monday in heatmap for zh-Hans and ko

* optimize code
2023-10-31 12:06:14 +08:00
Athurg Gooth b966c16dd5 fix: data too large for mysql (#2470)
* Extend some TEXT field to LONGTEXT in mysql

* move db migration version

* fix error in migrate SQL
2023-10-31 10:23:15 +08:00
Steven 97190645cc chore: update memo editor styles 2023-10-29 23:59:23 +08:00
Steven c26417de70 chore: update docs links 2023-10-29 18:36:09 +08:00
Steven f5c1e79195 chore: update about dialog 2023-10-28 15:17:33 +08:00
Steven d02105ca30 chore: update i18n 2023-10-28 15:10:20 +08:00
Steven 44e50797ca chore: update go mods 2023-10-28 14:57:39 +08:00
Steven 7058f0c8c2 chore: add docs link in settings 2023-10-28 14:56:08 +08:00
Steven f532ccdf94 chore: upgrade frontend deps 2023-10-28 14:55:57 +08:00
Steven a6fcdfce05 chore: update memo comment i18n 2023-10-28 11:39:10 +08:00
Steven dca712d273 chore: fix resource tests 2023-10-28 10:51:03 +08:00
Steven ac81d856f6 chore: delete resource file sync 2023-10-28 10:42:39 +08:00
Steven 88fb79e458 chore: impl inbox store for mysql 2023-10-28 09:44:52 +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
Athurg Gooth 4f1bb55e55 fix: metric env not affect (#2450)
fix metric env not affect
2023-10-27 23:26:23 +08:00
Athurg Gooth 20d3abb99a chore: downgrade log level for auto backup disable (#2454)
downgrade log level for auto backup disable
2023-10-27 23:25:51 +08:00
Steven 1b34119e60 chore: update activity store definition 2023-10-27 23:24:56 +08:00
Steven 9d2b785be6 chore: fix inbox test 2023-10-27 23:17:17 +08:00
Steven 36b4ba33fa chore: remove outdated activity definition 2023-10-27 23:11:56 +08:00
Steven 625ebbea1a chore: update proto linter action 2023-10-27 21:49:07 +08:00
Athurg Gooth 0f4e5857f0 chore: remove gRPC listener (#2456)
Disable gRPC listener
2023-10-27 21:38:17 +08:00
Athurg Gooth 76d955a69a chore: docker compose dev (#2458)
* add golang build cache volume to speedup build

* replace `lint` with `npm` to run more scripts

* wrap golangci-lint as entrypoint instead of command
2023-10-27 21:21:52 +08:00
Athurg Gooth e41ea445c9 fix: missing relation after post comment (#2452)
fix missing relation after post comment
2023-10-27 10:12:25 +08:00
boojack c952651dc1 chore: update i18n from Weblate (#2455)
* Translated using Weblate (Croatian)

Currently translated at 92.3% (290 of 314 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/hr/

* Translated using Weblate (Korean)

Currently translated at 100.0% (314 of 314 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/ko/

---------

Co-authored-by: May Kittens Devour Your Soul <yoshimitsu002@gmail.com>
Co-authored-by: nulta <un5450@naver.com>
2023-10-27 10:12:02 +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
Steven 67d2e4ebcb chore: update method name 2023-10-27 08:36:43 +08:00
Steven 4ea78fa1a2 chore: impl inbox store methods 2023-10-27 08:17:58 +08:00
Steven 93b8e2211c chore: update dev latest schema 2023-10-27 01:18:00 +08:00
Steven 052216c471 chore: fix list activities typo 2023-10-27 01:11:41 +08:00
Steven e5978a70f5 chore: initial inbox store model 2023-10-27 01:10:19 +08:00
Steven 59f0ee862d chore: fix viper default value 2023-10-27 00:49:58 +08:00
Athurg Gooth 215981dfde chore: remote context.Context pointer (#2448)
remote context.Context pointer
2023-10-26 20:21:44 +08:00
Athurg Gooth bfdb33f26b chore: add a flag to change metric switch (#2447)
* add a flag to change metric switch

* change the default value of metric
2023-10-26 20:21:18 +08:00
Steven 5b3af827e1 chore: move common packages to internal 2023-10-26 09:02:50 +08:00
Steven 9859d77cba chore: update links 2023-10-26 09:00:36 +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 3a5deefe11 chore: disable NPM update notice while running lint (#2438)
Disable NPM update notice while running lint
2023-10-25 10:00:45 +08:00
Athurg Gooth 2c71371b29 chore: update @typescript-eslint to avoid WARNING (#2437)
Update @typescript-eslint to avoid WARNING
2023-10-25 10:00:30 +08:00
Steven 222e6b28b7 chore: update website links in readme 2023-10-25 07:43:52 +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
Zexi 035d71e07c fix: visibility translation (#2429)
* fix: visibility translation

* refactor: remove useless file

* feat: add visibility icon
2023-10-23 08:06:59 +08:00
Christopher 82effea070 tweak(web): use iconbutton for editor helpers (#2426) 2023-10-22 22:10:27 +08:00
Lincoln Nogueira 331f4dcc1b chore: update dev scripts (#2427)
- add type-gen
- remove some unused air settings
- restrict air monitoring to changed go files
2023-10-22 22:09:25 +08:00
Lincoln Nogueira 055b246857 chore: update ci (#2428)
- restrict codeql and backend tests from running on pull requests with unrelated files
- upgrade codeql: current version is generating a deprecation warning in logs
2023-10-22 22:08:38 +08:00
boojack 8fc9a318a4 chore: translated using Weblate (Portuguese (Brazil)) (#2422)
Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (314 of 314 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/

Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
2023-10-22 12:27:29 +08:00
MotH 9aed80a4fd feat: better tag suggestion (#2421)
Better Tag Suggestion
2023-10-22 09:15:25 +08:00
MotH c31f306b5b fix: smaller logo file (#2418) 2023-10-22 05:51:37 +08:00
Steven bfd2dbfee2 chore: fix update resource api 2023-10-21 12:41:55 +08:00
Steven c42af95dd3 chore: fix update user 2023-10-21 12:22:23 +08:00
Steven 89a073adc0 chore: implement create user api v2 2023-10-21 12:19:06 +08:00
Steven 1c2d82a62f chore: remove major label 2023-10-21 09:36:50 +08:00
Steven 02f7a36fa4 chore: remove unsupported linux/arm/v7 2023-10-21 08:29:21 +08:00
Steven a76f762196 chore: update memo share dialog 2023-10-21 08:19:25 +08:00
Steven 2c2955a229 chore: add back linux/arm/v7 2023-10-21 08:15:25 +08:00
Steven d06d01cef2 chore: release mysql driver 2023-10-21 01:25:07 +08:00
boojack 4b91738f21 chore: translated using Weblate (Croatian) (#2413)
Translated using Weblate (Croatian)

Currently translated at 87.5% (274 of 313 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/hr/

Co-authored-by: May Kittens Devour Your Soul <yoshimitsu002@gmail.com>
2023-10-21 01:23:12 +08:00
Steven 12fd8f34be chore: fix styles 2023-10-21 01:23:21 +08:00
Steven c2ab05d422 chore: fix member section style 2023-10-21 01:09:52 +08:00
Steven 7b25b8c1e1 feat: update daily review 2023-10-21 00:57:44 +08:00
Athurg Gooth af7c0a76d0 fix: fail to update user's update_ts (#2410) 2023-10-20 19:10:38 +08:00
Athurg Gooth 664c9c4a7c chore: extend height of setting page (#2407)
Extend height of setting page
2023-10-20 17:41:37 +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 1b105db958 chore: fix field syntax 2023-10-20 08:52:16 +08:00
Steven a541e8d3e3 chore: upgrade version 2023-10-20 08:49:58 +08:00
Steven 6f2ca6c87a chore: update find memo api 2023-10-20 08:48:52 +08:00
Steven 952539f817 chore: update memo editor dialog 2023-10-20 08:19:08 +08:00
Steven c87b679f41 chore: add memo relation list 2023-10-19 21:26:38 +08:00
Baksi e6b20c5246 chore: update Shortcuts link (#2405)
* Update Shortcuts

* Update README.md

* Update README.md
2023-10-19 04:56:59 -05:00
Athurg Gooth 0bfcff676c feat: add support for remember sign in (#2402) 2023-10-18 20:38:49 -05:00
Athurg Gooth 37601e5d03 chore: change the timeout value of golangci-lint (#2403) 2023-10-18 20:37:35 -05:00
Steven 21c70e7993 feat: update memo relations dialog 2023-10-19 00:18:07 +08:00
Athurg Gooth 22d331d6c4 chore: switch storage of selected date in DailyReview (#2399)
Switch storage of selected date in DailyReview
2023-10-18 09:06:34 -05:00
Steven 9bfb2d60b9 chore: tweak wording 2023-10-18 06:05:19 +08:00
Steven 203b2d9181 chore: fix container styles 2023-10-18 06:02:39 +08:00
boojack ddc4566dcb chore: translated using Weblate (German) (#2396)
Translated using Weblate (German)

Currently translated at 99.6% (312 of 313 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/de/

Co-authored-by: Frank Emmerlich <femmdi2012@gmail.com>
2023-10-17 10:49:36 -05:00
Steven 1755c9dc79 chore: update button style 2023-10-17 23:49:26 +08:00
Steven a5df36eff2 chore: update metrics 2023-10-17 23:44:16 +08:00
Athurg Gooth e30d0c2dd0 fix: image width error while loading (#2394)
fix image width error while loading
2023-10-17 09:00:45 -05:00
boojack 213c2ea71b chore: translated with Weblate (German) (#2390)
Translated using Weblate (German)

Currently translated at 99.6% (312 of 313 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/de/

Co-authored-by: Frank Emmerlich <femmdi2012@gmail.com>
2023-10-16 11:21:11 -05: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
TianLun Song c999d71455 chore: update iOS shortcut link (#2387)
* Update README.md

New shortcut for memos version 0.15.0 and above on IOS

* Update README.md

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-10-16 08:06:36 -05:00
Steven 5359d5a66d chore: add container-queries tailwind plugin 2023-10-14 14:13:55 +08:00
Steven c58820fa64 chore: update username regexp 2023-10-14 13:42:27 +08:00
Steven cfc5599334 chore: cleanup less files 2023-10-14 12:06:24 +08:00
Steven c02f3c0a7d chore: remove less files in editor 2023-10-14 11:55:37 +08:00
Steven dd83358850 chore: update some styles 2023-10-14 01:12:41 +08:00
Steven d95a6ce898 chore: add ar locale item 2023-10-14 00:25:01 +08:00
boojack 7e80e14f16 chore: add Arabic from weblate (#2382)
* Added translation using Weblate (Arabic)

* Translated using Weblate (Arabic)

Currently translated at 46.6% (146 of 313 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/ar/

---------

Co-authored-by: Ali AlShaikh <Mi3LiX9@outlook.sa>
2023-10-13 11:11:56 -05:00
Steven 219304e38d chore: update frontend deps 2023-10-13 23:29:55 +08:00
Steven 20e5597104 chore: fix memo container max width 2023-10-13 23:26:56 +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 a0f8e6987c chore: update go deps 2023-10-13 00:08:52 +08:00
Athurg Gooth d3e32f0d5a chore: add latency in log (#2374)
* Print profile.Data in boot log

* Add latency in request log
2023-10-10 06:03:32 -05:00
Athurg Gooth 95bfcb8055 chore: print profile.Data in boot log (#2373)
Print profile.Data in boot log
2023-10-10 05:59:19 -05:00
Athurg Gooth 096c489eb3 feat: copy data between drivers (#2370)
* Add copydb command to copy data between drivers

* Check if table is empty before copy
2023-10-09 22:45:17 -05:00
boojack b6425f9004 chore: update i18n with weblate (#2369)
* Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (315 of 315 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (315 of 315 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/

---------

Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
Co-authored-by: Qing Long <longyinx@duck.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
2023-10-09 10:54:54 -05:00
Steven ab2c86640b chore: move rate limiter to apiv1 2023-10-09 23:10:41 +08:00
Steven 1489feb054 chore: update common dialog default color 2023-10-09 23:08:52 +08:00
Steven acdeabb861 chore: add issue template config.yml 2023-10-09 22:10:28 +08:00
Athurg Gooth 6bb6c043e5 feat: add support for ListMemoOrganizer (#2367)
* Add support for ListMemoOrganizer

* fix rows not close
2023-10-09 08:18:47 -05:00
Athurg Gooth fa2bba51c1 feat: add support for ListActivity (#2365)
Add support for ListActivity
2023-10-09 08:18:33 -05:00
Steven 3822c26e32 chore: update memo props 2023-10-09 21:09:17 +08:00
Athurg Gooth 425b43b3bb fix: ListTag not support omit params (#2366)
fix ListTag not support omit params
2023-10-09 01:40:54 -05:00
Athurg Gooth c00dac1bbf fix: index page failed with 429 (#2363) 2023-10-08 20:54:12 -05:00
Steven 3ff4d19782 chore: update initial global loader 2023-10-08 20:31:38 +08:00
Steven 31997936d6 chore: move resource public api 2023-10-08 19:40:30 +08:00
Athurg Gooth 287f1beb90 fix: create storage without some attributes (#2358) 2023-10-08 05:30:24 -05:00
Athurg Gooth 7680be1a2f fix: create user without some attributes (#2357) 2023-10-08 05:29:32 -05:00
Athurg Gooth 55e0fbf24e fix: create activity without some attributes (#2356) 2023-10-08 05:29:22 -05:00
Athurg Gooth eaac17a236 fix: create memo without some attributes (#2355) 2023-10-08 05:29:12 -05:00
Athurg Gooth 1fbd568dfe fix: create resource without some attributes (#2354) 2023-10-08 05:29:03 -05:00
Athurg Gooth c0619ef4a4 fix: CreateIdentityProvider without id (#2352) 2023-10-08 05:28:22 -05:00
Athurg Gooth b2aa66b4fd fix: migration always in mysql (#2353) 2023-10-08 05:28:11 -05:00
boojack dfaf2ee29c chore: update pnpm scripts (#2350)
* chore: update pnpm scripts

* chore: update development guide
2023-10-07 12:06:18 -05:00
Steven b938c8d7b6 chore: only show comments in memo detail page 2023-10-08 00:42:02 +08:00
Steven 553de3cc7e fix: mysql syntax 2023-10-07 22:56:12 +08:00
Steven 73980e9644 chore: fix video element syntax 2023-10-07 22:01:07 +08:00
Athurg Gooth 087e631dd8 chore: optmize docker-compose.dev.yml (#2347)
Optmize docker-compose.dev.yml
2023-10-07 08:24:53 -05:00
boojack 76fb280720 chore: translated with Weblate (#2348)
Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (315 of 315 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/

Co-authored-by: Qing Long <longyinx@duck.com>
2023-10-07 08:23:06 -05:00
Steven 6ffc09d86a chore: remove unused httpmeta getter api 2023-10-06 23:03:36 +08:00
白宦成 125c9c92eb chore: compress image and reduce 500kb in network (#2339)
feat: compress image and reduce 500kb in network
2023-10-06 07:45:17 -05:00
Steven 15eb95f964 chore: delete resource file synchronously 2023-10-06 19:02:40 +08:00
boojack ed96d65645 chore: update i18n with weblate (#2338)
* Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (315 of 315 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (315 of 315 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/

---------

Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
Co-authored-by: Qing Long <longyinx@duck.com>
2023-10-06 05:29:50 -05:00
boojack 9c2f87ec2e chore: update i18n with weblate (#2337)
* Translated using Weblate (English)

Currently translated at 100.0% (315 of 315 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/en/

* Translated using Weblate (Portuguese (Brazil))

Currently translated at 98.4% (310 of 315 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/

---------

Co-authored-by: Lincoln Nogueira <lincolnthalles@gmail.com>
2023-10-05 22:49:38 -05:00
Steven 19f6ed5530 chore: remove pr preview actions 2023-10-06 11:00:17 +08:00
Steven 57c5a92427 chore: update archived memo styles 2023-10-06 00:34:40 +08:00
Steven 9410570195 chore: update version 2023-10-06 00:34:38 +08:00
Steven c0422dea5b chore: fix sqlite migrator 2023-10-06 00:34:06 +08:00
Steven 7791fb10d8 chore: update new db driver 2023-10-05 23:19:52 +08:00
Steven a6ee61e96d chore: update package name 2023-10-05 23:11:29 +08:00
boojack 99d9bd2d75 chore: update i18n with weblate (#2333)
* Translated using Weblate (Dutch)

Currently translated at 85.7% (271 of 316 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/nl/

* Translated using Weblate (Portuguese (Brazil))

Currently translated at 85.4% (270 of 316 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/

* Translated using Weblate (German)

Currently translated at 88.9% (281 of 316 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/de/

* Translated using Weblate (Russian)

Currently translated at 86.7% (274 of 316 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/ru/

* Translated using Weblate (Japanese)

Currently translated at 90.8% (287 of 316 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/ja/

* Translated using Weblate (Croatian)

Currently translated at 86.3% (273 of 316 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/hr/

* Translated using Weblate (Hindi)

Currently translated at 68.0% (215 of 316 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/hi/

* Translated using Weblate (Italian)

Currently translated at 89.2% (282 of 316 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/it/

* Translated using Weblate (Korean)

Currently translated at 89.2% (282 of 316 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/ko/

* Translated using Weblate (Chinese (Traditional))

Currently translated at 90.8% (287 of 316 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hant/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 89.8% (284 of 316 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/

* Translated using Weblate (English)

Currently translated at 100.0% (316 of 316 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/en/

---------

Co-authored-by: Jasper Platenburg <jasperdgp@outlook.com>
Co-authored-by: memos <usememos@gmail.com>
2023-10-05 08:36:23 -05:00
boojack e7aeca736b chore: update i18n with weblate (#2332)
* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/

* Translated using Weblate (Dutch)

Currently translated at 77.8% (246 of 316 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/nl/

* Translated using Weblate (Dutch)

Currently translated at 78.4% (248 of 316 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/nl/

* Translated using Weblate (Dutch)

Currently translated at 78.7% (249 of 316 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/nl/

* Translated using Weblate (Dutch)

Currently translated at 79.1% (250 of 316 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/nl/

* Translated using Weblate (Dutch)

Currently translated at 79.7% (252 of 316 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/nl/

* Translated using Weblate (Dutch)

Currently translated at 81.6% (258 of 316 strings)

Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/nl/

---------

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Jasper Platenburg <jasperdgp@outlook.com>
2023-10-05 04:36:00 -05:00
Steven e85f325eb2 chore: add tranlated status badge 2023-10-05 17:32:23 +08:00
Steven 7dcc5cbaf1 chore: fix mysql migrator 2023-10-05 17:11:28 +08:00
Steven 1cdd70e008 chore: update dark mode styles 2023-10-05 16:16:02 +08:00
Steven 6a11fc571d chore: update empty icon 2023-10-05 15:52:16 +08:00
Steven 771fe394fd chore: fix initial guide 2023-10-05 15:50:16 +08:00
Steven d474d1abd0 chore: update store cache 2023-10-05 15:17:40 +08:00
Steven 576111741b chore: downgrade zustand 2023-10-05 15:13:02 +08:00
Steven 9ac44dfbd9 chore: update mui/joy version 2023-10-05 15:08:55 +08:00
Steven 110b53b899 chore: update frontend deps 2023-10-05 15:07:10 +08:00
Steven 42e8d51550 chore: update i18n 2023-10-05 15:07:03 +08:00
Steven fd7043ea40 chore: fix editor cache 2023-10-05 14:20:35 +08:00
Steven 34ae9b0687 chore: update default storage back to database 2023-10-05 13:36:33 +08:00
Steven 077bf95425 chore: add pinned icon in status bar 2023-10-05 13:12:03 +08:00
Steven e465b2f0e8 chore: update i18n for auth pages 2023-10-05 12:48:40 +08:00
Steven 01ff3f73f8 chore: update auth pages 2023-10-05 12:38:46 +08:00
Steven 8aae0d00cd chore: fix fetch comments 2023-10-05 08:58:44 +08:00
Steven 16dad8b00d chore: update logo 2023-10-05 08:40:25 +08:00
Steven 7dc4bc5714 chore: update resource service 2023-10-03 23:44:14 +08:00
K.B.Dharun Krishna 2e82ba50f2 chore: bump actions/checkout; actions/setup-go to v4 (#2325)
* chore: bump actions/checkout to v4

Signed-off-by: GitHub <noreply@github.com>

* chore: bump actions/setup-go to v4

Signed-off-by: GitHub <noreply@github.com>

---------

Signed-off-by: GitHub <noreply@github.com>
2023-10-03 16:58:47 +08:00
Steven 1542f3172a chore: update tag service 2023-10-03 09:39:39 +08:00
serverless83 69d575fd5b chore: update it.json translation (#2323)
Changed translation of "private" to "Privato" instead of "Privao" (missing the letter "t")

Signed-off-by: serverless83 <35410475+serverless83@users.noreply.github.com>
2023-10-02 20:01:16 -05:00
Steven 607fecf437 chore: update store tests 2023-10-03 00:47:34 +08:00
Steven 91f7839b31 chore: update memo detail styles 2023-10-03 00:25:22 +08:00
Steven 078bc164d5 chore: update memo relations view 2023-10-02 08:26:15 +08:00
Steven 70f464e6f2 chore: update frontend deps 2023-10-01 22:14:33 +08:00
Steven e40621eb0f chore: implement memo content views 2023-10-01 22:14:25 +08:00
Steven fd395e5661 chore: update list memo relations 2023-10-01 21:35:17 +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 de5eccf9d6 chore: update icon styles 2023-09-30 02:06:30 +08:00
Steven 952225d1da chore: add back to top button 2023-09-30 02:04:13 +08:00
steven a928c4f845 chore: update error format 2023-09-29 13:04:54 +08:00
Johan 73e189ea61 chore: update fr.json (#2304)
* Update fr.json

Updated some translations

Signed-off-by: Johan <45337552+LittleJ@users.noreply.github.com>

* Apply suggestions from code review

Signed-off-by: boojack <stevenlgtm@gmail.com>

---------

Signed-off-by: Johan <45337552+LittleJ@users.noreply.github.com>
Signed-off-by: boojack <stevenlgtm@gmail.com>
Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-09-29 04:51:14 +00:00
steven 8168fb71a8 chore: update migrator 2023-09-29 12:47:49 +08:00
Steven 87ddeb2c79 chore: adjust store test for mysql 2023-09-29 09:15:54 +08:00
Athurg Gooth 255254eb69 feat: add some dev tools in the docker compose (#2309)
* Add some dev tools in the docker compose

* Merge tsc and lint
2023-09-28 14:54:11 +00:00
Athurg Gooth c72f221fc0 feat: support mysql as backend storage driver (#2300)
* Rename checkDSN to checkDataDir

* Add option to set DSN and db driver

* Add mysql driver skeleton

* Add mysql container in compose for debug

* Add basic function for mysql driver

* Cleanup go mod with tidy

* Cleanup go.sum with tidy

* Add DeleteUser support for mysql driver

* Fix UpdateUser of mysql driver

* Add DeleteTag support for mysql driver

* Add DeleteResource support for mysql driver

* Add UpdateMemo and DeleteMemo support for mysql driver

* Add MemoRelation support for mysql driver

* Add MemoOrganizer support for mysql driver

* Add Idp support for mysql driver

* Add Storage support for mysql driver

* Add FindMemosVisibilityList support for mysql driver

* Add Vacuum support for mysql driver

* Add Migration support for mysql driver

* Add Migration support for mysql driver

* Fix ListMemo failed with referece

* Change Activity.CreateTs type in MySQL

* Change User.CreateTs type in MySQL

* Fix by golangci-lint

* Change Resource.CreateTs type in MySQL

* Change MigrationHistory.CreateTs type in MySQL

* Change Memo.CreateTs type in MySQL
2023-09-28 09:09:52 -05:00
CorrectRoadH 4ca2b551f5 chore: update seed data (#2311) 2023-09-28 09:03:32 -05:00
Athurg Gooth 5b6b2f0528 fix: apiv2 failed in container (#2307) 2023-09-28 05:45:45 -05:00
Steven fbbfb11916 chore: adjust memo elements 2023-09-28 08:59:55 +08:00
Steven c54febd024 chore: fix reset script 2023-09-27 18:55:26 +08:00
Athurg Gooth 5ebf920a61 chore: stop process on build error (#2295)
* Move migration and seed code into driver

* Stop process on build error
2023-09-27 11:56:39 +08:00
Athurg Gooth 5121e9f954 chore: move migration and seed code into driver (#2294)
Move migration and seed code into driver
2023-09-27 11:56:20 +08:00
Athurg Gooth ca98367a0a chore: store vacuum and clean (#2293)
* Move all vacuum code into driver

* Remove db from Store
2023-09-26 20:27:31 -05:00
Steven 9abf294eed chore: update seed data 2023-09-27 09:13:56 +08:00
Athurg Gooth 9ce22e849c chore: move SQL code of Memo into Driver (#2292) 2023-09-27 00:57:12 +00:00
Athurg Gooth 58b84f83d1 chore: move SQL code of MemoOrganizer into Driver (#2291) 2023-09-26 19:54:50 -05:00
Athurg Gooth acbde4fb2d chore: move SQL code of MemoRelation into Driver (#2290) 2023-09-26 19:43:46 -05:00
Steven 53090a7273 chore: show unused resources in dashboard 2023-09-27 08:09:30 +08:00
Steven 71ee299de7 chore: drop shortcut 2023-09-27 07:28:17 +08:00
Steven 9d1c9fc505 chore: regenerate swagger docs 2023-09-27 00:52:42 +08:00
Steven 03a0972712 chore: rename sqlite entry file name 2023-09-27 00:51:16 +08:00
Steven 0bddbba00e chore: fix frontend linter 2023-09-27 00:45:15 +08:00
Steven 6007f48b7d chore: retire memo resource relation table 2023-09-27 00:40:16 +08:00
Steven 4f10198ec0 chore: add tooltip to icon buttons 2023-09-26 23:48:34 +08:00
Steven 7722c41680 chore: add edit button to memo detail page 2023-09-26 23:46:58 +08:00
Steven 7cdc5c711c chore: update key of daily memo 2023-09-26 23:34:35 +08:00
Steven 4180cc3a3d refactor: migrate storage to driver 2023-09-26 19:43:55 +08:00
Steven d6789550a0 refactor: migrate tag to driver 2023-09-26 19:37:22 +08:00
Steven d68da34eec refactor: migrate idp to driver 2023-09-26 19:17:17 +08:00
Steven 63b55c4f65 chore: fix tests 2023-09-26 19:15:18 +08:00
Steven 96395b6d75 chore: rename package sqlite3 to sqlite 2023-09-26 19:07:14 +08:00
Athurg Gooth d3a6fa50d6 chore: move sql code of Resource into driver (#2286)
Move sql code of Resource into driver
2023-09-26 19:04:07 +08:00
May Kittens Devour Your Soul 47f22a20ba chore: update Croatian (#2283)
* Add files via upload

Signed-off-by: May Kittens Devour Your Soul <yoshimitsu002@gmail.com>

* Update hr.json

Signed-off-by: May Kittens Devour Your Soul <yoshimitsu002@gmail.com>

* Update hr.json

Signed-off-by: May Kittens Devour Your Soul <yoshimitsu002@gmail.com>

* Delete web/src/css/prism.css

Signed-off-by: boojack <stevenlgtm@gmail.com>

---------

Signed-off-by: May Kittens Devour Your Soul <yoshimitsu002@gmail.com>
Signed-off-by: boojack <stevenlgtm@gmail.com>
Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-09-26 19:03:50 +08:00
Athurg Gooth 14ec524805 chore: move sql code of UserSetting into Driver (#2282)
* Move SQL code of UserSetting into Driver

* Fix golang import issue
2023-09-26 19:02:48 +08:00
Athurg Gooth fcba3ffa26 chore: move sql code of User into driver (#2281)
Move SQL code of User into Driver
2023-09-26 18:23:45 +08:00
Athurg Gooth 41eba71f0f chore: split sql to driver (#2279)
* Add new database interface for SQL operations

* Move SQL code of Activity into Database

* Rename `Database` into `Driver`

* Move SQL code of SystemSetting into Driver

* Fix store.New in text code

* Change database into driver in the variables

* Change sqlite3.New into sqlite3.NewDriver
2023-09-26 17:16:58 +08:00
Steven 85ed0202d8 chore: fix user request cache 2023-09-25 20:52:29 +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 8c2f89edc5 chore: update demo username 2023-09-25 09:10:39 +08:00
Steven 6cff920f0c chore: update user demo data 2023-09-23 20:41:47 +08:00
Steven 27f3f6fbf0 chore: upgrade version 2023-09-23 20:41:42 +08:00
Steven 89c24415a6 chore: update not found page 2023-09-23 20:39:01 +08:00
Steven 0d803bf45f chore: update dark mode styles 2023-09-23 20:30:47 +08:00
Steven d4e54f343d feat: update memo detail page 2023-09-23 20:14:07 +08:00
Steven 08a81e79dd chore: update frontend deps 2023-09-23 17:55:26 +08:00
Steven cad789e948 chore: update frontend deps 2023-09-21 23:41:05 +08:00
Steven 4de18cfab1 chore: remove unused deps 2023-09-20 21:24:46 +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 a60d4dee41 chore: remove lazy loading image 2023-09-19 23:06:30 +08:00
Steven 7da10cd367 chore: update telegram integration folder 2023-09-19 22:35:20 +08:00
Steven 6d45616dbe chore: add cors middleware 2023-09-19 20:34:25 +08:00
Fabian Wünderich ad326147f1 chore: fix typo in german localization (#2256)
Fix typo in german localization

Signed-off-by: Fabian Wünderich <fabian@wuenderich.de>
2023-09-19 20:21:32 +08:00
Steven 465b173b36 chore: fix resource int type 2023-09-19 09:05:34 +08:00
Steven 9bf1979fa8 fix: list resources 2023-09-19 08:24:24 +08:00
Steven 0a811e19ba chore: remove arm/v7 form platforms 2023-09-19 00:34:27 +08:00
Steven e119acb0e9 chore: remove unused platform of test image 2023-09-19 00:08:58 +08:00
Steven 0f1e87bd93 chore: update test image platforms 2023-09-18 23:28:28 +08:00
Steven f9f2f549af chore: update dockerfile 2023-09-18 23:23:13 +08:00
Steven d665adf78b chore: remove outdate build artifacts action 2023-09-18 22:56:39 +08:00
Steven 1c27824e58 chore: upgrade version 2023-09-18 22:54:44 +08:00
Steven 14adcb56da chore: update resource description 2023-09-18 22:46:24 +08:00
Steven b452d63fa6 chore: skip compose memo error 2023-09-18 22:41:49 +08:00
Steven e2b82929ab chore: fix daily review params 2023-09-18 22:38:52 +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
Zeng1998 462f10ab60 feat: optimize the logic of the checkbox button. (#2227) 2023-09-18 20:37:28 +08:00
Vespa314 58026c52ea fix: heatmap show on wrong date (#2243)
fix: heatmap show wrong date
2023-09-18 13:53:16 +08:00
victorsch 97b434722c fix: content sanitization in getimage endpoint (#2241) 2023-09-18 12:45:26 +08:00
Steven b22d236b19 chore: update golangci-lint version 2023-09-17 23:21:03 +08:00
Steven cc809a5c06 chore: update github action trigger 2023-09-17 23:18:18 +08:00
Steven cd0ea6558d chore: update golangci-lint config 2023-09-17 22:55:13 +08:00
Steven 9eb077c4af chore: update service clients 2023-09-17 21:12:23 +08:00
Steven 6eeee6b704 docs: add buf to development guide 2023-09-17 20:56:03 +08:00
boojack b13042d644 chore: move buf generated code to gitignore (#2236) 2023-09-17 20:55:05 +08:00
Steven d09e3c3658 chore: remove buf es generator 2023-09-17 20:14:45 +08:00
Steven 72ca4e74ee refactor: impl part of grpcweb 2023-09-17 19:20:03 +08:00
Steven d5c1706e9c chore: update api middlewares 2023-09-17 18:11:13 +08:00
Steven 3a1f82effa fix: migration script 2023-09-16 14:10:51 +08:00
Steven a3d7cc9392 fix: migration script 2023-09-16 14:01:05 +08:00
Steven 178a5c0130 chore: upgrade version to 0.15.0 2023-09-16 12:46:26 +08:00
Steven b233eaea97 chore: update docs link 2023-09-16 12:25:57 +08:00
Steven 51137e01ef chore: update resource description 2023-09-16 11:53:16 +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 723e6bcdae refactor: update resources page 2023-09-15 22:25:07 +08:00
Steven d1156aa755 chore: update account setting styles 2023-09-15 22:09:51 +08:00
Steven 4e49d3cb22 chore: update frontend deps 2023-09-15 21:50:50 +08:00
Athurg Gooth 13c7871d20 chore: update vite dev server proxy setting (#2222)
fix vite proxy setting to keep the request headers
2023-09-15 21:49:34 +08:00
Athurg Gooth 137c8f8a07 chore: better date picker (#2220)
* Add buttons to increase year in DatePicker

* Show month with padding 0 to keep DatePicker size
2023-09-15 21:48:52 +08:00
Athurg Gooth 0c0c72c3ca chore: optimize layout of image resources (#2221)
Optimize layout of image resource
2023-09-15 17:58:17 +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 28a1888163 chore: fix user seed data 2023-09-15 08:55:18 +08:00
Steven 8824ee9b9d chore: fix user state loader 2023-09-15 08:43:52 +08:00
Steven 936fe5ac9d chore: update state initial loader 2023-09-15 08:31:19 +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
Athurg Gooth 41e26f56e9 chore: persist selected date of DailyReview page (#2219)
* Persist selected date of DailyReview page

* Use hook useLocalStorage instead of useState

* Update web/src/pages/DailyReview.tsx

Co-authored-by: boojack <stevenlgtm@gmail.com>
Signed-off-by: Athurg Gooth <athurg@gooth.org>

---------

Signed-off-by: Athurg Gooth <athurg@gooth.org>
Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-09-14 19:57:44 +08:00
Steven 14aa3224ce chore: add readme about protobuf 2023-09-14 19:21:21 +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
Steven f0f42aea9f chore: fix react use imports 2023-09-13 22:56:02 +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 36209eaef1 feat: add content cache for memo editor 2023-09-13 21:32:21 +08:00
Steven d63715d4d9 feat: implement list memos filter 2023-09-13 20:42:44 +08:00
Kada Liao 9600fbb609 fix: multiple inline latex parsing (#2214) 2023-09-13 17:58:52 +08:00
Steven 04595a5fb1 chore: update resource icons 2023-09-13 09:12:51 +08:00
Kada Liao 9a0ada6756 feat: support LaTeX with react-katex (#2209)
feat: support latex

Co-authored-by: liaoxingyi <liaoxingyi@douban.com>
2023-09-12 23:53:46 +08:00
Steven 416e07cb1f fix: inject additional style and scripts 2023-09-12 23:43:32 +08:00
Steven 58429f88a0 fix: memo filter in daily review 2023-09-12 23:38:13 +08:00
Steven 439d88f06b chore: fix user avatar style 2023-09-12 23:35:10 +08:00
Steven d165ad187c chore: pnpm update 2023-09-12 08:25:57 +08:00
Steven 319f679e30 chore: fix timestamp type 2023-09-10 23:52:35 +08:00
Steven b6d1ded668 chore: adjust initial states 2023-09-10 23:44:06 +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 866937787c chore: clean duplicated requests 2023-09-10 11:43:38 +08:00
Steven ca336af4fa chore: update locale checks 2023-09-10 10:53:37 +08:00
Steven 7ec5d07cb8 chore: remove fullscreen button 2023-09-10 10:48:08 +08:00
Steven 2e79fe12e2 chore: remove helm folder 2023-09-10 10:39:46 +08:00
Steven 3df550927d chore: update user profile page 2023-09-10 10:33:22 +08:00
Willian Ricardo Da Silva 44be7201c0 chore: update pt-BR.json (#2196)
* chore: update pt-BR.json

* update import order
2023-09-07 09:23:12 +08:00
boojack 0d50f5bd08 chore: update comments (#2195) 2023-09-06 21:59:20 +08:00
boojack 8b1f7c52aa choer: add system setting api (#2194) 2023-09-06 21:54:12 +08:00
Athurg Gooth 9987337eca fix: all ID from int to int64 to avoid 32bits machine break (#2191)
Fix all ID from int to int64 to avoid 32bits machine break
2023-09-06 21:14:07 +08:00
Takuro Onoue 87a1d4633e chore: update ja.json (#2192)
* Update ja.json

I added the missing lines and translated.

* Update ja.json

I forgot to remove the comma at the end of the column.
I translated the untranslated portions.
2023-09-06 21:10:42 +08:00
boojack c2aeec20b7 chore: upgrade deps version (#2181) 2023-08-27 16:08:39 +08:00
boojack a5b3fb2a6a chore: move cron package to internal (#2180) 2023-08-26 23:13:03 +08:00
boojack c67a69629e chore: update user menu items (#2179) 2023-08-26 23:11:45 +08:00
boojack 18fb02a1ec chore: update swag docs (#2178)
* chore: update swag docs

* chore: update
2023-08-26 08:07:43 +08:00
boojack ad1822d308 chore: update db utils (#2177) 2023-08-26 07:33:45 +08:00
boojack 4af0d03e93 chore: add user profile page (#2175)
chore: some enhancements
2023-08-25 23:10:51 +08:00
boojack 8c312e647d chore: remove auto collapse setting (#2169) 2023-08-24 22:00:48 +08:00
boojack d3bd3ddab0 chore: update some detail styles (#2168)
* chore: update some detail styls

* chore: update
2023-08-24 21:52:16 +08:00
Sandu Liviu Catalin 6c01e84099 feat: add configuration option to bind server to specific address (#2165) 2023-08-24 09:59:23 +08:00
boojack b9b795bf0e chore: add react use (#2157)
* chore: add react use

* chore: update
2023-08-21 02:35:53 +08:00
boojack 19e7731abb chore: generate ts definition (#2156)
* chore: generate ts definition

* chore: update
2023-08-21 02:09:41 +08:00
ti777777 609b24f2ba chore: update zh-Hant.json (#2155)
Update zh-Hant.json

* removed unused entries
* updated the Traditional Chinese translation
2023-08-20 09:18:38 +08:00
Maciej Kasprzyk 735cfda768 fix: tag suggestions positioning (#2151) 2023-08-18 08:41:24 +08:00
Lincoln Nogueira 3f82729e9f chore: update build scripts (#2150)
update developer build scripts, bringing
feature parity between platforms.
2023-08-17 05:40:40 +08:00
Maciej Kasprzyk 077cfeb831 feat: improve tag suggestions (#2126)
* feat: make filtering case insensitive

* fix: wrong letter case when accepting suggestion

* refactor: wrap textarea in TagSuggestions

* fix: less styles not matching common-editor-inputer

* refactor: use explanatory const names for tested value in conditional checks

* feat: style highlighted option

* feat: handle down/up arrow keys

* feat: handle enter or tab to trigger autocomplete

* fix: wrong import

* fix: tab key adding whitespace after auto-completion

* fix: starting a note with a tag

* fix: close on escape

* refactor: early version of removed wrapping and children prop

* refactor: remove unnecessary return false

* refactor: finished rewriting to not wrap editor
2023-08-16 08:54:30 +08:00
boojack 95588542f9 chore: upgrade version to 0.14.4 (#2132) 2023-08-13 23:34:17 +08:00
boojack dd529f845a fix: fetch tags in memo editor (#2131)
fix: fetch tag
2023-08-13 23:27:01 +08:00
boojack 9f8a0a8dd3 fix: lazy rendering checks (#2130) 2023-08-13 23:19:29 +08:00
boojack e266d88edd chore: add acl config (#2128) 2023-08-13 00:06:03 +08:00
YuzeTT 0bb5f7f972 chore: update zh-Hans.json (#2127) 2023-08-12 21:34:01 +08:00
OKIAAAAA 012a5f4907 feat: add helm chart (#2095)
* add helm chart

* fix: remove unnecessary documents
2023-08-12 21:33:13 +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
Chris Akring 513002ff60 chore: update zh-Hans translations for "Tag suggestions" (#2110) 2023-08-08 19:12:04 +08:00
boojack 9693940010 chore: update en locale (#2109) 2023-08-08 07:29:29 +08:00
Moris 8747c58c7d feat: fixed heat map colors, updated it.json (#2106)
* Update it.json

* Add files via upload

* Add files via upload
2023-08-08 07:13:35 +08:00
nulta 0fd791c02d feat: update Korean localization (#2105)
Update korean localization
2023-08-08 07:12:57 +08:00
Jasper Platenburg 3a804ce012 feat: update Dutch translation (#2107) 2023-08-08 07:12:43 +08:00
Ghost108 f864ec3730 chore: update de.json (#2101)
* Update de.json

I used the en.json as a template and translated it (german language)

* Update de.json

* Update de.json

* Update de.json

* Update de.json

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-08-07 20:09:48 +08:00
Chris Akring 9503f73115 feat: use user avatar in ShareMemoDialog (#2102)
fix: ShareMemoDialog use user avata
2023-08-07 19:40:43 +08:00
Derek Reiff f9d1080a7d fix: minor spelling and wording changes for en and de (#2096)
Minor spelling and wording changes

I went through some of english and german localizations to correct or add minor things.

Added `invalid-tag-name` to json. Which also means it should be translated elsewhere.
2023-08-07 11:26:57 +08:00
boojack 4d3e4358e8 chore: update docs (#2094) 2023-08-06 11:25:35 +08:00
boojack 843850675f chore: update image displays (#2093) 2023-08-06 10:42:30 +08:00
boojack 726300394b chore: update image checks (#2092) 2023-08-06 10:38:39 +08:00
boojack 5d5d8de9fe fix: get all memo api (#2091) 2023-08-06 10:14:30 +08:00
boojack e097e8331e chore: upgrade version 0.14.3 (#2086) 2023-08-05 22:47:29 +08:00
boojack 7189ba40d3 feat: add lazy rendering in home page (#2085) 2023-08-05 22:14:17 +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 270a529948 chore: update resource type checks (#2081) 2023-08-05 20:17:33 +08:00
boojack cc400da44e fix: remove translate hook in code block (#2080) 2023-08-05 20:01:32 +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 cbe27923b3 chore: update commands (#2074) 2023-08-03 23:48:21 +08:00
boojack aa26cc30d7 chore: remove memo chat components (#2073) 2023-08-03 23:37:46 +08:00
boojack 1ce82ba0d6 chore: remove shortcut related api (#2072) 2023-08-03 23:33:45 +08:00
boojack d1b0b0da10 chore: remove shortcuts in frontend (#2071) 2023-08-03 23:28:38 +08:00
Athurg Gooth 11abc45440 feat: add command to move blob from local to db (#2026)
* Add `mvrss` command to move blob from local to db

* Add comment for mvrss command
2023-08-03 19:08:39 +08:00
boojack b5a6f1f997 chore: regenerate pnpm lock file (#2056)
* chore: regenerate pnpm lock file

* chore: update

* chore: update
2023-08-02 20:20:34 +08:00
boojack d114b630d2 feat: add prettier sort import plugin (#2058) 2023-07-31 22:26: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
Maciej Kasprzyk 5d3ea57d82 feat: tag suggestions (#2036)
* feat: figure out how to read caret position

* feat: figure out how to read caret position

* feat: create and style Editor/TagSuggestions.txs

* feat: progress on detect when to show and hide

* feat: progress on when to show and hide and setting position

* feat: toggling and exact placement done

* fix: pnpm lock problems

* feat: filter suggestions by partially typed tag name

* style: prettier

* chore: add types package for textarea-caret

* feat: handle option click

* style: prettier

* style: reorder imports

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

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-07-30 22:55:45 +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 2107ac08d7 chore: add docs generator (#2052) 2023-07-30 00:12:16 +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 9cedb3cc6c chore: update github actions (#2050) 2023-07-29 20:59:22 +08:00
boojack d0cfb62f35 chore: add tag service proto definition (#2049)
* chore: add tag proto definition

* chore: rename
2023-07-29 20:52:45 +08:00
boojack 9abf0eca1b feat: add buf configuration files and example proto (#2048)
* feat: add proto and buf configuration files

* chore: buf generate

* chore: update comments

* chore: go mod tidy
2023-07-29 19:44:09 +08:00
boojack a6a1898c41 refactor: user v1 store (#2047) 2023-07-29 18:57:09 +08:00
boojack f5793c142c revert: chore: update build docker image actions (#2046)
Revert "chore: update build docker image actions (#2045)"

This reverts commit 8f37c77dff.
2023-07-29 16:09:00 +08:00
boojack 8f37c77dff chore: update build docker image actions (#2045) 2023-07-29 15:59:23 +08:00
Gerald 28aecd86d3 fix: avoid content flash on auto collapse (#2042) 2023-07-29 09:04:34 +08:00
Gerald 95675cdf07 fix: show full content in detail page (#2041)
fix #1373 again
2023-07-28 15:52:50 +00:00
boojack 8328b5dd4a chore: upgrade version to 0.14.2 (#2035)
* chore: upgrade version to `0.14.2`

* chore: remove TestConcurrentReadWrite test
2023-07-26 22:42:38 +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
Takuro Onoue 756e6a150c chore: update ja.json (#2032)
I think free means freedom, not freemiam.

Fixed some strange expressions in the heatmap section.

Added spaces before and after English words that are in Japanese sentences.
2023-07-26 20:53:14 +08:00
Takuro Onoue 828984c8ec chore: update ja.json (#2030)
Update ja.json

translated one part.
2023-07-26 08:57:53 +08:00
Harry Tran 9da0ca5cb3 feat: add search bar in archived and explore pages (#2025)
* feat: add search bar in archived and explore pages

* Update web/src/pages/Archived.tsx

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-07-24 11:09:30 +00:00
iMaeGoo dc5f82ac9c feat: update chinese translate (#2023) 2023-07-24 19:08:46 +08:00
Ajay Kumbhare d000083b41 fix: hashtag filter for Unicode characters (#2017) 2023-07-23 19:17:18 +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
Ajay Kumbhare 5604129105 fix: empty state display issue with resourceList style Grid (#2018) 2023-07-23 19:10:33 +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
boojack 4231ec5a1a chore: upgrade version to 0.14.1 (#2004) 2023-07-22 09:58:03 +08:00
Ajay Kumbhare 55975a46d8 feat: add hindi language translation for i18n support (#2001) 2023-07-22 09:38:54 +08:00
Alexandr Tumaykin 1182545448 fix: add resource.clear to translate (#1999)
Co-authored-by: Александр Тумайкин <AATumaykin@tsum.ru>
2023-07-21 17:07:05 +08:00
Takuro Onoue 9f3c3ae094 chore: update ja.json (#1996)
It is strange to translate "about" as "Notes について". However, if we define "について" as "about", the sentence becomes "について Memos". It is better not to translate here.
2023-07-21 10:38:06 +08:00
boojack 4c33d8d762 chore: remove unused transaction in store (#1995)
* chore: remove unused transaction in store

* chore: update
2023-07-20 23:15:56 +08:00
Lincoln Nogueira c8961ad489 fix: database is locked (#1992)
* fix: database is locked

The option "_journal_mode=WAL" is currently *not* being applied when
provided in the DSN.

This issue affects only new memos installations, not older ones where
the database journal was properly set to WAL mode by the previous sqlite
library go-sqlite3.

modernc.org/sqlite DSN parsing is different from go-sqlite3. It requires
the `_pragma=` prefix and even some options order matter.

https://gitlab.com/cznic/sqlite/-/issues/115

Closes #1985

* chore: upgraded notes on sqlite DSN
2023-07-20 20:51:25 +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
Jerry Wang 7b5c13b712 fix: delete multiple resources
* fix: delete multiple resources, close #1986

* chore: remove useless comment
2023-07-19 21:36:02 +08:00
Jianwei Zhang 8bcc2bd715 fix: access token will expired after 24h (#1988) 2023-07-19 08:45:30 +08:00
Ajay Kumbhare 83b771d5cd fix: disable selection of future dates in daily review section (#1983)
* #1952 Fix incorrect localization key for sign-up failure message

* feat: add typeScript support to enforce valid translation keys

* feat: add typeScript support to enforce valid translation keys

* fix lint errors

* fix lint error

* chore: Disallow destructuring 't' from useTranslation

This commit adds a linting rule to disallow the destructuring of the 't' property from the result of the useTranslation function call. The no-restricted-syntax rule in the ESLint configuration has been updated to enforce this restriction. The intention is to promote alternative approaches like using the useTranslate hook for localization.

* fix: typo fixed for memoChat

* fix: copy code button toast message

Refactored the code for the "Copy Code" button to utilize i18 strings for displaying the success message. Replaced the hard-coded value with the appropriate i18 string "Code copied successfully."

* fix: #1980 disable selection of future dates in daily review section
2023-07-18 22:21:08 +08:00
EINDEX 8dbc63ed56 docs: add rowStatus parameter for memo api document (#1984)
add missing parameters for memo api
2023-07-18 22:20:22 +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
Ajay Kumbhare b5d4b8eae8 fix: copy code button toast message (#1979)
* #1952 Fix incorrect localization key for sign-up failure message

* feat: add typeScript support to enforce valid translation keys

* feat: add typeScript support to enforce valid translation keys

* fix lint errors

* fix lint error

* chore: Disallow destructuring 't' from useTranslation

This commit adds a linting rule to disallow the destructuring of the 't' property from the result of the useTranslation function call. The no-restricted-syntax rule in the ESLint configuration has been updated to enforce this restriction. The intention is to promote alternative approaches like using the useTranslate hook for localization.

* fix: typo fixed for memoChat

* fix: copy code button toast message

Refactored the code for the "Copy Code" button to utilize i18 strings for displaying the success message. Replaced the hard-coded value with the appropriate i18 string "Code copied successfully."
2023-07-18 00:16:55 +08:00
Alexandr Tumaykin e36e5823cd feat(security): disable access for anonymous users, when disablePublicMemos is true (#1966) 2023-07-17 09:12:53 +08:00
Ajay Kumbhare 4ac63ba1f0 chore: disallow destructuring 't' from useTranslation (#1973) 2023-07-16 21:26:26 +08:00
boojack 589b104671 chore: upgrade version to v0.14.0 (#1970)
* chore: upgrade version

* chore: update

* chore: update
2023-07-16 13:48:10 +08:00
boojack 220cba84ae chore: add dev guard for memo chat (#1968) 2023-07-16 13:02:52 +08:00
CorrectRoadH 032509ddba feat: save message to memo (#1940)
* feat: implment backend function

* feat: implment frontend component

* stash

* eslint

* eslint

* eslint

* delete node

* stash

* refactor the style

* eslint

* eslint

* eslint

* fix build error

* stash

* add dep

* feat: save message as memos

* eslint

* eslint

* Update web/src/components/MemosChat/MemosChatMessage.tsx

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

* stash

* eslint

* eslint

* chore: change translate

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-07-16 11:51:30 +08:00
5idereal 054ef3dc8d chore: update Traditional Chinese translation (#1967) 2023-07-16 10:19:08 +08:00
boojack 2effacd0a6 chore: add api docs (#1965) 2023-07-15 23:30:20 +08:00
boojack 01f4780655 chore: update detail styles (#1964) 2023-07-15 22:57:57 +08:00
Alexandr Tumaykin 49dd90578b fix: add resource.clear to en.json (#1963) 2023-07-15 20:03:49 +08:00
Ajay Kumbhare 1780225da5 feat: add typeScript support to enforce valid translation keys (#1954)
* #1952 Fix incorrect localization key for sign-up failure message

* feat: add typeScript support to enforce valid translation keys

* feat: add typeScript support to enforce valid translation keys

* fix lint errors

* fix lint error
2023-07-15 10:27:37 +08:00
boojack 5e20094386 chore: add indexes (#1959) 2023-07-15 10:26:31 +08:00
boojack 40a30d46af chore: update db connection params (#1960) 2023-07-15 10:26:19 +08:00
Alexandr Tumaykin 6b17a27a13 feat: update russian translate and new translate message (#1958)
* feat: add russian translate and new translate message

* fix

---------

Co-authored-by: Александр Тумайкин <AATumaykin@tsum.ru>
2023-07-15 10:01:40 +08:00
Felipe Martínez 2a7104e564 fix: exclude commas in tags (#1957) 2023-07-15 10:00:35 +08:00
Ajay Kumbhare 8ca2dac184 fix: incorrect localization key for sign-up failure message (#1953) 2023-07-14 21:43:46 +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
CorrectRoadH 39351970d0 feat: implement memo chat frontend (#1938)
* feat: implment backend function

* feat: implment frontend component

* stash

* eslint

* eslint

* eslint

* delete node

* stash

* refactor the style

* eslint

* eslint

* eslint

* fix build error

* add dep

* Update web/src/components/MemosChat/ConversationTab.tsx

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

* Update web/src/components/MemosChat/ConversationTab.tsx

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

* feat: change the name

* disable for vistor

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-07-14 13:09:21 +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
Alexandr Tumaykin c5a1f4c839 feat: format message from telegram and upload attachments (#1924)
* feat: format message from telegram and download documents

* fix: remove bool in expression

* refactor: convert to markdown

* refactor: resolve remarks and add support new message types

* refactor: resolve remarks

* feat: add test for mime type

---------

Co-authored-by: Александр Тумайкин <AATumaykin@tsum.ru>
2023-07-14 00:18:44 +08:00
Ikko Eltociear Ashimine f074bb1be2 docs: fix typo in deploy-with-render.md (#1946)
reliablity -> reliability
2023-07-14 00:00:23 +08:00
boojack 90e7d02e35 chore: update readme (#1947) 2023-07-14 00:00:08 +08:00
boojack 437e05bd2f chore: update header style (#1945) 2023-07-13 23:15:11 +08:00
Sergei Vassiljev 934f57c92f chore: update MemoRelationListView.tsx (#1933) 2023-07-13 19:42:50 +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
Athurg Gooth 6adbb7419c chore: split Go binary and src for dev (#1932)
Split Go binary and src for dev
2023-07-12 15:39:56 +08:00
boojack d4b88c6c86 chore: remove auto signout in auth page (#1927) 2023-07-12 00:16:32 +08:00
boojack 698380f940 chore: update seed data (#1928) 2023-07-12 00:16:19 +08:00
Cyang39 dcac442ebf chore: change dropdown's background color in dark mode (#1925)
#1919
2023-07-11 22:37:04 +08:00
boojack da70917b08 chore: update auth page (#1920)
* chore: update auth page

* chore: update
2023-07-09 21:13:26 +08:00
boojack 0292f472e0 chore: add data empty placeholder (#1913) 2023-07-08 13:04:12 +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
Peng Ding 2157651d17 update zh-Hans & zh-Hant translations (#1909) 2023-07-07 08:40:35 +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 5ea561af3d feat: add support for purged resource link (#1897)
Add support for purged resource link
2023-07-05 21:56:13 +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
Athurg Gooth 1c07ae2650 fix: escape on resource filename (#1892)
add escape on resource filename
2023-07-04 10:06:11 +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 0af14fc81a fix: invalid orientation of image thumbnail in Apple devices (#1891) 2023-07-04 09:05:56 +08:00
Athurg Gooth 833fd23820 fix: OpenID was disappear sometimes (#1886)
Fix openid was disapear sometimes
2023-07-03 19:10:24 +08:00
Jiraiya8 d46126c5c3 fix: header archived id (#1888)
Co-authored-by: qingbo <qingbo@jingling.group>
2023-07-03 19:09:59 +08:00
Athurg Gooth 811c3e8844 fix: auto expand height of setting page (#1885) 2023-07-03 13:35:55 +08:00
boojack 223404a240 chore: update memo seed data (#1884) 2023-07-02 23:58:02 +08:00
boojack 31373be172 chore: remove unused packages (#1880) 2023-07-02 19:41:56 +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
Phong H b84ecc4574 chore: update vi.json locale (#1878)
Co-authored-by: phong.bnh <phong.bnh@globalfactories.com>
2023-07-02 16:41:03 +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 ca770c87d6 chore: upgrade version to v0.13.2 (#1873) 2023-07-01 18:01:51 +08:00
boojack c83fd1de38 chore: update dialog overflow style (#1872) 2023-07-01 17:37:43 +08:00
boojack db8b8f0d58 chore: remove unused kit components (#1871) 2023-07-01 12:34:37 +08:00
CorrectRoadH 30fae208c2 fix: pin memos of other people (#1870) 2023-07-01 12:04:49 +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
CorrectRoadH c9aa2eeb98 fix: validate access token (#1867)
* fix/to_valid_token

* eslint

* revert

* Update server/jwt.go

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-06-30 14:59:52 +00:00
Vespa314 63d6b6f9f9 chore: listMemos sort by id for memos post/update at the same time (#1866) 2023-06-30 22:56:31 +08:00
boojack 847b4605f4 chore: update dark mode style (#1864) 2023-06-30 08:40:13 +08:00
boojack 6b3748e2a3 chore: update setting page styles (#1863)
* chore: update setting page styles

* chore: update
2023-06-29 23:17:01 +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 07e82c3f4a fix: schema migrate (#1846)
* fix: schema migrate

* chore: update
2023-06-20 12:18:04 +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
boojack f1d85eeaec chore: upgrade pnpm version (#1833)
* chore: upgrade pnpm version

* chore: update
2023-06-15 22:35:41 +08:00
SedationH 1b0efc5548 fix: use ?? in className use (#1829) 2023-06-15 20:05:19 +08:00
May Kittens Devour Your Soul 6dca551164 chore: update hr.json (#1832)
Update hr.json

Updated Croatan [some fixes]
2023-06-15 19:27:13 +08:00
Athurg Gooth 7694597728 feat: Add suppport for tap to reload on PWA (#1827)
* Add suppport for tap to reload on PWA

* Clean empty className

* Move click event to site title

---------

Co-authored-by: Athurg Feng <athurg@gooth.org>
2023-06-14 22:33:46 +08:00
Athurg Gooth 4d59689126 feat: set memo visibility in telegram (#1824)
* Add telegram.Bot in MessageHandler

* Change single message handler like group messages

* Move message notify wrapper from plugin to server

* Add keyboard buttons on Telegram reply message

* Add support to telegram CallbackQuery update

* Set visibility in callbackQuery

* Change original reply message after callbackQuery

---------

Co-authored-by: Athurg Feng <athurg@gooth.org>
2023-06-14 22:10:01 +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
David Angel 781b1f7b3a chore: add classnames for easy logo/server name customizations via CSS. (#1828)
Update MemoDetail.tsx
2023-06-14 21:03:38 +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
Athurg Gooth 5d06c8093c fix: systemSetting in UI changed unexpectedly (#1812)
Fix systemSetting in UI changed unexpectedly

Co-authored-by: Athurg Feng <athurg@gooth.org>
2023-06-08 22:32:57 +08: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
Athurg Gooth 77e8e9ebbd revert: fix: add public base path (#1748) (#1775) (#1806)
This reverts commit d205a7683a.
2023-06-07 10:07:30 +08:00
c14c6b3786 fix: user default 'Basic Setting' should follow server's setting (#1795)
fix: user default 'Basic Setting' should follow system setting
2023-06-07 00:38:50 +08:00
Athurg Gooth c27c6cea13 fix: failed to upload OSS with S3 SDK (#1792)
Fix failed to upload OSS with S3 SDK

Co-authored-by: Athurg Feng <athurg@gooth.org>
2023-06-03 14:38:28 +08:00
boojack 11a385cda6 chore: update upgrade version view (#1791) 2023-06-03 14:32:04 +08:00
boojack 32e2f1d339 chore: update page routes (#1790)
chore: update routers
2023-06-03 13:03:22 +08:00
Athurg Gooth 69225b507b chore: clean Dockerfile to exclude musl-dev (#1787)
Clean Dockerfile to exclude musl-dev install

Co-authored-by: Athurg Feng <athurg@gooth.org>
2023-06-01 20:16:13 +08:00
-Shiken- 2f905eed0d chore: update zh-Hant.json (#1781)
* Update zh-Hant.json

follow these commits to complete zhTW translation:
96021e518a
8628d1e4b2
93d608f050
ce64894abe
845297ec03

* Update web/src/locales/zh-Hant.json

Co-authored-by: Zeng1998 <acan.coder@gmail.com>

* Fix json format error

---------

Co-authored-by: Zeng1998 <acan.coder@gmail.com>
Co-authored-by: Athurg Gooth <github@gooth.org>
2023-06-01 09:03:44 +08:00
Athurg Gooth 55cf19aa2e fix: copy-to-clipboard not works well in Safari (#1779)
* Fix copy-to-clipboard not works well in Safari

* Fix typescript type check failure

* Remove global copy inject in home page

---------

Co-authored-by: Athurg Feng <athurg@gooth.org>
2023-06-01 08:53:40 +08:00
boojack dd8c10743d feat: memo editor dialog (#1772)
* feat: memo editor dialog

* chore: update mark

* chore: update
2023-05-30 20:23:26 +08:00
Athurg Gooth 25ce36e495 feat: resource visibility (#1777)
* Add method to query visibility list by memoIDs

* Add function to get visibility by resourceID

* Check resource visibility in /r/:resourceId/:publicId/:filename

* Check resource visibility in /r/:resourceId/:publicId

---------

Co-authored-by: Athurg Feng <athurg@gooth.org>
2023-05-30 19:00:54 +08:00
Gener d205a7683a fix: add public base path (#1748) (#1775) 2023-05-30 18:55:23 +08:00
Athurg Gooth 7e4d71cf58 fix: infinite loop in home page (#1773)
Fix infinite loop in home page

Co-authored-by: Athurg Feng <athurg@gooth.org>
2023-05-30 18:54:58 +08:00
Athurg Gooth 97df1a82c7 feat: add docker compose file for development (#1769)
* Add support to fetch devProxyServer from environment

* Add docker compose file for developer

---------

Co-authored-by: Athurg Feng <athurg@gooth.org>
2023-05-29 19:49:47 +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 ddf4cae537 feat: disable CGO_ENABLED (#1766)
* Replace mattn/go-sqlite3 with modernc.org/sqlite

* Disable CGO to make binary work without special c lib

* Replace mattn/go-sqlite3 with modernc.org/sqlite in testing code

* Tidy go module

---------

Co-authored-by: Athurg Feng <athurg@gooth.org>
2023-05-29 13:29:42 +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 beb4d8ccb9 chore: order by updated ts in memo store (#1761) 2023-05-28 02:04:05 +08:00
boojack e0e59c5831 feat: display memo with updated ts (#1760) 2023-05-28 01:50:09 +08:00
_Jellen 826541a714 feat: update korean localization (#1758) 2023-05-27 22:03:06 +08:00
boojack c40aeb91e6 fix: patch memo row status (#1755) 2023-05-27 11:14:23 +08:00
boojack 2e34ce90a1 chore: upgrade version 0.13.1 (#1754) 2023-05-27 09:09:41 +08:00
GodMeowIceSun 93d608f050 feat(#1568): add "ask ai" section session splitting function (#1711)
* feat(#1568): Added "ask ai" section session splitting function

Added "ask ai" section session splitting function
Optimize the "ask ai" dialogue style

* fix(#1568): Fix wrong attribute "appearance"

* fix(#1568): Add ts type define

* fix(#1568): Add ts type define

* fix(#1568): Resolve the issue of components not being stretched when only user input is available

* feat(#1568): New session automatic switching function

* refactor(#1729): remove unused code

* feat(#1568): New Remove Session Function

New Remove Session Function
Rename some methods
2023-05-27 02:29:54 +08:00
boojack ec26a9702d fix: sso templates (#1753) 2023-05-26 22:25:30 +08:00
boojack dbe8aa1d3a chore: update telegram bot related section (#1750)
* chore: update telegram bot related section

* chore: update
2023-05-26 21:32:44 +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 a07d11e820 feat: tag parser (#1745) 2023-05-26 09:05:17 +08:00
boojack dbc85fe7e4 feat: image and link parser (#1744)
* feat: image and link parser

* chore: update
2023-05-26 08:43:37 +08:00
boojack 523ef2bba5 chore: update demo banner style (#1743) 2023-05-26 00:47:53 +08:00
boojack de8014dfe8 feat: resource store cache (#1742) 2023-05-26 00:38:27 +08:00
deeshu b42e5c3213 chore: update vscode setting enforcement for go111module="on" (#1738)
vscode setting enforcement for go111module to set on and availability of schema for go extension
2023-05-25 22:00:32 +08:00
boojack ea728d232d refactor: memo store (#1741) 2023-05-25 21:50:37 +08:00
boojack 43819b021e chore: add demo banner (#1739) 2023-05-25 19:29:30 +08:00
boojack e69f7c735b chore(revert): retire demo site (#1733)
Revert "chore: retire demo site (#1659)"

This reverts commit cd2bdab683.
2023-05-24 20:34:07 +08:00
Athurg Gooth 5e792236af fix: infinite loop while daily memos more than DEFAULT_MEMO_LIMIT (#1730)
Co-authored-by: Athurg Feng <athurg@gooth.org>
2023-05-24 20:22:16 +08:00
boojack 45c119627b chore: move flags into env variables (#1732) 2023-05-24 20:08:47 +08:00
boojack 65890bc257 feat: implement code block parser (#1727) 2023-05-24 00:31:37 +08:00
boojack 42c653e1a4 feat: implement paragraph and italic parsers (#1725) 2023-05-23 21:11:01 +08:00
boojack 8c34be92a6 feat(gomark): add bold parser (#1724) 2023-05-23 20:49:32 +08:00
boojack fa53a2550a feat: add heading tokenizer (#1723) 2023-05-23 19:52:31 +08:00
Athurg Gooth 616b8b0ee6 feat: introduce publicid to filename template (#1713)
* Add support for `publicid` in PathTemplate

* Use `publicid` by default instead of `filename` in filesystem

* Fix blank string of `systemSettingLocalStoragePath` affect incorrectly

* Add ext name to compatible with OS's preview

* Optimize code for systemSettingLocalStoragePath empty

---------

Co-authored-by: Athurg Feng <athurg@gooth.org>
2023-05-23 19:15:30 +08:00
Athurg Gooth d24632682f chore: add volume define in Dockerfile to avoid data lose (#1718)
Add volume define in Dockerfile to protect data

Co-authored-by: Athurg Feng <athurg@gooth.org>
2023-05-23 18:50:17 +08:00
Athurg Gooth 3b1bab651a fix: system memo visibility was replace by user's setting (#1707)
Co-authored-by: Athurg Feng <athurg@gooth.org>
2023-05-22 12:15:00 +08:00
Athurg Gooth 0cea5ebaeb fix: concurrent counter operates (#1706)
Co-authored-by: Athurg Feng <athurg@gooth.org>
2023-05-22 11:08:49 +08:00
Zeng1998 1e4a867a9a fix: add thumbnail param only for internal link (#1701)
* fix: add thumbnail param using `URLSearchParams`

* update: add thumnail param only for internal link
2023-05-21 16:41:04 +08:00
CorrectRoadH 6bb0b4cd47 fix: pop search when touch textarea in Android Chrome (#1700)
* fix: pop search when touch textarea

* eslint
2023-05-21 16:31:50 +08:00
CorrectRoadH 56c6f603aa fix: md without search icon (#1699) 2023-05-21 16:28:30 +08:00
boojack 98b3a371f4 fix: patch memo visibility (#1695) 2023-05-21 11:51:13 +08:00
boojack ba8e1e5dc2 chore: add available generator amount flag (#1696) 2023-05-21 11:50:57 +08:00
boojack 467f9080a1 feat: get or generate thumbnail image (#1691) 2023-05-20 22:08:07 +08:00
Athurg Gooth 0894bf13d2 fix: fail to open file while generate thumbnail (#1687)
* Fix fail to open file while generate thumbnail

* Fix for Uncontrolled data used in path expression check

---------

Co-authored-by: Athurg Feng <athurg@gooth.org>
2023-05-20 14:33:59 +08:00
boojack 1d7627dd72 chore: upgrade version 0.13.0 (#1685)
* chore: upgrade version `0.13.0`

* chore: update
2023-05-20 10:16:19 +08:00
boojack d80aa67c97 feat: parse markdown to html format in rss (#1683) 2023-05-20 10:00:21 +08:00
boojack ae1d9adf65 fix: initial system locale (#1684) 2023-05-20 09:39:20 +08:00
boojack b40571095d feat: update memo detail page (#1682)
* feat: update memo detail page

* chore: update
2023-05-20 08:39:39 +08:00
Athurg Gooth 04124a2ace feat: generate thumbnail while get and improve thumbnail quality (#1680)
* Use disintegration/imaging to optimize thumbnail quality

* Generate thumbnail if not exists while GET it

* Changes for `go mod tidy`

* Changes for golang comments lint

---------

Co-authored-by: Athurg Feng <athurg@gooth.org>
2023-05-19 20:07:39 +08:00
Athurg Gooth 2730b90512 feat: highlight the DatePicker's date (#1669)
Co-authored-by: Athurg Feng <athurg@gooth.org>
2023-05-19 08:36:08 +08:00
Athurg Gooth 34913cfc83 feat: show thumbnail in resource dashboard (#1666)
* Add image thumbnail instead of an icon

* Change thumbnail size of dashboard to fixed

* Fix for eslint-checks

* Fix for eslint-checks

* Replace css with tailwind

* Remove the parent div used for style

* Show preview while click on the resource

* Change for review Suggested by @Zeng1998

---------

Co-authored-by: Athurg Feng <athurg@gooth.org>
2023-05-19 08:31:32 +08:00
boojack 88799d469c chore: initial gomark plugin (#1678)
chore: initial gomark folder
2023-05-18 21:33:18 +08:00
boojack a07d5d38d6 feat: memo relation part1 (#1677)
* feat: memo relation part1

* chore: update
2023-05-18 21:29:28 +08:00
Stephen Zhou ca5859296a fix: resource url in rss (#1672) 2023-05-18 06:53:20 +08:00
boojack 1a8310f027 chore: update system setting default value (#1665) 2023-05-15 22:59:26 +08:00
Athurg Gooth 041be46732 Add support for image thumbnail (#1641)
* Add a common function for resize image blob

* Auto generate thumbnail for image resources

* Auto thumbnail support for fetch image resources

* Add support for image thumbnail in view

* Fix missing error check

* Fix es-lint check

* Fix uncontrolled data used in path expression

* Remove thumbnail while origin resource been deleted

* Change the thumbnail's storage path

---------

Co-authored-by: Athurg Feng <athurg@gooth.org>
2023-05-15 22:42:12 +08:00
Zeng1998 9eafb6bfb5 chore: add the default value of MaxUploadSizeMiB (#1663) 2023-05-15 21:54:45 +08:00
Lincoln Nogueira 668a9e88c6 fix: File size exceeds allowed limit of 0 MiB (#1664)
fix: File size exceeds allowed limit of 0 MiB

This could happen in databases without "max-upload-size-mib" setting.

Now, both the front-end and the back-end will start with a default
limit of 32 MiB, even if the key is absent.

It is still possible to disable uploads by setting the value to 0.
2023-05-15 21:54:13 +08:00
boojack cd2bdab683 chore: retire demo site (#1659) 2023-05-14 23:35:31 +08:00
CorrectRoadH d72b4e9a98 feat: filter support plain link (#1657)
* fix: unexpected empty lines when copying-pasting

* add ref

* feat: support to filter plain link

* eslint

* fix the typo

* fix the typo

* unified the import path
2023-05-14 23:17:18 +08:00
boojack 2cc5691efd chore: update memo relation types (#1658) 2023-05-14 23:17:05 +08:00
guanzi008 7726ed4245 feat: add build-artifacts.yml (#1583)
* Create main.yml

构建的单文件运行版本几个平台的Windows amd64 ,Linux amd64,Linux arm64

* Rename main.yml to build-artifacts.yml

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-05-13 14:52:50 +00:00
boojack 921d4b996d chore: update help button style (#1656) 2023-05-13 22:52:06 +08:00
Lincoln Nogueira 96021e518a feat: add max upload size setting to UI & UI improvements (#1646)
* Add preliminar Windows support for both
development and production environments.

Default profile.Data will be set to "C:\ProgramData\memos" on Windows.
Folder will be created if it does not exist, as this behavior is
expected for Windows applications.

System service installation can be achieved with third-party tools,
explained in docs/windows-service.md.

Not sure if it's worth using https://github.com/kardianos/service
to make service support built-in.

This could be a nice addition alongside #1583 (add Windows artifacts)

* feat: improve Windows support

- Fix local file storage path handling on Windows

- Improve Windows dev script

* feat: add max upload size setting to UI & more

- feat: add max upload size setting to UI

- feat: max upload size setting is checked on UI during upload,
but also enforced by the server

- fix: overflowing mobile layout for Create SSO, Create Storage
and other Settings dialogs

- feat: add HelpButton component with some links to docs were appropriate

- remove LearnMore component in favor of HelpButton

- refactor: change some if/else to switch statements

- refactor: inline some err == nil checks

! Existing databases without the new setting 'max-upload-size-mib'
will show an upload error, but this can be user-fixed by simply
setting the value on system settings UI.

* improvements requested by @boojack
2023-05-13 22:27:28 +08:00
boojack 5c5199920e chore: seed data for new user (#1655) 2023-05-13 22:25:15 +08:00
CorrectRoadH e1c809d6f1 fix: unexpected empty lines when copying-pasting (#1654) 2023-05-13 22:08:54 +08:00
Athurg Gooth 218009a5ec fix: wrong position of UsageStatItem's popup (#1647)
* fix: wrong position of UsageStatItem's popup

* Replace TAB into Space for eslint

---------

Co-authored-by: Athurg Feng <athurg@gooth.org>
2023-05-12 22:07:53 +08:00
Lincoln Nogueira 5340008ad7 feat: improve Windows support (#1645)
* Add preliminar Windows support for both
development and production environments.

Default profile.Data will be set to "C:\ProgramData\memos" on Windows.
Folder will be created if it does not exist, as this behavior is
expected for Windows applications.

System service installation can be achieved with third-party tools,
explained in docs/windows-service.md.

Not sure if it's worth using https://github.com/kardianos/service
to make service support built-in.

This could be a nice addition alongside #1583 (add Windows artifacts)

* feat: improve Windows support

- Fix local file storage path handling on Windows

- Improve Windows dev script
2023-05-10 08:03:55 +08:00
CorrectRoadH 700fe6b0e4 fix: return pinned status after edit (#1629)
* stash

* query pinned status after patch

* eslint

* refactor query

* eslint

* process specify case

* add test

* Update memo.go
2023-05-09 09:03:09 +08:00
boojack 9b8d69b2dd chore: add vacuum memo relation to dev guard (#1644)
* chore: add vacuum memo relation to dev guard

* chore: update
2023-05-09 09:02:59 +08:00
Zeng1998 84546ff11c chore: show server name instead of "MEMOS" (#1639) 2023-05-09 08:24:13 +08:00
Zeng1998 885a0ddad0 chore: add size for s3 resource (#1638) 2023-05-09 08:17:26 +08:00
Lincoln Nogueira 3b76c6792c feat: add preliminar Windows support (#1636)
Add preliminar Windows support for both
development and production environments.

Default profile.Data will be set to "C:\ProgramData\memos" on Windows.
Folder will be created if it does not exist, as this behavior is
expected for Windows applications.

System service installation can be achieved with third-party tools,
explained in docs/windows-service.md.

Not sure if it's worth using https://github.com/kardianos/service
to make service support built-in.

This could be a nice addition alongside #1583 (add Windows artifacts)
2023-05-09 08:16:38 +08:00
jonny 4605349bdc chore: update Chinese name translation (#1630) 2023-05-06 07:36:22 +08:00
Stephen Zhou ff447ad22b feat: support file sorting when uploading (#1627) 2023-05-03 19:18:29 +08:00
Stephen Zhou c081030d61 chore: lock pnpm version (#1628) 2023-05-03 19:14:21 +08:00
boojack e3496ac1a2 refactor: memo editor components (#1625) 2023-05-03 19:13:37 +08:00
boojack 8911ea1619 chore: update related time format (#1621)
chore: update related time
2023-05-02 08:54:51 +08:00
boojack 34700a4c52 chore: check allow sign up setting in sso (#1620) 2023-05-02 08:45:03 +08:00
boojack b6564bcd77 feat: implement memo relation server (#1618) 2023-05-01 16:09:41 +08:00
Peng Ding 6e6aae6649 feat: update zh-Hans translations and minor fixes in locale_updater.py (#1615)
* update zh-Hans translations

* minor update

* update instruction part

* print json_value for debugging purpose

* update post requests related

* machine translate with chunks to get around {{field}}
2023-05-01 13:27:08 +08:00
João Nuno Mota b98f85d8a7 feat: add infinite scroll for memos (#1614)
Add infinite scroll for memos on home
2023-05-01 13:26:15 +08:00
João Nuno Mota 3314fe8b0e fix: failed eslint checks (#1616) 2023-05-01 08:38:35 +08:00
powersee f12163bc94 feat: add linux/arm/v7 to docker build action (#1610) 2023-04-29 00:40:15 +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 4603f414db chore: add system setting cache (#1609) 2023-04-28 00:02:54 +08:00
deeshu 884dca20b3 fix: reappearing of dialog should add body scrolling class (#1602)
When dialog is reappeared after being in a hidden state. Then reappeaning should block further body scrolling for consistent UX.
2023-04-27 07:16:15 +08:00
Max Malm dbb544dc92 feat: read content from search params (#1607) 2023-04-27 07:15:40 +08:00
deeshu 3fad718807 fix: memo content availability for visitor mode (#1605) 2023-04-26 21:57:01 +08:00
boojack fab8a71fd2 feat: implement memo relation store (#1598)
* feat: implement memo relation store

* chore: update
2023-04-25 23:27:38 +08:00
Barry 7776a6b7c6 docs: update readme with MemosGallery (#1590)
- add: https://github.com/BarryYangi/MemosGallery

A simple gallery static page based on the memos api, I think it might be useful for some people, so I just post it up. Close this if not necessary.
2023-04-25 22:27:02 +08:00
boojack cd6ab61c2d chore: add memo_relation (#1585) 2023-04-25 22:26:45 +08:00
_Jellen 00f69d683a feat: update Korean translation (#1592)
Update Korean translation

- add missing keys
- polish some translations
- remove trailing whitespaces
2023-04-23 20:13:34 +08:00
boojack 0e70de4003 chore: split memo resource api (#1587) 2023-04-22 10:42:24 +08:00
boojack 35efa927b6 chore: update readme with docs (#1586) 2023-04-22 10:25:32 +08:00
Antzed 1ff03e87c2 docs: upgrade on fly.io (#1582) 2023-04-22 09:34:36 +08:00
boojack edf934efbb chore: update memo style (#1581) 2023-04-21 14:46:41 +08:00
-Shiken- d0815f586e feat: update zh-tw translation to latest file format (#1569)
* update zh-tw translation to latest file format

* Update zh-Hant.json

* Update web/src/locales/zh-Hant.json

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-04-19 20:22:23 +08:00
Yang 685a23bce8 feat: add auto collapse feature for all memos issue #1463 (#1550)
* add auto collapse feature

* fix some styles

* pass eslint

---------

Co-authored-by: liyang <liyangg@umich.edu>
2023-04-18 10:05:36 +08:00
boojack 0aa7085303 chore: add enclosure to rss (#1559) 2023-04-17 23:26:56 +08:00
boojack 994d5dd891 feat: server tests (#1556)
* feat: server tests

* chore: update
2023-04-17 21:34:59 +08:00
deeshu e62a94c05a feat: hiding dialog using X button should remove class "overflow-hidden" (#1555)
Hiding dialogs result in the body to stay frozen due to mounting behaviour of the dialog, but using 'X' button hides the dialog and won't let user scroll any further. Removing overflow behaviour during hiding procedure will improve User Experience.
2023-04-17 20:13:33 +08:00
Manu 2b83572641 fix: the broken install docs link (#1554) 2023-04-17 19:00:13 +08:00
boojack 5f8aae69e4 chore: update save button style (#1542) 2023-04-16 15:47:01 +08:00
boojack 73b8d1dd99 fix: revert hide ask ai button (#1539) 2023-04-16 10:55:44 +08:00
boojack 58fa00079b chore: update version to 0.12.2 (#1538) 2023-04-16 10:40:21 +08:00
boojack 3060dafb45 chore: update resource link template (#1537) 2023-04-16 10:31:03 +08:00
boojack 5cb436174d chore: remove search key binding (#1536) 2023-04-16 10:03:33 +08:00
boojack 541fd9c044 chore: update window resize listener (#1535) 2023-04-16 10:00:49 +08:00
boojack 7d6934d00c fix: rss link (#1534) 2023-04-16 09:51:03 +08:00
João Nuno Mota 2c328a4540 feat: hide ask ai button when key is empty (#1515)
* Add option to hide Ask AI and update dev version

* Fix formatting according to eslint

* Replace option to hide Ask AI with auto hiding based on config

* Fix golangci-lint errors

* Remove showAskAI logic from OpenAPI
2023-04-16 00:54:33 +08:00
boojack 648634d376 chore: use pnpm (#1533)
* chore: use pnpm

* chore: update
2023-04-16 00:47:40 +08:00
Fog3211 a654a1cb88 fix: toast overload max size error (#1531)
Co-authored-by: Fog3211 <23151576+Fog3211@users.noreply.github.com>
2023-04-16 00:39:31 +08:00
boojack ef02519e72 chore: regenerate yarn lock file (#1530) 2023-04-15 09:12:45 +08:00
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
2023-04-15 08:56:03 +08:00
Zeng1998 5652bb76d4 fix: incorrect date parsing (#1527)
* fix: incorrect date parsing

* fix eslint
2023-04-15 00:54:48 +08:00
Alex Zhao d0c40490a7 feat: add HostnameImmutable to aws endpoint config (#1230)
* add config to support S3-compatible urls like minio

* add comment for HostnameImmutable

* fix linting
2023-04-15 00:17:48 +08:00
CorrectRoadH 630d84348e feat: add resource backend unit test (#1521)
* add resource unit test

* add more resource unit test

* change variable name

* add more test cases

* delete unnecessary line

* eslint

* add more asset
2023-04-13 19:55:18 +08:00
CorrectRoadH 81d4f01b7f feat: add e2e test (#1486)
* add i18n

* add base e2e test

* add multiple test for e2e

* extract the funciton of write memo

* change test sturct

* deteled unused dir

* use fixture

* add fixture

* restruced the project

* feat: add workflow

* feat: change playwright test position

* feat: change playwright test position

* using yarn intead of npm

* change install method

* only enable sign in test

* adjust the order of test

* change report pos

* fix style of e2e workflow

* add review test

* unify locale

* randome write content

* change report pos

* reduce unused wait time

* reduce unused folder

* stash

* merge upstream locale

* change test name

* add test item

* change action name

* add lanuage setting

* add shotscreen

* change name of test

* fix the error of import dep

* fix the error of import dep

* fix the error of filename

* fix the format of workflow

* fix the name error of test case

* feat: change the describe of test case

* feat: remove unused test

* feat: change the fixtures name

* feat: remove unused config

* feat: change docker action

* feat: change the generate method

* feat: extrace screenshot

* feat: change extra path

* feat: change extra path

* feat: screenshot and upload

* feat: change upload filename

* feat: change login method

* feat: change e2e method

* feat: change e2e test

* feat: add wait for login

---------

Co-authored-by: CorrectRoadH <a778917369@gmail.comå>
2023-04-11 22:13:06 +08:00
boojack b5c665cb7e chore: update docker image source (#1511) 2023-04-10 23:39:46 +08:00
Gabe Cook 836387cada fix(ci): fix release builds not having any tags (#1507) 2023-04-10 08:08:38 +08:00
Peng Ding 0020498c10 feat: update Chinese translations in zh.json and zh-Hant.json using locale_updater.py (#1506)
update zh.json and zh-Hant.json using locale_updater.py
2023-04-09 20:57:50 +08:00
_Jellen 66ed43cbcb feat: update and refactor Korean translation data (#1505)
refactor and update ko.json
- added missing translation keys into ko.json
- synced the JSON key order of ko.json with en.json
- removed unused translation data
2023-04-09 20:12:20 +08:00
Gabe Cook c6e1d139f8 feat(ci): Add GHCR mirror and major/minor rolling tags (#1503) 2023-04-09 16:32:27 +08:00
boojack ef7381f032 chore: upgrade version to 0.12.1 (#1499) 2023-04-09 11:51:43 +08:00
boojack df30304d00 chore: update share memo buttons (#1498) 2023-04-09 11:38:30 +08:00
boojack 91a24ef9ce chore: update memo header (#1497)
* chore: update memo header

* chore: update
2023-04-09 11:05:09 +08:00
Luyu Cheng d11083d3b9 fix(css): reorder the font fallback list (#1495) (#1496) 2023-04-09 09:48:42 +08:00
boojack 680b8ede6c chore: adjust header style (#1493) 2023-04-08 21:50:07 +08:00
boojack 4e023e2500 chore: add file type to audio (#1492)
* chore: add file type to audio

* chore: update
2023-04-08 19:16:25 +08:00
boojack 3eac19d258 chore: add ignore version upgrade setting (#1491) 2023-04-08 18:13:51 +08:00
boojack ab867b68d3 chore: add timezone env to dockerfile (#1490) 2023-04-08 17:57:00 +08:00
boojack 8cdc662745 chore: update memo visibility display (#1485) 2023-04-07 08:53:20 +08:00
boojack 204c03e772 chore: update audience name (#1484) 2023-04-07 08:52:13 +08:00
boojack d0ddac296f chore: update store error handler (#1479) 2023-04-06 07:42:39 +08:00
HappyZ 609366da6e chore: add "copy link" for each memo (#1474) 2023-04-06 07:12:12 +08:00
boojack f48d91539e chore: update locale file structure (#1478) 2023-04-06 00:07:10 +08:00
boojack cc23f69f66 chore: update import path (#1477) 2023-04-05 23:31:15 +08:00
Zeng1998 6ceafc1827 fix: unexpected reset of the storage setting (#1475) 2023-04-05 14:37:02 +08:00
Sönke Werner Köster 8c2224ae39 feat: allow instance moderators to post public via the API (#1464) 2023-04-04 22:28:20 +08:00
boojack 6ff7cfddda fix: return external link directly (#1465)
* fix: return external link directly

* chore: update
2023-04-04 08:31:11 +08:00
boojack 5361f76b11 chore: update filename when creating resource (#1460) 2023-04-03 23:16:43 +08:00
boojack bdc00d67b2 chore: add default local storage path (#1457) 2023-04-03 17:13:41 +08:00
boojack 5caa8cdec5 chore: delete resource related file (#1456) 2023-04-03 17:02:47 +08:00
boojack 9ede3da882 chore: update learn more link (#1455) 2023-04-03 15:38:14 +08:00
boojack 836e496ee0 chore: allow remove user avatar (#1454) 2023-04-03 14:52:36 +08:00
boojack 5aa4ba32c9 fix: system setting field name (#1453) 2023-04-03 14:40:29 +08:00
boojack 4419b4d4ae chore: update version and remove isDev flag (#1452)
* chore: update version and remove isDev flag

* chore: update
2023-04-03 14:13:22 +08:00
boojack 1cab30f32f feat: add public id field to resource (#1451)
* feat: add public id field to resource

* feat: support reset resource link
2023-04-03 13:41:27 +08:00
boojack c9a5df81ce chore: update store tests (#1449) 2023-04-03 09:53:36 +08:00
boojack 4f2adfef7b chore: update system setting name convention (#1448) 2023-04-03 09:36:34 +08:00
boojack 8a33290722 chore: update user setting key convention (#1447)
* chore: update user settng key convention

* chore: update
2023-04-03 09:02:02 +08:00
boojack 11cd9b21de chore: update auth form (#1445) 2023-04-02 14:25:38 +08:00
boojack 41c50e758a chore: revert resource visibility changes (#1444) 2023-04-02 14:09:25 +08:00
boojack d71bfce1a0 chore: add usage into heatmap (#1443) 2023-04-02 11:56:09 +08:00
boojack 1ea65c0b60 chore: update logo (#1442)
* chore: update logo

* chore: update
2023-04-02 09:54:52 +08:00
boojack c7a57191bd feat: add jwt auth (#1441)
* feat: add jwt auth

* chore: update
2023-04-02 09:28:02 +08:00
thehijacker e3fc23ccf9 feat: updated Slovenian translation (#1440)
* Fixed some strings and typos

Checked on demo site and saw some string can be improved.

* Update LocaleSelect.tsx

Native name for language
2023-04-02 02:26:33 +08:00
boojack 0baf6b0e19 feat: add test for user store (#1438) 2023-04-01 22:47:19 +08:00
boojack 0cddb358c1 chore: add Slovenian locale (#1437)
chore: add sl locale
2023-04-01 21:34:10 +08:00
thehijacker 741eeb7835 feat: added Slovenian translation. (#1436)
Add files via upload
2023-04-01 13:23:12 +00:00
CorrectRoadH 424f10e180 feat: request pagination for resource(#1425)
* feat: add support for resource page on frontend

* [WIP]feat: add backend support for limit and offset search

* feat: add reducer to add resource

* support fetch all resource when first search

* beautify the fetch ui

* restore file

* feat: add all resource before clear resource

* eslint

* i18n

* chore:change the nane

* chore: change the name of param

* eslint

* feat: setIsComplete to true when first loading resource fully

* fix the bug of fetch

* feat change finally to then

* feat: add await and async to clear and search

* feat: return all resource when fetch

* chore: change variable name

* Update web/src/pages/ResourcesDashboard.tsx

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

* fix missing const value

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-04-01 16:51:20 +08: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
Dmitry Shemin b03778fa73 feat: update RU i18n locale (#1422)
* feat: Fix i18n and RU locale

* fix: eslint issues

* change the position of deps

---------

Co-authored-by: CorrectRoadH <a778917369@gmail.com>
2023-04-01 15:35:25 +08:00
Xudong Cai d21abfc60c feat: add URLSuffix resource option with S3 (#1428)
* feat: add URLSuffix resource option with S3

* feat: add URLSuffix resource option with S3

* fix: eslint
2023-04-01 15:28:00 +08:00
Xudong Cai 8eed9c267c fix: logo img rounded (#1427)
rounded-full move to img tag
2023-03-30 22:21:29 +08:00
CorrectRoadH 3c2578f666 feat: limit the num of lines for filename (#1424)
* feat: limit the linenum of  filename

* change the implement of line-clamp
2023-03-29 20:27:54 +08:00
CorrectRoadH 526fbbba45 feat: empty selected resource when search resource (#1423)
* feat: empty selected resource when search resource

* eslint
2023-03-29 18:59:51 +08:00
boojack 993ea024fd chore: update demo seed data (#1421) 2023-03-28 22:25:54 +08:00
Dmitry Shemin bc595b40e7 feat: add docs for memos setup after deploying (#1419) 2023-03-27 23:45:02 +08:00
Dmitry Shemin e7ee181a91 feat: add setup cmd (#1418)
This command can be used for automatization of initial application's setup
2023-03-27 21:22:49 +08:00
CorrectRoadH 6b703c4678 feat: add empty placeholder when search result is empty (#1416)
* feat: add empty placeholder when search result is empty

* Update web/src/pages/ResourcesDashboard.tsx

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

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-03-26 13:07:08 +00:00
boojack dbb095fff4 chore: update list switch style (#1417) 2023-03-26 21:02:40 +08:00
CorrectRoadH adf01ed511 feat: add more resource cover icon (#1413)
* 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: add more file icon

* feat: delete the storage of resource style

* Update web/src/components/ResourceCover.tsx

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

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-03-26 20:58:02 +08:00
Stephen Zhou 17ca97ebd1 fix: avatar is not rounded (#1415) 2023-03-26 12:43:15 +00: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
_Jellen e84d562146 feat: update Korean translation (#1414)
add missing translation keys into ko.json
2023-03-26 18:02:36 +08:00
boojack 2e14561bfc chore: update logo assets (#1407) 2023-03-24 08:43:26 +08:00
Stephen Zhou 166e57f1ef fix: image preview dialog overlapping (#1405)
* fix: image preview dialog overlapping

* Update web/src/less/preview-image-dialog.less

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-03-23 11:57:21 +00:00
boojack eeff159a2d chore: remove weblate badge (#1402) 2023-03-22 22:57:54 +08:00
boojack 547f25178b chore: add rss button in user menu (#1401) 2023-03-22 22:33:59 +08:00
Steven Yan 9c0a3ff83c fix: the expand button's z-index is the same as Header (#1400)
fix: the expand button's z-index is higher than Header
2023-03-22 22:17:01 +08:00
CorrectRoadH 2ba54c9168 feat: upload file by drag and drop (#1388)
* stash: file upload

* 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

* 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

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-03-22 22:14:32 +08:00
Zeng1998 026fb3e50e fix: markdown support in blockquote (#1394) 2023-03-21 22:38:38 +08:00
CoffDream af3d3c2c9b fix: daily review page & setting dialog style (#1392) 2023-03-21 09:55:53 +08:00
Shruti Chaturvedi 27a1792e78 chore: update Uffizzi Workflows (#1390)
* Update uffizzi-build.yml

* Update uffizzi-preview.yml
2023-03-21 00:15:43 +08:00
CorrectRoadH 63e0716457 chore: fix typo (#1387) 2023-03-20 13:59:53 +08:00
Zeng1998 f3090b115d feat: support local storage (#1383)
* feat: support local storage

* update

* update

* update

* update
2023-03-19 19:37:57 +08:00
boojack a21ff5c2e3 chore: update project structure (#1382) 2023-03-18 23:07:40 +08:00
boojack ff8851fd9f fix: golangci-lint version (#1381)
* chore: update interface declare

* chore: update args

* chore: update

* chore: update
2023-03-18 22:34:22 +08:00
boojack 573f07ec82 feat: support messages to ask AI (#1380) 2023-03-18 22:07:14 +08:00
Gerald 8b20cb9fd2 fix: make creation time a link to the detail page (#1379) 2023-03-18 22:06:44 +08:00
Zeng1998 7529296dd5 chore: remove {filetype} in path template (#1377)
* chore: remove {filetype} in path template

* fix go-static-check

* update
2023-03-18 22:06:15 +08:00
Zeng1998 7f44a73fd0 fix: show full content in detail page (#1375) 2023-03-18 20:19:32 +08:00
Zeng1998 eb835948b7 chroe: add ids for header elements (#1374)
* chroe: add id for header elements

* fix order of id and class
2023-03-18 20:19:13 +08:00
远浅 70e32637b0 build: update dockerfile for using cache to speed up (#1372) 2023-03-18 10:36:53 +08:00
CorrectRoadH c04a31dcda fix: the dropdown be coverd (#1368) 2023-03-18 10:35:46 +08:00
boojack e526cef754 fix: handle IME mode in editor (#1371)
* fix: handle IME mode in editor

* chore: update
2023-03-17 20:47:55 +08:00
远浅 2ba0dbf50b refactor: use function findMatchingParser to reduce duplicate code (#1367)
* refactor: Use function findMatchingParser to reduce duplicate code

* chore: declare type Parser
2023-03-17 20:46:07 +08:00
CorrectRoadH 4ee8cf08c6 feat: allow resource title mutiple line (#1370) 2023-03-17 20:20:20 +08:00
CorrectRoadH f1f9140afc fix: the incorrectly height of grid row in safari (#1366) 2023-03-17 19:38:59 +08:00
boojack c189654cd9 chore: update resource dashboard style (#1362) 2023-03-15 23:29:43 +08:00
CorrectRoadH 0a66c5c269 feat: new resource dashboard (#1346)
* feat: refator the file dashboard

* feat: support select resouce file

* feat: suppor delete select files

* feat: support share menu, implement rename and delete

* chore: change the color of hover

* chore: refator file dashboard to page

* feat: add i18n for button

* feat: beautify the button

* fix: the error position of button

* feat: only select when click circle instead of whole card

* feat: beautify file dashboard

* chore: factor the filecard code

* feat: using dropdown component intead of component

* feat: add i18n for delete selected resource button

* feat: delete the unused style of title

* chore: refactor file cover

* feat: support more type file cover

* feat: use memo to reduce unused computing in filecover

* feat: when no file be selected, click the delete will error

* feat: store the select resource id instead of source to save memory

* chore: delete unused code

* feat: refactor the file card

* chore: delete unused style file

* chore: change file to resource

* chore: delete unused import

* chore: fix the typo

* fix: the error of handle check click

* fix: the error of handle of uncheck

* chore: change the name of selectList to selectedList

* chore: change the name of selectList to selectedList

* chore: change the name of selectList to selectedList

* chore: delete unused import

* feat: support Responsive Design

* feat: min display two card in a line

* feat: adjust the num of a line in responsive design

* feat: adjust the num of a line to 6 when using md

* feat: add the color of hover source card when dark

* chore: refactor resource cover css to reduce code

* chore: delete unnessnary change

* chore: change the type of callback function

* chore: delete unused css code

* feat: add zh-hant i18n

* feat: change the position of buttons

* feat: add title for the icon button

* feat: add opacity for icon

* feat: refactor searchbar

* feat:move Debounce to search

* feat: new resource search bar

* feat: reduce the size of cover

* support file search

* Update web/src/pages/ResourcesDashboard.tsx

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

* Update web/src/components/ResourceCard.tsx

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

* chore: reduce css code

* feat: support lowcase and uppercase search

* chore: reserve the searchbar

* feat: refator resource Search bar

* chore: change the param name

* feat: resource bar support dark mode

* feat: beautify the UI of dashboard

* chore: extract positionClassName from actionsClassName

* feat: reduce the length of search bar

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-03-15 20:06:30 +08:00
远浅 e129b122a4 refactor: useTranslation in CreateTagDialog (#1356) 2023-03-15 20:05:35 +08:00
远浅 7f30e2e6ff chore: fix typo (#1355) 2023-03-15 07:39:09 +08:00
boojack 29f784cc20 feat: update find resource with linked memo amount (#1354)
* feat: update find resource with linked memo amount

* chore: remove unused test
2023-03-15 00:04:52 +08:00
Wujiao233 28242d3268 fix: expand btn display in front of menu (#1342)
* Docker

* fix:expand btn display issue

* restore Dockerfile

* change Header z-index to 2

* Update web/src/less/memo-content.less

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

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-03-14 08:39:07 +08:00
boojack 8d88477538 chore: rename http getter package (#1349) 2023-03-14 08:38:54 +08:00
boojack 89053e86b3 chore: fix cover bg color (#1337) 2023-03-11 15:23:05 +08:00
boojack 50f36e3ed5 chore: upgrade version to 0.11.2 (#1336) 2023-03-11 13:20:24 +08:00
boojack ca6839f593 chore: remove editor shortcuts (#1334) 2023-03-11 12:31:45 +08:00
boojack e5cbb8cd56 refactor: openAI config system setting (#1333) 2023-03-11 12:26:40 +08:00
boojack 7c92805aac fix: daily review page style (#1332) 2023-03-11 10:08:36 +08:00
boojack a9218ed5f0 refactor: filter store (#1331) 2023-03-11 09:13:54 +08:00
boojack f3f0efba1e feat: update page router (#1330) 2023-03-11 08:43:45 +08:00
boojack ccdcd3d154 feat: fold memo when content overflow (#1327)
* feat: fold memo when content overflow

* chore: update
2023-03-09 23:32:35 +08:00
Cologler 8c774316ae refactor: build storage key (#1326)
* refactor build storage key

* sort imports

* use gofmt to format code
2023-03-09 22:41:48 +08:00
-Shiken- 25da3c073b feat: update zh-tw translation to new file format (#1324) 2023-03-09 12:37:59 +08:00
远浅 6866b6c30d fix: unified tag sorting logic (#1323) 2023-03-09 12:36:11 +08:00
boojack f86816fea2 feat: use react-hot-toast (#1321) 2023-03-09 08:54:14 +08:00
Cologler df6b4b0607 chore: expose port in dockerfile (#1319) 2023-03-09 08:33:33 +08:00
Aswath S 2428e6e190 feat: allow users to customize the refresh time for Daily Reviews (#1313)
* feat: Allow users to customize the refresh time for Daily Reviews

* feat: Allow users to customize the refresh time for Daily Reviews. Lint fix

* feat: Allow users to customize the refresh time for Daily Reviews. change daily review time offset to include only hour

* feat: Allow users to customize the refresh time for Daily Reviews. Retrigger to try CodeQL pass.

---------

Co-authored-by: Aswath S <aswath.s@thoughtworks.com>
2023-03-09 08:26:56 +08:00
Dillon Xu 2ff0e71272 feat: update README.md with memos-desktop (#1317)
Memos client built on electron cross-end framework.
2023-03-09 00:07:56 +08:00
Baptiste Roux 93609ca731 fix: update markdown hyperlink regex (#1315)
* fix: Update markdown hyperlink regex

* chore(lint): Remove unnecessary escape character
2023-03-08 23:22:16 +08:00
boojack 70a187cc18 chore: update ask AI trigger (#1316) 2023-03-08 23:09:15 +08:00
boojack 390e29f850 chore: remove part of less files (#1314) 2023-03-08 22:05:43 +08:00
boojack 3a466ad2a1 chore: update style of home sidebar (#1311) 2023-03-08 21:56:28 +08:00
boojack ccf6af4dc3 fix: request body format in openai api (#1309) 2023-03-08 19:37:50 +08:00
Andrew Pollock ce7564a91b fix: GO-2023-1571 vulnerability (#1308)
* Fix for GO-2023-1571

* Update go.sum to reflect fix for GO-2023-1571
2023-03-08 19:14:09 +08:00
boojack 483c1d5782 feat: update responsible layout (#1306)
* feat: update responsible layout

* chore: update
2023-03-08 09:00:10 +08:00
Jason Chen 65850dfd03 feat: auto focus search bar when sidebar is shown (close #1269) (#1304)
feat: auto focus search bar when sidebar is shown
2023-03-08 08:02:51 +08:00
Zeng1998 d1bafd66c8 feat: allow to filter memos with resources (#1299) 2023-03-07 19:36:36 +08:00
Xiang Jaywhen daa1e9edfb fix: Ask-AI history list reversed when loading answer (#1301) 2023-03-07 19:36:18 +08:00
kimw 008d6a0c81 feat: add GitLab OAuth2 template (#1302) 2023-03-07 19:35:31 +08:00
远浅 7c5fae68fe fix: navigate faild silently (#1300) 2023-03-07 09:24:31 +08:00
Yunwei Xiao c57cea1aaa fix: fix the typo of openai (#1298) 2023-03-07 08:38:41 +08:00
boojack 595dbdb0ec feat: add root layout (#1294) 2023-03-06 21:13:35 +08:00
Wujiao233 003161ea54 feat: support set openai api host (#1292)
* Docker

* feat: support set openai api host

* fix css

* fix eslint

* use API in backend & put host check in plugin/openai

* fix go-static-checks
2023-03-06 20:10:53 +08:00
Zeng1998 fd99c5461c feat(s3): customize filenames via placeholders (#1285)
* feat(s3): customize filenames via placeholders

* fix go-static-checks

* add tips on the frontend

* fix eslint check

* remove yarn.lock

* remove Config.Path

* update tips

* fix

* update
2023-03-06 12:04:19 +00:00
Zeng1998 37366dc2e1 fix: patch user with nil password (#1290) 2023-03-06 19:13:09 +08:00
Zeng1998 c1903df374 fix: correct the storage service state (#1288) 2023-03-06 19:13:00 +08:00
远浅 54374bca05 fix: missing prop key (#1291) 2023-03-06 19:12:50 +08:00
CorrectRoadH ddf1eb0219 feat: automatically change language on first launch (#1278)
* feat: automatically change language to browser language on first launch(#1238)

* Update web/src/store/module/global.ts

* chroe: rename languageCodeCovert to convertLanguageCodeToLocale

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-03-05 23:45:33 +08:00
Juskinbo 8c5ba63f8c fix: overflow of dialog-content-container (#1277)
* fix: overflow of dialog-content-container

* fix: overflow of dialog-content-container
2023-03-05 23:19:01 +08:00
boojack f7cd039819 chore: rename common to base component (#1279) 2023-03-05 23:08:02 +08:00
boojack 4335897367 chore: remove metrics plugin (#1276)
* chore: remove metrics plugin

* chore: update
2023-03-05 21:42:32 +08:00
boojack 6201dcf1aa chore: simplify readme (#1275) 2023-03-05 21:33:57 +08:00
boojack 5d24fe189d chore: update location store handler (#1273)
* chore: update location store handler

* chore: update search bar
2023-03-05 19:50:50 +08:00
boojack 6d9ead80b2 chore: update demo url (#1256) 2023-03-05 01:18:30 +08:00
boojack bf46a9af68 chore: add heat map to sidebar (#1255) 2023-03-05 01:03:37 +08:00
boojack c6d43581f9 revert: Fix: Markdown hyperlinks with parenthesis take first closing parenthesis as final (#1251)
Revert "fix: Markdown hyperlinks with parenthesis take first closing parenthesis as final (#1213)"

This reverts commit 1b0629bf0f.
2023-03-04 20:54:14 +08:00
boojack 31399fe475 fix: s3 custom path (#1249) 2023-03-04 20:06:32 +08:00
boojack e150599274 chore: upgrade version to v0.11.1 (#1247) 2023-03-04 18:49:50 +08:00
boojack b70117e9f4 chore: update demo screenshot (#1246) 2023-03-04 18:33:17 +08:00
boojack df04e852bf feat: implement openai integration (#1245)
* feat: implement openai integration

* chore: update
2023-03-04 18:22:10 +08:00
boojack dd625d8edc chore: update links reference (#1243) 2023-03-04 15:06:01 +08:00
boojack 6ab58f294e feat: update home layout (#1242) 2023-03-04 13:49:53 +08:00
Alex Zhao 9d4bb5b3af feat: add support for s3 path (#1233)
* add support for path

* fix typo and switch positions with Path and Bucket

* using path method instead of string concatenation
2023-03-04 07:59:44 +08:00
Mehmet Altuğ Akgül e062c9b4a7 feat: add Turkish Translation file (#1202)
* Created tr.json for Turkish Translation

* updated file for trLocale

* Updated for Turkish Locale

* Update i18n.ts

* Update i18n.ts

* Update package.json

* Update package.json

* Update i18n.d.ts

* Update user_setting.go

* Update package.json

* Update web/src/components/LocaleSelect.tsx

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

* Update package.json

* Update LocaleSelect.tsx

* Update LocaleSelect.tsx

* Update i18n.ts

* Update i18n.ts

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-03-02 10:05:15 +08:00
Jason Shawn D' Souza 1b0629bf0f fix: Markdown hyperlinks with parenthesis take first closing parenthesis as final (#1213)
Updating regex to pick up edge case with parentheses
2023-03-01 22:43:13 +08:00
Thareek Anvar M e83ea7fd76 fix: login security issue (#1198)
* fix

* fix bug

* changes

* Revert "changes"

This reverts commit 2b2084c7bd.

* should close the toast if its error also

* no internal errors + sso

* change the text to Incorrect login credentials, please try again
2023-03-01 22:33:43 +08:00
Dan Fiumara 6dab43523d docs: create CustomThemes.md (#1210)
* Create CustomThemes.md

* Update doc/CustomThemes.md

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

* Update doc/CustomThemes.md

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

* Update doc/CustomThemes.md

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

* Update CustomThemes.md

* Update CustomThemes.md

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-03-01 22:32:51 +08:00
Dane Roelofs 4a59965d7a fix: action button container not overflowing memo (#1218) 2023-03-01 22:05:02 +08:00
远浅 71de6613d3 refactor: declare variable for devProxyServer (#1220) 2023-03-01 19:50:43 +08:00
Stephen Zhou e43e04b478 chore: fix unknown at rule @applyless(unknownAtRules) (#1221)
fix: Unknown at rule @applyless(unknownAtRules)
2023-03-01 19:50:09 +08:00
Dan Fiumara 4ab32d4c2c fix: corners not rounded on memos-editor-wrapper (#1209)
* Fixed corners on memos-editor-wrapper

* Remove change in Home.tsx

* Moved change to home.less
2023-03-01 13:38:33 +08:00
Weblate (bot) 1f05b52c4e chore: translations update from Hosted Weblate (#1196)
Translated using Weblate (Turkish)

Currently translated at 19.5% (41 of 210 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 33.3% (70 of 210 strings)

Translated using Weblate (Swedish)

Currently translated at 100.0% (210 of 210 strings)

Translated using Weblate (Dutch)

Currently translated at 100.0% (210 of 210 strings)

Translated using Weblate (Spanish)

Currently translated at 100.0% (210 of 210 strings)

Translated using Weblate (Turkish)

Currently translated at 1.4% (3 of 210 strings)

Translated using Weblate (Turkish)

Currently translated at 0.4% (1 of 210 strings)

Translated using Weblate (Turkish)

Currently translated at 0.0% (0 of 0 strings)

Added translation using Weblate (Turkish)

Translated using Weblate (Chinese (Traditional))

Currently translated at 100.0% (210 of 210 strings)

Translated using Weblate (Chinese (Traditional))

Currently translated at 91.4% (192 of 210 strings)









Translate-URL: https://hosted.weblate.org/projects/memos/web/es/
Translate-URL: https://hosted.weblate.org/projects/memos/web/nl/
Translate-URL: https://hosted.weblate.org/projects/memos/web/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/memos/web/sv/
Translate-URL: https://hosted.weblate.org/projects/memos/web/tr/
Translate-URL: https://hosted.weblate.org/projects/memos/web/zh_Hant/
Translation: memos/web

Co-authored-by: Felipe Nogueira <contato.fnog@gmail.com>
Co-authored-by: Jasper Platenburg <jasperdgp@outlook.com>
Co-authored-by: Luna Jernberg <droidbittin@gmail.com>
Co-authored-by: Onur Ravli <onur@ravli.co>
Co-authored-by: SiriYang <www.yangxinruei@qq.com>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
2023-02-28 23:53:38 +08:00
Stephen Zhou 3e7fbac926 fix: corner style after scaling (#1199) 2023-02-28 23:52:04 +08:00
CorrectRoadH eda27a60be fix: incorrect sharing image gerneration (#1157) (#1205) 2023-02-28 22:43:42 +08:00
Dan Fiumara 107a2dbe90 feat: update en locale (#1195) 2023-02-28 09:36:07 +08:00
boojack 9577f6dbe8 feat: add resource visibility to user setting (#1190) 2023-02-27 22:16:33 +08:00
boojack ae61ade2b1 chore: add my account entry in user dropdown (#1187) 2023-02-27 21:30:54 +08:00
boojack 977e7f55e5 feat: add visibility field to resource (#1185) 2023-02-27 21:26:50 +08:00
Weblate (bot) c399ff86e0 chore: translations update from Hosted Weblate (#1154)
Translated using Weblate (Portuguese (Brazil))

Currently translated at 25.7% (54 of 210 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 0.0% (0 of 0 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (210 of 210 strings)

Added translation using Weblate (Portuguese (Brazil))





Translate-URL: https://hosted.weblate.org/projects/memos/web/pl/
Translate-URL: https://hosted.weblate.org/projects/memos/web/pt_BR/
Translation: memos/web

Co-authored-by: Felipe Nogueira <contato.fnog@gmail.com>
Co-authored-by: Piotr Wik <p_00@o2.pl>
2023-02-27 20:09:44 +08:00
仝华帅 d43b806c5e fix: model fields are unconsistent with the data queried from the database (#1179)
fix function createActivity typo
2023-02-27 19:50:51 +08:00
Zeng1998 7b7061846c chore: open url in other tabs (#1173)
* chore: open url in other tabs

* update: add `rel="noreferrer"`
2023-02-27 19:50:43 +08:00
Zeng1998 d81cf5cc1b fix: z-index of image preview (#1171) 2023-02-27 19:50:26 +08:00
Zeng1998 4284fd0469 fix: omission of long filename (#1170) 2023-02-27 19:50:09 +08:00
boojack 039b6b247a chore: remove username click event (#1167)
chore: remove user name click event
2023-02-26 23:52:51 +08:00
H3arn a09b2c4eea feat: use accent color when confirming deletion (#1161)
- .final-confirm
2023-02-26 19:37:01 +08:00
Zhizhen He 50a99e9120 fix: correct comments for exported functions and variables (#1158) 2023-02-25 20:48:38 +08:00
Zeng1998 57479b250a chore: remove validators on the frontend (#1156)
* chore: update minlength of username

* remove the validator on frontend

* update
2023-02-25 14:59:29 +08:00
Weblate (bot) e64245099c chore: update translations from Hosted Weblate (#1150)
Translated using Weblate (Polish)

Currently translated at 99.0% (208 of 210 strings)


Translate-URL: https://hosted.weblate.org/projects/memos/web/pl/
Translation: memos/web

Co-authored-by: Piotr Wik <p_00@o2.pl>
2023-02-24 16:14:58 +00:00
boojack d6e4b5e889 chore: fix dispatch memo pinned (#1152) 2023-02-25 00:13:41 +08:00
boojack 6e2e7ac782 fix: remove memo list api (#1151) 2023-02-24 21:11:12 +08:00
boojack 904a6bd97f fix: find memo list order (#1149) 2023-02-24 20:34:54 +08:00
Xiang Jaywhen c24b7097fa fix: function name typo (#1148)
fixed function name typo

“handleAddFilterBenClick” -> "handleAddFilterBtnClick"

[#1147 ](https://github.com/usememos/memos/issues/1147)
2023-02-24 18:09:31 +08:00
boojack cc23d5cafe chore: upgrade version to 0.11.0 (#1143)
* chore: upgrade version to `0.11.0`

* chore: update
2023-02-24 08:31:54 +08:00
boojack 9c5b44d070 feat: update storage schema (#1142) 2023-02-24 00:02:51 +08:00
boojack 84fb8b2288 feat: update storage setting section (#1140) 2023-02-23 23:22:34 +08:00
boojack 6d2d322140 chore: show pinned memos in explore (#1141) 2023-02-23 19:59:18 +08:00
boojack 1517688076 chore: update code structure (#1139)
* chore: update code structure

* chore: update
2023-02-23 00:07:16 +08:00
boojack 29124f56bb chore: update memo service (#1138)
* chore: update memo service

* chore: update
2023-02-22 20:07:55 +08:00
boojack 42d849abfc chore: update explore header style (#1137) 2023-02-22 19:21:08 +08:00
Weblate (bot) d1b307b18f chore: update translations from Hosted Weblate (#1134)
Translated using Weblate (Polish)

Currently translated at 97.1% (204 of 210 strings)

Translated using Weblate (Chinese (Traditional))

Currently translated at 100.0% (210 of 210 strings)



Translate-URL: https://hosted.weblate.org/projects/memos/web/pl/
Translate-URL: https://hosted.weblate.org/projects/memos/web/zh_Hant/
Translation: memos/web

Co-authored-by: Piotr Wik <p_00@o2.pl>
Co-authored-by: SiriYang <www.yangxinruei@qq.com>
2023-02-22 00:58:49 +00:00
Weblate (bot) f6d347c5e4 chore: update translations from Hosted Weblate (#1132)
Translated using Weblate (Chinese (Traditional))

Currently translated at 94.2% (198 of 210 strings)


Translate-URL: https://hosted.weblate.org/projects/memos/web/zh_Hant/
Translation: memos/web

Co-authored-by: SiriYang <www.yangxinruei@qq.com>
2023-02-21 21:39:57 +08:00
Weblate (bot) 4fe8476169 chore: update translations from Hosted Weblate (#1128)
Translated using Weblate (Polish)

Currently translated at 79.5% (167 of 210 strings)

Translated using Weblate (Polish)

Currently translated at 0.0% (0 of 0 strings)

Translated using Weblate (Spanish)

Currently translated at 100.0% (210 of 210 strings)

Added translation using Weblate (Polish)

Translated using Weblate (Korean)

Currently translated at 98.5% (210 of 213 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 97.1% (207 of 213 strings)

Translated using Weblate (Chinese (Traditional))

Currently translated at 92.0% (196 of 213 strings)

Translated using Weblate (Vietnamese)

Currently translated at 89.2% (190 of 213 strings)

Translated using Weblate (Ukrainian)

Currently translated at 91.5% (195 of 213 strings)

Translated using Weblate (Russian)

Currently translated at 91.5% (195 of 213 strings)

Translated using Weblate (Italian)

Currently translated at 91.5% (195 of 213 strings)

Translated using Weblate (French)

Currently translated at 90.1% (192 of 213 strings)

Translated using Weblate (Spanish)

Currently translated at 91.5% (195 of 213 strings)

Translated using Weblate (Swedish)

Currently translated at 100.0% (210 of 210 strings)

Deleted translation using Weblate (English (United States))

Translated using Weblate (English (United States))

Currently translated at 0.0% (0 of 0 strings)

Added translation using Weblate (English (United States))

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (210 of 210 strings)

Translated using Weblate (Korean)

Currently translated at 98.5% (207 of 210 strings)

Translated using Weblate (Chinese (Simplified))

Currently translated at 97.6% (205 of 210 strings)

Translated using Weblate (Chinese (Traditional))

Currently translated at 93.3% (196 of 210 strings)

Translated using Weblate (Vietnamese)

Currently translated at 90.4% (190 of 210 strings)

Translated using Weblate (Ukrainian)

Currently translated at 92.8% (195 of 210 strings)

Translated using Weblate (Swedish)

Currently translated at 92.8% (195 of 210 strings)

Translated using Weblate (Russian)

Currently translated at 92.8% (195 of 210 strings)

Translated using Weblate (Dutch)

Currently translated at 85.7% (180 of 210 strings)

Translated using Weblate (Italian)

Currently translated at 92.8% (195 of 210 strings)

Translated using Weblate (French)

Currently translated at 91.4% (192 of 210 strings)

Translated using Weblate (Spanish)

Currently translated at 92.8% (195 of 210 strings)

Translated using Weblate (German)

Currently translated at 91.4% (192 of 210 strings)








Translate-URL: https://hosted.weblate.org/projects/memos/web/de/
Translate-URL: https://hosted.weblate.org/projects/memos/web/en_US/
Translate-URL: https://hosted.weblate.org/projects/memos/web/es/
Translate-URL: https://hosted.weblate.org/projects/memos/web/fr/
Translate-URL: https://hosted.weblate.org/projects/memos/web/it/
Translate-URL: https://hosted.weblate.org/projects/memos/web/ko/
Translate-URL: https://hosted.weblate.org/projects/memos/web/nl/
Translate-URL: https://hosted.weblate.org/projects/memos/web/pl/
Translate-URL: https://hosted.weblate.org/projects/memos/web/ru/
Translate-URL: https://hosted.weblate.org/projects/memos/web/sv/
Translate-URL: https://hosted.weblate.org/projects/memos/web/uk/
Translate-URL: https://hosted.weblate.org/projects/memos/web/vi/
Translate-URL: https://hosted.weblate.org/projects/memos/web/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/memos/web/zh_Hant/
Translation: memos/web

Co-authored-by: Luna Jernberg <droidbittin@gmail.com>
Co-authored-by: Piotr Wik <p_00@o2.pl>
Co-authored-by: Yoshino-s <cy-cui@outlook.com>
Co-authored-by: boojack <stevenlgtm@gmail.com>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
2023-02-21 07:59:02 +08:00
Yoshino-s bbc5ac9f0e feat: make file uplaod support drag/drop (#1129) 2023-02-20 22:17:01 +08:00
_Jellen 29b5c393d1 feat: add Korean translation (#1127)
added Korean translation
2023-02-20 00:54:12 +00:00
boojack b8cc0b1270 chore: update readme with weblate badge (#1126) 2023-02-19 21:55:29 +08:00
boojack b145d8b8a2 chore: update setting dialog style (#1125) 2023-02-19 21:12:16 +08:00
boojack ffe1073292 fix: schema path for demo mode (#1124) 2023-02-19 16:34:15 +08:00
Yoshino-s afaaec8492 feat(mode): add demo mode (#1121)
* feat(mode): add demo mode

* chroe: Update store/db/db.go

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

* chroe: Update store/db/db.go

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

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-02-19 13:36:45 +08:00
boojack d0b8b076cf feat: implement sign in with SSO (#1119)
* feat: implement sign in with SSO

* chore: update

* chore: update

* chore: update
2023-02-19 09:50:30 +08:00
boojack 708049bb89 feat: add SSO related UI (#1118)
* feat: add SSO related UI

* chore: update
2023-02-18 22:57:45 +08:00
Stephen Zhou 65aa51d525 feat: generate RSS item title and limit item count (#1117)
* feat: generate RSS item title and limit item count

* Update server/rss.go

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

* Update server/rss.go

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-02-18 22:20:28 +08:00
boojack cbbd284e7a feat: add store cache for idp (#1116)
feat: add cache for idp
2023-02-18 18:41:52 +08:00
boojack 852903bdbd fix: idp config definition (#1115)
fix: idp definition
2023-02-18 18:31:03 +08:00
Zeng1998 19efacef9c chore: add desc for storage form (#1112) 2023-02-18 18:08:35 +08:00
boojack 0f57629d25 feat: implement idp server (#1111)
* feat: implement idp server

* chore: update
2023-02-18 11:29:12 +08:00
boojack 69726c3925 feat: implement oauth2 plugin (#1110) 2023-02-18 10:50:13 +08:00
boojack 37f9c7c8d6 chore: update avatar max size (#1109) 2023-02-18 10:48:31 +08:00
boojack bcee0bbf3a feat: add avatar to user in frontend (#1108) 2023-02-18 10:00:46 +08:00
boojack 096a71c58b feat: add avatar_url field to user table (#1106)
refactor: add `avatar_url` field to user table
2023-02-17 23:55:56 +08:00
boojack a538b9789b feat: introduce idp table (#1105)
* feat: introduce idp table

* chore: update
2023-02-17 13:06:41 +00:00
boojack c6e525b06f chore: remove unused fields of storage table (#1104) 2023-02-17 20:12:08 +08:00
boojack d29c40dc71 chore: update router loader (#1102) 2023-02-17 08:26:40 +08:00
Jake 4f5f541efe docs: add raycast extension (#1100) 2023-02-16 23:38:30 +08:00
boojack caf054bae7 chore: add beta badge to storage (#1099)
* chore: add beta badge to storage

* chore: update
2023-02-16 21:21:39 +08:00
boojack 7e8011ba34 chore: support deleting storage (#1095) 2023-02-15 22:54:46 +08:00
Ruihang Xia e46f77681d chore(build): anchor setup-buildx-action@v2 to version v0.9.1 (#1089)
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
2023-02-15 22:16:45 +08:00
Ryan McPherson 0de0a5aa87 chore: make README more comprehensive (#1065)
* Update README.md

* fix typos in readme

* Update README.md

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-02-15 20:52:17 +08:00
boojack 3394380ffa chore: update storage components (#1091) 2023-02-14 22:45:22 +08:00
Zeng1998 2493bb0fb7 feat: storage service frontend (#1088) 2023-02-14 09:56:04 +08:00
Christopher 4641e89c17 feat(system): support for disabling public memos (#1003)
* feat(system): support for disabling public memos

* fix(web/editor): set visibility to private on disabled public memos

* feat(server/memo): find/check if public memos are disabled

* fix(server/memo): handle error for finding system error

* fix(server/memo): unmarshal visiblity when getting system settings

* chore(web): move side effect imports to end

* Update memo.go

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-02-13 16:07:31 +00:00
Xi 28405f6d24 feat: not found page (#1081)
* feat: style for not found page (#1078)

* chore: translation for not found page (#1078)

* feat: add not found page (#1078)

* chore: router for not found page (#1078)

* fix: typo
2023-02-13 23:28:46 +08:00
boojack 5455cb3164 chore: simplify editor (#1087) 2023-02-13 23:27:45 +08:00
Zeng1998 1e4a81dea9 feat: storage service backend (#1086)
* feat: storage service backend

* update go.mod

* update the column name (urlPrefix -> url_prefix)

* update

* update
2023-02-13 19:36:48 +08:00
Jake cbc3373e8e docs: add shortcut for ios (#1083) 2023-02-13 12:41:15 +08:00
boojack 870559046f chore: update skipper name (#1080) 2023-02-12 17:29:23 +08:00
boojack a997e1d10d chore: simplify memo editor component (#1079) 2023-02-12 16:34:42 +08:00
Jake c28d35d8f7 docs: memos-import-from-flomo support wechat reading (#1077) 2023-02-12 07:32:03 +08:00
boojack b92da8f123 fix: check localsetting exists (#1076) 2023-02-11 22:54:13 +08:00
boojack bdf0c44246 chore: add CreatedTs field to MemoCreate (#1073) 2023-02-11 21:32:42 +08:00
Jake 799fb058b4 docs: add memos-import-from-flomo (#1072) 2023-02-11 21:31:38 +08:00
Zeng1998 11924ad4c5 feat: add storage service table (#1070)
* feat: add storage service table

* update json field name

* update table name

* add updated_ts
2023-02-11 20:31:39 +08:00
boojack b11d2130a0 chore: validate external link (#1069) 2023-02-11 17:34:29 +08:00
boojack e0f4cb06b3 chore: update tags order (#1068) 2023-02-11 16:05:52 +08:00
boojack aad97c4c54 chore: update signup api (#1067) 2023-02-11 15:15:56 +08:00
boojack 3590d3f8b6 feat: update store cache (#1066)
* feat: update store cache

* chore: update
2023-02-11 14:19:26 +08:00
Shruti Chaturvedi 6e5be6ba75 chore: add text for Uffizzi Previews in README (#1061) 2023-02-11 08:35:53 +08:00
boojack b366ce7594 fix: delete tag (#1062) 2023-02-10 23:57:02 +08:00
Zeng1998 1eacf5367d chore: upgrade version to 0.10.3 (#1060) 2023-02-10 12:03:18 +08:00
boojack f74d1b7bf8 chore: remove resource cache (#1059) 2023-02-10 08:43:39 +08:00
boojack a004dcf320 fix: pass empty condition in rss (#1058)
fix: handle empty condition in rss
2023-02-10 08:28:14 +08:00
boojack 5df59a48b7 chore: update rss icon style (#1056) 2023-02-09 23:45:48 +08:00
boojack 989208eb45 chore: update resource select dialog (#999)
* chore: update resource select dialog

* chore: update
2023-02-09 23:24:51 +08:00
boojack bec1558488 fix: patch resource id (#1055) 2023-02-09 23:20:36 +08:00
Stephen Zhou 6ff79c5d5c fix: can not input chinese (#1053) 2023-02-09 21:50:51 +08:00
Stephen Zhou 168c4f6950 feat: more rss info (#1052)
* feat: more rss info

* fix: ci
2023-02-09 21:17:15 +08:00
boojack 3e40b9df66 chore: update readme with dark mode demo (#1049) 2023-02-08 20:21:33 +08:00
Stephen Zhou 94f97208e3 chore: setup project workspace for better DX (#1048)
* chore: setup project workspace for better DX

* chore: remove prettier ext
2023-02-08 18:43:13 +08:00
boojack bd9003c24b chore: update readme (#1047) 2023-02-08 08:51:36 +08:00
Nitin Khanna 26700a1ff0 fix: DatePicker should say Wed instead of Web (#1046)
DatePicker should say Wed instead of Web
2023-02-08 08:37:02 +08:00
Stephen Zhou 8b92021b1a fix: editor cursor not in view after smart editing (#1043) 2023-02-07 23:31:43 +08:00
Zeng1998 7cd474dbb7 feat: add setting for double-click of memos (#1036)
* feat: add setting for double-click of memos

* update

* update
2023-02-07 20:35:41 +08:00
boojack 9bf869767d chore: update seed data (#1042) 2023-02-07 20:35:32 +08:00
Zeng1998 9e818cddce feat: tag filter in explore (#1032)
* temp

* Revert "temp"

This reverts commit d2d14b4c57.

* Revert "Revert "temp""

This reverts commit c50be22cb4.

* feat: tag filter in explore page

* update
2023-02-07 20:11:22 +08:00
Stephen Zhou d6fe180ca1 fix: parse chrome or edge urls in plain link (#1034)
fix: parse chrome or urls in plain link
2023-02-07 20:10:13 +08:00
Stephen Zhou 99cac7cac0 fix: scroll when clicking expand button (#1035) 2023-02-07 20:09:30 +08:00
boojack 81f2166912 chore: update code owners (#1041) 2023-02-07 20:08:51 +08:00
boojack 4de65ab55d fix: url encode for tag name (#1031) 2023-02-06 20:28:19 +08:00
Zeng1998 771ef44d82 feat: support enter to signin (#1014) 2023-02-06 20:03:33 +08:00
-Shiken- 76c42c6c9f chore: more translation correction to traditional Chinese (#1028)
* more translation correction to traditional Chinese

To be in line with the language habits of traditional Chinese users

* Update zh-Hant.json
2023-02-06 19:59:33 +08:00
Shruti Chaturvedi 003887d4e0 Use official Uffizzi reusable action (#1027)
* Use official Uffizzi reusable action

* Run preview if build passed successfully
2023-02-06 19:59:05 +08:00
-Shiken- 89743bd1e6 chore: update zh-Hant.json (#1023) 2023-02-05 17:45:50 +08:00
boojack 1ace332152 feat: graceful shutdown server (#1016) 2023-02-03 10:30:18 +08:00
Zeng1998 2d14047c73 fix: pdf resource preview (#1008) 2023-02-02 20:34:24 +08:00
Stephen Zhou 42cd93cf33 fix: show copy button on hover (#1002) 2023-01-31 18:38:58 +08:00
boojack 4a7b764ab3 chore: remove unused flags for sqlite (#997) 2023-01-30 00:03:21 +08:00
Shruti Chaturvedi 1bdb0d465c chore: update Uffizzi GHA for better error-handling (#996)
Update Uffizzi GHA for better error-handling
2023-01-29 18:16:44 +08:00
WY-WY-W 930b54fabd feat: update Traditional Chinese translation (#994) 2023-01-29 09:41:56 +08:00
boojack 5b0a54bfb7 chore: clean package.json (#993)
* chore: clean `package.json`

* chore: update
2023-01-26 00:35:50 +08:00
boojack 6c3ff6de63 chore: get resource blob optional (#991) 2023-01-25 16:11:02 +08:00
boojack dd5a23e36e feat: support creating resource with external link (#988) 2023-01-22 21:16:28 +08:00
boojack 848ecd99ee chore: format SQL (#987)
chore: format sql
2023-01-22 21:16:03 +08:00
boojack 82f61f2a0e chore: upgrade version to 0.10.2 (#983) 2023-01-21 08:56:26 +08:00
boojack c5368fe8d3 chore: update resource dialog style (#982) 2023-01-21 08:46:49 +08:00
Wujiao233 0aaf153717 fix: video and audio can't play on safari (#980)
* fix: video can't play on safari

* fix: audio can't play on safari
2023-01-20 16:52:38 +08:00
Stephen Zhou 942e1f887b feat: scrool to memo after editing (#907) 2023-01-19 20:57:45 +08:00
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
2023-01-19 20:57:03 +08:00
Wujiao233 a5f3b051f2 fix: round corner issue in resource blocks (#979) 2023-01-19 17:59:37 +08:00
boojack 4ba9767b94 fix: use input instead of textfield (#973) 2023-01-19 09:16:22 +08:00
Zeng1998 12fda38520 feat: add customized logo in share dialog (#969)
* feat: add qrcode in share dialog

* update: change the color

* feat: add customized logo in share dialog

* update: import order

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-01-18 10:52:25 +00:00
Zeng1998 9ed503fd6d feat: add qrcode in share dialog (#964)
* feat: add qrcode in share dialog

* update: change the color

* update: import order
2023-01-18 18:49:48 +08:00
Viet-Anh, Nguyen a8976de634 feat: update Vietnamese translation (#965)
refactor: Update Vietnamese translation
2023-01-18 09:01:53 +08:00
Zeng1998 f8855ddb56 feat: support empty content memo (#963)
feat: support empty-text memo
2023-01-17 20:56:57 +08:00
Jasper Platenburg 288ecc617d feat: issue translator workflow (#956)
Create issue-translator.yml
2023-01-15 21:33:19 +08:00
Ángel Fernández Sánchez 14ec81b65c feat: update Spanish translation (#954) 2023-01-15 08:35:20 +08:00
boojack fae0b64a08 fix: delete tag api (#950)
* fix: delete tag api

* chore: update
2023-01-14 12:08:31 +08:00
boojack 677750ef51 chore: upgrade version to 0.10.1 (#949) 2023-01-14 08:00:07 +08:00
boojack 4cfd000b92 feat: support audio player (#948) 2023-01-14 07:41:17 +08:00
boojack aacaf3f37c chore: remove sponsor with open collective (#947)
chore: update github sponsors
2023-01-14 06:56:17 +08:00
boojack ad4a79a510 chore: update GitHub sponsor (#946)
chore: update github sponsor
2023-01-14 06:51:21 +08:00
boojack 219d2754a0 chore: remove existed tags in suggestion (#944) 2023-01-13 22:37:30 +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
Jasper Platenburg c167c21e4e chore: added translation for copy memo link (#942) 2023-01-13 21:22:20 +08:00
boojack 40d25f7dca fix: skip api error for static middleware (#941) 2023-01-13 07:06:15 +08:00
boojack 1441a1df1f chore: update funding with open collective (#940) 2023-01-12 23:48:51 +08:00
boojack b19c3c6db3 feat: update renderer in list (#935) 2023-01-12 08:52:57 +08:00
boojack 8c146aed68 feat: update memo resources style (#933)
* feat: update memo resources style

* chore: update
2023-01-12 00:00:44 +08:00
boojack 805122f45c chore: add User stories section to readme (#932) 2023-01-11 09:21:52 +08:00
sfan5 7d5de1a07e feat: update German translation (#926) 2023-01-08 23:41:48 +08:00
boojack 4b860777cf fix: tag generate in code block (#925) 2023-01-08 13:49:26 +08:00
boojack e29924c8a1 fix: codeblock renderer (#924) 2023-01-08 11:24:28 +08:00
boojack 1847756ade chore: remove escape (#918) 2023-01-07 14:52:47 +08:00
boojack 771c56f485 chore: fix renderer (#917) 2023-01-07 14:07:17 +08:00
boojack 0f057e81e9 fix: version compare (#916)
* fix: version compare

* chore: update
2023-01-07 13:58:42 +08:00
Stephen Zhou 529c9b34a7 fix: missing creator id in shortcut cache (#915)
fix: missing creatot id in shortcut cache
2023-01-07 12:45:55 +08:00
boojack e2e8130f4c fix: sort version (#914) 2023-01-07 11:49:58 +08:00
boojack 46c13a4b7f chore: add skipper for secure (#913) 2023-01-07 10:51:34 +08:00
boojack 96798e10b4 feat: support embed memo with iframe (#912) 2023-01-07 01:56:02 +08:00
boojack 0f8ce3dd16 refactor: return jsx element instead of string in marked (#910)
* refactor: return jsx element instead of string in marked

* chore: update
2023-01-07 00:13:49 +08:00
boojack 491859bbf6 chore: update activity metrics (#908) 2023-01-05 20:56:50 +08:00
boojack f16123a624 chore: update memo create activity (#903) 2023-01-03 23:49:11 +08:00
boojack d50ad9433f feat: persistent session name (#902)
* feat: persistent session name

* chore: update
2023-01-03 23:05:42 +08:00
Zeng1998 92a8a4ac0c feat: support code copy (#901)
* feat: support code copy

* update
2023-01-03 23:05:00 +08:00
helaxious 62f53888ba feat: update docker command description (#893) (#900)
* Add a line on README to help prevent a mistake (#893)

* Update README.md

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

Co-authored-by: boojack <stevenlgtm@gmail.com>
2023-01-03 22:40:53 +08:00
boojack 79180928d4 chore: update server activity (#898) 2023-01-03 20:05:37 +08:00
boojack e5550828a0 chore: update activity payload (#891) 2023-01-02 23:18:12 +08:00
Vincenzo Cardone 2e95f6824f feat: add Italian Translation (#890) 2023-01-02 09:41:39 +08:00
boojack 5195012217 feat: add activity table (#888)
feat: introduce activity
2023-01-01 23:55:02 +08:00
boojack a797280e3f chore: update middleware skipper (#887)
* chore: update middleware skipper

* chore: update
2023-01-01 23:26:21 +08:00
boojack 293f88e40c chore: update GitHub action name (#886)
* chore: update github actions name

* chore: update
2023-01-01 22:01:16 +08:00
boojack 861eeb7b0f chore: add skipper in CSRF (#885) 2023-01-01 21:32:17 +08:00
boojack 24b21aa9d7 chore: update version to 0.9.1 (#882) 2022-12-31 15:40:53 +08:00
boojack 51eac649c5 chore: update create tag dialog (#881) 2022-12-31 15:13:25 +08:00
boojack 7670c95360 chore: fix XSS in renderer (#880) 2022-12-31 11:52:57 +08:00
Ivan 65e9fdead1 feat: add russian locale (#879) 2022-12-31 09:02:14 +08:00
Zeng1998 2b2792de73 fix: logic of email validation (#877)
* fix: fix logic of email validation

* update
2022-12-30 13:10:52 +08:00
boojack c9bb2b785d chore: fix CSRF (#876) 2022-12-30 00:17:19 +08:00
boojack 64e5c343c5 chore: fix XSS in renderer (#875)
chore: fix xss in renderer
2022-12-29 23:27:56 +08:00
boojack 9169b3f2cd chore: update tip text for empty tag list (#872) 2022-12-29 09:14:24 +08:00
boojack b6f7a85a2a fix: reload page when sign out (#871) 2022-12-28 20:58:59 +08:00
boojack 3556ae4e65 fix: access control (#870) 2022-12-28 20:22:52 +08:00
boojack f888c62840 chore: update userinfo validator (#868)
* chore: update userinfo validator

* chore: update actions

* chore: update
2022-12-27 21:51:43 +08:00
Taras c160bed403 fead: add ukrainian locale (#864) 2022-12-26 19:10:47 +08:00
boojack afc9709484 chore: update dev config (#857) 2022-12-25 10:39:45 +08:00
boojack 05b41804e3 chore: hide host user email (#856) 2022-12-25 10:28:51 +08:00
Zeng1998 2e2657b39d feat: add setting for power editor (#851) 2022-12-24 16:18:13 +08:00
Zeng1998 60ee602639 feat: enable word break (#849)
* feat: enable word break

* Update web/src/less/editor.less

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

* Update web/src/less/memo-content.less

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

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-12-24 14:50:27 +08:00
Zeng1998 cac04e4406 feat: enable word break (#849)
* feat: enable word break

* Update web/src/less/editor.less

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

* Update web/src/less/memo-content.less

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

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-12-24 14:50:10 +08:00
M. Gschwandtner 278b4d21b4 fix: prioritize user css by moving it to the body end (#847)
Co-authored-by: M. Gschwandtner <84477901+OnlyPain-ctrl@users.noreply.github.com>
2022-12-24 09:35:30 +08:00
boojack 27fd1e2880 chore: remove secure flag (#848) 2022-12-24 08:31:37 +08:00
boojack fae9b3db46 chore: revert add linux/arm/v7 to platforms (#843)
Revert "chore: add `linux/arm/v7` to platforms (#842)"

This reverts commit 49c7f49820.
2022-12-23 22:39:04 +08:00
boojack 49c7f49820 chore: add linux/arm/v7 to platforms (#842) 2022-12-23 22:25:24 +08:00
boojack ef8981794e chore: restore dockerfile (#841) 2022-12-23 22:12:41 +08:00
boojack e52d77b2c4 chore: restore lockfile (#840) 2022-12-23 22:08:54 +08:00
boojack 1d2953b1b1 chore: downgrade joy-ui version (#839) 2022-12-23 21:53:13 +08:00
boojack d702eaa625 chore: update dockerfile (#838) 2022-12-23 20:48:51 +08:00
boojack 50811c3064 chore: update yarn.lock (#837) 2022-12-23 20:33:53 +08:00
boojack 99d9cc9168 fix: set csp header only for resource (#836) 2022-12-23 20:02:42 +08:00
boojack 119603da5d chore: upgrade version to 0.9.0 (#835) 2022-12-23 19:49:55 +08:00
boojack f6039f2eb9 chore: update dialog title (#834) 2022-12-23 19:49:44 +08:00
boojack 65cc19c12e chore: add escape to prevent XSS (#833) 2022-12-23 19:17:33 +08:00
boojack c07b4a57ca feat: add secure middleware (#832) 2022-12-23 18:58:55 +08:00
boojack dca35bde87 fix: disable decode patch id (#831) 2022-12-23 18:38:24 +08:00
boojack 9f25badde3 chore: update logo format to png (#830) 2022-12-23 00:21:53 +08:00
boojack 7efa749c66 feat: customize system profile (#828) 2022-12-22 19:48:44 +08:00
boojack 72daa4e1d6 feat: support heading syntax (#827) 2022-12-22 19:48:19 +08:00
ChasLui 54702db9ba feat: prevent page jitter caused by the presence of scroll bars (#808) 2022-12-22 17:46:09 +08:00
Zeng1998 41ad084489 fix: fix css of input placeholder in auth page (#824) 2022-12-22 17:45:12 +08:00
boojack 2fb171e069 chore: update create tag dialog style (#818)
* chore: update create tag dialog

* chore: update
2022-12-22 09:29:22 +08:00
boojack 201c0b020d chore: update seed data for tag (#817)
* chore: update seed data

* chore: add `_journal_mode` for SQLite

* chore: update create tag dialog
2022-12-22 08:34:05 +08:00
boojack b6f19ca093 feat: upsert tag based content (#816)
* feat: upsert tag based content

* chore: update
2022-12-22 00:35:47 +08:00
boojack 68a77b6e1f feat: create tag dialog (#814) 2022-12-21 23:59:03 +08:00
boojack e4a8a4d708 feat: tag table (#811)
* feat: tag table

* chore: update

* chore: update
2022-12-21 19:22:32 +08:00
boojack ab07c91d42 feat: update marked (#810) 2022-12-21 18:36:26 +08:00
ChasLui 1838e616fd feat: show active panel when searchBar is in focus (#806)
* feat: Show active panel when searchBar is in focus

* refactor: rename
2022-12-21 18:36:08 +08:00
M. Gschwandtner 90d0ccc2e8 feat: add arm/v7 to buildx platforms (#802)
added arm/v7 to buildx platforms

Co-authored-by: M. Gschwandtner <84477901+OnlyPain-ctrl@users.noreply.github.com>
2022-12-21 09:08:08 +08:00
ChasLui 358a5c0ed9 feat: press cmd+f to focus on the search bar (#800) 2022-12-21 00:46:22 +08:00
ChasLui 40f39fd66c feat: use shift+tab to unindent (#799)
* feat: Use shift+tab to unindent, just like vscode

* fix: shit+tab return
2022-12-20 23:03:25 +08:00
Jasper Platenburg 3b41976866 feat: implement plurals for stats (#783)
* implement plurals for stats

* renamed variables

* modified according to 18n guide
2022-12-20 21:29:10 +08:00
PublicHer0 a23de50bb8 feat: update spanish locale (#786)
* Adding spanish version

* update spanish locale

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-12-20 13:18:21 +00:00
Jasper Platenburg 6596e6893e feat: implement translation for days (#784)
implement trranslation for weekdays

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-12-20 13:10:25 +00:00
ChasLui b6fe4d914e fix: incorrect cursor when text is selected in range (#797) 2022-12-20 20:51:32 +08:00
ChasLui 3c2cd43d28 fix: shortcuts should exclude the shift judgment (#796)
* fix: Shortcuts should exclude the shift judgment

* fix: eslint
2022-12-20 19:47:35 +08:00
ChasLui 2658b1fd09 feat: support command + k shortcuts insert []() (#793)
* feat: support `command + k` shortcuts insert []()

* fix: eslint

* fix: clear code

* fix: eslint

* feat: insert [](url)

* refactor: rename param

* fix: eslint
2022-12-20 18:51:22 +08:00
Zeng1998 b7df1f5bbf feat: matching punctuation (#791) 2022-12-20 18:10:02 +08:00
ChasLui a0face6695 feat: update i18n (#790)
* feat: tag type i18n

* feat: custom server dialog i18n

* feat: i18n resources name

* feat: i18n toast

* fix: eslint

* eslint: fix

* fix: eslint

* fix: eslint
2022-12-20 17:47:02 +08:00
boojack c177db69d5 chore: update tag regexp (#785) 2022-12-20 09:44:41 +08:00
boojack b704c20809 chore: return raw text for html (#782) 2022-12-19 18:45:17 +08:00
boojack 6c17f94ef6 fix: max open conns for SQLite (#781) 2022-12-19 18:28:15 +08:00
lujiefsi 726285e634 chore: restrict the html file (#749)
* restrict the html file

* replace spaces with table

* remove space
2022-12-19 18:26:50 +08:00
Zeng1998 bd6ab71d41 chore: remove unused state (#780) 2022-12-19 18:03:39 +08:00
boojack b67ed1ee13 feat: customize system profile (#774)
* feat: system setting for customized profile

* chore: update

* feat: update frontend

* chore: update
2022-12-18 21:18:30 +08:00
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>
2022-12-18 10:09:12 +00:00
boojack e79d67d127 chore: update readme with deploy guides (#771) 2022-12-18 17:59:29 +08:00
ajstephens1995 1d9ef9813a docs: guide to deploy memos with render for beginners (#769) 2022-12-18 16:35:09 +08:00
boojack ef621a444f refactor: introducing use{Module}Store instead of service (#768)
* refactor: introducing `useEditorStore`

* refactor: update

* chore: update
2022-12-18 15:25:18 +08:00
boojack bd00fa798d chore: simplify ordered list in editor (#767)
chore: simplify editor
2022-12-18 12:44:46 +08:00
Zeng1998 a41745c9ae feat: editor enhancement for order list (#763) 2022-12-18 11:02:42 +08:00
M. Gschwandtner 1eec474007 fix: heatmap popup showing after logging out (#761)
* fix for heatmap popup showing after logging out

* moved node.remove to component unmount

* Update web/src/components/UsageHeatMap.tsx

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

Co-authored-by: M. Gschwandtner <84477901+OnlyPain-ctrl@users.noreply.github.com>
Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-12-17 03:10:06 +00:00
Stephen Zhou 83e5278b51 fix: dialog close when draging from in to out (#760) 2022-12-17 10:53:55 +08:00
boojack a8751af6b5 fix: memo list padding bottom (#759) 2022-12-17 10:19:15 +08:00
boojack 6b24f52cd1 fix: watermark container width (#758) 2022-12-17 10:15:54 +08:00
boojack 7ec22482c1 chore: upgrade version to 0.8.3 (#755) 2022-12-16 23:12:07 +08:00
boojack ee89dc00c0 chore: update list style (#754) 2022-12-16 23:09:01 +08:00
boojack bbd5fe4eb2 feat: remove sticky style for memo editor (#752) 2022-12-16 22:41:12 +08:00
boojack 575a0610a3 chore: revert "feat: add visibility field to resource (#743)" (#751)
Revert "feat: add `visibility` field to resource (#743)"

This reverts commit b68cc08592.
2022-12-16 22:20:17 +08:00
boojack b68cc08592 feat: add visibility field to resource (#743) 2022-12-15 21:15:16 +08:00
Stephen Zhou d51af7e98a fix: hr in edited content do not trigger folding (#748) 2022-12-15 18:38:35 +08:00
M. Gschwandtner 334da5e903 fix: add a span as wrapper to fix whitespace (#747) 2022-12-15 08:45:20 +08:00
Jasper Platenburg 35fed76d1a feat: add 'theme' to translation (#746) 2022-12-15 08:43:32 +08:00
boojack c77d49259a chore: update light bg color (#744) 2022-12-13 23:34:38 +08:00
PublicHer0 5520605ccc feat: add spanish locale (#741) 2022-12-13 09:12:22 +08:00
Zeng1998 1dee8ae49f fix: url resource filename decode (#738)
* fix: url resource filename decode

* update

* update

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

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-12-12 20:00:21 +08:00
Zeng1998 3fd4ee83ac fix: checklist auto continuation (#737) 2022-12-12 18:30:04 +08:00
boojack 5e978e2cfc chore: update color scheme listener (#735) 2022-12-11 23:18:25 +08:00
boojack 37b7b983d2 chore: add vite plugin legacy (#734) 2022-12-11 22:15:52 +08:00
Zeng1998 c4278ef55a fix: fix order in resource dialog (#733) 2022-12-11 21:36:17 +08:00
Zeng1998 91220ea4a6 fix: reset image state in gallery (#730) 2022-12-11 20:14:55 +08:00
Zeng1998 4bebbf3e1d feat: enable paste multiple resources (#729)
* feat: enable paste multiple resources

* update

* update
2022-12-11 19:17:39 +08:00
boojack 5d8b8c37a5 chore: upgrade vite (#728)
* chore: upgrade vite

* Revert "chore: remove lazy import component (#724)"

This reverts commit 688dc2304c.
2022-12-11 18:38:29 +08:00
boojack 564f20d13a chore: remove ESC to close edit (#726) 2022-12-11 14:18:04 +08:00
boojack c3adb1b152 fix: set resource list in memo editor (#725) 2022-12-11 14:04:22 +08:00
boojack 688dc2304c chore: remove lazy import component (#724) 2022-12-10 19:39:43 +08:00
boojack dd6e2337e6 chore: update version to 0.8.2 (#722) 2022-12-10 13:23:38 +08:00
boojack 66418d4210 feat: get image only when cors error (#721) 2022-12-10 13:20:48 +08:00
boojack ab8c7b9d8a fix: auto complete in memo editor (#720) 2022-12-10 12:44:45 +08:00
M. Gschwandtner 387799b31c fix: added dark theme bg color to buttons (#719) 2022-12-10 12:14:02 +08:00
boojack 4a64a4dea8 fix: html lang attr (#718) 2022-12-10 10:42:10 +08:00
M. Gschwandtner 964c58ac01 feat: responsive layout for create shortcut dialog (#717) 2022-12-10 10:17:47 +08:00
boojack 56716cdad4 fix: break word (#708)
* fix: break word

* chore: update
2022-12-09 08:31:45 +08:00
Shruti Chaturvedi a2ee750d1e fix: bump Version of reusable.yaml (#707)
Bump version

Bump up the version for reusable.yaml to v2
2022-12-09 00:31:00 +08:00
Shruti Chaturvedi 3f0601f651 feat: add Uffizzi Integration (#655)
* Integrate Uffizzi

* Update docker-compose.uffizzi.yml

Start memos in dev mode

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

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-12-08 23:45:23 +08:00
Zeng1998 6f8e3432e9 fix: correct priority of keys in editor (#703) 2022-12-08 18:46:43 +08:00
Stephen Zhou b7ab6f8e7e fix: code highlight in dark mode (#702) 2022-12-08 18:30:46 +08:00
Zeng1998 36b92ad884 feat: auto continuation list in editor (#689)
* feat: auto continuation list in editor

* update

* update
2022-12-08 10:01:01 +08:00
apixandru 4d9857ce18 fix: update UsageHeatMap.tsx to account for daylight savings (#696) 2022-12-08 08:24:36 +08:00
boojack 43b22ce55f chore: fix typo (#695) 2022-12-07 22:49:05 +08:00
Zeng1998 147185309c feat: vacuum database in setting (#694)
* feat: vacuum database in setting

* update

* update

* update

* update
2022-12-07 22:45:47 +08:00
Maurice Bauer f48226d4f2 chore: update German translation (#691)
Switched to plural to make the difference between TAG(S) and TAG(E) visible...
Refers to #545
2022-12-07 20:18:35 +08:00
Zeng1998 e92407d9ec feat: image preview enhancement (#682) 2022-12-06 09:38:01 +08:00
Jasper Platenburg 79bf365d78 Dutch locale (#687) 2022-12-06 08:11:21 +08:00
Maurice Bauer 492a1370ab feat: add German i18n item (#686) 2022-12-06 07:42:17 +08:00
boojack e3ddf93c4d chore: update demo image (#672) 2022-12-04 20:43:46 +08:00
boojack 4a9314c476 chore: rename enableFoldMemo (#671)
* chore: rename `enableFoldMemo`

* chore: update
2022-12-04 15:34:03 +08:00
boojack 4767ee3293 feat: support follow system appearance (#670) 2022-12-04 12:23:29 +08:00
boojack 1ea74dfd0d chore: remove table syntax (#669) 2022-12-04 10:52:11 +08:00
Andreas Backström 53cf6ebb79 feat: add swedish/svenska translation (#668)
Add swedish / svenska translation
2022-12-03 21:38:25 +08:00
boojack d1007950e0 chore: remove emoji picker (#667) 2022-12-03 15:28:37 +08:00
Zeng1998 331226ec68 chore: fix some typos of README (#666) 2022-12-03 15:01:27 +08:00
boojack a7374cf998 fix: generate sharing memo image (#663) 2022-12-03 09:41:52 +08:00
boojack e3d76193b9 chore: update global css (#658) 2022-12-02 22:00:03 +08:00
boojack 07f0c3f052 chore: update global css (#657) 2022-12-02 21:34:43 +08:00
boojack a467a7c173 feat: upgrade dev version to 0.8.1 (#656)
* feat: upgrade version to `0.8.1`

* chore: update
2022-12-02 21:09:11 +08:00
boojack 14f9f29348 chore: update user setting appearance (#654) 2022-12-02 20:00:34 +08:00
EINDEX 5451fd2d2c feat: add a product of logseq plugin (#652) 2022-12-02 19:46:39 +08:00
hoi-lau f092771ea1 fix: resource-container overflow (#649) 2022-12-02 19:45:22 +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
boojack c5200ca31b feat: dark mode for dialogs (#643) 2022-11-30 20:34:16 +08:00
Tiefseemonster 1078132b12 fix: member menu dropdown position (#639)
* fix: member menu dropdown position

* chore: cleanup

* chore: cleanup
2022-11-30 20:18:39 +08:00
Stephen Zhou 6b058cd299 feat: save folding option with localstorage (#641)
* fix: change folding option need reload

* fix: floding option undefied
2022-11-30 19:13:55 +08:00
Wence b8f24af5ae feat: dynamic lazy loading route with simple loading page (#632)
* feat: dynamic loading route with simple loading page

* fix: lint fix

* Update web/src/less/loading.less

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

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-11-29 22:13:22 +00:00
boojack 6384f5af74 feat: dark mode for main pages (#637)
* feat: update dark mode styles for auth and explore page

* feat: dark mode for home page
2022-11-29 21:44:52 +08:00
Zeng1998 52038d26d2 chore: update i18n for validator message (#636) 2022-11-29 21:35:40 +08:00
boojack 55f37664ef chore: add theme file for joyui (#635) 2022-11-29 20:15:16 +08:00
Zeng1998 ab8e3473a1 feat: support resources reuse (#620)
* feat: support resource reuse

* update

* update

* update

* update
2022-11-29 19:07:20 +08:00
Zeng1998 eba23c4f6e fix: add validation for user information update (#633) 2022-11-29 19:03:29 +08:00
Zeng1998 00fe6d3862 chore: add joyui tooltip for resources dialog (#630) 2022-11-29 09:36:48 +08:00
Charles Chin 3646b8f5dd docs: update readme (#628) 2022-11-29 06:34:44 +08:00
boojack d40639bf8e chore: update readme me with contributors graph (#626) 2022-11-28 22:48:02 +08:00
Zeng1998 12b81781b9 feat: share memo dialog (#618)
* feat: new share dialog

* update

* update

* update

* update
2022-11-28 21:20:35 +08:00
Zeng1998 b67a37453d feat: member management enhancement (#617)
* feat: member management enhancement

* update

* update

* update

* update
2022-11-28 19:59:11 +08:00
boojack b04e001db1 fix: image url host missing (#623) 2022-11-28 19:52:03 +08:00
Stephen Zhou fbe7b604ef feat: dark mode support for memo detail (#604)
* feat: dark mode support for memo detail

* chore: update

* chore: update

* chore: update
2022-11-28 19:40:08 +08:00
Zeng1998 0402cb7b27 fix: no user settings returns when patch user (#622) 2022-11-28 19:38:44 +08:00
Tiefseemonster b72bfc9c24 fix: selector dropdown position in fullscreen mod (#619) 2022-11-28 19:36:42 +08:00
Zeng1998 40e92f9463 fix: change password max length validation (#616) 2022-11-28 19:33:14 +08:00
Zeng1998 f883dd9c1d feat: create user repeat password (#614)
* feat: create user repeat password

* update
2022-11-28 19:32:53 +08:00
Wujiao233 d8bf55efb2 fix: shoutcut tag filter handle mutiple tags (#608)
* fix: shoutcut tag filter handle mutiple tags

* not edit parser
2022-11-28 19:32:01 +08:00
Wujiao233 f982e83d0a fix: clear shortcut filter when delete this shortcut (#611) 2022-11-28 06:14:25 +08:00
Jasper Platenburg 3472a6db26 fix: password field visible (#609) 2022-11-27 21:53:10 +08:00
boojack c79e51a91b chore: update readme (#606) 2022-11-27 16:04:35 +08:00
boojack ce795a2a7d chore: show content image (#602) 2022-11-27 09:01:19 +08:00
boojack 045819c312 fix: initial database schema (#601) 2022-11-27 08:52:43 +08:00
Tiefseemonster 2fa01886da fix: tooltip overlaps a window border (#599) 2022-11-27 08:48:21 +08:00
Tiefseemonster dd7d322c47 chore: add .vscode to gitignore (#596) 2022-11-27 07:56:19 +08:00
Tiefseemonster dfe71f33c2 fix: search bar dropdown disappearing (#593) 2022-11-26 23:13:02 +08:00
boojack db1d223448 fix: apperance select (#585) 2022-11-26 17:45:16 +08:00
Zeng1998 54271c1598 chore: fix some typos (#587) 2022-11-26 06:23:29 +00:00
Zeng1998 1ee8ebc9e1 fix: collapse btn cursor style (#586) 2022-11-26 05:12:37 +00:00
Stephen Zhou 6e5537d131 feat: dark mode support for explore page (#584)
* feat: dark mode support for auth page

* chore: update

* feat: dark mode support for explore page (#583)

* fix: avoid white text

* fix: import order
2022-11-26 12:19:00 +08: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
Zeng1998 2d5d734da4 chore: update i18n for account settings (#582) 2022-11-26 02:23:57 +00:00
Zeng1998 e1e5121dd7 fix: get markdown image from backend (#581) 2022-11-26 10:20:49 +08:00
boojack 85db6721de chore: disable metrics collector (#580) 2022-11-26 09:23:38 +08:00
boojack b511a7b634 fix: user patch with empty email (#578) 2022-11-25 22:34:24 +08:00
boojack 88c3b1ad0f feat: update prod version (#577) 2022-11-25 22:17:24 +08:00
boojack 9fe15a03b3 chore(revert): update test image platforms (#576)
Revert "chore: update test image platforms (#575)"

This reverts commit 500afffbcf.
2022-11-25 22:08:43 +08:00
boojack 500afffbcf chore: update test image platforms (#575)
chore: update test image plantforms
2022-11-25 22:06:40 +08:00
Zeng1998 5f3cade810 feat: highlight the searched text in memo content (#514)
* feat: highlight the searched text in memo content

* update

* update

* update

* update

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-11-25 21:59:21 +08:00
boojack 072851e3ba chore: update dialog style (#574)
* chore: update tests

* chore: update dialog styles
2022-11-25 21:55:45 +08:00
boojack e2cbea2022 chore: update action name (#573) 2022-11-25 21:53:36 +08:00
boojack 29880be283 chore: update tests (#572) 2022-11-25 21:51:53 +08:00
Tiefseemonster f4e2b7319a fix: make tooltip text no-selecting (#567)
* no selecting tooltip text

With a double click on button, you can get selection on tooltip text. That may be distracting a little bit.

* Update web/src/less/memo.less

Co-authored-by: Stephen Zhou <hi@hyoban.cc>

Co-authored-by: Stephen Zhou <hi@hyoban.cc>
Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-11-25 20:32:59 +08:00
Zeng1998 ff0db82dc3 chore: empty query text (#566) 2022-11-25 20:09:42 +08:00
Stephen Zhou 2daf085ce4 chore: fix vscode settings name (#565) 2022-11-25 01:51:43 +00:00
Tiefseemonster 495f1f2041 chore: fix name field in paragraph parser obj (#564) 2022-11-25 01:47:17 +00:00
boojack 89179f78c2 chore: add SECURITY.md (#562) 2022-11-25 09:05:52 +08:00
boojack 7ad7461a92 chore: add test docker image (#559) 2022-11-24 20:54:22 +08:00
boojack 8cfcd201b0 feat: support display video (#558) 2022-11-24 20:22:54 +08:00
boojack abcd3cfafb feat: add Strikethrough syntax (#557)
feat: add `Strikethrough` rule
2022-11-24 20:05:51 +08:00
boojack 50d41c456b chore: change memo created time (#556) 2022-11-24 19:55:52 +08:00
Zeng1998 1d41d53723 fix: icon style (#555) 2022-11-24 18:44:47 +08:00
boojack 0dc003854f chore: fix typo (#551) 2022-11-24 10:03:00 +08:00
Zeng1998 a4b7a77016 fix: cursor style (#549) 2022-11-24 09:30:17 +08:00
boojack 939e836d1b chore: update readme (#548) 2022-11-24 08:45:36 +08:00
boojack a0b35f7aa9 feat: add French i18n item (#547)
feat: add French i18n
2022-11-24 08:42:38 +08:00
baptiste313 574e160a11 chore: addition of the French translation and small correction for the English (#546) 2022-11-24 08:03:16 +08:00
boojack 2042737004 feat: add username field (#544)
* feat: add username field

* chore: update
2022-11-23 22:27:21 +08:00
boojack a0667abec8 chore: update data initial requests (#538) 2022-11-22 23:45:11 +08:00
boojack 362306a9cb chore: update i18n for visibility (#537) 2022-11-22 22:59:54 +08:00
Zeng1998 5e069f79a2 feat: esc to cancel editing (#532) 2022-11-22 19:54:25 +08:00
Zeng1998 7c78fb064f fix: empty filter value (#529) 2022-11-22 11:31:37 +00:00
Zeng1998 11a7e897dc fix: update issue template (#530) 2022-11-22 19:30:04 +08:00
Yarden Shoham d8adc0afe9 feat: extend validation config max length (#523) 2022-11-22 18:21:12 +08:00
boojack 17c1b97d23 fix: tag regexp (#518)
* fix: tag regexp

* chore: update
2022-11-21 23:49:52 +08:00
boojack 5aee2f46ab chore: update issue template (#517) 2022-11-21 23:38:21 +08:00
boojack 013ded1e04 chore: code clean (#516) 2022-11-21 23:23:05 +08:00
Zeng1998 0d0f893b93 chore: update i18 for memo sharing (#513) 2022-11-21 19:59:19 +08:00
Zeng1998 d2a87a4ddb chore: bgcolor of memo share image (#508) 2022-11-21 18:38:32 +08:00
boojack b05a176490 chore: add license to README (#506) 2022-11-21 07:20:36 +08:00
boojack d149926a39 chore: update seed data (#507) 2022-11-21 07:17:28 +08:00
boojack 2d49e96a8a feat: get image blob in backend (#495)
* feat: get image blob in backend

* chore: update
2022-11-19 18:43:56 +08:00
boojack 9036bd478b fix: image scrollbar (#494) 2022-11-19 17:36:25 +08:00
boojack 477130aa85 chore: update db filesize access control (#493) 2022-11-19 17:07:40 +08:00
boojack 878e0eabc8 feat: add crawler plugin (#492)
* feat: add crawler plugin

* chore: update

* chore: go mod tidy

* chore: update
2022-11-19 16:58:55 +08:00
boojack 62f63d4af7 chore: update dependencies version (#491) 2022-11-19 14:51:28 +08:00
Zeng1998 1acf2f8b13 chore: update i18 for settings (#490) 2022-11-19 10:33:52 +08:00
boojack a4a5e539ed chore: update dev version (#489) 2022-11-19 09:57:54 +08:00
boojack a2831b37c4 feat: add database filesize in UI (#488) 2022-11-18 21:17:52 +08:00
boojack 706b1b428f chore: add toast to system settings (#486) 2022-11-17 21:37:57 +08:00
boojack 1690566413 chore: update emoji picker (#483) 2022-11-17 21:11:58 +08:00
boojack a24b885236 chore: update share memo image (#482) 2022-11-17 21:01:26 +08:00
Stephen Zhou c89a6665b6 feat: fold memos according to horizontal rule (#478)
* feat: fold memos according to horizontal rule

* fix: button and content

* chore: update
2022-11-15 14:49:08 +00:00
Stephen Zhou 797accbc2c feat: parser for horizontal rule (#477)
* feat: parser for horizontal rule

* chore: revert
2022-11-15 21:56:44 +08:00
boojack 66f9bc48bb chore: remove mark memo (#476) 2022-11-15 21:22:08 +08:00
boojack de2eff474c chore: remove memo card dialog (#475) 2022-11-15 21:16:53 +08:00
Mahoo Huang 67195859dc fix: abnormal link regex (#474) 2022-11-15 21:15:10 +08:00
boojack 61abc6dd11 feat: update sharing memo image (#473) 2022-11-15 21:02:55 +08:00
boojack 9fe9245727 chore: update cancel edit button style (#472) 2022-11-15 20:35:56 +08:00
Zeng1998 906ec7994e fix: clear query text (#469)
* fix: clear query text

* update

* update

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-11-15 19:52:16 +08:00
Zeng1998 5258b0a5b4 chore: change memo card's bg color (#471) 2022-11-15 18:55:11 +08:00
boojack ceac53b6d0 feat: additional script system setting (#467) 2022-11-14 22:21:19 +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
Zeng1998 da80d4ef62 fix: duration query string (#465) 2022-11-14 18:57:43 +08:00
Stephen Zhou 205ad0fd6d chore: change rss item title (#464) 2022-11-14 13:28:50 +08:00
Zeng1998 d208731f5f feat: visibility click filter (#463)
* feat: visibility click filter

* update

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-11-13 21:23:40 +08:00
Stephen Zhou a90acdabb3 fix: route confusion entering from non-home page (#460)
Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-11-13 19:40:16 +08:00
Zeng1998 407d1cdcaa feat: add visibility filter (#461)
* feat: add visibility filter

* update
2022-11-13 19:34:22 +08:00
boojack cb50bbc3cb refactor: remove mixin colors (#458) 2022-11-13 14:25:02 +08:00
boojack 2743268fd7 chore: remove unused visibility selector (#457) 2022-11-13 10:47:21 +08:00
Zeng1998 8cc0977a01 fix: image url extraction (#453)
fix: image-url-extraction

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-11-12 21:25:50 +08:00
boojack 0809ec8c72 chore: update editor style (#456) 2022-11-12 21:22:51 +08:00
boojack db93710f85 chore: remove mobile editor style user setting (#455) 2022-11-12 21:01:34 +08:00
boojack 241c93c6b7 feat: update editor style (#454)
* feat: update editor style

* chore: update bg
2022-11-12 20:57:08 +08:00
boojack bf07ab9e2f fix: remove duplicate tag (#450)
fix: remove dumplicate tag
2022-11-12 11:31:16 +08:00
boojack fe05e6a464 chore: update version 0.7.2 (#447) 2022-11-12 09:19:44 +08:00
boojack d1aa6aa7f8 fix: editor resource list (#445) 2022-11-12 09:04:26 +08:00
boojack 79af7e8abf fix: parse tag list (#446) 2022-11-12 09:02:44 +08:00
boojack a142d975d7 feat: additional style system setting (#444)
* feat: additional style system setting

* feat: remove editor font setting
2022-11-11 23:42:44 +08:00
boojack 67691d1e99 feat: update visibility selector style (#441) 2022-11-11 19:25:21 +08:00
Zeng1998 9b827b4801 feat: add support for time-shortcut (#434)
* feat: add support for time-shortcut

* update

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-11-11 19:14:38 +08:00
Zeng1998 421f4dbf60 feat: select visibility in editor (#421)
* feat: editing visibility selection

* update

* update

* update variable name

* update

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-11-10 13:43:49 +00:00
boojack 8f119c4265 chore: update session key (#440) 2022-11-10 20:51:37 +08:00
boojack 9866702850 fix: parser regexp for special character (#439) 2022-11-10 20:38:14 +08:00
Yunliang Zhou a313a9bb31 fix: route confusion entering from non-home page (#430) 2022-11-10 19:50:12 +08:00
boojack e53f5fdd29 chore: update seed data (#437) 2022-11-10 08:41:11 +08:00
Zeng1998 b6c0a04394 fix: share memo with resource list (#431)
* fix: share memo with resource list

* update

* Update web/src/components/ShareMemoImageDialog.tsx

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-11-09 14:58:16 +00:00
Zeng1998 1e3b8315a0 chore: update MemoResources props (#432) 2022-11-09 22:10:31 +08:00
boojack dc5d705f8c feat: vacuum records manually (#420) 2022-11-06 04:21:58 +00:00
Zeng1998 4f10c12092 chore: update translation (#417) 2022-11-05 21:55:48 +08:00
Zeng1998 3aa44f9f6d fix: delete related resources (#415)
* chore: add icon

* fix: delete all related resources when a memo is deleted

* update

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-11-05 20:21:13 +08:00
Zeng1998 78b4733fb9 chore: add icon for deleting resource (#414) 2022-11-05 17:41:14 +08:00
winwin2011 37bb3bc546 chore: allow skip version (#411)
* chore: allow skip version

* chore: opacity

* chore: polish

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-11-04 15:40:48 +00:00
winwin2011 b43bfce254 fix: tag compressed (#412) 2022-11-04 23:39:20 +08:00
boojack 0d6281ef6b chore: update signin page (#410)
* chore: update signin page

* chore: update version `v0.7.1`
2022-11-04 12:28:16 +00:00
boojack 8e2844e0c5 fix: tag regexp (#409)
* chore: enable `no-unused-vars`

* fix: tag regexp
2022-11-04 00:28:29 +00:00
boojack c27e38b11c chore: enable no-unused-vars (#408) 2022-11-03 23:43:56 +00:00
boojack cf75054106 feat: add system setting to allow user signup (#407) 2022-11-03 21:47:36 +08:00
Zhou Yunliang 4ed987229b feat: text filter regex support (#406) 2022-11-03 21:06:17 +08:00
Mahoo Huang a1068b6fe3 fix: abnormal blockquote regexp (#404)
```markdown
面向具体实现编程 ==> 面向抽象接口编程
```.
面向具体实现编程 ==
> 面向抽象接口编程
2022-11-02 20:33:25 +08:00
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>
2022-11-02 12:00:28 +00:00
Zhou Yunliang bebcabc292 chore: update gitignore (#402) 2022-11-02 18:57:45 +08:00
winwin2011 5bdf15aece chore: fold/expand i18n (#400) 2022-11-01 22:44:23 +00:00
winwin2011 d347b7a91e chore: pin button color (#399) 2022-11-02 06:42:20 +08:00
boojack 2c653f170c chore: update corner width (#398) 2022-11-01 15:13:54 +00:00
boojack 75218ef826 chore: update readme (#397) 2022-11-01 15:09:17 +00:00
boojack b7fbbed895 chore: update pagination for getting all memos (#396) 2022-11-01 14:57:33 +00:00
boojack f8c0d73d2d chore: update resource dialog style (#395) 2022-11-01 14:24:54 +00:00
boojack 006cb56d28 fix: heatmap data (#394) 2022-11-01 14:06:02 +00:00
boojack 55dee0df7e fix: session max age (#392) 2022-11-01 13:03:33 +00:00
boojack 2a275b2875 fix: memo list default value (#390) 2022-11-01 09:12:00 +08:00
Zeng1998 4246232fbe feat: image preview enhancement (#385)
* feat: dialog content enhancement

* update

* feat: image carousel

* update

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-11-01 09:07:14 +08:00
boojack 9d8c9609c3 feat: cache editing memo id (#388)
* feat: cache editing memo id

* chore: update
2022-10-31 21:39:22 +08:00
boojack ef5492074e chore: update memo stats api (#387) 2022-10-31 20:57:07 +08:00
boojack 40d5686031 chore: update unpin memo (#386) 2022-10-31 11:27:56 +00:00
Zeng1998 4276a7a56d feat: remove unused resources (#379)
* feat: dialog content enhancement

* feat: remove unused resources

* update

* update

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-10-31 11:23:44 +00:00
Zeng1998 d6fa1c7c80 feat: dialog content enhancement (#377) 2022-10-31 11:00:18 +00:00
boojack 6cbc3c78e2 chore: update readme (#375) 2022-10-30 14:42:56 +08:00
boojack 29966451b6 feat: unpin button in the corner (#374)
* feat: unpin button in corner

* chore: update
2022-10-30 05:21:24 +00:00
boojack 64f0662a61 fix: get memo list order (#370) 2022-10-29 12:54:54 +00:00
boojack 0ccfd0c743 fix: resource table migration (#369)
* fix: resource table migration

* chore: update
2022-10-29 11:47:31 +00:00
boojack 0ea1733acc fix: missing column in resource table (#368) 2022-10-29 10:49:58 +00:00
boojack 8fb59bbfb9 chore: release v0.7.0 (#367)
chore: update release version
2022-10-29 10:18:24 +00:00
boojack 7c401040c8 feat: add blockquote regexp (#366) 2022-10-29 10:14:53 +00:00
boojack 43541bde2c feat: add update version banner (#365)
feat: add update version banenr
2022-10-29 09:49:50 +00:00
boojack 1e01c4dc46 chore: update resource service (#364) 2022-10-29 09:24:56 +00:00
Zeng1998 e85d368f87 feat: patch resource filename (#360)
* feat: resource filename rename

* update: resource filename rename

* update: resource filename rename

* update: validation about the filename

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-10-29 07:40:09 +00:00
boojack 95376f78f6 feat: add metric plugin (#361) 2022-10-29 03:15:39 +00:00
Zeng1998 30daea0c4f fix: typo (#357)
* feat: resource dialog enhancements

* update

* fix: typo

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-10-29 01:13:11 +00:00
Zeng1998 b891e08928 feat: resource dialog enhancements (#356)
* feat: resource dialog enhancements

* update
2022-10-29 09:11:16 +08:00
boojack 94df09c8c0 chore: update memo list api (#350) 2022-10-27 14:02:42 +00:00
boojack bdf6d4d42a feat: case-insensitive search (#347) 2022-10-27 00:05:45 +00:00
boojack cb2e1ae355 fix: fetch memo with filter (#346) 2022-10-26 23:53:40 +00:00
boojack 9705406b82 feat: remove foreign key and triggers (#345) 2022-10-26 15:00:09 +00:00
Zhou Yunliang 4e00b1b0cd feat: rss support (#343)
* feat: rss support

* chore: go mod tidy

* chore: change route group prefix

* Update server/server.go

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

* Update server/rss.go

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

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-10-26 20:13:02 +08:00
boojack fe5ba6850b chore: update insert content in editor (#336) 2022-10-23 12:28:30 +00:00
Mahoo Huang 5690dab6bb feat: add some hotkeys (#320)
* feat: add some hotkeys

* fix: hotkeys lose the text behind selected

* chore: adjust insertText params passing
2022-10-23 11:33:45 +00:00
Zeng1998 65506a5b30 chore: update the translation (#333) 2022-10-22 09:36:38 +00:00
boojack f09bb2689c chore: release v0.6.1 (#332) 2022-10-21 15:21:37 +00:00
boojack e6f376ae66 fix: user setting name (#331) 2022-10-21 15:06:15 +00:00
boojack 1c2998c4d8 feat: pagination for memo list (#330) 2022-10-21 14:51:41 +00:00
Zeng1998 fc5d5cf231 fix: patch memo with resource list (#328)
fix: 修改memo时添加图片不显示
2022-10-21 22:16:05 +08:00
boojack 2a4fc7dcc3 chore: update memo display time (#327)
* chore: update memo display time

* chore: update
2022-10-21 20:26:00 +08:00
boojack b68d6e2693 feat: update memo sort option setting (#326)
feat: add memo display ts
2022-10-21 11:57:57 +00:00
boojack 0b34b142c8 chore: update marked (#325) 2022-10-21 09:13:19 +08:00
boojack 0b2a9d8511 fix: bold and emphasis regex (#323)
* fix: bold and emphasis regex

* chore: udpate
2022-10-20 21:57:40 +08:00
winwin2011 7c9c5c316b chore: update i18n in settings (#324)
chore: i18n
2022-10-20 21:40:03 +08:00
winwin2011 180ae206c7 feat: inline code within link (#321)
* feat: inline code with link

* fix: decoration style
2022-10-20 21:21:30 +08:00
boojack 69e3ba6bed chore: update demo seeding data (#318)
chore: update seeding data
2022-10-20 17:19:37 +08:00
Zeng1998 bf5b7e747d feat: customize memo list sorting rules (#312)
* chore: update .gitignore

* feat: 添加Memo列表按更新时间排序

* fix go-static-checks

* update

* update

* update Memo.tsx/MemoList.tsx

* handle conflict

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-10-19 21:00:34 +08:00
f97 24154c95f2 feat: editor tab support (#309)
* feat: editor tab support

* Update web/src/components/MemoEditor.tsx

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

* chore: if return style

Co-authored-by: boojack <stevenlgtm@gmail.com>
Co-authored-by: hyoban <hi@hyoban.cc>
2022-10-19 18:19:50 +08:00
boojack 0b10d24eb2 chore: update bug report template (#316)
chore: update but report template
2022-10-19 08:22:56 +08:00
boojack 06ec59eca4 chore: add issue template (#314) 2022-10-18 23:13:41 +08:00
boojack 35a8817442 fix: memo list auto scroll to top (#313)
fix: editor initial content
2022-10-18 22:56:43 +08:00
boojack c7378e78d9 chore: update mask animation styles (#306) 2022-10-17 18:43:02 +08:00
Tiger ab182dc22a chore: update zh.json (#304)
Update zh.json
2022-10-16 13:49:58 +08:00
boojack f554e5a357 fix: close button z-index in setting dialog (#303) 2022-10-16 12:37:17 +08:00
Steven 749486ba3c chore: update marked tests 2022-10-15 21:57:56 +08:00
Hyoban 26aae0e637 fix: blank line after table (#298) 2022-10-15 17:51:17 +08:00
Hyoban 95c8d8fc9c docs: update docker-compose tip (#299) 2022-10-15 15:32:42 +08:00
Hyoban 1021023577 docs: docker compose tip (#296)
* docs: docker compose tip

* chore: update

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

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-10-15 13:27:06 +08:00
Hyoban 3d0c6004c0 feat: support markdown table (#294)
* feat: support markdown table

* chore: update table style

* test: for markdown table parse
2022-10-15 11:42:04 +08:00
Steven 6c53bd00f6 chore: restore user email 2022-10-15 11:27:12 +08:00
Steven cc759bef56 fix: handle highlight unknown language error 2022-10-15 06:11:17 +08:00
Steven d670adc11f chore: release v0.6.0 2022-10-14 23:25:07 +08:00
Steven 349c383604 chore: reorder memo resource 2022-10-14 23:14:08 +08:00
Steven f407488128 chore: update dev version 2022-10-14 23:03:54 +08:00
boojack 086b10717f feat: upload files by dropping (#292) 2022-10-14 22:59:30 +08:00
boojack eefd0444c8 feat: add highlight for code block (#291)
* feat: add highlight for code block

* chore: update test
2022-10-14 22:29:28 +08:00
Hyoban 65a61ed270 fix: can not click sidebar (#289) 2022-10-14 21:43:43 +08:00
Hyoban 5e7db4631e feat: handle esc keyboard event for editor (#288) 2022-10-14 10:14:35 +08:00
boojack 0d6114e25e feat: update sidebar mask styles (#287) 2022-10-14 07:26:43 +08:00
h2o2o ce5a6fa3ac chore: update sidebar styles in mobile view (#285)
* 添加移动端点击自动关闭侧边栏

* 添加移动端点击自动关闭侧边栏

* 添加移动端点击自动关闭侧边栏

* move closeSidebar function to utils

* move closeSidebar function to utils

* 侧边栏优化

* 移动端侧边栏优化

* 移动端侧边栏优化

* 移动端侧边栏优化
2022-10-13 22:56:42 +08:00
boojack 246851fdbe fix: create memo with visibility (#281) 2022-10-13 09:01:09 +08:00
boojack 21c30ac157 chore: hide user email (#282) 2022-10-13 09:01:02 +08:00
Steven 269d92e637 fix: create triggers after dropping old tables 2022-10-13 08:23:05 +08:00
Steven ffe145d436 chore: revert sidebar updates 2022-10-13 08:05:59 +08:00
zburu 37cd841992 chore: adjust sidebar style (#277) 2022-10-13 07:54:34 +08:00
h2o2o 315ab94c94 添加移动端点击自动关闭侧边栏 (#271) 2022-10-11 08:12:35 +08:00
f97 1aa9963e07 fix: i18n for filter (#275) 2022-10-10 17:46:52 +08:00
Steven 88ade2c0b7 chore: update i18n for filter 2022-10-09 08:54:05 +08:00
winwin2011 4ada7dce77 chore: update i18n for shortcut filter (#270)
* chore: resources i18n

* chore: shortcut-list i18n

* chore: resources i18n

* chore: resources i18n

* chore: resources i18n
2022-10-08 22:27:23 +08:00
steven a323689ee6 chore: update copy button style 2022-10-05 20:55:04 +08:00
f97 2ea612e2fe feat: add copy button to memo (#267)
* feat: copy-content

* Update web/src/less/memo-detail.less

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-10-05 16:39:04 +08:00
boojack ca2557eb7e fix: tag filter (#266) 2022-10-04 21:02:07 +08:00
steven e0f95686f3 chore: update header style 2022-10-04 20:42:33 +08:00
f97 29770e8bfb chore: update vietnamese i18n (#261) 2022-10-04 14:37:44 +08:00
steven b959acc69d fix: update marked test cases 2022-10-04 14:35:07 +08:00
steven 486cf8bdac feat: add escape to renderer 2022-10-04 13:53:36 +08:00
steven ea911387f1 chore: update migration sql file 2022-10-04 12:04:26 +08:00
steven 0b9b89db81 chore: update VACUUM 2022-10-04 10:48:45 +08:00
boojack eaf89aa2f2 feat: update marked parsers (#260)
* chore: remove external match functions

* chore: update parsers
2022-10-04 10:44:16 +08:00
boojack 4bd373ba57 fix: tag selector position (#259) 2022-10-04 08:48:43 +08:00
steven 7b29c65f58 feat: add inline-code syntax parser 2022-10-03 19:51:54 +08:00
steven 2298ac6ff3 chore: add FUNDING.yml 2022-10-03 19:43:56 +08:00
steven 4477f47c25 chore: release version 0.5.0 2022-10-03 18:49:11 +08:00
steven 4a2fe3aaae chore: update user banner style 2022-10-03 18:48:44 +08:00
steven 0f65b8bdd3 fix: re-generate table columns foreign keys 2022-10-03 18:47:31 +08:00
steven 778282ae29 chore: update resource dialog 2022-10-03 09:39:59 +08:00
steven 85dc29bfb9 feat: add linkedMemoAmount to resource 2022-10-03 09:39:49 +08:00
steven 05e46ee4a8 fix: emoji picker style 2022-10-03 09:11:07 +08:00
steven 6a3b052fa2 chore: don't clean data in dev mode 2022-10-03 08:49:20 +08:00
boojack 222c792539 fix: tag regexp (#253) 2022-10-02 23:12:06 +08:00
boojack 51fb8ddb07 feat: simple markdown parser (#252)
* feat: simple markdown parser

* chore: rename test file name

* feat: add plain text link parser

* chore: update style
2022-10-02 22:49:30 +08:00
steven 8e63b8f289 chore: update interval flag type 2022-10-01 23:01:32 +08:00
steven 17c35be426 chore: add --passWithNoTests to jest 2022-10-01 22:59:00 +08:00
steven dfd461518f chore: add jest github action 2022-10-01 22:57:32 +08:00
steven df5818cdc5 chore: add jest 2022-10-01 22:56:20 +08:00
steven 5894104524 chore: update inline image 2022-10-01 20:00:45 +08:00
steven 09732df0f5 chore: regenerate yarn.lock 2022-10-01 19:59:15 +08:00
steven ae8f292306 feat: create memo with resourceIdList 2022-10-01 10:57:14 +08:00
steven 9f8c0ce567 fix: raw data cache 2022-10-01 10:37:02 +08:00
steven c7cf35c7de feat: update memo resource component 2022-10-01 10:02:16 +08:00
steven e5c9d8604d feat: compose memo resource list 2022-10-01 09:49:59 +08:00
steven b2c22977c1 feat: update memo editor with uploading resources 2022-10-01 00:10:31 +08:00
steven c0edb72b3d chore: update react version 2022-10-01 00:07:06 +08:00
steven 33d31b7dca fix: delete memo resource 2022-10-01 00:06:56 +08:00
steven 4c465bef2d feat: add memo resource apis 2022-09-30 22:58:59 +08:00
steven 3bde9543f3 chore: update dev version v0.5.0 2022-09-30 22:58:12 +08:00
steven cff0e86989 feat: add memo_resource model 2022-09-30 20:20:00 +08:00
boojack 65f7aa7914 fix: emoji picker position in fullscreen (#251) 2022-09-30 18:40:46 +08:00
boojack 06f5a5788e fix: mobile editor float style (#247) 2022-09-27 22:58:03 +08:00
boojack 52c8ac2ad3 chore: update emoji picker toggle logic (#244) 2022-09-26 22:33:41 +08:00
Steven 0c80654cc2 chore: update dropdown action button style 2022-09-26 22:06:06 +08:00
Steven a2180f177f chore: remove vite-plugin-pwa 2022-09-26 21:40:37 +08:00
Steven b992d07f3e chore: update memo detail header 2022-09-24 10:05:51 +08:00
Steven dc3052e225 chore: release v0.4.5 2022-09-24 09:41:14 +08:00
Steven 9b2e57cee5 fix: api access checks 2022-09-24 09:34:01 +08:00
Steven 77a3513a6b chore: update memo detail page 2022-09-24 09:31:20 +08:00
Steven 0dd2337663 chore: update router 2022-09-21 21:30:33 +08:00
Steven d316c04837 feat: update dev latest schema 2022-09-21 19:34:54 +08:00
Steven 63468dbaf3 chore: update memo detail access handler 2022-09-21 19:31:02 +08:00
f97 2acd5d4af2 chore: support html form (#236) 2022-09-21 14:12:16 +08:00
Steven 6c1cc1d283 chore: use conditional rendering instead of OnlyWhen 2022-09-20 23:30:25 +08:00
Steven 15cfc9e1f5 chore: add memo detail page 2022-09-20 22:55:24 +08:00
Steven 004713d4cd chore: update dropdown component 2022-09-20 21:11:33 +08:00
f97 7a6eb53e0f feat: float mobile editor (#234)
* feat: float mobile editor

* fix: fix pr comment

* lint: fix golangci-lint
2022-09-20 20:42:14 +08:00
boojack 02c26d5bb4 chore: update i18n for memo visibility (#233) 2022-09-20 08:34:49 +08:00
Steven c60c58ed69 chore: fix memo content click handler 2022-09-19 23:01:14 +08:00
Steven 366afdd1e4 feat: use i18next 2022-09-19 22:27:50 +08:00
Steven 307483e499 feat: use react-router 2022-09-19 21:53:27 +08:00
Steven 4608894e56 fix: add _foreign_keys to sqlite dsn 2022-09-18 22:48:26 +08:00
boojack a1066322c8 chore: add vite-plugin-pwa (#230) 2022-09-18 11:58:03 +08:00
f97 050a2d39fa chore: fix i18n vietnamese typos and update MemoCardDialog (#228) 2022-09-18 09:17:46 +08:00
Steven 13aa61bbc0 chore: update i18n for change password dialog 2022-09-17 13:33:40 +08:00
boojack f4d0e8c948 chore: hide the searchbar of emoji picker (#222)
chore: hide emoji picker searchbar
2022-09-17 09:23:53 +08:00
f97 e7db587a9e feat: add emoji picker in editor (#221)
* feat: add vietnamese

* feat: add emoji picker in editor

* fix failing checks

* move emoji button before upload button

* move script to body index.html

* Update web/index.html

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-09-17 00:42:52 +08:00
Steven 059080f194 chore: fix docker tag 2022-09-16 23:34:57 +08:00
Steven 78c159cd59 chore: fix build tag 2022-09-16 23:15:16 +08:00
Steven 721aa3c907 chore: update v0.4.4 2022-09-16 23:04:40 +08:00
Steven 77178afad5 chore: add no data tip 2022-09-16 22:55:39 +08:00
Steven fd7b8c3293 chore: add copy non-private memo link 2022-09-16 22:49:11 +08:00
Steven 660908e436 chore: add react-router 2022-09-16 22:48:41 +08:00
Steven 8d694f7732 chore: remove language beta badge 2022-09-16 21:47:00 +08:00
f97 bdfa9f7a56 chore: update i18n for UserBanner (#219)
* feat: add vietnamese

* chore: update i18n

* Update web/src/locales/zh.json

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

Co-authored-by: boojack <stevenlgtm@gmail.com>
2022-09-16 21:48:18 +08:00
Steven 19ef97a7ec chore: update dev version 2022-09-16 21:45:56 +08:00
Steven 2c17ea703d chore: fix manifest.json image 2022-09-16 21:33:31 +08:00
Steven 1591fdf61c chore: update i18n structures 2022-09-16 21:25:39 +08:00
f97 811f3340e9 feat: add vietnamese (#218) 2022-09-16 21:09:59 +08:00
ChasLui 7e8d1128f8 chore: update i18n (#215) 2022-09-15 06:53:51 +08:00
Steven 54db6eda04 chore: update common locales 2022-09-14 19:35:45 +08:00
boojack c5b26e3310 chore: fix copy to clipboard (#214) 2022-09-14 19:24:13 +08:00
ChasLui 7079faf2b9 chore: update i18n (#212)
* feat: 增加部分 i18n

* feat: 增加部分 i18n

* feat: 增加部分 i18n
2022-09-14 19:14:45 +08:00
Steven 707d1a96eb chore: move version pkg to server/version 2022-09-12 17:25:34 +08:00
boojack 76801dfa4f chore: vacuum db file after deleting resource (#210) 2022-09-10 23:43:19 +08:00
Steven 6e4577f721 feat: add MemoContent component 2022-09-10 21:22:26 +08:00
winwin2011 7b0987610c feat: i18n for dialogs (#203)
* feat: i18n in dialog

* fix: use common translation
2022-09-10 09:30:10 +08:00
boojack 50fa560d4a chore: update username validate config (#209) 2022-09-09 22:30:24 +08:00
1234 changed files with 189023 additions and 17467 deletions
+12 -1
View File
@@ -1,2 +1,13 @@
web/node_modules
web/yarn.lock
web/dist
.git
.github
build/
tmp/
memos
*.md
.gitignore
.golangci.yaml
.dockerignore
docs/
.DS_Store
+1
View File
@@ -0,0 +1 @@
github: usememos
+162
View File
@@ -0,0 +1,162 @@
name: Bug Report
description: Report reproducible behavior that is broken in the current version
type: Bug
body:
- type: markdown
attributes:
value: |
Thanks for reporting a bug. Please help maintainers reproduce it on current code.
Before submitting:
- Search [existing issues](https://github.com/usememos/memos/issues) to avoid duplicates.
- Upgrade and retest with the [latest release](https://github.com/usememos/memos/releases/latest), current `main`, or the [demo site](https://demo.usememos.com/).
- Use [Discussions](https://github.com/usememos/memos/discussions) for questions, setup help, or configuration troubleshooting.
Maintainers normally fix bugs in current code and future releases, not older released versions.
- type: checkboxes
id: pre-check
attributes:
label: Pre-submission Checklist
options:
- label: I have searched existing issues and confirmed this has not already been reported
required: true
- label: I have reproduced this bug on the latest Memos release, current `main`, or the demo site, or this report is specifically about upgrading to the latest release
required: true
- label: This is a bug report, not a question or configuration request
required: true
- type: dropdown
id: area
attributes:
label: Affected Area
description: Choose the main area where the bug appears.
multiple: true
options:
- Web UI
- API
- Authentication / SSO
- Database / migration
- Resources / attachments
- Search / filters
- Markdown / editor
- Deployment / startup
- Other
validations:
required: true
- type: dropdown
id: reproduced-on
attributes:
label: Reproduced On
description: Where did you confirm the issue still happens?
options:
- Latest release
- Current main branch
- Demo site
- Upgrade to latest release
- I cannot test the latest version
validations:
required: true
- type: input
id: version
attributes:
label: Memos Version Tested
description: Report the exact version where you reproduced the bug. Use the version shown in **Settings > System**, the container image tag, the release binary version, or `memos --version`. Please do not write `latest` only.
placeholder: "v0.29.x, ghcr.io/usememos/memos:v0.29.x, main@abcdef, or demo site"
validations:
required: true
- type: input
id: previous-version
attributes:
label: Previous Version
description: If this happened after an upgrade, enter the version you upgraded from. Leave blank if not applicable.
placeholder: "v0.28.x, unknown, or not applicable"
- type: textarea
id: environment
attributes:
label: Environment Details
description: Include the deployment, database, client, and network details that apply.
placeholder: |
- Deployment: Docker / binary / source / demo site
- Database: SQLite / PostgreSQL / MySQL
- Browser: Firefox 126 on macOS 15
- Server OS: Ubuntu 24.04
- Reverse proxy: nginx / Caddy / Traefik / none
- Related settings: SSO / SMTP / storage / webhooks / none
validations:
required: true
- type: dropdown
id: frequency
attributes:
label: Reproduction Frequency
description: How reliably can you reproduce this?
options:
- Always
- Often
- Sometimes
- Once
- Unknown
validations:
required: true
- type: textarea
id: reproduction-steps
attributes:
label: Steps to Reproduce
description: Provide minimal, numbered steps that start from a clean page/session when possible.
placeholder: |
1. Open ...
2. Click ...
3. Enter ...
4. Wait for ...
5. See ...
validations:
required: true
- type: textarea
id: current-behavior
attributes:
label: Current Behavior
description: What happened? Include exact error messages, status codes, or visible UI state if available.
placeholder: The application ...
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected Behavior
description: What did you expect to happen instead?
placeholder: I expected...
validations:
required: true
- type: textarea
id: regression
attributes:
label: Regression Information
description: If this worked before, describe when it last worked and what changed before it broke.
placeholder: |
This last worked in ...
It started after ...
- type: textarea
id: logs
attributes:
label: Logs
description: Paste relevant server logs, browser console output, or network errors. Remove secrets before submitting.
render: shell
placeholder: |
Paste logs here.
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Attach screenshots, screen recordings, sample data, exports, or links to related issues.
placeholder: Drag and drop files here or add any extra context.
+8
View File
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Questions & Support
url: https://github.com/usememos/memos/discussions
about: Ask questions or get help in GitHub Discussions — please don't open issues for questions
- name: Documentation
url: https://www.usememos.com/docs
about: Check the documentation before opening an issue
+109
View File
@@ -0,0 +1,109 @@
name: Feature Request
description: Propose a product improvement with a clear use case
type: Feature
body:
- type: markdown
attributes:
value: |
Thanks for suggesting an improvement. Please describe the problem and workflow first so maintainers can evaluate the request.
Before submitting:
- Search [existing feature requests](https://github.com/usememos/memos/issues?q=label%3Aenhancement) to avoid duplicates.
- Use [Discussions](https://github.com/usememos/memos/discussions) for broad ideas, setup help, or questions.
- Keep one feature request focused on one user problem.
- type: checkboxes
id: pre-check
attributes:
label: Pre-submission Checklist
options:
- label: I have searched existing issues and confirmed this has not already been requested
required: true
- label: This is a feature request, not a bug report or support question
required: true
- type: dropdown
id: area
attributes:
label: Area
description: Choose the main area this request affects.
multiple: true
options:
- Web UI
- Mobile / responsive experience
- API
- Authentication / SSO
- Administration
- Memo editor
- Search / filters
- Tags / organization
- Resources / attachments
- Import / export
- Deployment / operations
- Other
validations:
required: true
- type: textarea
id: problem
attributes:
label: Problem or Use Case
description: What problem does this solve? Describe the user need, not just the proposed UI or API.
placeholder: |
I often need to ...
Today, this is difficult because ...
validations:
required: true
- type: textarea
id: users
attributes:
label: Who Would Use This?
description: Describe the user, role, team, or workflow that would benefit.
placeholder: |
This helps ...
They currently ...
validations:
required: true
- type: textarea
id: solution
attributes:
label: Proposed Solution
description: Describe the behavior you would like Memos to support. Include UI, API, or configuration details if relevant.
placeholder: |
Memos should ...
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives Considered
description: Existing workarounds, related tools, or simpler alternatives you considered.
placeholder: |
I tried ...
It does not work well because ...
- type: textarea
id: compatibility
attributes:
label: Compatibility and Migration
description: Note any expected impact on existing users, APIs, storage, permissions, or deployments.
placeholder: |
This should not affect existing memos because ...
Existing API clients may need ...
- type: textarea
id: examples
attributes:
label: Examples
description: Link to screenshots, mockups, API sketches, related apps, or existing issues that show the desired behavior.
placeholder: Drag and drop files here or add links/examples.
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Add any extra context that does not fit above.
placeholder: Any other details.
+91
View File
@@ -0,0 +1,91 @@
name: Backend Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
paths:
- "go.mod"
- "go.sum"
- "**.go"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
GO_VERSION: "1.26.2"
jobs:
static-checks:
name: Static Checks
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: ${{ env.GO_VERSION }}
cache: true
cache-dependency-path: go.sum
- name: Verify go.mod is tidy
run: |
go mod tidy -go=${{ env.GO_VERSION }}
git diff --exit-code
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.11.3
args: --timeout=3m
tests:
name: Tests (${{ matrix.test-group }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test-group: [store, server, internal, other]
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: ${{ env.GO_VERSION }}
cache: true
cache-dependency-path: go.sum
- name: Run tests
run: |
case "${{ matrix.test-group }}" in
store)
# Run store tests for all drivers (sqlite, mysql, postgres)
go test -v -coverprofile=coverage.out -covermode=atomic ./store/...
;;
server)
go test -v -race -coverprofile=coverage.out -covermode=atomic ./server/...
;;
internal)
go test -v -race -coverprofile=coverage.out -covermode=atomic ./internal/...
;;
other)
go test -v -race -coverprofile=coverage.out -covermode=atomic \
./cmd/... ./internal/... ./proto/...
;;
esac
env:
DRIVER: ${{ matrix.test-group == 'store' && '' || 'sqlite' }}
- name: Upload coverage
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: codecov/codecov-action@v5
with:
files: ./coverage.out
flags: ${{ matrix.test-group }}
fail_ci_if_error: false
@@ -1,44 +0,0 @@
name: build-and-push-release-image
on:
push:
branches:
# Run on pushing branches like `release/1.0.0`
- "release/v*.*.*"
jobs:
build-and-push-release-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Extract build args
# Extract version from branch name
# Example: branch name `release/v1.0.0` sets up env.VERSION=1.0.0
run: |
echo "VERSION=${GITHUB_REF_NAME#release/v}" >> $GITHUB_ENV
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: neosmemo
password: ${{ secrets.DOCKER_NEOSMEMO_TOKEN }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
with:
install: true
- name: Build and Push
id: docker_build
uses: docker/build-push-action@v3
with:
context: ./
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: neosmemo/memos:latest, neosmemo/memos:${{ env.VERSION }}
+180
View File
@@ -0,0 +1,180 @@
name: Build Canary Image
on:
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.repository }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build-frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4.2.0
with:
version: 11.0.1
- uses: actions/setup-node@v6
with:
node-version: "24"
cache: pnpm
cache-dependency-path: "web/pnpm-lock.yaml"
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v5
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('web/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-store-
- run: pnpm install --frozen-lockfile
working-directory: web
- name: Run frontend build
run: pnpm release
working-directory: web
- name: Upload frontend artifacts
uses: actions/upload-artifact@v6
with:
name: frontend-dist
path: server/router/frontend/dist
retention-days: 1
build-push:
needs: build-frontend
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm64
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Resolve version from latest tag
id: version
run: |
version="$(git describe --tags --abbrev=0 2>/dev/null || echo dev)"
echo "version=${version#v}" >> "$GITHUB_OUTPUT"
- name: Download frontend artifacts
uses: actions/download-artifact@v7
with:
name: frontend-dist
path: server/router/frontend/dist
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Build and push by digest
id: build
uses: docker/build-push-action@v6
with:
context: .
file: ./scripts/Dockerfile
platforms: ${{ matrix.platform }}
build-args: |
VERSION=${{ steps.version.outputs.version }}
COMMIT=${{ github.sha }}
cache-from: type=gha,scope=build-${{ matrix.platform }}
cache-to: type=gha,mode=max,scope=build-${{ matrix.platform }}
outputs: type=image,name=neosmemo/memos,push-by-digest=true,name-canonical=true,push=true
- name: Export digest
run: |
mkdir -p /tmp/digests
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"
- name: Upload digest
uses: actions/upload-artifact@v6
with:
name: digests-${{ strategy.job-index }}
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1
merge:
needs: build-push
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Download digests
uses: actions/download-artifact@v7
with:
pattern: digests-*
merge-multiple: true
path: /tmp/digests
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
neosmemo/memos
ghcr.io/usememos/memos
flavor: |
latest=false
tags: |
type=raw,value=canary
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Create manifest list and push
working-directory: /tmp/digests
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf 'neosmemo/memos@sha256:%s ' *)
env:
DOCKER_METADATA_OUTPUT_JSON: ${{ steps.meta.outputs.json }}
- name: Inspect images
run: |
docker buildx imagetools inspect neosmemo/memos:canary
docker buildx imagetools inspect ghcr.io/usememos/memos:canary
-70
View File
@@ -1,70 +0,0 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [main]
schedule:
- cron: "27 12 * * 0"
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ["go", "javascript"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
+17
View File
@@ -0,0 +1,17 @@
name: Demo Deploy
on:
workflow_dispatch:
jobs:
deploy-demo:
runs-on: ubuntu-latest
steps:
- name: Trigger Render Deploy
run: |
curl -X POST "${{ secrets.RENDER_DEPLOY_HOOK }}" \
-H "Content-Type: application/json" \
-d '{"trigger": "github_action"}'
- name: Deployment Status
run: echo "Demo deployment triggered successfully on Render"
+76
View File
@@ -0,0 +1,76 @@
name: Frontend Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
paths:
- "web/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
NODE_VERSION: "24"
PNPM_VERSION: "11.0.1"
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v4.2.0
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
cache-dependency-path: web/pnpm-lock.yaml
- name: Install dependencies
working-directory: web
run: pnpm install --frozen-lockfile
- name: Run lint
working-directory: web
run: pnpm lint
- name: Run unit tests
working-directory: web
run: pnpm test
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v4.2.0
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
cache-dependency-path: web/pnpm-lock.yaml
- name: Install dependencies
working-directory: web
run: pnpm install --frozen-lockfile
- name: Build frontend
working-directory: web
run: pnpm build
+40
View File
@@ -0,0 +1,40 @@
name: Proto Linter
on:
push:
branches: [main]
pull_request:
branches: [main]
paths:
- "proto/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint Protos
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup buf
uses: bufbuild/buf-setup-action@v1
with:
github_token: ${{ github.token }}
- name: Run buf lint
uses: bufbuild/buf-lint-action@v1
with:
input: proto
- name: Check buf format
run: |
if [[ $(buf format -d) ]]; then
echo "❌ Proto files are not formatted. Run 'buf format -w' to fix."
exit 1
fi
+37
View File
@@ -0,0 +1,37 @@
name: Release Please
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
issues: write
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: Check release token
env:
RELEASE_PLEASE_TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN }}
run: |
if [ -z "$RELEASE_PLEASE_TOKEN" ]; then
echo "RELEASE_PLEASE_TOKEN must be set to a fine-grained PAT so release-please tags can trigger release.yml." >&2
exit 1
fi
- name: Run release-please
uses: googleapis/release-please-action@v4
with:
# Use a fine-grained PAT so generated tags trigger release.yml.
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
+384
View File
@@ -0,0 +1,384 @@
name: Release
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
GO_VERSION: "1.26.2"
NODE_VERSION: "24"
PNPM_VERSION: "11.0.1"
ARTIFACT_RETENTION_DAYS: 60
ARTIFACT_PREFIX: memos
jobs:
prepare:
name: Extract Version
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
tag: ${{ steps.version.outputs.tag }}
major_minor: ${{ steps.version.outputs.major_minor }}
is_prerelease: ${{ steps.version.outputs.is_prerelease }}
steps:
- name: Extract version
id: version
env:
REF_NAME: ${{ github.ref_name }}
EVENT_NAME: ${{ github.event_name }}
run: |
if [ "$EVENT_NAME" = "workflow_dispatch" ]; then
echo "tag=" >> "$GITHUB_OUTPUT"
echo "version=manual-${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"
echo "major_minor=" >> "$GITHUB_OUTPUT"
echo "is_prerelease=false" >> "$GITHUB_OUTPUT"
exit 0
fi
if [[ ! "$REF_NAME" =~ ^v([0-9]+\.[0-9]+\.[0-9]+)(-rc\.[0-9]+)?$ ]]; then
echo "Unsupported release tag format: $REF_NAME" >&2
exit 1
fi
version="${BASH_REMATCH[1]}${BASH_REMATCH[2]}"
major_minor="${BASH_REMATCH[1]%.*}"
is_prerelease=false
if [ -n "${BASH_REMATCH[2]}" ]; then
is_prerelease=true
fi
echo "tag=${REF_NAME}" >> "$GITHUB_OUTPUT"
echo "version=${version}" >> "$GITHUB_OUTPUT"
echo "major_minor=${major_minor}" >> "$GITHUB_OUTPUT"
echo "is_prerelease=${is_prerelease}" >> "$GITHUB_OUTPUT"
build-frontend:
name: Build Frontend
needs: prepare
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v4.2.0
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
cache-dependency-path: web/pnpm-lock.yaml
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: echo "STORE_PATH=$(pnpm store path)" >> "$GITHUB_OUTPUT"
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('web/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-store-
- name: Install dependencies
working-directory: web
run: pnpm install --frozen-lockfile
- name: Build frontend release assets
working-directory: web
run: pnpm release
- name: Upload frontend artifacts
uses: actions/upload-artifact@v4
with:
name: frontend-dist
path: server/router/frontend/dist
retention-days: 1
build-binaries:
name: Build ${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.goarm && format('v{0}', matrix.goarm) || '' }}
needs: [prepare, build-frontend]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- goos: linux
goarch: amd64
- goos: linux
goarch: arm64
- goos: linux
goarch: arm
goarm: "7"
- goos: darwin
goarch: amd64
- goos: darwin
goarch: arm64
- goos: windows
goarch: amd64
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Download frontend artifacts
uses: actions/download-artifact@v4
with:
name: frontend-dist
path: server/router/frontend/dist
- name: Build binary
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
GOARM: ${{ matrix.goarm }}
CGO_ENABLED: "0"
run: |
output_name="memos"
if [ "$GOOS" = "windows" ]; then
output_name="memos.exe"
fi
mkdir -p build
go build \
-trimpath \
-ldflags="-s -w -X github.com/usememos/memos/internal/version.Version=${{ needs.prepare.outputs.version }} -X github.com/usememos/memos/internal/version.Commit=${{ github.sha }} -extldflags '-static'" \
-tags netgo,osusergo \
-o "build/${output_name}" \
./cmd/memos
- name: Package binary
env:
VERSION: ${{ needs.prepare.outputs.version }}
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
GOARM: ${{ matrix.goarm }}
run: |
cd build
package_name="${ARTIFACT_PREFIX}_${VERSION}_${GOOS}_${GOARCH}"
if [ -n "$GOARM" ]; then
package_name="${package_name}v${GOARM}"
fi
if [ "$GOOS" = "windows" ]; then
artifact_name="${package_name}.zip"
zip -q "${artifact_name}" memos.exe
else
artifact_name="${package_name}.tar.gz"
tar czf "${artifact_name}" memos
fi
echo "artifact_name=${artifact_name}" >> "$GITHUB_ENV"
- name: Upload binary artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_name }}
path: build/${{ env.artifact_name }}
retention-days: ${{ env.ARTIFACT_RETENTION_DAYS }}
checksums:
name: Generate Checksums
needs: [prepare, build-binaries]
runs-on: ubuntu-latest
steps:
- name: Download binary artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
pattern: ${{ env.ARTIFACT_PREFIX }}_*
merge-multiple: true
- name: Generate checksums
working-directory: artifacts
run: sha256sum * > checksums.txt
- name: Upload checksum artifact
uses: actions/upload-artifact@v4
with:
name: checksums
path: artifacts/checksums.txt
retention-days: ${{ env.ARTIFACT_RETENTION_DAYS }}
release:
name: Publish GitHub Release
needs: [prepare, build-binaries, checksums]
if: github.event_name != 'workflow_dispatch'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download binary artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
pattern: ${{ env.ARTIFACT_PREFIX }}_*
merge-multiple: true
- name: Download checksum artifact
uses: actions/download-artifact@v4
with:
name: checksums
path: artifacts
- name: Publish release assets
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.prepare.outputs.tag }}
name: ${{ needs.prepare.outputs.tag }}
prerelease: ${{ needs.prepare.outputs.is_prerelease == 'true' }}
files: artifacts/*
build-push:
name: Build Image ${{ matrix.platform }}
needs: [prepare, build-frontend]
if: github.event_name != 'workflow_dispatch'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm/v7
- linux/arm64
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Download frontend artifacts
uses: actions/download-artifact@v4
with:
name: frontend-dist
path: server/router/frontend/dist
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Build and push by digest
id: build
uses: docker/build-push-action@v6
with:
context: .
file: ./scripts/Dockerfile
platforms: ${{ matrix.platform }}
build-args: |
VERSION=${{ needs.prepare.outputs.version }}
COMMIT=${{ github.sha }}
cache-from: type=gha,scope=release-${{ matrix.platform }}
cache-to: type=gha,mode=max,scope=release-${{ matrix.platform }}
outputs: type=image,name=neosmemo/memos,push-by-digest=true,name-canonical=true,push=true
- name: Export digest
run: |
mkdir -p /tmp/digests
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"
- name: Upload digest
uses: actions/upload-artifact@v4
with:
name: digests-${{ strategy.job-index }}
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1
merge-images:
name: Publish Release Image Tags
needs: [prepare, build-push]
if: github.event_name != 'workflow_dispatch'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Download digests
uses: actions/download-artifact@v4
with:
pattern: digests-*
merge-multiple: true
path: /tmp/digests
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Create manifest list and push
working-directory: /tmp/digests
run: |
version="${{ needs.prepare.outputs.version }}"
if [ "${{ needs.prepare.outputs.is_prerelease }}" = "true" ]; then
docker buildx imagetools create \
-t "neosmemo/memos:${version}" \
-t "ghcr.io/usememos/memos:${version}" \
$(printf 'neosmemo/memos@sha256:%s ' *)
exit 0
fi
docker buildx imagetools create \
-t "neosmemo/memos:${version}" \
-t "neosmemo/memos:${{ needs.prepare.outputs.major_minor }}" \
-t "neosmemo/memos:stable" \
-t "ghcr.io/usememos/memos:${version}" \
-t "ghcr.io/usememos/memos:${{ needs.prepare.outputs.major_minor }}" \
-t "ghcr.io/usememos/memos:stable" \
$(printf 'neosmemo/memos@sha256:%s ' *)
- name: Inspect images
run: |
docker buildx imagetools inspect neosmemo/memos:${{ needs.prepare.outputs.version }}
if [ "${{ needs.prepare.outputs.is_prerelease }}" = "true" ]; then
exit 0
fi
docker buildx imagetools inspect neosmemo/memos:stable
+24
View File
@@ -0,0 +1,24 @@
name: Close Stale
on:
schedule:
- cron: "0 */8 * * *" # Every 8 hours
jobs:
close-stale:
name: Close Stale Issues and PRs
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Mark and close stale issues and PRs
uses: actions/stale@v10.1.1
with:
# Issues: mark stale after 14 days of inactivity, close after 3 more days
days-before-issue-stale: 14
days-before-issue-close: 3
# Pull requests: mark stale after 14 days of inactivity, close after 3 more days
days-before-pr-stale: 14
days-before-pr-close: 3
-73
View File
@@ -1,73 +0,0 @@
name: Test
on:
push:
branches:
- main
- "release/v*.*.*"
pull_request:
branches: [main]
jobs:
go-static-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.18
check-latest: true
cache: true
- name: Verify go.mod is tidy
run: |
go mod tidy
git diff --exit-code
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
args: -v
skip-cache: true
eslint-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
cache: yarn
cache-dependency-path: "web/yarn.lock"
- run: yarn
working-directory: web
- name: Run eslint check
run: yarn lint
working-directory: web
frontend-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
cache: yarn
cache-dependency-path: "web/yarn.lock"
- run: yarn
working-directory: web
- name: Run frontend build
run: yarn build
working-directory: web
go-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.18
check-latest: true
cache: true
- name: Run all tests
run: go test -v ./... | tee test.log; exit ${PIPESTATUS[0]}
- name: Pretty print tests running time
run: grep --color=never -e '--- PASS:' -e '--- FAIL:' test.log | sed 's/[:()]//g' | awk '{print $2,$3,$4}' | sort -t' ' -nk3 -r | awk '{sum += $3; print $1,$2,$3,sum"s"}'
+26 -6
View File
@@ -1,13 +1,33 @@
# Air (hot reload) generated
.air
# temp folder
tmp
# Frontend asset
web/dist
# build folder
build
# Build artifacts
build/
bin/
memos
.DS_Store
.DS_Store
# Jetbrains
.idea
# Docker Compose Environment File
.env
dist
# VSCode settings
.vscode
# Git worktrees
.worktrees/
# Local pnpm store (project-scoped, created when --config.store-dir is set
# without an existing store; contains a symlink back to the workspace).
.pnpm-store/
# Frontend test coverage output (Vitest + @vitest/coverage-v8).
web/coverage/
+89 -52
View File
@@ -1,6 +1,7 @@
version: "2"
linters:
enable:
- goimports
- revive
- govet
- staticcheck
@@ -10,55 +11,91 @@ linters:
- rowserrcheck
- nilerr
- godot
- forbidigo
- mirror
- bodyclose
disable:
- errcheck
settings:
exhaustive:
explicit-exhaustive-switch: false
staticcheck:
checks:
- all
- -ST1000
- -ST1003
- -ST1021
- -QF1003
revive:
# Default to run all linters so that new rules in the future could automatically be added to the static check.
enable-all-rules: true
rules:
# The following rules are too strict and make coding harder. We do not enable them for now.
- name: file-header
disabled: true
- name: line-length-limit
disabled: true
- name: function-length
disabled: true
- name: max-public-structs
disabled: true
- name: function-result-limit
disabled: true
- name: banned-characters
disabled: true
- name: argument-limit
disabled: true
- name: cognitive-complexity
disabled: true
- name: cyclomatic
disabled: true
- name: confusing-results
disabled: true
- name: add-constant
disabled: true
- name: flag-parameter
disabled: true
- name: nested-structs
disabled: true
- name: import-shadowing
disabled: true
- name: early-return
disabled: true
- name: use-any
disabled: true
- name: exported
disabled: true
- name: unhandled-error
disabled: true
- name: if-return
disabled: true
- name: max-control-nesting
disabled: true
- name: redefines-builtin-id
disabled: true
- name: package-comments
disabled: true
gocritic:
disabled-checks:
- ifElseChain
govet:
settings:
printf: # The name of the analyzer, run `go tool vet help` to see the list of all analyzers
funcs: # Run `go tool vet help printf` to see the full configuration of `printf`.
- common.Errorf
enable-all: true
disable:
- fieldalignment
- shadow
forbidigo:
forbid:
- pattern: 'fmt\.Errorf(# Please use errors\.Wrap\|Wrapf\|Errorf instead)?'
- pattern: 'ioutil\.ReadDir(# Please use os\.ReadDir)?'
issues:
exclude:
- Rollback
- fmt.Printf
- fmt.Print
linters-settings:
revive:
enable-all-rules: true
rules:
- name: file-header
disabled: true
- name: line-length-limit
disabled: true
- name: function-length
disabled: true
- name: max-public-structs
disabled: true
- name: function-result-limit
disabled: true
- name: banned-characters
disabled: true
- name: argument-limit
disabled: true
- name: cognitive-complexity
disabled: true
- name: cyclomatic
disabled: true
- name: confusing-results
disabled: true
- name: add-constant
disabled: true
- name: flag-parameter
disabled: true
- name: nested-structs
disabled: true
- name: import-shadowing
disabled: true
- name: early-return
disabled: true
gocritic:
disabled-checks:
- ifElseChain
govet:
settings:
printf:
funcs:
- common.Errorf
forbidigo:
forbid:
- 'fmt\.Errorf(# Please use errors\.Wrap\|Wrapf\|Errorf instead)?'
formatters:
enable:
- goimports
settings:
goimports:
local-prefixes:
- github.com/usememos/memos
+3
View File
@@ -0,0 +1,3 @@
{
".": "0.30.0-rc.2"
}
-4
View File
@@ -1,4 +0,0 @@
{
"go.lintOnSave": "workspace",
"go.lintTool": "golangci-lint"
}
+125
View File
@@ -0,0 +1,125 @@
# AGENTS.md
Repository instructions for AI coding agents. Keep this file short, concrete, and tied to commands that actually work in this
repo. If a fact here conflicts with source files or CI config, trust the source file and update this guide.
## Project Snapshot
Memos is a self-hosted note-taking app.
- Backend: Go 1.26.2, Echo v5, Connect RPC, gRPC-Gateway, Protocol Buffers.
- Frontend: React 19, TypeScript 6, Vite 8, Tailwind CSS v4, React Query v5.
- Storage: SQLite, MySQL, PostgreSQL.
- Generated API outputs: `proto/gen/` for Go/OpenAPI, `web/src/types/proto/` for TypeScript.
## Working Rules
- Read relevant code before editing; prefer local patterns over new abstractions.
- Keep diffs scoped. Do not do repo-wide cleanup, dependency churn, or generated-file rewrites unless the task requires it.
- Do not hand-edit generated proto outputs. Change `.proto` files, then run `buf generate`.
- Add migrations for all database drivers when schema changes, and update each driver's `LATEST.sql`.
- Add public API endpoints to `server/router/api/v1/acl_config.go`.
- Ask before adding heavy dependencies, changing auth/token behavior, or altering Docker/release workflows.
## Commands
Run from the repository root unless a command starts with `cd`.
```bash
# Backend
go run ./cmd/memos --port 8081 # Start backend dev server
go test ./... # Run all Go tests
go test -v ./store/... # Store tests, including DB drivers via TestContainers
go test -v -race ./server/... # Server tests with race detector
go test -v -race ./internal/... # Internal package tests with race detector
go test -v -run TestFoo ./pkg/... # Run matching Go tests
go mod tidy -go=1.26.2 # Match CI tidy check
golangci-lint run # Go lint, config: .golangci.yaml
golangci-lint run --fix # Auto-fix lint, including goimports
# Frontend
cd web && pnpm install # Install dependencies
cd web && pnpm dev # Dev server on :3001, proxying API to :8081
cd web && pnpm lint # Type check + Biome lint
cd web && pnpm test # Vitest unit tests
cd web && pnpm build # Production build
cd web && pnpm release # Build SPA into server/router/frontend/dist
# Protocol Buffers
cd proto && buf generate # Regenerate Go + TypeScript + OpenAPI
cd proto && buf lint # Lint proto files
cd proto && buf format -w # Format proto files
```
## Code Map
| Path | Purpose |
| --- | --- |
| `cmd/memos/main.go` | Cobra/Viper CLI setup and server startup |
| `server/server.go` | Echo HTTP server and background runner wiring |
| `server/auth/` | JWT access tokens, refresh tokens, PAT handling |
| `server/router/api/v1/` | Connect/gRPC-Gateway services, ACL config, SSE hub |
| `server/router/frontend/` | Static SPA serving |
| `server/router/fileserver/` | Native HTTP file serving, thumbnails, range requests |
| `server/runner/` | Background memo processing and S3 presign refresh |
| `store/` | Store facade, cache, migrations, driver interface |
| `store/db/{sqlite,mysql,postgres}/` | Database-specific drivers and SQL |
| `proto/api/v1/` | Public API service definitions |
| `proto/store/` | Internal storage proto messages |
| `internal/` | App-private packages: scheduler, cron, email, CEL filter, markdown, idp, S3 |
| `web/src/connect.ts` | Connect RPC clients, auth interceptor, access-token refresh |
| `web/src/auth-state.ts` | Token storage and BroadcastChannel cross-tab sync |
| `web/src/hooks/` | React Query hooks for server state |
| `web/src/contexts/` | React context for client/UI state |
| `web/src/components/` | Radix/Tailwind UI components and feature components |
| `web/src/themes/` | CSS themes using OKLch color tokens |
## Change Routing
| Change | Update | Verify |
| --- | --- | --- |
| Go service or router behavior | Service code under `server/`, tests near package | `go test -v -race ./server/...` |
| Store or migration behavior | `store/`, all three DB driver migrations, `LATEST.sql` | `go test -v ./store/...` |
| Internal package logic | Relevant `internal/` package tests | `go test -v -race ./internal/...` |
| Frontend behavior | Components/hooks/contexts under `web/src/` | `cd web && pnpm lint && pnpm test` |
| Frontend production output | Vite config or release-sensitive UI | `cd web && pnpm build` or `pnpm release` |
| Proto API | `.proto` source plus generated outputs | `cd proto && buf generate && buf lint` |
| Public unauthenticated route | `server/router/api/v1/acl_config.go` | Targeted server test or manual route check |
## Go Conventions
- Wrap errors with `errors.Wrap(err, "context")` from `github.com/pkg/errors`; do not use `fmt.Errorf`.
- Return service errors with `status.Errorf(codes.X, "message")`.
- Keep imports grouped as stdlib, third-party, then `github.com/usememos/memos`; goimports is run by golangci-lint.
- Add doc comments for exported identifiers; godot enforces exported comment punctuation.
- Avoid package-level mutable state unless the surrounding package already uses that pattern.
## Frontend Conventions
- Use `@/` for absolute imports.
- Follow Biome formatting: 2-space indent, double quotes, semicolons, 140-character line width.
- Put server data in React Query hooks under `web/src/hooks/`; keep UI-only state in contexts or component state.
- Use Tailwind CSS v4 utilities, `cn()` for class merging, and CVA for variants.
- Reuse Radix primitives and existing components before adding new UI primitives.
- Keep generated proto TypeScript under `web/src/types/proto/` out of manual edits and Biome rewrites.
## Database And Proto Rules
- Schema changes require SQLite, MySQL, and PostgreSQL migrations plus `LATEST.sql` updates.
- Fresh-install SQL and incremental migrations must stay equivalent.
- Proto field changes must preserve compatibility unless the task explicitly allows a breaking API change.
- Regenerate after proto edits and include both Go/OpenAPI and TypeScript generated outputs.
## Verification Policy
- Run the narrowest relevant checks while iterating.
- Before finishing, run the checks that match the changed surface from "Change Routing".
- For docs-only changes, `git diff --check` is sufficient unless the docs include runnable examples that should be tested.
- If a required check cannot run locally, report the reason and the exact command that remains.
## CI Reference
- Backend CI: Go 1.26.2, `go mod tidy -go=1.26.2`, golangci-lint v2.11.3, test groups `store`, `server`, `internal`, `other`.
- Frontend CI: Node 24, pnpm 11.0.1, `pnpm lint`, `pnpm test`, `pnpm build`.
- Proto CI: `buf lint` and `buf format` check.
- Docker: `scripts/Dockerfile`, Alpine 3.21 runtime, non-root user, port 5230, multi-arch amd64/arm64/arm/v7.
+230
View File
@@ -0,0 +1,230 @@
# Changelog
## [0.30.0-rc.2](https://github.com/usememos/memos/compare/v0.30.0-rc.1...v0.30.0-rc.2) (2026-07-20)
### Highlights
* **Memo detail and navigation:** Redesigned the memo detail sidebar as a property rail with quick actions, editable visibility, memo metadata, attachments, relations, and a scroll-aware outline. Feed scroll position is now restored when navigating back from another page. ([d4b5a16](https://github.com/usememos/memos/commit/d4b5a1695b9acf4da3ef72f600789a4a0f90e4d5)) ([e497895](https://github.com/usememos/memos/commit/e497895bf3b72cdae92e5bab6cd5b691c8eedc15))
* **Settings and access tokens:** Refreshed settings navigation and expanded the access-token page with practical guidance, a copyable API example, safety notes, and last-used timestamps. The About page and project documentation now surface the Memos Web Clipper. ([715306e](https://github.com/usememos/memos/commit/715306ea66306a91765d3f7c3ede8bc815d2def5)) ([06ecef3](https://github.com/usememos/memos/commit/06ecef33bc7e6bafc263b2dee71ffd290ab3dc42)) ([f946974](https://github.com/usememos/memos/commit/f94697496b60f5fe590c2ffa19e3f0c93b749af4))
* **Faster feeds and Explore:** Reduced initial work and bandwidth by caching fingerprinted assets, deferring media and rich renderers until needed, rendering feed content near the viewport, and sharing user and memo lookups across creators, reactions, comments, mentions, and relations. ([88c6ee8](https://github.com/usememos/memos/commit/88c6ee8ebcc341aa1d2e2ae38638a518f4745de1)) ([6c1055f](https://github.com/usememos/memos/commit/6c1055f483c92c2a95193bea07110b6775359651)) ([249b331](https://github.com/usememos/memos/commit/249b331596fd1c9ceceb4e72da8e422499be683f))
* **Demo experience:** Rebuilt the demo data around representative public and protected memos that showcase nested tags, references, comments, mentions, reactions, locations, attachments, and rich Markdown. ([469c995](https://github.com/usememos/memos/commit/469c995cc04b5e7de259156d28c58b948e85d111))
### Fixes and polish
* **API compatibility and errors:** Aligned new resource IDs and annotations with AIP conventions while preserving legacy UUID-based identifiers, corrected canonical user-stat resource names, and removed internal RPC prefixes from user-facing error messages. ([84776cc](https://github.com/usememos/memos/commit/84776cc106745278371e5a8c8d43abca6d38e8b5)) ([b7d5d09](https://github.com/usememos/memos/commit/b7d5d09f8a7445076811d6f53b98d3445ce3afac)) ([0bfeb91](https://github.com/usememos/memos/commit/0bfeb91d50fdd4bafd15c13bb02b3e2810d4b2e4))
* **Interface:** Corrected radio-group indicator alignment and positioned tooltip arrows outside their content panels. ([#6097](https://github.com/usememos/memos/issues/6097)) ([2d01420](https://github.com/usememos/memos/commit/2d01420c23372d5708904ec78e03485edb44d49b)) ([#6095](https://github.com/usememos/memos/issues/6095)) ([773e56e](https://github.com/usememos/memos/commit/773e56e537657508af4e357f9c8845af4d4f15e8))
## [0.30.0-rc.1](https://github.com/usememos/memos/compare/v0.29.1...v0.30.0-rc.1) (2026-07-14)
### ⚠ BREAKING CHANGES
* **Access control:** Instances without `--instance-url` (or `MEMOS_INSTANCE_URL`) now run in private mode. Anonymous visitors are sent to sign-in and anonymous API access is limited to setup, authentication, and shared-memo routes. Set the instance URL to retain the previous public behavior. ([d1cef7a](https://github.com/usememos/memos/commit/d1cef7a9ab23e8c93f76b2f32661c720c733536d))
* **Filters:** `now()` has been replaced by the `now` timestamp variable, and time fields now use CEL timestamps. Update saved shortcuts to use expressions such as `created_ts >= now - duration("24h")` or `timestamp(<epoch>)` instead of comparing time fields with bare epoch values. ([26f4b73](https://github.com/usememos/memos/commit/26f4b73cb9a996f9232daad2b5daa34360742697))
* **MCP:** The MCP server is now a stateless, tools-only endpoint generated from the OpenAPI schema. The previous prompts, resources, tool-filtering headers and route aliases, and unprefixed tool names have been removed. Clients that used them must switch to `/mcp` and the new service-prefixed tool names. ([#6026](https://github.com/usememos/memos/issues/6026))
### Highlights
* **Markdown editor:** Rebuilt the editor as a single CodeMirror 6 decorated-source editor. Markdown is preserved verbatim while headings, formatting, tags, and mentions are styled in place. The editor also adds tag completion, list indentation, and a toggleable formatting toolbar with headings, lists, task lists, code blocks, bold, italic, strikethrough, and inline code. ([5a73d7d](https://github.com/usememos/memos/commit/5a73d7d3e56f853a965207ac709e8f5e84918959)) ([e3c231f](https://github.com/usememos/memos/commit/e3c231fcac5691f9590a5d685bdebec23b73be35))
* **MCP:** Replaced the hand-written MCP implementation with a curated OpenAPI-driven tool surface that reuses the public API's authentication and authorization. The final toolset includes memo, comment, relation, reaction, shortcut, identity, and attachment operations, including attachment uploads. ([777d227](https://github.com/usememos/memos/commit/777d227eb992c4feccd5d78c781cf8e9094e38de)) ([0e1d821](https://github.com/usememos/memos/commit/0e1d821fb84310feff40b90d899403d45bced596))
* **Deployment configuration:** Identity providers and supported instance settings can be supplied as validated JSON files under `/etc/secrets`. File-backed settings act as runtime overrides and cannot be changed through the UI or API until the files are removed. ([0038295](https://github.com/usememos/memos/commit/0038295bbc772b38425b6c7f9ca814e4d1e44260))
* **Memo feeds:** Added persisted controls for one, two, three, or automatically fitted columns; compact mode; and link previews. Multi-column feeds stay balanced as cards resize, while newly created memos remain easy to find above pinned content. ([177d65a](https://github.com/usememos/memos/commit/177d65a90e321fa975a7cf19bd3c075143af5c10)) ([e3e4ae1](https://github.com/usememos/memos/commit/e3e4ae10512f514f71729779b5096d0d591c8cf4))
* **Webhooks:** Added Standard Webhooks HMAC-SHA256 signing secrets, webhook editing, and a signing-status indicator. Secrets are generated server-side, shown after creation, and can be revealed later from the edit dialog; malformed secrets now fail validation. ([#6013](https://github.com/usememos/memos/issues/6013)) ([#6027](https://github.com/usememos/memos/issues/6027))
* **Filters:** Expanded CEL shortcuts with string matching, regular expressions, collection predicates, timestamp accessors, set operations, and an untagged-memos example. ([f0e4a56](https://github.com/usememos/memos/commit/f0e4a5624f4371e08fb0c41510891c9f8cce6ba0)) ([b787bfa](https://github.com/usememos/memos/commit/b787bfa75f74d8ee5ec271bd308c2e5a0389ed35))
* **Tag settings:** Tag colors and content-blur rules are now per-user. Existing instance tag settings are copied to current users during migration. ([#6017](https://github.com/usememos/memos/issues/6017))
* **Internationalization:** Added a searchable locale picker, expanded European locale coverage, and completed missing Japanese and Simplified Chinese translations. ([4183985](https://github.com/usememos/memos/commit/418398587cef90151745ba0dbc51cef4762045ca)) ([a47d049](https://github.com/usememos/memos/commit/a47d04954e75c54491138601c72f1c0cbe140f3c))
* **Interface:** Refreshed the sign-in, sign-up, and About pages and aligned common controls across the app. Compact rendering is now opt-in in single-column feeds, so full memo content is shown by default. ([564da94](https://github.com/usememos/memos/commit/564da949cb87491ca8e493d2f7aedcd2ef9545a1)) ([cafa56f](https://github.com/usememos/memos/commit/cafa56f1a8c9091062a4b220284e8ca697b050e8))
* **Markdown and storage:** Added GFM footnote rendering and navigation, plus an `insecure_skip_tls_verify` option for S3-compatible storage with self-signed certificates. ([1020060](https://github.com/usememos/memos/commit/10200606db24e3d70fb8efefee99c7b0a369ddea)) ([#6039](https://github.com/usememos/memos/issues/6039))
### Fixes and polish
* **Authentication and setup:** Stabilized SSO option loading, added OAuth client-auth auto-detection, and distinguished fresh instances from populated instances that no longer have an admin. ([6c17e87](https://github.com/usememos/memos/commit/6c17e87cf61cd9c62ea4ef4e25d4adb5603ffc88)) ([96cb653](https://github.com/usememos/memos/commit/96cb65320b714ef8d7993ddb7c9182350ee9da4c))
* **Editor:** Improved formatting toggles and keyboard shortcuts, file paste and drop handling, focus-mode layout, caret behavior in empty space, and CodeMirror spacing. ([c349c15](https://github.com/usememos/memos/commit/c349c1549e49950e3171b7de28faba5d89249cfa)) ([#6076](https://github.com/usememos/memos/issues/6076)) ([#6093](https://github.com/usememos/memos/issues/6093))
* **Memos and comments:** Preserved expanded task-list state, loaded every comment page, and included the parent memo relation in comment webhook payloads. ([ecbe2ab](https://github.com/usememos/memos/commit/ecbe2ab7977fcd3521aeae1226e816a9dc2a6a40)) ([#6083](https://github.com/usememos/memos/issues/6083))
* **Tags:** Tags inside links are no longer parsed as memo tags, literal tags can be escaped with a backslash, and tag names support Unicode combining marks. ([a50ce09](https://github.com/usememos/memos/commit/a50ce09e8159836aed1a97fa717488283378200f)) ([#6051](https://github.com/usememos/memos/issues/6051))
* **API and security:** Cross-origin API requests now work with bearer tokens while cookie authentication remains same-origin, and `ListUsers` now returns consistent paginated results. ([385fa22](https://github.com/usememos/memos/commit/385fa22056c51a42a0eb99fd08a8876009c2c52d)) ([4bc3928](https://github.com/usememos/memos/commit/4bc39280290b0f2612ff52285689854b6cf1344b))
* **Interface:** Replaced mismatched memo skeletons with a delayed spinner, improved mobile control spacing, and truncated long location labels without hiding the full address. ([#6047](https://github.com/usememos/memos/issues/6047)) ([3b601b8](https://github.com/usememos/memos/commit/3b601b841670ece4a2832341a99ccc74124a745e))
* **Container:** Prevented the entrypoint from restarting indefinitely when `MEMOS_UID=0`. ([#6061](https://github.com/usememos/memos/issues/6061))
## [0.29.1](https://github.com/usememos/memos/compare/v0.29.0...v0.29.1) (2026-06-04)
### Bug Fixes
* **markdown:** keep task item content in one grid column ([7c3bff4](https://github.com/usememos/memos/commit/7c3bff4e98223fb99a5d49f093e3cd57dd140ba4))
* support &lt;meta name=description&gt; in link previews ([#6000](https://github.com/usememos/memos/issues/6000)) ([e8d32e8](https://github.com/usememos/memos/commit/e8d32e87d1d6e4927250ad5794ba5965e0260153))
* **web:** render video attachment posters on mobile ([0e2a9a9](https://github.com/usememos/memos/commit/0e2a9a9c0ce0e2da63535210c553b3ae2f79b239))
## [0.29.0](https://github.com/usememos/memos/compare/v0.28.0...v0.29.0) (2026-05-27)
### Features
* **about:** add about page with bird sprites ([411ba7b](https://github.com/usememos/memos/commit/411ba7b34c0c23ad217a7897835097887a28a036))
* **activity-calendar:** aggregate by ViewContext.timeBasis ([8daef1d](https://github.com/usememos/memos/commit/8daef1dc89544512fff78fd64d8216b2babc2e42))
* add &lt;Placeholder&gt; component with ASCII bird states ([#5949](https://github.com/usememos/memos/issues/5949)) ([8c16ffa](https://github.com/usememos/memos/commit/8c16ffa1f1410f9413cb57ebe251b4b604f9aeff))
* add configurable `--log-level` flag ([#5934](https://github.com/usememos/memos/issues/5934)) ([f1e2a06](https://github.com/usememos/memos/commit/f1e2a06b46c7f45ba6562c308d2703fdfb4067b0))
* add dedicated shortcuts page ([#5942](https://github.com/usememos/memos/issues/5942)) ([1df6479](https://github.com/usememos/memos/commit/1df6479443c334732b862d60a0f76e61f00ebb89))
* add link metadata endpoints ([9c5c604](https://github.com/usememos/memos/commit/9c5c604944428d3f682f35c9d05a87c1d4c3152f))
* **frontend:** add pixel bird tilemaps ([cf55f11](https://github.com/usememos/memos/commit/cf55f1107273c928e7c2d6bc26df5f3efea26458))
* **memo:** add task list quick actions ([#5983](https://github.com/usememos/memos/issues/5983)) ([648b3bd](https://github.com/usememos/memos/commit/648b3bd812e5bf2b1abb9f8b3529efefe4734e7c))
* **memo:** create memos on the selected calendar date ([#5925](https://github.com/usememos/memos/issues/5925)) ([ef55013](https://github.com/usememos/memos/commit/ef55013418d68e2d6a24a6d02a0365c1ffff03d7))
* **notification:** add smtp email settings ([cd4f28a](https://github.com/usememos/memos/commit/cd4f28ae1058a125e245ea0a6eae16aea71b8f9d))
* **placeholder:** add woodpecker tilemap ([638e4f3](https://github.com/usememos/memos/commit/638e4f398e90c556f70af150a79538312c8fc760))
* render link metadata cards ([0bc5669](https://github.com/usememos/memos/commit/0bc56694b0ca347ab1eb083f62997a22007b763d))
* **stats:** admin instance resource statistics ([ea0625d](https://github.com/usememos/memos/commit/ea0625da45a419e08158ab4102051f3fe5e59b87))
* **stats:** support filtered all-user stats ([88ac3ec](https://github.com/usememos/memos/commit/88ac3ec31ee3e808db82663c04a31cf730d1221e))
* **transcription:** explicit STT settings with provider, model, prompt ([#5926](https://github.com/usememos/memos/issues/5926)) ([238f27d](https://github.com/usememos/memos/commit/238f27dea149492a78a8994470b0aac55fece78d))
### Bug Fixes
* avoid update event on memo create attachments ([#5961](https://github.com/usememos/memos/issues/5961)) ([3c3382a](https://github.com/usememos/memos/commit/3c3382a3c652bed3b58058931ff3cbf1d875b9a8))
* delete user cleanup ([#5981](https://github.com/usememos/memos/issues/5981)) ([e53b7d9](https://github.com/usememos/memos/commit/e53b7d96e70965529ba3b04ea720ea6966f77b60))
* **editor:** wrap selected text when pasting URL ([e0bb3a2](https://github.com/usememos/memos/commit/e0bb3a2e684e932309df2f9fb0ff774ce8e6b692))
* **fileserver:** preserve HDR image metadata in thumbnails ([c724232](https://github.com/usememos/memos/commit/c7242324a18962e453e7f2a0309a7c07b358bdbe))
* **frontend:** correct static cache headers ([084f40b](https://github.com/usememos/memos/commit/084f40bc9e5922ff2d41c08dce837b96696437aa))
* **frontend:** use correct url path for memos in sitemap.xml ([#5921](https://github.com/usememos/memos/issues/5921)) ([603781f](https://github.com/usememos/memos/commit/603781f792b2603fbda93146988a64a93c92d760))
* **httpgetter:** prevent DNS rebinding in link metadata fetch ([078488c](https://github.com/usememos/memos/commit/078488ca818626fbcab69bdfb4b93b58dca6b6eb))
* **markdown:** align list items with checkboxes ([e008b1a](https://github.com/usememos/memos/commit/e008b1a23c77945eff87707eb15578d4d6d74e4c))
* **memo:** enforce parent visibility for comments ([4a1e401](https://github.com/usememos/memos/commit/4a1e401bd99c7850ac48e9693b25c9ebeecfb042))
* **s3presign:** preserve motion media payload ([7f1f53f](https://github.com/usememos/memos/commit/7f1f53ffc417962f6930d1e6e3783eacd911003d))
* **security:** enforce attachment ownership on memo updates ([35bf761](https://github.com/usememos/memos/commit/35bf761b8c2c3f155bdc06e9b373b6076116a725))
* **sse:** stream initial response and refresh tokens ([21303e8](https://github.com/usememos/memos/commit/21303e879d2c7a857306206d2cbdae83f61983e6))
* **user:** omit internal settings from list responses ([#5917](https://github.com/usememos/memos/issues/5917)) ([1df3fe7](https://github.com/usememos/memos/commit/1df3fe79559ccf94b6c71e9ffb58e870ed43820d))
* **web:** sync avatar changes immediately after profile update ([#5903](https://github.com/usememos/memos/issues/5903)) ([328396a](https://github.com/usememos/memos/commit/328396a97f2219592032e8418c383e0ab7edaca6))
### Performance Improvements
* lazy load heavy first-screen dependencies ([#5947](https://github.com/usememos/memos/issues/5947)) ([a6024ee](https://github.com/usememos/memos/commit/a6024eebf129c4b8fb65ee0cba09c6657274bfde))
## [0.28.0](https://github.com/usememos/memos/compare/v0.27.1...v0.28.0) (2026-04-27)
### Features
* **auth:** add SSO user identity linkage ([#5883](https://github.com/usememos/memos/issues/5883)) ([d688914](https://github.com/usememos/memos/commit/d688914b2864791eeadbf21c882608632875f17c))
* **memos:** choose created or updated time for memos ([#5894](https://github.com/usememos/memos/issues/5894)) ([c268551](https://github.com/usememos/memos/commit/c268551a16929a2cbea6891951feff91926bba59))
* redesign account and SSO management ([#5886](https://github.com/usememos/memos/issues/5886)) ([ee17998](https://github.com/usememos/memos/commit/ee1799851e88674a6920c7a56d93428fcf95e662))
### Bug Fixes
* **auth:** harden authorization and username validation ([#5890](https://github.com/usememos/memos/issues/5890)) ([0fb83a7](https://github.com/usememos/memos/commit/0fb83a745dd5057ade45a3caad2c444af2239113))
* disable modal prop on DropdownMenu to prevent scroll disappearing ([#5861](https://github.com/usememos/memos/issues/5861)) ([d98f665](https://github.com/usememos/memos/commit/d98f6659190b8d1a8252e64549d9120d85e05d33))
* fix legacy username auth flows ([#5885](https://github.com/usememos/memos/issues/5885)) ([30c0611](https://github.com/usememos/memos/commit/30c0611a82f9254952a74650095105254f2940e4))
* **markdown:** split mixed task and bullet lists ([e2c6084](https://github.com/usememos/memos/commit/e2c60845eaff9a78b8d8eb3ccc9a067ef5690976))
* reduce list memo query overhead ([#5880](https://github.com/usememos/memos/issues/5880)) ([5063804](https://github.com/usememos/memos/commit/50638040f618b02b0c6d010e1d41554c75067517))
* **web:** preserve task checkbox state ([#5867](https://github.com/usememos/memos/issues/5867)) ([b5863d7](https://github.com/usememos/memos/commit/b5863d76be3cfbf3e0f8237d8e762122b5a0a679))
## [0.27.1](https://github.com/usememos/memos/compare/v0.27.0...v0.27.1) (2026-04-19)
### Bug Fixes
* mixed-case user resource names ([#5853](https://github.com/usememos/memos/issues/5853)) ([01be01f](https://github.com/usememos/memos/commit/01be01f4b7676af41bdd1758b1e9b096aa922546))
* **release:** inject build version into artifacts ([f8a304b](https://github.com/usememos/memos/commit/f8a304bae33086320b39095d631288156eec4249))
* user resource names can be uuidv4 from idp sub claim ([#5856](https://github.com/usememos/memos/issues/5856)) ([bbded58](https://github.com/usememos/memos/commit/bbded584ce85a856d863485768e08b53adec7244))
## [0.27.0](https://github.com/usememos/memos/compare/v0.26.2...v0.27.0) (2026-04-18)
### Features
* add --allow-private-webhooks flag to bypass SSRF protection ([#5694](https://github.com/usememos/memos/issues/5694)) ([cd5816c](https://github.com/usememos/memos/commit/cd5816c428931f56561f7d48b649a33858812539))
* add blur_content attribute to tag metadata settings ([#5767](https://github.com/usememos/memos/issues/5767)) ([45b2153](https://github.com/usememos/memos/commit/45b21530d9ebbc730e77bcbcf407f4c295b52e93))
* add Gemini transcription provider ([#5830](https://github.com/usememos/memos/issues/5830)) ([d87539a](https://github.com/usememos/memos/commit/d87539a1e1261590ab355220e33fa0ae00bd9431))
* add GitHub release installer and release workflow ([1ed542c](https://github.com/usememos/memos/commit/1ed542c21db421e9aa0cc47417a92c6bd103e257))
* add live refresh via Server-Sent Events (SSE) with visual indicator ([#5638](https://github.com/usememos/memos/issues/5638)) ([ea0892a](https://github.com/usememos/memos/commit/ea0892a8b26d8806a093e3a942562dfc22794f68))
* add MCP server with PAT authentication ([47d9414](https://github.com/usememos/memos/commit/47d9414702dc18966af385352b960bfe451511b7))
* add outline navigation to memo detail sidebar ([#5771](https://github.com/usememos/memos/issues/5771)) ([6b30579](https://github.com/usememos/memos/commit/6b3057990396f9cb6f21706c2e99dddebc35ffd5))
* **ai:** add BYOK audio transcription ([#5832](https://github.com/usememos/memos/issues/5832)) ([101704c](https://github.com/usememos/memos/commit/101704c8eac17c7f34508d8db6c53bc972061cdb))
* **ai:** add instance AI providers and transcription ([#5829](https://github.com/usememos/memos/issues/5829)) ([83ed32f](https://github.com/usememos/memos/commit/83ed32f1195841d2d6c057c3e00086a3147879a2))
* **attachments:** add Live Photo and Motion Photo support ([#5810](https://github.com/usememos/memos/issues/5810)) ([4b4e719](https://github.com/usememos/memos/commit/4b4e719470184e49cd62084b1aa53c9a777a9fec))
* **cli:** add version subcommand ([#5731](https://github.com/usememos/memos/issues/5731)) ([0ba4c0f](https://github.com/usememos/memos/commit/0ba4c0f397c532a5a314f35ddeb3ce3633e84d42))
* **editor:** add voice note recording to the memo composer ([#5801](https://github.com/usememos/memos/issues/5801)) ([c0d5854](https://github.com/usememos/memos/commit/c0d5854f678f357cf4054d448e0311f2ee90f8ac))
* extract title from first H1 heading into memo property ([#5726](https://github.com/usememos/memos/issues/5726)) ([1e688b2](https://github.com/usememos/memos/commit/1e688b2a5d78c2972f4b0078a7b033dae5d1cbf3))
* **i18n:** update sse connect label in Chinese ([#5732](https://github.com/usememos/memos/issues/5732)) ([89c6902](https://github.com/usememos/memos/commit/89c69028953fa33dbb6e0e257d764636c0fc2d09))
* **instance:** add canonical tag metadata setting ([#5736](https://github.com/usememos/memos/issues/5736)) ([65d14fb](https://github.com/usememos/memos/commit/65d14fbb63053fc1fbf1f63881c81adbc9d01671))
* **instance:** add notification transport setting ([#5737](https://github.com/usememos/memos/issues/5737)) ([a249d06](https://github.com/usememos/memos/commit/a249d06e2e0f33e0e3fea34471a891352dacc466))
* **mcp:** enhance MCP server with full capabilities and new tools ([#5720](https://github.com/usememos/memos/issues/5720)) ([b8e9ee2](https://github.com/usememos/memos/commit/b8e9ee2b26a59e1b19aab6db3ca39656fc18785a))
* **mcp:** harden tool exposure and side effects ([#5850](https://github.com/usememos/memos/issues/5850)) ([583c3d2](https://github.com/usememos/memos/commit/583c3d24f4d785faa5e034c1b88ed90eda119baa))
* **mcp:** refactor MCP server to standard protocol structure ([803d488](https://github.com/usememos/memos/commit/803d488a5f8f55477cd3ad4cc4cf0fac98901dd3))
* **memo-editor:** add compact live waveform recorder panel ([#5817](https://github.com/usememos/memos/issues/5817)) ([e51985a](https://github.com/usememos/memos/commit/e51985a29ffeeecd318b2fb793358ed45bb0eff4))
* **memo-preview:** support comment metadata in previews ([#5768](https://github.com/usememos/memos/issues/5768)) ([e176b28](https://github.com/usememos/memos/commit/e176b28c801cc3bb3718208a96a7d64c36620d0f))
* **memo:** add image sharing in detail view ([38fc22b](https://github.com/usememos/memos/commit/38fc22b7541b8a9ddcd848cf77054fcf844eb87f))
* **memo:** add share links for private memos ([#5742](https://github.com/usememos/memos/issues/5742)) ([3f3133d](https://github.com/usememos/memos/commit/3f3133d6e2f404061e147f9dd2424680dc0303a3))
* **mentions:** add memo mention parsing, notifications, and rendering ([#5811](https://github.com/usememos/memos/issues/5811)) ([24fc8ab](https://github.com/usememos/memos/commit/24fc8ab8ca68d092e7b12a5d51c48ca9420f72b5))
* replace auto-increment ID with UID for identity provider resource names ([#5687](https://github.com/usememos/memos/issues/5687)) ([92d937b](https://github.com/usememos/memos/commit/92d937b1aa87365152edc005a3b736e6bf9b9e45))
* show inline comment preview in list view ([3a5d3c8](https://github.com/usememos/memos/commit/3a5d3c8ff92ae5c24559dc4574300d6475820a87))
* **store:** change default storage type to local filesystem ([78efa68](https://github.com/usememos/memos/commit/78efa6802e2fd96c981e86c5b658fb4b5c05091f))
* treat tag setting keys as anchored regex patterns ([#5759](https://github.com/usememos/memos/issues/5759)) ([9e04049](https://github.com/usememos/memos/commit/9e04049632e63f1cf53535773f170c1aa5af7168))
* **ui:** allow navigating between images with arrows in preview dialog ([#5669](https://github.com/usememos/memos/issues/5669)) ([104d2ec](https://github.com/usememos/memos/commit/104d2ec0a6973e983c46724165fdc0916515ad16))
* **user:** add per-user tag metadata settings ([#5735](https://github.com/usememos/memos/issues/5735)) ([330291d](https://github.com/usememos/memos/commit/330291d4d9fa95649e940001898929b4f6f0367e))
* **web:** add demo mode banner ([#5836](https://github.com/usememos/memos/issues/5836)) ([35504cc](https://github.com/usememos/memos/commit/35504cc8bd6f9921291fb565633d549388a3f948))
* **webhook:** dispatch webhook on memo comment creation ([7c1defb](https://github.com/usememos/memos/commit/7c1defba01fbc91cc81e1a0841cecb6738056db7))
### Bug Fixes
* access token refresh on web app ([#5681](https://github.com/usememos/memos/issues/5681)) ([3010f10](https://github.com/usememos/memos/commit/3010f10eafb49af5aadd71a94b3ef7a6ec71f617))
* add unix socket file permission setting (755 -&gt; 660) ([#5849](https://github.com/usememos/memos/issues/5849)) ([0fc1dab](https://github.com/usememos/memos/commit/0fc1dab28b33f7fdbe9a21cd3bd3affe75dd7f19))
* **api:** appease image size lint ([ff6389a](https://github.com/usememos/memos/commit/ff6389a5ef73772fcb5c132bf1cb169fb4744c00))
* **api:** improve SSE hub design and fix double-broadcast on comments ([c53677f](https://github.com/usememos/memos/commit/c53677fcba202a8eed35c8ecdfaacea5152b8691))
* **api:** make credentials write-only and restrict sensitive settings to admins ([9d3a74b](https://github.com/usememos/memos/commit/9d3a74bcccf934aa2fa95ee240b56cc3b3a25776))
* **api:** reduce memory pressure in backend paths ([c456637](https://github.com/usememos/memos/commit/c45663761d148e94d3e1b30f4810922e7c2571ab))
* **api:** remove public activity service ([#5734](https://github.com/usememos/memos/issues/5734)) ([04f239a](https://github.com/usememos/memos/commit/04f239a2fc74f7090c779a6a7b8a08238fd31b88))
* **api:** restrict user email exposure to self and admins ([#5784](https://github.com/usememos/memos/issues/5784)) ([a24d420](https://github.com/usememos/memos/commit/a24d4209222814e4a8bedfc0392e91462bc855ad))
* **api:** switch user resource names to usernames ([#5779](https://github.com/usememos/memos/issues/5779)) ([acddef1](https://github.com/usememos/memos/commit/acddef1f3dcca44806bcbb85e9dc5cae7daa5285))
* **api:** tolerate missing related users in memo conversions ([#5809](https://github.com/usememos/memos/issues/5809)) ([25feef3](https://github.com/usememos/memos/commit/25feef3aadd34bfd474d7e3b685815a6509bc4c6))
* **auth:** recover session via refresh cookie when localStorage is empty ([#5748](https://github.com/usememos/memos/issues/5748)) ([551ee1d](https://github.com/usememos/memos/commit/551ee1d81f398abdcaf73a0c2b782c8379b0e3f2))
* backend tests action ([065e817](https://github.com/usememos/memos/commit/065e817470b1d3b6b00222525791b85d825c1492))
* clear content search filter when selecting shortcut ([#5499](https://github.com/usememos/memos/issues/5499)) ([2c3f9e3](https://github.com/usememos/memos/commit/2c3f9e3bfbe09e5d0028d1525c1df83c03f547c9))
* correct typos in comments, error messages, and identifiers ([#5704](https://github.com/usememos/memos/issues/5704)) ([8f43e80](https://github.com/usememos/memos/commit/8f43e8075b62706f99da4005ab04b165b35215f6))
* detect legacy installations with empty schema version ([9628d3d](https://github.com/usememos/memos/commit/9628d3de21289e887ffeb6cc4b6710913a0de44e))
* **editor:** show newly linked memos when editing a memo with attachments ([026ea92](https://github.com/usememos/memos/commit/026ea92f7b4005c30ca84340c22018740659ab51))
* ensure comment divs span full width in MemoDetail ([ce44164](https://github.com/usememos/memos/commit/ce441644af34ffff156f1793c40011c2b82e8d5f))
* **fileserver:** render SVG attachment previews ([40fd700](https://github.com/usememos/memos/commit/40fd700fb8be27a8d7a300a2636cf4f366572176))
* **filter:** enforce CEL syntax semantics ([0e89407](https://github.com/usememos/memos/commit/0e89407ee91deda87e0df7464a89d26d1e9a88b3))
* **frontend:** restore sitemap and robots routes ([fee7fcd](https://github.com/usememos/memos/commit/fee7fcd6608b9d07da1f146c33c9bb8f898f708f))
* handle chunk load errors after redeployment with auto-reload ([#5703](https://github.com/usememos/memos/issues/5703)) ([bdd3554](https://github.com/usememos/memos/commit/bdd3554b897246bac5c1e6fd801495c24b6a656e))
* harden memo content iframe and HTML sanitization ([7e21b72](https://github.com/usememos/memos/commit/7e21b728b346e80023c93e8986130f83e70584f9))
* hide transcribe button without AI provider ([ab53329](https://github.com/usememos/memos/commit/ab5332901fd6626f0a2ae6b99671af9663f68078))
* improve image preview dialog and live photo trigger ([aafcc21](https://github.com/usememos/memos/commit/aafcc21ae6f96a313fb372365dd1af8a1a69d1ba))
* improve installer compatibility and docs ([f90d9a4](https://github.com/usememos/memos/commit/f90d9a49a78d0764a6c5cf8f6720e69ea1164b25))
* improve KaTeX and Mermaid error handling and overflow ([6b37fcc](https://github.com/usememos/memos/commit/6b37fcc01b5dcded6a2ec254fbaf895f7812d072))
* include plain URLs and tags in memo snippet generation ([#5688](https://github.com/usememos/memos/issues/5688)) ([3d4f793](https://github.com/usememos/memos/commit/3d4f793f97b567bda823a60b7fe10e09e14499ce))
* **lint:** correct goimports struct literal alignment after removing write-only credential fields ([#5794](https://github.com/usememos/memos/issues/5794)) ([9610ed8](https://github.com/usememos/memos/commit/9610ed8fc809b3e7aa4b93e4909634957fa94cf7))
* **map:** align dark mode map styling ([7ac9989](https://github.com/usememos/memos/commit/7ac9989d43f3967b466f340da3841290d86b20f1))
* **map:** refine Leaflet controls and memo map styling ([894b3eb](https://github.com/usememos/memos/commit/894b3eb045c7d2c2acce847c34a85295c909dcf7))
* **markdown:** support height/width attributes on img elements ([737acbb](https://github.com/usememos/memos/commit/737acbba2f5e3dd911da3a77d2d5d1cde1bf8ba1))
* **memo-editor:** scope Cmd+Enter save to the active editor ([#5745](https://github.com/usememos/memos/issues/5745)) ([05810e7](https://github.com/usememos/memos/commit/05810e7882cb03d448d9d8fa84bc6ca54eafbed0))
* **mysql:** handle CreateMemo custom timestamps with FROM_UNIXTIME ([#5673](https://github.com/usememos/memos/issues/5673)) ([09d73e8](https://github.com/usememos/memos/commit/09d73e8b6e16c43a61767817909a472916c83daa))
* normalize attachment MIME types before validation ([c3e7e2c](https://github.com/usememos/memos/commit/c3e7e2c316d01bf857931c38303efc87307f2a19))
* preserve draft content when tab is suspended or editor remounts ([9ca7122](https://github.com/usememos/memos/commit/9ca71229a6c0dfad44b76ed06fced46c5bef49c7))
* prevent local attachment uploads from overwriting files ([4add9b0](https://github.com/usememos/memos/commit/4add9b04ad5d0b7608c985281f5975dc39f9a572))
* prevent stale comment drafts from being restored ([e520b63](https://github.com/usememos/memos/commit/e520b637fd8d0f6331674003abe72f9dfbae8231))
* remove duplicate Japanese locale keys ([efeb28c](https://github.com/usememos/memos/commit/efeb28c872a2bd6edd28fa3b68bd0b15af923d50))
* render audio attachments as inline players ([#5699](https://github.com/usememos/memos/issues/5699)) ([2ccb98a](https://github.com/usememos/memos/commit/2ccb98a6cbc40544e81eeeca2a2cbbaf8348f45e))
* restrict archived memo access to creator only ([#5707](https://github.com/usememos/memos/issues/5707)) ([f4154d0](https://github.com/usememos/memos/commit/f4154d090be3896c8e0dd83440f24953bbeb308c))
* **routing:** redirect unauthenticated users to /explore when public visibility is allowed ([98859eb](https://github.com/usememos/memos/commit/98859eb5e5065a7c12ada983b7c38c5af5035bb6))
* **server:** close SSE clients during shutdown ([a5ddd5a](https://github.com/usememos/memos/commit/a5ddd5adafef282f00b23e00e145119d4316f24f))
* sync html lang attribute with active locale ([#5753](https://github.com/usememos/memos/issues/5753)) ([be00abe](https://github.com/usememos/memos/commit/be00abe852479820b7c574e15e276d70961ab7bd))
* tag parsing truncates emojis with variation selectors ([#5496](https://github.com/usememos/memos/issues/5496)) ([3ea6ea3](https://github.com/usememos/memos/commit/3ea6ea3108f58dc34f39fa6f21d761bd2e97732b))
* **tags:** allow blur-only tag metadata ([#5800](https://github.com/usememos/memos/issues/5800)) ([1921b57](https://github.com/usememos/memos/commit/1921b57662c2129d179930f71e5c42caf9070a19))
* toggle focus mode do not reset editor height ([#5504](https://github.com/usememos/memos/issues/5504)) ([0729779](https://github.com/usememos/memos/commit/0729779e0427c68bdbc5b6b711a5683f66ba9bbc))
* **ui:** show comment editor above the comment list ([#5662](https://github.com/usememos/memos/issues/5662)) ([6b0736b](https://github.com/usememos/memos/commit/6b0736b29325ff7698b7395dc761f2ca41e6521c))
* **ui:** unify metadata component styles across MemoView and MemoEditor ([664b8c5](https://github.com/usememos/memos/commit/664b8c56290026ba2beb7b75db24c684824b8670))
* unify live photo previews around LIVE badge playback ([6b0487d](https://github.com/usememos/memos/commit/6b0487dcd857ba72189ca0624cb4985961f08f25))
* **webhooks:** trigger memo updates for attachment and relation changes ([#5795](https://github.com/usememos/memos/issues/5795)) ([acbc914](https://github.com/usememos/memos/commit/acbc914dea8d4e533028b03929193a4af1ac32b4))
* **web:** prevent MemoContent prop leaks ([22519b5](https://github.com/usememos/memos/commit/22519b57a0a971ab927a03015c994c63b8c3f1da))
* **web:** refine attachment media layout ([a0d83e1](https://github.com/usememos/memos/commit/a0d83e1a9e9d0ba50a0103e594adb011728faf8c))
* **web:** refresh memo detail cache after editor save ([333c9df](https://github.com/usememos/memos/commit/333c9df233240a843a9e62d17c6ff464690636f8))
* **web:** use BroadcastChannel to sync token refreshes across tabs ([bbdc998](https://github.com/usememos/memos/commit/bbdc998646e8093223a448378a2c29690f0d8612))
### Performance Improvements
* batch load memo relations when listing memos ([#5692](https://github.com/usememos/memos/issues/5692)) ([1e82714](https://github.com/usememos/memos/commit/1e82714a52c72455a6ba02605cc641d7ad4fbf1a))
+1 -1
View File
@@ -1,2 +1,2 @@
# These owners will be the default owners for everything in the repo.
* @boojack @lqwakeup
* @usememos/moderators
-31
View File
@@ -1,31 +0,0 @@
# Build frontend dist.
FROM node:16.15.0-alpine AS frontend
WORKDIR /frontend-build
COPY ./web/ .
RUN yarn
RUN yarn build
# Build backend exec file.
FROM golang:1.18.3-alpine3.16 AS backend
WORKDIR /backend-build
RUN apk update
RUN apk --no-cache add gcc musl-dev
COPY . .
COPY --from=frontend /frontend-build/dist ./server/dist
RUN go build -o memos ./bin/server/main.go
# Make workspace with above generated files.
FROM alpine:3.16.0 AS monolithic
WORKDIR /usr/local/memos
COPY --from=backend /backend-build/memos /usr/local/memos/
# Directory to store the data, which can be referenced as the mounting point.
RUN mkdir -p /var/opt/memos
ENTRYPOINT ["./memos", "--mode", "prod", "--port", "5230"]
+1 -1
View File
@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2022 Memos
Copyright (c) 2025 Memos
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+61 -29
View File
@@ -1,49 +1,81 @@
<p align="center"><a href="https://usememos.com"><img height="64px" src="https://raw.githubusercontent.com/usememos/memos/main/resources/logo-full.webp" alt="✍️ memos" /></a></p>
> ✨ Featured Sponsor: [CodeRabbit](https://coderabbit.link/usememos) — Cut code review time & bugs in half, instantly.
<p align="center">An open source, self-hosted knowledge base that works with a SQLite db file.</p>
# Memos
<p align="center">
<a href="https://github.com/usememos/memos/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/usememos/memos" /></a>
<a href="https://hub.docker.com/r/neosmemo/memos"><img alt="Docker pull" src="https://img.shields.io/docker/pulls/neosmemo/memos.svg" /></a>
<img alt="Go report" src="https://goreportcard.com/badge/github.com/usememos/memos" />
</p>
<img align="right" height="96px" src="https://raw.githubusercontent.com/usememos/.github/refs/heads/main/assets/logo-rounded.png" alt="Memos" />
<p align="center">
<a href="https://demo.usememos.com/">Live Demo</a> •
<a href="https://t.me/+-_tNF1k70UU4ZTc9">Discuss in Telegram 👾</a>
</p>
Memos is an open-source, self-hosted note-taking app built for quick capture. It is Markdown-native, lightweight, and keeps your data under your control.
![demo](https://raw.githubusercontent.com/usememos/memos/main/resources/demo.webp)
[![Home](https://img.shields.io/badge/🏠-usememos.com-blue?style=flat-square)](https://usememos.com)
[![Live Demo](https://img.shields.io/badge/✨-Try%20Demo-orange?style=flat-square)](https://demo.usememos.com/)
[![Docs](https://img.shields.io/badge/📚-Documentation-green?style=flat-square)](https://usememos.com/docs)
[![Discord](https://img.shields.io/badge/💬-Discord-5865f2?style=flat-square&logo=discord&logoColor=white)](https://discord.gg/tfPJa4UmAv)
[![Docker Pulls](https://img.shields.io/docker/pulls/neosmemo/memos?style=flat-square&logo=docker)](https://hub.docker.com/r/neosmemo/memos)
<img src="https://raw.githubusercontent.com/usememos/.github/refs/heads/main/assets/demo.png" alt="Memos Demo Screenshot" height="512" />
## Features
- 🦄 Fully open source;
- 📜 Writing in plain textarea without any burden,
- and support some useful markdown syntax 💪.
- 🌄 Share the memo in a pretty image or personal page like Twitter;
- 🚀 Fast self-hosting with `Docker`;
- 🤠 Pleasant UI and UX;
- **Capture quickly** — A timeline-first interface keeps note-taking simple: open, write, and move on.
- **Own your data** — Self-host Memos on your infrastructure with no telemetry.
- **Deploy anywhere** — Run a single Go binary or Docker container with SQLite, MySQL, or PostgreSQL.
- **Integrate freely** — Build on the REST and gRPC APIs or adapt the MIT-licensed source to your needs.
## Deploy with Docker
## Quick Start
### Docker Run
Want to explore Memos first? Open the [live demo](https://demo.usememos.com/).
```docker
docker run -d --name memos -p 5230:5230 -v ~/.memos/:/var/opt/memos neosmemo/memos:latest
### Docker (Recommended)
```bash
docker run -d \
--name memos \
-p 5230:5230 \
-v ~/.memos:/var/opt/memos \
neosmemo/memos:stable
```
Memos should be running at [http://localhost:5230](http://localhost:5230). If the `~/.memos/` does not have a `memos_prod.db` file, then memos will auto generate it.
Open `http://localhost:5230` and start writing.
### Docker Compose
### Native Binary
See more in the example [`docker-compose.yaml`](./docker-compose.yaml) file.
```bash
curl -fsSL https://raw.githubusercontent.com/usememos/memos/main/scripts/install.sh | sh
```
### Other Installation Methods
- **Docker Compose** — Recommended for production deployments.
- **Kubernetes** — Helm charts and manifests are available.
- **Build from source** — Best for development and customization.
See the [deployment guide](https://usememos.com/docs/deploy) for detailed instructions.
## Web Clipper
Save pages, selected text, and images directly to your Memos instance with the official [Memos Web Clipper](https://github.com/usememos/web-clipper). The extension is available for [Chrome](https://chromewebstore.google.com/detail/memos-web-clipper/nebaoebnljalfegiidibihhkebeiklbl) and [Firefox](https://addons.mozilla.org/en-US/firefox/addon/memos-web-clipper/), and lets you review each clip, choose its visibility, and customize its Markdown format before saving.
## Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated. 🥰
Contributions of all kinds are welcome, including bug reports, feature suggestions, pull requests, documentation, and translations.
Gets more about [development guide](https://github.com/usememos/memos/tree/main/docs/development.md).
- [Report bugs](https://github.com/usememos/memos/issues/new?template=bug_report.md)
- [Suggest features](https://github.com/usememos/memos/issues/new?template=feature_request.md)
- [Submit pull requests](https://github.com/usememos/memos/pulls)
- [Improve documentation](https://github.com/usememos/dotcom)
- [Help with translations](https://github.com/usememos/memos/tree/main/web/src/locales)
## Star history
## Sponsors
[![Star History Chart](https://api.star-history.com/svg?repos=usememos/memos&type=Date)](https://star-history.com/#usememos/memos&Date)
- [**CodeRabbit** — Cut code review time and bugs in half](https://coderabbit.link/usememos)
- [**SSD Nodes** — Affordable VPS hosting for self-hosters](https://ssdnodes.com/?utm_source=memos&utm_medium=sponsor)
Love Memos? [Sponsor us on GitHub](https://github.com/sponsors/usememos) to help keep the project growing!
## License
Memos is open-source software licensed under the [MIT License](LICENSE). See our [Privacy Policy](https://usememos.com/privacy) for details on data handling.
---
**[Website](https://usememos.com)** • **[Documentation](https://usememos.com/docs)** • **[Demo](https://demo.usememos.com/)** • **[Discord](https://discord.gg/tfPJa4UmAv)** • **[X/Twitter](https://x.com/usememos)**
+41
View File
@@ -0,0 +1,41 @@
# Security Policy
## Supported Versions
Memos is currently a `0.x` project. Security fixes are only provided for the latest release. Older releases are not supported for security updates, and fixes are not backported.
If you run Memos in production, keep your instance updated to the latest release.
## Reporting a Vulnerability
Please report security issues privately by email: `dev@usememos.com`
Do not open public GitHub issues, discussions, or pull requests for suspected vulnerabilities.
Please include:
- A clear description of the issue
- Steps to reproduce
- Affected version or commit
- Deployment details that matter to reproduction
- Your assessment of impact
We will review reports as time permits and fix valid issues in regular releases.
## Disclosure and CVEs
Memos is self-hosted software and is still in the `0.x` stage. At this stage, we do not run a formal disclosure program, publish separate security advisories for every issue, or request CVE IDs.
Security fixes may be shipped directly in normal releases or noted briefly in release notes and changelogs.
## Self-Hosted Deployment Notes
The security posture of a Memos instance depends heavily on how it is deployed and operated. In particular:
- Keep Memos updated
- Put it behind a properly configured reverse proxy when exposed to the internet
- Require authentication for any non-public deployment
- Use TLS in production
- Limit access to trusted users and administrators
Reports that depend entirely on intentionally unsafe deployment choices, unsupported local patches, or administrator actions may be treated as deployment issues rather than product vulnerabilities.
-21
View File
@@ -1,21 +0,0 @@
package api
// RowStatus is the status for a row.
type RowStatus string
const (
// Normal is the status for a normal row.
Normal RowStatus = "NORMAL"
// Archived is the status for an archived row.
Archived RowStatus = "ARCHIVED"
)
func (e RowStatus) String() string {
switch e {
case Normal:
return "NORMAL"
case Archived:
return "ARCHIVED"
}
return ""
}
-13
View File
@@ -1,13 +0,0 @@
package api
type Signin struct {
Email string `json:"email"`
Password string `json:"password"`
}
type Signup struct {
Email string `json:"email"`
Role Role `json:"role"`
Name string `json:"name"`
Password string `json:"password"`
}
-22
View File
@@ -1,22 +0,0 @@
package api
// CacheNamespace is the type of a cache.
type CacheNamespace string
const (
// UserCache is the cache type of users.
UserCache CacheNamespace = "u"
// MemoCache is the cache type of memos.
MemoCache CacheNamespace = "m"
// ShortcutCache is the cache type of shortcuts.
ShortcutCache CacheNamespace = "s"
// ResourceCache is the cache type of resources.
ResourceCache CacheNamespace = "r"
)
// CacheService is the service for caches.
type CacheService interface {
FindCache(namespace CacheNamespace, id int, entry interface{}) (bool, error)
UpsertCache(namespace CacheNamespace, id int, entry interface{}) error
DeleteCache(namespace CacheNamespace, id int)
}
-85
View File
@@ -1,85 +0,0 @@
package api
// Visibility is the type of a visibility.
type Visibility string
const (
// Public is the PUBLIC visibility.
Public Visibility = "PUBLIC"
// Protected is the PROTECTED visibility.
Protected Visibility = "PROTECTED"
// Privite is the PRIVATE visibility.
Privite Visibility = "PRIVATE"
)
func (e Visibility) String() string {
switch e {
case Public:
return "PUBLIC"
case Protected:
return "PROTECTED"
case Privite:
return "PRIVATE"
}
return "PRIVATE"
}
type Memo struct {
ID int `json:"id"`
// Standard fields
RowStatus RowStatus `json:"rowStatus"`
CreatorID int `json:"creatorId"`
CreatedTs int64 `json:"createdTs"`
UpdatedTs int64 `json:"updatedTs"`
// Domain specific fields
Content string `json:"content"`
Visibility Visibility `json:"visibility"`
Pinned bool `json:"pinned"`
// Related fields
Creator *User `json:"creator"`
}
type MemoCreate struct {
// Standard fields
CreatorID int
// Domain specific fields
Visibility Visibility `json:"visibility"`
Content string `json:"content"`
}
type MemoPatch struct {
ID int
// Standard fields
CreatedTs *int64 `json:"createdTs"`
RowStatus *RowStatus `json:"rowStatus"`
// Domain specific fields
Content *string `json:"content"`
Visibility *Visibility `json:"visibility"`
}
type MemoFind struct {
ID *int `json:"id"`
// Standard fields
RowStatus *RowStatus `json:"rowStatus"`
CreatorID *int `json:"creatorId"`
// Domain specific fields
Pinned *bool
ContentSearch *string
VisibilityList []Visibility
// Pagination
Limit int
Offset int
}
type MemoDelete struct {
ID int `json:"id"`
}
-21
View File
@@ -1,21 +0,0 @@
package api
type MemoOrganizer struct {
ID int
// Domain specific fields
MemoID int
UserID int
Pinned bool
}
type MemoOrganizerFind struct {
MemoID int
UserID int
}
type MemoOrganizerUpsert struct {
MemoID int
UserID int
Pinned bool `json:"pinned"`
}
-44
View File
@@ -1,44 +0,0 @@
package api
type Resource struct {
ID int `json:"id"`
// Standard fields
CreatorID int `json:"creatorId"`
CreatedTs int64 `json:"createdTs"`
UpdatedTs int64 `json:"updatedTs"`
// Domain specific fields
Filename string `json:"filename"`
Blob []byte `json:"-"`
Type string `json:"type"`
Size int64 `json:"size"`
}
type ResourceCreate struct {
// Standard fields
CreatorID int
// Domain specific fields
Filename string `json:"filename"`
Blob []byte `json:"blob"`
Type string `json:"type"`
Size int64 `json:"size"`
}
type ResourceFind struct {
ID *int `json:"id"`
// Standard fields
CreatorID *int `json:"creatorId"`
// Domain specific fields
Filename *string `json:"filename"`
}
type ResourceDelete struct {
ID int
// Standard fields
CreatorID int
}
-49
View File
@@ -1,49 +0,0 @@
package api
type Shortcut struct {
ID int `json:"id"`
// Standard fields
RowStatus RowStatus `json:"rowStatus"`
CreatorID int `json:"creatorId"`
CreatedTs int64 `json:"createdTs"`
UpdatedTs int64 `json:"updatedTs"`
// Domain specific fields
Title string `json:"title"`
Payload string `json:"payload"`
}
type ShortcutCreate struct {
// Standard fields
CreatorID int
// Domain specific fields
Title string `json:"title"`
Payload string `json:"payload"`
}
type ShortcutPatch struct {
ID int
// Standard fields
RowStatus *RowStatus `json:"rowStatus"`
// Domain specific fields
Title *string `json:"title"`
Payload *string `json:"payload"`
}
type ShortcutFind struct {
ID *int
// Standard fields
CreatorID *int
// Domain specific fields
Title *string `json:"title"`
}
type ShortcutDelete struct {
ID int
}
-8
View File
@@ -1,8 +0,0 @@
package api
import "github.com/usememos/memos/server/profile"
type SystemStatus struct {
Host *User `json:"host"`
Profile *profile.Profile `json:"profile"`
}
-100
View File
@@ -1,100 +0,0 @@
package api
import (
"fmt"
"github.com/usememos/memos/common"
)
// Role is the type of a role.
type Role string
const (
// Host is the HOST role.
Host Role = "HOST"
// NormalUser is the USER role.
NormalUser Role = "USER"
)
func (e Role) String() string {
switch e {
case Host:
return "HOST"
case NormalUser:
return "USER"
}
return "USER"
}
type User struct {
ID int `json:"id"`
// Standard fields
RowStatus RowStatus `json:"rowStatus"`
CreatedTs int64 `json:"createdTs"`
UpdatedTs int64 `json:"updatedTs"`
// Domain specific fields
Email string `json:"email"`
Role Role `json:"role"`
Name string `json:"name"`
PasswordHash string `json:"-"`
OpenID string `json:"openId"`
UserSettingList []*UserSetting `json:"userSettingList"`
}
type UserCreate struct {
// Domain specific fields
Email string `json:"email"`
Role Role `json:"role"`
Name string `json:"name"`
Password string `json:"password"`
PasswordHash string
OpenID string
}
func (create UserCreate) Validate() error {
if !common.ValidateEmail(create.Email) {
return fmt.Errorf("invalid email format")
}
if len(create.Email) < 6 {
return fmt.Errorf("email is too short, minimum length is 6")
}
if len(create.Password) < 6 {
return fmt.Errorf("password is too short, minimum length is 6")
}
return nil
}
type UserPatch struct {
ID int
// Standard fields
RowStatus *RowStatus `json:"rowStatus"`
// Domain specific fields
Email *string `json:"email"`
Name *string `json:"name"`
Password *string `json:"password"`
ResetOpenID *bool `json:"resetOpenId"`
PasswordHash *string
OpenID *string
}
type UserFind struct {
ID *int `json:"id"`
// Standard fields
RowStatus *RowStatus `json:"rowStatus"`
// Domain specific fields
Email *string `json:"email"`
Role *Role
Name *string `json:"name"`
OpenID *string
}
type UserDelete struct {
ID int
}
-114
View File
@@ -1,114 +0,0 @@
package api
import (
"encoding/json"
"fmt"
)
type UserSettingKey string
const (
// UserSettingLocaleKey is the key type for user locale.
UserSettingLocaleKey UserSettingKey = "locale"
// UserSettingMemoVisibilityKey is the key type for user preference memo default visibility.
UserSettingMemoVisibilityKey UserSettingKey = "memoVisibility"
// UserSettingEditorFontStyleKey is the key type for editor font style.
UserSettingEditorFontStyleKey UserSettingKey = "editorFontStyle"
)
// String returns the string format of UserSettingKey type.
func (key UserSettingKey) String() string {
switch key {
case UserSettingLocaleKey:
return "locale"
case UserSettingMemoVisibilityKey:
return "memoVisibility"
case UserSettingEditorFontStyleKey:
return "editorFontFamily"
}
return ""
}
var (
UserSettingLocaleValue = []string{"en", "zh"}
UserSettingMemoVisibilityValue = []Visibility{Privite, Protected, Public}
UserSettingEditorFontStyleValue = []string{"normal", "mono"}
)
type UserSetting struct {
UserID int
Key UserSettingKey `json:"key"`
// Value is a JSON string with basic value
Value string `json:"value"`
}
type UserSettingUpsert struct {
UserID int
Key UserSettingKey `json:"key"`
Value string `json:"value"`
}
func (upsert UserSettingUpsert) Validate() error {
if upsert.Key == UserSettingLocaleKey {
localeValue := "en"
err := json.Unmarshal([]byte(upsert.Value), &localeValue)
if err != nil {
return fmt.Errorf("failed to unmarshal user setting locale value")
}
invalid := true
for _, value := range UserSettingLocaleValue {
if localeValue == value {
invalid = false
break
}
}
if invalid {
return fmt.Errorf("invalid user setting locale value")
}
} else if upsert.Key == UserSettingMemoVisibilityKey {
memoVisibilityValue := Privite
err := json.Unmarshal([]byte(upsert.Value), &memoVisibilityValue)
if err != nil {
return fmt.Errorf("failed to unmarshal user setting memo visibility value")
}
invalid := true
for _, value := range UserSettingMemoVisibilityValue {
if memoVisibilityValue == value {
invalid = false
break
}
}
if invalid {
return fmt.Errorf("invalid user setting memo visibility value")
}
} else if upsert.Key == UserSettingEditorFontStyleKey {
editorFontStyleValue := "normal"
err := json.Unmarshal([]byte(upsert.Value), &editorFontStyleValue)
if err != nil {
return fmt.Errorf("failed to unmarshal user setting editor font style")
}
invalid := true
for _, value := range UserSettingEditorFontStyleValue {
if editorFontStyleValue == value {
invalid = false
break
}
}
if invalid {
return fmt.Errorf("invalid user setting editor font style value")
}
} else {
return fmt.Errorf("invalid user setting key")
}
return nil
}
type UserSettingFind struct {
UserID int
Key *UserSettingKey `json:"key"`
}
-74
View File
@@ -1,74 +0,0 @@
package main
import (
"os"
_ "github.com/mattn/go-sqlite3"
"context"
"fmt"
"github.com/usememos/memos/server"
"github.com/usememos/memos/server/profile"
"github.com/usememos/memos/store"
DB "github.com/usememos/memos/store/db"
)
const (
greetingBanner = `
███╗ ███╗███████╗███╗ ███╗ ██████╗ ███████╗
████╗ ████║██╔════╝████╗ ████║██╔═══██╗██╔════╝
██╔████╔██║█████╗ ██╔████╔██║██║ ██║███████╗
██║╚██╔╝██║██╔══╝ ██║╚██╔╝██║██║ ██║╚════██║
██║ ╚═╝ ██║███████╗██║ ╚═╝ ██║╚██████╔╝███████║
╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝
`
)
func run(profile *profile.Profile) error {
ctx := context.Background()
db := DB.NewDB(profile)
if err := db.Open(ctx); err != nil {
return fmt.Errorf("cannot open db: %w", err)
}
s := server.NewServer(profile)
storeInstance := store.New(db.Db, profile)
s.Store = storeInstance
println(greetingBanner)
fmt.Printf("Version %s has started at :%d\n", profile.Version, profile.Port)
return s.Run()
}
func execute() error {
profile, err := profile.GetProfile()
if err != nil {
return err
}
println("---")
println("profile")
println("mode:", profile.Mode)
println("port:", profile.Port)
println("dsn:", profile.DSN)
println("version:", profile.Version)
println("---")
if err := run(profile); err != nil {
fmt.Printf("error: %+v\n", err)
return err
}
return nil
}
func main() {
if err := execute(); err != nil {
os.Exit(1)
}
}
+28
View File
@@ -0,0 +1,28 @@
package main
import (
"io"
"log/slog"
"strings"
"github.com/pkg/errors"
)
func parseSlogLevel(s string) (slog.Level, error) {
switch strings.ToLower(s) {
case "debug":
return slog.LevelDebug, nil
case "info":
return slog.LevelInfo, nil
case "warn":
return slog.LevelWarn, nil
case "error":
return slog.LevelError, nil
default:
return slog.LevelInfo, errors.Errorf("unknown log level %q: must be debug, info, warn, or error", s)
}
}
func newLogger(level slog.Level, w io.Writer) *slog.Logger {
return slog.New(slog.NewTextHandler(w, &slog.HandlerOptions{Level: level}))
}
+107
View File
@@ -0,0 +1,107 @@
package main
import (
"bytes"
"context"
"log/slog"
"strings"
"testing"
)
func TestParseSlogLevel(t *testing.T) {
tests := []struct {
input string
wantLevel slog.Level
wantErr bool
}{
{"debug", slog.LevelDebug, false},
{"info", slog.LevelInfo, false},
{"warn", slog.LevelWarn, false},
{"error", slog.LevelError, false},
{"DEBUG", slog.LevelDebug, false},
{"INFO", slog.LevelInfo, false},
{"WARN", slog.LevelWarn, false},
{"ERROR", slog.LevelError, false},
{"invalid", slog.LevelInfo, true},
{"", slog.LevelInfo, true},
}
for _, tt := range tests {
t.Run(tt.input, func(t *testing.T) {
got, err := parseSlogLevel(tt.input)
if (err != nil) != tt.wantErr {
t.Errorf("parseSlogLevel(%q) error = %v, wantErr %v", tt.input, err, tt.wantErr)
}
if got != tt.wantLevel {
t.Errorf("parseSlogLevel(%q) = %v, want %v", tt.input, got, tt.wantLevel)
}
})
}
}
func TestNewLoggerLevelFiltering(t *testing.T) {
tests := []struct {
level slog.Level
logAt slog.Level
msg string
shouldAppear bool
}{
// debug passes all
{slog.LevelDebug, slog.LevelDebug, "debug-msg", true},
{slog.LevelDebug, slog.LevelInfo, "info-msg", true},
{slog.LevelDebug, slog.LevelWarn, "warn-msg", true},
{slog.LevelDebug, slog.LevelError, "error-msg", true},
// info suppresses debug
{slog.LevelInfo, slog.LevelDebug, "debug-suppressed", false},
{slog.LevelInfo, slog.LevelInfo, "info-visible", true},
{slog.LevelInfo, slog.LevelWarn, "warn-visible", true},
// warn suppresses debug+info
{slog.LevelWarn, slog.LevelDebug, "debug-suppressed", false},
{slog.LevelWarn, slog.LevelInfo, "info-suppressed", false},
{slog.LevelWarn, slog.LevelWarn, "warn-visible", true},
{slog.LevelWarn, slog.LevelError, "error-visible", true},
// error suppresses everything below
{slog.LevelError, slog.LevelDebug, "debug-suppressed", false},
{slog.LevelError, slog.LevelInfo, "info-suppressed", false},
{slog.LevelError, slog.LevelWarn, "warn-suppressed", false},
{slog.LevelError, slog.LevelError, "error-visible", true},
}
for _, tt := range tests {
var buf bytes.Buffer
logger := newLogger(tt.level, &buf)
logger.Log(context.TODO(), tt.logAt, tt.msg)
appeared := strings.Contains(buf.String(), tt.msg)
if appeared != tt.shouldAppear {
t.Errorf("level=%s logAt=%s msg=%q: appeared=%v want=%v",
tt.level, tt.logAt, tt.msg, appeared, tt.shouldAppear)
}
}
}
func TestNewLoggerOutputFormat(t *testing.T) {
var buf bytes.Buffer
logger := newLogger(slog.LevelDebug, &buf)
logger.Info("hello-world", "key", "value")
out := buf.String()
if !strings.Contains(out, "hello-world") {
t.Errorf("expected message in output, got: %s", out)
}
if !strings.Contains(out, "key=value") {
t.Errorf("expected key=value attr in output, got: %s", out)
}
if !strings.Contains(out, "INFO") {
t.Errorf("expected level in output, got: %s", out)
}
}
func TestNewLoggerDoesNotMutateGlobalDefault(t *testing.T) {
original := slog.Default()
var buf bytes.Buffer
_ = newLogger(slog.LevelError, &buf)
if slog.Default() != original {
t.Error("newLogger must not change slog.Default()")
}
}
+218
View File
@@ -0,0 +1,218 @@
package main
import (
"context"
"fmt"
"log/slog"
"net/http"
"os"
"os/signal"
"strings"
"syscall"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/usememos/memos/internal/profile"
"github.com/usememos/memos/internal/version"
"github.com/usememos/memos/internal/webhook"
"github.com/usememos/memos/server"
"github.com/usememos/memos/store"
"github.com/usememos/memos/store/db"
)
func initSlogDefault() {
level, err := parseSlogLevel(viper.GetString("log-level"))
if err != nil {
slog.Warn("invalid log-level value, defaulting to info", "error", err)
}
slog.SetDefault(newLogger(level, os.Stderr))
}
var (
rootCmd = &cobra.Command{
Use: "memos",
Short: `An open source, lightweight note-taking service. Easily capture and share your great thoughts.`,
Run: func(_ *cobra.Command, _ []string) {
instanceProfile := &profile.Profile{
Demo: viper.GetBool("demo"),
Addr: viper.GetString("addr"),
Port: viper.GetInt("port"),
UNIXSock: viper.GetString("unix-sock"),
Data: viper.GetString("data"),
Driver: viper.GetString("driver"),
DSN: viper.GetString("dsn"),
InstanceURL: viper.GetString("instance-url"),
}
instanceProfile.Version = version.GetCurrentVersion()
instanceProfile.Commit = version.Commit
webhook.AllowPrivateIPs = viper.GetBool("allow-private-webhooks")
if err := instanceProfile.Validate(); err != nil {
slog.Error("failed to validate profile", "error", err)
return
}
ctx, cancel := context.WithCancel(context.Background())
dbDriver, err := db.NewDBDriver(instanceProfile)
if err != nil {
cancel()
slog.Error("failed to create db driver", "error", err)
return
}
storeInstance := store.New(dbDriver, instanceProfile)
if err := storeInstance.Migrate(ctx); err != nil {
cancel()
slog.Error("failed to migrate", "error", err)
return
}
if err := storeInstance.LoadDeploymentConfiguration(ctx); err != nil {
cancel()
slog.Error("failed to load deployment configuration", "error", err)
return
}
s, err := server.NewServer(ctx, instanceProfile, storeInstance)
if err != nil {
cancel()
slog.Error("failed to create server", "error", err)
return
}
c := make(chan os.Signal, 1)
// Trigger graceful shutdown on SIGINT or SIGTERM.
// The default signal sent by the `kill` command is SIGTERM,
// which is taken as the graceful shutdown signal for many systems, eg., Kubernetes, Gunicorn.
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
if err := s.Start(ctx); err != nil {
if err != http.ErrServerClosed {
slog.Error("failed to start server", "error", err)
cancel()
return
}
}
printGreetings(instanceProfile)
go func() {
<-c
s.Shutdown(ctx)
cancel()
}()
// Wait for CTRL-C.
<-ctx.Done()
},
}
versionCmd = &cobra.Command{
Use: "version",
Short: "Print the current Memos version",
Run: func(_ *cobra.Command, _ []string) {
fmt.Println(version.GetCurrentVersion())
},
}
)
func init() {
cobra.OnInitialize(initSlogDefault)
viper.SetDefault("demo", false)
viper.SetDefault("driver", "sqlite")
viper.SetDefault("port", 8081)
rootCmd.PersistentFlags().Bool("demo", false, "enable demo mode")
rootCmd.PersistentFlags().String("addr", "", "address of server")
rootCmd.PersistentFlags().Int("port", 8081, "port of server")
rootCmd.PersistentFlags().String("unix-sock", "", "path to the unix socket, overrides --addr and --port")
rootCmd.PersistentFlags().String("data", "", "data directory")
rootCmd.PersistentFlags().String("driver", "sqlite", "database driver")
rootCmd.PersistentFlags().String("dsn", "", "database source name(aka. DSN)")
rootCmd.PersistentFlags().String("instance-url", "", "the url of your memos instance")
rootCmd.PersistentFlags().Bool("allow-private-webhooks", false, "allow webhook URLs to resolve to private/reserved IP addresses")
rootCmd.PersistentFlags().String("log-level", "info", "log verbosity level (debug, info, warn, error)")
if err := viper.BindPFlag("demo", rootCmd.PersistentFlags().Lookup("demo")); err != nil {
panic(err)
}
if err := viper.BindPFlag("addr", rootCmd.PersistentFlags().Lookup("addr")); err != nil {
panic(err)
}
if err := viper.BindPFlag("port", rootCmd.PersistentFlags().Lookup("port")); err != nil {
panic(err)
}
if err := viper.BindPFlag("unix-sock", rootCmd.PersistentFlags().Lookup("unix-sock")); err != nil {
panic(err)
}
if err := viper.BindPFlag("data", rootCmd.PersistentFlags().Lookup("data")); err != nil {
panic(err)
}
if err := viper.BindPFlag("driver", rootCmd.PersistentFlags().Lookup("driver")); err != nil {
panic(err)
}
if err := viper.BindPFlag("dsn", rootCmd.PersistentFlags().Lookup("dsn")); err != nil {
panic(err)
}
if err := viper.BindPFlag("instance-url", rootCmd.PersistentFlags().Lookup("instance-url")); err != nil {
panic(err)
}
if err := viper.BindPFlag("allow-private-webhooks", rootCmd.PersistentFlags().Lookup("allow-private-webhooks")); err != nil {
panic(err)
}
if err := viper.BindPFlag("log-level", rootCmd.PersistentFlags().Lookup("log-level")); err != nil {
panic(err)
}
viper.SetEnvPrefix("memos")
viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_"))
viper.AutomaticEnv()
rootCmd.AddCommand(versionCmd)
}
func printGreetings(profile *profile.Profile) {
fmt.Printf("Memos %s started successfully!\n", profile.Version)
if profile.Demo {
fmt.Fprint(os.Stderr, "Development mode is enabled\n")
if profile.DSN != "" {
fmt.Fprintf(os.Stderr, "Database: %s\n", profile.DSN)
}
}
// Server information
fmt.Printf("Data directory: %s\n", profile.Data)
fmt.Printf("Database driver: %s\n", profile.Driver)
// Connection information
if len(profile.UNIXSock) == 0 {
if len(profile.Addr) == 0 {
fmt.Printf("Server running on port %d\n", profile.Port)
fmt.Printf("Access your memos at: http://localhost:%d\n", profile.Port)
} else {
fmt.Printf("Server running on %s:%d\n", profile.Addr, profile.Port)
fmt.Printf("Access your memos at: http://%s:%d\n", profile.Addr, profile.Port)
}
} else {
fmt.Printf("Server running on unix socket: %s\n", profile.UNIXSock)
}
// Access mode is derived from instance_url: set = public, unset = private.
accessMode := "private"
if profile.AllowAnonymous() {
accessMode = "public"
}
fmt.Printf("Access mode: %s\n", accessMode)
fmt.Println()
fmt.Printf("Documentation: %s\n", "https://usememos.com")
fmt.Printf("Source code: %s\n", "https://github.com/usememos/memos")
fmt.Println("\nHappy note-taking!")
}
func main() {
if err := rootCmd.Execute(); err != nil {
os.Exit(1)
}
}
-72
View File
@@ -1,72 +0,0 @@
package common
import (
"errors"
)
// Code is the error code.
type Code int
// Application error codes.
const (
// 0 ~ 99 general error.
Ok Code = 0
Internal Code = 1
NotAuthorized Code = 2
Invalid Code = 3
NotFound Code = 4
Conflict Code = 5
NotImplemented Code = 6
)
// Error represents an application-specific error. Application errors can be
// unwrapped by the caller to extract out the code & message.
//
// Any non-application error (such as a disk error) should be reported as an
// Internal error and the human user should only see "Internal error" as the
// message. These low-level internal error details should only be logged and
// reported to the operator of the application (not the end user).
type Error struct {
// Machine-readable error code.
Code Code
// Embedded error.
Err error
}
// Error implements the error interface. Not used by the application otherwise.
func (e *Error) Error() string {
return e.Err.Error()
}
// ErrorCode unwraps an application error and returns its code.
// Non-application errors always return EINTERNAL.
func ErrorCode(err error) Code {
var e *Error
if err == nil {
return Ok
} else if errors.As(err, &e) {
return e.Code
}
return Internal
}
// ErrorMessage unwraps an application error and returns its message.
// Non-application errors always return "Internal error".
func ErrorMessage(err error) string {
var e *Error
if err == nil {
return ""
} else if errors.As(err, &e) {
return e.Err.Error()
}
return "Internal error."
}
// Errorf is a helper function to return an Error with a given code and error.
func Errorf(code Code, err error) *Error {
return &Error{
Code: code,
Err: err,
}
}
-30
View File
@@ -1,30 +0,0 @@
package common
import (
"net/mail"
"strings"
"github.com/google/uuid"
)
// HasPrefixes returns true if the string s has any of the given prefixes.
func HasPrefixes(src string, prefixes ...string) bool {
for _, prefix := range prefixes {
if strings.HasPrefix(src, prefix) {
return true
}
}
return false
}
// ValidateEmail validates the email.
func ValidateEmail(email string) bool {
if _, err := mail.ParseAddress(email); err != nil {
return false
}
return true
}
func GenUUID() string {
return uuid.New().String()
}
-67
View File
@@ -1,67 +0,0 @@
package common
import (
"strconv"
"strings"
)
// Version is the service current released version.
// Semantic versioning: https://semver.org/
var Version = "0.4.3"
// DevVersion is the service current development version.
var DevVersion = "0.4.3"
func GetCurrentVersion(mode string) string {
if mode == "dev" {
return DevVersion
}
return Version
}
func GetMinorVersion(version string) string {
versionList := strings.Split(version, ".")
if len(versionList) < 3 {
return ""
}
return versionList[0] + "." + versionList[1]
}
func GetSchemaVersion(version string) string {
minorVersion := GetMinorVersion(version)
return minorVersion + ".0"
}
// convSemanticVersionToInt converts version string to int.
func convSemanticVersionToInt(version string) int {
versionList := strings.Split(version, ".")
if len(versionList) < 3 {
return 0
}
major, err := strconv.Atoi(versionList[0])
if err != nil {
return 0
}
minor, err := strconv.Atoi(versionList[1])
if err != nil {
return 0
}
patch, err := strconv.Atoi(versionList[2])
if err != nil {
return 0
}
return major*10000 + minor*100 + patch
}
// IsVersionGreaterThanOrEqualTo returns true if version is greater than or equal to target.
func IsVersionGreaterOrEqualThan(version, target string) bool {
return convSemanticVersionToInt(version) >= convSemanticVersionToInt(target)
}
// IsVersionGreaterThan returns true if version is greater than target.
func IsVersionGreaterThan(version, target string) bool {
return convSemanticVersionToInt(version) > convSemanticVersionToInt(target)
}
+497
View File
@@ -0,0 +1,497 @@
# Configuration Provisioning
Status: Implemented
## Summary
Memos should follow Mastodon's deployment-configuration model: configuration supplied by the deployment is loaded directly into each server process and
remains authoritative for that process lifetime. It is not imported into the database and is not tracked as database-owned application state.
The first supported file-backed configuration resources are:
- OAuth2 identity providers.
- Instance settings for general policy, storage, memo behavior, notifications, and AI providers.
Memos scans `/etc/secrets` after database migration and demo seeding, validates every matching file, builds one immutable configuration snapshot, and
publishes that snapshot before HTTP or background services start. Applying a changed file requires a process restart.
Every resource file contains exactly one existing `memos.store` protobuf message encoded as protobuf JSON. No resource envelope, state file, ownership
table, or second persistent copy of a secret is introduced. The process necessarily holds decoded secrets in its private runtime snapshot.
## Design model
Mastodon reads external authentication and other deployment configuration from environment variables or a dotenv file during process initialization. It
does not copy that configuration into an administrator-editable database resource or maintain Terraform-style ownership state.
Memos should use the same lifecycle while adapting the input format to its existing generated store messages:
- Mounted JSON files replace a large collection of environment variables.
- File-backed resources exist in the effective runtime configuration.
- Stored resources continue to exist in the database but are shadowed when a file declares the same stable key.
- UI and API mutations cannot change an actively file-backed resource.
- Removing a file and restarting removes the runtime override; it does not delete or modify the stored resource.
This is deployment configuration, not resource reconciliation. Terms such as adoption, import, unmanage, drift, prune, and Terraform state do not apply.
## Goals
- Accept secrets through mounted files without committing them to seed SQL or command-line arguments.
- Keep each file equal to one generated store protobuf message.
- Load and validate the complete file set before exposing any of it.
- Make deployment configuration authoritative for the lifetime of the process.
- Preserve database-backed UI configuration for keys not supplied by files.
- Prevent API writes from appearing to change an effective file-backed resource.
- Keep secret values out of logs, API responses, caches that expose values, and additional persistence.
- Preserve the administrator password sign-in path when password sign-in is disabled for regular users.
## Non-goals
- Persist file contents or file ownership metadata in the database.
- Add a `provisioning_resource` table or provisioning columns to existing tables.
- Reconcile database state to match a desired resource graph.
- Delete database resources when files disappear.
- Support multiple configuration sources with precedence rules in the first version.
- Write UI changes back into mounted files.
- Watch files or reload configuration without restarting in the first version.
- Support partial field ownership within an instance-setting group.
## Terminology
**Stored configuration**
: Configuration stored in the existing `idp` and `system_setting` database tables.
**Deployment configuration**
: Configuration decoded from matching files during process startup.
**Effective configuration**
: The configuration used by APIs, authentication, and background services. Deployment configuration shadows stored configuration with the same stable key.
**Stable key**
: The identity-provider UID or instance-setting key used to merge deployment and stored configuration.
## File discovery
Memos scans direct children of `/etc/secrets`. The directory may contain unrelated platform secrets; only supported filename patterns are read. Memos does
not recurse into subdirectories and does not create, modify, or delete anything in the directory.
| Filename pattern | Protobuf message | Stable key |
| --- | --- | --- |
| `memos-idp-<label>.json` | `memos.store.IdentityProvider` | `uid` |
| `memos-instance-setting-<label>.json` | `memos.store.InstanceSetting` | `key` |
`<label>` uses lowercase kebab case and must match `[a-z0-9]+(?:-[a-z0-9]+)*`. Matching is case-sensitive and the extension is lowercase `.json`.
For upgrade compatibility, identity-provider filenames accepted by the original bootstrap (`memos-idp-*.json`) continue to load when the label is not
lowercase kebab case, but startup logs a deprecation warning. New files should always use the canonical convention.
Recommended labels mirror the resource key for operator readability:
| Resource | Canonical filename |
| --- | --- |
| Identity provider with UID `primary-sso` | `memos-idp-primary-sso.json` |
| `GENERAL` | `memos-instance-setting-general.json` |
| `STORAGE` | `memos-instance-setting-storage.json` |
| `MEMO_RELATED` | `memos-instance-setting-memo-related.json` |
| `NOTIFICATION` | `memos-instance-setting-notification.json` |
| `AI` | `memos-instance-setting-ai.json` |
The filename label remains descriptive rather than authoritative. The `uid` or `key` inside the message is the resource identity, so renaming a file does
not change account links or effective resource identity. Files are read in lexical order only to produce deterministic diagnostics; ordering has no
configuration semantics.
Each matching file:
- Must be a valid protobuf JSON representation of the expected message.
- Must not contain unknown fields.
- Must not exceed 1 MiB.
- Must contain exactly one resource.
- May contain plaintext secrets because the containing directory is treated as sensitive.
- May be a regular file or a platform-managed symlink that resolves to a regular file, as used by Kubernetes Secret volumes.
A missing directory or a readable directory without matching files is a normal no-op. An unreadable directory or matching file is a startup error. Startup
logs include matched counts by resource type so a misspelled filename is visible without logging file contents. A direct child beginning with `memos-` but
not matching a supported pattern produces a warning; unrelated filenames are silently ignored.
### SSO-only deployments
An SSO-only deployment mounts both an identity-provider file and `memos-instance-setting-general.json` with `disallowPasswordAuth` enabled. These resources
are validated and published together during startup. The public demo seed does not contain authentication policy, so both files must be mounted to enable
SSO-only behavior. Keep `disallowUserRegistration` disabled when first-time SSO users should be created automatically.
## Identity-provider files
An identity-provider file contains exactly one `memos.store.IdentityProvider`. The database-generated `id` must be omitted. `uid` is required and is the
stable key.
Example `/etc/secrets/memos-idp-primary-sso.json`:
```json
{
"uid": "primary-sso",
"name": "Company SSO",
"type": "OAUTH2",
"identifierFilter": "",
"config": {
"oauth2Config": {
"clientId": "client-id",
"clientSecret": "client-secret",
"authUrl": "https://idp.example.com/oauth/authorize",
"tokenUrl": "https://idp.example.com/oauth/token",
"userInfoUrl": "https://idp.example.com/oauth/userinfo",
"scopes": ["openid", "profile", "email"],
"fieldMapping": {
"identifier": "sub",
"displayName": "name",
"email": "email",
"avatarUrl": "picture"
}
}
}
}
```
Initial validation supports only OAuth2 providers and requires:
- A valid, nonempty UID and display name.
- Client ID and client secret.
- Authorization, token, and user-info URLs.
- At least one scope, with no empty scope entries.
- A field-mapping object with a nonempty identifier field.
Duplicate UIDs across files are rejected.
User identity links already use the provider UID as their stable provider value. A file-backed provider therefore does not need a database-generated IdP ID
to preserve account links or complete SSO sign-in.
## Instance-setting files
An instance-setting file contains exactly one `memos.store.InstanceSetting`. `key` is required and is the stable key. The populated `oneof` must match the
key.
Example `/etc/secrets/memos-instance-setting-general.json`:
```json
{
"key": "GENERAL",
"generalSetting": {
"disallowUserRegistration": false,
"disallowPasswordAuth": true,
"additionalScript": "",
"additionalStyle": "",
"weekStartDayOffset": 1,
"disallowChangeUsername": false,
"disallowChangeNickname": false,
"customProfile": {
"title": "Company Memos",
"description": "Internal notes",
"logoUrl": "https://example.com/logo.png"
}
}
}
```
Example `/etc/secrets/memos-instance-setting-notification.json`:
```json
{
"key": "NOTIFICATION",
"notificationSetting": {
"email": {
"enabled": true,
"smtpHost": "smtp.example.com",
"smtpPort": 587,
"smtpUsername": "memos",
"smtpPassword": "smtp-secret",
"fromEmail": "memos@example.com",
"fromName": "Memos",
"replyTo": "support@example.com",
"useTls": true,
"useSsl": false
}
}
}
```
Supported keys:
| Key | Deployment use |
| --- | --- |
| `GENERAL` | Registration, authentication, branding, scripts, styles, and user-profile policy |
| `STORAGE` | Attachment storage type, limits, paths, and S3 credentials |
| `MEMO_RELATED` | Memo limits, editing behavior, and reactions |
| `NOTIFICATION` | SMTP transport and credentials |
| `AI` | AI providers, API keys, and transcription defaults |
Rejected keys:
- `BASIC` contains the instance secret key and database schema version. Replacing the secret key invalidates sessions, while replacing the schema version
interferes with database migration state.
- `TAGS` is retained for backward compatibility; active tag metadata is stored per user.
Only one file may declare a given setting key.
### Complete-group replacement
An instance-setting group is the smallest deployment-configured unit. A file replaces the complete effective group. A scalar omitted from protobuf JSON is
stored in the decoded message as its protobuf default; omission does not preserve a field from the database value.
Some existing setting getters apply application defaults after decoding zero values. For example, STORAGE defaults to local storage, a 30 MiB upload limit,
and `assets/{timestamp}_{uuid}_{filename}` when the corresponding decoded fields are unspecified. The effective behavior is therefore the decoded file plus
the same read-time defaults used for database-backed configuration.
Empty secret fields in a file mean empty values; they never mean "preserve the database secret." Credential-preservation behavior used by UI updates does
not apply to deployment configuration.
### AI normalization
AI deployment configuration uses deterministic, self-contained normalization rather than the UI update path:
- Every provider requires an explicit stable `id`; the loader never generates one.
- Every provider requires a title, a supported provider type, and an API key.
- An empty OpenAI endpoint becomes `https://api.openai.com/v1`.
- An empty Gemini endpoint becomes `https://generativelanguage.googleapis.com/v1beta`.
- Duplicate provider IDs are rejected.
- A transcription provider ID must reference a provider in the same effective AI setting.
- Model, language, and prompt use the same length limits as API-managed settings.
- No provider, API key, or transcription value is copied from the shadowed database setting.
## Configuration format compatibility
Using store protobuf JSON makes the selected messages a supported deployment-configuration interface even though the messages remain internal to the
application. For every provisionable message, Memos must preserve:
- Existing protobuf JSON field names.
- Existing enum names and meanings.
- Stable resource-key and `oneof` mappings.
- Previously valid omissions for fields that have defaults.
New optional fields and enum values may be added. A provisionable field may be deprecated, but its existing JSON spelling must continue to decode for the
supported upgrade window. Field names must not be reused with a different meaning. New validation should not invalidate an existing safe configuration
without an upgrade note and a documented replacement.
Unknown fields remain startup errors because this catches misspellings and configuration written for a newer, incompatible Memos version. Compatibility
tests should keep representative JSON fixtures from earlier releases and decode them with the current loader.
## Runtime configuration snapshot
The loader builds an immutable snapshot containing maps keyed by provider UID and setting key. It does not mutate the database while loading. The `Store`
owns this snapshot so all existing consumers resolve configuration through one boundary.
Startup follows this sequence:
```text
Initialize or migrate database
-> apply demo seed when enabled
-> read all matching deployment-configuration files
-> decode and validate every resource
-> validate affected cross-resource invariants
-> publish one immutable runtime snapshot
-> construct HTTP and background services
-> accept requests
```
If any matching file is invalid, no snapshot is published and startup fails. Atomicity comes from publishing the snapshot only after complete validation;
no cross-database transaction abstraction is required because deployment configuration performs no database writes.
The snapshot is loaded once. Files changed after startup have no effect until the process restarts.
### Immutability and copy semantics
Generated protobuf messages are mutable pointers, so immutability must be enforced rather than assumed:
- Canonical snapshot messages remain private to the `Store`.
- Effective getters return deep clones, using `proto.Clone`, rather than canonical pointers.
- Read-time defaults and redaction are applied only to clones.
- Canonical snapshot messages are never inserted into the existing instance-setting TTL cache.
- Callers cannot obtain a mutable map or message owned by the snapshot.
This prevents one request, background runner, defaulting helper, or redaction path from changing configuration observed by another goroutine.
### Effective and stored access
The store facade has an explicit separation between effective reads and stored-resource access:
- Normal list/get operations used by authentication, APIs, and background services return effective configuration.
- Internal raw list/get operations read only the database and are used by migration, snapshot planning, and permitted mutation paths.
- Mutation services check the snapshot source before loading a raw database row.
- A file-backed IdP has no database ID and must never be passed to a driver update or delete operation.
- The loader reads stored configuration through raw access before publishing the snapshot, avoiding recursive effective resolution.
## Effective configuration resolution
### Identity providers
List and get operations return the union of stored and file-backed providers by UID:
- A file-backed provider shadows a stored provider with the same UID.
- Stored providers with other UIDs remain available.
- Authentication resolves the same effective provider collection.
- Removing the file and restarting reveals any stored provider that had been shadowed; it does not restore values from the file.
- Stored providers retain their database insertion order, and a file-backed provider that shadows one occupies the same position. Providers that exist only
in deployment configuration are appended in UID order, keeping existing API and sign-in ordering stable while remaining deterministic.
Operators migrating an existing stored provider to a file should keep the same UID so existing user-identity links continue to work. They should remove or
update the shadowed stored provider before later removing the file if they do not want the old database configuration to reappear.
### Instance settings
Every effective instance-setting getter checks the runtime snapshot before its database cache:
- A file-backed group completely shadows the `system_setting` row with the same key.
- Other setting groups continue to use stored values and existing application defaults.
- The runtime snapshot must never be overwritten by a cached database value.
- Removing a file and restarting returns the group to its stored database value.
The demo seed writes `MEMO_RELATED` but does not write `GENERAL`. Loading deployment configuration after seeding supplies the complete effective General
settings without embedding deployment authentication policy in demo data.
## Validation and authentication safety
All file-local validation runs before snapshot publication. Relationships between file-backed resources are validated against the resulting effective
configuration when the desired files affect that relationship.
At minimum, validation rejects:
- A file-backed `GENERAL` setting that disables password authentication for regular users when the resulting effective configuration has no identity
provider.
- An instance-setting key whose populated `oneof` does not match the key.
- S3 storage without the required endpoint, bucket, region, or credentials.
- Enabled email delivery without the required SMTP host, port, or sender.
- Duplicate AI provider IDs.
- Transcription referencing an AI provider ID absent from the effective AI setting.
- Duplicate stable keys across files.
An unrelated file must not turn an existing database condition into a new startup failure. For example, a STORAGE-only file does not fail startup merely
because the database already disables regular-user password sign-in while containing no IdP; Memos logs that existing condition as a warning. A file that
configures GENERAL or an IdP evaluates the authentication invariant against the resulting effective state.
The administrator password path remains available regardless of `disallowPasswordAuth`. Runtime mutations reject transitions from a safe authentication
state to one where password sign-in is disabled for regular users without an effective IdP. An unrelated edit may preserve an already-existing legacy
violation so an upgrade does not make the complete `GENERAL` group uneditable; the administrator can resolve that state by enabling password sign-in or
configuring an IdP. Deleting the last effective IdP from a previously safe state remains rejected.
The validation and database mutation must be one serializable store operation. In particular, updating `GENERAL` and deleting an IdP cannot use separate
check-then-write calls, because concurrent requests could each validate an old safe state and together produce an unsafe state. The narrow runtime mutation
operation:
1. Starts a serializable database transaction.
2. Reads the stored `GENERAL` setting and stored IdPs inside that transaction.
3. Combines them with the immutable file snapshot and the proposed mutation.
4. Validates the resulting effective authentication state.
5. Applies the stored-resource mutation and commits.
6. Retries serialization conflicts a bounded number of times.
This transaction is required for runtime authentication-policy safety, not for loading deployment files. It adds no table or schema migration. Each
database driver must provide equivalent transaction semantics for this narrow operation.
## API behavior
The API operates on effective resources for reads and stored resources for permitted writes.
Mutation behavior:
- Creating a stored IdP with a UID reserved by a file-backed provider returns `codes.FailedPrecondition`.
- Updating or deleting a file-backed IdP returns `codes.FailedPrecondition`.
- Updating a file-backed instance-setting group returns `codes.FailedPrecondition`.
- The instance-setting guard runs before validation or future field-mask application, so every masked update to a file-backed group is rejected.
- Mutations of unshadowed stored configuration continue normally, subject to authentication safety invariants.
- API responses continue to redact client secrets, SMTP passwords, S3 secrets, and AI API keys.
No API operation writes to the mounted files. Test operations that do not change stored configuration, such as testing the effective SMTP configuration,
remain available.
## Frontend behavior
The frontend does not receive configuration-source metadata. It presents the normal mutation controls and reports the API's `FailedPrecondition` error when
an administrator attempts to create, update, or delete a deployment-managed resource. The API remains the sole authority for mutation enforcement.
## Security
- Treat `/etc/secrets` and every matching file as sensitive plaintext.
- Recommend owner-only or application-group-readable filesystem permissions.
- Never log file contents, decoded messages, before/after values, or secret fields.
- Redact secrets from validation errors and startup summaries.
- Do not persist deployment secrets in `idp`, `system_setting`, a state file, or ownership metadata.
- Fail startup on an invalid or unreadable matching file rather than publishing partial configuration.
- Keep the immutable snapshot process-local and expose only redacted API representations.
## Multiple server replicas
Every replica independently loads deployment configuration at startup, as Mastodon processes independently load environment configuration. All replicas in
one deployment must mount identical files.
A rolling deployment can temporarily run old and new configuration generations at the same time. Memos does not attempt distributed reconciliation or
cache invalidation for this process-local configuration. Deployments changing authentication or storage configuration should use a rollout strategy that
does not route traffic to replicas with different file generations, and readiness must be reported only after the new snapshot validates successfully.
Because file-backed settings bypass the database setting cache, a replica cannot replace a deployment value with a stale cached database value.
## Database and migration impact
This design requires no database schema changes and no migrations:
- File-backed IdPs are not inserted into `idp`.
- File-backed settings are not inserted into `system_setting`.
- Existing user-identity links remain database-backed and continue to reference provider UIDs.
- Existing stored configuration remains untouched beneath runtime overrides.
### Transition from the database-writing bootstrap
Versions with the original `memos-idp-*.json` bootstrap copied file-backed IdPs, including client secrets, into the `idp` table during migration. The new
loader cannot reliably distinguish those rows from providers created through the UI, so it must not delete or scrub them automatically.
When a file shadows a stored provider with the same UID, startup logs a secret-free warning that a stored copy remains. Operators who previously used the
database-writing bootstrap should clean up explicitly:
1. Back up the database and retain administrator password access.
2. Temporarily remove the IdP file and restart Memos so the stored provider is no longer shadowed.
3. Delete or update the stored provider through the administrator UI or API, or perform equivalent offline database maintenance.
4. Restore the file and restart Memos.
Until that cleanup is complete, the old stored provider and secret remain in the database and can reappear if the file is removed. The no-persistence
guarantee applies to the new loader; it does not claim to erase secrets written by earlier versions.
## Implementation
The implementation:
1. Replaces the database-writing IdP bootstrap with a typed deployment-configuration loader.
2. Decodes and validates `memos-instance-setting-*.json` resources.
3. Loads configuration after migration and demo seeding but before service construction.
4. Publishes an immutable provider/settings snapshot owned by the store facade, with clone-on-read semantics.
5. Resolves file-backed values before database values and caches for IdP authentication and instance settings.
6. Uses explicit raw database reads for snapshot planning and permitted mutation paths.
7. Validates affected startup state and uses a narrow serializable transaction for runtime authentication mutations.
8. Enforces deployment ownership through API mutation guards and returns `codes.FailedPrecondition` for rejected writes.
## Test strategy
The implementation requires tests for:
- Every canonical filename pattern, legacy identity-provider filename compatibility, and supported message type.
- Unknown fields, oversized files, unreadable files, invalid protobuf JSON, and invalid enum values.
- Duplicate provider UIDs and setting keys.
- Rejection of `BASIC`, `TAGS`, and key/`oneof` mismatches.
- Complete validation before snapshot publication.
- Store-proto JSON compatibility fixtures from earlier releases.
- Effective merging and shadowing by provider UID and setting key.
- Stable stored ordering and deterministic placement of deployment-only identity providers.
- Removal of a file taking effect after constructing a new process snapshot without deleting stored configuration.
- Existing user-identity links working with a file-backed provider of the same UID.
- File-backed settings bypassing database cache entries.
- Clone-on-read behavior and race tests proving snapshot messages cannot be mutated by callers.
- Authentication safety for startup and runtime IdP deletion.
- Concurrent `GENERAL` updates and IdP deletion preserving the runtime authentication invariant across database drivers.
- An unrelated deployment file not failing because of untouched pre-existing authentication state.
- Storage read-time defaults, SMTP validation, and deterministic AI normalization without database secret preservation.
- Missing-directory behavior and matched-file count logging.
- Mutation guards, including requests carrying field masks.
- A stored provider shadowed by a file producing a secret-free legacy-bootstrap warning.
- Secret redaction in errors, logs, and API responses.
## Research references
- [Mastodon environment configuration](https://docs.joinmastodon.org/admin/config/)
- [Mastodon OmniAuth initialization](https://github.com/mastodon/mastodon/blob/main/config/initializers/3_omniauth.rb)
- [GitLab OpenID Connect configuration](https://docs.gitlab.com/administration/auth/oidc/)
- [Keycloak startup import](https://www.keycloak.org/server/importExport)
- [Grafana provisioning](https://grafana.com/docs/grafana/latest/administration/provisioning/)
-40
View File
@@ -1,40 +0,0 @@
# Development
Memos is built with a curated tech stack. It is optimized for developer experience and is very easy to start working on the code:
1. It has no external dependency.
2. It requires zero config.
3. 1 command to start backend and 1 command to start frontend, both with live reload support.
## Tech Stack
![tech-stack](https://raw.githubusercontent.com/usememos/memos/main/resources/tech-stack.png)
## Prerequisites
- [Go](https://golang.org/doc/install)
- [Air](https://github.com/cosmtrek/air#installation) for backend live reload
- [Node.js](https://nodejs.org/)
- [yarn](https://yarnpkg.com/getting-started/install)
## Steps
1. pull source code
```bash
git clone https://github.com/usememos/memos
```
2. start backend using air(with live reload)
```bash
air -c scripts/.air.toml
```
3. start frontend dev server
```bash
cd web && yarn && yarn dev
```
Memos should now be running at [http://localhost:3000](http://localhost:3000) and change either frontend or backend code would trigger live reload.
+143 -27
View File
@@ -1,38 +1,154 @@
module github.com/usememos/memos
go 1.17
require github.com/mattn/go-sqlite3 v1.14.9
require github.com/google/uuid v1.3.0
go 1.26.2
require (
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.1 // indirect
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa
golang.org/x/net v0.0.0-20220728030405-41545e8bf201 // indirect
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect
connectrpc.com/connect v1.19.2
github.com/at-wat/ebml-go v0.18.0
github.com/aws/aws-sdk-go-v2 v1.41.6
github.com/aws/aws-sdk-go-v2/config v1.32.16
github.com/aws/aws-sdk-go-v2/credentials v1.19.15
github.com/aws/aws-sdk-go-v2/service/s3 v1.100.0
github.com/go-sql-driver/mysql v1.9.3
github.com/google/cel-go v0.28.1
github.com/google/jsonschema-go v0.4.3
github.com/google/uuid v1.6.0
github.com/gorilla/feeds v1.2.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0
github.com/joho/godotenv v1.5.1
github.com/labstack/echo/v5 v5.1.0
github.com/lib/pq v1.12.3
github.com/lithammer/shortuuid/v4 v4.2.0
github.com/moby/moby/api v1.54.2
github.com/modelcontextprotocol/go-sdk v1.6.1
github.com/openai/openai-go/v3 v3.32.0
github.com/pion/opus v0.0.0-20260430223319-81a9c5dc5013
github.com/pkg/errors v0.9.1
github.com/spf13/cobra v1.10.2
github.com/spf13/viper v1.21.0
github.com/stretchr/testify v1.11.1
github.com/testcontainers/testcontainers-go v0.42.0
github.com/testcontainers/testcontainers-go/modules/mysql v0.42.0
github.com/testcontainers/testcontainers-go/modules/postgres v0.42.0
github.com/yuin/goldmark v1.8.2
golang.org/x/crypto v0.50.0
golang.org/x/mod v0.35.0
golang.org/x/net v0.53.0
golang.org/x/oauth2 v0.36.0
golang.org/x/sync v0.20.0
google.golang.org/genai v1.54.0
google.golang.org/genproto v0.0.0-20260427160629-7cedc36a6bc4
google.golang.org/genproto/googleapis/api v0.0.0-20260427160629-7cedc36a6bc4
google.golang.org/grpc v1.80.0
modernc.org/sqlite v1.50.0
)
require (
github.com/gorilla/context v1.1.1 // indirect
github.com/labstack/echo/v4 v4.9.0
github.com/labstack/gommon v0.3.1 // indirect
cel.dev/expr v0.25.1 // indirect
cloud.google.com/go v0.123.0 // indirect
cloud.google.com/go/auth v0.20.0 // indirect
cloud.google.com/go/compute/metadata v0.9.0 // indirect
dario.cat/mergo v1.0.2 // indirect
filippo.io/edwards25519 v1.2.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
github.com/aws/aws-sdk-go-v2/service/signin v1.0.10 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/containerd/errdefs v1.0.0 // indirect
github.com/containerd/errdefs/pkg v0.3.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/platforms v0.2.1 // indirect
github.com/cpuguy83/dockercfg v0.3.2 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/go-connections v0.7.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/ebitengine/purego v0.10.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/s2a-go v0.1.9 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.15 // indirect
github.com/googleapis/gax-go/v2 v2.22.0 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/klauspost/compress v1.18.5 // indirect
github.com/lufia/plan9stats v0.0.0-20260330125221-c963978e514e // indirect
github.com/magiconair/properties v1.8.10 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/go-archive v0.2.0 // indirect
github.com/moby/moby/client v0.4.1 // indirect
github.com/moby/patternmatcher v0.6.1 // indirect
github.com/moby/sys/sequential v0.6.0 // indirect
github.com/moby/sys/user v0.4.0 // indirect
github.com/moby/sys/userns v0.1.0 // indirect
github.com/moby/term v0.5.2 // indirect
github.com/ncruces/go-strftime v1.0.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.1 // indirect
github.com/pelletier/go-toml/v2 v2.3.0 // indirect
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/sagikazarmark/locafero v0.12.0 // indirect
github.com/segmentio/asm v1.1.3 // indirect
github.com/segmentio/encoding v0.5.4 // indirect
github.com/shirou/gopsutil/v4 v4.26.3 // indirect
github.com/sirupsen/logrus v1.9.4 // indirect
github.com/spf13/afero v1.15.0 // indirect
github.com/spf13/cast v1.10.0 // indirect
github.com/spf13/pflag v1.0.10 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/tidwall/gjson v1.18.0 // indirect
github.com/tidwall/match v1.2.0 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/tidwall/sjson v1.2.5 // indirect
github.com/tklauser/go-sysconf v0.3.16 // indirect
github.com/tklauser/numcpus v0.11.0 // indirect
github.com/yosida95/uritemplate/v3 v3.0.2 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0 // indirect
go.opentelemetry.io/otel v1.43.0 // indirect
go.opentelemetry.io/otel/metric v1.43.0 // indirect
go.opentelemetry.io/otel/trace v1.43.0 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f // indirect
golang.org/x/image v0.39.0 // indirect
google.golang.org/api v0.276.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260427160629-7cedc36a6bc4 // indirect
modernc.org/libc v1.72.1 // indirect
modernc.org/mathutil v1.7.1 // indirect
modernc.org/memory v1.11.0 // indirect
)
require (
github.com/VictoriaMetrics/fastcache v1.10.0
github.com/gorilla/securecookie v1.1.1
github.com/gorilla/sessions v1.2.1
github.com/labstack/echo-contrib v0.13.0
)
require (
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.9 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.22 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.22 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.22 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.23 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.8 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.14 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.22 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.22 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.30.16 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.20 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.42.0 // indirect
github.com/aws/smithy-go v1.25.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/disintegration/imaging v1.6.2
github.com/golang-jwt/jwt/v5 v5.3.1
github.com/mattn/go-isatty v0.0.22 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
golang.org/x/sys v0.43.0 // indirect
golang.org/x/text v0.36.0
golang.org/x/time v0.15.0 // indirect
google.golang.org/protobuf v1.36.11
gopkg.in/yaml.v3 v3.0.1
)
+360 -638
View File
File diff suppressed because it is too large Load Diff
+20
View File
@@ -0,0 +1,20 @@
package ai
// ProviderType identifies an AI provider implementation.
type ProviderType string
const (
// ProviderOpenAI is OpenAI's hosted API.
ProviderOpenAI ProviderType = "OPENAI"
// ProviderGemini is Google's Gemini API.
ProviderGemini ProviderType = "GEMINI"
)
// ProviderConfig configures a callable AI provider connection.
type ProviderConfig struct {
ID string
Title string
Type ProviderType
Endpoint string
APIKey string
}
+158
View File
@@ -0,0 +1,158 @@
// Package audio provides audio container/codec helpers for AI providers.
//
// The motivating use case is Gemini transcription: Gemini's audio inputs
// require WAV/MP3/AIFF/AAC/OGG/FLAC, but browser MediaRecorder defaults to
// WebM/Opus. This package converts WebM/Opus into 16-bit PCM WAV using
// pure-Go decoders — no ffmpeg or other system dependency.
package audio
import (
"bytes"
"encoding/binary"
"io"
"strings"
"github.com/at-wat/ebml-go"
"github.com/at-wat/ebml-go/webm"
"github.com/pion/opus"
"github.com/pkg/errors"
)
const (
opusOutputSampleRate = 48000
// maxOpusPacketSamples is Opus's spec maximum: 120 ms at 48 kHz.
maxOpusPacketSamples = 5760
// opusCodecID is the WebM TrackEntry CodecID for an Opus audio track.
opusCodecID = "A_OPUS"
// opusHeadMinLength is the minimum size of the OpusHead identification
// header stored in TrackEntry.CodecPrivate.
opusHeadMinLength = 19
)
// WebMOpusToWAV decodes a WebM/Opus file into 16-bit PCM WAV bytes.
//
// The output is mono or stereo at 48 kHz (Opus's native decode rate),
// regardless of the original encoder's hint. Pre-skip samples declared in
// the OpusHead are discarded to avoid the encoder's startup padding.
//
// The function reads the entire WebM document into memory; callers should
// enforce their own size limits before invoking it.
func WebMOpusToWAV(input []byte) ([]byte, error) {
var doc struct {
Header webm.EBMLHeader `ebml:"EBML"`
Segment webm.Segment `ebml:"Segment"`
}
if err := ebml.Unmarshal(bytes.NewReader(input), &doc); err != nil && !errors.Is(err, io.EOF) {
return nil, errors.Wrap(err, "parse webm")
}
track := findOpusTrack(doc.Segment.Tracks.TrackEntry)
if track == nil {
return nil, errors.New("webm has no Opus audio track")
}
if len(track.CodecPrivate) < opusHeadMinLength {
return nil, errors.Errorf("invalid OpusHead: expected at least %d bytes, got %d", opusHeadMinLength, len(track.CodecPrivate))
}
channels := int(track.Audio.Channels)
if channels < 1 || channels > 2 {
return nil, errors.Errorf("unsupported Opus channel count: %d", channels)
}
preSkip := int(binary.LittleEndian.Uint16(track.CodecPrivate[10:12]))
decoder := opus.NewDecoder()
if err := decoder.Init(opusOutputSampleRate, channels); err != nil {
return nil, errors.Wrap(err, "init opus decoder")
}
pcm := make([]int16, 0, 1<<16)
frame := make([]int16, maxOpusPacketSamples*channels)
decodeBlock := func(block ebml.Block) error {
if block.TrackNumber != track.TrackNumber {
return nil
}
for _, packet := range block.Data {
if len(packet) == 0 {
continue
}
n, err := decoder.DecodeToInt16(packet, frame)
if err != nil {
return errors.Wrap(err, "decode opus packet")
}
pcm = append(pcm, frame[:n*channels]...)
}
return nil
}
for _, cluster := range doc.Segment.Cluster {
for _, sb := range cluster.SimpleBlock {
if err := decodeBlock(sb); err != nil {
return nil, err
}
}
for _, bg := range cluster.BlockGroup {
if err := decodeBlock(bg.Block); err != nil {
return nil, err
}
}
}
skip := min(preSkip*channels, len(pcm))
pcm = pcm[skip:]
return encodeWAV(pcm, opusOutputSampleRate, channels), nil
}
// IsWebMContentType reports whether the MIME type is WebM audio.
// Both "audio/webm" and "audio/webm; codecs=opus" return true.
func IsWebMContentType(contentType string) bool {
contentType = strings.TrimSpace(contentType)
if contentType == "" {
return false
}
if i := strings.IndexByte(contentType, ';'); i >= 0 {
contentType = contentType[:i]
}
return strings.EqualFold(strings.TrimSpace(contentType), "audio/webm")
}
func findOpusTrack(entries []webm.TrackEntry) *webm.TrackEntry {
for i := range entries {
entry := &entries[i]
if entry.CodecID == opusCodecID && entry.Audio != nil {
return entry
}
}
return nil
}
// encodeWAV writes a standard RIFF/WAVE container around 16-bit PCM samples.
// Reference layout: http://soundfile.sapp.org/doc/WaveFormat/
func encodeWAV(samples []int16, sampleRate, channels int) []byte {
const bitsPerSample = 16
const bytesPerSample = bitsPerSample / 8
blockAlign := channels * bytesPerSample
byteRate := sampleRate * blockAlign
dataSize := len(samples) * bytesPerSample
buf := bytes.NewBuffer(make([]byte, 0, 44+dataSize))
buf.WriteString("RIFF")
_ = binary.Write(buf, binary.LittleEndian, uint32(36+dataSize))
buf.WriteString("WAVE")
buf.WriteString("fmt ")
_ = binary.Write(buf, binary.LittleEndian, uint32(16))
_ = binary.Write(buf, binary.LittleEndian, uint16(1)) // PCM
_ = binary.Write(buf, binary.LittleEndian, uint16(channels))
_ = binary.Write(buf, binary.LittleEndian, uint32(sampleRate))
_ = binary.Write(buf, binary.LittleEndian, uint32(byteRate))
_ = binary.Write(buf, binary.LittleEndian, uint16(blockAlign))
_ = binary.Write(buf, binary.LittleEndian, uint16(bitsPerSample))
buf.WriteString("data")
_ = binary.Write(buf, binary.LittleEndian, uint32(dataSize))
_ = binary.Write(buf, binary.LittleEndian, samples)
return buf.Bytes()
}
+48
View File
@@ -0,0 +1,48 @@
package audio
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestIsWebMContentType(t *testing.T) {
cases := []struct {
in string
want bool
}{
{"audio/webm", true},
{"audio/webm;codecs=opus", true},
{"audio/webm; codecs=opus", true},
{"AUDIO/WEBM", true},
{" audio/webm ", true},
{"audio/wav", false},
{"audio/mp4", false},
{"video/webm", false},
{"", false},
{"webm", false},
}
for _, tc := range cases {
t.Run(tc.in, func(t *testing.T) {
require.Equal(t, tc.want, IsWebMContentType(tc.in))
})
}
}
func TestWebMOpusToWAV_RejectsInvalidInput(t *testing.T) {
t.Run("empty", func(t *testing.T) {
_, err := WebMOpusToWAV(nil)
require.Error(t, err)
})
t.Run("not webm", func(t *testing.T) {
_, err := WebMOpusToWAV([]byte("hello world this is not webm"))
require.Error(t, err)
})
t.Run("truncated webm header bytes", func(t *testing.T) {
// Valid EBML magic but no Segment.
_, err := WebMOpusToWAV([]byte{0x1A, 0x45, 0xDF, 0xA3})
require.Error(t, err)
})
}
+41
View File
@@ -0,0 +1,41 @@
// Package audiollm defines the multimodal-audio capability for AI providers.
// Implementations call chat-completions or generate-content style APIs that
// accept audio as input. For deterministic transcription, prefer internal/ai/stt
// where a dedicated STT endpoint exists.
package audiollm
import (
"context"
"io"
)
// Model invokes a multimodal LLM with audio input.
type Model interface {
GenerateFromAudio(ctx context.Context, req Request) (*Response, error)
}
// Request is the input to a multimodal-audio call.
type Request struct {
Audio io.Reader
Size int64
ContentType string
Model string
Instructions string // literal instruction the model is expected to follow
Temperature *float32 // optional; nil leaves the provider default in place
}
// Response is the output of a multimodal-audio call.
type Response struct {
Text string
FinishReason FinishReason
}
// FinishReason describes why the model stopped generating.
type FinishReason string
const (
FinishStop FinishReason = "stop" // model finished normally
FinishLength FinishReason = "length" // truncated by max-tokens
FinishSafety FinishReason = "safety" // safety filter blocked output
FinishOther FinishReason = "other" // anything else, including unknown
)
+202
View File
@@ -0,0 +1,202 @@
// Package gemini implements audiollm.Model against the Gemini generateContent
// endpoint. Used by Memos transcription when the user picks a Gemini provider:
// the handler issues a transcription instruction via audiollm.Request.Instructions.
package gemini
import (
"context"
"io"
"mime"
"net/url"
"strings"
"github.com/pkg/errors"
"google.golang.org/genai"
"github.com/usememos/memos/internal/ai"
"github.com/usememos/memos/internal/ai/audio"
"github.com/usememos/memos/internal/ai/audiollm"
)
const (
defaultEndpoint = "https://generativelanguage.googleapis.com/v1beta"
defaultAPIVersion = "v1beta"
maxInlineSize = 14 * 1024 * 1024
providerName = "Gemini"
)
var supportedContentTypes = map[string]string{
"audio/wav": "audio/wav",
"audio/x-wav": "audio/wav",
"audio/mp3": "audio/mp3",
"audio/mpeg": "audio/mp3",
"audio/aiff": "audio/aiff",
"audio/aac": "audio/aac",
"audio/ogg": "audio/ogg",
"audio/flac": "audio/flac",
"audio/x-flac": "audio/flac",
}
// Model implements audiollm.Model for Gemini generateContent.
type Model struct {
client *genai.Client
}
// New constructs a Model from a provider config.
func New(cfg ai.ProviderConfig, options audiollm.Options) (*Model, error) {
endpoint, err := normalizeEndpoint(cfg.Endpoint)
if err != nil {
return nil, err
}
if cfg.APIKey == "" {
return nil, errors.Errorf("%s API key is required", providerName)
}
baseURL, apiVersion, err := splitEndpoint(endpoint)
if err != nil {
return nil, err
}
httpOptions := genai.HTTPOptions{BaseURL: baseURL, APIVersion: apiVersion}
if options.HTTPClient != nil && options.HTTPClient.Timeout > 0 {
timeout := options.HTTPClient.Timeout
httpOptions.Timeout = &timeout
}
client, err := genai.NewClient(context.Background(), &genai.ClientConfig{
APIKey: cfg.APIKey,
Backend: genai.BackendGeminiAPI,
HTTPClient: options.HTTPClient,
HTTPOptions: httpOptions,
})
if err != nil {
return nil, errors.Wrap(err, "failed to create Gemini client")
}
return &Model{client: client}, nil
}
// GenerateFromAudio calls Gemini generateContent with the audio attached.
func (m *Model) GenerateFromAudio(ctx context.Context, req audiollm.Request) (*audiollm.Response, error) {
if strings.TrimSpace(req.Model) == "" {
return nil, errors.New("model is required")
}
if req.Audio == nil {
return nil, errors.New("audio is required")
}
if strings.TrimSpace(req.Instructions) == "" {
return nil, errors.New("instructions are required")
}
audioBytes, err := io.ReadAll(req.Audio)
if err != nil {
return nil, errors.Wrap(err, "failed to read audio")
}
if len(audioBytes) == 0 {
return nil, errors.New("audio is required")
}
contentType := req.ContentType
if audio.IsWebMContentType(contentType) {
wav, err := audio.WebMOpusToWAV(audioBytes)
if err != nil {
return nil, errors.Wrap(err, "failed to transcode webm audio for Gemini")
}
audioBytes = wav
contentType = "audio/wav"
}
if len(audioBytes) > maxInlineSize {
return nil, errors.Errorf("audio is too large for Gemini inline request; maximum size is %d bytes", maxInlineSize)
}
contentType, err = normalizeContentType(contentType)
if err != nil {
return nil, err
}
cfg := &genai.GenerateContentConfig{}
if req.Temperature != nil {
t := *req.Temperature
cfg.Temperature = &t
}
resp, err := m.client.Models.GenerateContent(ctx, normalizeModelName(req.Model), []*genai.Content{
genai.NewContentFromParts([]*genai.Part{
genai.NewPartFromBytes(audioBytes, contentType),
genai.NewPartFromText(req.Instructions),
}, genai.RoleUser),
}, cfg)
if err != nil {
return nil, errors.Wrap(err, "failed to send Gemini request")
}
return &audiollm.Response{
Text: strings.TrimSpace(resp.Text()),
FinishReason: mapFinishReason(resp),
}, nil
}
func mapFinishReason(resp *genai.GenerateContentResponse) audiollm.FinishReason {
if resp == nil || len(resp.Candidates) == 0 {
return audiollm.FinishOther
}
switch resp.Candidates[0].FinishReason {
case genai.FinishReasonStop:
return audiollm.FinishStop
case genai.FinishReasonMaxTokens:
return audiollm.FinishLength
case genai.FinishReasonSafety,
genai.FinishReasonRecitation,
genai.FinishReasonProhibitedContent,
genai.FinishReasonSPII,
genai.FinishReasonBlocklist,
genai.FinishReasonImageSafety,
genai.FinishReasonImageProhibitedContent,
genai.FinishReasonImageRecitation:
return audiollm.FinishSafety
default:
return audiollm.FinishOther
}
}
func normalizeEndpoint(endpoint string) (string, error) {
endpoint = strings.TrimSpace(endpoint)
if endpoint == "" {
endpoint = defaultEndpoint
}
if _, err := url.ParseRequestURI(endpoint); err != nil {
return "", errors.Wrapf(err, "invalid %s endpoint", providerName)
}
return strings.TrimRight(endpoint, "/"), nil
}
func splitEndpoint(endpoint string) (string, string, error) {
parsed, err := url.Parse(endpoint)
if err != nil {
return "", "", errors.Wrap(err, "invalid Gemini endpoint")
}
path := strings.TrimRight(parsed.Path, "/")
apiVersion := defaultAPIVersion
for _, supported := range []string{"v1alpha", "v1beta", "v1"} {
if path == "/"+supported || strings.HasSuffix(path, "/"+supported) {
apiVersion = supported
parsed.Path = strings.TrimSuffix(path, "/"+supported)
break
}
}
return strings.TrimRight(parsed.String(), "/"), apiVersion, nil
}
func normalizeContentType(contentType string) (string, error) {
mediaType, _, err := mime.ParseMediaType(strings.TrimSpace(contentType))
if err != nil {
return "", errors.Wrap(err, "invalid audio content type")
}
mediaType = strings.ToLower(mediaType)
normalized, ok := supportedContentTypes[mediaType]
if !ok {
return "", errors.Errorf("audio content type %q is not supported by Gemini", mediaType)
}
return normalized, nil
}
func normalizeModelName(model string) string {
return strings.TrimPrefix(strings.TrimSpace(model), "models/")
}
+106
View File
@@ -0,0 +1,106 @@
package gemini_test
import (
"context"
"encoding/base64"
"encoding/json"
"net/http"
"net/http/httptest"
"strings"
"testing"
"time"
"github.com/stretchr/testify/require"
"github.com/usememos/memos/internal/ai"
"github.com/usememos/memos/internal/ai/audiollm"
audiollmgemini "github.com/usememos/memos/internal/ai/audiollm/gemini"
)
func TestGenerateFromAudio(t *testing.T) {
t.Parallel()
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
require.Equal(t, http.MethodPost, r.Method)
require.Equal(t, "/v1beta/models/gemini-2.5-flash:generateContent", r.URL.Path)
require.Equal(t, "test-key", r.Header.Get("x-goog-api-key"))
require.Equal(t, "application/json", r.Header.Get("Content-Type"))
var request struct {
Contents []struct {
Parts []struct {
Text string `json:"text"`
InlineData *struct {
MIMEType string `json:"mimeType"`
Data string `json:"data"`
} `json:"inlineData"`
} `json:"parts"`
} `json:"contents"`
GenerationConfig map[string]json.Number `json:"generationConfig"`
}
require.NoError(t, json.NewDecoder(r.Body).Decode(&request))
require.Len(t, request.Contents, 1)
require.Len(t, request.Contents[0].Parts, 2)
require.NotNil(t, request.Contents[0].Parts[0].InlineData)
require.Equal(t, "audio/mp3", request.Contents[0].Parts[0].InlineData.MIMEType)
audio, err := base64.StdEncoding.DecodeString(request.Contents[0].Parts[0].InlineData.Data)
require.NoError(t, err)
require.Equal(t, "audio bytes", string(audio))
require.Equal(t, "transcribe please", request.Contents[0].Parts[1].Text)
require.Equal(t, json.Number("0"), request.GenerationConfig["temperature"])
w.Header().Set("Content-Type", "application/json")
require.NoError(t, json.NewEncoder(w).Encode(map[string]any{
"candidates": []map[string]any{
{
"finishReason": "STOP",
"content": map[string]any{
"parts": []map[string]string{{"text": "hello from gemini"}},
},
},
},
}))
}))
defer server.Close()
model, err := audiollmgemini.New(ai.ProviderConfig{
Type: ai.ProviderGemini,
Endpoint: server.URL + "/v1beta",
APIKey: "test-key",
}, audiollm.ApplyOptions(nil))
require.NoError(t, err)
temp := float32(0)
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
resp, err := model.GenerateFromAudio(ctx, audiollm.Request{
Model: "models/gemini-2.5-flash",
ContentType: "audio/mpeg",
Audio: strings.NewReader("audio bytes"),
Instructions: "transcribe please",
Temperature: &temp,
})
require.NoError(t, err)
require.Equal(t, "hello from gemini", resp.Text)
require.Equal(t, audiollm.FinishStop, resp.FinishReason)
}
func TestGenerateFromAudioRejectsUnsupportedContentType(t *testing.T) {
t.Parallel()
model, err := audiollmgemini.New(ai.ProviderConfig{
Type: ai.ProviderGemini,
Endpoint: "https://example.com/v1beta",
APIKey: "test-key",
}, audiollm.ApplyOptions(nil))
require.NoError(t, err)
_, err = model.GenerateFromAudio(context.Background(), audiollm.Request{
Model: "gemini-2.5-flash",
ContentType: "video/mp4",
Audio: strings.NewReader("video bytes"),
Instructions: "transcribe please",
})
require.Error(t, err)
require.Contains(t, err.Error(), "not supported by Gemini")
}
+34
View File
@@ -0,0 +1,34 @@
package audiollm
import (
"net/http"
"time"
)
const defaultHTTPTimeout = 2 * time.Minute
// Options is the resolved option set passed to provider implementations.
type Options struct {
HTTPClient *http.Client
}
// ModelOption customizes a Model.
type ModelOption func(*Options)
// WithHTTPClient overrides the HTTP client used by the model.
func WithHTTPClient(client *http.Client) ModelOption {
return func(o *Options) {
if client != nil {
o.HTTPClient = client
}
}
}
// ApplyOptions resolves a ModelOption slice into Options with defaults.
func ApplyOptions(opts []ModelOption) Options {
resolved := Options{HTTPClient: &http.Client{Timeout: defaultHTTPTimeout}}
for _, apply := range opts {
apply(&resolved)
}
return resolved
}
+17
View File
@@ -0,0 +1,17 @@
package ai
import "github.com/pkg/errors"
var (
// ErrProviderNotFound indicates that a requested provider ID does not exist.
ErrProviderNotFound = errors.New("AI provider not found")
// ErrCapabilityUnsupported indicates that the provider does not support the requested capability.
ErrCapabilityUnsupported = errors.New("AI provider capability unsupported")
// ErrSTTNotSupported indicates that the provider does not have a dedicated
// speech-to-text endpoint. Use the audiollm package for multimodal audio
// understanding when this is returned.
ErrSTTNotSupported = errors.New("provider does not support speech-to-text capability")
// ErrAudioLLMNotSupported indicates that the provider does not have a
// multimodal-audio LLM available in this codebase.
ErrAudioLLMNotSupported = errors.New("provider does not support multimodal audio capability")
)
+22
View File
@@ -0,0 +1,22 @@
package ai
import "github.com/pkg/errors"
const (
// DefaultOpenAITranscriptionModel is the built-in OpenAI transcription model.
DefaultOpenAITranscriptionModel = "whisper-1"
// DefaultGeminiTranscriptionModel is the built-in Gemini transcription model.
DefaultGeminiTranscriptionModel = "gemini-2.5-flash"
)
// DefaultTranscriptionModel returns the built-in transcription model for a provider.
func DefaultTranscriptionModel(providerType ProviderType) (string, error) {
switch providerType {
case ProviderOpenAI:
return DefaultOpenAITranscriptionModel, nil
case ProviderGemini:
return DefaultGeminiTranscriptionModel, nil
default:
return "", errors.Wrapf(ErrCapabilityUnsupported, "provider type %q", providerType)
}
}
+16
View File
@@ -0,0 +1,16 @@
package ai
import "github.com/pkg/errors"
// FindProvider returns the provider with the given ID.
func FindProvider(providers []ProviderConfig, providerID string) (*ProviderConfig, error) {
if providerID == "" {
return nil, errors.Wrap(ErrProviderNotFound, "provider ID is required")
}
for _, provider := range providers {
if provider.ID == providerID {
return &provider, nil
}
}
return nil, errors.Wrapf(ErrProviderNotFound, "provider ID %q", providerID)
}
+116
View File
@@ -0,0 +1,116 @@
// Package openai implements stt.Transcriber against the OpenAI
// /audio/transcriptions endpoint (and any compatible third-party endpoint
// such as Groq Whisper, faster-whisper self-hosted, or Azure Whisper).
package openai
import (
"context"
"mime"
"net/url"
"strings"
openaisdk "github.com/openai/openai-go/v3"
openaioption "github.com/openai/openai-go/v3/option"
"github.com/pkg/errors"
"github.com/usememos/memos/internal/ai"
"github.com/usememos/memos/internal/ai/stt"
)
const defaultEndpoint = "https://api.openai.com/v1"
// Transcriber implements stt.Transcriber for OpenAI-compatible STT endpoints.
type Transcriber struct {
client openaisdk.Client
}
// New constructs a Transcriber from a provider config.
func New(cfg ai.ProviderConfig, options stt.Options) (*Transcriber, error) {
endpoint, err := normalizeEndpoint(cfg.Endpoint)
if err != nil {
return nil, err
}
if cfg.APIKey == "" {
return nil, errors.New("OpenAI API key is required")
}
return &Transcriber{
client: openaisdk.NewClient(
openaioption.WithAPIKey(cfg.APIKey),
openaioption.WithBaseURL(endpoint),
openaioption.WithHTTPClient(options.HTTPClient),
),
}, nil
}
// Transcribe sends the audio to /audio/transcriptions.
func (t *Transcriber) Transcribe(ctx context.Context, req stt.Request) (*stt.Response, error) {
if strings.TrimSpace(req.Model) == "" {
return nil, errors.New("model is required")
}
if req.Audio == nil {
return nil, errors.New("audio is required")
}
filename, contentType, err := normalizeAudioMetadata(req)
if err != nil {
return nil, err
}
params := openaisdk.AudioTranscriptionNewParams{
File: openaisdk.File(req.Audio, filename, contentType),
Model: openaisdk.AudioModel(req.Model),
ResponseFormat: openaisdk.AudioResponseFormatJSON,
}
if req.Prompt != "" {
params.Prompt = openaisdk.String(req.Prompt)
}
if req.Language != "" {
params.Language = openaisdk.String(req.Language)
}
resp, err := t.client.Audio.Transcriptions.New(ctx, params)
if err != nil {
return nil, errors.Wrap(err, "failed to send OpenAI transcription request")
}
return &stt.Response{
Text: resp.Text,
Language: resp.Language,
}, nil
}
func normalizeEndpoint(endpoint string) (string, error) {
endpoint = strings.TrimSpace(endpoint)
if endpoint == "" {
endpoint = defaultEndpoint
}
if _, err := url.ParseRequestURI(endpoint); err != nil {
return "", errors.Wrap(err, "invalid OpenAI endpoint")
}
return strings.TrimRight(endpoint, "/"), nil
}
func normalizeAudioMetadata(req stt.Request) (string, string, error) {
filename := strings.TrimSpace(req.Filename)
if filename == "" {
filename = "audio"
}
contentType := strings.TrimSpace(req.ContentType)
if contentType == "" {
contentType = "application/octet-stream"
} else {
mediaType, _, err := mime.ParseMediaType(contentType)
if err != nil {
return "", "", errors.Wrap(err, "invalid audio content type")
}
contentType = mediaType
}
return sanitizeFilename(filename), contentType, nil
}
func sanitizeFilename(filename string) string {
filename = strings.NewReplacer("\r", "_", "\n", "_").Replace(filename)
if strings.TrimSpace(filename) == "" {
return "audio"
}
return filename
}
+68
View File
@@ -0,0 +1,68 @@
package openai_test
import (
"context"
"encoding/json"
"net/http"
"net/http/httptest"
"strings"
"testing"
"time"
"github.com/stretchr/testify/require"
"github.com/usememos/memos/internal/ai"
"github.com/usememos/memos/internal/ai/stt"
sttopenai "github.com/usememos/memos/internal/ai/stt/openai"
)
func TestTranscribe(t *testing.T) {
t.Parallel()
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
require.Equal(t, http.MethodPost, r.Method)
require.Equal(t, "/audio/transcriptions", r.URL.Path)
require.Equal(t, "Bearer test-key", r.Header.Get("Authorization"))
require.NoError(t, r.ParseMultipartForm(10<<20))
require.Equal(t, "gpt-4o-transcribe", r.FormValue("model"))
require.Equal(t, "json", r.FormValue("response_format"))
require.Equal(t, "domain words", r.FormValue("prompt"))
require.Equal(t, "en", r.FormValue("language"))
file, header, err := r.FormFile("file")
require.NoError(t, err)
defer file.Close()
require.Equal(t, "voice.wav", header.Filename)
require.Equal(t, "audio/wav", header.Header.Get("Content-Type"))
w.Header().Set("Content-Type", "application/json")
require.NoError(t, json.NewEncoder(w).Encode(map[string]any{
"text": "hello world",
"language": "en",
"duration": 1.5,
}))
}))
defer server.Close()
transcriber, err := sttopenai.New(ai.ProviderConfig{
Type: ai.ProviderOpenAI,
Endpoint: server.URL,
APIKey: "test-key",
}, stt.ApplyOptions(nil))
require.NoError(t, err)
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
response, err := transcriber.Transcribe(ctx, stt.Request{
Model: "gpt-4o-transcribe",
Filename: "voice.wav",
ContentType: "audio/wav",
Audio: strings.NewReader("RIFF"),
Prompt: "domain words",
Language: "en",
})
require.NoError(t, err)
require.Equal(t, "hello world", response.Text)
require.Equal(t, "en", response.Language)
// Note: Duration intentionally omitted from stt.Response — not exposed in the new contract.
}
+34
View File
@@ -0,0 +1,34 @@
package stt
import (
"net/http"
"time"
)
const defaultHTTPTimeout = 2 * time.Minute
// Options is the resolved option set passed to provider implementations.
type Options struct {
HTTPClient *http.Client
}
// TranscriberOption customizes a Transcriber.
type TranscriberOption func(*Options)
// WithHTTPClient overrides the HTTP client used by the transcriber.
func WithHTTPClient(client *http.Client) TranscriberOption {
return func(o *Options) {
if client != nil {
o.HTTPClient = client
}
}
}
// ApplyOptions resolves a TranscriberOption slice into Options with defaults.
func ApplyOptions(opts []TranscriberOption) Options {
resolved := Options{HTTPClient: &http.Client{Timeout: defaultHTTPTimeout}}
for _, apply := range opts {
apply(&resolved)
}
return resolved
}
+41
View File
@@ -0,0 +1,41 @@
// Package stt defines the speech-to-text capability for AI providers.
// Implementations call dedicated STT endpoints (e.g. OpenAI /audio/transcriptions)
// and return deterministic transcription output. For multimodal LLMs that
// happen to accept audio input, see internal/ai/audiollm.
package stt
import (
"context"
"io"
)
// Transcriber transcribes audio to text using a provider's dedicated STT endpoint.
type Transcriber interface {
Transcribe(ctx context.Context, req Request) (*Response, error)
}
// Request is the input to a transcription call.
type Request struct {
Audio io.Reader
Size int64
Filename string
ContentType string // IANA media type, e.g. "audio/wav"
Model string // provider-specific model id (e.g. "whisper-1", "gpt-4o-transcribe")
Prompt string // soft spelling/vocabulary hint (Whisper "prompt" parameter)
Language string // ISO 639-1, optional
}
// Response is the output of a transcription call.
type Response struct {
Text string
Language string // empty if provider did not return it
Segments []Segment // empty unless provider returned timestamps
}
// Segment is a timestamped portion of the transcript.
type Segment struct {
Text string
Start float64
End float64
Speaker string // empty unless using a diarization-capable model
}
+7
View File
@@ -0,0 +1,7 @@
package base
import "regexp"
var (
UIDMatcher = regexp.MustCompile(`^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,34}[a-zA-Z0-9])?$`)
)
+38
View File
@@ -0,0 +1,38 @@
package base
import (
"testing"
)
func TestUIDMatcher(t *testing.T) {
tests := []struct {
input string
expected bool
}{
{"", false},
{"-abc123", false},
{"012345678901234567890123456789", true},
{"1abc-123", true},
{"A123B456C789", true},
{"a", true},
{"ab", true},
{"a*b&c", false},
{"a--b", true},
{"a-1b-2c", true},
{"a1234567890123456789012345678901", true},
{"abc123", true},
{"abc123-", false},
{"123e4567-e89b-12d3-a456-426614174000", true}, // UUID v4 from IDP
{"a12345678901234567890123456789012345", true}, // 36 characters.
{"a123456789012345678901234567890123456", false}, // 37 characters.
}
for _, test := range tests {
t.Run(test.input, func(*testing.T) {
result := UIDMatcher.MatchString(test.input)
if result != test.expected {
t.Errorf("For input '%s', expected %v but got %v", test.input, test.expected, result)
}
})
}
}
+507
View File
@@ -0,0 +1,507 @@
# Email Plugin
SMTP email sending functionality for self-hosted Memos instances.
## Overview
This plugin provides a simple, reliable email sending interface following industry-standard SMTP protocols. It's designed for self-hosted environments where instance administrators configure their own email service, similar to platforms like GitHub, GitLab, and Discourse.
## Features
- Standard SMTP protocol support
- TLS/STARTTLS and SSL/TLS encryption
- HTML and plain text emails
- Multiple recipients (To, Cc, Bcc)
- Synchronous and asynchronous sending
- Detailed error reporting with context
- Works with all major email providers
- Reply-To header support
- RFC 5322 compliant message formatting
## Quick Start
### 1. Configure SMTP Settings
```go
import "github.com/usememos/memos/internal/email"
config := &email.Config{
SMTPHost: "smtp.gmail.com",
SMTPPort: 587,
SMTPUsername: "your-email@gmail.com",
SMTPPassword: "your-app-password",
FromEmail: "noreply@yourdomain.com",
FromName: "Memos",
UseTLS: true,
}
```
### 2. Create and Send Email
```go
message := &email.Message{
To: []string{"user@example.com"},
Subject: "Welcome to Memos!",
Body: "Thanks for signing up.",
IsHTML: false,
}
// Synchronous send (waits for result)
err := email.Send(config, message)
if err != nil {
log.Printf("Failed to send email: %v", err)
}
// Asynchronous send (returns immediately)
email.SendAsync(config, message)
```
## Provider Configuration
### Gmail
Requires an [App Password](https://support.google.com/accounts/answer/185833) (2FA must be enabled):
```go
config := &email.Config{
SMTPHost: "smtp.gmail.com",
SMTPPort: 587,
SMTPUsername: "your-email@gmail.com",
SMTPPassword: "your-16-char-app-password",
FromEmail: "your-email@gmail.com",
FromName: "Memos",
UseTLS: true,
}
```
**Alternative (SSL):**
```go
config := &email.Config{
SMTPHost: "smtp.gmail.com",
SMTPPort: 465,
SMTPUsername: "your-email@gmail.com",
SMTPPassword: "your-16-char-app-password",
FromEmail: "your-email@gmail.com",
FromName: "Memos",
UseSSL: true,
}
```
### SendGrid
```go
config := &email.Config{
SMTPHost: "smtp.sendgrid.net",
SMTPPort: 587,
SMTPUsername: "apikey",
SMTPPassword: "your-sendgrid-api-key",
FromEmail: "noreply@yourdomain.com",
FromName: "Memos",
UseTLS: true,
}
```
### AWS SES
```go
config := &email.Config{
SMTPHost: "email-smtp.us-east-1.amazonaws.com",
SMTPPort: 587,
SMTPUsername: "your-smtp-username",
SMTPPassword: "your-smtp-password",
FromEmail: "verified@yourdomain.com",
FromName: "Memos",
UseTLS: true,
}
```
**Note:** Replace `us-east-1` with your AWS region. Email must be verified in SES.
### Mailgun
```go
config := &email.Config{
SMTPHost: "smtp.mailgun.org",
SMTPPort: 587,
SMTPUsername: "postmaster@yourdomain.com",
SMTPPassword: "your-mailgun-smtp-password",
FromEmail: "noreply@yourdomain.com",
FromName: "Memos",
UseTLS: true,
}
```
### Self-Hosted SMTP (Postfix, Exim, etc.)
```go
config := &email.Config{
SMTPHost: "mail.yourdomain.com",
SMTPPort: 587,
SMTPUsername: "username",
SMTPPassword: "password",
FromEmail: "noreply@yourdomain.com",
FromName: "Memos",
UseTLS: true,
}
```
## HTML Emails
```go
message := &email.Message{
To: []string{"user@example.com"},
Subject: "Welcome to Memos!",
Body: `
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body style="font-family: Arial, sans-serif;">
<h1 style="color: #333;">Welcome to Memos!</h1>
<p>We're excited to have you on board.</p>
<a href="https://yourdomain.com" style="background-color: #4CAF50; color: white; padding: 10px 20px; text-decoration: none; border-radius: 5px;">Get Started</a>
</body>
</html>
`,
IsHTML: true,
}
email.Send(config, message)
```
## Multiple Recipients
```go
message := &email.Message{
To: []string{"user1@example.com", "user2@example.com"},
Cc: []string{"manager@example.com"},
Bcc: []string{"admin@example.com"},
Subject: "Team Update",
Body: "Important team announcement...",
ReplyTo: "support@yourdomain.com",
}
email.Send(config, message)
```
## Testing
### Run Tests
```bash
# All tests
go test ./internal/email/... -v
# With coverage
go test ./internal/email/... -v -cover
# With race detector
go test ./internal/email/... -race
```
### Manual Testing
Create a simple test program:
```go
package main
import (
"log"
"github.com/usememos/memos/internal/email"
)
func main() {
config := &email.Config{
SMTPHost: "smtp.gmail.com",
SMTPPort: 587,
SMTPUsername: "your-email@gmail.com",
SMTPPassword: "your-app-password",
FromEmail: "your-email@gmail.com",
FromName: "Test",
UseTLS: true,
}
message := &email.Message{
To: []string{"recipient@example.com"},
Subject: "Test Email",
Body: "This is a test email from Memos email plugin.",
}
if err := email.Send(config, message); err != nil {
log.Fatalf("Failed to send email: %v", err)
}
log.Println("Email sent successfully!")
}
```
## Security Best Practices
### 1. Use TLS/SSL Encryption
Always enable encryption in production:
```go
// STARTTLS (port 587) - Recommended
config.UseTLS = true
// SSL/TLS (port 465)
config.UseSSL = true
```
### 2. Secure Credential Storage
Never hardcode credentials. Use environment variables:
```go
import "os"
config := &email.Config{
SMTPHost: os.Getenv("SMTP_HOST"),
SMTPPort: 587,
SMTPUsername: os.Getenv("SMTP_USERNAME"),
SMTPPassword: os.Getenv("SMTP_PASSWORD"),
FromEmail: os.Getenv("SMTP_FROM_EMAIL"),
UseTLS: true,
}
```
### 3. Use App-Specific Passwords
For Gmail and similar services, use app passwords instead of your main account password.
### 4. Validate and Sanitize Input
Always validate email addresses and sanitize content:
```go
// Validate before sending
if err := message.Validate(); err != nil {
return err
}
```
### 5. Implement Rate Limiting
Prevent abuse by limiting email sending:
```go
// Example using golang.org/x/time/rate
limiter := rate.NewLimiter(rate.Every(time.Second), 10) // 10 emails per second
if !limiter.Allow() {
return errors.New("rate limit exceeded")
}
```
### 6. Monitor and Log
Log email sending activity for security monitoring:
```go
if err := email.Send(config, message); err != nil {
slog.Error("Email send failed",
slog.String("recipient", message.To[0]),
slog.Any("error", err))
}
```
## Common Ports
| Port | Protocol | Security | Use Case |
|------|----------|----------|----------|
| **587** | SMTP + STARTTLS | Encrypted | **Recommended** for most providers |
| **465** | SMTP over SSL/TLS | Encrypted | Alternative secure option |
| **25** | SMTP | Unencrypted | Legacy, often blocked by ISPs |
| **2525** | SMTP + STARTTLS | Encrypted | Alternative when 587 is blocked |
**Port 587 (STARTTLS)** is the recommended standard for modern SMTP:
```go
config := &email.Config{
SMTPPort: 587,
UseTLS: true,
}
```
**Port 465 (SSL/TLS)** is the alternative:
```go
config := &email.Config{
SMTPPort: 465,
UseSSL: true,
}
```
## Error Handling
The package provides detailed, contextual errors:
```go
err := email.Send(config, message)
if err != nil {
// Error messages include context:
switch {
case strings.Contains(err.Error(), "invalid email configuration"):
// Configuration error (missing host, invalid port, etc.)
log.Printf("Configuration error: %v", err)
case strings.Contains(err.Error(), "invalid email message"):
// Message validation error (missing recipients, subject, body)
log.Printf("Message error: %v", err)
case strings.Contains(err.Error(), "authentication failed"):
// SMTP authentication failed (wrong credentials)
log.Printf("Auth error: %v", err)
case strings.Contains(err.Error(), "failed to connect"):
// Network/connection error
log.Printf("Connection error: %v", err)
case strings.Contains(err.Error(), "recipient rejected"):
// SMTP server rejected recipient
log.Printf("Recipient error: %v", err)
default:
log.Printf("Unknown error: %v", err)
}
}
```
### Common Error Messages
```
❌ "invalid email configuration: SMTP host is required"
→ Fix: Set config.SMTPHost
❌ "invalid email configuration: SMTP port must be between 1 and 65535"
→ Fix: Set valid config.SMTPPort (usually 587 or 465)
❌ "invalid email configuration: from email is required"
→ Fix: Set config.FromEmail
❌ "invalid email message: at least one recipient is required"
→ Fix: Set message.To with at least one email address
❌ "invalid email message: subject is required"
→ Fix: Set message.Subject
❌ "invalid email message: body is required"
→ Fix: Set message.Body
❌ "SMTP authentication failed"
→ Fix: Check credentials (username/password)
❌ "failed to connect to SMTP server"
→ Fix: Verify host/port, check firewall, ensure TLS/SSL settings match server
```
### Async Error Handling
For async sending, errors are logged automatically:
```go
email.SendAsync(config, message)
// Errors logged as:
// [WARN] Failed to send email asynchronously recipients=user@example.com error=...
```
## Dependencies
### Required
- **Go 1.25+**
- Standard library: `net/smtp`, `crypto/tls`
- `github.com/pkg/errors` - Error wrapping with context
### No External SMTP Libraries
This plugin uses Go's standard `net/smtp` library for maximum compatibility and minimal dependencies.
## API Reference
### Types
#### `Config`
```go
type Config struct {
SMTPHost string // SMTP server hostname
SMTPPort int // SMTP server port
SMTPUsername string // SMTP auth username
SMTPPassword string // SMTP auth password
FromEmail string // From email address
FromName string // From display name (optional)
UseTLS bool // Enable STARTTLS (port 587)
UseSSL bool // Enable SSL/TLS (port 465)
}
```
#### `Message`
```go
type Message struct {
To []string // Recipients
Cc []string // CC recipients (optional)
Bcc []string // BCC recipients (optional)
Subject string // Email subject
Body string // Email body (plain text or HTML)
IsHTML bool // true for HTML, false for plain text
ReplyTo string // Reply-To address (optional)
}
```
### Functions
#### `Send(config *Config, message *Message) error`
Sends an email synchronously. Blocks until email is sent or error occurs.
#### `SendAsync(config *Config, message *Message)`
Sends an email asynchronously in a goroutine. Returns immediately. Errors are logged.
#### `NewClient(config *Config) *Client`
Creates a new SMTP client for advanced usage.
#### `Client.Send(message *Message) error`
Sends email using the client's configuration.
## Architecture
```
internal/email/
├── config.go # SMTP configuration types
├── message.go # Email message types and formatting
├── client.go # SMTP client implementation
├── email.go # High-level Send/SendAsync API
├── doc.go # Package documentation
└── *_test.go # Unit tests
```
## License
Part of the Memos project. See main repository for license details.
## Contributing
This package follows the Memos contribution guidelines. Please ensure:
1. All code is tested (TDD approach)
2. Tests pass: `go test ./internal/email/... -v`
3. Code is formatted: `go fmt ./internal/email/...`
4. No linting errors: `golangci-lint run ./internal/email/...`
## Support
For issues and questions:
- Memos GitHub Issues: https://github.com/usememos/memos/issues
- Memos Documentation: https://usememos.com/docs
## Roadmap
Future enhancements may include:
- Email template system
- Attachment support
- Inline image embedding
- Email queuing system
- Delivery status tracking
- Bounce handling
+173
View File
@@ -0,0 +1,173 @@
package email
import (
"crypto/tls"
"net"
"net/smtp"
"time"
"github.com/pkg/errors"
)
const smtpOperationTimeout = 15 * time.Second
// Client represents an SMTP email client.
type Client struct {
config *Config
}
// NewClient creates a new email client with the given configuration.
func NewClient(config *Config) *Client {
return &Client{
config: config,
}
}
// validateConfig validates the client configuration.
func (c *Client) validateConfig() error {
if c.config == nil {
return errors.New("email configuration is required")
}
return c.config.Validate()
}
// createAuth creates an SMTP auth mechanism if credentials are provided.
func (c *Client) createAuth() smtp.Auth {
if c.config.SMTPUsername == "" && c.config.SMTPPassword == "" {
return nil
}
return smtp.PlainAuth("", c.config.SMTPUsername, c.config.SMTPPassword, c.config.SMTPHost)
}
// createTLSConfig creates a TLS configuration for secure connections.
func (c *Client) createTLSConfig() *tls.Config {
return &tls.Config{
ServerName: c.config.SMTPHost,
MinVersion: tls.VersionTLS12,
}
}
// Send sends an email message via SMTP.
func (c *Client) Send(message *Message) error {
// Validate configuration
if err := c.validateConfig(); err != nil {
return errors.Wrap(err, "invalid email configuration")
}
// Validate message
if message == nil {
return errors.New("message is required")
}
if err := message.Validate(); err != nil {
return errors.Wrap(err, "invalid email message")
}
// Format the message
body := message.Format(c.config.FromEmail, c.config.FromName)
// Get all recipients
recipients := message.GetAllRecipients()
// Create auth
auth := c.createAuth()
// Send based on encryption type
if c.config.UseSSL {
return c.sendWithSSL(auth, recipients, body)
}
return c.sendWithTLS(auth, recipients, body)
}
// sendWithTLS sends email using STARTTLS (port 587).
func (c *Client) sendWithTLS(auth smtp.Auth, recipients []string, body string) error {
serverAddr := c.config.GetServerAddress()
dialer := &net.Dialer{Timeout: smtpOperationTimeout}
conn, err := dialer.Dial("tcp", serverAddr)
if err != nil {
return errors.Wrapf(err, "failed to connect to SMTP server: %s", serverAddr)
}
defer conn.Close()
if err := conn.SetDeadline(time.Now().Add(smtpOperationTimeout)); err != nil {
return errors.Wrap(err, "failed to set SMTP connection deadline")
}
client, err := smtp.NewClient(conn, c.config.SMTPHost)
if err != nil {
return errors.Wrap(err, "failed to create SMTP client")
}
defer client.Quit()
if c.config.UseTLS {
if ok, _ := client.Extension("STARTTLS"); !ok {
return errors.New("SMTP server does not support STARTTLS")
}
if err := client.StartTLS(c.createTLSConfig()); err != nil {
return errors.Wrap(err, "failed to start SMTP STARTTLS")
}
}
return c.sendWithClient(client, auth, recipients, body)
}
// sendWithSSL sends email using SSL/TLS (port 465).
func (c *Client) sendWithSSL(auth smtp.Auth, recipients []string, body string) error {
serverAddr := c.config.GetServerAddress()
// Create TLS connection
tlsConfig := c.createTLSConfig()
dialer := &net.Dialer{Timeout: smtpOperationTimeout}
conn, err := tls.DialWithDialer(dialer, "tcp", serverAddr, tlsConfig)
if err != nil {
return errors.Wrapf(err, "failed to connect to SMTP server with SSL: %s", serverAddr)
}
defer conn.Close()
if err := conn.SetDeadline(time.Now().Add(smtpOperationTimeout)); err != nil {
return errors.Wrap(err, "failed to set SMTP connection deadline")
}
// Create SMTP client
client, err := smtp.NewClient(conn, c.config.SMTPHost)
if err != nil {
return errors.Wrap(err, "failed to create SMTP client")
}
defer client.Quit()
return c.sendWithClient(client, auth, recipients, body)
}
func (c *Client) sendWithClient(client *smtp.Client, auth smtp.Auth, recipients []string, body string) error {
if auth != nil {
if err := client.Auth(auth); err != nil {
return errors.Wrap(err, "SMTP authentication failed")
}
}
// Set sender
if err := client.Mail(c.config.FromEmail); err != nil {
return errors.Wrap(err, "failed to set sender")
}
// Set recipients
for _, recipient := range recipients {
if err := client.Rcpt(recipient); err != nil {
return errors.Wrapf(err, "failed to set recipient: %s", recipient)
}
}
// Send message body
writer, err := client.Data()
if err != nil {
return errors.Wrap(err, "failed to send DATA command")
}
if _, err := writer.Write([]byte(body)); err != nil {
return errors.Wrap(err, "failed to write message body")
}
if err := writer.Close(); err != nil {
return errors.Wrap(err, "failed to close message writer")
}
return nil
}
+121
View File
@@ -0,0 +1,121 @@
package email
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestNewClient(t *testing.T) {
config := &Config{
SMTPHost: "smtp.example.com",
SMTPPort: 587,
SMTPUsername: "user@example.com",
SMTPPassword: "password",
FromEmail: "noreply@example.com",
FromName: "Test App",
UseTLS: true,
}
client := NewClient(config)
assert.NotNil(t, client)
assert.Equal(t, config, client.config)
}
func TestClientValidateConfig(t *testing.T) {
tests := []struct {
name string
config *Config
wantErr bool
}{
{
name: "valid config",
config: &Config{
SMTPHost: "smtp.example.com",
SMTPPort: 587,
FromEmail: "test@example.com",
},
wantErr: false,
},
{
name: "nil config",
config: nil,
wantErr: true,
},
{
name: "invalid config",
config: &Config{
SMTPHost: "",
SMTPPort: 587,
},
wantErr: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
client := NewClient(tt.config)
err := client.validateConfig()
if tt.wantErr {
assert.Error(t, err)
} else {
assert.NoError(t, err)
}
})
}
}
func TestClientSendValidation(t *testing.T) {
config := &Config{
SMTPHost: "smtp.example.com",
SMTPPort: 587,
FromEmail: "test@example.com",
}
client := NewClient(config)
tests := []struct {
name string
message *Message
wantErr bool
}{
{
name: "valid message",
message: &Message{
To: []string{"recipient@example.com"},
Subject: "Test",
Body: "Test body",
},
wantErr: false, // Will fail on actual send, but passes validation
},
{
name: "nil message",
message: nil,
wantErr: true,
},
{
name: "invalid message",
message: &Message{
To: []string{},
Subject: "Test",
Body: "Test",
},
wantErr: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
err := client.Send(tt.message)
// We expect validation errors for invalid messages
// For valid messages, we'll get connection errors (which is expected in tests)
if tt.wantErr {
assert.Error(t, err)
// Should fail validation before attempting connection
assert.NotContains(t, err.Error(), "dial")
}
// Note: We don't assert NoError for valid messages because
// we don't have a real SMTP server in tests
})
}
}
+47
View File
@@ -0,0 +1,47 @@
package email
import (
"fmt"
"github.com/pkg/errors"
)
// Config represents the SMTP configuration for email sending.
// These settings should be provided by the self-hosted instance administrator.
type Config struct {
// SMTPHost is the SMTP server hostname (e.g., "smtp.gmail.com")
SMTPHost string
// SMTPPort is the SMTP server port (common: 587 for TLS, 465 for SSL, 25 for unencrypted)
SMTPPort int
// SMTPUsername is the SMTP authentication username (usually the email address)
SMTPUsername string
// SMTPPassword is the SMTP authentication password or app-specific password
SMTPPassword string
// FromEmail is the email address that will appear in the "From" field
FromEmail string
// FromName is the display name that will appear in the "From" field
FromName string
// UseTLS enables STARTTLS encryption (recommended for port 587)
UseTLS bool
// UseSSL enables SSL/TLS encryption (for port 465)
UseSSL bool
}
// Validate checks if the configuration is valid.
func (c *Config) Validate() error {
if c.SMTPHost == "" {
return errors.New("SMTP host is required")
}
if c.SMTPPort <= 0 || c.SMTPPort > 65535 {
return errors.New("SMTP port must be between 1 and 65535")
}
if c.FromEmail == "" {
return errors.New("from email is required")
}
return nil
}
// GetServerAddress returns the SMTP server address in the format "host:port".
func (c *Config) GetServerAddress() string {
return fmt.Sprintf("%s:%d", c.SMTPHost, c.SMTPPort)
}
+80
View File
@@ -0,0 +1,80 @@
package email
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestConfigValidation(t *testing.T) {
tests := []struct {
name string
config *Config
wantErr bool
}{
{
name: "valid config",
config: &Config{
SMTPHost: "smtp.gmail.com",
SMTPPort: 587,
SMTPUsername: "user@example.com",
SMTPPassword: "password",
FromEmail: "noreply@example.com",
FromName: "Memos",
},
wantErr: false,
},
{
name: "missing host",
config: &Config{
SMTPPort: 587,
SMTPUsername: "user@example.com",
SMTPPassword: "password",
FromEmail: "noreply@example.com",
},
wantErr: true,
},
{
name: "invalid port",
config: &Config{
SMTPHost: "smtp.gmail.com",
SMTPPort: 0,
SMTPUsername: "user@example.com",
SMTPPassword: "password",
FromEmail: "noreply@example.com",
},
wantErr: true,
},
{
name: "missing from email",
config: &Config{
SMTPHost: "smtp.gmail.com",
SMTPPort: 587,
SMTPUsername: "user@example.com",
SMTPPassword: "password",
},
wantErr: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
err := tt.config.Validate()
if tt.wantErr {
assert.Error(t, err)
} else {
assert.NoError(t, err)
}
})
}
}
func TestConfigGetServerAddress(t *testing.T) {
config := &Config{
SMTPHost: "smtp.gmail.com",
SMTPPort: 587,
}
expected := "smtp.gmail.com:587"
assert.Equal(t, expected, config.GetServerAddress())
}
+98
View File
@@ -0,0 +1,98 @@
// Package email provides SMTP email sending functionality for self-hosted Memos instances.
//
// This package is designed for self-hosted environments where instance administrators
// configure their own SMTP servers. It follows industry-standard patterns used by
// platforms like GitHub, GitLab, and Discourse.
//
// # Configuration
//
// The package requires SMTP server configuration provided by the instance administrator:
//
// config := &email.Config{
// SMTPHost: "smtp.gmail.com",
// SMTPPort: 587,
// SMTPUsername: "your-email@gmail.com",
// SMTPPassword: "your-app-password",
// FromEmail: "noreply@yourdomain.com",
// FromName: "Memos Notifications",
// UseTLS: true,
// }
//
// # Common SMTP Settings
//
// Gmail (requires App Password):
// - Host: smtp.gmail.com
// - Port: 587 (TLS) or 465 (SSL)
// - Username: your-email@gmail.com
// - UseTLS: true (for port 587) or UseSSL: true (for port 465)
//
// SendGrid:
// - Host: smtp.sendgrid.net
// - Port: 587
// - Username: apikey
// - Password: your-sendgrid-api-key
// - UseTLS: true
//
// AWS SES:
// - Host: email-smtp.[region].amazonaws.com
// - Port: 587
// - Username: your-smtp-username
// - Password: your-smtp-password
// - UseTLS: true
//
// Mailgun:
// - Host: smtp.mailgun.org
// - Port: 587
// - Username: your-mailgun-smtp-username
// - Password: your-mailgun-smtp-password
// - UseTLS: true
//
// # Sending Email
//
// Synchronous (waits for completion):
//
// message := &email.Message{
// To: []string{"user@example.com"},
// Subject: "Welcome to Memos",
// Body: "Thank you for joining!",
// IsHTML: false,
// }
//
// err := email.Send(config, message)
// if err != nil {
// // Handle error
// }
//
// Asynchronous (returns immediately):
//
// email.SendAsync(config, message)
// // Errors are logged but not returned
//
// # HTML Email
//
// message := &email.Message{
// To: []string{"user@example.com"},
// Subject: "Welcome!",
// Body: "<html><body><h1>Welcome to Memos!</h1></body></html>",
// IsHTML: true,
// }
//
// # Security Considerations
//
// - Always use TLS (port 587) or SSL (port 465) for production
// - Store SMTP credentials securely (environment variables or secrets management)
// - Use app-specific passwords for services like Gmail
// - Validate and sanitize email content to prevent injection attacks
// - Rate limit email sending to prevent abuse
//
// # Error Handling
//
// The package returns descriptive errors for common issues:
// - Configuration validation errors (missing host, invalid port, etc.)
// - Message validation errors (missing recipients, subject, or body)
// - Connection errors (cannot reach SMTP server)
// - Authentication errors (invalid credentials)
// - SMTP protocol errors (recipient rejected, etc.)
//
// All errors are wrapped with context using github.com/pkg/errors for better debugging.
package email
+61
View File
@@ -0,0 +1,61 @@
package email
import (
"log/slog"
"github.com/pkg/errors"
)
type asyncEmailRequest struct {
config *Config
message *Message
}
var asyncEmailQueue = make(chan asyncEmailRequest, 128)
func init() {
for range 2 {
go func() {
for request := range asyncEmailQueue {
if err := Send(request.config, request.message); err != nil {
recipients := ""
if request.message != nil && len(request.message.To) > 0 {
recipients = request.message.To[0]
if len(request.message.To) > 1 {
recipients += " and others"
}
}
slog.Warn("Failed to send email asynchronously",
slog.String("recipients", recipients),
slog.Any("error", err))
}
}
}()
}
}
// Send sends an email synchronously.
// Returns an error if the email fails to send.
func Send(config *Config, message *Message) error {
if config == nil {
return errors.New("email configuration is required")
}
if message == nil {
return errors.New("email message is required")
}
client := NewClient(config)
return client.Send(message)
}
// SendAsync sends an email asynchronously.
// It enqueues the message for bounded asynchronous sending and does not wait for the response.
// Any errors are logged but not returned.
func SendAsync(config *Config, message *Message) {
select {
case asyncEmailQueue <- asyncEmailRequest{config: config, message: message}:
default:
slog.Warn("Dropped email because the async queue is full")
}
}
+127
View File
@@ -0,0 +1,127 @@
package email
import (
"testing"
"time"
"github.com/stretchr/testify/assert"
"golang.org/x/sync/errgroup"
)
func TestSend(t *testing.T) {
config := &Config{
SMTPHost: "smtp.example.com",
SMTPPort: 587,
FromEmail: "test@example.com",
}
message := &Message{
To: []string{"recipient@example.com"},
Subject: "Test",
Body: "Test body",
}
// This will fail to connect (no real server), but should validate inputs
err := Send(config, message)
// We expect an error because there's no real SMTP server
// But it should be a connection error, not a validation error
assert.Error(t, err)
assert.Contains(t, err.Error(), "dial")
}
func TestSendValidation(t *testing.T) {
tests := []struct {
name string
config *Config
message *Message
wantErr bool
errMsg string
}{
{
name: "nil config",
config: nil,
message: &Message{To: []string{"test@example.com"}, Subject: "Test", Body: "Test"},
wantErr: true,
errMsg: "configuration is required",
},
{
name: "nil message",
config: &Config{SMTPHost: "smtp.example.com", SMTPPort: 587, FromEmail: "from@example.com"},
message: nil,
wantErr: true,
errMsg: "message is required",
},
{
name: "invalid config",
config: &Config{
SMTPHost: "",
SMTPPort: 587,
},
message: &Message{To: []string{"test@example.com"}, Subject: "Test", Body: "Test"},
wantErr: true,
errMsg: "invalid email configuration",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
err := Send(tt.config, tt.message)
if tt.wantErr {
assert.Error(t, err)
assert.Contains(t, err.Error(), tt.errMsg)
}
})
}
}
func TestSendAsync(t *testing.T) {
config := &Config{
SMTPHost: "smtp.example.com",
SMTPPort: 587,
FromEmail: "test@example.com",
}
message := &Message{
To: []string{"recipient@example.com"},
Subject: "Test Async",
Body: "Test async body",
}
// SendAsync should not block
start := time.Now()
SendAsync(config, message)
duration := time.Since(start)
// Should return almost immediately (< 100ms)
assert.Less(t, duration, 100*time.Millisecond)
// Give goroutine time to start
time.Sleep(50 * time.Millisecond)
}
func TestSendAsyncConcurrent(t *testing.T) {
config := &Config{
SMTPHost: "smtp.example.com",
SMTPPort: 587,
FromEmail: "test@example.com",
}
g := errgroup.Group{}
count := 5
for i := 0; i < count; i++ {
g.Go(func() error {
message := &Message{
To: []string{"recipient@example.com"},
Subject: "Concurrent Test",
Body: "Test body",
}
SendAsync(config, message)
return nil
})
}
if err := g.Wait(); err != nil {
t.Fatalf("SendAsync calls failed: %v", err)
}
}
+110
View File
@@ -0,0 +1,110 @@
package email
import (
"errors"
"fmt"
"strings"
"time"
)
// Message represents an email message to be sent.
type Message struct {
To []string // Required: recipient email addresses
Cc []string // Optional: carbon copy recipients
Bcc []string // Optional: blind carbon copy recipients
Subject string // Required: email subject
Body string // Required: email body content
IsHTML bool // Whether the body is HTML (default: false for plain text)
ReplyTo string // Optional: reply-to address
}
// Validate checks that the message has all required fields.
func (m *Message) Validate() error {
if len(m.To) == 0 {
return errors.New("at least one recipient is required")
}
if m.Subject == "" {
return errors.New("subject is required")
}
if m.Body == "" {
return errors.New("body is required")
}
return nil
}
// Format creates an RFC 5322 formatted email message.
func (m *Message) Format(fromEmail, fromName string) string {
var sb strings.Builder
fromEmail = sanitizeEmailHeaderValue(fromEmail)
fromName = sanitizeEmailHeaderValue(fromName)
to := sanitizeEmailHeaderValues(m.To)
cc := sanitizeEmailHeaderValues(m.Cc)
replyTo := sanitizeEmailHeaderValue(m.ReplyTo)
subject := sanitizeEmailHeaderValue(m.Subject)
// From header
if fromName != "" {
fmt.Fprintf(&sb, "From: %s <%s>\r\n", fromName, fromEmail)
} else {
fmt.Fprintf(&sb, "From: %s\r\n", fromEmail)
}
// To header
fmt.Fprintf(&sb, "To: %s\r\n", strings.Join(to, ", "))
// Cc header (optional)
if len(cc) > 0 {
fmt.Fprintf(&sb, "Cc: %s\r\n", strings.Join(cc, ", "))
}
// Reply-To header (optional)
if replyTo != "" {
fmt.Fprintf(&sb, "Reply-To: %s\r\n", replyTo)
}
// Subject header
fmt.Fprintf(&sb, "Subject: %s\r\n", subject)
// Date header (RFC 5322 format)
fmt.Fprintf(&sb, "Date: %s\r\n", time.Now().Format(time.RFC1123Z))
// MIME headers
sb.WriteString("MIME-Version: 1.0\r\n")
// Content-Type header
if m.IsHTML {
sb.WriteString("Content-Type: text/html; charset=utf-8\r\n")
} else {
sb.WriteString("Content-Type: text/plain; charset=utf-8\r\n")
}
// Empty line separating headers from body
sb.WriteString("\r\n")
// Body
sb.WriteString(m.Body)
return sb.String()
}
func sanitizeEmailHeaderValue(value string) string {
value = strings.NewReplacer("\r", " ", "\n", " ").Replace(value)
return strings.Join(strings.Fields(value), " ")
}
func sanitizeEmailHeaderValues(values []string) []string {
sanitized := make([]string, 0, len(values))
for _, value := range values {
sanitized = append(sanitized, sanitizeEmailHeaderValue(value))
}
return sanitized
}
// GetAllRecipients returns all recipients (To, Cc, Bcc) as a single slice.
func (m *Message) GetAllRecipients() []string {
var recipients []string
recipients = append(recipients, m.To...)
recipients = append(recipients, m.Cc...)
recipients = append(recipients, m.Bcc...)
return recipients
}
+204
View File
@@ -0,0 +1,204 @@
package email
import (
"strings"
"testing"
)
func TestMessageValidation(t *testing.T) {
tests := []struct {
name string
msg Message
wantErr bool
}{
{
name: "valid message",
msg: Message{
To: []string{"user@example.com"},
Subject: "Test Subject",
Body: "Test Body",
},
wantErr: false,
},
{
name: "no recipients",
msg: Message{
To: []string{},
Subject: "Test Subject",
Body: "Test Body",
},
wantErr: true,
},
{
name: "no subject",
msg: Message{
To: []string{"user@example.com"},
Subject: "",
Body: "Test Body",
},
wantErr: true,
},
{
name: "no body",
msg: Message{
To: []string{"user@example.com"},
Subject: "Test Subject",
Body: "",
},
wantErr: true,
},
{
name: "multiple recipients",
msg: Message{
To: []string{"user1@example.com", "user2@example.com"},
Cc: []string{"cc@example.com"},
Subject: "Test Subject",
Body: "Test Body",
},
wantErr: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
err := tt.msg.Validate()
if (err != nil) != tt.wantErr {
t.Errorf("Validate() error = %v, wantErr %v", err, tt.wantErr)
}
})
}
}
func TestMessageFormatPlainText(t *testing.T) {
msg := Message{
To: []string{"user@example.com"},
Subject: "Test Subject",
Body: "Test Body",
IsHTML: false,
}
formatted := msg.Format("sender@example.com", "Sender Name")
// Check required headers
if !strings.Contains(formatted, "From: Sender Name <sender@example.com>") {
t.Error("Missing or incorrect From header")
}
if !strings.Contains(formatted, "To: user@example.com") {
t.Error("Missing or incorrect To header")
}
if !strings.Contains(formatted, "Subject: Test Subject") {
t.Error("Missing or incorrect Subject header")
}
if !strings.Contains(formatted, "Content-Type: text/plain; charset=utf-8") {
t.Error("Missing or incorrect Content-Type header for plain text")
}
if !strings.Contains(formatted, "Test Body") {
t.Error("Missing message body")
}
}
func TestMessageFormatHTML(t *testing.T) {
msg := Message{
To: []string{"user@example.com"},
Subject: "Test Subject",
Body: "<html><body>Test Body</body></html>",
IsHTML: true,
}
formatted := msg.Format("sender@example.com", "Sender Name")
// Check HTML content-type
if !strings.Contains(formatted, "Content-Type: text/html; charset=utf-8") {
t.Error("Missing or incorrect Content-Type header for HTML")
}
if !strings.Contains(formatted, "<html><body>Test Body</body></html>") {
t.Error("Missing HTML body")
}
}
func TestMessageFormatMultipleRecipients(t *testing.T) {
msg := Message{
To: []string{"user1@example.com", "user2@example.com"},
Cc: []string{"cc1@example.com", "cc2@example.com"},
Bcc: []string{"bcc@example.com"},
Subject: "Test Subject",
Body: "Test Body",
ReplyTo: "reply@example.com",
}
formatted := msg.Format("sender@example.com", "Sender Name")
// Check To header formatting
if !strings.Contains(formatted, "To: user1@example.com, user2@example.com") {
t.Error("Missing or incorrect To header with multiple recipients")
}
// Check Cc header formatting
if !strings.Contains(formatted, "Cc: cc1@example.com, cc2@example.com") {
t.Error("Missing or incorrect Cc header")
}
// Bcc should NOT appear in the formatted message
if strings.Contains(formatted, "Bcc:") {
t.Error("Bcc header should not appear in formatted message")
}
// Check Reply-To header
if !strings.Contains(formatted, "Reply-To: reply@example.com") {
t.Error("Missing or incorrect Reply-To header")
}
}
func TestMessageFormatSanitizesHeaderValues(t *testing.T) {
msg := Message{
To: []string{"user@example.com\r\nX-Injected-To: bad"},
Cc: []string{"cc@example.com\r\nX-Injected-Cc: bad"},
Subject: "Test\r\nX-Injected-Subject: bad",
Body: "Test Body",
ReplyTo: "reply@example.com\r\nX-Injected-Reply-To: bad",
}
formatted := msg.Format("sender@example.com\r\nX-Injected-From: bad", "Sender\r\nX-Injected-Name: bad")
headers := strings.SplitN(formatted, "\r\n\r\n", 2)[0]
if strings.Contains(headers, "\r\nX-Injected") {
t.Fatalf("header value injection was not sanitized:\n%s", headers)
}
if !strings.Contains(headers, "Subject: Test X-Injected-Subject: bad") {
t.Error("subject header was not normalized")
}
if !strings.Contains(headers, "From: Sender X-Injected-Name: bad <sender@example.com X-Injected-From: bad>") {
t.Error("from header was not normalized")
}
}
func TestGetAllRecipients(t *testing.T) {
msg := Message{
To: []string{"user1@example.com", "user2@example.com"},
Cc: []string{"cc@example.com"},
Bcc: []string{"bcc@example.com"},
}
recipients := msg.GetAllRecipients()
// Should have all 4 recipients
if len(recipients) != 4 {
t.Errorf("GetAllRecipients() returned %d recipients, want 4", len(recipients))
}
// Check all recipients are present
expectedRecipients := map[string]bool{
"user1@example.com": true,
"user2@example.com": true,
"cc@example.com": true,
"bcc@example.com": true,
}
for _, recipient := range recipients {
if !expectedRecipients[recipient] {
t.Errorf("Unexpected recipient: %s", recipient)
}
delete(expectedRecipients, recipient)
}
if len(expectedRecipients) > 0 {
t.Error("Not all expected recipients were returned")
}
}
+50
View File
@@ -0,0 +1,50 @@
# Maintaining the Memo Filter Engine
The engine is memo-specific; any future field or behavior changes must stay
consistent with the memo schema and store implementations. Use this guide when
extending or debugging the package.
## Adding a New Memo Field
1. **Update the schema**
- Add the field entry in `schema.go`.
- Define the backing column (`Column`), JSON path (if applicable), type, and
allowed operators.
- Include the CEL variable in `EnvOptions`.
2. **Adjust parser or renderer (if needed)**
- For non-scalar fields (JSON booleans, lists), add handling in
`parser.go` or extend the renderer helpers.
- Keep validation in the parser (e.g., reject unsupported operators).
3. **Write a golden test**
- Extend the dialect-specific memo filter tests under
`store/db/{sqlite,mysql,postgres}/memo_filter_test.go` with a case that
exercises the new field.
4. **Run `go test ./...`** to ensure the SQL output matches expectations across
all dialects.
## Supporting Dialect Nuances
- Centralize differences inside `render.go`. If a new dialect-specific behavior
emerges (e.g., JSON operators), add the logic there rather than leaking it
into store code.
- Use the renderer helpers (`jsonExtractExpr`, `jsonArrayExpr`, etc.) rather than
sprinkling ad-hoc SQL strings.
- When placeholders change, adjust `addArg` so that argument numbering stays in
sync with store queries.
## Debugging Tips
- **Parser errors** Most originate in `buildCondition` or schema validation.
Enable logging around `parser.go` when diagnosing unknown identifier/operator
messages.
- **Renderer output** Temporary printf/log statements in `renderCondition` help
identify which IR node produced unexpected SQL.
- **Store integration** Ensure drivers call `filter.DefaultEngine()` exactly once
per process; the singleton caches the parsed CEL environment.
## Testing Checklist
- `go test ./store/...` ensures all dialect tests consume the engine correctly.
- Add targeted unit tests whenever new IR nodes or renderer paths are introduced.
- When changing boolean or JSON handling, verify all three dialect test suites
(SQLite, MySQL, Postgres) to avoid regression.
+105
View File
@@ -0,0 +1,105 @@
# Memo Filter Engine
This package houses the memo-only filter engine that turns standard CEL syntax
into SQL fragments for the subset of expressions supported by the memo schema.
The engine follows a three phase pipeline inspired by systems
such as Calcite or Prisma:
1. **Parsing** CEL expressions are parsed with `cel-go` and validated against
the memo-specific environment declared in `schema.go`. Only fields that
exist in the schema can surface in the filter, and non-standard legacy
coercions are rejected.
2. **Normalization** the raw CEL AST is converted into an intermediate
representation (IR) defined in `ir.go`. The IR is a dialect-agnostic tree of
conditions (logical operators, comparisons, list membership, etc.). This
step enforces schema rules (e.g. operator compatibility, type checks).
3. **Rendering** the renderer in `render.go` walks the IR and produces a SQL
fragment plus placeholder arguments tailored to a target dialect
(`sqlite`, `mysql`, or `postgres`). Dialect differences such as JSON access,
boolean semantics, placeholders, and `LIKE` vs `ILIKE` are encapsulated in
renderer helpers.
The entry point is `filter.DefaultEngine()` from `engine.go`. It lazily constructs
an `Engine` configured with the memo schema and exposes:
```go
engine, _ := filter.DefaultEngine()
stmt, _ := engine.CompileToStatement(ctx, `has_task_list && visibility == "PUBLIC"`, filter.RenderOptions{
Dialect: filter.DialectPostgres,
})
// stmt.SQL -> "((memo.payload->'property'->>'hasTaskList')::boolean IS TRUE AND memo.visibility = $1)"
// stmt.Args -> ["PUBLIC"]
```
## Core Files
| File | Responsibility |
| ------------- | ------------------------------------------------------------------------------- |
| `schema.go` | Declares memo fields, their types, backing columns, CEL environment options |
| `ir.go` | IR node definitions used across the pipeline |
| `parser.go` | Converts CEL `Expr` into IR while applying schema validation |
| `render.go` | Translates IR into SQL, handling dialect-specific behavior |
| `engine.go` | Glue between the phases; exposes `Compile`, `CompileToStatement`, and `DefaultEngine` |
| `helpers.go` | Convenience helpers for store integration (appending conditions) |
## SQL Generation Notes
- **Placeholders** — `?` is used for SQLite/MySQL, `$n` for Postgres. The renderer
tracks offsets to compose queries with pre-existing arguments.
- **JSON Fields** — Memo metadata lives in `memo.payload`. The renderer handles
`JSON_EXTRACT`/`json_extract`/`->`/`->>` variations and boolean coercion.
- **Time Fields** — `created_ts`, `updated_ts`, and attachment `create_time` are
CEL `timestamp` values. Express instants with the `now` variable,
`duration("…")` (e.g. `created_ts >= now - duration("24h")`), or
`timestamp("2006-01-02T15:04:05Z")` / `timestamp(<epoch-seconds>)`. These fold
to epoch seconds at compile time — `now` is frozen once per compile (injectable
for tests via the engine clock) — so the backing columns stay unchanged.
- **Tag Operations** — `tag in [...]` and `"tag" in tags` become JSON array
predicates. SQLite uses `LIKE` patterns, MySQL uses `JSON_CONTAINS`, and
Postgres uses `@>`.
- **Boolean Flags** — Fields such as `has_task_list` render as `IS TRUE` equality
checks, or comparisons against `CAST('true' AS JSON)` depending on the dialect.
- **String Matching** — `content.contains(x)`, `content.startsWith(x)`, and
`content.endsWith(x)` render as case-insensitive `LIKE`/`ILIKE` with LIKE
metacharacters (`%`, `_`, `\`) escaped. Available on scalar string fields whose
schema sets `SupportsContains` (memo `content`; attachment `filename`,
`mime_type`).
- **Regex** — `field.matches("pattern")` renders to `~` (Postgres) or `REGEXP`
(MySQL/SQLite). SQLite uses a Go-backed `regexp` function registered in
`store/db/sqlite/functions.go`. Patterns are validated at compile time against
Go's RE2 via `cel.ValidateRegexLiterals()`. **Caveat:** regex *syntax* differs
per engine (Go RE2 on SQLite, POSIX ERE on Postgres, ICU on MySQL 8.0+), so
engine-specific patterns may not be portable.
- **Tag `all()` / `exists_one()`** — `tags.all(t, <pred>)` matches only non-empty
tag sets where every element satisfies the predicate; `tags.exists_one(t,
<pred>)` matches when exactly one element does (`COUNT(...) = 1`). Both iterate
per-element (`json_each` / `jsonb_array_elements_text` / `JSON_TABLE`).
- **Timestamp Accessors** — `created_ts.getFullYear()`, `getMonth()`, `getDate()`,
`getDayOfMonth()`, `getDayOfWeek()`, `getDayOfYear()`, `getHours()`,
`getMinutes()`, `getSeconds()` render to date-part extraction (`strftime` /
`EXTRACT` / `YEAR`/`MONTH`/…). Results are normalized to CEL's base (0-based
month, 0-based day-of-week with 0 = Sunday). The same accessors on `now` fold
to literal date parts of the frozen evaluation time (UTC), so saved filters
like `created_ts.getMonth() == now.getMonth() && created_ts.getDate() ==
now.getDate()` ("on this day") re-resolve on every compile. Extraction is UTC
on SQLite/Postgres (epoch columns); on MySQL the `TIMESTAMP` column is read in
the session time zone. A timezone argument is not supported.
- **Set Operations** — `ext.Sets()`: `sets.contains(tags, [...])`,
`sets.intersects(tags, [...])`, and `sets.equivalent(tags, [...])` desugar to
exact-membership checks (AND / OR of `"v" in tags`); `equivalent` adds a
`size(tags)` length check (relies on tags being a set).
- **`size()`** — `size(tags)` renders to JSON array length; `size(content)` (and
other string fields) render to `LENGTH` / `CHAR_LENGTH` (MySQL) for code-point
counts.
- **Arithmetic** — `+`, `-`, `*`, `/`, `%` constant-fold on literal/`now`/`duration`
operands (division and modulo guard against a zero divisor).
## Typical Integration
1. Fetch the engine with `filter.DefaultEngine()`.
2. Call `CompileToStatement` using the appropriate dialect enum.
3. Append the emitted SQL fragment/args to the existing `WHERE` clause.
4. Execute the resulting query through the store driver.
The `helpers.AppendConditions` helper encapsulates steps 23 when a driver needs
to process an array of filters.
+124
View File
@@ -0,0 +1,124 @@
package filter
import (
"context"
"strings"
"sync"
"time"
"github.com/google/cel-go/cel"
"github.com/pkg/errors"
)
// Engine parses CEL filters into a dialect-agnostic condition tree.
type Engine struct {
schema Schema
env *cel.Env
// nowFunc resolves the value of the `now` variable. It is frozen once per
// Compile so a single filter sees a single instant, and is overridable in
// tests for deterministic folding.
nowFunc func() time.Time
}
// NewEngine builds a new Engine for the provided schema.
func NewEngine(schema Schema) (*Engine, error) {
env, err := cel.NewEnv(schema.EnvOptions...)
if err != nil {
return nil, errors.Wrap(err, "failed to create CEL environment")
}
return &Engine{
schema: schema,
env: env,
nowFunc: time.Now,
}, nil
}
// Program stores a compiled filter condition.
type Program struct {
schema Schema
condition Condition
}
// ConditionTree exposes the underlying condition tree.
func (p *Program) ConditionTree() Condition {
return p.condition
}
// Compile parses the filter string into an executable program.
func (e *Engine) Compile(_ context.Context, filter string) (*Program, error) {
if strings.TrimSpace(filter) == "" {
return nil, errors.New("filter expression is empty")
}
ast, issues := e.env.Compile(filter)
if issues != nil && issues.Err() != nil {
return nil, errors.Wrap(issues.Err(), "failed to compile filter")
}
parsed, err := cel.AstToParsedExpr(ast)
if err != nil {
return nil, errors.Wrap(err, "failed to convert AST")
}
cond, err := buildCondition(parsed.GetExpr(), parseContext{schema: e.schema, now: e.nowFunc()})
if err != nil {
return nil, err
}
return &Program{
schema: e.schema,
condition: cond,
}, nil
}
// CompileToStatement compiles and renders the filter in a single step.
func (e *Engine) CompileToStatement(ctx context.Context, filter string, opts RenderOptions) (Statement, error) {
program, err := e.Compile(ctx, filter)
if err != nil {
return Statement{}, err
}
return program.Render(opts)
}
// RenderOptions configure SQL rendering.
type RenderOptions struct {
Dialect DialectName
PlaceholderOffset int
DisableNullChecks bool
}
// Statement contains the rendered SQL fragment and its args.
type Statement struct {
SQL string
Args []any
}
// Render converts the program into a dialect-specific SQL fragment.
func (p *Program) Render(opts RenderOptions) (Statement, error) {
renderer := newRenderer(p.schema, opts)
return renderer.Render(p.condition)
}
var (
defaultOnce sync.Once
defaultInst *Engine
defaultErr error
defaultAttachmentOnce sync.Once
defaultAttachmentInst *Engine
defaultAttachmentErr error
)
// DefaultEngine returns the process-wide memo filter engine.
func DefaultEngine() (*Engine, error) {
defaultOnce.Do(func() {
defaultInst, defaultErr = NewEngine(NewSchema())
})
return defaultInst, defaultErr
}
// DefaultAttachmentEngine returns the process-wide attachment filter engine.
func DefaultAttachmentEngine() (*Engine, error) {
defaultAttachmentOnce.Do(func() {
defaultAttachmentInst, defaultAttachmentErr = NewEngine(NewAttachmentSchema())
})
return defaultAttachmentInst, defaultAttachmentErr
}
+197
View File
@@ -0,0 +1,197 @@
package filter
import (
"context"
"testing"
"github.com/stretchr/testify/require"
)
func TestCompileAcceptsStandardTagEqualityPredicate(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
_, err = engine.Compile(context.Background(), `tags.exists(t, t == "1231")`)
require.NoError(t, err)
}
func TestCompileRejectsLegacyNumericLogicalOperand(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
_, err = engine.Compile(context.Background(), `pinned && 1`)
require.Error(t, err)
require.Contains(t, err.Error(), "failed to compile filter")
}
func TestCompileRejectsNonBooleanTopLevelConstant(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
_, err = engine.Compile(context.Background(), `1`)
require.EqualError(t, err, "filter must evaluate to a boolean value")
}
func TestCompileRejectsMalformedRegex(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
_, err = engine.Compile(context.Background(), `content.matches("(")`)
require.Error(t, err)
}
func TestCompileMatchesRendersRegexOperator(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
stmt, err := engine.CompileToStatement(context.Background(), `content.matches("v[0-9]+")`, RenderOptions{Dialect: DialectPostgres})
require.NoError(t, err)
require.Contains(t, stmt.SQL, "~")
require.Equal(t, []any{"v[0-9]+"}, stmt.Args)
}
func TestCompileRejectsStartsWithOnUnsupportedField(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
_, err = engine.Compile(context.Background(), `visibility.startsWith("P")`)
require.Error(t, err)
require.Contains(t, err.Error(), "does not support text matching")
}
func TestCompileContainsEscapesLikeWildcards(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
stmt, err := engine.CompileToStatement(context.Background(), `content.contains("50%_off")`, RenderOptions{Dialect: DialectSQLite})
require.NoError(t, err)
// The % and _ in the value must be escaped so they are matched literally,
// and SQLite needs an explicit ESCAPE clause.
require.Contains(t, stmt.SQL, `ESCAPE '\'`)
require.Equal(t, []any{`%50\%\_off%`}, stmt.Args)
}
// =============================================================================
// Cross-dialect rendering tests (no DB required; complements the SQLite-only
// behavioral tests in store/test by asserting MySQL/Postgres SQL generation).
// =============================================================================
func TestRenderStartsWithPerDialect(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
cases := []struct {
dialect DialectName
fragments []string
}{
{DialectSQLite, []string{"memos_unicode_lower(", "`memo`.`content`", `ESCAPE '\'`}},
{DialectPostgres, []string{"memo.content ILIKE $1"}},
{DialectMySQL, []string{"`memo`.`content` LIKE ?"}},
}
for _, tc := range cases {
stmt, err := engine.CompileToStatement(context.Background(), `content.startsWith("TODO")`, RenderOptions{Dialect: tc.dialect})
require.NoError(t, err, tc.dialect)
for _, frag := range tc.fragments {
require.Contains(t, stmt.SQL, frag, "dialect %s", tc.dialect)
}
require.Equal(t, []any{"TODO%"}, stmt.Args, "dialect %s", tc.dialect)
}
}
func TestRenderEndsWithPerDialect(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
for _, dialect := range []DialectName{DialectSQLite, DialectPostgres, DialectMySQL} {
stmt, err := engine.CompileToStatement(context.Background(), `content.endsWith(".md")`, RenderOptions{Dialect: dialect})
require.NoError(t, err, dialect)
require.Equal(t, []any{"%.md"}, stmt.Args, "dialect %s", dialect)
}
}
func TestRenderMatchesPerDialect(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
cases := []struct {
dialect DialectName
fragment string
}{
{DialectSQLite, "`memo`.`content` REGEXP ?"},
{DialectMySQL, "`memo`.`content` REGEXP ?"},
{DialectPostgres, "memo.content ~ $1"},
}
for _, tc := range cases {
stmt, err := engine.CompileToStatement(context.Background(), `content.matches("v[0-9]+")`, RenderOptions{Dialect: tc.dialect})
require.NoError(t, err, tc.dialect)
require.Contains(t, stmt.SQL, tc.fragment, "dialect %s", tc.dialect)
require.Equal(t, []any{"v[0-9]+"}, stmt.Args, "dialect %s", tc.dialect)
}
}
func TestRenderTagsAllPerDialect(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
cases := []struct {
dialect DialectName
fragments []string
}{
{DialectSQLite, []string{"NOT EXISTS", "json_each(", "!= '[]'", "memos_unicode_lower(value)"}},
{DialectPostgres, []string{"NOT EXISTS", "jsonb_array_elements_text(", "jsonb_array_length(", "value ILIKE"}},
{DialectMySQL, []string{"NOT EXISTS", "JSON_TABLE(", "JSON_LENGTH(", "value LIKE"}},
}
for _, tc := range cases {
stmt, err := engine.CompileToStatement(context.Background(), `tags.all(t, t.startsWith("work/"))`, RenderOptions{Dialect: tc.dialect})
require.NoError(t, err, tc.dialect)
for _, frag := range tc.fragments {
require.Contains(t, stmt.SQL, frag, "dialect %s", tc.dialect)
}
require.Equal(t, []any{"work/%"}, stmt.Args, "dialect %s", tc.dialect)
}
}
func TestRenderTextMatchEscaping(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
// Both % and _ in the value must be escaped so they match literally.
stmt, err := engine.CompileToStatement(context.Background(), `content.contains("a%b_c")`, RenderOptions{Dialect: DialectSQLite})
require.NoError(t, err)
require.Equal(t, []any{`%a\%b\_c%`}, stmt.Args)
}
func TestRenderAllRejectsUnsupportedPredicate(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
// size() is not a valid per-element predicate inside all().
_, err = engine.CompileToStatement(context.Background(), `tags.all(t, size(t) > 2)`, RenderOptions{Dialect: DialectSQLite})
require.Error(t, err)
}
+377
View File
@@ -0,0 +1,377 @@
package filter
import (
"context"
"testing"
"time"
"github.com/stretchr/testify/require"
)
// ---------------------------------------------------------------------------
// Arithmetic folding: division and modulo
// ---------------------------------------------------------------------------
func TestCompileDivisionFolds(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
stmt, err := engine.CompileToStatement(context.Background(), `creator_id == 100 / 10`, RenderOptions{Dialect: DialectSQLite})
require.NoError(t, err)
require.Equal(t, []any{int64(10)}, stmt.Args)
}
func TestCompileModuloFolds(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
stmt, err := engine.CompileToStatement(context.Background(), `creator_id == 17 % 5`, RenderOptions{Dialect: DialectSQLite})
require.NoError(t, err)
require.Equal(t, []any{int64(2)}, stmt.Args)
}
func TestCompileDivisionByZeroErrors(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
_, err = engine.Compile(context.Background(), `creator_id == 10 / 0`)
require.Error(t, err)
}
// ---------------------------------------------------------------------------
// size() on scalar string fields -> SQL length
// ---------------------------------------------------------------------------
func TestCompileSizeOnContentRendersLengthPerDialect(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
cases := []struct {
dialect DialectName
fragment string
}{
{DialectSQLite, "LENGTH("},
{DialectPostgres, "LENGTH("},
{DialectMySQL, "CHAR_LENGTH("},
}
for _, tc := range cases {
stmt, err := engine.CompileToStatement(context.Background(), `size(content) > 5`, RenderOptions{Dialect: tc.dialect})
require.NoError(t, err, tc.dialect)
require.Contains(t, stmt.SQL, tc.fragment, "dialect %s", tc.dialect)
require.Equal(t, []any{int64(5)}, stmt.Args, "dialect %s", tc.dialect)
}
}
// ---------------------------------------------------------------------------
// Timestamp accessor methods (getFullYear, getMonth, ...)
// ---------------------------------------------------------------------------
func TestCompileTimestampAccessorsPerDialect(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
cases := []struct {
name string
filter string
dialect DialectName
fragments []string
arg int64
}{
// getFullYear == 2024
{"sqlite year", `created_ts.getFullYear() == 2024`, DialectSQLite, []string{"strftime('%Y'", "'unixepoch'"}, 2024},
{"pg year", `created_ts.getFullYear() == 2024`, DialectPostgres, []string{"EXTRACT(YEAR FROM to_timestamp(", "AT TIME ZONE 'UTC'"}, 2024},
{"mysql year", `created_ts.getFullYear() == 2024`, DialectMySQL, []string{"YEAR(`memo`.`created_ts`)"}, 2024},
// getMonth is 0-based -> SQL must subtract 1
{"sqlite month", `created_ts.getMonth() == 5`, DialectSQLite, []string{"strftime('%m'", "- 1)"}, 5},
{"pg month", `created_ts.getMonth() == 5`, DialectPostgres, []string{"EXTRACT(MONTH FROM", "- 1)"}, 5},
{"mysql month", `created_ts.getMonth() == 5`, DialectMySQL, []string{"MONTH(`memo`.`created_ts`)", "- 1)"}, 5},
// getDayOfWeek 0=Sunday -> MySQL DAYOFWEEK is 1-based and must subtract 1
{"mysql dow", `created_ts.getDayOfWeek() == 0`, DialectMySQL, []string{"DAYOFWEEK(`memo`.`created_ts`)", "- 1)"}, 0},
{"sqlite dow", `created_ts.getDayOfWeek() == 0`, DialectSQLite, []string{"strftime('%w'"}, 0},
// getDate is 1-based -> no offset
{"sqlite date", `created_ts.getDate() == 22`, DialectSQLite, []string{"strftime('%d'"}, 22},
}
for _, tc := range cases {
stmt, err := engine.CompileToStatement(context.Background(), tc.filter, RenderOptions{Dialect: tc.dialect})
require.NoError(t, err, tc.name)
for _, frag := range tc.fragments {
require.Contains(t, stmt.SQL, frag, tc.name)
}
require.Equal(t, []any{tc.arg}, stmt.Args, tc.name)
}
}
func TestCompileNowAccessorsFoldToInjectedClock(t *testing.T) {
t.Parallel()
// 2026-07-07T10:30:45Z, a Tuesday (year day 188).
engine := memoEngineAt(t, time.Date(2026, time.July, 7, 10, 30, 45, 0, time.UTC).Unix())
cases := []struct {
name string
filter string
args []any
}{
{"on this day", `created_ts.getMonth() == now.getMonth() && created_ts.getDate() == now.getDate()`, []any{int64(6), int64(7)}},
{"year", `created_ts.getFullYear() < now.getFullYear()`, []any{int64(2026)}},
{"day of month", `created_ts.getDayOfMonth() == now.getDayOfMonth()`, []any{int64(6)}},
{"day of week", `created_ts.getDayOfWeek() == now.getDayOfWeek()`, []any{int64(2)}},
{"day of year", `created_ts.getDayOfYear() == now.getDayOfYear()`, []any{int64(187)}},
{"clock parts", `created_ts.getHours() == now.getHours() || created_ts.getMinutes() == now.getMinutes() || created_ts.getSeconds() == now.getSeconds()`, []any{int64(10), int64(30), int64(45)}},
}
for _, tc := range cases {
stmt, err := engine.CompileToStatement(context.Background(), tc.filter, RenderOptions{Dialect: DialectSQLite})
require.NoError(t, err, tc.name)
require.Equal(t, tc.args, stmt.Args, tc.name)
}
}
func TestCompileNowAccessorRejectsTimezoneArg(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
_, err = engine.Compile(context.Background(), `created_ts.getMonth() == now.getMonth("America/New_York")`)
require.Error(t, err)
}
func TestCompileOnThisDayPerDialect(t *testing.T) {
t.Parallel()
const onThisDay = `created_ts.getMonth() == now.getMonth() && created_ts.getDate() == now.getDate()`
engine := memoEngineAt(t, time.Date(2026, time.July, 7, 10, 30, 45, 0, time.UTC).Unix())
cases := []struct {
dialect DialectName
fragments []string
}{
{DialectSQLite, []string{"strftime('%m'", "strftime('%d'", "'unixepoch'"}},
{DialectPostgres, []string{"EXTRACT(MONTH FROM", "EXTRACT(DAY FROM"}},
{DialectMySQL, []string{"MONTH(`memo`.`created_ts`)", "DAYOFMONTH(`memo`.`created_ts`)"}},
}
for _, tc := range cases {
stmt, err := engine.CompileToStatement(context.Background(), onThisDay, RenderOptions{Dialect: tc.dialect})
require.NoError(t, err, tc.dialect)
for _, frag := range tc.fragments {
require.Contains(t, stmt.SQL, frag, "dialect %s", tc.dialect)
}
require.Equal(t, []any{int64(6), int64(7)}, stmt.Args, "dialect %s", tc.dialect)
}
}
func TestCompileNowAccessorsAtBoundaryDates(t *testing.T) {
t.Parallel()
// Every accessor folded at calendar edges: year rollover, leap day, Sunday.
allAccessors := `created_ts.getFullYear() == now.getFullYear() ` +
`&& created_ts.getMonth() == now.getMonth() ` +
`&& created_ts.getDate() == now.getDate() ` +
`&& created_ts.getDayOfMonth() == now.getDayOfMonth() ` +
`&& created_ts.getDayOfWeek() == now.getDayOfWeek() ` +
`&& created_ts.getDayOfYear() == now.getDayOfYear() ` +
`&& created_ts.getHours() == now.getHours() ` +
`&& created_ts.getMinutes() == now.getMinutes() ` +
`&& created_ts.getSeconds() == now.getSeconds()`
cases := []struct {
name string
clock time.Time
// year, month, date, dayOfMonth, dayOfWeek, dayOfYear, hours, minutes, seconds
args []any
}{
{
"new year's eve",
time.Date(2026, time.December, 31, 23, 59, 59, 0, time.UTC),
[]any{int64(2026), int64(11), int64(31), int64(30), int64(4), int64(364), int64(23), int64(59), int64(59)},
},
{
"new year's day",
time.Date(2027, time.January, 1, 0, 0, 0, 0, time.UTC),
[]any{int64(2027), int64(0), int64(1), int64(0), int64(5), int64(0), int64(0), int64(0), int64(0)},
},
{
"leap day",
time.Date(2028, time.February, 29, 12, 0, 0, 0, time.UTC),
[]any{int64(2028), int64(1), int64(29), int64(28), int64(2), int64(59), int64(12), int64(0), int64(0)},
},
{
"sunday",
time.Date(2026, time.July, 5, 8, 15, 30, 0, time.UTC),
[]any{int64(2026), int64(6), int64(5), int64(4), int64(0), int64(185), int64(8), int64(15), int64(30)},
},
}
for _, tc := range cases {
engine := memoEngineAt(t, tc.clock.Unix())
stmt, err := engine.CompileToStatement(context.Background(), allAccessors, RenderOptions{Dialect: DialectSQLite})
require.NoError(t, err, tc.name)
require.Equal(t, tc.args, stmt.Args, tc.name)
}
}
func TestCompileNowAccessorFoldsInUTC(t *testing.T) {
t.Parallel()
// A clock in UTC+8 at 05:00 on July 8 is still July 7, 21:00 in UTC;
// folding must not leak the clock's zone.
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
engine.nowFunc = func() time.Time {
return time.Date(2026, time.July, 8, 5, 0, 0, 0, time.FixedZone("UTC+8", 8*3600))
}
stmt, err := engine.CompileToStatement(
context.Background(),
`created_ts.getDate() == now.getDate() && created_ts.getHours() == now.getHours()`,
RenderOptions{Dialect: DialectSQLite},
)
require.NoError(t, err)
require.Equal(t, []any{int64(7), int64(21)}, stmt.Args)
}
func TestCompileNowAccessorOnLeftSide(t *testing.T) {
t.Parallel()
engine := memoEngineAt(t, time.Date(2026, time.July, 7, 10, 30, 45, 0, time.UTC).Unix())
stmt, err := engine.CompileToStatement(context.Background(), `now.getMonth() == created_ts.getMonth()`, RenderOptions{Dialect: DialectSQLite})
require.NoError(t, err)
require.Contains(t, stmt.SQL, "strftime('%m'")
require.Equal(t, []any{int64(6)}, stmt.Args)
}
func TestCompileNowAccessorMirrorsOrderingOperator(t *testing.T) {
t.Parallel()
// Swapping the literal to the right must flip < to > to keep the meaning.
engine := memoEngineAt(t, time.Date(2026, time.July, 7, 10, 30, 45, 0, time.UTC).Unix())
stmt, err := engine.CompileToStatement(context.Background(), `now.getHours() < created_ts.getHours()`, RenderOptions{Dialect: DialectSQLite})
require.NoError(t, err)
require.Contains(t, stmt.SQL, "> ?")
require.Equal(t, []any{int64(10)}, stmt.Args)
}
func TestCompileNowAccessorAgainstLiteralFoldsToConstant(t *testing.T) {
t.Parallel()
// Both sides fold to literals; the comparison folds to a constant condition.
engine := memoEngineAt(t, time.Date(2026, time.July, 7, 10, 30, 45, 0, time.UTC).Unix())
// True → trivial filter (empty SQL, matches everything).
stmt, err := engine.CompileToStatement(context.Background(), `now.getFullYear() >= 2026`, RenderOptions{Dialect: DialectSQLite})
require.NoError(t, err)
require.Empty(t, stmt.SQL)
require.Empty(t, stmt.Args)
// False → unsatisfiable filter.
stmt, err = engine.CompileToStatement(context.Background(), `now.getFullYear() < 2026`, RenderOptions{Dialect: DialectSQLite})
require.NoError(t, err)
require.Equal(t, "1 = 0", stmt.SQL)
require.Empty(t, stmt.Args)
}
func TestCompileAttachmentNowAccessors(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewAttachmentSchema())
require.NoError(t, err)
engine.nowFunc = fixedClock(time.Date(2026, time.July, 7, 10, 30, 45, 0, time.UTC).Unix())
stmt, err := engine.CompileToStatement(
context.Background(),
`create_time.getMonth() == now.getMonth() && create_time.getDate() == now.getDate()`,
RenderOptions{Dialect: DialectSQLite},
)
require.NoError(t, err)
require.Contains(t, stmt.SQL, "`attachment`.`created_ts`")
require.Equal(t, []any{int64(6), int64(7)}, stmt.Args)
}
func TestCompileTimestampAccessorRejectsTimezoneArg(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
_, err = engine.Compile(context.Background(), `created_ts.getHours("America/New_York") == 9`)
require.Error(t, err)
}
func TestCompileTimestampAccessorRejectsNonTimestampField(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
// content is a string, not a timestamp.
_, err = engine.Compile(context.Background(), `content.getFullYear() == 2024`)
require.Error(t, err)
}
// ---------------------------------------------------------------------------
// ext.Sets(): sets.contains / sets.intersects / sets.equivalent over tags
// ---------------------------------------------------------------------------
func TestCompileSetsContainsRendersAndOfMemberships(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
stmt, err := engine.CompileToStatement(context.Background(), `sets.contains(tags, ["a", "b"])`, RenderOptions{Dialect: DialectSQLite})
require.NoError(t, err)
require.Contains(t, stmt.SQL, " AND ")
require.Len(t, stmt.Args, 2)
}
func TestCompileSetsIntersectsRendersOrOfMemberships(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
stmt, err := engine.CompileToStatement(context.Background(), `sets.intersects(tags, ["a", "b"])`, RenderOptions{Dialect: DialectSQLite})
require.NoError(t, err)
require.Contains(t, stmt.SQL, " OR ")
require.Len(t, stmt.Args, 2)
}
func TestCompileSetsEquivalentAddsLengthCheck(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
stmt, err := engine.CompileToStatement(context.Background(), `sets.equivalent(tags, ["a", "b"])`, RenderOptions{Dialect: DialectSQLite})
require.NoError(t, err)
require.Contains(t, stmt.SQL, "JSON_ARRAY_LENGTH")
require.Contains(t, stmt.Args, int64(2))
}
// ---------------------------------------------------------------------------
// exists_one() comprehension on tags
// ---------------------------------------------------------------------------
func TestCompileExistsOnePerDialect(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
cases := []struct {
dialect DialectName
fragments []string
}{
{DialectSQLite, []string{"COUNT(", "json_each(", ") = 1"}},
{DialectPostgres, []string{"COUNT(", "jsonb_array_elements_text(", ") = 1"}},
{DialectMySQL, []string{"COUNT(", "JSON_TABLE(", ") = 1"}},
}
for _, tc := range cases {
stmt, err := engine.CompileToStatement(context.Background(), `tags.exists_one(t, t == "urgent")`, RenderOptions{Dialect: tc.dialect})
require.NoError(t, err, tc.dialect)
for _, frag := range tc.fragments {
require.Contains(t, stmt.SQL, frag, "dialect %s", tc.dialect)
}
require.Equal(t, []any{"urgent"}, stmt.Args, "dialect %s", tc.dialect)
}
}
+25
View File
@@ -0,0 +1,25 @@
package filter
import (
"context"
"fmt"
)
// AppendConditions compiles the provided filters and appends the resulting SQL fragments and args.
func AppendConditions(ctx context.Context, engine *Engine, filters []string, dialect DialectName, where *[]string, args *[]any) error {
for _, filterStr := range filters {
stmt, err := engine.CompileToStatement(ctx, filterStr, RenderOptions{
Dialect: dialect,
PlaceholderOffset: len(*args),
})
if err != nil {
return err
}
if stmt.SQL == "" {
continue
}
*where = append(*where, fmt.Sprintf("(%s)", stmt.SQL))
*args = append(*args, stmt.Args...)
}
return nil
}
+196
View File
@@ -0,0 +1,196 @@
package filter
// Condition represents a boolean expression derived from the CEL filter.
type Condition interface {
isCondition()
}
// LogicalOperator enumerates the supported logical operators.
type LogicalOperator string
const (
LogicalAnd LogicalOperator = "AND"
LogicalOr LogicalOperator = "OR"
)
// LogicalCondition composes two conditions with a logical operator.
type LogicalCondition struct {
Operator LogicalOperator
Left Condition
Right Condition
}
func (*LogicalCondition) isCondition() {}
// NotCondition negates a child condition.
type NotCondition struct {
Expr Condition
}
func (*NotCondition) isCondition() {}
// FieldPredicateCondition asserts that a field evaluates to true.
type FieldPredicateCondition struct {
Field string
}
func (*FieldPredicateCondition) isCondition() {}
// ComparisonOperator lists supported comparison operators.
type ComparisonOperator string
const (
CompareEq ComparisonOperator = "="
CompareNeq ComparisonOperator = "!="
CompareLt ComparisonOperator = "<"
CompareLte ComparisonOperator = "<="
CompareGt ComparisonOperator = ">"
CompareGte ComparisonOperator = ">="
)
// ComparisonCondition represents a binary comparison.
type ComparisonCondition struct {
Left ValueExpr
Operator ComparisonOperator
Right ValueExpr
}
func (*ComparisonCondition) isCondition() {}
// InCondition represents an IN predicate with literal list values.
type InCondition struct {
Left ValueExpr
Values []ValueExpr
}
func (*InCondition) isCondition() {}
// ElementInCondition represents the CEL syntax `"value" in field`.
type ElementInCondition struct {
Element ValueExpr
Field string
}
func (*ElementInCondition) isCondition() {}
// TextMatchMode enumerates LIKE-based string match modes.
type TextMatchMode string
const (
TextMatchContains TextMatchMode = "contains"
TextMatchPrefix TextMatchMode = "prefix"
TextMatchSuffix TextMatchMode = "suffix"
)
// TextMatchCondition models a case-insensitive LIKE match on a scalar string field
// (content.contains/startsWith/endsWith).
type TextMatchCondition struct {
Field string
Mode TextMatchMode
Value string
}
func (*TextMatchCondition) isCondition() {}
// RegexCondition models field.matches("pattern") on a string field.
type RegexCondition struct {
Field string
Pattern string
}
func (*RegexCondition) isCondition() {}
// ConstantCondition captures a literal boolean outcome.
type ConstantCondition struct {
Value bool
}
func (*ConstantCondition) isCondition() {}
// ValueExpr models arithmetic or scalar expressions whose result feeds a comparison.
type ValueExpr interface {
isValueExpr()
}
// FieldRef references a named schema field.
type FieldRef struct {
Name string
}
func (*FieldRef) isValueExpr() {}
// LiteralValue holds a literal scalar.
type LiteralValue struct {
Value interface{}
}
func (*LiteralValue) isValueExpr() {}
// FunctionValue captures simple function calls like size(tags).
type FunctionValue struct {
Name string
Args []ValueExpr
}
func (*FunctionValue) isValueExpr() {}
// FieldAccessorValue captures a CEL timestamp accessor on a field, such as
// created_ts.getMonth(). It renders to a dialect-specific date-part extraction.
type FieldAccessorValue struct {
Field string
Accessor string // e.g. "getFullYear", "getMonth"
}
func (*FieldAccessorValue) isValueExpr() {}
// ListComprehensionCondition represents CEL macros like exists(), all(), filter().
type ListComprehensionCondition struct {
Kind ComprehensionKind
Field string // The list field to iterate over (e.g., "tags")
IterVar string // The iteration variable name (e.g., "t")
Predicate PredicateExpr // The predicate to evaluate for each element
}
func (*ListComprehensionCondition) isCondition() {}
// ComprehensionKind enumerates the types of list comprehensions.
type ComprehensionKind string
const (
ComprehensionExists ComprehensionKind = "exists"
ComprehensionAll ComprehensionKind = "all"
ComprehensionExistsOne ComprehensionKind = "exists_one"
)
// PredicateExpr represents predicates used in comprehensions.
type PredicateExpr interface {
isPredicateExpr()
}
// StartsWithPredicate represents t.startsWith("prefix").
type StartsWithPredicate struct {
Prefix string
}
func (*StartsWithPredicate) isPredicateExpr() {}
// EndsWithPredicate represents t.endsWith("suffix").
type EndsWithPredicate struct {
Suffix string
}
func (*EndsWithPredicate) isPredicateExpr() {}
// ContainsPredicate represents t.contains("substring").
type ContainsPredicate struct {
Substring string
}
func (*ContainsPredicate) isPredicateExpr() {}
// EqualsPredicate represents t == "value".
type EqualsPredicate struct {
Value string
}
func (*EqualsPredicate) isPredicateExpr() {}
File diff suppressed because it is too large Load Diff
+980
View File
@@ -0,0 +1,980 @@
package filter
import (
"fmt"
"strings"
"github.com/pkg/errors"
)
type renderer struct {
schema Schema
dialect DialectName
placeholderOffset int
placeholderCounter int
args []any
}
type renderResult struct {
sql string
trivial bool
unsatisfiable bool
}
func newRenderer(schema Schema, opts RenderOptions) *renderer {
return &renderer{
schema: schema,
dialect: opts.Dialect,
placeholderOffset: opts.PlaceholderOffset,
}
}
func (r *renderer) Render(cond Condition) (Statement, error) {
result, err := r.renderCondition(cond)
if err != nil {
return Statement{}, err
}
args := r.args
if args == nil {
args = []any{}
}
switch {
case result.unsatisfiable:
return Statement{
SQL: "1 = 0",
Args: args,
}, nil
case result.trivial:
return Statement{
SQL: "",
Args: args,
}, nil
default:
return Statement{
SQL: result.sql,
Args: args,
}, nil
}
}
func (r *renderer) renderCondition(cond Condition) (renderResult, error) {
switch c := cond.(type) {
case *LogicalCondition:
return r.renderLogicalCondition(c)
case *NotCondition:
return r.renderNotCondition(c)
case *FieldPredicateCondition:
return r.renderFieldPredicate(c)
case *ComparisonCondition:
return r.renderComparison(c)
case *InCondition:
return r.renderInCondition(c)
case *ElementInCondition:
return r.renderElementInCondition(c)
case *TextMatchCondition:
return r.renderTextMatch(c)
case *RegexCondition:
return r.renderRegex(c)
case *ListComprehensionCondition:
return r.renderListComprehension(c)
case *ConstantCondition:
if c.Value {
return renderResult{trivial: true}, nil
}
return renderResult{sql: "1 = 0", unsatisfiable: true}, nil
default:
return renderResult{}, errors.Errorf("unsupported condition type %T", c)
}
}
func (r *renderer) renderLogicalCondition(cond *LogicalCondition) (renderResult, error) {
left, err := r.renderCondition(cond.Left)
if err != nil {
return renderResult{}, err
}
right, err := r.renderCondition(cond.Right)
if err != nil {
return renderResult{}, err
}
switch cond.Operator {
case LogicalAnd:
return combineAnd(left, right), nil
case LogicalOr:
return combineOr(left, right), nil
default:
return renderResult{}, errors.Errorf("unsupported logical operator %s", cond.Operator)
}
}
func (r *renderer) renderNotCondition(cond *NotCondition) (renderResult, error) {
child, err := r.renderCondition(cond.Expr)
if err != nil {
return renderResult{}, err
}
if child.trivial {
return renderResult{sql: "1 = 0", unsatisfiable: true}, nil
}
if child.unsatisfiable {
return renderResult{trivial: true}, nil
}
return renderResult{
sql: fmt.Sprintf("NOT (%s)", child.sql),
}, nil
}
func (r *renderer) renderFieldPredicate(cond *FieldPredicateCondition) (renderResult, error) {
field, ok := r.schema.Field(cond.Field)
if !ok {
return renderResult{}, errors.Errorf("unknown field %q", cond.Field)
}
switch field.Kind {
case FieldKindBoolColumn:
column := qualifyColumn(r.dialect, field.Column)
return renderResult{
sql: fmt.Sprintf("%s IS TRUE", column),
}, nil
case FieldKindJSONBool:
sql, err := r.jsonBoolPredicate(field)
if err != nil {
return renderResult{}, err
}
return renderResult{sql: sql}, nil
default:
return renderResult{}, errors.Errorf("field %q cannot be used as a predicate", cond.Field)
}
}
func (r *renderer) renderComparison(cond *ComparisonCondition) (renderResult, error) {
switch left := cond.Left.(type) {
case *FieldRef:
field, ok := r.schema.Field(left.Name)
if !ok {
return renderResult{}, errors.Errorf("unknown field %q", left.Name)
}
switch field.Kind {
case FieldKindBoolColumn:
return r.renderBoolColumnComparison(field, cond.Operator, cond.Right)
case FieldKindJSONBool:
return r.renderJSONBoolComparison(field, cond.Operator, cond.Right)
case FieldKindScalar:
return r.renderScalarComparison(field, cond.Operator, cond.Right)
default:
return renderResult{}, errors.Errorf("field %q does not support comparison", field.Name)
}
case *FunctionValue:
return r.renderFunctionComparison(left, cond.Operator, cond.Right)
case *FieldAccessorValue:
return r.renderAccessorComparison(left, cond.Operator, cond.Right)
default:
return renderResult{}, errors.New("comparison must start with a field reference or supported function")
}
}
// accessorSpec maps a CEL timestamp accessor to per-dialect SQL date-part tokens
// and the offset to subtract so the result matches CEL's base (e.g. CEL months
// are 0-based but every dialect reports 1-based, so off=1). off is indexed
// [sqlite, postgres, mysql].
type accessorSpec struct {
sqlite string // strftime format specifier
pg string // EXTRACT field
mysql string // function name
off [3]int
}
var accessorSpecs = map[string]accessorSpec{
"getFullYear": {"%Y", "YEAR", "YEAR", [3]int{0, 0, 0}},
"getMonth": {"%m", "MONTH", "MONTH", [3]int{1, 1, 1}},
"getDate": {"%d", "DAY", "DAYOFMONTH", [3]int{0, 0, 0}},
"getDayOfMonth": {"%d", "DAY", "DAYOFMONTH", [3]int{1, 1, 1}},
"getDayOfWeek": {"%w", "DOW", "DAYOFWEEK", [3]int{0, 0, 1}},
"getDayOfYear": {"%j", "DOY", "DAYOFYEAR", [3]int{1, 1, 1}},
"getHours": {"%H", "HOUR", "HOUR", [3]int{0, 0, 0}},
"getMinutes": {"%M", "MINUTE", "MINUTE", [3]int{0, 0, 0}},
"getSeconds": {"%S", "SECOND", "SECOND", [3]int{0, 0, 0}},
}
func (r *renderer) renderAccessorComparison(acc *FieldAccessorValue, op ComparisonOperator, right ValueExpr) (renderResult, error) {
field, ok := r.schema.Field(acc.Field)
if !ok {
return renderResult{}, errors.Errorf("unknown field %q", acc.Field)
}
value, err := expectNumericLiteral(right)
if err != nil {
return renderResult{}, err
}
expr, err := r.timestampAccessorExpr(field, acc.Accessor)
if err != nil {
return renderResult{}, err
}
placeholder := r.addArg(value)
return renderResult{
sql: fmt.Sprintf("%s %s %s", expr, sqlOperator(op), placeholder),
}, nil
}
// timestampAccessorExpr builds a dialect-specific integer expression for a CEL
// timestamp accessor. Extraction is UTC on SQLite/Postgres (epoch columns); on
// MySQL the TIMESTAMP column is read in the server session time zone.
func (r *renderer) timestampAccessorExpr(field Field, accessor string) (string, error) {
spec, ok := accessorSpecs[accessor]
if !ok {
return "", errors.Errorf("unsupported timestamp accessor %q", accessor)
}
col := qualifyColumn(r.dialect, field.Column)
var base string
var off int
switch r.dialect {
case DialectSQLite:
base = fmt.Sprintf("CAST(strftime('%s', %s, 'unixepoch') AS INTEGER)", spec.sqlite, col)
off = spec.off[0]
case DialectPostgres:
base = fmt.Sprintf("CAST(EXTRACT(%s FROM to_timestamp(%s) AT TIME ZONE 'UTC') AS INTEGER)", spec.pg, col)
off = spec.off[1]
case DialectMySQL:
base = fmt.Sprintf("%s(%s)", spec.mysql, col)
off = spec.off[2]
default:
return "", errors.Errorf("unsupported dialect %q", r.dialect)
}
if off != 0 {
base = fmt.Sprintf("(%s - %d)", base, off)
}
return base, nil
}
func (r *renderer) renderFunctionComparison(fn *FunctionValue, op ComparisonOperator, right ValueExpr) (renderResult, error) {
if fn.Name != "size" {
return renderResult{}, errors.Errorf("unsupported function %s in comparison", fn.Name)
}
if len(fn.Args) != 1 {
return renderResult{}, errors.New("size() expects one argument")
}
fieldArg, ok := fn.Args[0].(*FieldRef)
if !ok {
return renderResult{}, errors.New("size() argument must be a field")
}
field, ok := r.schema.Field(fieldArg.Name)
if !ok {
return renderResult{}, errors.Errorf("unknown field %q", fieldArg.Name)
}
if field.Kind == FieldKindVirtualAlias {
field, ok = r.schema.ResolveAlias(fieldArg.Name)
if !ok {
return renderResult{}, errors.Errorf("invalid alias %q", fieldArg.Name)
}
}
value, err := expectNumericLiteral(right)
if err != nil {
return renderResult{}, err
}
var expr string
switch {
case field.Kind == FieldKindJSONList:
expr = jsonArrayLengthExpr(r.dialect, field)
case field.Kind == FieldKindScalar && field.Type == FieldTypeString:
expr = stringLengthExpr(r.dialect, field.columnExpr(r.dialect))
default:
return renderResult{}, errors.Errorf("size() does not support field %q", field.Name)
}
placeholder := r.addArg(value)
return renderResult{
sql: fmt.Sprintf("%s %s %s", expr, sqlOperator(op), placeholder),
}, nil
}
// stringLengthExpr returns the character-count expression for a string column.
// MySQL's LENGTH counts bytes, so CHAR_LENGTH is used to count characters and
// match CEL's size() code-point semantics; SQLite/Postgres LENGTH already counts
// characters.
func stringLengthExpr(d DialectName, colExpr string) string {
if d == DialectMySQL {
return fmt.Sprintf("CHAR_LENGTH(%s)", colExpr)
}
return fmt.Sprintf("LENGTH(%s)", colExpr)
}
func (r *renderer) renderScalarComparison(field Field, op ComparisonOperator, right ValueExpr) (renderResult, error) {
lit, err := expectLiteral(right)
if err != nil {
return renderResult{}, err
}
columnExpr := field.columnExpr(r.dialect)
if lit == nil {
switch op {
case CompareEq:
return renderResult{sql: fmt.Sprintf("%s IS NULL", columnExpr)}, nil
case CompareNeq:
return renderResult{sql: fmt.Sprintf("%s IS NOT NULL", columnExpr)}, nil
default:
return renderResult{}, errors.Errorf("operator %s not supported for null comparison", op)
}
}
placeholder := ""
switch field.Type {
case FieldTypeString:
value, ok := lit.(string)
if !ok {
return renderResult{}, errors.Errorf("field %q expects string value", field.Name)
}
placeholder = r.addArg(value)
case FieldTypeInt, FieldTypeTimestamp:
num, err := toInt64(lit)
if err != nil {
return renderResult{}, errors.Wrapf(err, "field %q expects integer value", field.Name)
}
placeholder = r.addArg(num)
default:
return renderResult{}, errors.Errorf("unsupported data type %q for field %s", field.Type, field.Name)
}
return renderResult{
sql: fmt.Sprintf("%s %s %s", columnExpr, sqlOperator(op), placeholder),
}, nil
}
func (r *renderer) renderBoolColumnComparison(field Field, op ComparisonOperator, right ValueExpr) (renderResult, error) {
value, err := expectBool(right)
if err != nil {
return renderResult{}, err
}
placeholder := r.addBoolArg(value)
column := qualifyColumn(r.dialect, field.Column)
return renderResult{
sql: fmt.Sprintf("%s %s %s", column, sqlOperator(op), placeholder),
}, nil
}
func (r *renderer) renderJSONBoolComparison(field Field, op ComparisonOperator, right ValueExpr) (renderResult, error) {
value, err := expectBool(right)
if err != nil {
return renderResult{}, err
}
jsonExpr := jsonExtractExpr(r.dialect, field)
switch r.dialect {
case DialectSQLite:
switch op {
case CompareEq:
if field.Name == "has_task_list" {
target := "0"
if value {
target = "1"
}
return renderResult{sql: fmt.Sprintf("%s = %s", jsonExpr, target)}, nil
}
if value {
return renderResult{sql: fmt.Sprintf("%s IS TRUE", jsonExpr)}, nil
}
return renderResult{sql: fmt.Sprintf("NOT(%s IS TRUE)", jsonExpr)}, nil
case CompareNeq:
if field.Name == "has_task_list" {
target := "0"
if value {
target = "1"
}
return renderResult{sql: fmt.Sprintf("%s != %s", jsonExpr, target)}, nil
}
if value {
return renderResult{sql: fmt.Sprintf("NOT(%s IS TRUE)", jsonExpr)}, nil
}
return renderResult{sql: fmt.Sprintf("%s IS TRUE", jsonExpr)}, nil
default:
return renderResult{}, errors.Errorf("operator %s not supported for boolean JSON field", op)
}
case DialectMySQL:
boolStr := "false"
if value {
boolStr = "true"
}
return renderResult{
sql: fmt.Sprintf("%s %s CAST('%s' AS JSON)", jsonExpr, sqlOperator(op), boolStr),
}, nil
case DialectPostgres:
placeholder := r.addArg(value)
return renderResult{
sql: fmt.Sprintf("(%s)::boolean %s %s", jsonExpr, sqlOperator(op), placeholder),
}, nil
default:
return renderResult{}, errors.Errorf("unsupported dialect %s", r.dialect)
}
}
func (r *renderer) renderInCondition(cond *InCondition) (renderResult, error) {
fieldRef, ok := cond.Left.(*FieldRef)
if !ok {
return renderResult{}, errors.New("IN operator requires a field on the left-hand side")
}
if fieldRef.Name == "tag" {
return r.renderTagInList(cond.Values)
}
field, ok := r.schema.Field(fieldRef.Name)
if !ok {
return renderResult{}, errors.Errorf("unknown field %q", fieldRef.Name)
}
if field.Kind != FieldKindScalar {
return renderResult{}, errors.Errorf("field %q does not support IN()", fieldRef.Name)
}
return r.renderScalarInCondition(field, cond.Values)
}
func (r *renderer) renderTagInList(values []ValueExpr) (renderResult, error) {
field, ok := r.schema.ResolveAlias("tag")
if !ok {
return renderResult{}, errors.New("tag attribute is not configured")
}
conditions := make([]string, 0, len(values))
for _, v := range values {
lit, err := expectLiteral(v)
if err != nil {
return renderResult{}, err
}
str, ok := lit.(string)
if !ok {
return renderResult{}, errors.New("tags must be compared with string literals")
}
switch r.dialect {
case DialectSQLite:
// Support hierarchical tags: match exact tag OR tags with this prefix (e.g., "book" matches "book" and "book/something")
exactMatch := fmt.Sprintf("%s LIKE %s", jsonArrayExpr(r.dialect, field), r.addArg(fmt.Sprintf(`%%"%s"%%`, str)))
prefixMatch := fmt.Sprintf("%s LIKE %s", jsonArrayExpr(r.dialect, field), r.addArg(fmt.Sprintf(`%%"%s/%%`, str)))
expr := fmt.Sprintf("(%s OR %s)", exactMatch, prefixMatch)
conditions = append(conditions, expr)
case DialectMySQL:
// Support hierarchical tags: match exact tag OR tags with this prefix
exactMatch := fmt.Sprintf("JSON_CONTAINS(%s, %s)", jsonArrayExpr(r.dialect, field), r.addArg(fmt.Sprintf(`"%s"`, str)))
prefixMatch := fmt.Sprintf("%s LIKE %s", jsonArrayExpr(r.dialect, field), r.addArg(fmt.Sprintf(`%%"%s/%%`, str)))
expr := fmt.Sprintf("(%s OR %s)", exactMatch, prefixMatch)
conditions = append(conditions, expr)
case DialectPostgres:
// Support hierarchical tags: match exact tag OR tags with this prefix
exactMatch := fmt.Sprintf("%s @> jsonb_build_array(%s::json)", jsonArrayExpr(r.dialect, field), r.addArg(fmt.Sprintf(`"%s"`, str)))
prefixMatch := fmt.Sprintf("(%s)::text LIKE %s", jsonArrayExpr(r.dialect, field), r.addArg(fmt.Sprintf(`%%"%s/%%`, str)))
expr := fmt.Sprintf("(%s OR %s)", exactMatch, prefixMatch)
conditions = append(conditions, expr)
default:
return renderResult{}, errors.Errorf("unsupported dialect %s", r.dialect)
}
}
if len(conditions) == 1 {
return renderResult{sql: conditions[0]}, nil
}
return renderResult{
sql: fmt.Sprintf("(%s)", strings.Join(conditions, " OR ")),
}, nil
}
func (r *renderer) renderElementInCondition(cond *ElementInCondition) (renderResult, error) {
field, ok := r.schema.Field(cond.Field)
if !ok {
return renderResult{}, errors.Errorf("unknown field %q", cond.Field)
}
if field.Kind != FieldKindJSONList {
return renderResult{}, errors.Errorf("field %q is not a tag list", cond.Field)
}
lit, err := expectLiteral(cond.Element)
if err != nil {
return renderResult{}, err
}
str, ok := lit.(string)
if !ok {
return renderResult{}, errors.New("tags membership requires string literal")
}
switch r.dialect {
case DialectSQLite:
sql := fmt.Sprintf("%s LIKE %s", jsonArrayExpr(r.dialect, field), r.addArg(fmt.Sprintf(`%%"%s"%%`, str)))
return renderResult{sql: sql}, nil
case DialectMySQL:
sql := fmt.Sprintf("JSON_CONTAINS(%s, %s)", jsonArrayExpr(r.dialect, field), r.addArg(fmt.Sprintf(`"%s"`, str)))
return renderResult{sql: sql}, nil
case DialectPostgres:
sql := fmt.Sprintf("%s @> jsonb_build_array(%s::json)", jsonArrayExpr(r.dialect, field), r.addArg(fmt.Sprintf(`"%s"`, str)))
return renderResult{sql: sql}, nil
default:
return renderResult{}, errors.Errorf("unsupported dialect %s", r.dialect)
}
}
func (r *renderer) renderScalarInCondition(field Field, values []ValueExpr) (renderResult, error) {
placeholders := make([]string, 0, len(values))
for _, v := range values {
lit, err := expectLiteral(v)
if err != nil {
return renderResult{}, err
}
switch field.Type {
case FieldTypeString:
str, ok := lit.(string)
if !ok {
return renderResult{}, errors.Errorf("field %q expects string values", field.Name)
}
placeholders = append(placeholders, r.addArg(str))
case FieldTypeInt:
num, err := toInt64(lit)
if err != nil {
return renderResult{}, err
}
placeholders = append(placeholders, r.addArg(num))
default:
return renderResult{}, errors.Errorf("field %q does not support IN() comparisons", field.Name)
}
}
column := field.columnExpr(r.dialect)
return renderResult{
sql: fmt.Sprintf("%s IN (%s)", column, strings.Join(placeholders, ",")),
}, nil
}
func (r *renderer) renderTextMatch(cond *TextMatchCondition) (renderResult, error) {
field, ok := r.schema.Field(cond.Field)
if !ok {
return renderResult{}, errors.Errorf("unknown field %q", cond.Field)
}
column := field.columnExpr(r.dialect)
pattern := likePattern(cond.Mode, cond.Value)
return renderResult{sql: r.foldedLike(column, pattern)}, nil
}
func (r *renderer) renderRegex(cond *RegexCondition) (renderResult, error) {
field, ok := r.schema.Field(cond.Field)
if !ok {
return renderResult{}, errors.Errorf("unknown field %q", cond.Field)
}
column := field.columnExpr(r.dialect)
switch r.dialect {
case DialectPostgres:
// POSIX regex match operator.
return renderResult{sql: fmt.Sprintf("%s ~ %s", column, r.addArg(cond.Pattern))}, nil
case DialectMySQL, DialectSQLite:
// MySQL has a native REGEXP operator; SQLite uses the registered regexp() function.
return renderResult{sql: fmt.Sprintf("%s REGEXP %s", column, r.addArg(cond.Pattern))}, nil
default:
return renderResult{}, errors.Errorf("unsupported dialect %s", r.dialect)
}
}
// foldedLike renders a case-insensitive LIKE comparison of colExpr against a
// (already metacharacter-escaped) pattern, using each dialect's case-folding.
func (r *renderer) foldedLike(colExpr, pattern string) string {
switch r.dialect {
case DialectSQLite:
// memos_unicode_lower gives Unicode-aware folding; ESCAPE '\' is required
// because SQLite has no default LIKE escape character.
return fmt.Sprintf(`memos_unicode_lower(%s) LIKE memos_unicode_lower(%s) ESCAPE '\'`, colExpr, r.addArg(pattern))
case DialectPostgres:
// ILIKE is case-insensitive; backslash is the default escape character.
return fmt.Sprintf("%s ILIKE %s", colExpr, r.addArg(pattern))
default: // MySQL: default collation is case-insensitive; backslash is the default escape.
return fmt.Sprintf("%s LIKE %s", colExpr, r.addArg(pattern))
}
}
// likePattern escapes LIKE metacharacters in value and wraps it for the mode.
func likePattern(mode TextMatchMode, value string) string {
escaped := escapeLikeLiteral(value)
switch mode {
case TextMatchPrefix:
return escaped + "%"
case TextMatchSuffix:
return "%" + escaped
default:
return "%" + escaped + "%"
}
}
// escapeLikeLiteral escapes the LIKE metacharacters \, %, and _ so user input
// is matched literally. Backslash is the escape character on all three dialects.
func escapeLikeLiteral(s string) string {
return strings.NewReplacer(`\`, `\\`, `%`, `\%`, `_`, `\_`).Replace(s)
}
func (r *renderer) renderListComprehension(cond *ListComprehensionCondition) (renderResult, error) {
field, ok := r.schema.Field(cond.Field)
if !ok {
return renderResult{}, errors.Errorf("unknown field %q", cond.Field)
}
if field.Kind != FieldKindJSONList {
return renderResult{}, errors.Errorf("field %q is not a JSON list", cond.Field)
}
if cond.Kind == ComprehensionAll {
return r.renderTagAll(field, cond.Predicate)
}
if cond.Kind == ComprehensionExistsOne {
return r.renderTagExistsOne(field, cond.Predicate)
}
// Render based on predicate type
switch pred := cond.Predicate.(type) {
case *EqualsPredicate:
return r.renderTagEquals(field, pred.Value, cond.Kind)
case *StartsWithPredicate:
return r.renderTagStartsWith(field, pred.Prefix, cond.Kind)
case *EndsWithPredicate:
return r.renderTagEndsWith(field, pred.Suffix, cond.Kind)
case *ContainsPredicate:
return r.renderTagContains(field, pred.Substring, cond.Kind)
default:
return renderResult{}, errors.Errorf("unsupported predicate type %T in comprehension", pred)
}
}
// renderTagAll renders tags.all(t, <pred>): the array is non-empty AND no element
// fails the predicate. Element predicates use plain CEL semantics (case-insensitive
// for startsWith/endsWith/contains, case-sensitive for ==), evaluated per element.
func (r *renderer) renderTagAll(field Field, pred PredicateExpr) (renderResult, error) {
arrayExpr := jsonArrayExpr(r.dialect, field)
elemCond, err := r.elementPredicateSQL(pred)
if err != nil {
return renderResult{}, err
}
switch r.dialect {
case DialectSQLite:
nonEmpty := fmt.Sprintf("%s IS NOT NULL AND %s != '[]'", arrayExpr, arrayExpr)
sub := fmt.Sprintf("NOT EXISTS (SELECT 1 FROM json_each(%s) WHERE NOT (%s))", arrayExpr, elemCond)
return renderResult{sql: fmt.Sprintf("(%s AND %s)", nonEmpty, sub)}, nil
case DialectMySQL:
nonEmpty := fmt.Sprintf("%s IS NOT NULL AND JSON_LENGTH(%s) > 0", arrayExpr, arrayExpr)
sub := fmt.Sprintf("NOT EXISTS (SELECT 1 FROM JSON_TABLE(%s, '$[*]' COLUMNS (value VARCHAR(512) PATH '$')) AS elem WHERE NOT (%s))", arrayExpr, elemCond)
return renderResult{sql: fmt.Sprintf("(%s AND %s)", nonEmpty, sub)}, nil
case DialectPostgres:
nonEmpty := fmt.Sprintf("%s IS NOT NULL AND jsonb_array_length(%s) > 0", arrayExpr, arrayExpr)
sub := fmt.Sprintf("NOT EXISTS (SELECT 1 FROM jsonb_array_elements_text(%s) AS elem(value) WHERE NOT (%s))", arrayExpr, elemCond)
return renderResult{sql: fmt.Sprintf("(%s AND %s)", nonEmpty, sub)}, nil
default:
return renderResult{}, errors.Errorf("unsupported dialect %s", r.dialect)
}
}
// renderTagExistsOne renders tags.exists_one(t, <pred>): exactly one element
// satisfies the predicate, via a COUNT(...) = 1 subquery. A null or empty array
// yields COUNT 0, which is correctly not equal to 1.
func (r *renderer) renderTagExistsOne(field Field, pred PredicateExpr) (renderResult, error) {
arrayExpr := jsonArrayExpr(r.dialect, field)
elemCond, err := r.elementPredicateSQL(pred)
if err != nil {
return renderResult{}, err
}
switch r.dialect {
case DialectSQLite:
return renderResult{sql: fmt.Sprintf("(SELECT COUNT(*) FROM json_each(%s) WHERE %s) = 1", arrayExpr, elemCond)}, nil
case DialectMySQL:
return renderResult{sql: fmt.Sprintf("(SELECT COUNT(*) FROM JSON_TABLE(%s, '$[*]' COLUMNS (value VARCHAR(512) PATH '$')) AS elem WHERE %s) = 1", arrayExpr, elemCond)}, nil
case DialectPostgres:
return renderResult{sql: fmt.Sprintf("(SELECT COUNT(*) FROM jsonb_array_elements_text(%s) AS elem(value) WHERE %s) = 1", arrayExpr, elemCond)}, nil
default:
return renderResult{}, errors.Errorf("unsupported dialect %s", r.dialect)
}
}
// elementPredicateSQL builds the per-element SQL condition for an all() predicate.
// The iterated element is exposed as the unqualified column `value` on all dialects
// (json_each.value / JSON_TABLE column / elem(value)).
func (r *renderer) elementPredicateSQL(pred PredicateExpr) (string, error) {
switch p := pred.(type) {
case *EqualsPredicate:
return fmt.Sprintf("value = %s", r.addArg(p.Value)), nil
case *StartsWithPredicate:
return r.foldedLike("value", likePattern(TextMatchPrefix, p.Prefix)), nil
case *EndsWithPredicate:
return r.foldedLike("value", likePattern(TextMatchSuffix, p.Suffix)), nil
case *ContainsPredicate:
return r.foldedLike("value", likePattern(TextMatchContains, p.Substring)), nil
default:
return "", errors.Errorf("unsupported predicate %T in all()", pred)
}
}
// renderTagEquals generates SQL for tags.exists(t, t == "value").
func (r *renderer) renderTagEquals(field Field, value string, _ ComprehensionKind) (renderResult, error) {
arrayExpr := jsonArrayExpr(r.dialect, field)
switch r.dialect {
case DialectSQLite, DialectMySQL:
exactMatch := r.buildJSONArrayLike(arrayExpr, fmt.Sprintf(`%%"%s"%%`, value))
return renderResult{sql: r.wrapWithNullCheck(arrayExpr, exactMatch)}, nil
case DialectPostgres:
exactMatch := fmt.Sprintf("%s @> jsonb_build_array(%s::json)", arrayExpr, r.addArg(fmt.Sprintf(`"%s"`, value)))
return renderResult{sql: r.wrapWithNullCheck(arrayExpr, exactMatch)}, nil
default:
return renderResult{}, errors.Errorf("unsupported dialect %s", r.dialect)
}
}
// renderTagStartsWith generates SQL for tags.exists(t, t.startsWith("prefix")).
func (r *renderer) renderTagStartsWith(field Field, prefix string, _ ComprehensionKind) (renderResult, error) {
arrayExpr := jsonArrayExpr(r.dialect, field)
switch r.dialect {
case DialectSQLite, DialectMySQL:
// Match exact tag or tags with this prefix (hierarchical support)
exactMatch := r.buildJSONArrayLike(arrayExpr, fmt.Sprintf(`%%"%s"%%`, prefix))
prefixMatch := r.buildJSONArrayLike(arrayExpr, fmt.Sprintf(`%%"%s%%`, prefix))
condition := fmt.Sprintf("(%s OR %s)", exactMatch, prefixMatch)
return renderResult{sql: r.wrapWithNullCheck(arrayExpr, condition)}, nil
case DialectPostgres:
// Use PostgreSQL's powerful JSON operators
exactMatch := fmt.Sprintf("%s @> jsonb_build_array(%s::json)", arrayExpr, r.addArg(fmt.Sprintf(`"%s"`, prefix)))
prefixMatch := fmt.Sprintf("(%s)::text LIKE %s", arrayExpr, r.addArg(fmt.Sprintf(`%%"%s%%`, prefix)))
condition := fmt.Sprintf("(%s OR %s)", exactMatch, prefixMatch)
return renderResult{sql: r.wrapWithNullCheck(arrayExpr, condition)}, nil
default:
return renderResult{}, errors.Errorf("unsupported dialect %s", r.dialect)
}
}
// renderTagEndsWith generates SQL for tags.exists(t, t.endsWith("suffix")).
func (r *renderer) renderTagEndsWith(field Field, suffix string, _ ComprehensionKind) (renderResult, error) {
arrayExpr := jsonArrayExpr(r.dialect, field)
pattern := fmt.Sprintf(`%%%s"%%`, suffix)
likeExpr := r.buildJSONArrayLike(arrayExpr, pattern)
return renderResult{sql: r.wrapWithNullCheck(arrayExpr, likeExpr)}, nil
}
// renderTagContains generates SQL for tags.exists(t, t.contains("substring")).
func (r *renderer) renderTagContains(field Field, substring string, _ ComprehensionKind) (renderResult, error) {
arrayExpr := jsonArrayExpr(r.dialect, field)
pattern := fmt.Sprintf(`%%%s%%`, substring)
likeExpr := r.buildJSONArrayLike(arrayExpr, pattern)
return renderResult{sql: r.wrapWithNullCheck(arrayExpr, likeExpr)}, nil
}
// buildJSONArrayLike builds a LIKE expression for matching within a JSON array.
// Returns the LIKE clause without NULL/empty checks.
func (r *renderer) buildJSONArrayLike(arrayExpr, pattern string) string {
switch r.dialect {
case DialectSQLite, DialectMySQL:
return fmt.Sprintf("%s LIKE %s", arrayExpr, r.addArg(pattern))
case DialectPostgres:
return fmt.Sprintf("(%s)::text LIKE %s", arrayExpr, r.addArg(pattern))
default:
return ""
}
}
// wrapWithNullCheck wraps a condition with NULL and empty array checks.
// This ensures we don't match against NULL or empty JSON arrays.
func (r *renderer) wrapWithNullCheck(arrayExpr, condition string) string {
var nullCheck string
switch r.dialect {
case DialectSQLite:
nullCheck = fmt.Sprintf("%s IS NOT NULL AND %s != '[]'", arrayExpr, arrayExpr)
case DialectMySQL:
nullCheck = fmt.Sprintf("%s IS NOT NULL AND JSON_LENGTH(%s) > 0", arrayExpr, arrayExpr)
case DialectPostgres:
nullCheck = fmt.Sprintf("%s IS NOT NULL AND jsonb_array_length(%s) > 0", arrayExpr, arrayExpr)
default:
return condition
}
return fmt.Sprintf("(%s AND %s)", condition, nullCheck)
}
func (r *renderer) jsonBoolPredicate(field Field) (string, error) {
expr := jsonExtractExpr(r.dialect, field)
switch r.dialect {
case DialectSQLite:
return fmt.Sprintf("%s IS TRUE", expr), nil
case DialectMySQL:
return fmt.Sprintf("COALESCE(%s, CAST('false' AS JSON)) = CAST('true' AS JSON)", expr), nil
case DialectPostgres:
return fmt.Sprintf("(%s)::boolean IS TRUE", expr), nil
default:
return "", errors.Errorf("unsupported dialect %s", r.dialect)
}
}
func combineAnd(left, right renderResult) renderResult {
if left.unsatisfiable || right.unsatisfiable {
return renderResult{sql: "1 = 0", unsatisfiable: true}
}
if left.trivial {
return right
}
if right.trivial {
return left
}
return renderResult{
sql: fmt.Sprintf("(%s AND %s)", left.sql, right.sql),
}
}
func combineOr(left, right renderResult) renderResult {
if left.trivial || right.trivial {
return renderResult{trivial: true}
}
if left.unsatisfiable {
return right
}
if right.unsatisfiable {
return left
}
return renderResult{
sql: fmt.Sprintf("(%s OR %s)", left.sql, right.sql),
}
}
func (r *renderer) addArg(value any) string {
r.placeholderCounter++
r.args = append(r.args, value)
if r.dialect == DialectPostgres {
return fmt.Sprintf("$%d", r.placeholderOffset+r.placeholderCounter)
}
return "?"
}
func (r *renderer) addBoolArg(value bool) string {
var v any
switch r.dialect {
case DialectSQLite:
if value {
v = 1
} else {
v = 0
}
default:
v = value
}
return r.addArg(v)
}
func expectLiteral(expr ValueExpr) (any, error) {
lit, ok := expr.(*LiteralValue)
if !ok {
return nil, errors.New("expression must be a literal")
}
return lit.Value, nil
}
func expectBool(expr ValueExpr) (bool, error) {
lit, err := expectLiteral(expr)
if err != nil {
return false, err
}
value, ok := lit.(bool)
if !ok {
return false, errors.New("boolean literal required")
}
return value, nil
}
func expectNumericLiteral(expr ValueExpr) (int64, error) {
lit, err := expectLiteral(expr)
if err != nil {
return 0, err
}
return toInt64(lit)
}
func toInt64(value any) (int64, error) {
switch v := value.(type) {
case int:
return int64(v), nil
case int32:
return int64(v), nil
case int64:
return v, nil
case uint32:
return int64(v), nil
case uint64:
return int64(v), nil
case float32:
return int64(v), nil
case float64:
return int64(v), nil
default:
return 0, errors.Errorf("cannot convert %T to int64", value)
}
}
func sqlOperator(op ComparisonOperator) string {
return string(op)
}
func qualifyColumn(d DialectName, col Column) string {
switch d {
case DialectPostgres:
return fmt.Sprintf("%s.%s", col.Table, col.Name)
default:
return fmt.Sprintf("`%s`.`%s`", col.Table, col.Name)
}
}
func jsonPath(field Field) string {
return "$." + strings.Join(field.JSONPath, ".")
}
func jsonExtractExpr(d DialectName, field Field) string {
column := qualifyColumn(d, field.Column)
switch d {
case DialectSQLite, DialectMySQL:
return fmt.Sprintf("JSON_EXTRACT(%s, '%s')", column, jsonPath(field))
case DialectPostgres:
return buildPostgresJSONAccessor(column, field.JSONPath, true)
default:
return ""
}
}
func jsonArrayExpr(d DialectName, field Field) string {
column := qualifyColumn(d, field.Column)
switch d {
case DialectSQLite, DialectMySQL:
return fmt.Sprintf("JSON_EXTRACT(%s, '%s')", column, jsonPath(field))
case DialectPostgres:
return buildPostgresJSONAccessor(column, field.JSONPath, false)
default:
return ""
}
}
func jsonArrayLengthExpr(d DialectName, field Field) string {
arrayExpr := jsonArrayExpr(d, field)
switch d {
case DialectSQLite:
return fmt.Sprintf("JSON_ARRAY_LENGTH(COALESCE(%s, JSON_ARRAY()))", arrayExpr)
case DialectMySQL:
return fmt.Sprintf("JSON_LENGTH(COALESCE(%s, JSON_ARRAY()))", arrayExpr)
case DialectPostgres:
return fmt.Sprintf("jsonb_array_length(COALESCE(%s, '[]'::jsonb))", arrayExpr)
default:
return ""
}
}
func buildPostgresJSONAccessor(base string, path []string, terminalText bool) string {
expr := base
for idx, part := range path {
if idx == len(path)-1 && terminalText {
expr = fmt.Sprintf("%s->>'%s'", expr, part)
} else {
expr = fmt.Sprintf("%s->'%s'", expr, part)
}
}
return expr
}
+327
View File
@@ -0,0 +1,327 @@
package filter
import (
"fmt"
"github.com/google/cel-go/cel"
"github.com/google/cel-go/ext"
)
// DialectName enumerates supported SQL dialects.
type DialectName string
const (
DialectSQLite DialectName = "sqlite"
DialectMySQL DialectName = "mysql"
DialectPostgres DialectName = "postgres"
)
// FieldType represents the logical type of a field.
type FieldType string
const (
FieldTypeString FieldType = "string"
FieldTypeInt FieldType = "int"
FieldTypeBool FieldType = "bool"
FieldTypeTimestamp FieldType = "timestamp"
)
// FieldKind describes how a field is stored.
type FieldKind string
const (
FieldKindScalar FieldKind = "scalar"
FieldKindBoolColumn FieldKind = "bool_column"
FieldKindJSONBool FieldKind = "json_bool"
FieldKindJSONList FieldKind = "json_list"
FieldKindVirtualAlias FieldKind = "virtual_alias"
)
// Column identifies the backing table column.
type Column struct {
Table string
Name string
}
// Field captures the schema metadata for an exposed CEL identifier.
type Field struct {
Name string
Kind FieldKind
Type FieldType
Column Column
JSONPath []string
AliasFor string
SupportsContains bool
Expressions map[DialectName]string
AllowedComparisonOps map[ComparisonOperator]bool
}
// Schema collects CEL environment options and field metadata.
type Schema struct {
Name string
Fields map[string]Field
EnvOptions []cel.EnvOption
}
// Field returns the field metadata if present.
func (s Schema) Field(name string) (Field, bool) {
f, ok := s.Fields[name]
return f, ok
}
// ResolveAlias resolves a virtual alias to its target field.
func (s Schema) ResolveAlias(name string) (Field, bool) {
field, ok := s.Fields[name]
if !ok {
return Field{}, false
}
if field.Kind == FieldKindVirtualAlias {
target, ok := s.Fields[field.AliasFor]
if !ok {
return Field{}, false
}
return target, true
}
return field, true
}
// NewSchema constructs the memo filter schema and CEL environment.
func NewSchema() Schema {
fields := map[string]Field{
"content": {
Name: "content",
Kind: FieldKindScalar,
Type: FieldTypeString,
Column: Column{Table: "memo", Name: "content"},
SupportsContains: true,
Expressions: map[DialectName]string{},
},
"creator": {
Name: "creator",
Kind: FieldKindScalar,
Type: FieldTypeString,
Column: Column{Table: "memo_creator", Name: "username"},
Expressions: map[DialectName]string{
DialectSQLite: "('users/' || %s)",
DialectMySQL: "CONCAT('users/', %s)",
DialectPostgres: "('users/' || %s)",
},
AllowedComparisonOps: map[ComparisonOperator]bool{
CompareEq: true,
CompareNeq: true,
},
},
"creator_id": {
Name: "creator_id",
Kind: FieldKindScalar,
Type: FieldTypeInt,
Column: Column{Table: "memo", Name: "creator_id"},
Expressions: map[DialectName]string{},
AllowedComparisonOps: map[ComparisonOperator]bool{
CompareEq: true,
CompareNeq: true,
},
},
"created_ts": {
Name: "created_ts",
Kind: FieldKindScalar,
Type: FieldTypeTimestamp,
Column: Column{Table: "memo", Name: "created_ts"},
Expressions: map[DialectName]string{
// MySQL stores created_ts as TIMESTAMP, needs conversion to epoch
DialectMySQL: "UNIX_TIMESTAMP(%s)",
// PostgreSQL and SQLite store created_ts as BIGINT (epoch), no conversion needed
DialectPostgres: "%s",
DialectSQLite: "%s",
},
},
"updated_ts": {
Name: "updated_ts",
Kind: FieldKindScalar,
Type: FieldTypeTimestamp,
Column: Column{Table: "memo", Name: "updated_ts"},
Expressions: map[DialectName]string{
// MySQL stores updated_ts as TIMESTAMP, needs conversion to epoch
DialectMySQL: "UNIX_TIMESTAMP(%s)",
// PostgreSQL and SQLite store updated_ts as BIGINT (epoch), no conversion needed
DialectPostgres: "%s",
DialectSQLite: "%s",
},
},
"pinned": {
Name: "pinned",
Kind: FieldKindBoolColumn,
Type: FieldTypeBool,
Column: Column{Table: "memo", Name: "pinned"},
Expressions: map[DialectName]string{},
AllowedComparisonOps: map[ComparisonOperator]bool{
CompareEq: true,
CompareNeq: true,
},
},
"visibility": {
Name: "visibility",
Kind: FieldKindScalar,
Type: FieldTypeString,
Column: Column{Table: "memo", Name: "visibility"},
Expressions: map[DialectName]string{},
AllowedComparisonOps: map[ComparisonOperator]bool{
CompareEq: true,
CompareNeq: true,
},
},
"tags": {
Name: "tags",
Kind: FieldKindJSONList,
Type: FieldTypeString,
Column: Column{Table: "memo", Name: "payload"},
JSONPath: []string{"tags"},
},
"tag": {
Name: "tag",
Kind: FieldKindVirtualAlias,
Type: FieldTypeString,
AliasFor: "tags",
},
"has_task_list": {
Name: "has_task_list",
Kind: FieldKindJSONBool,
Type: FieldTypeBool,
Column: Column{Table: "memo", Name: "payload"},
JSONPath: []string{"property", "hasTaskList"},
AllowedComparisonOps: map[ComparisonOperator]bool{
CompareEq: true,
CompareNeq: true,
},
},
"has_link": {
Name: "has_link",
Kind: FieldKindJSONBool,
Type: FieldTypeBool,
Column: Column{Table: "memo", Name: "payload"},
JSONPath: []string{"property", "hasLink"},
AllowedComparisonOps: map[ComparisonOperator]bool{
CompareEq: true,
CompareNeq: true,
},
},
"has_code": {
Name: "has_code",
Kind: FieldKindJSONBool,
Type: FieldTypeBool,
Column: Column{Table: "memo", Name: "payload"},
JSONPath: []string{"property", "hasCode"},
AllowedComparisonOps: map[ComparisonOperator]bool{
CompareEq: true,
CompareNeq: true,
},
},
"has_incomplete_tasks": {
Name: "has_incomplete_tasks",
Kind: FieldKindJSONBool,
Type: FieldTypeBool,
Column: Column{Table: "memo", Name: "payload"},
JSONPath: []string{"property", "hasIncompleteTasks"},
AllowedComparisonOps: map[ComparisonOperator]bool{
CompareEq: true,
CompareNeq: true,
},
},
}
envOptions := []cel.EnvOption{
cel.Variable("content", cel.StringType),
cel.Variable("creator", cel.StringType),
cel.Variable("creator_id", cel.IntType),
cel.Variable("created_ts", cel.TimestampType),
cel.Variable("updated_ts", cel.TimestampType),
cel.Variable("pinned", cel.BoolType),
cel.Variable("tag", cel.StringType),
cel.Variable("tags", cel.ListType(cel.StringType)),
cel.Variable("visibility", cel.StringType),
cel.Variable("has_task_list", cel.BoolType),
cel.Variable("has_link", cel.BoolType),
cel.Variable("has_code", cel.BoolType),
cel.Variable("has_incomplete_tasks", cel.BoolType),
cel.Variable("now", cel.TimestampType),
ext.Sets(),
cel.ASTValidators(cel.ValidateRegexLiterals()),
}
return Schema{
Name: "memo",
Fields: fields,
EnvOptions: envOptions,
}
}
// NewAttachmentSchema constructs the attachment filter schema and CEL environment.
func NewAttachmentSchema() Schema {
fields := map[string]Field{
"filename": {
Name: "filename",
Kind: FieldKindScalar,
Type: FieldTypeString,
Column: Column{Table: "attachment", Name: "filename"},
SupportsContains: true,
Expressions: map[DialectName]string{},
},
"mime_type": {
Name: "mime_type",
Kind: FieldKindScalar,
Type: FieldTypeString,
Column: Column{Table: "attachment", Name: "type"},
SupportsContains: true,
Expressions: map[DialectName]string{},
},
"create_time": {
Name: "create_time",
Kind: FieldKindScalar,
Type: FieldTypeTimestamp,
Column: Column{Table: "attachment", Name: "created_ts"},
Expressions: map[DialectName]string{
// MySQL stores created_ts as TIMESTAMP, needs conversion to epoch
DialectMySQL: "UNIX_TIMESTAMP(%s)",
// PostgreSQL and SQLite store created_ts as BIGINT (epoch), no conversion needed
DialectPostgres: "%s",
DialectSQLite: "%s",
},
},
"memo_id": {
Name: "memo_id",
Kind: FieldKindScalar,
Type: FieldTypeInt,
Column: Column{Table: "attachment", Name: "memo_id"},
Expressions: map[DialectName]string{},
AllowedComparisonOps: map[ComparisonOperator]bool{
CompareEq: true,
CompareNeq: true,
},
},
}
envOptions := []cel.EnvOption{
cel.Variable("filename", cel.StringType),
cel.Variable("mime_type", cel.StringType),
cel.Variable("create_time", cel.TimestampType),
cel.Variable("memo_id", cel.AnyType),
cel.Variable("now", cel.TimestampType),
cel.ASTValidators(cel.ValidateRegexLiterals()),
}
return Schema{
Name: "attachment",
Fields: fields,
EnvOptions: envOptions,
}
}
// columnExpr returns the field expression for the given dialect, applying
// any schema-specific overrides (e.g. UNIX timestamp conversions).
func (f Field) columnExpr(d DialectName) string {
base := qualifyColumn(d, f.Column)
if expr, ok := f.Expressions[d]; ok && expr != "" {
return fmt.Sprintf(expr, base)
}
return base
}
+100
View File
@@ -0,0 +1,100 @@
package filter
import (
"context"
"testing"
"time"
"github.com/stretchr/testify/require"
)
// fixedClock returns a deterministic clock for asserting folded `now` values.
func fixedClock(epoch int64) func() time.Time {
return func() time.Time { return time.Unix(epoch, 0) }
}
func memoEngineAt(t *testing.T, epoch int64) *Engine {
t.Helper()
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
engine.nowFunc = fixedClock(epoch)
return engine
}
func TestCompileNowVariableFoldsToInjectedClock(t *testing.T) {
t.Parallel()
engine := memoEngineAt(t, 1750000000)
stmt, err := engine.CompileToStatement(context.Background(), `created_ts >= now`, RenderOptions{Dialect: DialectSQLite})
require.NoError(t, err)
require.Equal(t, []any{int64(1750000000)}, stmt.Args)
}
func TestCompileNowFunctionIsRemoved(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewSchema())
require.NoError(t, err)
// now() was the legacy custom function; it is replaced by the `now` variable.
_, err = engine.Compile(context.Background(), `created_ts >= now()`)
require.Error(t, err)
}
func TestCompileNowMinusDurationFolds(t *testing.T) {
t.Parallel()
engine := memoEngineAt(t, 1750000000)
stmt, err := engine.CompileToStatement(context.Background(), `created_ts >= now - duration("1h")`, RenderOptions{Dialect: DialectSQLite})
require.NoError(t, err)
require.Equal(t, []any{int64(1750000000 - 3600)}, stmt.Args)
}
func TestCompileNowPlusDurationFolds(t *testing.T) {
t.Parallel()
engine := memoEngineAt(t, 1750000000)
stmt, err := engine.CompileToStatement(context.Background(), `updated_ts < now + duration("24h")`, RenderOptions{Dialect: DialectSQLite})
require.NoError(t, err)
require.Equal(t, []any{int64(1750000000 + 86400)}, stmt.Args)
}
func TestCompileAbsoluteTimestampStringFolds(t *testing.T) {
t.Parallel()
engine := memoEngineAt(t, 1750000000)
stmt, err := engine.CompileToStatement(context.Background(), `created_ts >= timestamp("2025-01-01T00:00:00Z")`, RenderOptions{Dialect: DialectSQLite})
require.NoError(t, err)
require.Equal(t, []any{int64(1735689600)}, stmt.Args)
}
func TestCompileTimestampFromEpochIntFolds(t *testing.T) {
t.Parallel()
// This is the shape the frontend date-range filter emits.
engine := memoEngineAt(t, 1750000000)
stmt, err := engine.CompileToStatement(context.Background(), `created_ts >= timestamp(1730000000)`, RenderOptions{Dialect: DialectSQLite})
require.NoError(t, err)
require.Equal(t, []any{int64(1730000000)}, stmt.Args)
}
func TestCompileInvalidDurationLiteralErrors(t *testing.T) {
t.Parallel()
engine := memoEngineAt(t, 1750000000)
_, err := engine.Compile(context.Background(), `created_ts >= now - duration("garbage")`)
require.Error(t, err)
require.Contains(t, err.Error(), "duration")
}
func TestCompileAttachmentCreateTimeUsesNow(t *testing.T) {
t.Parallel()
engine, err := NewEngine(NewAttachmentSchema())
require.NoError(t, err)
engine.nowFunc = fixedClock(1750000000)
stmt, err := engine.CompileToStatement(context.Background(), `create_time >= now - duration("24h")`, RenderOptions{Dialect: DialectSQLite})
require.NoError(t, err)
require.Equal(t, []any{int64(1750000000 - 86400)}, stmt.Args)
}
+227
View File
@@ -0,0 +1,227 @@
package httpgetter
import (
"context"
"fmt"
"io"
"net"
"net/http"
"net/url"
"strings"
"time"
"github.com/pkg/errors"
"golang.org/x/net/html"
"golang.org/x/net/html/atom"
)
var ErrInternalIP = errors.New("internal IP addresses are not allowed")
const maxHTMLMetaBytes = 512 * 1024
var (
lookupIPAddr = net.DefaultResolver.LookupIPAddr
dialContext = (&net.Dialer{
Timeout: 30 * time.Second,
KeepAlive: 30 * time.Second,
}).DialContext
httpClient = newHTTPClient()
)
func newHTTPClient() *http.Client {
transport := http.DefaultTransport.(*http.Transport).Clone()
transport.Proxy = nil
transport.DialContext = secureDialContext
return &http.Client{
Transport: transport,
Timeout: 5 * time.Second,
CheckRedirect: func(req *http.Request, via []*http.Request) error {
if err := validateURL(req.URL.String()); err != nil {
return errors.Wrap(err, "redirect to internal IP")
}
if len(via) >= 10 {
return errors.New("too many redirects")
}
return nil
},
}
}
func secureDialContext(ctx context.Context, network, address string) (net.Conn, error) {
host, port, err := net.SplitHostPort(address)
if err != nil {
return nil, errors.Wrap(err, "invalid address")
}
ips, err := resolveAllowedIPs(ctx, host)
if err != nil {
return nil, err
}
var dialErr error
for _, ip := range ips {
conn, err := dialContext(ctx, network, net.JoinHostPort(ip.String(), port))
if err == nil {
return conn, nil
}
dialErr = err
}
return nil, dialErr
}
func resolveAllowedIPs(ctx context.Context, host string) ([]net.IP, error) {
if ip := net.ParseIP(host); ip != nil {
if isInternalIP(ip) {
return nil, errors.Wrap(ErrInternalIP, ip.String())
}
return []net.IP{ip}, nil
}
addrs, err := lookupIPAddr(ctx, host)
if err != nil {
return nil, errors.Errorf("failed to resolve hostname: %v", err)
}
ips := make([]net.IP, 0, len(addrs))
for _, addr := range addrs {
ip := addr.IP
if ip == nil {
continue
}
if isInternalIP(ip) {
return nil, errors.Wrapf(ErrInternalIP, "host=%s, ip=%s", host, ip.String())
}
ips = append(ips, ip)
}
if len(ips) == 0 {
return nil, errors.New("hostname resolved to no addresses")
}
return ips, nil
}
func isInternalIP(ip net.IP) bool {
return ip.IsLoopback() || ip.IsPrivate() || ip.IsLinkLocalUnicast() || ip.IsUnspecified()
}
func validateURL(urlStr string) error {
u, err := url.Parse(urlStr)
if err != nil {
return errors.New("invalid URL format")
}
if u.Scheme != "http" && u.Scheme != "https" {
return errors.New("only http/https protocols are allowed")
}
host := u.Hostname()
if host == "" {
return errors.New("empty hostname")
}
if ip := net.ParseIP(host); ip != nil && isInternalIP(ip) {
return errors.Wrap(ErrInternalIP, ip.String())
}
return nil
}
type HTMLMeta struct {
Title string `json:"title"`
Description string `json:"description"`
Image string `json:"image"`
}
func GetHTMLMeta(urlStr string) (*HTMLMeta, error) {
if err := validateURL(urlStr); err != nil {
return nil, err
}
response, err := httpClient.Get(urlStr)
if err != nil {
return nil, err
}
defer response.Body.Close()
mediatype, err := getMediatype(response)
if err != nil {
return nil, err
}
if mediatype != "text/html" {
return nil, errors.New("not a HTML page")
}
htmlMeta := extractHTMLMeta(io.LimitReader(response.Body, maxHTMLMetaBytes))
enrichSiteMeta(response.Request.URL, htmlMeta)
return htmlMeta, nil
}
func extractHTMLMeta(resp io.Reader) *HTMLMeta {
tokenizer := html.NewTokenizer(resp)
htmlMeta := new(HTMLMeta)
for {
tokenType := tokenizer.Next()
if tokenType == html.ErrorToken {
break
} else if tokenType == html.StartTagToken || tokenType == html.SelfClosingTagToken {
token := tokenizer.Token()
if token.DataAtom == atom.Body {
break
}
if token.DataAtom == atom.Title {
tokenizer.Next()
token := tokenizer.Token()
htmlMeta.Title = token.Data
} else if token.DataAtom == atom.Meta {
ogTitle, ok := extractMetaProperty(token, "og:title")
if ok {
htmlMeta.Title = ogTitle
}
ogDescription, ok := extractMetaProperty(token, "og:description")
if ok {
htmlMeta.Description = ogDescription
}
ogImage, ok := extractMetaProperty(token, "og:image")
if ok {
htmlMeta.Image = ogImage
}
description, ok := extractMetaProperty(token, "description")
if ok && htmlMeta.Description == "" {
htmlMeta.Description = description
}
}
}
}
return htmlMeta
}
func extractMetaProperty(token html.Token, prop string) (content string, ok bool) {
content, ok = "", false
for _, attr := range token.Attr {
if (attr.Key == "property" || attr.Key == "name") && strings.EqualFold(attr.Val, prop) {
ok = true
}
if attr.Key == "content" {
content = attr.Val
}
}
return content, ok
}
func enrichSiteMeta(url *url.URL, meta *HTMLMeta) {
if url.Hostname() == "www.youtube.com" {
if url.Path == "/watch" {
vid := url.Query().Get("v")
if vid != "" {
meta.Image = fmt.Sprintf("https://img.youtube.com/vi/%s/mqdefault.jpg", vid)
}
}
}
}
+189
View File
@@ -0,0 +1,189 @@
package httpgetter
import (
"context"
"errors"
"io"
"net"
"net/http"
"strings"
"testing"
"github.com/stretchr/testify/require"
)
type roundTripFunc func(*http.Request) (*http.Response, error)
func (f roundTripFunc) RoundTrip(req *http.Request) (*http.Response, error) {
return f(req)
}
func TestGetHTMLMeta(t *testing.T) {
originalHTTPClient := httpClient
t.Cleanup(func() {
httpClient = originalHTTPClient
})
httpClient = &http.Client{
Transport: roundTripFunc(func(req *http.Request) (*http.Response, error) {
require.Equal(t, "http://93.184.216.34/article", req.URL.String())
return &http.Response{
StatusCode: http.StatusOK,
Header: http.Header{"Content-Type": []string{"text/html; charset=utf-8"}},
Body: io.NopCloser(strings.NewReader(`<!doctype html>
<html>
<head>
<title>Fallback title</title>
<meta name="description" content="Fallback description">
<meta property="og:title" content="Open Graph title">
<meta property="og:description" content="Open Graph description">
<meta property="og:image" content="https://example.com/cover.png">
</head>
<body>ignored</body>
</html>`)),
Request: req,
}, nil
}),
}
metadata, err := GetHTMLMeta("http://93.184.216.34/article")
require.NoError(t, err)
require.Equal(t, HTMLMeta{
Title: "Open Graph title",
Description: "Open Graph description",
Image: "https://example.com/cover.png",
}, *metadata)
}
func TestGetHTMLMetaWithNameOnly(t *testing.T) {
originalHTTPClient := httpClient
t.Cleanup(func() {
httpClient = originalHTTPClient
})
httpClient = &http.Client{
Transport: roundTripFunc(func(req *http.Request) (*http.Response, error) {
require.Equal(t, "http://93.184.216.34/blog", req.URL.String())
return &http.Response{
StatusCode: http.StatusOK,
Header: http.Header{"Content-Type": []string{"text/html; charset=utf-8"}},
Body: io.NopCloser(strings.NewReader(`<!doctype html>
<html>
<head>
<title>Sample Page</title>
<meta name="description" content="This description should appear in the link preview.">
</head>
<body>Hello</body>
</html>`)),
Request: req,
}, nil
}),
}
metadata, err := GetHTMLMeta("http://93.184.216.34/blog")
require.NoError(t, err)
require.Equal(t, HTMLMeta{
Title: "Sample Page",
Description: "This description should appear in the link preview.",
Image: "",
}, *metadata)
}
func TestGetHTMLMetaWithNameCaseInsensitive(t *testing.T) {
originalHTTPClient := httpClient
t.Cleanup(func() {
httpClient = originalHTTPClient
})
httpClient = &http.Client{
Transport: roundTripFunc(func(req *http.Request) (*http.Response, error) {
require.Equal(t, "http://93.184.216.34/blog", req.URL.String())
return &http.Response{
StatusCode: http.StatusOK,
Header: http.Header{"Content-Type": []string{"text/html; charset=utf-8"}},
Body: io.NopCloser(strings.NewReader(`<!doctype html>
<html>
<head>
<title>Sample Page</title>
<meta name="Description" content="Case insensitive description match.">
</head>
<body>Hello</body>
</html>`)),
Request: req,
}, nil
}),
}
metadata, err := GetHTMLMeta("http://93.184.216.34/blog")
require.NoError(t, err)
require.Equal(t, HTMLMeta{
Title: "Sample Page",
Description: "Case insensitive description match.",
Image: "",
}, *metadata)
}
func TestGetHTMLMetaForInternal(t *testing.T) {
// test for internal IP
if _, err := GetHTMLMeta("http://192.168.0.1"); !errors.Is(err, ErrInternalIP) {
t.Errorf("Expected error for internal IP, got %v", err)
}
// test for resolved internal IP
if _, err := GetHTMLMeta("http://localhost"); !errors.Is(err, ErrInternalIP) {
t.Errorf("Expected error for resolved internal IP, got %v", err)
}
}
func TestHTTPClientHasTimeout(t *testing.T) {
require.NotZero(t, httpClient.Timeout)
}
func TestSecureDialContextRejectsResolvedInternalIP(t *testing.T) {
originalLookupIPAddr := lookupIPAddr
originalDialContext := dialContext
t.Cleanup(func() {
lookupIPAddr = originalLookupIPAddr
dialContext = originalDialContext
})
lookupIPAddr = func(context.Context, string) ([]net.IPAddr, error) {
return []net.IPAddr{{IP: net.ParseIP("127.0.0.1")}}, nil
}
dialContext = func(context.Context, string, string) (net.Conn, error) {
t.Fatal("internal IP should be rejected before dialing")
return nil, nil
}
_, err := secureDialContext(context.Background(), "tcp", "rebind.example:80")
require.ErrorIs(t, err, ErrInternalIP)
}
func TestSecureDialContextDialsResolvedIP(t *testing.T) {
originalLookupIPAddr := lookupIPAddr
originalDialContext := dialContext
t.Cleanup(func() {
lookupIPAddr = originalLookupIPAddr
dialContext = originalDialContext
})
lookupIPAddr = func(context.Context, string) ([]net.IPAddr, error) {
return []net.IPAddr{{IP: net.ParseIP("93.184.216.34")}}, nil
}
var dialedAddress string
dialContext = func(_ context.Context, _ string, address string) (net.Conn, error) {
dialedAddress = address
clientConn, serverConn := net.Pipe()
t.Cleanup(func() {
clientConn.Close()
serverConn.Close()
})
return clientConn, nil
}
conn, err := secureDialContext(context.Background(), "tcp", "rebind.example:80")
require.NoError(t, err)
require.NotNil(t, conn)
require.Equal(t, "93.184.216.34:80", dialedAddress)
}
+1
View File
@@ -0,0 +1 @@
package httpgetter
+45
View File
@@ -0,0 +1,45 @@
package httpgetter
import (
"errors"
"io"
"net/http"
"net/url"
"strings"
)
type Image struct {
Blob []byte
Mediatype string
}
func GetImage(urlStr string) (*Image, error) {
if _, err := url.Parse(urlStr); err != nil {
return nil, err
}
response, err := http.Get(urlStr)
if err != nil {
return nil, err
}
defer response.Body.Close()
mediatype, err := getMediatype(response)
if err != nil {
return nil, err
}
if !strings.HasPrefix(mediatype, "image/") {
return nil, errors.New("wrong image mediatype")
}
bodyBytes, err := io.ReadAll(response.Body)
if err != nil {
return nil, err
}
image := &Image{
Blob: bodyBytes,
Mediatype: mediatype,
}
return image, nil
}
+15
View File
@@ -0,0 +1,15 @@
package httpgetter
import (
"mime"
"net/http"
)
func getMediatype(response *http.Response) (string, error) {
contentType := response.Header.Get("content-type")
mediatype, _, err := mime.ParseMediaType(contentType)
if err != nil {
return "", err
}
return mediatype, nil
}
+8
View File
@@ -0,0 +1,8 @@
package idp
type IdentityProviderUserInfo struct {
Identifier string
DisplayName string
Email string
AvatarURL string
}
+142
View File
@@ -0,0 +1,142 @@
// Package oauth2 implements the OAuth2 identity provider integration.
package oauth2
import (
"context"
"encoding/json"
"fmt"
"io"
"net/http"
"time"
"github.com/pkg/errors"
"golang.org/x/oauth2"
"github.com/usememos/memos/internal/idp"
storepb "github.com/usememos/memos/proto/gen/store"
)
// IdentityProvider represents an OAuth2 Identity Provider.
type IdentityProvider struct {
config *storepb.OAuth2Config
}
const userInfoRequestTimeout = 10 * time.Second
// NewIdentityProvider initializes a new OAuth2 Identity Provider with the given configuration.
func NewIdentityProvider(config *storepb.OAuth2Config) (*IdentityProvider, error) {
for v, field := range map[string]string{
config.ClientId: "clientId",
config.ClientSecret: "clientSecret",
config.TokenUrl: "tokenUrl",
config.UserInfoUrl: "userInfoUrl",
config.FieldMapping.Identifier: "fieldMapping.identifier",
} {
if v == "" {
return nil, errors.Errorf(`the field "%s" is empty but required`, field)
}
}
return &IdentityProvider{
config: config,
}, nil
}
// ExchangeToken returns the exchanged OAuth2 token using the given authorization code.
// If codeVerifier is provided, it will be used for PKCE (Proof Key for Code Exchange) validation.
func (p *IdentityProvider) ExchangeToken(ctx context.Context, redirectURL, code, codeVerifier string) (string, error) {
conf := &oauth2.Config{
ClientID: p.config.ClientId,
ClientSecret: p.config.ClientSecret,
RedirectURL: redirectURL,
Scopes: p.config.Scopes,
Endpoint: oauth2.Endpoint{
AuthURL: p.config.AuthUrl,
TokenURL: p.config.TokenUrl,
AuthStyle: oauth2.AuthStyleAutoDetect,
},
}
// Prepare token exchange options
opts := []oauth2.AuthCodeOption{}
// Add PKCE code_verifier if provided
if codeVerifier != "" {
opts = append(opts, oauth2.SetAuthURLParam("code_verifier", codeVerifier))
}
token, err := conf.Exchange(ctx, code, opts...)
if err != nil {
return "", errors.Wrap(err, "failed to exchange access token")
}
// Use the standard AccessToken field instead of Extra()
// This is more reliable across different OAuth providers
if token.AccessToken == "" {
return "", errors.New("missing access token from authorization response")
}
return token.AccessToken, nil
}
// UserInfo returns the parsed user information using the given OAuth2 token.
func (p *IdentityProvider) UserInfo(ctx context.Context, token string) (*idp.IdentityProviderUserInfo, error) {
client := &http.Client{Timeout: userInfoRequestTimeout}
req, err := http.NewRequestWithContext(ctx, http.MethodGet, p.config.UserInfoUrl, nil)
if err != nil {
return nil, errors.Wrap(err, "failed to create http request")
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", token))
resp, err := client.Do(req)
if err != nil {
return nil, errors.Wrap(err, "failed to get user information")
}
defer resp.Body.Close()
if resp.StatusCode < http.StatusOK || resp.StatusCode >= http.StatusMultipleChoices {
body, readErr := io.ReadAll(io.LimitReader(resp.Body, 4096))
if readErr != nil {
return nil, errors.Wrap(readErr, "failed to read error response body")
}
return nil, errors.Errorf("userinfo request failed with status %d: %s", resp.StatusCode, string(body))
}
body, err := io.ReadAll(resp.Body)
if err != nil {
return nil, errors.Wrap(err, "failed to read response body")
}
var claims map[string]any
if err := json.Unmarshal(body, &claims); err != nil {
return nil, errors.Wrap(err, "failed to unmarshal response body")
}
userInfo := &idp.IdentityProviderUserInfo{}
if v, ok := claims[p.config.FieldMapping.Identifier].(string); ok {
userInfo.Identifier = v
}
if userInfo.Identifier == "" {
return nil, errors.Errorf("the field %q is not found in claims or has empty value", p.config.FieldMapping.Identifier)
}
// Best effort to map optional fields
if p.config.FieldMapping.DisplayName != "" {
if v, ok := claims[p.config.FieldMapping.DisplayName].(string); ok {
userInfo.DisplayName = v
}
}
if userInfo.DisplayName == "" {
userInfo.DisplayName = userInfo.Identifier
}
if p.config.FieldMapping.Email != "" {
if v, ok := claims[p.config.FieldMapping.Email].(string); ok {
userInfo.Email = v
}
}
if p.config.FieldMapping.AvatarUrl != "" {
if v, ok := claims[p.config.FieldMapping.AvatarUrl].(string); ok {
userInfo.AvatarURL = v
}
}
return userInfo, nil
}
+291
View File
@@ -0,0 +1,291 @@
package oauth2
import (
"context"
"encoding/json"
"fmt"
"io"
"net/http"
"net/http/httptest"
"net/url"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/usememos/memos/internal/idp"
storepb "github.com/usememos/memos/proto/gen/store"
)
func TestNewIdentityProvider(t *testing.T) {
tests := []struct {
name string
config *storepb.OAuth2Config
containsErr string
}{
{
name: "no tokenUrl",
config: &storepb.OAuth2Config{
ClientId: "test-client-id",
ClientSecret: "test-client-secret",
AuthUrl: "",
TokenUrl: "",
UserInfoUrl: "https://example.com/api/user",
FieldMapping: &storepb.FieldMapping{
Identifier: "login",
},
},
containsErr: `the field "tokenUrl" is empty but required`,
},
{
name: "no userInfoUrl",
config: &storepb.OAuth2Config{
ClientId: "test-client-id",
ClientSecret: "test-client-secret",
AuthUrl: "",
TokenUrl: "https://example.com/token",
UserInfoUrl: "",
FieldMapping: &storepb.FieldMapping{
Identifier: "login",
},
},
containsErr: `the field "userInfoUrl" is empty but required`,
},
{
name: "no field mapping identifier",
config: &storepb.OAuth2Config{
ClientId: "test-client-id",
ClientSecret: "test-client-secret",
AuthUrl: "",
TokenUrl: "https://example.com/token",
UserInfoUrl: "https://example.com/api/user",
FieldMapping: &storepb.FieldMapping{
Identifier: "",
},
},
containsErr: `the field "fieldMapping.identifier" is empty but required`,
},
}
for _, test := range tests {
t.Run(test.name, func(*testing.T) {
_, err := NewIdentityProvider(test.config)
assert.ErrorContains(t, err, test.containsErr)
})
}
}
func newMockServer(t *testing.T, code, accessToken string, userinfo []byte) *httptest.Server {
mux := http.NewServeMux()
var rawIDToken string
mux.HandleFunc("/oauth2/token", func(w http.ResponseWriter, r *http.Request) {
require.Equal(t, http.MethodPost, r.Method)
body, err := io.ReadAll(r.Body)
require.NoError(t, err)
vals, err := url.ParseQuery(string(body))
require.NoError(t, err)
require.Equal(t, code, vals.Get("code"))
require.Equal(t, "authorization_code", vals.Get("grant_type"))
w.Header().Set("Content-Type", "application/json")
err = json.NewEncoder(w).Encode(map[string]any{
"access_token": accessToken,
"token_type": "Bearer",
"expires_in": 3600,
"id_token": rawIDToken,
})
require.NoError(t, err)
})
mux.HandleFunc("/oauth2/userinfo", func(w http.ResponseWriter, _ *http.Request) {
w.Header().Set("Content-Type", "application/json")
_, err := w.Write(userinfo)
require.NoError(t, err)
})
s := httptest.NewServer(mux)
return s
}
func TestIdentityProvider(t *testing.T) {
ctx := context.Background()
const (
testClientID = "test-client-id"
testCode = "test-code"
testAccessToken = "test-access-token"
testSubject = "123456789"
testName = "John Doe"
testEmail = "john.doe@example.com"
)
userInfo, err := json.Marshal(
map[string]any{
"sub": testSubject,
"name": testName,
"email": testEmail,
},
)
require.NoError(t, err)
s := newMockServer(t, testCode, testAccessToken, userInfo)
oauth2, err := NewIdentityProvider(
&storepb.OAuth2Config{
ClientId: testClientID,
ClientSecret: "test-client-secret",
TokenUrl: fmt.Sprintf("%s/oauth2/token", s.URL),
UserInfoUrl: fmt.Sprintf("%s/oauth2/userinfo", s.URL),
FieldMapping: &storepb.FieldMapping{
Identifier: "sub",
DisplayName: "name",
Email: "email",
},
},
)
require.NoError(t, err)
redirectURL := "https://example.com/oauth/callback"
// Test without PKCE (backward compatibility)
oauthToken, err := oauth2.ExchangeToken(ctx, redirectURL, testCode, "")
require.NoError(t, err)
require.Equal(t, testAccessToken, oauthToken)
userInfoResult, err := oauth2.UserInfo(ctx, oauthToken)
require.NoError(t, err)
wantUserInfo := &idp.IdentityProviderUserInfo{
Identifier: testSubject,
DisplayName: testName,
Email: testEmail,
}
assert.Equal(t, wantUserInfo, userInfoResult)
}
func TestIdentityProviderExchangeTokenClientAuthentication(t *testing.T) {
const (
clientID = "test-client-id"
clientSecret = "test-client-secret"
code = "test-code"
accessToken = "test-access-token"
codeVerifier = "test-code-verifier"
)
tests := []struct {
name string
acceptBasicAuth bool
expectedRequests int
}{
{
name: "client secret basic",
acceptBasicAuth: true,
expectedRequests: 1,
},
{
name: "client secret post fallback",
acceptBasicAuth: false,
expectedRequests: 2,
},
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
requestCount := 0
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
requestCount++
require.NoError(t, r.ParseForm())
require.Equal(t, code, r.Form.Get("code"))
require.Equal(t, codeVerifier, r.Form.Get("code_verifier"))
username, password, hasBasicAuth := r.BasicAuth()
if test.acceptBasicAuth {
require.True(t, hasBasicAuth)
require.Equal(t, clientID, username)
require.Equal(t, clientSecret, password)
require.Empty(t, r.Form.Get("client_id"))
require.Empty(t, r.Form.Get("client_secret"))
} else if hasBasicAuth {
http.Error(w, `{"error":"invalid_client"}`, http.StatusUnauthorized)
return
} else {
require.Equal(t, clientID, r.Form.Get("client_id"))
require.Equal(t, clientSecret, r.Form.Get("client_secret"))
}
w.Header().Set("Content-Type", "application/json")
require.NoError(t, json.NewEncoder(w).Encode(map[string]any{
"access_token": accessToken,
"token_type": "Bearer",
}))
}))
defer server.Close()
provider, err := NewIdentityProvider(&storepb.OAuth2Config{
ClientId: clientID,
ClientSecret: clientSecret,
TokenUrl: server.URL,
UserInfoUrl: "https://example.com/oauth2/userinfo",
FieldMapping: &storepb.FieldMapping{Identifier: "sub"},
})
require.NoError(t, err)
token, err := provider.ExchangeToken(context.Background(), "https://example.com/auth/callback", code, codeVerifier)
require.NoError(t, err)
assert.Equal(t, accessToken, token)
assert.Equal(t, test.expectedRequests, requestCount)
})
}
}
func TestIdentityProviderUserInfoUsesContext(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
cancel()
s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(http.StatusOK)
}))
defer s.Close()
oauth2, err := NewIdentityProvider(
&storepb.OAuth2Config{
ClientId: "test-client-id",
ClientSecret: "test-client-secret",
TokenUrl: "https://example.com/oauth2/token",
UserInfoUrl: s.URL,
FieldMapping: &storepb.FieldMapping{
Identifier: "sub",
},
},
)
require.NoError(t, err)
_, err = oauth2.UserInfo(ctx, "test-access-token")
require.Error(t, err)
assert.ErrorContains(t, err, "failed to get user information")
}
func TestIdentityProviderUserInfoRejectsNon2xx(t *testing.T) {
s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
http.Error(w, "upstream failure", http.StatusBadGateway)
}))
defer s.Close()
oauth2, err := NewIdentityProvider(
&storepb.OAuth2Config{
ClientId: "test-client-id",
ClientSecret: "test-client-secret",
TokenUrl: "https://example.com/oauth2/token",
UserInfoUrl: s.URL,
FieldMapping: &storepb.FieldMapping{
Identifier: "sub",
},
},
)
require.NoError(t, err)
_, err = oauth2.UserInfo(context.Background(), "test-access-token")
require.Error(t, err)
assert.ErrorContains(t, err, "userinfo request failed with status 502")
assert.ErrorContains(t, err, "upstream failure")
}
+28
View File
@@ -0,0 +1,28 @@
package ast
import (
gast "github.com/yuin/goldmark/ast"
)
// MentionNode represents an @mention in the markdown AST.
type MentionNode struct {
gast.BaseInline
// Username without the @ prefix.
Username []byte
}
// KindMention is the NodeKind for MentionNode.
var KindMention = gast.NewNodeKind("Mention")
// Kind returns KindMention.
func (*MentionNode) Kind() gast.NodeKind {
return KindMention
}
// Dump implements Node.Dump for debugging.
func (n *MentionNode) Dump(source []byte, level int) {
gast.DumpHelper(n, source, level, map[string]string{
"Username": string(n.Username),
}, nil)
}
+28
View File
@@ -0,0 +1,28 @@
package ast
import (
gast "github.com/yuin/goldmark/ast"
)
// TagNode represents a #tag in the markdown AST.
type TagNode struct {
gast.BaseInline
// Tag name without the # prefix
Tag []byte
}
// KindTag is the NodeKind for TagNode.
var KindTag = gast.NewNodeKind("Tag")
// Kind returns KindTag.
func (*TagNode) Kind() gast.NodeKind {
return KindTag
}
// Dump implements Node.Dump for debugging.
func (n *TagNode) Dump(source []byte, level int) {
gast.DumpHelper(n, source, level, map[string]string{
"Tag": string(n.Tag),
}, nil)
}
+24
View File
@@ -0,0 +1,24 @@
package extensions
import (
"github.com/yuin/goldmark"
"github.com/yuin/goldmark/parser"
"github.com/yuin/goldmark/util"
mparser "github.com/usememos/memos/internal/markdown/parser"
)
type mentionExtension struct{}
// MentionExtension is a goldmark extension for @mention syntax.
var MentionExtension = &mentionExtension{}
// Extend extends the goldmark parser with mention support.
func (*mentionExtension) Extend(m goldmark.Markdown) {
m.Parser().AddOptions(
parser.WithInlineParsers(
// Priority 200 - run before standard link parser (500).
util.Prioritized(mparser.NewMentionParser(), 200),
),
)
}
+24
View File
@@ -0,0 +1,24 @@
package extensions
import (
"github.com/yuin/goldmark"
"github.com/yuin/goldmark/parser"
"github.com/yuin/goldmark/util"
mparser "github.com/usememos/memos/internal/markdown/parser"
)
type tagExtension struct{}
// TagExtension is a goldmark extension for #tag syntax.
var TagExtension = &tagExtension{}
// Extend extends the goldmark parser with tag support.
func (*tagExtension) Extend(m goldmark.Markdown) {
m.Parser().AddOptions(
parser.WithInlineParsers(
// Priority 200 - run before standard link parser (500)
util.Prioritized(mparser.NewTagParser(), 200),
),
)
}
+489
View File
@@ -0,0 +1,489 @@
package markdown
import (
"bytes"
"strings"
"github.com/yuin/goldmark"
gast "github.com/yuin/goldmark/ast"
"github.com/yuin/goldmark/extension"
east "github.com/yuin/goldmark/extension/ast"
"github.com/yuin/goldmark/parser"
"github.com/yuin/goldmark/text"
mast "github.com/usememos/memos/internal/markdown/ast"
"github.com/usememos/memos/internal/markdown/extensions"
"github.com/usememos/memos/internal/markdown/renderer"
storepb "github.com/usememos/memos/proto/gen/store"
)
// ExtractedData contains all metadata extracted from markdown in a single pass.
type ExtractedData struct {
Tags []string
Mentions []string
Property *storepb.MemoPayload_Property
}
// Service handles markdown metadata extraction.
// It uses goldmark to parse markdown and extract tags, properties, and snippets.
// HTML rendering is primarily done on frontend using markdown-it, but backend provides
// RenderHTML for RSS feeds and other server-side rendering needs.
type Service interface {
// ExtractAll extracts tags, properties, and references in a single parse (most efficient)
ExtractAll(content []byte) (*ExtractedData, error)
// ExtractTags returns all #tags found in content
ExtractTags(content []byte) ([]string, error)
// ExtractProperties computes boolean properties
ExtractProperties(content []byte) (*storepb.MemoPayload_Property, error)
// RenderMarkdown renders goldmark AST back to markdown text
RenderMarkdown(content []byte) (string, error)
// RenderHTML renders markdown content to HTML
RenderHTML(content []byte) (string, error)
// GenerateSnippet creates plain text summary
GenerateSnippet(content []byte, maxLength int) (string, error)
// ValidateContent checks for syntax errors
ValidateContent(content []byte) error
// RenameTag renames all occurrences of oldTag to newTag in content
RenameTag(content []byte, oldTag, newTag string) (string, error)
}
// service implements the Service interface.
type service struct {
md goldmark.Markdown
}
// Option configures the markdown service.
type Option func(*config)
type config struct {
enableTags bool
enableMentions bool
}
// WithTagExtension enables #tag parsing.
func WithTagExtension() Option {
return func(c *config) {
c.enableTags = true
}
}
// WithMentionExtension enables @mention parsing.
func WithMentionExtension() Option {
return func(c *config) {
c.enableMentions = true
}
}
// NewService creates a new markdown service with the given options.
func NewService(opts ...Option) Service {
cfg := &config{}
for _, opt := range opts {
opt(cfg)
}
exts := []goldmark.Extender{
extension.GFM, // GitHub Flavored Markdown (tables, strikethrough, task lists, autolinks)
}
// Add custom extensions based on config
if cfg.enableTags {
exts = append(exts, extensions.TagExtension)
}
if cfg.enableMentions {
exts = append(exts, extensions.MentionExtension)
}
md := goldmark.New(
goldmark.WithExtensions(exts...),
goldmark.WithParserOptions(
parser.WithAutoHeadingID(), // Generate heading IDs
),
)
return &service{
md: md,
}
}
// parse is an internal helper to parse content into AST.
func (s *service) parse(content []byte) (gast.Node, error) {
reader := text.NewReader(content)
doc := s.md.Parser().Parse(reader)
return doc, nil
}
func isTagNodeInLinkOrImage(n gast.Node) bool {
for parent := n.Parent(); parent != nil; parent = parent.Parent() {
switch parent.Kind() {
case gast.KindLink, gast.KindImage:
return true
default:
// Keep walking ancestors.
}
}
return false
}
func asMemoTagNode(n gast.Node) (*mast.TagNode, bool) {
tagNode, ok := n.(*mast.TagNode)
if !ok || isTagNodeInLinkOrImage(n) {
return nil, false
}
return tagNode, true
}
// ExtractTags returns all #tags found in content.
func (s *service) ExtractTags(content []byte) ([]string, error) {
root, err := s.parse(content)
if err != nil {
return nil, err
}
var tags []string
// Walk the AST to find tag nodes
err = gast.Walk(root, func(n gast.Node, entering bool) (gast.WalkStatus, error) {
if !entering {
return gast.WalkContinue, nil
}
if tagNode, ok := asMemoTagNode(n); ok {
tags = append(tags, string(tagNode.Tag))
}
return gast.WalkContinue, nil
})
if err != nil {
return nil, err
}
// Deduplicate tags while preserving original case
return uniquePreserveCase(tags), nil
}
// extractHeadingText extracts plain text content from a heading node.
func extractHeadingText(n gast.Node, source []byte) string {
var buf strings.Builder
for child := n.FirstChild(); child != nil; child = child.NextSibling() {
extractTextFromNode(child, source, &buf)
}
return buf.String()
}
// extractTextFromNode recursively extracts plain text from a node and its children.
func extractTextFromNode(n gast.Node, source []byte, buf *strings.Builder) {
if textNode, ok := n.(*gast.Text); ok {
buf.Write(textNode.Segment.Value(source))
return
}
for child := n.FirstChild(); child != nil; child = child.NextSibling() {
extractTextFromNode(child, source, buf)
}
}
// ExtractProperties computes boolean properties about the content.
func (s *service) ExtractProperties(content []byte) (*storepb.MemoPayload_Property, error) {
root, err := s.parse(content)
if err != nil {
return nil, err
}
prop := &storepb.MemoPayload_Property{}
firstBlockChecked := false
err = gast.Walk(root, func(n gast.Node, entering bool) (gast.WalkStatus, error) {
if !entering {
return gast.WalkContinue, nil
}
// Check if the first block-level child of the document is an H1 heading.
if !firstBlockChecked && n.Parent() != nil && n.Parent().Kind() == gast.KindDocument {
firstBlockChecked = true
if heading, ok := n.(*gast.Heading); ok && heading.Level == 1 {
prop.Title = extractHeadingText(n, content)
}
}
switch n.Kind() {
case gast.KindLink:
prop.HasLink = true
case gast.KindCodeBlock, gast.KindFencedCodeBlock, gast.KindCodeSpan:
prop.HasCode = true
case east.KindTaskCheckBox:
prop.HasTaskList = true
if checkBox, ok := n.(*east.TaskCheckBox); ok {
if !checkBox.IsChecked {
prop.HasIncompleteTasks = true
}
}
default:
// No special handling for other node types
}
return gast.WalkContinue, nil
})
if err != nil {
return nil, err
}
return prop, nil
}
// RenderMarkdown renders goldmark AST back to markdown text.
func (s *service) RenderMarkdown(content []byte) (string, error) {
root, err := s.parse(content)
if err != nil {
return "", err
}
mdRenderer := renderer.NewMarkdownRenderer()
return mdRenderer.Render(root, content), nil
}
// RenderHTML renders markdown content to HTML using goldmark's built-in HTML renderer.
func (s *service) RenderHTML(content []byte) (string, error) {
var buf bytes.Buffer
if err := s.md.Convert(content, &buf); err != nil {
return "", err
}
return buf.String(), nil
}
// GenerateSnippet creates a plain text summary from markdown content.
func (s *service) GenerateSnippet(content []byte, maxLength int) (string, error) {
root, err := s.parse(content)
if err != nil {
return "", err
}
var buf strings.Builder
var lastNodeWasBlock bool
err = gast.Walk(root, func(n gast.Node, entering bool) (gast.WalkStatus, error) {
if entering {
// Skip code blocks entirely (but keep inline code spans for snippet text)
switch n.Kind() {
case gast.KindCodeBlock, gast.KindFencedCodeBlock:
return gast.WalkSkipChildren, nil
default:
// Continue walking for other node types
}
// Add space before block elements (except first)
switch n.Kind() {
case gast.KindParagraph, gast.KindHeading, gast.KindListItem, east.KindTableCell, east.KindTableRow, east.KindTableHeader:
if buf.Len() > 0 && lastNodeWasBlock {
buf.WriteByte(' ')
}
default:
// No space needed for other node types
}
}
if !entering {
// Mark that we just exited a block element
switch n.Kind() {
case gast.KindParagraph, gast.KindHeading, gast.KindListItem, east.KindTableCell, east.KindTableRow, east.KindTableHeader:
lastNodeWasBlock = true
default:
// Not a block element
}
return gast.WalkContinue, nil
}
lastNodeWasBlock = false
// Extract text from various node types
switch node := n.(type) {
case *gast.Text:
segment := node.Segment
buf.Write(segment.Value(content))
if node.SoftLineBreak() {
buf.WriteByte(' ')
}
case *gast.AutoLink:
buf.Write(node.URL(content))
return gast.WalkSkipChildren, nil
case *mast.TagNode:
buf.WriteByte('#')
buf.Write(node.Tag)
default:
// Ignore other node types.
}
// Stop walking if we've exceeded double the max length
// (we'll truncate precisely later)
if buf.Len() > maxLength*2 {
return gast.WalkStop, nil
}
return gast.WalkContinue, nil
})
if err != nil {
return "", err
}
snippet := buf.String()
// Truncate at word boundary if needed
if len(snippet) > maxLength {
snippet = truncateAtWord(snippet, maxLength)
}
return strings.TrimSpace(snippet), nil
}
// ValidateContent checks if the markdown content is valid.
func (s *service) ValidateContent(content []byte) error {
// Try to parse the content
_, err := s.parse(content)
return err
}
// ExtractAll extracts tags, properties, and references in a single parse for efficiency.
func (s *service) ExtractAll(content []byte) (*ExtractedData, error) {
root, err := s.parse(content)
if err != nil {
return nil, err
}
data := &ExtractedData{
Tags: []string{},
Mentions: []string{},
Property: &storepb.MemoPayload_Property{},
}
firstBlockChecked := false
// Single walk to collect all data
err = gast.Walk(root, func(n gast.Node, entering bool) (gast.WalkStatus, error) {
if !entering {
return gast.WalkContinue, nil
}
if tagNode, ok := asMemoTagNode(n); ok {
data.Tags = append(data.Tags, string(tagNode.Tag))
}
if mentionNode, ok := n.(*mast.MentionNode); ok {
data.Mentions = append(data.Mentions, strings.ToLower(string(mentionNode.Username)))
}
// Check if the first block-level child of the document is an H1 heading.
if !firstBlockChecked && n.Parent() != nil && n.Parent().Kind() == gast.KindDocument {
firstBlockChecked = true
if heading, ok := n.(*gast.Heading); ok && heading.Level == 1 {
data.Property.Title = extractHeadingText(n, content)
}
}
// Extract properties based on node kind
switch n.Kind() {
case gast.KindLink:
data.Property.HasLink = true
case gast.KindCodeBlock, gast.KindFencedCodeBlock, gast.KindCodeSpan:
data.Property.HasCode = true
case east.KindTaskCheckBox:
data.Property.HasTaskList = true
if checkBox, ok := n.(*east.TaskCheckBox); ok {
if !checkBox.IsChecked {
data.Property.HasIncompleteTasks = true
}
}
default:
// No special handling for other node types
}
return gast.WalkContinue, nil
})
if err != nil {
return nil, err
}
// Deduplicate tags while preserving original case
data.Tags = uniquePreserveCase(data.Tags)
data.Mentions = uniquePreserveCase(data.Mentions)
return data, nil
}
// RenameTag renames all occurrences of oldTag to newTag in content.
func (s *service) RenameTag(content []byte, oldTag, newTag string) (string, error) {
root, err := s.parse(content)
if err != nil {
return "", err
}
// Walk the AST to find and rename tag nodes
err = gast.Walk(root, func(n gast.Node, entering bool) (gast.WalkStatus, error) {
if !entering {
return gast.WalkContinue, nil
}
if tagNode, ok := asMemoTagNode(n); ok {
if string(tagNode.Tag) == oldTag {
tagNode.Tag = []byte(newTag)
}
}
return gast.WalkContinue, nil
})
if err != nil {
return "", err
}
// Render back to markdown using the already-parsed AST
mdRenderer := renderer.NewMarkdownRenderer()
return mdRenderer.Render(root, content), nil
}
// uniquePreserveCase returns unique strings from input while preserving case.
func uniquePreserveCase(strs []string) []string {
seen := make(map[string]struct{})
var result []string
for _, s := range strs {
if _, exists := seen[s]; !exists {
seen[s] = struct{}{}
result = append(result, s)
}
}
return result
}
// truncateAtWord truncates a string at the last word boundary before maxLength.
// maxLength is treated as a rune (character) count to properly handle UTF-8 multi-byte characters.
func truncateAtWord(s string, maxLength int) string {
// Convert to runes to properly handle multi-byte UTF-8 characters
runes := []rune(s)
if len(runes) <= maxLength {
return s
}
// Truncate to max length (by character count, not byte count)
truncated := string(runes[:maxLength])
// Find last space to avoid cutting in the middle of a word
lastSpace := strings.LastIndexAny(truncated, " \t\n\r")
if lastSpace > 0 {
truncated = truncated[:lastSpace]
}
return truncated + " ..."
}
+664
View File
@@ -0,0 +1,664 @@
package markdown
import (
"strings"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestNewService(t *testing.T) {
svc := NewService()
assert.NotNil(t, svc)
}
func TestValidateContent(t *testing.T) {
svc := NewService()
tests := []struct {
name string
content string
wantErr bool
}{
{
name: "valid markdown",
content: "# Hello\n\nThis is **bold** text.",
wantErr: false,
},
{
name: "empty content",
content: "",
wantErr: false,
},
{
name: "complex markdown",
content: "# Title\n\n- List item 1\n- List item 2\n\n```go\ncode block\n```",
wantErr: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
err := svc.ValidateContent([]byte(tt.content))
if tt.wantErr {
assert.Error(t, err)
} else {
assert.NoError(t, err)
}
})
}
}
func TestGenerateSnippet(t *testing.T) {
svc := NewService()
tests := []struct {
name string
content string
maxLength int
expected string
}{
{
name: "simple text",
content: "Hello world",
maxLength: 100,
expected: "Hello world",
},
{
name: "text with formatting",
content: "This is **bold** and *italic* text.",
maxLength: 100,
expected: "This is bold and italic text.",
},
{
name: "truncate long text",
content: "This is a very long piece of text that should be truncated at a word boundary.",
maxLength: 30,
expected: "This is a very long piece of ...",
},
{
name: "heading and paragraph",
content: "# My Title\n\nThis is the first paragraph.",
maxLength: 100,
expected: "My Title This is the first paragraph.",
},
{
name: "code block removed",
content: "Text before\n\n```go\ncode\n```\n\nText after",
maxLength: 100,
expected: "Text before Text after",
},
{
name: "list items",
content: "- Item 1\n- Item 2\n- Item 3",
maxLength: 100,
expected: "Item 1 Item 2 Item 3",
},
{
name: "inline code preserved",
content: "`console.log('hello')`",
maxLength: 100,
expected: "console.log('hello')",
},
{
name: "text with inline code",
content: "Use `fmt.Println` to print output.",
maxLength: 100,
expected: "Use fmt.Println to print output.",
},
{
name: "image alt text",
content: "![alt text](https://example.com/img.png)",
maxLength: 100,
expected: "alt text",
},
{
name: "strikethrough text",
content: "~~deleted text~~",
maxLength: 100,
expected: "deleted text",
},
{
name: "blockquote",
content: "> quoted text",
maxLength: 100,
expected: "quoted text",
},
{
name: "table cells spaced",
content: "| a | b |\n|---|---|\n| 1 | 2 |",
maxLength: 100,
expected: "a b 1 2",
},
{
name: "plain URL autolink",
content: "https://usememos.com",
maxLength: 100,
expected: "https://usememos.com",
},
{
name: "text with plain URL",
content: "Check out https://usememos.com for more info.",
maxLength: 100,
expected: "Check out https://usememos.com for more info.",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
snippet, err := svc.GenerateSnippet([]byte(tt.content), tt.maxLength)
require.NoError(t, err)
assert.Equal(t, tt.expected, snippet)
})
}
// Test with tag extension enabled (matches production config).
svcWithTags := NewService(WithTagExtension())
tagTests := []struct {
name string
content string
maxLength int
expected string
}{
{
name: "tag only",
content: "#todo",
maxLength: 100,
expected: "#todo",
},
{
name: "text with tags",
content: "Remember to #review the #code",
maxLength: 100,
expected: "Remember to #review the #code",
},
}
for _, tt := range tagTests {
t.Run(tt.name, func(t *testing.T) {
snippet, err := svcWithTags.GenerateSnippet([]byte(tt.content), tt.maxLength)
require.NoError(t, err)
assert.Equal(t, tt.expected, snippet)
})
}
}
func TestExtractProperties(t *testing.T) {
tests := []struct {
name string
content string
hasLink bool
hasCode bool
hasTasks bool
hasInc bool
title string
}{
{
name: "plain text",
content: "Just plain text",
hasLink: false,
hasCode: false,
hasTasks: false,
hasInc: false,
title: "",
},
{
name: "with link",
content: "Check out [this link](https://example.com)",
hasLink: true,
hasCode: false,
hasTasks: false,
hasInc: false,
title: "",
},
{
name: "with inline code",
content: "Use `console.log()` to debug",
hasLink: false,
hasCode: true,
hasTasks: false,
hasInc: false,
title: "",
},
{
name: "with code block",
content: "```go\nfunc main() {}\n```",
hasLink: false,
hasCode: true,
hasTasks: false,
hasInc: false,
title: "",
},
{
name: "with completed task",
content: "- [x] Completed task",
hasLink: false,
hasCode: false,
hasTasks: true,
hasInc: false,
title: "",
},
{
name: "with incomplete task",
content: "- [ ] Todo item",
hasLink: false,
hasCode: false,
hasTasks: true,
hasInc: true,
title: "",
},
{
name: "mixed tasks",
content: "- [x] Done\n- [ ] Not done",
hasLink: false,
hasCode: false,
hasTasks: true,
hasInc: true,
title: "",
},
{
name: "everything",
content: "# Title\n\n[Link](url)\n\n`code`\n\n- [ ] Task",
hasLink: true,
hasCode: true,
hasTasks: true,
hasInc: true,
title: "Title",
},
{
name: "h1 as first node extracts title",
content: "# My Article Title\n\nBody text here.",
title: "My Article Title",
},
{
name: "h2 as first node does not extract title",
content: "## Sub Heading\n\nBody text.",
title: "",
},
{
name: "h1 not first node does not extract title",
content: "Some text\n\n# Heading Later",
title: "",
},
{
name: "h1 with inline formatting extracts plain text",
content: "# Title with **bold** and *italic*\n\nBody.",
title: "Title with bold and italic",
},
{
name: "empty content has no title",
content: "",
title: "",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
svc := NewService()
props, err := svc.ExtractProperties([]byte(tt.content))
require.NoError(t, err)
assert.Equal(t, tt.hasLink, props.HasLink, "HasLink")
assert.Equal(t, tt.hasCode, props.HasCode, "HasCode")
assert.Equal(t, tt.hasTasks, props.HasTaskList, "HasTaskList")
assert.Equal(t, tt.hasInc, props.HasIncompleteTasks, "HasIncompleteTasks")
assert.Equal(t, tt.title, props.Title, "Title")
})
}
}
func TestExtractAllTitle(t *testing.T) {
svc := NewService(WithTagExtension())
tests := []struct {
name string
content string
title string
}{
{
name: "h1 first node",
content: "# Article Title\n\nContent with #tag",
title: "Article Title",
},
{
name: "no h1",
content: "Just text with #tag",
title: "",
},
{
name: "h1 not first",
content: "Intro\n\n# Late Heading",
title: "",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
data, err := svc.ExtractAll([]byte(tt.content))
require.NoError(t, err)
assert.Equal(t, tt.title, data.Property.Title, "Title")
})
}
}
func TestExtractAllMentions(t *testing.T) {
svc := NewService(WithTagExtension(), WithMentionExtension())
data, err := svc.ExtractAll([]byte("Hi @Alice and @bob. Email support@example.com should stay plain. #tag"))
require.NoError(t, err)
assert.ElementsMatch(t, []string{"alice", "bob"}, data.Mentions)
assert.ElementsMatch(t, []string{"tag"}, data.Tags)
maxLengthUsername := "a" + strings.Repeat("b", 62)
data, err = svc.ExtractAll([]byte("@" + maxLengthUsername))
require.NoError(t, err)
assert.Equal(t, []string{maxLengthUsername}, data.Mentions)
data, err = svc.ExtractAll([]byte("@" + maxLengthUsername + "c"))
require.NoError(t, err)
assert.Empty(t, data.Mentions)
}
func TestExtractAllSkipsTagsInsideLinks(t *testing.T) {
svc := NewService(WithTagExtension())
data, err := svc.ExtractAll([]byte(
"[release #notes](https://example.com/releases#release-notes)\n\n" +
"![preview #image](https://example.com/image#preview)\n\n" +
"Outside #memo-tag",
))
require.NoError(t, err)
assert.ElementsMatch(t, []string{"memo-tag"}, data.Tags)
assert.True(t, data.Property.HasLink)
}
func TestExtractTags(t *testing.T) {
tests := []struct {
name string
content string
withExt bool
expected []string
}{
{
name: "no tags",
content: "Just plain text",
withExt: false,
expected: []string{},
},
{
name: "single tag",
content: "Text with #tag",
withExt: true,
expected: []string{"tag"},
},
{
name: "multiple tags",
content: "Text with #tag1 and #tag2",
withExt: true,
expected: []string{"tag1", "tag2"},
},
{
name: "duplicate tags",
content: "#work is important. #Work #WORK",
withExt: true,
expected: []string{"work", "Work", "WORK"},
},
{
name: "tags with hyphens and underscores",
content: "Tags: #work-notes #2024_plans",
withExt: true,
expected: []string{"work-notes", "2024_plans"},
},
{
name: "tags at end of sentence",
content: "This is important #urgent.",
withExt: true,
expected: []string{"urgent"},
},
{
name: "headings not tags",
content: "## Heading\n\n# Title\n\nText with #realtag",
withExt: true,
expected: []string{"realtag"},
},
{
name: "numeric tag",
content: "Issue #123",
withExt: true,
expected: []string{"123"},
},
{
name: "tag in list",
content: "- Item 1 #todo\n- Item 2 #done",
withExt: true,
expected: []string{"todo", "done"},
},
{
name: "autolink URL fragment not tag",
content: "https://github.com/dmtrKovalenko/fff#pi-agent-extension\n\nProject #memo-tag",
withExt: true,
expected: []string{"memo-tag"},
},
{
name: "markdown link text and fragment not tags",
content: "[release #notes](https://example.com/releases#release-notes) Outside #memo-tag",
withExt: true,
expected: []string{"memo-tag"},
},
{
name: "reference link text and fragment not tags",
content: "[reference #anchor][docs]\n\n[docs]: https://example.com/docs#reference-anchor\n\nOutside #memo-tag",
withExt: true,
expected: []string{"memo-tag"},
},
{
name: "image alt text and fragment not tags",
content: "![preview #image](https://example.com/image#preview)\n\nOutside #memo-tag",
withExt: true,
expected: []string{"memo-tag"},
},
{
name: "no extension enabled",
content: "Text with #tag",
withExt: false,
expected: []string{},
},
{
name: "Chinese tag",
content: "Text with #测试",
withExt: true,
expected: []string{"测试"},
},
{
name: "Chinese tag followed by punctuation",
content: "Text #测试。 More text",
withExt: true,
expected: []string{"测试"},
},
{
name: "mixed Chinese and ASCII tag",
content: "#测试test123 content",
withExt: true,
expected: []string{"测试test123"},
},
{
name: "Japanese tag",
content: "#日本語 content",
withExt: true,
expected: []string{"日本語"},
},
{
name: "Korean tag",
content: "#한국어 content",
withExt: true,
expected: []string{"한국어"},
},
{
name: "hierarchical tag with Chinese",
content: "#work/测试/项目",
withExt: true,
expected: []string{"work/测试/项目"},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
var svc Service
if tt.withExt {
svc = NewService(WithTagExtension())
} else {
svc = NewService()
}
tags, err := svc.ExtractTags([]byte(tt.content))
require.NoError(t, err)
assert.ElementsMatch(t, tt.expected, tags)
})
}
}
func TestRenameTagSkipsTagsInsideLinks(t *testing.T) {
svc := NewService(WithTagExtension())
result, err := svc.RenameTag(
[]byte("[release #notes](https://example.com/releases#release-notes)\n\nOutside #notes"),
"notes",
"done",
)
require.NoError(t, err)
assert.Equal(t, "[release #notes](https://example.com/releases#release-notes)\n\nOutside #done", result)
}
func TestUniquePreserveCase(t *testing.T) {
tests := []struct {
name string
input []string
expected []string
}{
{
name: "empty",
input: []string{},
expected: []string{},
},
{
name: "unique items",
input: []string{"tag1", "tag2", "tag3"},
expected: []string{"tag1", "tag2", "tag3"},
},
{
name: "duplicates",
input: []string{"tag", "TAG", "Tag"},
expected: []string{"tag", "TAG", "Tag"},
},
{
name: "mixed",
input: []string{"Work", "work", "Important", "work"},
expected: []string{"Work", "work", "Important"},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
result := uniquePreserveCase(tt.input)
assert.ElementsMatch(t, tt.expected, result)
})
}
}
func TestTruncateAtWord(t *testing.T) {
tests := []struct {
name string
input string
maxLength int
expected string
}{
{
name: "no truncation needed",
input: "short",
maxLength: 10,
expected: "short",
},
{
name: "exact length",
input: "exactly ten",
maxLength: 11,
expected: "exactly ten",
},
{
name: "truncate at word",
input: "this is a long sentence",
maxLength: 10,
expected: "this is a ...",
},
{
name: "truncate very long word",
input: "supercalifragilisticexpialidocious",
maxLength: 10,
expected: "supercalif ...",
},
{
name: "CJK characters without spaces",
input: "这是一个很长的中文句子没有空格的情况下也要正确处理",
maxLength: 15,
expected: "这是一个很长的中文句子没有空格 ...",
},
{
name: "mixed CJK and Latin",
input: "这是中文mixed with English文字",
maxLength: 10,
expected: "这是中文mixed ...",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
result := truncateAtWord(tt.input, tt.maxLength)
assert.Equal(t, tt.expected, result)
})
}
}
// Benchmark tests.
func BenchmarkGenerateSnippet(b *testing.B) {
svc := NewService()
content := []byte(`# Large Document
This is a large document with multiple paragraphs and formatting.
## Section 1
Here is some **bold** text and *italic* text with [links](https://example.com).
- List item 1
- List item 2
- List item 3
## Section 2
More content here with ` + "`inline code`" + ` and other elements.
` + "```go\nfunc example() {\n return true\n}\n```")
b.ResetTimer()
for i := 0; i < b.N; i++ {
_, err := svc.GenerateSnippet(content, 200)
if err != nil {
b.Fatal(err)
}
}
}
func BenchmarkExtractProperties(b *testing.B) {
svc := NewService()
content := []byte("# Title\n\n[Link](url)\n\n`code`\n\n- [ ] Task\n- [x] Done")
b.ResetTimer()
for i := 0; i < b.N; i++ {
_, err := svc.ExtractProperties(content)
if err != nil {
b.Fatal(err)
}
}
}
+87
View File
@@ -0,0 +1,87 @@
package parser
import (
"unicode"
"unicode/utf8"
gast "github.com/yuin/goldmark/ast"
"github.com/yuin/goldmark/parser"
"github.com/yuin/goldmark/text"
mast "github.com/usememos/memos/internal/markdown/ast"
)
const (
// MaxMentionLength matches the username token length accepted by the API.
MaxMentionLength = 63
)
type mentionParser struct{}
// NewMentionParser creates a new inline parser for @mention syntax.
func NewMentionParser() parser.InlineParser {
return &mentionParser{}
}
// Trigger returns the characters that trigger this parser.
func (*mentionParser) Trigger() []byte {
return []byte{'@'}
}
func isValidMentionRune(r rune) bool {
return unicode.IsLetter(r) || unicode.IsNumber(r) || r == '-'
}
func isMentionBoundary(r rune) bool {
return unicode.IsSpace(r) || unicode.IsPunct(r) || unicode.IsSymbol(r)
}
// Parse parses @mention syntax while avoiding email-address matches.
func (*mentionParser) Parse(_ gast.Node, block text.Reader, _ parser.Context) gast.Node {
line, _ := block.PeekLine()
if len(line) == 0 || line[0] != '@' {
return nil
}
prev := block.PrecendingCharacter()
if prev != '\n' && !isMentionBoundary(prev) {
return nil
}
start := 1
pos := start
runeCount := 0
hasLetterOrNumber := false
for pos < len(line) {
r, size := utf8.DecodeRune(line[pos:])
if r == utf8.RuneError && size == 1 {
break
}
if !isValidMentionRune(r) {
break
}
if unicode.IsLetter(r) || unicode.IsNumber(r) {
hasLetterOrNumber = true
}
runeCount++
if runeCount > MaxMentionLength {
return nil
}
pos += size
}
if pos <= start || !hasLetterOrNumber {
return nil
}
username := line[start:pos]
usernameCopy := make([]byte, len(username))
copy(usernameCopy, username)
block.Advance(pos)
return &mast.MentionNode{
Username: usernameCopy,
}
}

Some files were not shown because too many files have changed in this diff Show More