mirror of
https://github.com/infinilabs/coco-app.git
synced 2025-12-23 06:49:24 +01:00
refactor: don't hide pinned window on search result open (#662)
* refactor: don't hide pinned window on search result open * refactor: update
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type { BasePlatformAdapter } from "@/types/platform";
|
||||
import { copyToClipboard, OpenURLWithBrowser } from ".";
|
||||
|
||||
export interface WebPlatformAdapter extends BasePlatformAdapter {
|
||||
// Add web-specific methods here
|
||||
@@ -188,5 +189,15 @@ export const createWebAdapter = (): WebPlatformAdapter => {
|
||||
async revealItemInDir(path) {
|
||||
console.log("revealItemInDir is not supported in web environment", path);
|
||||
},
|
||||
|
||||
async openSearchItem(data) {
|
||||
if (data?.url) {
|
||||
return OpenURLWithBrowser(data.url);
|
||||
}
|
||||
|
||||
if (data?.payload?.result?.value) {
|
||||
return copyToClipboard(data.payload.result.value);
|
||||
}
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user