Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a24632d7ba | ||
|
|
1f13d70192 | ||
|
|
517816b4d9 | ||
|
|
c4c78bbc4c | ||
|
|
8190c3264f | ||
|
|
5c85a1dcfb | ||
|
|
d0a89fe1da | ||
|
|
12fa701798 | ||
|
|
bdd0812d2d | ||
|
|
03c3952863 | ||
|
|
e5de41d963 | ||
|
|
c48f043f7c | ||
|
|
fbc214d56c | ||
|
|
486ce47c39 | ||
|
|
b9ac324d21 | ||
|
|
5494a4a26b | ||
|
|
174d5440f5 | ||
|
|
62745172dd | ||
|
|
6319f2c270 | ||
|
|
0dd30c6c14 | ||
|
|
06f7cb5c8c | ||
|
|
e1c519adf5 | ||
|
|
ae86f6962a | ||
|
|
4f95404f0b | ||
|
|
0d7e4b5c3a |
+105
-21
@@ -12,9 +12,12 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CN_APPLICATION: "trweb/court-pilot"
|
CN_APPLICATION: 'trweb/court-pilot'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
# Create CrabNebula draft release
|
||||||
|
# ---------------------------------------------------------
|
||||||
draft:
|
draft:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
@@ -27,18 +30,56 @@ jobs:
|
|||||||
command: release draft ${{ env.CN_APPLICATION }} --framework tauri
|
command: release draft ${{ env.CN_APPLICATION }} --framework tauri
|
||||||
api-key: ${{ secrets.CN_API_KEY }}
|
api-key: ${{ secrets.CN_API_KEY }}
|
||||||
|
|
||||||
build:
|
# ---------------------------------------------------------
|
||||||
|
# Windows Tauri build
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
windows:
|
||||||
needs: draft
|
needs: draft
|
||||||
|
|
||||||
strategy:
|
runs-on: windows-latest
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
matrix:
|
steps:
|
||||||
os:
|
- name: Checkout
|
||||||
- ubuntu-22.04
|
uses: actions/checkout@v4
|
||||||
- windows-latest
|
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 22
|
||||||
|
cache: npm
|
||||||
|
|
||||||
|
- name: Setup Rust
|
||||||
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
cache: true
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Install Ionic CLI
|
||||||
|
run: npm install -g @ionic/cli
|
||||||
|
|
||||||
|
- name: Build Tauri app
|
||||||
|
env:
|
||||||
|
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
||||||
|
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
||||||
|
run: npm run tauri build
|
||||||
|
|
||||||
|
- name: Upload release assets to CrabNebula
|
||||||
|
uses: crabnebula-dev/cloud-release@v0
|
||||||
|
with:
|
||||||
|
command: release upload ${{ env.CN_APPLICATION }} --framework tauri
|
||||||
|
api-key: ${{ secrets.CN_API_KEY }}
|
||||||
|
path: ./src-tauri
|
||||||
|
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
# Linux Tauri build + Snap
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
snap:
|
||||||
|
needs: draft
|
||||||
|
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -57,39 +98,82 @@ jobs:
|
|||||||
cache: true
|
cache: true
|
||||||
|
|
||||||
- name: Install Linux dependencies
|
- name: Install Linux dependencies
|
||||||
if: matrix.os == 'ubuntu-22.04'
|
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y \
|
sudo apt-get install -y \
|
||||||
webkit2gtk-4.1 \
|
libssl-dev \
|
||||||
libappindicator3-dev \
|
libxdo-dev \
|
||||||
|
libayatana-appindicator3-dev \
|
||||||
librsvg2-dev \
|
librsvg2-dev \
|
||||||
patchelf
|
libwebkit2gtk-4.1-dev \
|
||||||
|
dpkg
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Build Tauri app
|
- name: Install Ionic CLI
|
||||||
|
run: npm install -g @ionic/cli
|
||||||
|
|
||||||
|
- name: Build Tauri Debian package
|
||||||
env:
|
env:
|
||||||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
||||||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
||||||
run: npm run tauri build
|
run: npm run tauri build -- --bundles deb
|
||||||
|
|
||||||
- name: Upload release assets to CrabNebula
|
- name: Extract Debian package
|
||||||
uses: crabnebula-dev/cloud-release@v0
|
run: |
|
||||||
|
rm -rf snap-root
|
||||||
|
mkdir -p snap-root
|
||||||
|
|
||||||
|
dpkg -x src-tauri/target/release/bundle/deb/*.deb snap-root/
|
||||||
|
|
||||||
|
- name: Show extracted Snap filesystem
|
||||||
|
run: |
|
||||||
|
echo "Snap root:"
|
||||||
|
find snap-root -maxdepth 5 -type f | sort
|
||||||
|
|
||||||
|
- name: Build Snap
|
||||||
|
uses: snapcore/action-build@v1
|
||||||
|
id: snapcraft
|
||||||
with:
|
with:
|
||||||
command: release upload ${{ env.CN_APPLICATION }} --framework tauri
|
snapcraft-channel: stable
|
||||||
api-key: ${{ secrets.CN_API_KEY }}
|
|
||||||
path: ./src-tauri
|
|
||||||
|
|
||||||
|
- name: Show generated Snap
|
||||||
|
run: |
|
||||||
|
echo "Snap created:"
|
||||||
|
echo "${{ steps.snapcraft.outputs.snap }}"
|
||||||
|
|
||||||
|
- name: Upload Snap as GitHub artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: court-pilot-snap
|
||||||
|
path: ${{ steps.snapcraft.outputs.snap }}
|
||||||
|
|
||||||
|
- name: Publish Snap to Snap Store
|
||||||
|
uses: snapcore/action-publish@v1
|
||||||
|
env:
|
||||||
|
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
|
||||||
|
with:
|
||||||
|
snap: ${{ steps.snapcraft.outputs.snap }}
|
||||||
|
release: stable
|
||||||
|
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
# Publish CrabNebula release
|
||||||
|
# ---------------------------------------------------------
|
||||||
publish:
|
publish:
|
||||||
needs: build
|
needs:
|
||||||
|
- windows
|
||||||
|
- snap
|
||||||
|
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Publish CrabNebula release
|
- name: Publish CrabNebula release
|
||||||
uses: crabnebula-dev/cloud-release@v0
|
uses: crabnebula-dev/cloud-release@v0
|
||||||
with:
|
with:
|
||||||
command: release publish ${{ env.CN_APPLICATION }} --framework tauri
|
command: release publish ${{ env.CN_APPLICATION }} --framework tauri
|
||||||
api-key: ${{ secrets.CN_API_KEY }}
|
api-key: ${{ secrets.CN_API_KEY }}
|
||||||
|
path: ./src-tauri
|
||||||
|
working-directory: ./src-tauri
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2026 Court Pilot
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
Generated
+12
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "court-pilot",
|
"name": "court-pilot",
|
||||||
"version": "0.0.1",
|
"version": "1.1.2",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "court-pilot",
|
"name": "court-pilot",
|
||||||
"version": "0.0.1",
|
"version": "1.1.2",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "^20.3.28",
|
"@angular/animations": "^20.3.28",
|
||||||
"@angular/cdk": "^20.2.14",
|
"@angular/cdk": "^20.2.14",
|
||||||
@@ -23,6 +23,7 @@
|
|||||||
"@capacitor/keyboard": "8.0.3",
|
"@capacitor/keyboard": "8.0.3",
|
||||||
"@capacitor/status-bar": "8.0.2",
|
"@capacitor/status-bar": "8.0.2",
|
||||||
"@ionic/angular": "^8.0.0",
|
"@ionic/angular": "^8.0.0",
|
||||||
|
"@tauri-apps/plugin-os": "^2.3.2",
|
||||||
"@tauri-apps/plugin-process": "^2.3.1",
|
"@tauri-apps/plugin-process": "^2.3.1",
|
||||||
"@tauri-apps/plugin-updater": "^2.10.1",
|
"@tauri-apps/plugin-updater": "^2.10.1",
|
||||||
"dexie": "^4.4.2",
|
"dexie": "^4.4.2",
|
||||||
@@ -6833,6 +6834,15 @@
|
|||||||
"node": ">= 10"
|
"node": ">= 10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@tauri-apps/plugin-os": {
|
||||||
|
"version": "2.3.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tauri-apps/plugin-os/-/plugin-os-2.3.2.tgz",
|
||||||
|
"integrity": "sha512-n+nXWeuSeF9wcEsSPmRnBEGrRgOy6jjkSU+UVCOV8YUGKb2erhDOxis7IqRXiRVHhY8XMKks00BJ0OAdkpf6+A==",
|
||||||
|
"license": "MIT OR Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@tauri-apps/api": "^2.8.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@tauri-apps/plugin-process": {
|
"node_modules/@tauri-apps/plugin-process": {
|
||||||
"version": "2.3.1",
|
"version": "2.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/@tauri-apps/plugin-process/-/plugin-process-2.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/@tauri-apps/plugin-process/-/plugin-process-2.3.1.tgz",
|
||||||
|
|||||||
+5
-4
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "court-pilot",
|
"name": "court-pilot",
|
||||||
"version": "1.1.0",
|
"version": "1.1.5",
|
||||||
"author": "Ionic Framework",
|
"author": "Richard Toth",
|
||||||
"homepage": "https://ionicframework.com/",
|
"homepage": "https://github.com/tricsusz/court-pilot",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ionic serve --host=0.0.0.0",
|
"start": "ionic serve --host=0.0.0.0",
|
||||||
@@ -29,6 +29,7 @@
|
|||||||
"@capacitor/keyboard": "8.0.3",
|
"@capacitor/keyboard": "8.0.3",
|
||||||
"@capacitor/status-bar": "8.0.2",
|
"@capacitor/status-bar": "8.0.2",
|
||||||
"@ionic/angular": "^8.0.0",
|
"@ionic/angular": "^8.0.0",
|
||||||
|
"@tauri-apps/plugin-os": "^2.3.2",
|
||||||
"@tauri-apps/plugin-process": "^2.3.1",
|
"@tauri-apps/plugin-process": "^2.3.1",
|
||||||
"@tauri-apps/plugin-updater": "^2.10.1",
|
"@tauri-apps/plugin-updater": "^2.10.1",
|
||||||
"dexie": "^4.4.2",
|
"dexie": "^4.4.2",
|
||||||
@@ -66,5 +67,5 @@
|
|||||||
"karma-jasmine-html-reporter": "~2.1.0",
|
"karma-jasmine-html-reporter": "~2.1.0",
|
||||||
"typescript": "~5.9.0"
|
"typescript": "~5.9.0"
|
||||||
},
|
},
|
||||||
"description": "An Ionic project"
|
"description": "Manage court officials"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Categories=
|
||||||
|
Comment=Court Pilot
|
||||||
|
Exec=court-pilot
|
||||||
|
StartupWMClass=court-pilot
|
||||||
|
Icon=${SNAP}/meta/gui/court-pilot.png
|
||||||
|
Name=court-pilot
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 44 KiB |
@@ -0,0 +1,48 @@
|
|||||||
|
name: court-pilot
|
||||||
|
title: Court Pilot
|
||||||
|
contact:
|
||||||
|
- toth.richard@trweb.hu
|
||||||
|
issues:
|
||||||
|
- https://github.com/tricsusz/court-pilot/issues
|
||||||
|
source-code:
|
||||||
|
- https://github.com/tricsusz/court-pilot
|
||||||
|
website:
|
||||||
|
- https://github.com/tricsusz/court-pilot
|
||||||
|
license: MIT
|
||||||
|
base: core24
|
||||||
|
icon: snap/gui/court-pilot.png
|
||||||
|
|
||||||
|
version: '1.1.5'
|
||||||
|
|
||||||
|
summary: Badminton umpire rotation application
|
||||||
|
|
||||||
|
description: |
|
||||||
|
Court Pilot is a desktop application for managing badminton
|
||||||
|
umpire rotations and court assignments.
|
||||||
|
|
||||||
|
grade: stable
|
||||||
|
confinement: strict
|
||||||
|
|
||||||
|
apps:
|
||||||
|
court-pilot:
|
||||||
|
command: usr/bin/court-pilot
|
||||||
|
desktop: usr/share/applications/court-pilot.desktop
|
||||||
|
|
||||||
|
extensions:
|
||||||
|
- gnome
|
||||||
|
|
||||||
|
plugs:
|
||||||
|
- network
|
||||||
|
- home
|
||||||
|
|
||||||
|
environment:
|
||||||
|
LD_LIBRARY_PATH: $SNAP_DESKTOP_RUNTIME/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
|
||||||
|
|
||||||
|
parts:
|
||||||
|
court-pilot:
|
||||||
|
plugin: dump
|
||||||
|
source: snap-root
|
||||||
|
|
||||||
|
stage-packages:
|
||||||
|
- libwebkit2gtk-4.1-0
|
||||||
|
- libayatana-appindicator3-1
|
||||||
Generated
+80
-14
@@ -75,20 +75,6 @@ version = "1.0.102"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
|
checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "app"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"log",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"tauri",
|
|
||||||
"tauri-build",
|
|
||||||
"tauri-plugin-log",
|
|
||||||
"tauri-plugin-process",
|
|
||||||
"tauri-plugin-updater",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "arbitrary"
|
name = "arbitrary"
|
||||||
version = "1.4.2"
|
version = "1.4.2"
|
||||||
@@ -514,6 +500,21 @@ dependencies = [
|
|||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "court-pilot"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"log",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"tauri",
|
||||||
|
"tauri-build",
|
||||||
|
"tauri-plugin-log",
|
||||||
|
"tauri-plugin-os",
|
||||||
|
"tauri-plugin-process",
|
||||||
|
"tauri-plugin-updater",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cpufeatures"
|
name = "cpufeatures"
|
||||||
version = "0.2.17"
|
version = "0.2.17"
|
||||||
@@ -1183,6 +1184,16 @@ dependencies = [
|
|||||||
"version_check",
|
"version_check",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "gethostname"
|
||||||
|
version = "1.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8"
|
||||||
|
dependencies = [
|
||||||
|
"rustix",
|
||||||
|
"windows-link 0.2.1",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "getrandom"
|
name = "getrandom"
|
||||||
version = "0.2.17"
|
version = "0.2.17"
|
||||||
@@ -2055,6 +2066,18 @@ version = "1.0.6"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086"
|
checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "nix"
|
||||||
|
version = "0.31.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags 2.11.1",
|
||||||
|
"cfg-if",
|
||||||
|
"cfg_aliases",
|
||||||
|
"libc",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "num-conv"
|
name = "num-conv"
|
||||||
version = "0.2.1"
|
version = "0.2.1"
|
||||||
@@ -2327,6 +2350,22 @@ version = "0.2.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
|
checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "os_info"
|
||||||
|
version = "3.15.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9cf20a545b305cf1da722b236b5155c9bb35f1d5ceb28c048bd96ca842f41b5b"
|
||||||
|
dependencies = [
|
||||||
|
"android_system_properties",
|
||||||
|
"log",
|
||||||
|
"nix",
|
||||||
|
"objc2",
|
||||||
|
"objc2-foundation",
|
||||||
|
"objc2-ui-kit",
|
||||||
|
"serde",
|
||||||
|
"windows-sys 0.61.2",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "osakit"
|
name = "osakit"
|
||||||
version = "0.3.1"
|
version = "0.3.1"
|
||||||
@@ -3478,6 +3517,15 @@ dependencies = [
|
|||||||
"syn 2.0.117",
|
"syn 2.0.117",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "sys-locale"
|
||||||
|
version = "0.3.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8eab9a99a024a169fe8a903cf9d4a3b3601109bcc13bd9e3c6fff259138626c4"
|
||||||
|
dependencies = [
|
||||||
|
"libc",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "system-deps"
|
name = "system-deps"
|
||||||
version = "6.2.2"
|
version = "6.2.2"
|
||||||
@@ -3716,6 +3764,24 @@ dependencies = [
|
|||||||
"time",
|
"time",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tauri-plugin-os"
|
||||||
|
version = "2.3.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d8f08346c8deb39e96f86973da0e2d76cbb933d7ac9b750f6dc4daf955a6f997"
|
||||||
|
dependencies = [
|
||||||
|
"gethostname",
|
||||||
|
"log",
|
||||||
|
"os_info",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"serialize-to-javascript",
|
||||||
|
"sys-locale",
|
||||||
|
"tauri",
|
||||||
|
"tauri-plugin",
|
||||||
|
"thiserror 2.0.18",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-process"
|
name = "tauri-plugin-process"
|
||||||
version = "2.3.1"
|
version = "2.3.1"
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "app"
|
name = "court-pilot"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "A Tauri App"
|
description = "Court Pilot"
|
||||||
authors = ["you"]
|
authors = ["Richard Toth"]
|
||||||
license = ""
|
license = "MIT"
|
||||||
repository = ""
|
repository = "https://github.com/tricsusz/court-pilot"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
rust-version = "1.77.2"
|
rust-version = "1.77.2"
|
||||||
|
|
||||||
@@ -24,6 +24,7 @@ log = "0.4"
|
|||||||
tauri = { version = "2.11.2", features = [] }
|
tauri = { version = "2.11.2", features = [] }
|
||||||
tauri-plugin-log = "2"
|
tauri-plugin-log = "2"
|
||||||
tauri-plugin-process = "2"
|
tauri-plugin-process = "2"
|
||||||
|
tauri-plugin-os = "2"
|
||||||
|
|
||||||
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
|
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
|
||||||
tauri-plugin-updater = "2"
|
tauri-plugin-updater = "2"
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
],
|
],
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"core:default",
|
"core:default",
|
||||||
"process:default"
|
"process:default",
|
||||||
|
"os:default"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
"main"
|
"main"
|
||||||
],
|
],
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"updater:default"
|
"updater:default",
|
||||||
|
"os:default"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||||
pub fn run() {
|
pub fn run() {
|
||||||
tauri::Builder::default()
|
tauri::Builder::default()
|
||||||
|
.plugin(tauri_plugin_os::init())
|
||||||
.plugin(tauri_plugin_process::init())
|
.plugin(tauri_plugin_process::init())
|
||||||
.plugin(tauri_plugin_updater::Builder::new().build())
|
.plugin(tauri_plugin_updater::Builder::new().build())
|
||||||
.setup(|app| {
|
.setup(|app| {
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
||||||
"productName": "court-pilot",
|
"productName": "court-pilot",
|
||||||
"version": "1.1.0",
|
"mainBinaryName": "court-pilot",
|
||||||
|
"version": "1.1.5",
|
||||||
"identifier": "com.courtpilot.dev",
|
"identifier": "com.courtpilot.dev",
|
||||||
"build": {
|
"build": {
|
||||||
"frontendDist": "../www",
|
"frontendDist": "../www",
|
||||||
@@ -15,10 +16,11 @@
|
|||||||
"minHeight": 600,
|
"minHeight": 600,
|
||||||
"minWidth": 800,
|
"minWidth": 800,
|
||||||
"title": "Court Pilot",
|
"title": "Court Pilot",
|
||||||
"width": 1366,
|
"width": 800,
|
||||||
"height": 768,
|
"height": 600,
|
||||||
"resizable": true,
|
"resizable": true,
|
||||||
"fullscreen": false
|
"fullscreen": false,
|
||||||
|
"center": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"security": {
|
"security": {
|
||||||
@@ -38,7 +40,9 @@
|
|||||||
"android": {
|
"android": {
|
||||||
"debugApplicationIdSuffix": ".debug"
|
"debugApplicationIdSuffix": ".debug"
|
||||||
},
|
},
|
||||||
"createUpdaterArtifacts": true
|
"createUpdaterArtifacts": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"licenseFile": "../LICENSE"
|
||||||
},
|
},
|
||||||
"plugins": {
|
"plugins": {
|
||||||
"updater": {
|
"updater": {
|
||||||
|
|||||||
@@ -2,13 +2,17 @@ import { Component, inject } from '@angular/core';
|
|||||||
import {
|
import {
|
||||||
AlertController,
|
AlertController,
|
||||||
IonApp,
|
IonApp,
|
||||||
IonRouterOutlet
|
IonRouterOutlet,
|
||||||
|
LoadingController
|
||||||
} from '@ionic/angular/standalone';
|
} from '@ionic/angular/standalone';
|
||||||
import { check } from '@tauri-apps/plugin-updater';
|
import { check, DownloadEvent } from '@tauri-apps/plugin-updater';
|
||||||
import { isTauri } from '@tauri-apps/api/core';
|
import { isTauri } from '@tauri-apps/api/core';
|
||||||
|
import { platform } from '@tauri-apps/plugin-os';
|
||||||
import { relaunch } from '@tauri-apps/plugin-process';
|
import { relaunch } from '@tauri-apps/plugin-process';
|
||||||
import { TranslationService } from './i18n/translation.service';
|
import { TranslationService } from './i18n/translation.service';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
templateUrl: 'app.component.html',
|
templateUrl: 'app.component.html',
|
||||||
@@ -16,6 +20,7 @@ import { TranslationService } from './i18n/translation.service';
|
|||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
readonly alertController: AlertController = inject(AlertController);
|
readonly alertController: AlertController = inject(AlertController);
|
||||||
|
readonly loadingController: LoadingController = inject(LoadingController);
|
||||||
readonly translationService: TranslationService = inject(TranslationService);
|
readonly translationService: TranslationService = inject(TranslationService);
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
@@ -27,6 +32,11 @@ export class AppComponent {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Snap handles updates on Linux.
|
||||||
|
if (platform() === 'linux') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const update = await check();
|
const update = await check();
|
||||||
|
|
||||||
@@ -40,11 +50,61 @@ export class AppComponent {
|
|||||||
{
|
{
|
||||||
text: 'OK',
|
text: 'OK',
|
||||||
handler: async () => {
|
handler: async () => {
|
||||||
|
const loading = await this.loadingController.create({
|
||||||
|
message:
|
||||||
|
this.translationService.translate('updateDownloading'),
|
||||||
|
spinner: 'crescent',
|
||||||
|
backdropDismiss: false
|
||||||
|
});
|
||||||
|
|
||||||
|
await loading.present();
|
||||||
|
|
||||||
|
let downloaded = 0;
|
||||||
|
let total = 0;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await update.downloadAndInstall();
|
await update.downloadAndInstall((event: DownloadEvent) => {
|
||||||
|
switch (event.event) {
|
||||||
|
case 'Started':
|
||||||
|
total = event.data.contentLength ?? 0;
|
||||||
|
downloaded = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'Progress':
|
||||||
|
downloaded += event.data.chunkLength;
|
||||||
|
|
||||||
|
if (total > 0) {
|
||||||
|
const percent = Math.min(
|
||||||
|
100,
|
||||||
|
Math.round((downloaded / total) * 100)
|
||||||
|
);
|
||||||
|
|
||||||
|
loading.message = `${this.translationService.translate('updateDownloading')} ${percent}%`;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'Finished':
|
||||||
|
loading.message =
|
||||||
|
this.translationService.translate('updateInstalling');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
await loading.dismiss();
|
||||||
await relaunch();
|
await relaunch();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Failed to install update:', error);
|
console.error('Failed to install update:', error);
|
||||||
|
|
||||||
|
await loading.dismiss();
|
||||||
|
|
||||||
|
const errorAlert = await this.alertController.create({
|
||||||
|
header: this.translationService.translate('updateFailed'),
|
||||||
|
message: String(error),
|
||||||
|
buttons: ['OK']
|
||||||
|
});
|
||||||
|
|
||||||
|
await errorAlert.present();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,13 @@ export const translations = {
|
|||||||
sendUmpiresMessage: '{umpire} - {serviceJudge}',
|
sendUmpiresMessage: '{umpire} - {serviceJudge}',
|
||||||
version: 'Version',
|
version: 'Version',
|
||||||
updateAvailable: 'Update available',
|
updateAvailable: 'Update available',
|
||||||
newVersion: 'A new version {version} is available. The application will restart to install the update.'
|
newVersion:
|
||||||
|
'A new version {version} is available. The application will restart to install the update.',
|
||||||
|
english: 'English',
|
||||||
|
hungarian: 'Hungarian',
|
||||||
|
updateDownloading: 'Downloading update...',
|
||||||
|
updateInstalling: 'Installing update...',
|
||||||
|
updateFailed: 'Failed to install the update. Please try again.'
|
||||||
},
|
},
|
||||||
|
|
||||||
hu: {
|
hu: {
|
||||||
@@ -68,12 +74,12 @@ export const translations = {
|
|||||||
confirmDeleteUmpire: 'Biztosan törölni szeretnéd ezt a tisztségviselőt?',
|
confirmDeleteUmpire: 'Biztosan törölni szeretnéd ezt a tisztségviselőt?',
|
||||||
no: 'Nem',
|
no: 'Nem',
|
||||||
yes: 'Igen',
|
yes: 'Igen',
|
||||||
umpires: 'Játékeveztők',
|
umpires: 'Játékvezetők',
|
||||||
serviceJudges: 'Adogatásbírók',
|
serviceJudges: 'Adogatásbírók',
|
||||||
notOnDuty: 'Pihenő',
|
notOnDuty: 'Pihenő',
|
||||||
shortCourtName: 'P',
|
shortCourtName: 'P',
|
||||||
court: 'Pálya',
|
court: 'Pálya',
|
||||||
umpire: 'Játékeveztő',
|
umpire: 'Játékvezető',
|
||||||
removeUmpireFromCourt: 'Biztos leveszed őt a pályáról?',
|
removeUmpireFromCourt: 'Biztos leveszed őt a pályáról?',
|
||||||
removeUmpiresFromCourt: 'Biztos leveszed őket a pályáról?',
|
removeUmpiresFromCourt: 'Biztos leveszed őket a pályáról?',
|
||||||
courtConfirm: 'Pálya {courtNo}',
|
courtConfirm: 'Pálya {courtNo}',
|
||||||
@@ -83,7 +89,13 @@ export const translations = {
|
|||||||
sendUmpiresMessage: '{umpire} - {serviceJudge}',
|
sendUmpiresMessage: '{umpire} - {serviceJudge}',
|
||||||
version: 'Verzió',
|
version: 'Verzió',
|
||||||
updateAvailable: 'Új verzió elérhető',
|
updateAvailable: 'Új verzió elérhető',
|
||||||
newVersion: 'Új elérhető verzió: {version} is available. A frissítések telepítése után az alkalmazás újraindul.',
|
newVersion:
|
||||||
|
'Új elérhető verzió: {version}. A frissítések telepítése után az alkalmazás újraindul.',
|
||||||
|
english: 'Angol',
|
||||||
|
hungarian: 'Magyar',
|
||||||
|
updateDownloading: 'Frissítés letöltése...',
|
||||||
|
updateFailed: 'Frissítés sikertelen. Kérlek próbáld újra.',
|
||||||
|
updateInstalling: 'Frissítés telepítése...'
|
||||||
}
|
}
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
|
|||||||
@@ -102,8 +102,8 @@ export class Tab2Page {
|
|||||||
this.modal.dismiss(null, 'cancel');
|
this.modal.dismiss(null, 'cancel');
|
||||||
}
|
}
|
||||||
|
|
||||||
confirm() {
|
async confirm() {
|
||||||
this.modal.dismiss(
|
await this.modal.dismiss(
|
||||||
{
|
{
|
||||||
lastName: this.lastName,
|
lastName: this.lastName,
|
||||||
firstName: this.firstName,
|
firstName: this.firstName,
|
||||||
@@ -112,6 +112,11 @@ export class Tab2Page {
|
|||||||
},
|
},
|
||||||
'confirm'
|
'confirm'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
this.lastName = '';
|
||||||
|
this.firstName = '';
|
||||||
|
this.country = '';
|
||||||
|
this.gender = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
isValidUmpire(): boolean {
|
isValidUmpire(): boolean {
|
||||||
|
|||||||
@@ -17,9 +17,13 @@
|
|||||||
[value]="translationService.language()"
|
[value]="translationService.language()"
|
||||||
(ionChange)="updateLanguage($event)"
|
(ionChange)="updateLanguage($event)"
|
||||||
interface="popover">
|
interface="popover">
|
||||||
<ion-select-option value="en"> English </ion-select-option>
|
<ion-select-option value="en">
|
||||||
|
{{ 'english' | translate }}
|
||||||
|
</ion-select-option>
|
||||||
|
|
||||||
<ion-select-option value="hu"> Magyar </ion-select-option>
|
<ion-select-option value="hu">
|
||||||
|
{{ 'hungarian' | translate }}
|
||||||
|
</ion-select-option>
|
||||||
</ion-select>
|
</ion-select>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
|
||||||
@@ -57,7 +61,9 @@
|
|||||||
<ion-row>
|
<ion-row>
|
||||||
<ion-col sizeLg="6" pushLg="3">
|
<ion-col sizeLg="6" pushLg="3">
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-label class="ion-text-center">{{ 'version' | translate }}: 1.0.0</ion-label>
|
<ion-label class="ion-text-center"
|
||||||
|
>{{ 'version' | translate }}: 1.1.5</ion-label
|
||||||
|
>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
</ion-row>
|
</ion-row>
|
||||||
|
|||||||
Reference in New Issue
Block a user