Compare commits

..

19 Commits

Author SHA1 Message Date
Krishan
5acc9eb615 Release v4.2.1 (#346)
* Release v4.2.1

* update cinny submodule
2024-09-14 23:29:09 +10:00
Krishan
2ed0e8e532 Update screen size to more usable (#347) 2024-09-14 21:44:11 +10:00
dependabot[bot]
86073d237f Bump tauri-build from 1.5.3 to 1.5.4 in /src-tauri (#335)
Bumps [tauri-build](https://github.com/tauri-apps/tauri) from 1.5.3 to 1.5.4.
- [Release notes](https://github.com/tauri-apps/tauri/releases)
- [Commits](https://github.com/tauri-apps/tauri/compare/tauri-build-v1.5.3...tauri-build-v1.5.4)

---
updated-dependencies:
- dependency-name: tauri-build
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-13 22:47:02 +10:00
dependabot[bot]
c75097065f Bump tauri from 1.7.1 to 1.7.2 in /src-tauri (#334)
Bumps [tauri](https://github.com/tauri-apps/tauri) from 1.7.1 to 1.7.2.
- [Release notes](https://github.com/tauri-apps/tauri/releases)
- [Commits](https://github.com/tauri-apps/tauri/compare/tauri-v1.7.1...tauri-v1.7.2)

---
updated-dependencies:
- dependency-name: tauri
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-13 22:44:32 +10:00
dependabot[bot]
825b571f4b Bump @tauri-apps/cli from 1.6.0 to 1.6.1 (#336)
Bumps [@tauri-apps/cli](https://github.com/tauri-apps/tauri) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/tauri-apps/tauri/releases)
- [Commits](https://github.com/tauri-apps/tauri/compare/@tauri-apps/cli-v1.6.0...@tauri-apps/cli-v1.6.1)

---
updated-dependencies:
- dependency-name: "@tauri-apps/cli"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-13 22:43:38 +10:00
dependabot[bot]
6aa5ea361e Bump cla-assistant/github-action from 2.4.0 to 2.5.1 (#333)
Bumps [cla-assistant/github-action](https://github.com/cla-assistant/github-action) from 2.4.0 to 2.5.1.
- [Release notes](https://github.com/cla-assistant/github-action/releases)
- [Commits](https://github.com/cla-assistant/github-action/compare/v2.4.0...v2.5.1)

---
updated-dependencies:
- dependency-name: cla-assistant/github-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-13 22:42:22 +10:00
dependabot[bot]
f9057474ea Bump tauri-apps/tauri-action from 0.5.9 to 0.5.13 (#340)
Bumps [tauri-apps/tauri-action](https://github.com/tauri-apps/tauri-action) from 0.5.9 to 0.5.13.
- [Release notes](https://github.com/tauri-apps/tauri-action/releases)
- [Changelog](https://github.com/tauri-apps/tauri-action/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/tauri-apps/tauri-action/compare/v0.5.9...v0.5.13)

---
updated-dependencies:
- dependency-name: tauri-apps/tauri-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-13 22:41:35 +10:00
Krishan
aef6cf730b add tauri-local-host plugin for sw (#345) 2024-09-13 22:04:35 +10:00
Krishan
db5a2dbe01 Release v4.2.0 (#343) 2024-09-12 00:31:46 +10:00
Krishan
8a29f48092 Release v4.1.0 (#328) 2024-08-04 20:24:34 +10:00
dependabot[bot]
2fbcbef87c Bump tauri from 1.6.8 to 1.7.1 in /src-tauri (#307)
Bumps [tauri](https://github.com/tauri-apps/tauri) from 1.6.8 to 1.7.1.
- [Release notes](https://github.com/tauri-apps/tauri/releases)
- [Commits](https://github.com/tauri-apps/tauri/compare/tauri-v1.6.8...tauri-v1.7.1)

---
updated-dependencies:
- dependency-name: tauri
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-27 23:29:36 +10:00
dependabot[bot]
ab9c3f6e88 Bump softprops/action-gh-release from 2.0.6 to 2.0.8 (#310)
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.0.6 to 2.0.8.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](a74c6b72af...c062e08bd5)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-27 23:29:13 +10:00
Krishan
a20c0777ab Remove outdated actions (#317) 2024-07-27 23:21:10 +10:00
Krishan
2ff11d65e7 Release v4.0.3 (#315) 2024-07-25 16:04:16 +10:00
Ajay Bura
e252a96c4c enable hash router for desktop app (#314) 2024-07-25 15:49:40 +10:00
Krishan
e8f5c4ce24 Undo system tray and single instance (#312)
* Revert 5872ab9

* Undo 095b8fc
2024-07-25 14:15:59 +10:00
Krishan
8921baf41a Universal build for MacOS and fix windows build (#313)
* wip

* Universal macos workflow and fix windows workflow

* fix path for macos and use diff rust action
2024-07-25 14:15:31 +10:00
Krishan
f36934a796 Release v4.0.1 2024-07-25 00:20:22 +10:00
Krishan
b4ae5c3fc7 Fix macos action 2024-07-25 00:18:22 +10:00
14 changed files with 237 additions and 416 deletions

View File

@@ -16,7 +16,7 @@ jobs:
cd .. cd ..
zip ${{ github.event.repository.name }}/${{ github.event.repository.name }}-${{ github.ref_name }}.zip ${{ github.event.repository.name }} -r zip ${{ github.event.repository.name }}/${{ github.event.repository.name }}-${{ github.ref_name }}.zip ${{ github.event.repository.name }} -r
- name: Upload zip to release - name: Upload zip to release
uses: softprops/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0 uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191
with: with:
files: | files: |
${{ github.event.repository.name }}-${{ github.ref_name }}.zip ${{ github.event.repository.name }}-${{ github.ref_name }}.zip

View File

@@ -12,7 +12,7 @@ jobs:
- name: 'CLA Assistant' - name: 'CLA Assistant'
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target' if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
# Beta Release # Beta Release
uses: cla-assistant/github-action@v2.4.0 uses: cla-assistant/github-action@v2.5.1
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# the below token should have repo scope and must be manually added by you in the repository's secret # the below token should have repo scope and must be manually added by you in the repository's secret

View File

@@ -12,33 +12,26 @@ jobs:
uses: actions/checkout@v4.1.7 uses: actions/checkout@v4.1.7
with: with:
submodules: true submodules: true
- name: Get release
id: get_release
uses: bruceadams/get-release@74c3d60f5a28f358ccf241a00c9021ea16f0569f
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup node - name: Setup node
uses: actions/setup-node@v4.0.3 uses: actions/setup-node@v4.0.3
with: with:
node-version: 20.12.2 node-version: 20.12.2
cache: 'npm' cache: 'npm'
- name: Install Rust stable - name: Install Rust stable
uses: actions-rs/toolchain@v1.0.7 uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Install cinny dependencies - name: Install cinny dependencies
run: cd cinny && npm ci run: cd cinny && npm ci
- name: Install tauri dependencies - name: Install tauri dependencies
run: npm ci run: npm ci
- name: Build desktop app with Tauri - name: Build desktop app with Tauri
uses: tauri-apps/tauri-action@v0.5.9 uses: tauri-apps/tauri-action@v0.5.13
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
NODE_OPTIONS: "--max_old_space_size=4096" NODE_OPTIONS: "--max_old_space_size=4096"
with: with:
releaseId: ${{ steps.get_release.outputs.upload_url }} releaseId: ${{ github.event.release.upload_url }}
- name: Get app version (windows) - name: Get app version (windows)
run: | run: |
$json = (Get-Content "src-tauri\tauri.conf.json" -Raw) | ConvertFrom-Json $json = (Get-Content "src-tauri\tauri.conf.json" -Raw) | ConvertFrom-Json
@@ -57,12 +50,12 @@ jobs:
run: Move-Item "src-tauri\target\release\bundle\msi\Cinny_${{ env.TAURI_VERSION }}_x64_en-US.msi.zip.sig" "src-tauri\target\release\bundle\msi\Cinny_desktop-x86_64.msi.zip.sig" run: Move-Item "src-tauri\target\release\bundle\msi\Cinny_${{ env.TAURI_VERSION }}_x64_en-US.msi.zip.sig" "src-tauri\target\release\bundle\msi\Cinny_desktop-x86_64.msi.zip.sig"
shell: pwsh shell: pwsh
- name: Upload tagged release - name: Upload tagged release
uses: softprops/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0 uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191
with: with:
files: | files: |
src-tauri\target\release\bundle\msi\Cinny_desktop-x86_64.msi src-tauri/target/release/bundle/msi/Cinny_desktop-x86_64.msi
src-tauri\target\release\bundle\msi\Cinny_desktop-x86_64.msi.zip src-tauri/target/release/bundle/msi/Cinny_desktop-x86_64.msi.zip
src-tauri\target\release\bundle\msi\Cinny_desktop-x86_64.msi.zip.sig src-tauri/target/release/bundle/msi/Cinny_desktop-x86_64.msi.zip.sig
# Linux-x86_64 # Linux-x86_64
linux-x86_64: linux-x86_64:
@@ -73,20 +66,13 @@ jobs:
uses: actions/checkout@v4.1.7 uses: actions/checkout@v4.1.7
with: with:
submodules: true submodules: true
- name: Get release
id: get_release
uses: bruceadams/get-release@74c3d60f5a28f358ccf241a00c9021ea16f0569f
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup node - name: Setup node
uses: actions/setup-node@v4.0.3 uses: actions/setup-node@v4.0.3
with: with:
node-version: 20.12.2 node-version: 20.12.2
cache: 'npm' cache: 'npm'
- name: Install Rust stable - name: Install Rust stable
uses: actions-rs/toolchain@v1.0.7 uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Install dependencies - name: Install dependencies
run: | run: |
sudo apt-get update sudo apt-get update
@@ -96,17 +82,17 @@ jobs:
- name: Install tauri dependencies - name: Install tauri dependencies
run: npm ci run: npm ci
- name: Build desktop app with Tauri - name: Build desktop app with Tauri
uses: tauri-apps/tauri-action@v0.5.9 uses: tauri-apps/tauri-action@v0.5.13
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
NODE_OPTIONS: "--max_old_space_size=4096" NODE_OPTIONS: "--max_old_space_size=4096"
with: with:
releaseId: ${{ steps.get_release.outputs.upload_url }} releaseId: ${{ github.event.release.upload_url }}
- name: Get app version - name: Get app version
id: vars id: vars
run: echo ::set-output name=tag::$(jq .package.version src-tauri/tauri.conf.json | tr -d '"') run: echo "tag=$(jq .package.version src-tauri/tauri.conf.json | tr -d '"')" >> $GITHUB_OUTPUT
- name: Move deb - name: Move deb
run: mv "src-tauri/target/release/bundle/deb/cinny_${{ steps.vars.outputs.tag }}_amd64.deb" "src-tauri/target/release/bundle/deb/Cinny_desktop-x86_64.deb" run: mv "src-tauri/target/release/bundle/deb/cinny_${{ steps.vars.outputs.tag }}_amd64.deb" "src-tauri/target/release/bundle/deb/Cinny_desktop-x86_64.deb"
- name: Move AppImage - name: Move AppImage
@@ -116,7 +102,7 @@ jobs:
- name: Move AppImage.tar.gz.sig - name: Move AppImage.tar.gz.sig
run: mv "src-tauri/target/release/bundle/appimage/cinny_${{ steps.vars.outputs.tag }}_amd64.AppImage.tar.gz.sig" "src-tauri/target/release/bundle/appimage/Cinny_desktop-x86_64.AppImage.tar.gz.sig" run: mv "src-tauri/target/release/bundle/appimage/cinny_${{ steps.vars.outputs.tag }}_amd64.AppImage.tar.gz.sig" "src-tauri/target/release/bundle/appimage/Cinny_desktop-x86_64.AppImage.tar.gz.sig"
- name: Upload tagged release - name: Upload tagged release
uses: softprops/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0 uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191
with: with:
files: | files: |
src-tauri/target/release/bundle/deb/Cinny_desktop-x86_64.deb src-tauri/target/release/bundle/deb/Cinny_desktop-x86_64.deb
@@ -124,122 +110,58 @@ jobs:
src-tauri/target/release/bundle/appimage/Cinny_desktop-x86_64.AppImage.tar.gz src-tauri/target/release/bundle/appimage/Cinny_desktop-x86_64.AppImage.tar.gz
src-tauri/target/release/bundle/appimage/Cinny_desktop-x86_64.AppImage.tar.gz.sig src-tauri/target/release/bundle/appimage/Cinny_desktop-x86_64.AppImage.tar.gz.sig
# macos-x86_64 # macos-universal
macos-x86_64: macos-universal:
runs-on: macos-latest runs-on: macos-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4.1.7 uses: actions/checkout@v4.1.7
with: with:
submodules: true submodules: true
- name: Get release
id: get_release
uses: bruceadams/get-release@74c3d60f5a28f358ccf241a00c9021ea16f0569f
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup node - name: Setup node
uses: actions/setup-node@v4.0.3 uses: actions/setup-node@v4.0.3
with: with:
node-version: 20.12.2 node-version: 20.12.2
cache: 'npm' cache: 'npm'
- name: Install Rust stable - name: Install Rust stable
uses: actions-rs/toolchain@v1.0.7 uses: dtolnay/rust-toolchain@stable
with: with:
toolchain: stable target: aarch64-apple-darwin,x86_64-apple-darwin
- name: Install cinny dependencies - name: Install cinny dependencies
run: cd cinny && npm ci run: cd cinny && npm ci
- name: Install tauri dependencies - name: Install tauri dependencies
run: npm ci run: npm ci
- name: Build desktop app with Tauri - name: Build desktop app with Tauri
uses: tauri-apps/tauri-action@v0.5.9 uses: tauri-apps/tauri-action@v0.5.13
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
NODE_OPTIONS: "--max_old_space_size=4096" NODE_OPTIONS: "--max_old_space_size=4096"
with: with:
releaseId: ${{ steps.get_release.outputs.upload_url }} releaseId: ${{ github.event.release.upload_url }}
args: "--target universal-apple-darwin"
- name: Get app version - name: Get app version
id: vars id: vars
run: echo ::set-output name=tag::$(jq .package.version src-tauri/tauri.conf.json | tr -d '"') run: echo "tag=$(jq .package.version src-tauri/tauri.conf.json | tr -d '"')" >> $GITHUB_OUTPUT
- name: Move dmg - name: Move dmg
run: mv "src-tauri/target/release/bundle/dmg/Cinny_${{ steps.vars.outputs.tag }}_x64.dmg" "src-tauri/target/release/bundle/dmg/Cinny_desktop-x86_64.dmg" run: mv "src-tauri/target/universal-apple-darwin/release/bundle/dmg/Cinny_${{ steps.vars.outputs.tag }}_universal.dmg" "src-tauri/target/universal-apple-darwin/release/bundle/dmg/Cinny_desktop-universal.dmg"
- name: Move app.tar.gz - name: Move app.tar.gz
run: mv "src-tauri/target/release/bundle/macos/Cinny.app.tar.gz" "src-tauri/target/release/bundle/macos/Cinny_desktop-x86_64.app.tar.gz" run: mv "src-tauri/target/universal-apple-darwin/release/bundle/macos/Cinny.app.tar.gz" "src-tauri/target/universal-apple-darwin/release/bundle/macos/Cinny_desktop-universal.app.tar.gz"
- name: Move app.tar.gz.sig - name: Move app.tar.gz.sig
run: mv "src-tauri/target/release/bundle/macos/Cinny.app.tar.gz.sig" "src-tauri/target/release/bundle/macos/Cinny_desktop-x86_64.app.tar.gz.sig" run: mv "src-tauri/target/universal-apple-darwin/release/bundle/macos/Cinny.app.tar.gz.sig" "src-tauri/target/universal-apple-darwin/release/bundle/macos/Cinny_desktop-universal.app.tar.gz.sig"
- name: Upload tagged release - name: Upload tagged release
uses: softprops/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0 uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191
with: with:
files: | files: |
src-tauri/target/release/bundle/dmg/Cinny_desktop-x86_64.dmg src-tauri/target/universal-apple-darwin/release/bundle/dmg/Cinny_desktop-universal.dmg
src-tauri/target/release/bundle/macos/Cinny_desktop-x86_64.app.tar.gz src-tauri/target/universal-apple-darwin/release/bundle/macos/Cinny_desktop-universal.app.tar.gz
src-tauri/target/release/bundle/macos/Cinny_desktop-x86_64.app.tar.gz.sig src-tauri/target/universal-apple-darwin/release/bundle/macos/Cinny_desktop-universal.app.tar.gz.sig
# macos-aarch64
# macos-aarch64:
# runs-on: macos-12
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4.1.7
# with:
# submodules: true
# - name: Get release
# id: get_release
# uses: bruceadams/get-release@74c3d60f5a28f358ccf241a00c9021ea16f0569f
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Setup node
# uses: actions/setup-node@v3.4.1
# with:
# node-version: 20.12.2
# cache: 'npm'
# - name: Install Rust stable
# uses: actions-rs/toolchain@v1.0.7
# with:
# toolchain: stable
# - name: Install cinny dependencies
# run: cd cinny && npm ci
# - name: Install tauri dependencies
# run: npm ci
# - name: Install rustup target aarch64 darwin
# run: rustup target add aarch64-apple-darwin
# - name: Build desktop app with Tauri
# uses: tauri-apps/tauri-action@v0.3.1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
# TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
# NODE_OPTIONS: "--max_old_space_size=4096"
# with:
# args: --target aarch64-apple-darwin
# releaseId: ${{ steps.get_release.outputs.upload_url }}
# - name: Get app version
# if: always()
# id: vars
# run: echo ::set-output name=tag::$(jq .package.version src-tauri/tauri.conf.json | tr -d '"')
# - name: Move dmg
# if: always()
# run: mv "src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/Cinny_${{ steps.vars.outputs.tag }}_aarch64.dmg" "src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/Cinny_desktop-aarch64.dmg"
# - name: Move app.tar.gz
# if: always()
# run: mv "src-tauri/target/aarch64-apple-darwin/release/bundle/macos/Cinny.app.tar.gz" "src-tauri/target/aarch64-apple-darwin/release/bundle/macos/Cinny_desktop-aarch64.app.tar.gz"
# - name: Move app.tar.gz.sig
# if: always()
# run: mv "src-tauri/target/aarch64-apple-darwin/release/bundle/macos/Cinny.app.tar.gz.sig" "src-tauri/target/aarch64-apple-darwin/release/bundle/macos/Cinny_desktop-aarch64.app.tar.gz.sig"
# - name: Upload tagged release
# if: always()
# uses: softprops/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0
# with:
# files: |
# src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/Cinny_desktop-aarch64.dmg
# src-tauri/target/aarch64-apple-darwin/release/bundle/macos/Cinny_desktop-aarch64.tar.gz
# src-tauri/target/aarch64-apple-darwin/release/bundle/macos/Cinny_desktop-aarch64.tar.gz.sig
# Upload release.json # Upload release.json
release-update: release-update:
if: always() if: always()
needs: [windows-x86_64, linux-x86_64, macos-x86_64] #, macos-aarch64] needs: [windows-x86_64, linux-x86_64, macos-universal]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
@@ -249,4 +171,4 @@ jobs:
- name: Run release.json - name: Run release.json
run: npm run release run: npm run release
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -35,6 +35,6 @@ jobs:
- name: Install tauri dependencies - name: Install tauri dependencies
run: npm ci run: npm ci
- name: Build desktop app with Tauri - name: Build desktop app with Tauri
uses: tauri-apps/tauri-action@v0.5.9 uses: tauri-apps/tauri-action@v0.5.13
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

2
cinny

Submodule cinny updated: 96415a8d2a...21164a9b61

38
config.json Normal file
View File

@@ -0,0 +1,38 @@
{
"defaultHomeserver": 2,
"homeserverList": [
"converser.eu",
"envs.net",
"matrix.org",
"monero.social",
"mozilla.org",
"xmr.se"
],
"allowCustomHomeservers": true,
"featuredCommunities": {
"openAsDefault": false,
"spaces": [
"#cinny-space:matrix.org",
"#community:matrix.org",
"#space:envs.net",
"#science-space:matrix.org",
"#libregaming-games:tchncs.de",
"#mathematics-on:matrix.org"
],
"rooms": [
"#cinny:matrix.org",
"#freesoftware:matrix.org",
"#pcapdroid:matrix.org",
"#gentoo:matrix.org",
"#PrivSec.dev:arcticfoxes.net",
"#disroot:aria-net.org"
],
"servers": ["envs.net", "matrix.org", "monero.social", "mozilla.org"]
},
"hashRouter": {
"enabled": true,
"basename": "/"
}
}

92
package-lock.json generated
View File

@@ -1,19 +1,19 @@
{ {
"name": "cinny", "name": "cinny",
"version": "4.0.0", "version": "4.2.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "cinny", "name": "cinny",
"version": "3.2.1", "version": "4.2.1",
"license": "AGPL-3.0-only", "license": "AGPL-3.0-only",
"dependencies": { "dependencies": {
"@tauri-apps/api": "1.6.0" "@tauri-apps/api": "1.6.0"
}, },
"devDependencies": { "devDependencies": {
"@actions/github": "6.0.0", "@actions/github": "6.0.0",
"@tauri-apps/cli": "1.6.0", "@tauri-apps/cli": "1.6.1",
"node-fetch": "3.3.2" "node-fetch": "3.3.2"
}, },
"engines": { "engines": {
@@ -196,9 +196,9 @@
} }
}, },
"node_modules/@tauri-apps/cli": { "node_modules/@tauri-apps/cli": {
"version": "1.6.0", "version": "1.6.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-1.6.0.tgz", "resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-1.6.1.tgz",
"integrity": "sha512-DBBpBl6GhTzm8ImMbKkfaZ4fDTykWrC7Q5OXP4XqD91recmDEn2LExuvuiiS3HYe7uP8Eb5B9NPHhqJb+Zo7qQ==", "integrity": "sha512-2S8WGmkz54Z9WxpaFVbUYsTiwx5OIEmdD5DDWRygX9VhaWwZg0y6DctsUtCRVre9I/Un/hTnmqkhZqPamCEx8A==",
"dev": true, "dev": true,
"bin": { "bin": {
"tauri": "tauri.js" "tauri": "tauri.js"
@@ -211,22 +211,22 @@
"url": "https://opencollective.com/tauri" "url": "https://opencollective.com/tauri"
}, },
"optionalDependencies": { "optionalDependencies": {
"@tauri-apps/cli-darwin-arm64": "1.6.0", "@tauri-apps/cli-darwin-arm64": "1.6.1",
"@tauri-apps/cli-darwin-x64": "1.6.0", "@tauri-apps/cli-darwin-x64": "1.6.1",
"@tauri-apps/cli-linux-arm-gnueabihf": "1.6.0", "@tauri-apps/cli-linux-arm-gnueabihf": "1.6.1",
"@tauri-apps/cli-linux-arm64-gnu": "1.6.0", "@tauri-apps/cli-linux-arm64-gnu": "1.6.1",
"@tauri-apps/cli-linux-arm64-musl": "1.6.0", "@tauri-apps/cli-linux-arm64-musl": "1.6.1",
"@tauri-apps/cli-linux-x64-gnu": "1.6.0", "@tauri-apps/cli-linux-x64-gnu": "1.6.1",
"@tauri-apps/cli-linux-x64-musl": "1.6.0", "@tauri-apps/cli-linux-x64-musl": "1.6.1",
"@tauri-apps/cli-win32-arm64-msvc": "1.6.0", "@tauri-apps/cli-win32-arm64-msvc": "1.6.1",
"@tauri-apps/cli-win32-ia32-msvc": "1.6.0", "@tauri-apps/cli-win32-ia32-msvc": "1.6.1",
"@tauri-apps/cli-win32-x64-msvc": "1.6.0" "@tauri-apps/cli-win32-x64-msvc": "1.6.1"
} }
}, },
"node_modules/@tauri-apps/cli-darwin-arm64": { "node_modules/@tauri-apps/cli-darwin-arm64": {
"version": "1.6.0", "version": "1.6.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-1.6.0.tgz", "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-1.6.1.tgz",
"integrity": "sha512-SNRwUD9nqGxY47mbY1CGTt/jqyQOU7Ps7Mx/mpgahL0FVUDiCEY/5L9QfEPPhEgccgcelEVn7i6aQHIkHyUtCA==", "integrity": "sha512-n+16Z9qQksBmY55Xwful8GGrw2dlyeqKPsjuNcwKUgVB5a4gIq6K6uUsbhwMUMUA3gqewQMBn44QXbSe5qNKfA==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -240,9 +240,9 @@
} }
}, },
"node_modules/@tauri-apps/cli-darwin-x64": { "node_modules/@tauri-apps/cli-darwin-x64": {
"version": "1.6.0", "version": "1.6.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-1.6.0.tgz", "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-1.6.1.tgz",
"integrity": "sha512-g2/uDR/eeH2arvuawA4WwaEOqv/7jDO/ZLNI3JlBjP5Pk8GGb3Kdy0ro1xQzF94mtk2mOnOXa4dMgAet4sUJ1A==", "integrity": "sha512-OHzm6qiywv0GEwBDowlzLSuztKE85NMxp2loVynQ4vDoVk6V0jMtQy/N9YvYA0BetvfNTuuAiz3hsTkMHMYm+g==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -256,9 +256,9 @@
} }
}, },
"node_modules/@tauri-apps/cli-linux-arm-gnueabihf": { "node_modules/@tauri-apps/cli-linux-arm-gnueabihf": {
"version": "1.6.0", "version": "1.6.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-1.6.0.tgz", "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-1.6.1.tgz",
"integrity": "sha512-EVwf4oRkQyG8BpSrk0gqO7oA0sDM2MdNDtJpMfleYFEgCxLIOGZKNqaOW3M7U+0Y4qikmG3TtRK+ngc8Ymtrjg==", "integrity": "sha512-ZA4ByaiZbrXUbhaoWUVab4lHI2yI1/ucrRO6b9pky6ytgqx37hA/YOWoctD0yaf5giQJQZw160euaBIUOKzRXA==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@@ -272,9 +272,9 @@
} }
}, },
"node_modules/@tauri-apps/cli-linux-arm64-gnu": { "node_modules/@tauri-apps/cli-linux-arm64-gnu": {
"version": "1.6.0", "version": "1.6.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-1.6.0.tgz", "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-1.6.1.tgz",
"integrity": "sha512-YdpY17cAySrhK9dX4BUVEmhAxE2o+6skIEFg8iN/xrDwRxhaNPI9I80YXPatUTX54Kx55T5++25VJG9+3iw83A==", "integrity": "sha512-VBU4GRJPU9jzzeqaEGLHAJzqQhpl7WnRFyHPR8Qby0D17av3CClJ7nBa+CI3ob3JbIERfJM9kwFHdY9eQpfxnw==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -288,9 +288,9 @@
} }
}, },
"node_modules/@tauri-apps/cli-linux-arm64-musl": { "node_modules/@tauri-apps/cli-linux-arm64-musl": {
"version": "1.6.0", "version": "1.6.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.6.0.tgz", "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.6.1.tgz",
"integrity": "sha512-4U628tuf2U8pMr4tIBJhEkrFwt+46dwhXrDlpdyWSZtnop5RJAVKHODm0KbWns4xGKfTW1F3r6sSv+2ZxLcISA==", "integrity": "sha512-gyMgNZ8fwQFYzrIiHwhmKECkbuAZtzsRyl+bi1Ua11XVWYVUpY8+cNp7Y5ilMJ9AwNFI/HFKjzzua9r+e9FNzw==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -304,9 +304,9 @@
} }
}, },
"node_modules/@tauri-apps/cli-linux-x64-gnu": { "node_modules/@tauri-apps/cli-linux-x64-gnu": {
"version": "1.6.0", "version": "1.6.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-1.6.0.tgz", "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-1.6.1.tgz",
"integrity": "sha512-AKRzp76fVUaJyXj5KRJT9bJyhwZyUnRQU0RqIRqOtZCT5yr6qGP8rjtQ7YhCIzWrseBlOllc3Qvbgw3Yl0VQcA==", "integrity": "sha512-aYLjLXEBcOf4GUrLBZRQcoLSL3KgCKHwfAyGmTilH4juAw42ZaAYWIZwa59hp2kC4w1XrlmwAzGpi1RESBr5Mw==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -320,9 +320,9 @@
} }
}, },
"node_modules/@tauri-apps/cli-linux-x64-musl": { "node_modules/@tauri-apps/cli-linux-x64-musl": {
"version": "1.6.0", "version": "1.6.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-1.6.0.tgz", "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-1.6.1.tgz",
"integrity": "sha512-0edIdq6aMBTaRMIXddHfyAFL361JqulLLd2Wi2aoOie7DkQ2MYh6gv3hA7NB9gqFwNIGE+xtJ4BkXIP2tSGPlg==", "integrity": "sha512-j1M7ovICUrBDbrH8CNUwbMe0zk0/IAR7MXRv5PEanktAZ1w/LG3nlO/AhY5/Cbqqo3ziKTcMpe6x0j3aE8jYOA==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -336,9 +336,9 @@
} }
}, },
"node_modules/@tauri-apps/cli-win32-arm64-msvc": { "node_modules/@tauri-apps/cli-win32-arm64-msvc": {
"version": "1.6.0", "version": "1.6.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-1.6.0.tgz", "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-1.6.1.tgz",
"integrity": "sha512-QwWpWk4ubcwJ1rljsRAmINgB2AwkyzZhpYbalA+MmzyYMREcdXWGkyixWbRZgqc6fEWEBmq5UG73qz5eBJiIKg==", "integrity": "sha512-yCGT1jXHvZtu+yYPDmDOJDfgsj5EKdBPvya+kmN03BmLfOF+8EWHA9s6yXUdk9pSr6M9OQS0SXocbGDOu5AkMw==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -352,9 +352,9 @@
} }
}, },
"node_modules/@tauri-apps/cli-win32-ia32-msvc": { "node_modules/@tauri-apps/cli-win32-ia32-msvc": {
"version": "1.6.0", "version": "1.6.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-1.6.0.tgz", "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-1.6.1.tgz",
"integrity": "sha512-Vtw0yxO9+aEFuhuxQ57ALG43tjECopRimRuKGbtZYDCriB/ty5TrT3QWMdy0dxBkpDTu3Rqsz30sbDzw6tlP3Q==", "integrity": "sha512-klAt+KNcczC4gxz9vm6tSvFB4iyXVj4r+TtDVhStLCKkAZOVm0ZsFym1kDzltxrB/3xSjgzsgIiEJydN2cP7xw==",
"cpu": [ "cpu": [
"ia32" "ia32"
], ],
@@ -368,9 +368,9 @@
} }
}, },
"node_modules/@tauri-apps/cli-win32-x64-msvc": { "node_modules/@tauri-apps/cli-win32-x64-msvc": {
"version": "1.6.0", "version": "1.6.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-1.6.0.tgz", "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-1.6.1.tgz",
"integrity": "sha512-h54FHOvGi7+LIfRchzgZYSCHB1HDlP599vWXQQJ/XnwJY+6Rwr2E5bOe/EhqoG8rbGkfK0xX3KPAvXPbUlmggg==", "integrity": "sha512-WEzQzBgcaqjZoA5M/KOupHmt8W3QQ20vwETXpGEMPd7spj4eZsRv/2ZDuCz4ELbai1XlIsTITFNe2LlJjzqISA==",
"cpu": [ "cpu": [
"x64" "x64"
], ],

View File

@@ -1,13 +1,13 @@
{ {
"name": "cinny", "name": "cinny",
"version": "4.0.0", "version": "4.2.1",
"description": "Yet another matrix client", "description": "Yet another matrix client",
"main": "index.js", "main": "index.js",
"engines": { "engines": {
"node": ">=16.0.0" "node": ">=16.0.0"
}, },
"scripts": { "scripts": {
"tauri": "tauri", "tauri": "cp config.json cinny/ && tauri",
"release": "node scripts/release.mjs" "release": "node scripts/release.mjs"
}, },
"keywords": [], "keywords": [],
@@ -18,7 +18,7 @@
}, },
"devDependencies": { "devDependencies": {
"@actions/github": "6.0.0", "@actions/github": "6.0.0",
"@tauri-apps/cli": "1.6.0", "@tauri-apps/cli": "1.6.1",
"node-fetch": "3.3.2" "node-fetch": "3.3.2"
} }
} }

View File

@@ -34,7 +34,7 @@ async function createTauriRelease() {
const windowsX86_64 = {}; const windowsX86_64 = {};
const linuxX86_64 = {}; const linuxX86_64 = {};
const darwinX86_64 = {}; const darwinX86_64 = {};
// const darwinAarch64 = {}; const darwinAarch64 = {};
const promises = latestAssets.map(async (asset) => { const promises = latestAssets.map(async (asset) => {
const { name, browser_download_url } = asset; const { name, browser_download_url } = asset;
@@ -53,19 +53,19 @@ async function createTauriRelease() {
linuxX86_64.signature = await getAssetSign(browser_download_url); linuxX86_64.signature = await getAssetSign(browser_download_url);
} }
if (/x86_64\.app\.tar\.gz$/.test(name)) { if (/universal\.app\.tar\.gz$/.test(name)) {
darwinX86_64.url = browser_download_url; darwinX86_64.url = browser_download_url;
} }
if (/x86_64\.app\.tar\.gz\.sig$/.test(name)) { if (/universal\.app\.tar\.gz\.sig$/.test(name)) {
darwinX86_64.signature = await getAssetSign(browser_download_url); darwinX86_64.signature = await getAssetSign(browser_download_url);
} }
// if (/aarch64\.app\.tar\.gz$/.test(name)) { if (/universal\.app\.tar\.gz$/.test(name)) {
// darwinAarch64.url = browser_download_url; darwinAarch64.url = browser_download_url;
// } }
// if (/aarch64\.app\.tar\.gz\.sig$/.test(name)) { if (/universal\.app\.tar\.gz\.sig$/.test(name)) {
// darwinAarch64.signature = await getAssetSign(browser_download_url); darwinAarch64.signature = await getAssetSign(browser_download_url);
// } }
}); });
await Promise.allSettled(promises); await Promise.allSettled(promises);
@@ -86,8 +86,8 @@ async function createTauriRelease() {
if (darwinX86_64.url) releaseData.platforms["darwin-x86_64"] = darwinX86_64; if (darwinX86_64.url) releaseData.platforms["darwin-x86_64"] = darwinX86_64;
else console.error('Failed to get release for darwinX86_64'); else console.error('Failed to get release for darwinX86_64');
// if (darwinAarch64.url) releaseData.platforms["darwin-aarch64"] = darwinAarch64; if (darwinAarch64.url) releaseData.platforms["darwin-aarch64"] = darwinAarch64;
// else console.error('Failed to get release for darwinAarch64'); else console.error('Failed to get release for darwinAarch64');
const releaseResult = await repos.getReleaseByTag({ ...repoMetaData, tag: 'tauri' }); const releaseResult = await repos.getReleaseByTag({ ...repoMetaData, tag: 'tauri' });
const tauriRelease = releaseResult.data; const tauriRelease = releaseResult.data;

199
src-tauri/Cargo.lock generated
View File

@@ -82,6 +82,12 @@ dependencies = [
"x11rb", "x11rb",
] ]
[[package]]
name = "ascii"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16"
[[package]] [[package]]
name = "async-broadcast" name = "async-broadcast"
version = "0.5.1" version = "0.5.1"
@@ -252,6 +258,12 @@ version = "0.21.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9"
[[package]]
name = "base64"
version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
[[package]] [[package]]
name = "bitflags" name = "bitflags"
version = "1.3.2" version = "1.3.2"
@@ -290,9 +302,9 @@ dependencies = [
[[package]] [[package]]
name = "brotli" name = "brotli"
version = "3.3.4" version = "6.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b"
dependencies = [ dependencies = [
"alloc-no-stdlib", "alloc-no-stdlib",
"alloc-stdlib", "alloc-stdlib",
@@ -301,9 +313,9 @@ dependencies = [
[[package]] [[package]]
name = "brotli-decompressor" name = "brotli-decompressor"
version = "2.3.2" version = "4.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "59ad2d4653bf5ca36ae797b1f4bb4dbddb60ce49ca4aed8a2ce4829f60425b80" checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362"
dependencies = [ dependencies = [
"alloc-no-stdlib", "alloc-no-stdlib",
"alloc-stdlib", "alloc-stdlib",
@@ -442,15 +454,21 @@ dependencies = [
"windows-targets 0.48.5", "windows-targets 0.48.5",
] ]
[[package]]
name = "chunked_transfer"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e4de3bc4ea267985becf712dc6d9eed8b04c953b3fcfb339ebc87acd9804901"
[[package]] [[package]]
name = "cinny" name = "cinny"
version = "4.0.0" version = "4.2.1"
dependencies = [ dependencies = [
"serde", "serde",
"serde_json", "serde_json",
"tauri", "tauri",
"tauri-build", "tauri-build",
"tauri-plugin-single-instance", "tauri-plugin-localhost",
] ]
[[package]] [[package]]
@@ -925,6 +943,15 @@ dependencies = [
"miniz_oxide", "miniz_oxide",
] ]
[[package]]
name = "fluent-uri"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "17c704e9dbe1ddd863da1e6ff3567795087b1eb201ce80d8fa81162e1516500d"
dependencies = [
"bitflags",
]
[[package]] [[package]]
name = "fnv" name = "fnv"
version = "1.0.7" version = "1.0.7"
@@ -1746,14 +1773,25 @@ dependencies = [
[[package]] [[package]]
name = "json-patch" name = "json-patch"
version = "1.2.0" version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55ff1e1486799e3f64129f8ccad108b38290df9cd7015cd31bed17239f0789d6" checksum = "5b1fb8864823fad91877e6caea0baca82e49e8db50f8e5c9f9a453e27d3330fc"
dependencies = [ dependencies = [
"jsonptr",
"serde", "serde",
"serde_json", "serde_json",
"thiserror", "thiserror",
"treediff", ]
[[package]]
name = "jsonptr"
version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1c6e529149475ca0b2820835d3dce8fcc41c6b943ca608d32f35b449255e4627"
dependencies = [
"fluent-uri",
"serde",
"serde_json",
] ]
[[package]] [[package]]
@@ -1775,46 +1813,12 @@ version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "libappindicator"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db2d3cb96d092b4824cb306c9e544c856a4cb6210c1081945187f7f1924b47e8"
dependencies = [
"glib",
"gtk",
"gtk-sys",
"libappindicator-sys",
"log",
]
[[package]]
name = "libappindicator-sys"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1b3b6681973cea8cc3bce7391e6d7d5502720b80a581c9a95c9cbaf592826aa"
dependencies = [
"gtk-sys",
"libloading",
"once_cell",
]
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.149" version = "0.2.149"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b"
[[package]]
name = "libloading"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
dependencies = [
"cfg-if",
"winapi",
]
[[package]] [[package]]
name = "line-wrap" name = "line-wrap"
version = "0.1.1" version = "0.1.1"
@@ -3128,9 +3132,9 @@ dependencies = [
[[package]] [[package]]
name = "serialize-to-javascript" name = "serialize-to-javascript"
version = "0.1.1" version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9823f2d3b6a81d98228151fdeaf848206a7855a7a042bbf9bf870449a66cafb" checksum = "04f3666a07a197cdb77cdf306c32be9b7f598d7060d50cfd4d5aa04bfd92f6c5"
dependencies = [ dependencies = [
"serde", "serde",
"serde_json", "serde_json",
@@ -3139,13 +3143,13 @@ dependencies = [
[[package]] [[package]]
name = "serialize-to-javascript-impl" name = "serialize-to-javascript-impl"
version = "0.1.1" version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74064874e9f6a15f04c1f3cb627902d0e6b410abbf36668afa873c61889f1763" checksum = "772ee033c0916d670af7860b6e1ef7d658a4629a6d0b4c8c3e67f09b3765b75d"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 1.0.105", "syn 2.0.38",
] ]
[[package]] [[package]]
@@ -3381,15 +3385,11 @@ dependencies = [
[[package]] [[package]]
name = "sys-locale" name = "sys-locale"
version = "0.2.4" version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8a11bd9c338fdba09f7881ab41551932ad42e405f61d01e8406baea71c07aee" checksum = "e801cf239ecd6ccd71f03d270d67dd53d13e90aab208bf4b8fe4ad957ea949b0"
dependencies = [ dependencies = [
"js-sys",
"libc", "libc",
"wasm-bindgen",
"web-sys",
"windows-sys 0.45.0",
] ]
[[package]] [[package]]
@@ -3452,7 +3452,6 @@ dependencies = [
"core-foundation", "core-foundation",
"core-graphics", "core-graphics",
"crossbeam-channel", "crossbeam-channel",
"dirs-next",
"dispatch", "dispatch",
"gdk", "gdk",
"gdk-pixbuf", "gdk-pixbuf",
@@ -3467,7 +3466,6 @@ dependencies = [
"instant", "instant",
"jni", "jni",
"lazy_static", "lazy_static",
"libappindicator",
"libc", "libc",
"log", "log",
"ndk", "ndk",
@@ -3512,12 +3510,12 @@ dependencies = [
[[package]] [[package]]
name = "tauri" name = "tauri"
version = "1.6.8" version = "1.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77567d2b3b74de4588d544147142d02297f3eaa171a25a065252141d8597a516" checksum = "0e33e3ba00a3b05eb6c57ef135781717d33728b48acf914bb05629e74d897d29"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"base64 0.21.5", "base64 0.22.1",
"bytes", "bytes",
"cocoa", "cocoa",
"dirs-next", "dirs-next",
@@ -3575,9 +3573,9 @@ dependencies = [
[[package]] [[package]]
name = "tauri-build" name = "tauri-build"
version = "1.5.3" version = "1.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0c6ec7a5c3296330c7818478948b422967ce4649094696c985f61d50076d29c" checksum = "d5fb5a90a64241ddb7217d3210d844149070a911e87e8a107a707a1d4973f164"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"cargo_toml", "cargo_toml",
@@ -3594,9 +3592,9 @@ dependencies = [
[[package]] [[package]]
name = "tauri-codegen" name = "tauri-codegen"
version = "1.4.3" version = "1.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3a1d90db526a8cdfd54444ad3f34d8d4d58fa5c536463915942393743bd06f8" checksum = "93a9e3f5cebf779a63bf24903e714ec91196c307d8249a0008b882424328bcda"
dependencies = [ dependencies = [
"base64 0.21.5", "base64 0.21.5",
"brotli", "brotli",
@@ -3620,9 +3618,9 @@ dependencies = [
[[package]] [[package]]
name = "tauri-macros" name = "tauri-macros"
version = "1.4.4" version = "1.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a582d75414250122e4a597b9dd7d3c910a2c77906648fc2ac9353845ff0feec" checksum = "d1d0e989f54fe06c5ef0875c5e19cf96453d099a0a774d5192ab47e80471cdab"
dependencies = [ dependencies = [
"heck 0.5.0", "heck 0.5.0",
"proc-macro2", "proc-macro2",
@@ -3633,24 +3631,21 @@ dependencies = [
] ]
[[package]] [[package]]
name = "tauri-plugin-single-instance" name = "tauri-plugin-localhost"
version = "0.0.0" version = "0.1.0"
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v1#a32008965b5cf060cc04e1e143dd221ce410715d" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f20786ccff879045f6bafec445fb5c6740c0c057372d2f992ae1281e4658c681"
dependencies = [ dependencies = [
"log",
"serde",
"serde_json", "serde_json",
"tauri", "tauri",
"thiserror", "tiny_http",
"windows-sys 0.52.0",
"zbus",
] ]
[[package]] [[package]]
name = "tauri-runtime" name = "tauri-runtime"
version = "0.14.3" version = "0.14.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd7ffddf36d450791018e63a3ddf54979b9581d9644c584a5fb5611e6b5f20b4" checksum = "f33fda7d213e239077fad52e96c6b734cecedb30c2382118b64f94cb5103ff3a"
dependencies = [ dependencies = [
"gtk", "gtk",
"http", "http",
@@ -3669,9 +3664,9 @@ dependencies = [
[[package]] [[package]]
name = "tauri-runtime-wry" name = "tauri-runtime-wry"
version = "0.14.8" version = "0.14.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1989b3b4d611f5428b3414a4abae6fa6df30c7eb8ed33250ca90a5f7e5bb3655" checksum = "18c447dcd9b0f09c7dc4b752cc33e72788805bfd761fbda5692d30c48289efec"
dependencies = [ dependencies = [
"arboard", "arboard",
"cocoa", "cocoa",
@@ -3690,9 +3685,9 @@ dependencies = [
[[package]] [[package]]
name = "tauri-utils" name = "tauri-utils"
version = "1.6.0" version = "1.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2826db448309d382dac14d520f0c0a40839b87b57b977e59cf5f296b3ace6a93" checksum = "83a0c939e88d82903a0a7dfb28388b12a3c03504d6bd6086550edaa3b6d8beaa"
dependencies = [ dependencies = [
"brotli", "brotli",
"ctor", "ctor",
@@ -3837,6 +3832,19 @@ dependencies = [
"time-core", "time-core",
] ]
[[package]]
name = "tiny_http"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0d6ef4e10d23c1efb862eecad25c5054429a71958b4eeef85eb5e7170b477ca"
dependencies = [
"ascii",
"chunked_transfer",
"log",
"time",
"url",
]
[[package]] [[package]]
name = "tinyvec" name = "tinyvec"
version = "1.6.0" version = "1.6.0"
@@ -4043,15 +4051,6 @@ dependencies = [
"petgraph", "petgraph",
] ]
[[package]]
name = "treediff"
version = "4.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52984d277bdf2a751072b5df30ec0377febdb02f7696d64c2d7d54630bac4303"
dependencies = [
"serde_json",
]
[[package]] [[package]]
name = "try-lock" name = "try-lock"
version = "0.2.4" version = "0.2.4"
@@ -4591,15 +4590,6 @@ dependencies = [
"windows_x86_64_msvc 0.42.2", "windows_x86_64_msvc 0.42.2",
] ]
[[package]]
name = "windows-sys"
version = "0.45.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
dependencies = [
"windows-targets 0.42.2",
]
[[package]] [[package]]
name = "windows-sys" name = "windows-sys"
version = "0.48.0" version = "0.48.0"
@@ -4618,21 +4608,6 @@ dependencies = [
"windows-targets 0.52.5", "windows-targets 0.52.5",
] ]
[[package]]
name = "windows-targets"
version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"
dependencies = [
"windows_aarch64_gnullvm 0.42.2",
"windows_aarch64_msvc 0.42.2",
"windows_i686_gnu 0.42.2",
"windows_i686_msvc 0.42.2",
"windows_x86_64_gnu 0.42.2",
"windows_x86_64_gnullvm 0.42.2",
"windows_x86_64_msvc 0.42.2",
]
[[package]] [[package]]
name = "windows-targets" name = "windows-targets"
version = "0.48.5" version = "0.48.5"

View File

@@ -2,7 +2,7 @@
[package] [package]
name = "cinny" name = "cinny"
version = "4.0.0" version = "4.2.1"
description = "Yet another matrix client" description = "Yet another matrix client"
authors = ["Ajay Bura"] authors = ["Ajay Bura"]
license = "AGPL-3.0-only" license = "AGPL-3.0-only"
@@ -12,13 +12,13 @@ edition = "2021"
rust-version = "1.61" rust-version = "1.61"
[build-dependencies] [build-dependencies]
tauri-build = { version = "1.5.3", features = [] } tauri-build = { version = "1.5.4", features = [] }
[dependencies] [dependencies]
serde_json = "1.0.109" serde_json = "1.0.109"
serde = { version = "1.0.193", features = ["derive"] } serde = { version = "1.0.193", features = ["derive"] }
tauri = { version = "1.6.8", features = ["api-all", "devtools", "system-tray", "updater"] } tauri = { version = "1.7.2", features = ["api-all", "devtools", "updater"] }
tauri-plugin-single-instance = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" } tauri-plugin-localhost = "0.1.0"
[features] [features]
# by default Tauri runs in production mode # by default Tauri runs in production mode

View File

@@ -3,49 +3,27 @@
windows_subsystem = "windows" windows_subsystem = "windows"
)] )]
use tauri::Manager;
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
mod menu; mod menu;
mod tray;
use tauri::{utils::config::AppUrl, WindowUrl};
fn main() { fn main() {
let port = 44548;
let mut context = tauri::generate_context!();
let url = format!("http://localhost:{}", port).parse().unwrap();
let window_url = WindowUrl::External(url);
// rewrite the config so the IPC is enabled on this URL
context.config_mut().build.dist_dir = AppUrl::Url(window_url.clone());
context.config_mut().build.dev_path = AppUrl::Url(window_url.clone());
let builder = tauri::Builder::default(); let builder = tauri::Builder::default();
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
let builder = builder.menu(menu::menu()); let builder = builder.menu(menu::menu());
let builder = builder
.system_tray(tray::system_tray())
.on_system_tray_event(tray::system_tray_handler);
builder builder
.plugin(tauri_plugin_single_instance::init(|app, _, _| { .plugin(tauri_plugin_localhost::Builder::new(port).build())
let tray_handle = match app.tray_handle_by_id(crate::tray::TRAY_LABEL) { .run(context)
Some(h) => h,
None => return,
};
let window = app.get_window("main").unwrap();
if !window.is_visible().unwrap() || window.is_minimized().unwrap() {
window.unminimize().unwrap();
window.show().unwrap();
window.set_focus().unwrap();
tray_handle
.get_item("toggle")
.set_title("Hide Cinny")
.unwrap();
}
}))
.build(tauri::generate_context!())
.expect("error while building tauri application") .expect("error while building tauri application")
.run(run_event_handler)
}
fn run_event_handler<R: tauri::Runtime>(app: &tauri::AppHandle<R>, event: tauri::RunEvent) {
match event {
tauri::RunEvent::WindowEvent { label, event, .. } => {
tray::window_event_handler(app, &label, &event);
}
_ => {}
}
} }

View File

@@ -1,87 +0,0 @@
use tauri::{
CustomMenuItem, Manager, SystemTray, SystemTrayEvent, SystemTrayMenu,
SystemTrayMenuItem, WindowEvent, SystemTrayHandle, Window,
};
pub const TRAY_LABEL: &'static str = "main-tray";
pub fn window_event_handler<R: tauri::Runtime>(
app: &tauri::AppHandle<R>,
label: &str,
event: &WindowEvent,
) {
match event {
// Prevent Cinny from closing, instead hide it and let it be
// reopened through the tray.
WindowEvent::CloseRequested { api, .. } => {
api.prevent_close();
app.get_window(&label).unwrap().hide().unwrap();
app.tray_handle_by_id(TRAY_LABEL)
.unwrap()
.get_item("toggle")
.set_title("Show Cinny")
.unwrap();
}
_ => {}
}
}
/// Build the system tray object
pub fn system_tray() -> SystemTray {
let toggle = CustomMenuItem::new("toggle".to_owned(), "Hide Cinny");
let quit = CustomMenuItem::new("quit".to_owned(), "Quit");
let menu = SystemTrayMenu::new()
.add_item(toggle)
.add_native_item(SystemTrayMenuItem::Separator)
.add_item(quit);
tauri::SystemTray::new()
.with_menu(menu)
.with_id(TRAY_LABEL.to_owned())
}
pub fn toggle_window_state<R: tauri::Runtime>(window: Window<R>, tray_handle: SystemTrayHandle<R>) {
// Hide the window if it's visible, show it if not
// `is_visible` returns true for minimized state for whatever reason
if window.is_visible().unwrap() {
window.hide().unwrap();
tray_handle
.get_item("toggle")
.set_title("Show Cinny")
.unwrap();
} else {
window.unminimize().unwrap();
window.show().unwrap();
window.set_focus().unwrap();
tray_handle
.get_item("toggle")
.set_title("Hide Cinny")
.unwrap();
};
}
pub fn system_tray_handler<R: tauri::Runtime>(app: &tauri::AppHandle<R>, event: SystemTrayEvent) {
let tray_handle = match app.tray_handle_by_id(TRAY_LABEL) {
Some(h) => h,
None => return,
};
let window = app.get_window("main").unwrap();
match event {
SystemTrayEvent::LeftClick { .. } => {
toggle_window_state(window, tray_handle);
}
SystemTrayEvent::MenuItemClick { id, .. } => {
match id.as_str() {
"quit" => {
app.exit(0);
}
"toggle" => {
toggle_window_state(window, tray_handle)
}
_ => {}
}
}
_ => {}
}
}

View File

@@ -1,7 +1,7 @@
{ {
"package": { "package": {
"productName": "Cinny", "productName": "Cinny",
"version": "4.0.0" "version": "4.2.1"
}, },
"build": { "build": {
"distDir": "../cinny/dist", "distDir": "../cinny/dist",
@@ -62,8 +62,8 @@
"windows": [ "windows": [
{ {
"title": "Cinny", "title": "Cinny",
"width": 1024, "width": 1280,
"height": 724, "height": 905,
"center": true, "center": true,
"resizable": true, "resizable": true,
"fullscreen": false, "fullscreen": false,
@@ -72,11 +72,6 @@
], ],
"security": { "security": {
"csp": "script-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'" "csp": "script-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'"
},
"systemTray": {
"iconPath": "icons/32x32.png",
"iconAsTemplate": true,
"menuOnLeftClick": false
} }
} }
} }