Repository navigation
feat: add respack export function - #886
Merged
Merged
Conversation
7 tasks done
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds an export capability for non-default resource packs, reusing the existing request_export / take_export / resolve_export flow so users can pick an output location and export a respack as an import-compatible .zip.
Changes:
- Add an export button to the respack UI (only for non-default packs) and hook it into the shared export workflow.
- Implement respack directory zipping via
compress_folderand write the zip to the chosen export target. - Register a new export icon texture in the global
Iconsloader.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
phira/src/page/respack.rs |
Adds export button UI + export task handling and filename sanitization. |
phira/src/icons.rs |
Registers export.png as a new Icons::export texture. |
assets/export.png |
New icon asset used by the export button. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Mivik
force-pushed
the
respack-export
branch
from
September 5, 2026 08:33
bd8afc1 to
58c0d86
Compare
Mivik
approved these changes
Sep 5, 2026
Contributor
Final Merged UIDiffers from the screenshot in the PR Description after "feat: adjust export button"
|
Contributor
Author
Mivik changed the button position |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


概述
为非默认皮肤资源包增加导出功能,导出格式与导入格式完全一致(zip 压缩包)。
实现内容
compress_folder将资源包目录压缩为 ziprequest_export/resolve_export/take_export机制,支持系统文件选择器/ \ : * ? " < > |→_)按钮位置
导出按钮位于信息按钮左侧,与信息、删除按钮保持相同间距和样式:
改动文件
phira/src/page/respack.rs:导出逻辑、按钮渲染、文件名清理phira/src/icons.rs:注册导出图标assets/export.png:导出图标资源测试情况
cargo fmt --all --check通过