From 374b8424d0abd3f2030a94edf7320bfbb7650ad4 Mon Sep 17 00:00:00 2001 From: Bhasher Date: Thu, 11 Jan 2024 17:41:20 +0100 Subject: [PATCH 1/4] Desktop workflow --- .gitea/workflows/desktop.yaml | 55 ++++++++++++++++++++++++++++++ frontend/src-tauri/tauri.conf.json | 2 +- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 .gitea/workflows/desktop.yaml diff --git a/.gitea/workflows/desktop.yaml b/.gitea/workflows/desktop.yaml new file mode 100644 index 0000000..620325a --- /dev/null +++ b/.gitea/workflows/desktop.yaml @@ -0,0 +1,55 @@ +name: Tauri based desktop app + +on: + push: + tags: + - "v*" + +jobs: + publish-tauri-desktop: + runs-on: ubuntu-latest + container: + image: catthehacker/ubuntu:act-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Extract tag + uses: olegtarasov/get-tag@v2.1.2 + id: tagName + with: + tagRegex: "v(.*)" + + - name: Set up node + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install Rust stable + uses: dtolnay/rust-toolchain@stable + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y libwebkit2gtk-4.0-dev libgtk-3-dev libappindicator3-dev librsvg2-dev patchelf + + - name: Install frontend dependencies + run: | + cd frontend + npm install + cd .. + + - name: Build desktop app + run: | + cd frontend + npm run tauri build + cd .. + + - name: Publish desktop app + uses: akkuman/gitea-release-action@v1 + with: + name: Focus ${{ steps.tagName.outputs.tag }} + files: |- + frontend/src-tauri/target/release/focus + frontend/src-tauri/target/release/bundle/deb/*.deb + frontend/src-tauri/target/release/bundle/appimage/*.AppImage diff --git a/frontend/src-tauri/tauri.conf.json b/frontend/src-tauri/tauri.conf.json index 4379249..172cb90 100644 --- a/frontend/src-tauri/tauri.conf.json +++ b/frontend/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "Focus", - "version": "0.1.0" + "version": "0.3.0" }, "tauri": { "allowlist": { From 691c02366e12761d9174648a21c36bf8c14dd9f7 Mon Sep 17 00:00:00 2001 From: Bhasher Date: Thu, 11 Jan 2024 23:27:30 +0100 Subject: [PATCH 2/4] Fix tauri path issue --- frontend/src-tauri/tauri.conf.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src-tauri/tauri.conf.json b/frontend/src-tauri/tauri.conf.json index 172cb90..84eb104 100644 --- a/frontend/src-tauri/tauri.conf.json +++ b/frontend/src-tauri/tauri.conf.json @@ -4,11 +4,11 @@ "beforeBuildCommand": "npm run build", "beforeDevCommand": "npm run dev", "devPath": "http://localhost:5173", - "distDir": "../static" + "distDir": "../build" }, "package": { "productName": "Focus", - "version": "0.3.0" + "version": "0.3.1" }, "tauri": { "allowlist": { From 3a2b75263f5ff4ed4101017c5876817d3ebc04ed Mon Sep 17 00:00:00 2001 From: Bhasher Date: Thu, 11 Jan 2024 23:38:19 +0100 Subject: [PATCH 3/4] Default view --- frontend/src/routes/project/+page.svelte | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/frontend/src/routes/project/+page.svelte b/frontend/src/routes/project/+page.svelte index 3e24fa5..f85ad85 100644 --- a/frontend/src/routes/project/+page.svelte +++ b/frontend/src/routes/project/+page.svelte @@ -1,11 +1,14 @@ From 9597e0a2502bb5c050a2121119e42902413a8cef Mon Sep 17 00:00:00 2001 From: Bhasher Date: Fri, 12 Jan 2024 00:29:17 +0100 Subject: [PATCH 4/4] Fix modalcard key issue --- .../src/lib/components/card/ModalCard.svelte | 16 +++++++++++----- .../src/lib/components/project/Column.svelte | 16 +++++++++------- .../src/lib/components/tags/ModalTagValue.svelte | 3 ++- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/frontend/src/lib/components/card/ModalCard.svelte b/frontend/src/lib/components/card/ModalCard.svelte index 1a450dd..01bf79f 100644 --- a/frontend/src/lib/components/card/ModalCard.svelte +++ b/frontend/src/lib/components/card/ModalCard.svelte @@ -8,8 +8,8 @@ export let card: Card; export let showModal: boolean; - let newTitle = card.title; - let newContent = card.content; + let newTitle: string = card.title; + let newContent: string = card.content; async function save(closeModal: boolean = true) { if (card.title !== newTitle || card.content !== newContent) { @@ -21,22 +21,28 @@ } + { + if (e.key === 'Escape') return save(true); + }} +/> + -