Skip to content

Conversation

@SoClear
Copy link

@SoClear SoClear commented Dec 21, 2025

Description / 描述

Added the 'Show gallery thumbnails' feature in' Local Settings', which is enabled by default (previously mandatory) and can be manually selected to 'Visible' or 'None'“

在 ”本地设置“ 添加了 ”显示画廊缩略图“ 功能,默认开启(之前是强制开启),可手动选择 ”显示“ 或者 ”隐藏“

Motivation and Context / 背景

When the thumbnail feature is not enabled in storage, browsing large images over approximately 20MiB becomes extremely laggy. Disabling thumbnails makes the browsing smooth.

在存储没有开启缩略图功能时,浏览约 20MiB 以上的大图非常卡顿,如果关闭缩略图就会变得流畅。

How Has This Been Tested? / 测试

Local testing

  1. Click on "Local Settings," and at the bottom, you'll find "Show gallery thumbnails" set to "Visible" by default. Turn off "Local Settings," open the image, and thumbnails are indeed displayed.
  2. Click on Local Settings again, select "None" for "Show gallery thumbnails," then close Local Settings, open the image, and confirm that the thumbnails are hidden.
  3. Repeatedly display and hide to view the image, which meets expectations.

本地测试

  1. 点击本地设置,底部有 “显示画廊缩略图” 默认为 “显示”,关闭本地设置,打开图片,确实显示了缩略图。
  2. 再次点击本地设置,“显示画廊缩略图” 选择 ”隐藏“,关闭本地设置,打开图片,确实隐藏了缩略图。
  3. 反复显示和隐藏,查看图片,符合预期。

Checklist / 检查清单

  • I have read the CONTRIBUTING document.
    我已阅读 CONTRIBUTING 文档。
  • I have formatted my code with go fmt or prettier.
    我已使用 go fmtprettier 格式化提交的代码。
  • I have added appropriate labels to this PR (or mentioned needed labels in the description if lacking permissions).
    我已为此 PR 添加了适当的标签(如无权限或需要的标签不存在,请在描述中说明,管理员将后续处理)。
  • I have requested review from relevant code authors using the "Request review" feature when applicable.
    我已在适当情况下使用"Request review"功能请求相关代码作者进行审查。
  • I have updated the repository accordingly (If it’s needed).
    我已相应更新了相关仓库(若适用)。

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a user-configurable setting to show or hide gallery thumbnails in the lightGallery image viewer, addressing performance issues when viewing large images (>20MiB) without storage-level thumbnail support.

Key Changes

  • Added show_gallery_thumbnails setting with "visible" (default) and "none" options
  • Gallery now respects the setting and reinitializes when the setting changes
  • Added English translations for the new setting

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/store/local_settings.ts Defines the new show_gallery_thumbnails local setting with select type and two options
src/pages/home/folder/Folder.tsx Imports and uses the new setting to control thumbnail display, with reactive effect to reinitialize gallery when setting changes
src/lang/en/home.json Adds English translations for the setting label and option values

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant