mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-10 03:03:37 +02:00
Move local plugin install command into plugins_ext
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { invokeCmd } from '../lib/tauri';
|
||||
import { installPluginFromDirectory } from '@yaakapp-internal/plugins';
|
||||
import { useFastMutation } from './useFastMutation';
|
||||
|
||||
export function useInstallPlugin() {
|
||||
return useFastMutation<void, unknown, string>({
|
||||
mutationKey: ['install_plugin'],
|
||||
mutationFn: async (directory: string) => {
|
||||
await invokeCmd('cmd_install_plugin', { directory });
|
||||
await installPluginFromDirectory(directory);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -36,7 +36,6 @@ type TauriCmd =
|
||||
| 'cmd_http_request_body'
|
||||
| 'cmd_http_response_body'
|
||||
| 'cmd_import_data'
|
||||
| 'cmd_install_plugin'
|
||||
| 'cmd_metadata'
|
||||
| 'cmd_restart'
|
||||
| 'cmd_new_child_window'
|
||||
|
||||
Reference in New Issue
Block a user