Migrate Angular UI from portmaster-ui to desktop/angular. Update Earthfile to build libs, UI and tauri-builtin
This commit is contained in:
41
desktop/angular/src/electron-app.d.ts
vendored
Normal file
41
desktop/angular/src/electron-app.d.ts
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
declare global {
|
||||
interface Window {
|
||||
app: AppAPI;
|
||||
}
|
||||
}
|
||||
|
||||
export class AppAPI {
|
||||
/** Returns the current platform */
|
||||
getPlatform(): Promise<string>;
|
||||
|
||||
/** The installation directory of portmaster. */
|
||||
getInstallDir(): Promise<string>;
|
||||
|
||||
/**
|
||||
* Open an URL or path using an external application.
|
||||
*
|
||||
* @param pathOrUrl The path or URL to open.
|
||||
*/
|
||||
openExternal(pathOrUrl: string): Promise<void>;
|
||||
|
||||
/**
|
||||
* Creates a new URL with the file:// scheme. Works
|
||||
* on any platform.
|
||||
*
|
||||
* @param path The path for the file URL.
|
||||
*/
|
||||
createFileURL(path: string): Promise<string>;
|
||||
|
||||
/**
|
||||
* Returns a dataURL for the icon that is used to represent
|
||||
* the path on this platform.
|
||||
* This method only works on windows for now. On all other
|
||||
* platforms an empty string is returned.
|
||||
*
|
||||
* @param path The path the the binary
|
||||
*/
|
||||
getFileIcon(path: string): Promise<string>;
|
||||
|
||||
/** Exit the electron appliction. */
|
||||
exitApp(): Promise<void>;
|
||||
}
|
||||
Reference in New Issue
Block a user