fix(deark): 合併格式類別,UI 只顯示單一 extract 選項

This commit is contained in:
Your Name 2026-01-23 23:45:17 +08:00
parent 9b4ecadc79
commit 737e925ac7

View file

@ -17,8 +17,9 @@ import { ExecFileFn } from "./types";
export const properties = {
from: {
// 所有 deark 支援的格式合併為一個類別
files: [
// 壓縮/封存格式
archive: [
"zip",
"lha",
"lzh",
@ -41,9 +42,7 @@ export const properties = {
"deb",
"ar",
"a",
],
// 圖片格式
images: [
"ico",
"cur",
"ani",
@ -87,13 +86,22 @@ export const properties = {
"jbig",
"jbg",
"fpx",
],
// 字型格式
fonts: ["fon", "fnt", "psf", "bdf", "pcf"],
"fon",
"fnt",
"psf",
"bdf",
"pcf",
// 可執行檔 / 資源檔
binary: ["exe", "dll", "com", "ne", "mz", "res", "rsrc", "icl"],
"exe",
"dll",
"com",
"ne",
"mz",
"res",
"rsrc",
"icl",
// 其他格式
other: [
"swf",
"fla",
"amiga",
@ -105,18 +113,11 @@ export const properties = {
"crt",
"tap",
"tzx",
"wav",
"riff",
"avi",
"ani",
],
},
to: {
archive: ["extract"],
images: ["extract"],
fonts: ["extract"],
binary: ["extract"],
other: ["extract"],
files: ["extract"],
},
// deark 輸出可能是多個檔案,使用 archive 模式
outputMode: "archive" as const,