mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-18 15:09:45 +02:00
Run oxfmt across repo, add format script and docs
Add .oxfmtignore to skip generated bindings and wasm-pack output. Add npm format script, update DEVELOPMENT.md for Vite+ toolchain, and format all non-generated files with oxfmt. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import type { Folder } from '@yaakapp-internal/models';
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import type { Folder } from "@yaakapp-internal/models";
|
||||
import type {
|
||||
CallFolderActionRequest,
|
||||
FolderAction,
|
||||
GetFolderActionsResponse,
|
||||
} from '@yaakapp-internal/plugins';
|
||||
import { useMemo } from 'react';
|
||||
import { invokeCmd } from '../lib/tauri';
|
||||
import { usePluginsKey } from './usePlugins';
|
||||
} from "@yaakapp-internal/plugins";
|
||||
import { useMemo } from "react";
|
||||
import { invokeCmd } from "../lib/tauri";
|
||||
import { usePluginsKey } from "./usePlugins";
|
||||
|
||||
export type CallableFolderAction = Pick<FolderAction, 'label' | 'icon'> & {
|
||||
export type CallableFolderAction = Pick<FolderAction, "label" | "icon"> & {
|
||||
call: (folder: Folder) => Promise<void>;
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@ export function useFolderActions() {
|
||||
const pluginsKey = usePluginsKey();
|
||||
|
||||
const actionsResult = useQuery<CallableFolderAction[]>({
|
||||
queryKey: ['folder_actions', pluginsKey],
|
||||
queryKey: ["folder_actions", pluginsKey],
|
||||
queryFn: () => getFolderActions(),
|
||||
});
|
||||
|
||||
@@ -30,7 +30,7 @@ export function useFolderActions() {
|
||||
}
|
||||
|
||||
export async function getFolderActions() {
|
||||
const responses = await invokeCmd<GetFolderActionsResponse[]>('cmd_folder_actions');
|
||||
const responses = await invokeCmd<GetFolderActionsResponse[]>("cmd_folder_actions");
|
||||
const actions = responses.flatMap((r) =>
|
||||
r.actions.map((a, i) => ({
|
||||
label: a.label,
|
||||
@@ -41,7 +41,7 @@ export async function getFolderActions() {
|
||||
pluginRefId: r.pluginRefId,
|
||||
args: { folder },
|
||||
};
|
||||
await invokeCmd('cmd_call_folder_action', { req: payload });
|
||||
await invokeCmd("cmd_call_folder_action", { req: payload });
|
||||
},
|
||||
})),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user