From 67452320640d8afc9d95e19916b320309ed03e11 Mon Sep 17 00:00:00 2001 From: WardPearce Date: Thu, 24 Oct 2024 15:38:22 +1300 Subject: [PATCH] Started flatpak --- flatpak/.gitignore | 1 + flatpak/us.materialio.app.json | 61 ++++++++++++++++++++++++++++++ materialious/electron/package.json | 1 - materialious/src/lib/Search.svelte | 6 ++- 4 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 flatpak/.gitignore create mode 100644 flatpak/us.materialio.app.json diff --git a/flatpak/.gitignore b/flatpak/.gitignore new file mode 100644 index 00000000..46e5d9d1 --- /dev/null +++ b/flatpak/.gitignore @@ -0,0 +1 @@ +.flatpak-builder \ No newline at end of file diff --git a/flatpak/us.materialio.app.json b/flatpak/us.materialio.app.json new file mode 100644 index 00000000..ee0952f2 --- /dev/null +++ b/flatpak/us.materialio.app.json @@ -0,0 +1,61 @@ +{ + "app-id": "us.materialio.app", + "runtime": "org.freedesktop.Platform", + "runtime-version": "23.08", + "sdk": "org.freedesktop.Sdk", + "base": "org.electronjs.Electron2.BaseApp", + "base-version": "23.08", + "command": "./app/materialious", + "finish-args": [ + "--share=network", + "--socket=x11", + "--socket=wayland", + "--device=all", + "--share=ipc", + "--share=home", + "--talk-name=org.freedesktop.Flatpak", + "--talk-name=org.freedesktop.portal.Desktop" + ], + "sdk-extensions": [ + "org.freedesktop.Sdk.Extension.node18" + ], + "build-options": { + "append-path": "/usr/lib/sdk/node18/bin" + }, + "modules": [ + { + "name": "nodejs", + "buildsystem": "simple", + "build-commands": [ + "cd ./materialious", + "npm install", + "npm run build", + "npx cap sync @capacitor-community/electron", + "cd ./electron", + "python patch_capacitor_plugin.py", + "npm install", + "npm run electron:make" + ], + "sources": [ + { + "type": "git", + "url": "https://github.com/Materialious/Materialious.git", + "tag": "main" + } + ] + }, + { + "name": "materialious", + "buildsystem": "simple", + "build-commands": [ + "cp -r ./materialious/electron/dist/linux-unpacked /app/" + ], + "sources": [ + { + "type": "path", + "path": "dist" + } + ] + } + ] +} \ No newline at end of file diff --git a/materialious/electron/package.json b/materialious/electron/package.json index 38d83345..50c8a0fd 100644 --- a/materialious/electron/package.json +++ b/materialious/electron/package.json @@ -21,7 +21,6 @@ }, "dependencies": { "@capacitor-community/electron": "^5.0.0", - "capacitor-nodejs": "https://github.com/EdenwareApps/Capacitor-NodeJS/releases/download/v1.0.0-beta.7/capacitor6-nodejs.tgz", "chokidar": "~3.6.0", "electron-is-dev": "~2.0.0", "electron-serve": "~1.1.0", diff --git a/materialious/src/lib/Search.svelte b/materialious/src/lib/Search.svelte index ec68d16e..b4f83be4 100644 --- a/materialious/src/lib/Search.svelte +++ b/materialious/src/lib/Search.svelte @@ -89,7 +89,9 @@ id="search-box" placeholder={$_('searchPlaceholder')} bind:value={search} - on:click={() => (showSearchBox = true)} + on:click={async () => { + showSearchBox = true; + }} /> {#if showSearchBox} @@ -98,7 +100,7 @@