test: Add playwright main usage test
Some checks failed
Deploy Web Apps / deploy (push) Has been cancelled
Queue Release Build / prepare (push) Successful in 21s
Queue Release Build / build-linux (push) Successful in 27m44s
Queue Release Build / build-windows (push) Successful in 32m16s
Queue Release Build / finalize (push) Successful in 1m54s
Some checks failed
Deploy Web Apps / deploy (push) Has been cancelled
Queue Release Build / prepare (push) Successful in 21s
Queue Release Build / build-linux (push) Successful in 27m44s
Queue Release Build / build-windows (push) Successful in 32m16s
Queue Release Build / finalize (push) Successful in 1m54s
This commit is contained in:
@@ -193,6 +193,7 @@ export interface ElectronApi {
|
||||
deleteFile: (filePath: string) => Promise<boolean>;
|
||||
ensureDir: (dirPath: string) => Promise<boolean>;
|
||||
onContextMenu: (listener: (params: ContextMenuParams) => void) => () => void;
|
||||
contextMenuCommand: (command: string) => Promise<void>;
|
||||
copyImageToClipboard: (srcURL: string) => Promise<boolean>;
|
||||
command: <T = unknown>(command: ElectronCommand) => Promise<T>;
|
||||
query: <T = unknown>(query: ElectronQuery) => Promise<T>;
|
||||
|
||||
@@ -48,7 +48,12 @@ export class NativeContextMenuComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
execCommand(command: string): void {
|
||||
document.execCommand(command);
|
||||
const api = this.electronBridge.getApi();
|
||||
|
||||
if (api?.contextMenuCommand) {
|
||||
api.contextMenuCommand(command);
|
||||
}
|
||||
|
||||
this.close();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user