Migrate Angular UI from portmaster-ui to desktop/angular. Update Earthfile to build libs, UI and tauri-builtin

This commit is contained in:
Patrick Pacher
2024-03-20 10:43:29 +01:00
parent 66381baa1a
commit 4b77945517
922 changed files with 84071 additions and 26 deletions

41
desktop/angular/src/electron-app.d.ts vendored Normal file
View 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>;
}