diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml new file mode 100644 index 0000000..5e96c33 --- /dev/null +++ b/.github/workflows/build-check.yml @@ -0,0 +1,48 @@ +name: Build Check + +on: + pull_request: + branches: [ main ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + name: Build Check + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + cache: 'npm' + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Install Linux Dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + build-essential \ + pkg-config \ + libgtk-3-dev \ + libayatana-appindicator3-dev \ + librsvg2-dev \ + libglib2.0-dev \ + libjavascriptcoregtk-4.0-dev \ + libsoup-3.0-dev \ + libwebkit2gtk-4.1-dev + + - name: Install Dependencies + run: npm install + + - name: Build Frontend + run: npm run build + + - name: Build Application + run: npm run tauri build \ No newline at end of file diff --git a/.github/workflows/linux-aarch64-nightly.yml b/.github/workflows/linux-aarch64-nightly.yml new file mode 100644 index 0000000..2f9ece4 --- /dev/null +++ b/.github/workflows/linux-aarch64-nightly.yml @@ -0,0 +1,156 @@ +name: Linux (aarch64) Nightly Build + +on: + workflow_dispatch: # Allows manual triggering + schedule: + - cron: '0 0 * * *' # Run daily at midnight UTC + +env: + CARGO_TERM_COLOR: always + PKG_CONFIG_ALLOW_CROSS: 1 + PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig + PKG_CONFIG: /usr/bin/aarch64-linux-gnu-pkg-config + +jobs: + build: + name: Build Linux aarch64 Packages + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + cache: 'npm' + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + targets: aarch64-unknown-linux-gnu + + - name: Configure ARM64 repositories + run: | + sudo dpkg --add-architecture arm64 + # Remove all existing sources + sudo rm -rf /etc/apt/sources.list.d/* + sudo truncate -s 0 /etc/apt/sources.list + # Add only ports.ubuntu.com repository + sudo tee /etc/apt/sources.list << EOF + deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse + deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted universe multiverse + deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security main restricted universe multiverse + deb [arch=amd64] http://azure.archive.ubuntu.com/ubuntu jammy main restricted universe multiverse + deb [arch=amd64] http://azure.archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse + deb [arch=amd64] http://azure.archive.ubuntu.com/ubuntu jammy-security main restricted universe multiverse + EOF + sudo apt-get update + # Install required packages including cross-compilation tools + sudo apt-get install -y \ + build-essential \ + pkg-config \ + crossbuild-essential-arm64 \ + gcc-aarch64-linux-gnu \ + g++-aarch64-linux-gnu \ + libgtk-3-dev:arm64 \ + libayatana-appindicator3-dev:arm64 \ + librsvg2-dev:arm64 \ + libglib2.0-dev:arm64 \ + libjavascriptcoregtk-4.0-dev:arm64 \ + libsoup-3.0-dev:arm64 \ + libwebkit2gtk-4.1-dev:arm64 \ + libssl-dev:arm64 \ + libssl-dev \ + openssl:arm64 + # Configure pkg-config for cross-compilation + echo "PKG_CONFIG=/usr/bin/aarch64-linux-gnu-pkg-config" >> $GITHUB_ENV + echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV + + - name: Install Dependencies + run: npm install + + - name: Setup cross-compilation environment + run: | + sudo apt-get install -y \ + crossbuild-essential-arm64 \ + pkg-config \ + libssl-dev:arm64 \ + libssl-dev \ + openssl:arm64 \ + file \ + desktop-file-utils \ + libfuse2 \ + qemu-user-static + + # Setup pkg-config + sudo tee /usr/bin/aarch64-linux-gnu-pkg-config << 'EOF' + #!/bin/sh + export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig + exec pkg-config "$@" + EOF + sudo chmod +x /usr/bin/aarch64-linux-gnu-pkg-config + + # Create .cargo/config + mkdir -p .cargo + cat > .cargo/config << EOF + [target.aarch64-unknown-linux-gnu] + linker = "aarch64-linux-gnu-gcc" + ar = "aarch64-linux-gnu-ar" + EOF + + # Download and setup appimagetool for ARM64 + wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-aarch64.AppImage + chmod +x appimagetool-aarch64.AppImage + sudo mv appimagetool-aarch64.AppImage /usr/local/bin/appimagetool + + # Set environment variables + echo "PKG_CONFIG=/usr/bin/aarch64-linux-gnu-pkg-config" >> $GITHUB_ENV + echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV + echo "OPENSSL_DIR=/usr" >> $GITHUB_ENV + echo "OPENSSL_INCLUDE_DIR=/usr/include/aarch64-linux-gnu" >> $GITHUB_ENV + echo "OPENSSL_LIB_DIR=/usr/lib/aarch64-linux-gnu" >> $GITHUB_ENV + echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV + echo "APPIMAGE_EXTRACT_AND_RUN=1" >> $GITHUB_ENV + + - name: Build Frontend + run: npm run build + + - name: Build AppImage + run: | + echo "Building AppImage for aarch64..." + npm run tauri build -- --target aarch64-unknown-linux-gnu --bundles appimage + + - name: Build Debian Package + run: | + echo "Building Debian package for aarch64..." + npm run tauri build -- --target aarch64-unknown-linux-gnu --bundles deb + + - name: Upload AppImage + uses: actions/upload-artifact@v4 + with: + name: linux-appimage-aarch64 + path: src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/appimage/*.AppImage + + - name: Upload Debian Package + uses: actions/upload-artifact@v4 + with: + name: linux-deb-aarch64 + path: src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/deb/*.deb + + - name: Get version from package.json + id: version + run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT + + - name: Create Release + if: github.event_name == 'workflow_dispatch' + uses: softprops/action-gh-release@v1 + with: + name: "Linux ARM64 Nightly Build v${{ steps.version.outputs.version }}" + tag_name: "linux-arm64-nightly-${{ steps.version.outputs.version }}" + files: | + src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/appimage/*.AppImage + src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/deb/*.deb + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/linux-x86_64-nightly.yml b/.github/workflows/linux-x86_64-nightly.yml new file mode 100644 index 0000000..bf75a96 --- /dev/null +++ b/.github/workflows/linux-x86_64-nightly.yml @@ -0,0 +1,84 @@ +name: Linux (x86_64) Nightly Build + +on: + workflow_dispatch: # Allows manual triggering + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + name: Build Linux Packages + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + cache: 'npm' + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Install Linux Dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + build-essential \ + pkg-config \ + libgtk-3-dev \ + libayatana-appindicator3-dev \ + librsvg2-dev \ + libglib2.0-dev \ + libjavascriptcoregtk-4.0-dev \ + libsoup-3.0-dev \ + libwebkit2gtk-4.1-dev + + - name: Install Dependencies + run: | + npm install + + - name: Build Frontend + run: npm run build + + - name: Build AppImage (x86_64) + run: | + echo "Building AppImage for x86_64..." + npm run tauri build -- --target x86_64-unknown-linux-gnu --bundles appimage + + - name: Build Debian Package (x86_64) + run: | + echo "Building Debian package for x86_64..." + npm run tauri build -- --target x86_64-unknown-linux-gnu --bundles deb + + - name: Upload AppImage + uses: actions/upload-artifact@v4 + with: + name: linux-appimage + path: src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/*.AppImage + + - name: Upload Debian Package + uses: actions/upload-artifact@v4 + with: + name: linux-deb + path: src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/deb/*.deb + + - name: Get version from package.json + id: version + run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT + + - name: Create Release + if: github.event_name == 'workflow_dispatch' + uses: softprops/action-gh-release@v1 + with: + name: "Linux x86_64 Nightly Build v${{ steps.version.outputs.version }}" + tag_name: "linux-x86_64-nightly-${{ steps.version.outputs.version }}" + files: | + src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/*.AppImage + src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/deb/*.deb + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/macos-nightly.yml b/.github/workflows/macos-nightly.yml new file mode 100644 index 0000000..bd3416f --- /dev/null +++ b/.github/workflows/macos-nightly.yml @@ -0,0 +1,98 @@ +name: MacOS (Intel/Apple Silicon) Nightly Build + +on: + workflow_dispatch: # Allows manual triggering + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + name: Build MacOS Apps + runs-on: macos-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + cache: 'npm' + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Install Dependencies + run: | + rustup target add x86_64-apple-darwin + rustup target add aarch64-apple-darwin + npm install + + - name: Set up keychain + run: | + security create-keychain -p "" build.keychain + security default-keychain -s build.keychain + security unlock-keychain -p "" build.keychain + echo "$MACOS_CERTIFICATE" | base64 --decode > /tmp/certificate.p12 + security import /tmp/certificate.p12 -k build.keychain -P "$MACOS_CERTIFICATE_PASSWORD" -T /usr/bin/codesign + security set-key-partition-list -S apple-tool:,apple: -s -k "" build.keychain + env: + MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} + MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }} + + - name: Build Frontend + run: npm run build + + - name: Build for Intel Mac + run: | + echo "Building for Intel Mac..." + npm run tauri build -- --target x86_64-apple-darwin --bundles dmg + # Rename the Intel build + cd src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/ + for f in *.dmg; do mv "$f" "intel-$f"; done + env: + APPLE_ID: ${{ secrets.APPLE_ID }} + APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} + APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} + + - name: Build for Apple Silicon + run: | + echo "Building for aarch64..." + npm run tauri build -- --target aarch64-apple-darwin --bundles dmg + # Rename the Apple Silicon build + cd src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/ + for f in *.dmg; do mv "$f" "silicon-$f"; done + env: + APPLE_ID: ${{ secrets.APPLE_ID }} + APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} + APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} + + - name: Upload Intel Build + uses: actions/upload-artifact@v4 + with: + name: macos-intel-build + path: src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/*.dmg + + - name: Upload Apple Silicon Build + uses: actions/upload-artifact@v4 + with: + name: macos-apple-silicon-build + path: src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/*.dmg + + - name: Get version from package.json + id: version + run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT + + - name: Create Release + if: github.event_name == 'workflow_dispatch' + uses: softprops/action-gh-release@v1 + with: + name: "MacOS Nightly Build v${{ steps.version.outputs.version }}" + tag_name: "macos-nightly-${{ steps.version.outputs.version }}" + files: | + src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/*.dmg + src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/*.dmg + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/test-release.yml b/.github/workflows/test-release.yml new file mode 100644 index 0000000..c423f48 --- /dev/null +++ b/.github/workflows/test-release.yml @@ -0,0 +1,34 @@ +name: Test Release Build + +on: + workflow_dispatch: # Manual trigger + +jobs: + trigger-builds: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Trigger MacOS Build + uses: benc-uk/workflow-dispatch@v1 + with: + workflow: macos-nightly.yml + token: ${{ secrets.PAT_TOKEN }} + + - name: Trigger Windows Build + uses: benc-uk/workflow-dispatch@v1 + with: + workflow: windows-nightly.yml + token: ${{ secrets.PAT_TOKEN }} + + - name: Trigger Linux x86_64 Build + uses: benc-uk/workflow-dispatch@v1 + with: + workflow: linux-x86_64-nightly.yml + token: ${{ secrets.PAT_TOKEN }} + + - name: Trigger Linux ARM64 Build + uses: benc-uk/workflow-dispatch@v1 + with: + workflow: linux-aarch64-nightly.yml + token: ${{ secrets.PAT_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/windows-nightly.yml b/.github/workflows/windows-nightly.yml new file mode 100644 index 0000000..e950ad5 --- /dev/null +++ b/.github/workflows/windows-nightly.yml @@ -0,0 +1,64 @@ +name: Windows (x86_64) Nightly Build + +on: + workflow_dispatch: # Allows manual triggering + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + name: Build Windows Executable + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + cache: 'npm' + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Install WebView2 + run: | + $WebView2InstallPath = "$env:TEMP\MicrosoftEdgeWebview2Setup.exe" + Invoke-WebRequest "https://go.microsoft.com/fwlink/p/?LinkId=2124703" -OutFile $WebView2InstallPath + Start-Process -FilePath $WebView2InstallPath -Args "/silent /install" -Wait + + - name: Install Dependencies + run: | + npm install + + - name: Build Frontend + run: npm run build + + - name: Build Windows Executable + run: | + echo "Building Windows executable..." + npm run tauri build + + - name: Upload Executable + uses: actions/upload-artifact@v4 + with: + name: windows-exe + path: src-tauri/target/release/*.exe + + - name: Get version from package.json + id: version + shell: bash # Force using bash shell + run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT + + - name: Create Release + if: github.event_name == 'workflow_dispatch' + uses: softprops/action-gh-release@v1 + with: + name: "Windows Nightly Build v${{ steps.version.outputs.version }}" + tag_name: "windows-nightly-${{ steps.version.outputs.version }}" + files: src-tauri/target/release/*.exe + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} \ No newline at end of file diff --git a/build-universal.sh b/build-universal.sh deleted file mode 100755 index 9e9f73d..0000000 --- a/build-universal.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# source .env for notarization credentials -echo "Sourcing .env..." -if [ -f .env ]; then - source .env - # Verify that required environment variables are set - if [ -z "$APPLE_ID" ] || [ -z "$APPLE_PASSWORD" ] || [ -z "$APPLE_TEAM_ID" ]; then - echo "Error: Required environment variables are not set" - echo "Please ensure your .env file contains:" - echo "APPLE_ID=your.email@example.com" - echo "APPLE_PASSWORD=your-app-specific-password" - echo "APPLE_TEAM_ID=your-team-id" - exit 1 - fi - # Export the variables so they are available to child processes - export APPLE_ID - export APPLE_PASSWORD - export APPLE_TEAM_ID -else - echo "Error: .env file not found" - echo "Please create a .env file with the following variables:" - echo "APPLE_ID=your.email@example.com" - echo "APPLE_PASSWORD=your-app-specific-password" - echo "APPLE_TEAM_ID=your-team-id" - exit 1 -fi - -# Build frontend -npm run build - -# Build for Intel -echo "Building for x86_64..." -npm run tauri build -- --target x86_64-apple-darwin --bundles dmg - -# Build for Apple Silicon -echo "Building for aarch64..." -npm run tauri build -- --target aarch64-apple-darwin --bundles dmg - diff --git a/docs/index.html b/docs/index.html index 1ac5b66..996c032 100644 --- a/docs/index.html +++ b/docs/index.html @@ -127,39 +127,98 @@
-

Download

-

Choose the version that matches your system

-
@@ -327,6 +386,62 @@

+ \ No newline at end of file diff --git a/docs/styles.css b/docs/styles.css index 98ea960..1349533 100644 --- a/docs/styles.css +++ b/docs/styles.css @@ -348,28 +348,60 @@ section { /* Download Section */ .download-options { display: flex; - gap: 1rem; + gap: 1.5rem; justify-content: center; margin: 2rem 0; flex-wrap: wrap; + padding: 0 1rem; } .download-button { background: var(--primary-color); color: white; - padding: 1rem 2rem; + padding: 1rem 1.5rem; border-radius: 8px; text-decoration: none; display: flex; align-items: center; - gap: 0.5rem; + gap: 1rem; transition: all 0.2s; - position: relative; + min-width: 250px; +} + +.download-button .button-text { + display: flex; + flex-direction: column; + gap: 0.25rem; +} + +.download-button .primary { + font-weight: 600; + font-size: 1rem; +} + +.download-button .secondary { + font-size: 0.85rem; + opacity: 0.9; +} + +/* New styles for nested links */ +.download-button .secondary a { + color: inherit; + text-decoration: none; + padding: 2px 6px; + border-radius: 4px; + transition: all 0.2s; + display: inline-block; +} + +.download-button .secondary a:hover { + background-color: rgba(255, 255, 255, 0.2); + transform: translateY(-1px); } .download-button:hover { transform: translateY(-2px); - background: var(--secondary-color); + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); } .download-button .icon { @@ -1104,4 +1136,221 @@ footer { .hero-background { flex: 0 0 100%; } +} + +.download-button.windows { + background: #00a4ef; +} + +.download-button.windows:hover { + background: #0090d5; +} + +.download-button.linux { + background: #E95420; +} + +.download-button.linux:hover { + background: #C7431B; +} + +.download-options-group { + display: flex; + flex-direction: column; + gap: 0.25rem; +} + +.download-option { + display: flex; + align-items: center; + gap: 0.5rem; + font-size: 0.85rem; +} + +.download-option .format { + color: rgba(255, 255, 255, 0.8); + min-width: 65px; +} + +.download-option .separator { + color: rgba(255, 255, 255, 0.4); + font-size: 0.7rem; +} + +.download-option a { + color: inherit; + text-decoration: none; + padding: 2px 6px; + border-radius: 4px; + transition: all 0.2s; +} + +.download-option a:hover { + background-color: rgba(255, 255, 255, 0.2); + transform: translateY(-1px); +} + +.download-button.linux .secondary { + line-height: 1.6; + font-size: 0.85rem; +} + +.download-button.linux .secondary a { + color: inherit; + text-decoration: none; + padding: 2px 6px; + border-radius: 4px; + transition: all 0.2s; + white-space: nowrap; +} + +.download-button.linux .secondary a:hover { + background-color: rgba(255, 255, 255, 0.2); + transform: translateY(-1px); +} + +.download-button.linux .secondary .separator { + opacity: 0.7; + margin: 0 2px; +} + +.downloads { + padding: 2rem 0; +} + +.download-container { + max-width: 900px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +.download-container h2 { + font-size: 2.5rem; + margin-bottom: 1rem; + background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; +} + +.download-subtitle { + color: var(--text-secondary); + margin-bottom: 3rem; +} + +.download-options { + display: flex; + flex-direction: column; + gap: 2.5rem; +} + +.download-group { + display: flex; + flex-direction: column; + gap: 1rem; +} + +.platform-title { + font-size: 1.2rem; + color: var(--text-secondary); + text-align: left; + margin-bottom: 0.5rem; +} + +.platform-options { + display: flex; + gap: 1rem; + justify-content: center; +} + +.download-button { + background: var(--primary-color); + color: white; + padding: 1rem 1.5rem; + border-radius: 12px; + text-decoration: none; + display: flex; + align-items: center; + gap: 1rem; + transition: all 0.2s; + border: 1px solid transparent; + min-width: 250px; +} + +.download-button:hover { + transform: translateY(-2px); + background: var(--secondary-color); + box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2); +} + +.download-button .icon { + font-size: 1.5rem; +} + +.button-text { + display: flex; + flex-direction: column; + gap: 0.25rem; + text-align: left; +} + +.button-text .primary { + font-weight: 600; + font-size: 1rem; +} + +.button-text .secondary { + font-size: 0.85rem; + opacity: 0.9; +} + +.linux-options { + display: flex; + flex-direction: column; + gap: 1.5rem; +} + +.format-group { + display: flex; + flex-direction: column; + gap: 0.5rem; +} + +.format-label { + font-size: 0.9rem; + color: var(--text-secondary); + text-align: left; +} + +.format-buttons { + display: flex; + gap: 1rem; + justify-content: center; +} + +.format-buttons .download-button { + min-width: 150px; +} + +/* Dark mode adjustments */ +[data-theme="dark"] .download-button { + background: rgba(30, 41, 59, 0.8); + border-color: rgba(255, 255, 255, 0.1); +} + +[data-theme="dark"] .download-button:hover { + border-color: var(--primary-color); + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); +} + +.version-info { + text-align: center; + margin: 1rem 0; + font-size: 0.9rem; + color: var(--text-secondary); +} + +#current-version { + font-weight: 600; + color: var(--primary-color); } \ No newline at end of file diff --git a/package.json b/package.json index 7d66d1b..30cda44 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "macos-task-manager", - "version": "1.0.5", + "version": "1.0.7", "description": "", "type": "module", "scripts": { diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 2c9c275..9ee4e93 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -1608,7 +1608,7 @@ checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" [[package]] name = "macos-task-manager" -version = "1.0.5" +version = "1.0.7" dependencies = [ "serde", "serde_json", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 50b8914..db2b202 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "macos-task-manager" -version = "1.0.5" +version = "1.0.7" description = "A Tauri App" authors = ["you"] edition = "2021" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index f12258f..3c38462 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -28,7 +28,7 @@ }, "productName": "NeoHtop", "mainBinaryName": "NeoHtop", - "version": "1.0.5", + "version": "1.0.7", "identifier": "com.neohtop.dev", "plugins": {}, "app": { diff --git a/src/lib/components/AppInfo.svelte b/src/lib/components/AppInfo.svelte index 687403c..020ea52 100644 --- a/src/lib/components/AppInfo.svelte +++ b/src/lib/components/AppInfo.svelte @@ -32,16 +32,43 @@ "https://api.github.com/repos/abdenasser/neohtop/releases/latest", ); const data = await response.json(); - latestVersion = data.tag_name.replace("v", ""); - hasUpdate = version && latestVersion && version !== latestVersion; + + // Extract version number from tag (e.g., "1.0.6" from "macos-nightly-1.0.6") + const versionMatch = data.tag_name.match(/\d+\.\d+\.\d+/); + if (!versionMatch) { + console.warn( + "Unexpected version format in latest release:", + data.tag_name, + ); + return; + } + + latestVersion = versionMatch[0]; + + // Extract version number from current version + const currentVersionMatch = version.match(/\d+\.\d+\.\d+/); + if (!currentVersionMatch) { + console.warn("Unexpected current version format:", version); + return; + } + + // Compare only the version numbers + hasUpdate = currentVersionMatch[0] !== latestVersion; } catch (error) { console.error("Failed to check latest version:", error); + latestVersion = ""; + hasUpdate = false; } } onMount(async () => { - version = await getVersion(); - await checkLatestVersion(); + try { + version = await getVersion(); + await checkLatestVersion(); + } catch (error) { + console.error("Failed to initialize version info:", error); + version = ""; + } }); @@ -85,14 +112,13 @@ source :: + href={APP_INFO.github} + class="value" + target="_blank" + rel="noopener noreferrer" + > {APP_INFO.github} - - +
stack