Skip to content

✨ Feature: add global url rewrite support#1377

Merged
Molunerfinn merged 4 commits intodevfrom
feature-url-rewrite
Jan 12, 2026
Merged

✨ Feature: add global url rewrite support#1377
Molunerfinn merged 4 commits intodevfrom
feature-url-rewrite

Conversation

@Molunerfinn
Copy link
Owner

ISSUES CLOSED: #1255, #1281

Copy link

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 pull request implements a global URL rewrite feature to replace the existing "change host" functionality. The feature allows users to define regex-based rules to rewrite image URLs both globally (in settings) and on-demand (in the gallery). This addresses user requests from issues #1255 and #1281 for more flexible URL manipulation beyond simple domain changes.

Changes:

  • Adds a new URL Rewrite settings page with regex-based rule management (add, edit, delete, reorder, preview)
  • Replaces the gallery "change host" feature with a more flexible "URL rewrite" toolbox option supporting both global rules and temporary rules
  • Upgrades the PicGo dependency from v1.6.4 to v1.8.1 to support the new URL rewrite functionality

Reviewed changes

Copilot reviewed 14 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/universal/types/types.d.ts Adds originImgUrl field to ImgInfo interface to track original URLs
src/universal/types/i18n.d.ts Adds 50+ new translation keys for URL rewrite UI and gallery integration
src/renderer/utils/dataSender.ts Ensures raw data extraction when saving single config values
src/renderer/utils/common.ts Improves getRawData recursion to handle null and deeply nested reactive objects
src/renderer/router/index.ts Adds route for the new URL Rewrite settings page
src/renderer/router/config.ts Exports URL_REWRITE_PAGE constant
src/renderer/pages/components/settings/buttonArea/ButtonAreaSettings.vue Adds button to navigate to URL Rewrite settings
src/renderer/pages/UrlRewrite.vue New 595-line component implementing the URL rewrite rule management UI
src/renderer/components/form/BaseConfigForm.vue Removes unreachable return statement and adds unused import
src/main/events/rpc/routes/galleryToolbox/builtIn/index.ts Updates to import changeURL instead of changeHost
src/main/events/rpc/routes/galleryToolbox/builtIn/changeURL.ts New file replacing changeHost.ts with flexible regex-based URL rewriting
src/main/events/rpc/routes/galleryToolbox/builtIn/changeHost.ts Deleted file - replaced by changeURL.ts
public/i18n/zh-TW.yml Adds Traditional Chinese translations for URL rewrite feature
public/i18n/zh-CN.yml Adds Simplified Chinese translations for URL rewrite feature
public/i18n/en.yml Adds English translations for URL rewrite feature
pnpm-lock.yaml Updates dependencies for PicGo v1.8.1
package.json Upgrades PicGo from ^1.6.4 to ^1.8.1
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

@Molunerfinn Molunerfinn merged commit 2ed1dd5 into dev Jan 12, 2026
@Molunerfinn Molunerfinn deleted the feature-url-rewrite branch January 12, 2026 10:41
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.

[Feature]: 希望增加相册批量修改图片路径

2 participants