mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-14 01:47:03 +08:00
23 lines
563 B
JavaScript
23 lines
563 B
JavaScript
export {
|
|
ubrowserOperationConfigs,
|
|
defaultUBrowserConfigs,
|
|
} from "./ubrowserConfig";
|
|
|
|
import { commandCategories as categories } from "./commands";
|
|
|
|
// 从commandCategories中提取所有命令
|
|
export const availableCommands = categories.reduce((commands, category) => {
|
|
return commands.concat(
|
|
category.commands.map((cmd) => ({
|
|
type: category.label,
|
|
...cmd,
|
|
}))
|
|
);
|
|
}, []);
|
|
|
|
export const findCommandByValue = (value) => {
|
|
return availableCommands.find((cmd) => cmd.value === value);
|
|
};
|
|
|
|
export const commandCategories = categories;
|