Skip to content

opti(media): borderless image viewer & text-image memory view - #660

Open
fishyy119 wants to merge 9 commits into
ximu3:mainfrom
fishyy119:opti/memory
Open

opti(media): borderless image viewer & text-image memory view#660
fishyy119 wants to merge 9 commits into
ximu3:mainfrom
fishyy119:opti/memory

Conversation

@fishyy119

@fishyy119 fishyy119 commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

通用媒体资源优化

更改大图查看功能样式为无边框 lightbox

  • 引入 yet-another-react-lightbox 以驱动无边框的沉浸式图片查看器
  • 移除原先的大图查看器,图片复制保存功能由浏览器右键菜单替代,快速缩放恢复功能由第三方库提供的双击手势替代
  • 添加用于描述、记忆封面和内联记忆图片的上下文图片切换功能
  • 将游戏封面右键菜单操作替换为在详情页直接左键点击查看
  • 移除过时的图片查看器控件、翻译、临时文件处理以及相关的 IPC 端点

Resolve #650

支持在查看大图的同时进行前后图片切换

Resolve #657

修复简介动图在切换游戏时刷新不及时的问题

Fix #662
Fix #659
Fix #665

回忆模块优化

重新引入完整图文回忆卡片作为可选视图

新增了“图文”回忆视图,参考初版的回忆卡片样式,旨在不弹出弹窗的情况下完整显示所有的封面与笔记内容。

Resolve #616

优化回忆页面的悬浮按钮

目前卡片视图与图文视图会在缺失封面或笔记的情况下,在左上角渲染悬浮按钮作为快捷添加入口,但是在部分情况下可能会对回忆文字产生遮挡。因此将悬浮按钮的出现位置转移到右上角,同时支持在设置中关闭悬浮按钮(两种情况独立)。

支持回忆置顶与升降序调整

Resolve #424

回忆分页选项支持设置为不分页

Resolve #672

支持为特定游戏单独固定回忆视图模式

Resolve #675

修复回忆页面有序列表缩进问题

@fishyy119
fishyy119 marked this pull request as ready for review July 24, 2026 17:04
Copilot AI review requested due to automatic review settings July 24, 2026 17:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@fishyy119 fishyy119 changed the title feat: replace the image dialog with an immersive lightbox opti(memory): borderless image viewer & text-and-image memory view Jul 24, 2026
@fishyy119
fishyy119 requested a review from Copilot July 24, 2026 17:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@fishyy119 fishyy119 changed the title opti(memory): borderless image viewer & text-and-image memory view opti(media): borderless image viewer & text-image memory view Jul 26, 2026
@fishyy119
fishyy119 requested a review from Copilot August 2, 2026 05:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 41 out of 42 changed files in this pull request and generated no new comments.

Suppressed comments (2)

src/renderer/src/components/ui/image-viewer.tsx:26

  • index (and visible) are initialized from request only on the first mount. If request changes while the component stays mounted (e.g. opening a different image without fully unmounting the viewer), the viewer can keep the previous slide index / closed state and open at the wrong image or stay closed.
    src/renderer/src/components/ui/image-viewer.tsx:43
  • onEscapeKeyDown always prevents the default Radix Escape handling, but if controllerRef.current is still null (e.g. before the Lightbox mounts), Escape will do nothing and the viewer can become impossible to close via keyboard.

- Introduce `yet-another-react-lightbox` to power an immersive borderless image viewer
- Replace the bordered image dialog with YARL-based zooming, panning, backdrop dismissal, and finite navigation
- Add contextual image switching for descriptions, memory covers, and inline memory images
- Replace the game cover context-menu action with direct left-click viewing on the detail page
- Remove obsolete image viewer controls, translations, temporary-file handling, and related IPC endpoints
- Add a responsive masonry view with complete covers and full note content
- Refine the masonry and list view icons for clearer visual distinction
- Move missing-content actions to the top right and hide the card date badge while they are visible
- Add independent appearance settings for cover and note hover actions across card and full-content views
Steam video elements may keep displaying media from the previous game
after switching games. Their parser-generated keys are derived from the
surrounding tree structure, so React may reuse the existing video node
instead of recreating it and selecting the new media resource.

Use an MD5 hash of the sanitized HTML as the key of the outermost div.
This forces the entire description subtree to remount whenever its
rendered content changes, fixing stale video selection and preventing
other unknown stale DOM or media state issues.
Ordered-list markers were rendered outside the content box, causing long
sequence numbers to be clipped.

Render markers inside the list and remove the default start padding so
complete sequence numbers remain visible.
- Persist pin state and prioritize pinned memories across all four views and the image viewer
- Unify view data and runtime operations while reorganizing memory views and supporting components
Add an ascending and descending toggle to the memory navigation bar, and ppersist direction in appearance settings
Memory views previously required a fixed page size, which made it inconvenient to browse all entries continuously when pagination was unnecessary.

Introduce a persisted unpaginated mode for all four memory views, using zero as the explicit page-size sentinel. When enabled, the active view renders all matching memories, resets its page state, and hides the navigation controls while keeping the page-size selector available.
Memory views previously shared the last selected layout across every game, causing games suited to a particular presentation to change whenever the global view was updated elsewhere.

This commit add a nullable per-game view preference while retaining the persisted global view as the fallback. Expose a settings popover in the memory toolbar that lets users pin the current view to a game or return it to global behavior, and route subsequent view changes to the appropriate persistence target.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants