diff --git a/public/index.html b/public/index.html
index 52f17c5..5dab083 100644
--- a/public/index.html
+++ b/public/index.html
@@ -2,7 +2,7 @@
-
+
app
diff --git a/src/appmanager/applications/duckduckgo.js b/src/appmanager/applications/duckduckgo.js
deleted file mode 100644
index e0bda9f..0000000
--- a/src/appmanager/applications/duckduckgo.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { spawnBrowser } from "../appruntime";
-
-const app = {
- name: "duckduckgo",
- component: null,
- async open() {
- await spawnBrowser("https://duckduckgo.com/");
- }
-};
-
-export default app;
\ No newline at end of file
diff --git a/src/appmanager/appruntime.js b/src/appmanager/appruntime.js
deleted file mode 100644
index 8b36a7e..0000000
--- a/src/appmanager/appruntime.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import env from '../env';
-
-const { spawn } = require('child_process');
-
-export function spawnBrowser(url, params=[]) {
- return new Promise((resolve, reject) => {
- const browserProcess = spawn(env.browserLaunch.browserBinary, [...env.browserLaunch.params, ...params, url]);
-
- browserProcess.on("spawn", () => resolve(browserProcess));
- browserProcess.on("error", e => reject(e));
- });
-}
\ No newline at end of file
diff --git a/src/appmanager/apputils.js b/src/appmanager/apputils.js
new file mode 100644
index 0000000..7c8d598
--- /dev/null
+++ b/src/appmanager/apputils.js
@@ -0,0 +1,5 @@
+import env from '../env';
+
+export function spawnBrowser(url, params=[]) {
+ window._$waffletvapi.spawnAndSuspendRendering(env.browserLaunch.browserBinary, [...env.browserLaunch.params, ...params, url]);
+};
diff --git a/src/appmanager/provider.js b/src/appmanager/provider.js
index 2a6a44f..b3e65b5 100644
--- a/src/appmanager/provider.js
+++ b/src/appmanager/provider.js
@@ -1,8 +1,23 @@
-import duckduckgo from "./applications/duckduckgo";
+
+/*
+ Example of an app tile definition:
+
+ const myApp = {
+ name: "App",
+ style: {
+ backgroundImageExt: `url("http://example.com/my-app-logo.svg")`,
+ backgroundColor: "#ffffff"
+ },
+ component: null,
+ async open() {
+ await spawnBrowser("https://example.com");
+ }
+ };
+*/
const provider = {
repository: [
- duckduckgo
+ /* app tile repository to be filled by user */
]
};
diff --git a/src/components/AppTile.svelte b/src/components/AppTile.svelte
index da02834..8baed44 100644
--- a/src/components/AppTile.svelte
+++ b/src/components/AppTile.svelte
@@ -6,18 +6,29 @@
};
-