Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 25f39ac41d | |||
| 4a3be94fef | |||
| 7f75a36d73 | |||
| ee5955fc75 | |||
| 8e831fd993 | |||
| 20018f09a9 | |||
| b1e8af7ec3 | |||
| 05a94c58f9 | |||
| eef6c68426 | |||
| b704e266d6 | |||
| 018571c950 | |||
| 1dd8a979ee | |||
| 70740e31e6 | |||
| 4980ca8f9f | |||
| 692e1da4b0 | |||
| 3c7a28ceb2 | |||
| 10da530e9e | |||
| f81235c68d | |||
| d7aedad9b4 | |||
| d176de6cb1 | |||
| 63abd5697f | |||
| 3f2275179b | |||
| de3150b74b | |||
| 6df912f428 | |||
| 74b152969b | |||
| e3e90d4779 | |||
| 1828191317 | |||
| de09cf4ebd | |||
| 14518978d2 | |||
| 29f1ff2d54 | |||
| cc2f790c62 | |||
| 0e6b235c1b | |||
| b09ef8a997 | |||
| c484a3c303 | |||
| b100967fda | |||
| 6ed9ee1109 | |||
| 31e36b2abc | |||
| 94e9a67f6e | |||
| d3ab472531 | |||
|
|
f02536ca49 |
1
.envrc
Normal file
|
|
@ -0,0 +1 @@
|
|||
use flake
|
||||
|
|
@ -5,74 +5,110 @@ on:
|
|||
paths-ignore:
|
||||
- flake.nix
|
||||
|
||||
env:
|
||||
NIX_CONFIG: experimental-features = nix-command flakes
|
||||
|
||||
jobs:
|
||||
build-web:
|
||||
runs-on: docker
|
||||
runs-on: nixos
|
||||
steps:
|
||||
- name: Install node
|
||||
run: nix profile add nixpkgs#nodejs_24
|
||||
|
||||
- name: Check out repo
|
||||
uses: https://data.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: Install Packages
|
||||
run: apt-get update && apt-get install -y sudo curl jq fakeroot dpkg rpm
|
||||
|
||||
- name: Install Nix
|
||||
uses: https://github.com/cachix/install-nix-action@v30
|
||||
|
||||
- name: Install Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install --frozen-lockfile
|
||||
run: nix develop .#electron --command bun install --frozen-lockfile
|
||||
|
||||
- name: Copy licenses
|
||||
run: bun run copy-licenses
|
||||
run: nix develop .#electron --command bun --bun run copy-licenses
|
||||
|
||||
- name: Build packages
|
||||
run: bun run build:packages
|
||||
run: nix develop .#electron --command bun --bun run build:packages
|
||||
|
||||
- name: Build web
|
||||
run: bun run build:web
|
||||
|
||||
- name: Install rsync
|
||||
run: apt-get update && apt-get install -y rsync
|
||||
run: nix develop .#electron --command bun --bun run build:web
|
||||
|
||||
- name: Deploy
|
||||
run: rsync -a --delete apps/web/dist/ /var/lib/www/tensamin-web-dev/
|
||||
run: nix develop .#electron --command rsync -a --delete apps/web/dist/ /var/lib/www/tensamin-web-dev/
|
||||
|
||||
build-mobile:
|
||||
runs-on: docker
|
||||
runs-on: nixos
|
||||
steps:
|
||||
- name: Install node
|
||||
run: nix profile add nixpkgs#nodejs_24
|
||||
|
||||
- name: Check out repo
|
||||
uses: https://data.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: Install Packages
|
||||
run: apt-get update && apt-get install -y sudo curl jq fakeroot dpkg rpm
|
||||
|
||||
- name: Install Nix
|
||||
uses: https://github.com/cachix/install-nix-action@v30
|
||||
|
||||
- name: Install Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install --frozen-lockfile
|
||||
run: nix develop .#tauri --command bun install --frozen-lockfile
|
||||
|
||||
- name: Copy licenses
|
||||
run: bun run copy-licenses
|
||||
run: nix develop .#tauri --command bun --bun run copy-licenses
|
||||
|
||||
- name: Build packages
|
||||
run: bun run build:packages
|
||||
run: nix develop .#tauri --command bun --bun run build:packages
|
||||
|
||||
- name: Setup Android Keystore
|
||||
env:
|
||||
KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
|
||||
KEYSTORE_PROPERTIES: ${{ secrets.ANDROID_KEYSTORE_PROPERTIES }}
|
||||
run: |
|
||||
bun -e "require('fs').writeFileSync('keystore.jks', Buffer.from(process.env.KEYSTORE_BASE64.replace(/\s+/g, ''), 'base64'))"
|
||||
bun -e "const content = process.env.KEYSTORE_PROPERTIES.replace(/\\n/g, '\n').replace(/\r/g, '').split('\n').map(l => l.trim()).filter(l => l).join('\n'); require('fs').writeFileSync('keystore.properties', content)"
|
||||
nix profile add nixpkgs#gnused
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if [ -z "$KEYSTORE_BASE64" ]; then
|
||||
echo "ANDROID_KEYSTORE_BASE64 secret is missing or empty"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$KEYSTORE_PROPERTIES" ]; then
|
||||
echo "ANDROID_KEYSTORE_PROPERTIES secret is missing or empty"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printf '%s' "$KEYSTORE_BASE64" \
|
||||
| tr -d '[:space:]' \
|
||||
| base64 -d > keystore.jks
|
||||
|
||||
printf '%s' "$KEYSTORE_PROPERTIES" \
|
||||
| sed 's/\\n/\n/g' \
|
||||
| tr -d '\r' \
|
||||
| sed 's|^[[:space:]]*storeFile[[:space:]]*=.*|storeFile=keystore.jks|' \
|
||||
> keystore.properties
|
||||
|
||||
grep -q '^[[:space:]]*storeFile[[:space:]]*=' keystore.properties || printf '\nstoreFile=keystore.jks\n' >> keystore.properties
|
||||
|
||||
if [ ! -s keystore.jks ]; then
|
||||
echo "Decoded keystore.jks is missing or empty"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -s keystore.properties ]; then
|
||||
echo "Generated keystore.properties is missing or empty"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! grep -q '^[[:space:]]*keyAlias[[:space:]]*=' keystore.properties; then
|
||||
echo "keystore.properties is missing keyAlias"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! grep -Eq '^[[:space:]]*(keyPassword|password)[[:space:]]*=' keystore.properties; then
|
||||
echo "keystore.properties is missing keyPassword or password"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! grep -Eq '^[[:space:]]*(storePassword|password)[[:space:]]*=' keystore.properties; then
|
||||
echo "keystore.properties is missing storePassword or password"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Build mobile
|
||||
run: bun run build:mobile
|
||||
run: nix develop .#tauri --command bun --bun run build:mobile
|
||||
|
||||
- name: Upload mobile artifact
|
||||
uses: https://data.forgejo.org/actions/upload-artifact@v3
|
||||
|
|
@ -81,31 +117,30 @@ jobs:
|
|||
path: apps/tauri/src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release.apk
|
||||
|
||||
build-desktop:
|
||||
runs-on: docker
|
||||
runs-on: nixos
|
||||
strategy:
|
||||
matrix:
|
||||
target: [linux]
|
||||
steps:
|
||||
- name: Install node
|
||||
run: nix profile add nixpkgs#nodejs_24
|
||||
|
||||
- name: Check out repo
|
||||
uses: https://data.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: Install Packages
|
||||
run: apt-get update && apt-get install -y sudo curl jq fakeroot dpkg rpm xz-utils
|
||||
|
||||
- name: Install Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install --frozen-lockfile
|
||||
run: nix develop .#electron --command bun install --frozen-lockfile
|
||||
|
||||
- name: Copy licenses
|
||||
run: bun run copy-licenses
|
||||
run: nix develop .#electron --command bun --bun run copy-licenses
|
||||
|
||||
- name: Build packages
|
||||
run: bun run build:packages
|
||||
run: nix develop .#electron --command bun --bun run build:packages
|
||||
|
||||
- name: Set Electron dev version
|
||||
run: |
|
||||
nix develop .#electron --command bash <<'EOF'
|
||||
set -euo pipefail
|
||||
VERSION="$(node -p "require('./package.json').version")"
|
||||
SHORT_SHA="$(git rev-parse --short HEAD)"
|
||||
DEV_VERSION="$VERSION-dev-$SHORT_SHA"
|
||||
|
|
@ -117,9 +152,10 @@ jobs:
|
|||
pkg.version = process.env.DEV_VERSION;
|
||||
fs.writeFileSync(path, JSON.stringify(pkg, null, 2) + "\n");
|
||||
'
|
||||
EOF
|
||||
|
||||
- name: Build Electron desktop
|
||||
run: bun run build:desktop
|
||||
run: nix develop .#electron --command bun --bun run build:desktop
|
||||
|
||||
- name: Upload desktop artifacts
|
||||
uses: https://data.forgejo.org/actions/upload-artifact@v3
|
||||
|
|
@ -128,22 +164,19 @@ jobs:
|
|||
path: apps/electron/release/
|
||||
|
||||
release:
|
||||
runs-on: docker
|
||||
runs-on: nixos
|
||||
needs: [build-web, build-mobile, build-desktop]
|
||||
steps:
|
||||
- name: Install node
|
||||
run: nix profile add nixpkgs#nodejs_24
|
||||
|
||||
- name: Check out repo
|
||||
uses: https://data.forgejo.org/actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Packages
|
||||
run: apt-get update && apt-get install -y sudo curl jq
|
||||
|
||||
- name: Install Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install --frozen-lockfile
|
||||
run: nix develop .#electron --command bun install --frozen-lockfile
|
||||
|
||||
- name: Download mobile artifact
|
||||
uses: https://data.forgejo.org/actions/download-artifact@v3
|
||||
|
|
@ -160,21 +193,27 @@ jobs:
|
|||
- name: Read version and hash
|
||||
id: version
|
||||
run: |
|
||||
nix develop .#electron --command bash <<'EOF'
|
||||
set -euo pipefail
|
||||
VERSION="$(node -p "require('./package.json').version")"
|
||||
SHORT_SHA="$(git rev-parse --short HEAD)"
|
||||
echo "version=$VERSION" >> "$FORGEJO_OUTPUT"
|
||||
echo "short_sha=$SHORT_SHA" >> "$FORGEJO_OUTPUT"
|
||||
echo "tag=${VERSION}-dev-${SHORT_SHA}" >> "$FORGEJO_OUTPUT"
|
||||
echo "title=${VERSION}-dev-${SHORT_SHA}" >> "$FORGEJO_OUTPUT"
|
||||
EOF
|
||||
|
||||
- name: Copy releases
|
||||
env:
|
||||
TENSAMIN_RELEASE_VERSION: ${{ steps.version.outputs.tag }}
|
||||
TENSAMIN_RELEASE_TAG: ${{ steps.version.outputs.tag }}
|
||||
run: |
|
||||
nix develop .#electron --command bash <<'EOF'
|
||||
set -euo pipefail
|
||||
ASSET_BASE_URL="${{ forgejo.api_url }}"
|
||||
ASSET_BASE_URL="${ASSET_BASE_URL%/api/v1}/${{ forgejo.repository }}/releases/download/${{ steps.version.outputs.tag }}"
|
||||
FORGEJO_RELEASE_ASSET_BASE_URL="$ASSET_BASE_URL" bun --bun run copy-releases
|
||||
EOF
|
||||
|
||||
- name: Create pre-release and upload files
|
||||
env:
|
||||
|
|
@ -185,6 +224,7 @@ jobs:
|
|||
TAG: ${{ steps.version.outputs.tag }}
|
||||
TITLE: ${{ steps.version.outputs.title }}
|
||||
run: |
|
||||
nix develop .#electron --command bash <<'EOF'
|
||||
set -eu
|
||||
|
||||
test -d releases
|
||||
|
|
@ -273,3 +313,4 @@ jobs:
|
|||
-H "Authorization: token $TOKEN" \
|
||||
-F "attachment=@$file"
|
||||
done
|
||||
EOF
|
||||
|
|
|
|||
|
|
@ -6,74 +6,110 @@ on:
|
|||
paths-ignore:
|
||||
- flake.nix
|
||||
|
||||
env:
|
||||
NIX_CONFIG: experimental-features = nix-command flakes
|
||||
|
||||
jobs:
|
||||
build-web:
|
||||
runs-on: docker
|
||||
runs-on: nixos
|
||||
steps:
|
||||
- name: Install node
|
||||
run: nix profile add nixpkgs#nodejs_24
|
||||
|
||||
- name: Check out repo
|
||||
uses: https://data.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: Install Packages
|
||||
run: apt-get update && apt-get install -y sudo curl jq fakeroot dpkg rpm
|
||||
|
||||
- name: Install Nix
|
||||
uses: https://github.com/cachix/install-nix-action@v30
|
||||
|
||||
- name: Install Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install --frozen-lockfile
|
||||
run: nix develop .#electron --command bun install --frozen-lockfile
|
||||
|
||||
- name: Copy licenses
|
||||
run: bun run copy-licenses
|
||||
run: nix develop .#electron --command bun --bun run copy-licenses
|
||||
|
||||
- name: Build packages
|
||||
run: bun run build:packages
|
||||
run: nix develop .#electron --command bun --bun run build:packages
|
||||
|
||||
- name: Build web
|
||||
run: bun run build:web
|
||||
|
||||
- name: Install rsync
|
||||
run: apt-get update && apt-get install -y rsync
|
||||
run: nix develop .#electron --command bun --bun run build:web
|
||||
|
||||
- name: Deploy
|
||||
run: rsync -a --delete apps/web/dist/ /var/lib/www/tensamin-web-prod/
|
||||
run: nix develop .#electron --command rsync -a --delete apps/web/dist/ /var/lib/www/tensamin-web-prod/
|
||||
|
||||
build-mobile:
|
||||
runs-on: docker
|
||||
runs-on: nixos
|
||||
steps:
|
||||
- name: Install node
|
||||
run: nix profile add nixpkgs#nodejs_24
|
||||
|
||||
- name: Check out repo
|
||||
uses: https://data.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: Install Packages
|
||||
run: apt-get update && apt-get install -y sudo curl jq fakeroot dpkg rpm
|
||||
|
||||
- name: Install Nix
|
||||
uses: https://github.com/cachix/install-nix-action@v30
|
||||
|
||||
- name: Install Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install --frozen-lockfile
|
||||
run: nix develop .#tauri --command bun install --frozen-lockfile
|
||||
|
||||
- name: Copy licenses
|
||||
run: bun run copy-licenses
|
||||
run: nix develop .#tauri --command bun --bun run copy-licenses
|
||||
|
||||
- name: Build packages
|
||||
run: bun run build:packages
|
||||
run: nix develop .#tauri --command bun --bun run build:packages
|
||||
|
||||
- name: Setup Android Keystore
|
||||
env:
|
||||
KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
|
||||
KEYSTORE_PROPERTIES: ${{ secrets.ANDROID_KEYSTORE_PROPERTIES }}
|
||||
run: |
|
||||
bun -e "require('fs').writeFileSync('keystore.jks', Buffer.from(process.env.KEYSTORE_BASE64.replace(/\s+/g, ''), 'base64'))"
|
||||
bun -e "const content = process.env.KEYSTORE_PROPERTIES.replace(/\\n/g, '\n').replace(/\r/g, '').split('\n').map(l => l.trim()).filter(l => l).join('\n'); require('fs').writeFileSync('keystore.properties', content)"
|
||||
nix profile add nixpkgs#gnused
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if [ -z "$KEYSTORE_BASE64" ]; then
|
||||
echo "ANDROID_KEYSTORE_BASE64 secret is missing or empty"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$KEYSTORE_PROPERTIES" ]; then
|
||||
echo "ANDROID_KEYSTORE_PROPERTIES secret is missing or empty"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printf '%s' "$KEYSTORE_BASE64" \
|
||||
| tr -d '[:space:]' \
|
||||
| base64 -d > keystore.jks
|
||||
|
||||
printf '%s' "$KEYSTORE_PROPERTIES" \
|
||||
| sed 's/\\n/\n/g' \
|
||||
| tr -d '\r' \
|
||||
| sed 's|^[[:space:]]*storeFile[[:space:]]*=.*|storeFile=keystore.jks|' \
|
||||
> keystore.properties
|
||||
|
||||
grep -q '^[[:space:]]*storeFile[[:space:]]*=' keystore.properties || printf '\nstoreFile=keystore.jks\n' >> keystore.properties
|
||||
|
||||
if [ ! -s keystore.jks ]; then
|
||||
echo "Decoded keystore.jks is missing or empty"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -s keystore.properties ]; then
|
||||
echo "Generated keystore.properties is missing or empty"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! grep -q '^[[:space:]]*keyAlias[[:space:]]*=' keystore.properties; then
|
||||
echo "keystore.properties is missing keyAlias"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! grep -Eq '^[[:space:]]*(keyPassword|password)[[:space:]]*=' keystore.properties; then
|
||||
echo "keystore.properties is missing keyPassword or password"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! grep -Eq '^[[:space:]]*(storePassword|password)[[:space:]]*=' keystore.properties; then
|
||||
echo "keystore.properties is missing storePassword or password"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Build mobile
|
||||
run: bun run build:mobile
|
||||
run: nix develop .#tauri --command bun --bun run build:mobile
|
||||
|
||||
- name: Upload mobile artifact
|
||||
uses: https://data.forgejo.org/actions/upload-artifact@v3
|
||||
|
|
@ -82,31 +118,30 @@ jobs:
|
|||
path: apps/tauri/src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release.apk
|
||||
|
||||
build-desktop:
|
||||
runs-on: docker
|
||||
runs-on: nixos
|
||||
strategy:
|
||||
matrix:
|
||||
target: [linux]
|
||||
steps:
|
||||
- name: Install node
|
||||
run: nix profile add nixpkgs#nodejs_24
|
||||
|
||||
- name: Check out repo
|
||||
uses: https://data.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: Install Packages
|
||||
run: apt-get update && apt-get install -y sudo curl jq fakeroot dpkg rpm xz-utils
|
||||
|
||||
- name: Install Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install --frozen-lockfile
|
||||
run: nix develop .#electron --command bun install --frozen-lockfile
|
||||
|
||||
- name: Copy licenses
|
||||
run: bun run copy-licenses
|
||||
run: nix develop .#electron --command bun --bun run copy-licenses
|
||||
|
||||
- name: Build packages
|
||||
run: bun run build:packages
|
||||
run: nix develop .#electron --command bun --bun run build:packages
|
||||
|
||||
- name: Set Electron prod version
|
||||
run: |
|
||||
nix develop .#electron --command bash <<'EOF'
|
||||
set -euo pipefail
|
||||
VERSION="$(node -p "require('./package.json').version")"
|
||||
export VERSION
|
||||
node -e '
|
||||
|
|
@ -116,9 +151,10 @@ jobs:
|
|||
pkg.version = process.env.VERSION;
|
||||
fs.writeFileSync(path, JSON.stringify(pkg, null, 2) + "\n");
|
||||
'
|
||||
EOF
|
||||
|
||||
- name: Build Electron desktop
|
||||
run: bun run build:desktop
|
||||
run: nix develop .#electron --command bun --bun run build:desktop
|
||||
|
||||
- name: Upload desktop artifacts
|
||||
uses: https://data.forgejo.org/actions/upload-artifact@v3
|
||||
|
|
@ -127,20 +163,17 @@ jobs:
|
|||
path: apps/electron/release/
|
||||
|
||||
release:
|
||||
runs-on: docker
|
||||
runs-on: nixos
|
||||
needs: [build-web, build-mobile, build-desktop]
|
||||
steps:
|
||||
- name: Install node
|
||||
run: nix profile add nixpkgs#nodejs_24
|
||||
|
||||
- name: Check out repo
|
||||
uses: https://data.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: Install Packages
|
||||
run: apt-get update && apt-get install -y sudo curl jq
|
||||
|
||||
- name: Install Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install --frozen-lockfile
|
||||
run: nix develop .#electron --command bun install --frozen-lockfile
|
||||
|
||||
- name: Download mobile artifact
|
||||
uses: https://data.forgejo.org/actions/download-artifact@v3
|
||||
|
|
@ -157,18 +190,24 @@ jobs:
|
|||
- name: Read version
|
||||
id: version
|
||||
run: |
|
||||
nix develop .#electron --command bash <<'EOF'
|
||||
set -euo pipefail
|
||||
VERSION="$(node -p "require('./package.json').version")"
|
||||
echo "version=$VERSION" >> "$FORGEJO_OUTPUT"
|
||||
echo "tag=$VERSION" >> "$FORGEJO_OUTPUT"
|
||||
EOF
|
||||
|
||||
- name: Copy releases
|
||||
env:
|
||||
TENSAMIN_RELEASE_VERSION: ${{ steps.version.outputs.tag }}
|
||||
TENSAMIN_RELEASE_TAG: ${{ steps.version.outputs.tag }}
|
||||
run: |
|
||||
nix develop .#electron --command bash <<'EOF'
|
||||
set -euo pipefail
|
||||
ASSET_BASE_URL="${{ forgejo.api_url }}"
|
||||
ASSET_BASE_URL="${ASSET_BASE_URL%/api/v1}/${{ forgejo.repository }}/releases/download/${{ steps.version.outputs.tag }}"
|
||||
FORGEJO_RELEASE_ASSET_BASE_URL="$ASSET_BASE_URL" bun --bun run copy-releases
|
||||
EOF
|
||||
|
||||
- name: Create release and upload files
|
||||
env:
|
||||
|
|
@ -178,6 +217,7 @@ jobs:
|
|||
SHA: ${{ forgejo.sha }}
|
||||
TAG: ${{ steps.version.outputs.tag }}
|
||||
run: |
|
||||
nix develop .#electron --command bash <<'EOF'
|
||||
set -eu
|
||||
|
||||
test -d releases
|
||||
|
|
@ -231,18 +271,18 @@ jobs:
|
|||
-H "Authorization: token $TOKEN" \
|
||||
-F "attachment=@$file"
|
||||
done
|
||||
EOF
|
||||
|
||||
- name: Delete dev releases for prod version
|
||||
- name: Delete dev releases
|
||||
env:
|
||||
TOKEN: ${{ forgejo.token }}
|
||||
API: ${{ forgejo.api_url }}
|
||||
REPO: ${{ forgejo.repository }}
|
||||
TAG: ${{ steps.version.outputs.tag }}
|
||||
run: |
|
||||
nix develop .#electron --command bash <<'EOF'
|
||||
set -eu
|
||||
|
||||
PAGE=1
|
||||
PREFIX="$TAG-dev-"
|
||||
DELETE_RELEASES=delete-dev-releases.tsv
|
||||
|
||||
: > "$DELETE_RELEASES"
|
||||
|
|
@ -257,8 +297,7 @@ jobs:
|
|||
test "$COUNT" -gt 0 || break
|
||||
|
||||
jq -r \
|
||||
--arg prefix "$PREFIX" \
|
||||
'.[] | select(.prerelease == true) | select(.tag_name | startswith($prefix)) | [.id, .tag_name] | @tsv' releases.json \
|
||||
'.[] | select(.prerelease == true) | select(.tag_name | contains("-dev-")) | [.id, .tag_name] | @tsv' releases.json \
|
||||
>> "$DELETE_RELEASES"
|
||||
|
||||
PAGE="$((PAGE + 1))"
|
||||
|
|
@ -271,11 +310,13 @@ jobs:
|
|||
-H "Authorization: token $TOKEN" \
|
||||
"$API/repos/$REPO/releases/$release_id"
|
||||
done < "$DELETE_RELEASES"
|
||||
EOF
|
||||
|
||||
- name: Update root flake release hash
|
||||
env:
|
||||
TAG: ${{ steps.version.outputs.tag }}
|
||||
run: |
|
||||
nix develop .#electron --command bash <<'EOF'
|
||||
set -eu
|
||||
|
||||
DEB="$(find releases -maxdepth 1 -type f -name 'Tensamin-*-linux-amd64.deb' -print -quit)"
|
||||
|
|
@ -324,3 +365,4 @@ jobs:
|
|||
git add flake.nix
|
||||
git -c user.name="forgejo-actions" -c user.email="forgejo-actions@localhost" commit -m "(qol): update release flake hash"
|
||||
git push origin HEAD:dev
|
||||
EOF
|
||||
|
|
|
|||
3
.gitignore
vendored
|
|
@ -1,3 +1,4 @@
|
|||
node_modules
|
||||
releases
|
||||
.fallow/
|
||||
.fallow
|
||||
.direnv
|
||||
|
|
|
|||
2
apps/electron/.gitignore
vendored
|
|
@ -1,2 +1,2 @@
|
|||
dist
|
||||
release
|
||||
release
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 41 KiB |
61
apps/electron/flake.lock
generated
|
|
@ -1,61 +0,0 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1779508470,
|
||||
"narHash": "sha256-Ap9KJX+5xHIn3bPIpfNgT6MEXdAECECwo4/rmlQD74M=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "29916453413845e54a65b8a1cf996842300cd299",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
{
|
||||
description = "Electron Development Environment";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = {nixpkgs, flake-utils, ...}:
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {inherit system; config.allowUnfree = true;};
|
||||
electronRuntimeLibs = with pkgs; [
|
||||
alsa-lib
|
||||
at-spi2-atk
|
||||
at-spi2-core
|
||||
atk
|
||||
cairo
|
||||
cups
|
||||
dbus
|
||||
expat
|
||||
fontconfig
|
||||
freetype
|
||||
gdk-pixbuf
|
||||
glib
|
||||
gtk3
|
||||
libdrm
|
||||
libgbm
|
||||
libglvnd
|
||||
libnotify
|
||||
libpulseaudio
|
||||
libuuid
|
||||
libxkbcommon
|
||||
mesa
|
||||
nspr
|
||||
nss
|
||||
pango
|
||||
pipewire
|
||||
systemd
|
||||
wayland
|
||||
# xorg
|
||||
libX11
|
||||
libXScrnSaver
|
||||
libXcomposite
|
||||
libXcursor
|
||||
libXdamage
|
||||
libXext
|
||||
libXfixes
|
||||
libXi
|
||||
libXrandr
|
||||
libXtst
|
||||
libxcb
|
||||
];
|
||||
in {
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
nodejs_22
|
||||
corepack_22
|
||||
bun
|
||||
electron
|
||||
pkg-config
|
||||
python3
|
||||
gcc
|
||||
gnumake
|
||||
git
|
||||
jq
|
||||
patchelf
|
||||
dpkg
|
||||
rpm
|
||||
fpm
|
||||
] ++ electronRuntimeLibs;
|
||||
|
||||
shellHook = ''
|
||||
export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath electronRuntimeLibs}:$LD_LIBRARY_PATH"
|
||||
export ELECTRON_ENABLE_LOGGING=1
|
||||
export ELECTRON_OZONE_PLATFORM_HINT="''${ELECTRON_OZONE_PLATFORM_HINT:-auto}"
|
||||
export NPM_CONFIG_TARGET_ARCH="''${NPM_CONFIG_TARGET_ARCH:-x64}"
|
||||
export npm_config_build_from_source=true
|
||||
export USE_SYSTEM_FPM=true
|
||||
|
||||
alias electron-install='cd ../.. && bun install'
|
||||
alias electron-build-web='cd ../.. && bun run build:web'
|
||||
alias electron-dev='bun run dev'
|
||||
alias electron-package='bun run package:linux'
|
||||
alias electron-validate='bun run validate'
|
||||
'';
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
@ -13,19 +13,19 @@
|
|||
"build:web": "cd ../.. && bun run build:web",
|
||||
"build": "tsc -p tsconfig.json && esbuild src/preload/preload.ts --bundle --platform=node --format=cjs --external:electron --outfile=dist/preload/preload.cjs",
|
||||
"dev:raw": "cd ../.. && bun run build:web && cd apps/electron && bun run build && electron . --verbose",
|
||||
"dev": "if command -v nix >/dev/null 2>&1 && [ -z \"$IN_NIX_SHELL\" ]; then nix develop --command bun run dev:raw; else bun run dev:raw; fi",
|
||||
"dev": "if command -v nix >/dev/null 2>&1 && [ -z \"$IN_NIX_SHELL\" ]; then nix develop ../..#electron --command bun run dev:raw; else bun run dev:raw; fi",
|
||||
"start:raw": "bun run build && electron .",
|
||||
"start": "if command -v nix >/dev/null 2>&1 && [ -z \"$IN_NIX_SHELL\" ]; then nix develop --command bun run start:raw; else bun run start:raw; fi",
|
||||
"start": "if command -v nix >/dev/null 2>&1 && [ -z \"$IN_NIX_SHELL\" ]; then nix develop ../..#electron --command bun run start:raw; else bun run start:raw; fi",
|
||||
"package:raw": "cd ../.. && bun run build:web && cd apps/electron && bun run build && electron-builder --publish never",
|
||||
"package": "if command -v nix >/dev/null 2>&1 && [ -z \"$IN_NIX_SHELL\" ]; then nix develop --command bun run package:raw; else bun run package:raw; fi",
|
||||
"package": "if command -v nix >/dev/null 2>&1 && [ -z \"$IN_NIX_SHELL\" ]; then nix develop ../..#electron --command bun run package:raw; else bun run package:raw; fi",
|
||||
"package:linux:raw": "cd ../.. && bun run build:web && cd apps/electron && bun run build && electron-builder --linux --publish never",
|
||||
"package:linux": "if command -v nix >/dev/null 2>&1 && [ -z \"$IN_NIX_SHELL\" ]; then nix develop --command bun run package:linux:raw; else bun run package:linux:raw; fi",
|
||||
"package:linux": "if command -v nix >/dev/null 2>&1 && [ -z \"$IN_NIX_SHELL\" ]; then nix develop ../..#electron --command bun run package:linux:raw; else bun run package:linux:raw; fi",
|
||||
"package:windows:raw": "cd ../.. && bun run build:web && cd apps/electron && bun run build && electron-builder --win --publish never",
|
||||
"package:windows": "if command -v nix >/dev/null 2>&1 && [ -z \"$IN_NIX_SHELL\" ]; then nix develop --command bun run package:windows:raw; else bun run package:windows:raw; fi",
|
||||
"package:windows": "if command -v nix >/dev/null 2>&1 && [ -z \"$IN_NIX_SHELL\" ]; then nix develop ../..#electron --command bun run package:windows:raw; else bun run package:windows:raw; fi",
|
||||
"checksum": "bun scripts/generate-release-metadata.ts",
|
||||
"generate-signing-key": "bun scripts/generate-signing-key.ts",
|
||||
"validate:raw": "bun run build && bun run package:linux:raw",
|
||||
"validate": "if command -v nix >/dev/null 2>&1 && [ -z \"$IN_NIX_SHELL\" ]; then nix develop --command bun run validate:raw; else bun run validate:raw; fi"
|
||||
"validate": "if command -v nix >/dev/null 2>&1 && [ -z \"$IN_NIX_SHELL\" ]; then nix develop ../..#electron --command bun run validate:raw; else bun run validate:raw; fi"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 52 KiB |
96
apps/tauri/flake.lock
generated
|
|
@ -1,96 +0,0 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1775036866,
|
||||
"narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6201e203d09599479a3b3450ed24fa81537ebc4e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1744536153,
|
||||
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"rust-overlay": "rust-overlay"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1775272153,
|
||||
"narHash": "sha256-FwYb64ysv8J2TxaqsYYcDyHAHBUEaQlriPMWPMi1K7M=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "740fb0203b2852917b909a72b948d34d0b171ec0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
|
|
@ -1,108 +0,0 @@
|
|||
{
|
||||
description = "Tauri mobile development environment";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
rust-overlay,
|
||||
flake-utils,
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system: let
|
||||
overlays = [(import rust-overlay)];
|
||||
pkgs = import nixpkgs {
|
||||
inherit system overlays;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
android_sdk.accept_license = true;
|
||||
};
|
||||
};
|
||||
|
||||
projectRoot = ".";
|
||||
androidHome = "${projectRoot}/.android";
|
||||
sdkRoot = "${androidHome}/sdk";
|
||||
ndkVersion = "29.0.14206865";
|
||||
|
||||
android = pkgs.androidenv.composeAndroidPackages {
|
||||
cmdLineToolsVersion = "8.0";
|
||||
toolsVersion = "26.1.1";
|
||||
platformToolsVersion = "35.0.2";
|
||||
buildToolsVersions = ["35.0.0"];
|
||||
platformVersions = ["35" "36"];
|
||||
includeSources = false;
|
||||
includeSystemImages = false;
|
||||
includeNDK = true;
|
||||
ndkVersions = [ndkVersion];
|
||||
useGoogleAPIs = false;
|
||||
};
|
||||
|
||||
rustToolchain = pkgs.rust-bin.stable.latest.default.override {
|
||||
extensions = ["rust-src" "rust-analyzer"];
|
||||
targets = [
|
||||
"aarch64-linux-android"
|
||||
"armv7-linux-androideabi"
|
||||
"i686-linux-android"
|
||||
"x86_64-linux-android"
|
||||
"wasm32-unknown-unknown"
|
||||
];
|
||||
};
|
||||
|
||||
in {
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = with pkgs;
|
||||
[
|
||||
jdk17
|
||||
rustToolchain
|
||||
gradle
|
||||
nodejs
|
||||
pkg-config
|
||||
]
|
||||
++ [
|
||||
android.androidsdk
|
||||
pkgs.android-studio-tools
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
sdkSource="${android.androidsdk}/libexec/android-sdk"
|
||||
|
||||
mkdir -p "${androidHome}"
|
||||
if [ -L "${sdkRoot}" ]; then
|
||||
rm -f "${sdkRoot}"
|
||||
fi
|
||||
mkdir -p "${sdkRoot}"
|
||||
|
||||
ln -sfn "$sdkSource/build-tools" "${sdkRoot}/build-tools"
|
||||
ln -sfn "$sdkSource/cmake" "${sdkRoot}/cmake"
|
||||
ln -sfn "$sdkSource/licenses" "${sdkRoot}/licenses"
|
||||
ln -sfn "$sdkSource/ndk" "${sdkRoot}/ndk"
|
||||
ln -sfn "$sdkSource/ndk-bundle" "${sdkRoot}/ndk-bundle"
|
||||
ln -sfn "$sdkSource/platforms" "${sdkRoot}/platforms"
|
||||
ln -sfn "$sdkSource/platform-tools" "${sdkRoot}/platform-tools"
|
||||
ln -sfn "$sdkSource/tools" "${sdkRoot}/tools"
|
||||
|
||||
mkdir -p "${sdkRoot}/cmdline-tools"
|
||||
ln -sfn "$sdkSource/cmdline-tools/8.0" "${sdkRoot}/cmdline-tools/8.0"
|
||||
ln -sfn "8.0" "${sdkRoot}/cmdline-tools/latest"
|
||||
|
||||
sdkRootAbs="$(realpath "${sdkRoot}")"
|
||||
ndkRootAbs="''${sdkRootAbs}/ndk/${ndkVersion}"
|
||||
|
||||
export PATH="''${sdkRootAbs}/cmdline-tools/latest/bin:''${sdkRootAbs}/platform-tools:''${ndkRootAbs}:${pkgs.android-studio-tools}/bin:$PATH"
|
||||
export ANDROID_HOME="''${sdkRootAbs}"
|
||||
export ANDROID_SDK_ROOT="''${sdkRootAbs}"
|
||||
export ANDROID_NDK_ROOT="''${ndkRootAbs}"
|
||||
export ANDROID_NDK_HOME="$ANDROID_NDK_ROOT"
|
||||
export NDK_HOME="$ANDROID_NDK_ROOT"
|
||||
export NDK_PATH="$ANDROID_NDK_ROOT"
|
||||
export JAVA_HOME="${pkgs.jdk17}"
|
||||
'';
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
@ -2,14 +2,14 @@
|
|||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="90mm"
|
||||
height="90mm"
|
||||
viewBox="0 0 90 90"
|
||||
width="90.476906mm"
|
||||
height="90.476906mm"
|
||||
viewBox="0 0 90.476906 90.476906"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
xml:space="preserve"
|
||||
inkscape:version="1.4.4 (dcaf3e7d9e, 2026-05-05)"
|
||||
sodipodi:docname="logo_raw.svg"
|
||||
sodipodi:docname="logo_square_outline_gen.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
|
|
@ -24,16 +24,32 @@
|
|||
inkscape:pagecheckerboard="1"
|
||||
inkscape:deskcolor="#505050"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:zoom="0.99999999"
|
||||
inkscape:cx="450"
|
||||
inkscape:cy="291.5"
|
||||
inkscape:window-width="1223"
|
||||
inkscape:window-height="1369"
|
||||
inkscape:window-x="26"
|
||||
inkscape:window-y="23"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:zoom="2"
|
||||
inkscape:cx="191.5"
|
||||
inkscape:cy="117.25"
|
||||
inkscape:window-width="2500"
|
||||
inkscape:window-height="1403"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1" /><defs
|
||||
id="defs1"><linearGradient
|
||||
id="defs1"><inkscape:path-effect
|
||||
effect="fillet_chamfer"
|
||||
id="path-effect1"
|
||||
is_visible="true"
|
||||
lpeversion="1"
|
||||
nodesatellites_param="F,0,0,1,0,0.26458333,0,1 @ F,0,0,1,0,0.26458333,0,1 @ F,0,0,1,0,0.26458333,0,1 @ F,0,0,1,0,0.26458333,0,1 @ F,0,0,1,0,0.26458333,0,1 @ F,0,0,1,0,0.26458333,0,1 @ F,0,0,1,0,0.26458333,0,1"
|
||||
radius="1"
|
||||
unit="px"
|
||||
method="auto"
|
||||
mode="F"
|
||||
chamfer_steps="1"
|
||||
flexible="false"
|
||||
use_knot_distance="true"
|
||||
apply_no_radius="true"
|
||||
apply_with_radius="true"
|
||||
only_selected="false"
|
||||
hide_knots="false" /><linearGradient
|
||||
id="swatch15"
|
||||
inkscape:swatch="solid"><stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
|
|
@ -51,7 +67,7 @@
|
|||
id="stop3" /></linearGradient><linearGradient
|
||||
id="swatch2"
|
||||
inkscape:swatch="solid"><stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
style="stop-color:#b8f8ff;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop2" /></linearGradient><linearGradient
|
||||
id="swatch1"
|
||||
|
|
@ -184,13 +200,23 @@
|
|||
x1="63.191292"
|
||||
y1="148.5"
|
||||
x2="146.82355"
|
||||
y2="148.5" /></defs><g
|
||||
y2="148.5" /><linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#swatch2"
|
||||
id="linearGradient1"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="63.191292"
|
||||
y1="148.5"
|
||||
x2="146.82355"
|
||||
y2="148.5"
|
||||
gradientTransform="matrix(1.0144629,0,0,1.0151924,217.46226,13.830072)" /></defs><g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-62.941767,-104.13688)"><g
|
||||
transform="translate(-281.06837,-119.33314)"
|
||||
><g
|
||||
id="g2"
|
||||
transform="matrix(0.78671048,0,0,0.83608014,-116.36038,-50.640745)"
|
||||
transform="matrix(0.77770172,0,0,0.82714179,104.17421,-33.291714)"
|
||||
inkscape:label="background"
|
||||
style="display:inline;stroke:url(#linearGradient15);stroke-width:0.616508;stroke-dasharray:none"
|
||||
clip-path="url(#clipPath1)"><path
|
||||
|
|
@ -213,11 +239,19 @@
|
|||
id="rect1-1-3-6-2"
|
||||
style="fill:#12a89e;stroke:url(#linearGradient21);stroke-width:0.616508;stroke-dasharray:none"
|
||||
transform="rotate(-75)"
|
||||
d="m -227.83395,371.18179 h 146.303341 v 24.39636 H -227.83395 Z" /></g><g
|
||||
d="m -227.83395,371.18179 h 146.303341 v 24.39636 H -227.83395 Z" /></g><path
|
||||
id="path1-5"
|
||||
style="fill:none;stroke:url(#linearGradient1);stroke-width:2;stroke-dasharray:none"
|
||||
inkscape:label="glow_outline"
|
||||
d="m 323.73413,119.91784 -40.80246,15.9513 c -0.13609,0.0532 -0.26542,0.21326 -0.28843,0.35757 -2.90631,18.22859 -0.19736,34.27444 8.28042,47.36302 0.0794,0.12264 0.10916,0.33484 0.0657,0.47436 l -7.08112,22.75509 a 0.11130973,0.11130973 40.101955 0 0 0.15695,0.13218 l 18.7652,-9.59506 c 0.13011,-0.0665 0.32608,-0.044 0.43816,0.0497 5.75202,4.81168 12.45464,8.67546 20.46583,11.84762 0.13586,0.0538 0.3564,0.0538 0.49225,-3e-5 32.16862,-12.74646 46.41741,-39.59704 41.09168,-73.02692 -0.023,-0.14431 -0.15232,-0.30436 -0.28841,-0.35757 l -40.80297,-15.9513 a 0.67679193,0.67679193 179.99988 0 0 -0.49284,0 z"
|
||||
sodipodi:nodetypes="cccccccc"
|
||||
inkscape:original-d="m 323.98055,119.8215 -41.2953,16.14398 c -2.99079,18.43973 -0.24934,34.65473 8.38277,47.84598 l -7.23836,23.26035 19.23635,-9.83596 c 5.85568,4.9403 12.69983,8.88741 20.91454,12.11489 32.42602,-12.73985 46.75142,-39.74883 41.29581,-73.38526 z"
|
||||
inkscape:path-effect="#path-effect1"
|
||||
transform="matrix(0.98854883,0,0,0.98930922,6.03231,1.7325084)" /><g
|
||||
id="g3"
|
||||
inkscape:label="foreground"
|
||||
style="stroke:url(#linearGradient16);stroke-width:0.5;stroke-dasharray:none"
|
||||
transform="translate(3.3653788,0.84760028)"><g
|
||||
transform="matrix(0.98854883,0,0,0.98930922,222.52896,17.64618)"><g
|
||||
id="g1"
|
||||
inkscape:label="outline"
|
||||
style="stroke:url(#linearGradient23);stroke-width:0.5;stroke-dasharray:none"><path
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 13 KiB |
|
|
@ -21,9 +21,9 @@
|
|||
"dev:mobile:raw": "tauri android dev --host ${TAURI_DEV_HOST:-127.0.0.1}",
|
||||
"start-adb:mobile:raw": "adb devices",
|
||||
"build:mobile:raw": "tauri android build",
|
||||
"dev:mobile": "if command -v nix >/dev/null 2>&1; then nix develop --command bun dev:mobile:raw; else bun dev:mobile:raw; fi",
|
||||
"start-adb:mobile": "if command -v nix >/dev/null 2>&1; then nix develop --command bun start-adb:mobile:raw; else bun start-adb:mobile:raw; fi",
|
||||
"build:mobile": "bun run render-version.ts && if command -v nix >/dev/null 2>&1; then nix develop --command bun build:mobile:raw; else bun build:mobile:raw; fi && bun run render-version.ts --unrender",
|
||||
"dev:mobile": "if command -v nix >/dev/null 2>&1; then nix develop ../..#tauri --command bun dev:mobile:raw; else bun dev:mobile:raw; fi",
|
||||
"start-adb:mobile": "if command -v nix >/dev/null 2>&1; then nix develop ../..#tauri --command bun start-adb:mobile:raw; else bun start-adb:mobile:raw; fi",
|
||||
"build:mobile": "bun run render-version.ts && if command -v nix >/dev/null 2>&1; then nix develop ../..#tauri --command bun build:mobile:raw; else bun build:mobile:raw; fi && bun run render-version.ts --unrender",
|
||||
"gen-icons": "tauri icon ./logo.json && bun scripts/sync-electron-icons.ts",
|
||||
"format": "bunx prettier --write .",
|
||||
"lint": "eslint src"
|
||||
|
|
|
|||
1266
apps/tauri/src-tauri/Cargo.lock
generated
|
|
@ -15,7 +15,7 @@ name = "mobile_lib"
|
|||
crate-type = ["staticlib", "cdylib", "rlib"]
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "2", features = [] }
|
||||
tauri-build = { git = "https://github.com/tauri-apps/tauri", branch = "feat/cef", features = [] }
|
||||
|
||||
[dependencies]
|
||||
tauri-plugin-opener = "2"
|
||||
|
|
@ -23,8 +23,6 @@ serde = { version = "1", features = ["derive"] }
|
|||
serde_json = "1"
|
||||
tauri-plugin-deep-link = "2"
|
||||
tauri-plugin-notification = "2"
|
||||
ttp-core = { git = "https://git.methanium.net/tensamin/ttp.git", package = "ttp-core" }
|
||||
ttp-tauri = { git = "https://git.methanium.net/tensamin/ttp.git", package = "ttp-tauri" }
|
||||
tauri-plugin-log = "2"
|
||||
|
||||
[target.'cfg(target_os = "android")'.dependencies.tauri]
|
||||
|
|
|
|||
|
|
@ -9,17 +9,9 @@
|
|||
"core:default",
|
||||
"opener:default",
|
||||
"core:window:default",
|
||||
"core:window:allow-start-dragging",
|
||||
"core:window:allow-close",
|
||||
"core:window:allow-toggle-maximize",
|
||||
"core:window:allow-minimize",
|
||||
"core:event:default",
|
||||
"deep-link:default",
|
||||
"notification:default",
|
||||
"log:default",
|
||||
"ttp-tauri:allow-connect",
|
||||
"ttp-tauri:allow-send",
|
||||
"ttp-tauri:allow-close",
|
||||
"ttp-tauri:allow-ready-state"
|
||||
"log:default"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,10 +14,6 @@
|
|||
"barcode-scanner:allow-scan",
|
||||
"barcode-scanner:allow-cancel",
|
||||
"notification:default",
|
||||
"log:default",
|
||||
"ttp-tauri:allow-connect",
|
||||
"ttp-tauri:allow-send",
|
||||
"ttp-tauri:allow-close",
|
||||
"ttp-tauri:allow-ready-state"
|
||||
"log:default"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 6 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 4 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 99 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 18 KiB |
|
|
@ -2,8 +2,7 @@
|
|||
pub fn run() {
|
||||
let builder = tauri::Builder::default()
|
||||
.plugin(tauri_plugin_log::Builder::new().level(tauri_plugin_log::log::LevelFilter::Info).build())
|
||||
.plugin(tauri_plugin_notification::init())
|
||||
.plugin(ttp_tauri::init());
|
||||
.plugin(tauri_plugin_notification::init());
|
||||
|
||||
let builder = builder
|
||||
.plugin(tauri_plugin_deep_link::init())
|
||||
|
|
|
|||
|
|
@ -12,9 +12,41 @@
|
|||
"preview": "cd dist && nix-shell -p python3 --run 'python3 -m http.server 3000' && cd .."
|
||||
},
|
||||
"dependencies": {
|
||||
"@base-ui/react": "^1.0.0",
|
||||
"@base-ui/utils": "0.3.1",
|
||||
"@babel/runtime": "^7.29.2",
|
||||
"@fontsource-variable/inter": "^5.2.8",
|
||||
"@fontsource-variable/public-sans": "^5.2.7",
|
||||
"@floating-ui/core": "^1.7.0",
|
||||
"@floating-ui/dom": "^1.7.0",
|
||||
"@floating-ui/react-dom": "^2.1.8",
|
||||
"@floating-ui/utils": "^0.2.11",
|
||||
"@radix-ui/primitive": "^1.1.0",
|
||||
"@radix-ui/react-compose-refs": "^1.1.1",
|
||||
"@radix-ui/react-context": "^1.1.4",
|
||||
"@radix-ui/react-dialog": "^1.1.6",
|
||||
"@radix-ui/react-dismissable-layer": "^1.1.11",
|
||||
"@radix-ui/react-focus-guards": "^1.1.4",
|
||||
"@radix-ui/react-focus-scope": "^1.1.11",
|
||||
"@radix-ui/react-id": "^1.1.0",
|
||||
"@radix-ui/react-portal": "^1.1.13",
|
||||
"@radix-ui/react-presence": "^1.1.6",
|
||||
"@radix-ui/react-primitive": "^2.0.2",
|
||||
"@radix-ui/react-slot": "^1.1.2",
|
||||
"@radix-ui/react-use-callback-ref": "^1.1.1",
|
||||
"@radix-ui/react-use-controllable-state": "^1.2.3",
|
||||
"@radix-ui/react-use-effect-event": "^0.0.2",
|
||||
"@radix-ui/react-use-layout-effect": "^1.1.0",
|
||||
"@reduxjs/toolkit": "^2.0.0",
|
||||
"@tailwindcss/vite": "^4.2.4",
|
||||
"@tanstack/devtools-event-client": "^0.3.0",
|
||||
"@tanstack/query-core": "^5.0.0",
|
||||
"@tanstack/react-router": "^1.169.1",
|
||||
"@tanstack/history": "1.162.0",
|
||||
"@tanstack/react-store": "^0.9.3",
|
||||
"@tanstack/router-core": "^1.169.1",
|
||||
"@tanstack/store": "^0.9.3",
|
||||
"@tanstack/virtual-core": "^3.13.24",
|
||||
"@tanstack/react-virtual": "^3.13.24",
|
||||
"@tauri-apps/api": "^2",
|
||||
"@tensamin/call": "workspace:*",
|
||||
|
|
@ -23,19 +55,75 @@
|
|||
"@tensamin/shared": "workspace:*",
|
||||
"@tensamin/storage": "workspace:*",
|
||||
"@tensamin/tauri": "workspace:*",
|
||||
"@tensamin/ttp": "workspace:*",
|
||||
"@tensamin/mtp": "workspace:*",
|
||||
"@tensamin/tauth": "workspace:*",
|
||||
"@tensamin/markdown": "workspace:*",
|
||||
"@tensamin/ui": "*",
|
||||
"@tensamin/user": "workspace:*",
|
||||
"@tensamin/notifications": "workspace:*",
|
||||
"aria-hidden": "^1.2.4",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
"cmdk": "^1.1.1",
|
||||
"cookie-es": "^3.0.0",
|
||||
"d3-array": "^3.1.6",
|
||||
"d3-color": "^3.1.0",
|
||||
"d3-ease": "^3.0.1",
|
||||
"d3-format": "^3.1.0",
|
||||
"d3-interpolate": "^3.0.1",
|
||||
"d3-path": "^3.0.1",
|
||||
"d3-scale": "^4.0.2",
|
||||
"d3-shape": "^3.1.0",
|
||||
"d3-time": "^3.0.0",
|
||||
"d3-time-format": "^4.1.0",
|
||||
"d3-timer": "^3.0.1",
|
||||
"date-fns": "^4.4.0",
|
||||
"decimal.js-light": "^2.5.1",
|
||||
"detect-node-es": "^1.1.0",
|
||||
"dijkstrajs": "^1.0.1",
|
||||
"embla-carousel": "8.6.0",
|
||||
"embla-carousel-react": "^8.6.0",
|
||||
"embla-carousel-reactive-utils": "8.6.0",
|
||||
"es-toolkit": "^1.39.3",
|
||||
"eventemitter3": "^5.0.1",
|
||||
"get-nonce": "^1.0.1",
|
||||
"immer": "^10.1.1",
|
||||
"input-otp": "^1.4.2",
|
||||
"internmap": "^2.0.3",
|
||||
"tw-animate-css": "^1.4.0",
|
||||
"lucide-react": "^1.14.0",
|
||||
"next-themes": "^0.4.6",
|
||||
"pngjs": "^5.0.0",
|
||||
"qrcode": "^1.5.4",
|
||||
"react": "^19.2.0",
|
||||
"react-day-picker": "^10.0.1",
|
||||
"react-dom": "^19.2.0",
|
||||
"react-is": "^19.0.0",
|
||||
"react-redux": "^9.0.0",
|
||||
"react-remove-scroll": "^2.7.2",
|
||||
"react-remove-scroll-bar": "^2.3.7",
|
||||
"react-resizable-panels": "^4.11.2",
|
||||
"react-style-singleton": "^2.2.3",
|
||||
"recharts": "3.8.1",
|
||||
"redux": "^5.0.0",
|
||||
"redux-thunk": "^3.1.0",
|
||||
"reselect": "5.1.1",
|
||||
"scheduler": "^0.27.0",
|
||||
"seroval": "^1.5.4",
|
||||
"seroval-plugins": "^1.5.4",
|
||||
"shadcn": "^4.11.0",
|
||||
"sonner": "^2.0.7",
|
||||
"tailwindcss": "^4.2.4",
|
||||
"tailwind-merge": "^3.6.0",
|
||||
"tailwind-scrollbar-hide": "^4.0.0",
|
||||
"tiny-invariant": "^1.3.3",
|
||||
"tslib": "^2.8.1",
|
||||
"use-callback-ref": "^1.3.3",
|
||||
"use-sidecar": "^1.1.3",
|
||||
"use-sync-external-store": "^1.2.2",
|
||||
"vaul": "^1.1.2",
|
||||
"victory-vendor": "^37.0.2",
|
||||
"yargs": "^15.3.1",
|
||||
"zod": "^4.3.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ export function Basic({
|
|||
extra?: React.ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<Card className="animate-in fade-in duration-300 rounded-2xl py-0 m-px">
|
||||
<Card className="animate-in fade-in duration-300 rounded-xl py-0 m-px">
|
||||
<CardHeader className="flex flex-row gap-2.5 items-center justify-start p-2">
|
||||
<div className="relative shrink-0 overflow-visible">
|
||||
<Avatar>
|
||||
|
|
@ -34,7 +34,7 @@ export function Basic({
|
|||
<div className="absolute -bottom-0.5 -right-0.5 z-10 flex h-3.5 w-3.5 items-center justify-center rounded-full bg-card">
|
||||
<div
|
||||
style={{
|
||||
backgroundColor: getStatusColor(user.online_status),
|
||||
backgroundColor: getStatusColor(user.OnlineStatus),
|
||||
}}
|
||||
className="h-2.25 w-2.25 rounded-full"
|
||||
/>
|
||||
|
|
@ -42,8 +42,7 @@ export function Basic({
|
|||
}
|
||||
/>
|
||||
<TooltipContent>
|
||||
{user.online_status
|
||||
.split("_")
|
||||
{user.OnlineStatus.split("_")
|
||||
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
|
||||
.join(" ")}
|
||||
</TooltipContent>
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ export default function Profile({ user }: { user: User }) {
|
|||
const ownData = await get(ownId);
|
||||
const secret = await getSharedSecret(
|
||||
privateKey,
|
||||
ownData.public_key,
|
||||
user.public_key,
|
||||
ownData.PublicKey,
|
||||
user.PublicKey,
|
||||
);
|
||||
|
||||
if (active) {
|
||||
|
|
@ -51,7 +51,7 @@ export default function Profile({ user }: { user: User }) {
|
|||
return () => {
|
||||
active = false;
|
||||
};
|
||||
}, [get, getSharedSecret, load, user.public_key]);
|
||||
}, [get, getSharedSecret, load, user.PublicKey]);
|
||||
|
||||
const sharedSecretCode = sharedSecret
|
||||
? toLossySixDigitCode(sharedSecret)
|
||||
|
|
@ -98,13 +98,13 @@ export default function Profile({ user }: { user: User }) {
|
|||
</Tooltip>
|
||||
</p>
|
||||
<p className="text-muted-foreground text-xs overflow-hidden text-ellipsis whitespace-nowrap">
|
||||
Iota ID: <code>{user.iota_id}</code>
|
||||
Iota ID: <code>{user.IotaId}</code>
|
||||
</p>
|
||||
<p className="text-muted-foreground text-xs overflow-hidden text-ellipsis whitespace-nowrap">
|
||||
User ID: <code>{user.user_id}</code>
|
||||
User ID: <code>{user.UserId}</code>
|
||||
</p>
|
||||
<p className="text-muted-foreground text-xs overflow-hidden text-ellipsis whitespace-nowrap">
|
||||
Public Key: <code>{user.public_key}</code>
|
||||
Public Key: <code>{user.PublicKey}</code>
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ export default function Navbar({ forMobile }: { forMobile: boolean }) {
|
|||
const { id } = useSearch({ strict: false });
|
||||
|
||||
const currentCalls = calls.filter((call) =>
|
||||
call.call_members.some((member) => member === id),
|
||||
call.CallMembers.some((member) => member === id),
|
||||
);
|
||||
|
||||
const isMobile = useIsMobile();
|
||||
|
|
@ -121,8 +121,8 @@ export default function Navbar({ forMobile }: { forMobile: boolean }) {
|
|||
onClick={() => {
|
||||
void joinCall(
|
||||
id,
|
||||
currentCalls[0].call_secret,
|
||||
currentCalls[0].call_id,
|
||||
currentCalls[0].CallSecret,
|
||||
currentCalls[0].CallId,
|
||||
);
|
||||
}}
|
||||
className="w-9 h-9 aspect-square rounded-lg"
|
||||
|
|
@ -147,13 +147,13 @@ export default function Navbar({ forMobile }: { forMobile: boolean }) {
|
|||
<SelectContent className="p-1">
|
||||
{currentCalls.map((call) => (
|
||||
<SelectItem
|
||||
value={call.call_id}
|
||||
key={call.call_id}
|
||||
value={call.CallId}
|
||||
key={call.CallId}
|
||||
onSelect={() => {
|
||||
void joinCall(id, call.call_secret, call.call_id);
|
||||
void joinCall(id, call.CallSecret, call.CallId);
|
||||
}}
|
||||
>
|
||||
{displayCallId(call.call_id)}
|
||||
{displayCallId(call.CallId)}
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ export default function Form() {
|
|||
await save("user_id", parsed.userId);
|
||||
await save("private_key", parsed.privateKey);
|
||||
if (parsed.domain) {
|
||||
await save("ttp_url", `https://${parsed.domain}/`);
|
||||
await save("mtp_url", `https://${parsed.domain}/`);
|
||||
}
|
||||
|
||||
location.href = "/";
|
||||
|
|
@ -253,7 +253,7 @@ export default function Form() {
|
|||
await save("user_id", user.user_id);
|
||||
await save("private_key", inputParse.data.private_key);
|
||||
if (domain) {
|
||||
await save("ttp_url", `https://${domain}/`);
|
||||
await save("mtp_url", `https://${domain}/`);
|
||||
}
|
||||
|
||||
location.href = "/";
|
||||
|
|
@ -287,7 +287,7 @@ export default function Form() {
|
|||
await save("private_key", privateKey);
|
||||
|
||||
if (domain) {
|
||||
await save("ttp_url", `https://${domain}/`);
|
||||
await save("mtp_url", `https://${domain}/`);
|
||||
}
|
||||
|
||||
location.href = "/";
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import {
|
|||
DropdownMenuContent,
|
||||
DropdownMenuItem,
|
||||
DropdownMenuGroup,
|
||||
DropdownMenuLabel,
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogFooter,
|
||||
|
|
@ -38,11 +37,11 @@ import { Ellipsis, Check } from "lucide-react";
|
|||
import { useState } from "react";
|
||||
import type { User } from "@tensamin/user/context";
|
||||
import type z from "zod";
|
||||
import { ttp } from "@tensamin/shared/data";
|
||||
import { useTTP } from "@tensamin/ttp";
|
||||
import { mtp } from "@tensamin/shared/data";
|
||||
import { useMTP } from "@tensamin/mtp";
|
||||
|
||||
type OnlineStatus = z.infer<
|
||||
typeof ttp.get_user_data.response.shape.online_status
|
||||
typeof mtp.get_user_data.response.shape.OnlineStatus
|
||||
>;
|
||||
|
||||
const onlineStatusLabels: Record<OnlineStatus, string> = {
|
||||
|
|
@ -74,7 +73,7 @@ function StatusDialog({
|
|||
user: User;
|
||||
open: boolean;
|
||||
onOpenChange: (open: boolean) => void;
|
||||
send: ReturnType<typeof useTTP>["send"];
|
||||
send: ReturnType<typeof useMTP>["send"];
|
||||
draftStatus: string;
|
||||
setDraftStatus: (value: string) => void;
|
||||
draftOnlineStatus: OnlineStatus;
|
||||
|
|
@ -90,7 +89,7 @@ function StatusDialog({
|
|||
onOpenChange={(nextOpen) => {
|
||||
if (!nextOpen) {
|
||||
setDraftStatus(user.status ?? "");
|
||||
setDraftOnlineStatus(user.online_status);
|
||||
setDraftOnlineStatus(user.OnlineStatus);
|
||||
setErrorMessage("");
|
||||
setSaveSucceeded(false);
|
||||
}
|
||||
|
|
@ -145,11 +144,11 @@ function StatusDialog({
|
|||
onClick={async () => {
|
||||
const payload = {
|
||||
...(draftStatus && { status: draftStatus }),
|
||||
online_status: draftOnlineStatus,
|
||||
OnlineStatus: draftOnlineStatus,
|
||||
};
|
||||
|
||||
const validation =
|
||||
ttp.change_user_data.request.safeParse(payload);
|
||||
mtp.change_user_data.request.safeParse(payload);
|
||||
|
||||
if (!validation.success) {
|
||||
setSaveSucceeded(false);
|
||||
|
|
@ -195,7 +194,7 @@ export default function Sidebar() {
|
|||
const [statusErrorMessage, setStatusErrorMessage] = useState("");
|
||||
const [statusSaveSucceeded, setStatusSaveSucceeded] = useState(false);
|
||||
|
||||
const { send } = useTTP();
|
||||
const { send } = useMTP();
|
||||
|
||||
const content = (
|
||||
<>
|
||||
|
|
@ -228,11 +227,10 @@ export default function Sidebar() {
|
|||
/>
|
||||
<DropdownMenuContent>
|
||||
<DropdownMenuGroup>
|
||||
<DropdownMenuLabel>Profile</DropdownMenuLabel>
|
||||
<DropdownMenuItem
|
||||
onClick={() => {
|
||||
setDraftStatus(user.status ?? "");
|
||||
setDraftOnlineStatus(user.online_status);
|
||||
setDraftOnlineStatus(user.OnlineStatus);
|
||||
setStatusErrorMessage("");
|
||||
setStatusSaveSucceeded(false);
|
||||
setDialogOpen(true);
|
||||
|
|
@ -251,7 +249,7 @@ export default function Sidebar() {
|
|||
onOpenChange={(nextOpen) => {
|
||||
if (!nextOpen) {
|
||||
setDraftStatus(user.status ?? "");
|
||||
setDraftOnlineStatus(user.online_status);
|
||||
setDraftOnlineStatus(user.OnlineStatus);
|
||||
setStatusErrorMessage("");
|
||||
setStatusSaveSucceeded(false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ export default function List() {
|
|||
{category === "conversations" ? (
|
||||
contacts?.[virtualItem.index] ? (
|
||||
<ConversationModal
|
||||
userId={contacts[virtualItem.index].user_id}
|
||||
userId={contacts[virtualItem.index].UserId}
|
||||
/>
|
||||
) : null
|
||||
) : communities?.[virtualItem.index] ? (
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@ export default function Switch(props: {
|
|||
return (
|
||||
<div
|
||||
role="tablist"
|
||||
className="border relative grid grid-cols-2 rounded-full bg-card p-1 select-none"
|
||||
className="border relative grid grid-cols-2 rounded-4xl bg-card p-1 select-none"
|
||||
>
|
||||
<div
|
||||
className="absolute top-1 bottom-1 rounded-full bg-input shadow-sm transition-all duration-300 ease-in-out"
|
||||
className="absolute top-1 bottom-1 rounded-4xl bg-input shadow-sm transition-all duration-300 ease-in-out"
|
||||
style={{
|
||||
left: props.category === "conversations" ? "0.25rem" : "50%",
|
||||
width: "calc(50% - 0.25rem)",
|
||||
|
|
@ -35,7 +35,7 @@ export default function Switch(props: {
|
|||
<button
|
||||
role="tab"
|
||||
aria-selected={props.category === "conversations"}
|
||||
className={`relative z-10 w-full cursor-pointer rounded-full px-2.5 py-1.5 text-center text-sm font-medium transition-colors duration-300 ${
|
||||
className={`relative z-10 w-full cursor-pointer rounded-4xl px-2.5 py-1.5 text-center text-sm font-medium transition-colors duration-300 ${
|
||||
props.category === "conversations"
|
||||
? "text-foreground"
|
||||
: "text-ring/50 hover:text-ring"
|
||||
|
|
@ -47,7 +47,7 @@ export default function Switch(props: {
|
|||
<button
|
||||
role="tab"
|
||||
aria-selected={props.category === "communities"}
|
||||
className={`relative z-10 w-full cursor-pointer rounded-full px-2.5 py-1.5 text-center text-sm font-medium transition-colors duration-300 ${
|
||||
className={`relative z-10 w-full cursor-pointer rounded-4xl px-2.5 py-1.5 text-center text-sm font-medium transition-colors duration-300 ${
|
||||
props.category === "communities"
|
||||
? "text-foreground"
|
||||
: "text-ring/50 hover:text-ring"
|
||||
|
|
|
|||
|
|
@ -22,6 +22,17 @@
|
|||
}
|
||||
}
|
||||
|
||||
@theme inline {
|
||||
--radius-sm: calc(var(--radius) * 0.6);
|
||||
--radius-md: calc(var(--radius) * 0.8);
|
||||
--radius-lg: var(--radius);
|
||||
--radius-xl: calc(var(--radius) * 1.4);
|
||||
--radius-2xl: calc(var(--radius) * 1.8);
|
||||
--radius-3xl: calc(var(--radius) * 2.2);
|
||||
--radius-4xl: calc(var(--radius) * 2.6);
|
||||
--radius-full: calc(var(--radius) * 9999);
|
||||
}
|
||||
|
||||
html,
|
||||
body,
|
||||
#root {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import Login from "@/routes/screens/login";
|
|||
import CallPopout from "@tensamin/call/popout";
|
||||
import ChatContext from "@tensamin/chat/context";
|
||||
import { useInitializeCall } from "@tensamin/call/store";
|
||||
import { Provider as TTPProvider } from "@tensamin/ttp";
|
||||
import { Provider as MTPProvider } from "@tensamin/mtp";
|
||||
import UserContext from "@tensamin/user/context";
|
||||
import DeeplinkContext from "@tensamin/tauri/deeplinkHandler";
|
||||
import NotificationsProvider from "@tensamin/notifications/context";
|
||||
|
|
@ -119,6 +119,10 @@ function ThemeStorageBridge() {
|
|||
setThemePolarity,
|
||||
themeTint,
|
||||
setThemeTint,
|
||||
themeBorderRadius,
|
||||
setThemeBorderRadius,
|
||||
themeCustomCss,
|
||||
setThemeCustomCss,
|
||||
} = useTheme();
|
||||
const loadedRef = useRef(false);
|
||||
|
||||
|
|
@ -131,25 +135,41 @@ function ThemeStorageBridge() {
|
|||
load("theme_primary_color"),
|
||||
load("theme_polarity"),
|
||||
load("theme_tint"),
|
||||
]).then(([color, palette, primaryColor, polarity, tint]) => {
|
||||
if (!active) {
|
||||
return;
|
||||
}
|
||||
load("theme_border_radius"),
|
||||
load("theme_custom_css"),
|
||||
]).then(
|
||||
([
|
||||
color,
|
||||
palette,
|
||||
primaryColor,
|
||||
polarity,
|
||||
tint,
|
||||
borderRadius,
|
||||
customCss,
|
||||
]) => {
|
||||
if (!active) {
|
||||
return;
|
||||
}
|
||||
|
||||
setThemeColor(color);
|
||||
setThemePalette(palette);
|
||||
setThemePrimaryColor(primaryColor);
|
||||
setThemePolarity(polarity);
|
||||
setThemeTint(tint);
|
||||
loadedRef.current = true;
|
||||
});
|
||||
setThemeColor(color);
|
||||
setThemePalette(palette);
|
||||
setThemePrimaryColor(primaryColor);
|
||||
setThemePolarity(polarity);
|
||||
setThemeTint(tint);
|
||||
setThemeBorderRadius(borderRadius);
|
||||
setThemeCustomCss(customCss);
|
||||
loadedRef.current = true;
|
||||
},
|
||||
);
|
||||
|
||||
return () => {
|
||||
active = false;
|
||||
};
|
||||
}, [
|
||||
load,
|
||||
setThemeBorderRadius,
|
||||
setThemeColor,
|
||||
setThemeCustomCss,
|
||||
setThemePalette,
|
||||
setThemePolarity,
|
||||
setThemePrimaryColor,
|
||||
|
|
@ -157,45 +177,33 @@ function ThemeStorageBridge() {
|
|||
]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!loadedRef.current) {
|
||||
return;
|
||||
}
|
||||
|
||||
save("theme_color", themeColor);
|
||||
if (loadedRef.current) save("theme_color", themeColor);
|
||||
}, [save, themeColor]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!loadedRef.current) {
|
||||
return;
|
||||
}
|
||||
|
||||
save("theme_palette", themePalette);
|
||||
if (loadedRef.current) save("theme_palette", themePalette);
|
||||
}, [save, themePalette]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!loadedRef.current) {
|
||||
return;
|
||||
}
|
||||
|
||||
save("theme_primary_color", themePrimaryColor);
|
||||
if (loadedRef.current) save("theme_primary_color", themePrimaryColor);
|
||||
}, [save, themePrimaryColor]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!loadedRef.current) {
|
||||
return;
|
||||
}
|
||||
|
||||
save("theme_polarity", themePolarity);
|
||||
if (loadedRef.current) save("theme_polarity", themePolarity);
|
||||
}, [save, themePolarity]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!loadedRef.current) {
|
||||
return;
|
||||
}
|
||||
|
||||
save("theme_tint", themeTint);
|
||||
if (loadedRef.current) save("theme_tint", themeTint);
|
||||
}, [save, themeTint]);
|
||||
|
||||
useEffect(() => {
|
||||
if (loadedRef.current) save("theme_border_radius", themeBorderRadius);
|
||||
}, [save, themeBorderRadius]);
|
||||
|
||||
useEffect(() => {
|
||||
if (loadedRef.current) save("theme_custom_css", themeCustomCss);
|
||||
}, [save, themeCustomCss]);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -210,6 +218,8 @@ function RootShell() {
|
|||
paletteStorageKey={null}
|
||||
primaryColorStorageKey={null}
|
||||
tintStorageKey={null}
|
||||
borderRadiusStorageKey={null}
|
||||
customCssStorageKey={null}
|
||||
>
|
||||
<div className="w-screen h-dvh overflow-hidden">
|
||||
<Toaster
|
||||
|
|
@ -244,7 +254,7 @@ function RootShell() {
|
|||
|
||||
function AppShell() {
|
||||
return (
|
||||
<TTPProvider>
|
||||
<MTPProvider>
|
||||
<Session>
|
||||
<UserContext>
|
||||
<CallInit />
|
||||
|
|
@ -260,12 +270,13 @@ function AppShell() {
|
|||
</TAuthWrapper>
|
||||
</UserContext>
|
||||
</Session>
|
||||
</TTPProvider>
|
||||
</MTPProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function CallInit() {
|
||||
return useInitializeCall();
|
||||
useInitializeCall();
|
||||
return null;
|
||||
}
|
||||
|
||||
const rootRoute = createRootRoute({
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import {
|
|||
useIsMobile,
|
||||
} from "@tensamin/ui";
|
||||
import z from "zod";
|
||||
import { useTTP } from "@tensamin/ttp";
|
||||
import { useMTP } from "@tensamin/mtp";
|
||||
import { useState } from "react";
|
||||
import { Loader2 } from "lucide-react";
|
||||
import { isTauri } from "@tauri-apps/api/core";
|
||||
|
|
@ -31,7 +31,7 @@ export default function Page() {
|
|||
|
||||
// Add Conversation Button Component
|
||||
function AddConversationButton() {
|
||||
const { send } = useTTP();
|
||||
const { send } = useMTP();
|
||||
const { contacts, insertContact } = useSession();
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [open, setOpen] = useState(false);
|
||||
|
|
@ -59,7 +59,7 @@ function AddConversationButton() {
|
|||
username: result.data,
|
||||
})
|
||||
.then((data) => {
|
||||
if (data.data.user_id === 0) {
|
||||
if (data.data.UserId === 0) {
|
||||
throw new Error();
|
||||
}
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ function AddConversationButton() {
|
|||
if (!user) return;
|
||||
|
||||
// alrady added check
|
||||
if (contacts.some((contact) => contact.user_id === user.data.user_id)) {
|
||||
if (contacts.some((contact) => contact.UserId === user.data.UserId)) {
|
||||
setError("Conversation already exists");
|
||||
return;
|
||||
}
|
||||
|
|
@ -81,10 +81,10 @@ function AddConversationButton() {
|
|||
const timeout = setTimeout(() => setLoading(true), 500);
|
||||
|
||||
send("add_conversation", {
|
||||
chat_partner_name: result.data,
|
||||
ChatPartnerName: result.data,
|
||||
})
|
||||
.then(() => {
|
||||
insertContact(user.data.user_id);
|
||||
insertContact(user.data.UserId);
|
||||
setOpen(false);
|
||||
})
|
||||
.catch((error) => {
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ import {
|
|||
import { useUser, type User } from "@tensamin/user/context";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import MDInput from "@tensamin/markdown/input";
|
||||
import { ttp } from "@tensamin/shared/data";
|
||||
import { useTTP } from "@tensamin/ttp";
|
||||
import { mtp } from "@tensamin/shared/data";
|
||||
import { useMTP } from "@tensamin/mtp";
|
||||
import { Check } from "lucide-react";
|
||||
|
||||
async function prepImage(
|
||||
|
|
@ -43,7 +43,7 @@ async function prepImage(
|
|||
export default function Page() {
|
||||
const { get } = useUser();
|
||||
const { load } = useStorage();
|
||||
const { send } = useTTP();
|
||||
const { send } = useMTP();
|
||||
const [currentUser, setCurrentUser] = useState<User | null>(null);
|
||||
const [draftUser, setDraftUser] = useState<Partial<User>>({});
|
||||
const [errorMessage, setErrorMessage] = useState("");
|
||||
|
|
@ -178,7 +178,7 @@ export default function Page() {
|
|||
: {}),
|
||||
};
|
||||
|
||||
const validation = ttp.change_user_data.request.safeParse(payload);
|
||||
const validation = mtp.change_user_data.request.safeParse(payload);
|
||||
|
||||
if (!validation.success) {
|
||||
setSaveSucceeded(false);
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ function QrCodeLogin() {
|
|||
setUserId(value);
|
||||
}
|
||||
});
|
||||
load("ttp_url")
|
||||
load("mtp_url")
|
||||
.then((value) => {
|
||||
if (value) {
|
||||
const url = new URL(value);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,20 @@
|
|||
import { StylePicker } from "@tensamin/ui";
|
||||
|
||||
export default function Page() {
|
||||
return <StylePicker />;
|
||||
return (
|
||||
<div className="overflow-y-auto">
|
||||
<StylePicker />
|
||||
<div className="absolute bottom-0 right-0 mb-3 mr-2">
|
||||
<a
|
||||
className="block w-60 text-xs whitespace-pre-wrap"
|
||||
href="https://git.methanium.net/tensamin/client/issues/new"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
Please open a Git issue to help us improve this feature. We want to
|
||||
get it right.
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import type { IncomingMessage, ServerResponse } from "node:http";
|
|||
import { dirname, resolve } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
import { defineConfig, type Plugin } from "vite";
|
||||
import { defineConfig, normalizePath, type Plugin } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import tailwindcss from "@tailwindcss/vite";
|
||||
import { mtp } from "mtp/vite";
|
||||
|
||||
const host = process.env.TAURI_DEV_HOST;
|
||||
const appDir = dirname(fileURLToPath(import.meta.url));
|
||||
|
|
@ -50,6 +51,38 @@ function deepFilterAssetHeaders(rootDir: string): Plugin {
|
|||
};
|
||||
}
|
||||
|
||||
function restartOnMtpSourceChange(srcDir: string): Plugin {
|
||||
const watchedDir = normalizePath(realpathSync(srcDir));
|
||||
|
||||
return {
|
||||
name: "restart-on-mtp-source-change",
|
||||
apply: "serve",
|
||||
configureServer(server) {
|
||||
server.watcher.add(watchedDir);
|
||||
let restartTimer: ReturnType<typeof setTimeout> | null = null;
|
||||
|
||||
const restart = (file: string) => {
|
||||
if (!normalizePath(file).startsWith(`${watchedDir}/`)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (restartTimer) {
|
||||
clearTimeout(restartTimer);
|
||||
}
|
||||
|
||||
restartTimer = setTimeout(() => {
|
||||
restartTimer = null;
|
||||
void server.restart();
|
||||
}, 50);
|
||||
};
|
||||
|
||||
server.watcher.on("add", restart);
|
||||
server.watcher.on("change", restart);
|
||||
server.watcher.on("unlink", restart);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export default defineConfig({
|
||||
base: "./",
|
||||
clearScreen: false,
|
||||
|
|
@ -74,6 +107,13 @@ export default defineConfig({
|
|||
},
|
||||
],
|
||||
dedupe: [
|
||||
"react",
|
||||
"react-dom",
|
||||
"react-redux",
|
||||
"use-sync-external-store",
|
||||
"@tensamin/crypto",
|
||||
"@tensamin/storage",
|
||||
"@tensamin/mtp",
|
||||
"@codemirror/commands",
|
||||
"@codemirror/lang-markdown",
|
||||
"@codemirror/state",
|
||||
|
|
@ -97,7 +137,36 @@ export default defineConfig({
|
|||
},
|
||||
envPrefix: ["VITE_", "TAURI_ENV_*"],
|
||||
optimizeDeps: {
|
||||
exclude: ["@tensamin/ttp-core"],
|
||||
include: [
|
||||
"react-redux",
|
||||
"use-sync-external-store/shim/with-selector",
|
||||
"use-sync-external-store/with-selector",
|
||||
"decimal.js-light",
|
||||
"eventemitter3",
|
||||
"react-is",
|
||||
],
|
||||
exclude: [
|
||||
"mtp",
|
||||
"mtp/raw",
|
||||
"mtp/type-map",
|
||||
"@tensamin/call",
|
||||
"@tensamin/call/utils",
|
||||
"@tensamin/chat",
|
||||
"@tensamin/crypto",
|
||||
"@tensamin/crypto/context",
|
||||
"@tensamin/crypto/worker",
|
||||
"@tensamin/markdown",
|
||||
"@tensamin/mtp",
|
||||
"@tensamin/notifications",
|
||||
"@tensamin/shared",
|
||||
"@tensamin/shared/data",
|
||||
"@tensamin/shared/log",
|
||||
"@tensamin/storage",
|
||||
"@tensamin/storage/context",
|
||||
"@tensamin/tauri",
|
||||
"@tensamin/tauth",
|
||||
"@tensamin/user",
|
||||
],
|
||||
},
|
||||
build: {
|
||||
minify: !process.env.TAURI_ENV_DEBUG ? "esbuild" : false,
|
||||
|
|
@ -105,6 +174,8 @@ export default defineConfig({
|
|||
},
|
||||
plugins: [
|
||||
deepFilterAssetHeaders(resolve(appDir, "public")),
|
||||
restartOnMtpSourceChange(resolve(appDir, "../../packages/mtp/src")),
|
||||
mtp({ typeMaps: resolve(appDir, "../../type-maps.yaml") }),
|
||||
react(),
|
||||
tailwindcss(),
|
||||
],
|
||||
|
|
|
|||
48
flake.lock
generated
|
|
@ -2,22 +2,58 @@
|
|||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1779508470,
|
||||
"narHash": "sha256-Ap9KJX+5xHIn3bPIpfNgT6MEXdAECECwo4/rmlQD74M=",
|
||||
"lastModified": 1782467914,
|
||||
"narHash": "sha256-pGvFkM8N0xEkIIXDe5YYfbEAvHrk4IxBrjB/x8OomhE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "29916453413845e54a65b8a1cf996842300cd299",
|
||||
"rev": "e73de5be04e0eff4190a1432b946d469c794e7b4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"type": "indirect"
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1744536153,
|
||||
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs",
|
||||
"rust-overlay": "rust-overlay"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1782616745,
|
||||
"narHash": "sha256-NN5B1cKBXF6h1Ec681gMGZ2o/99d7vKXAAfFNEvyOKA=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "b916d014dc57eb555f84e51172a82f7f6fb560d7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
243
flake.nix
|
|
@ -1,23 +1,39 @@
|
|||
{
|
||||
description = "Tensamin desktop client";
|
||||
description = "Tensamin Client";
|
||||
|
||||
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||
};
|
||||
|
||||
outputs = {nixpkgs, ...}: let
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
rust-overlay,
|
||||
...
|
||||
}: let
|
||||
systems = ["x86_64-linux"];
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
version = "0.0.9";
|
||||
x86_64DebHash = "sha256-8rVb12SGGSac6l1NVPGyRLsAKAGDAOJVUwG8l+hoRCU=";
|
||||
version = "0.0.10";
|
||||
x86_64DebHash = "sha256-VVKkZ9yQ7BoLnYnCf5OSHcrakoBNfUx/uWxBmm3gBZE=";
|
||||
forgejoBaseUrl = "https://git.methanium.net/tensamin/client/releases/download/${version}";
|
||||
in {
|
||||
packages = forAllSystems (system: let
|
||||
pkgs = import nixpkgs {inherit system;};
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [(import rust-overlay)];
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
android_sdk.accept_license = true;
|
||||
};
|
||||
};
|
||||
debArtifact = "Tensamin-${version}-linux-amd64.deb";
|
||||
|
||||
electronRuntimeLibs = with pkgs; [
|
||||
alsa-lib
|
||||
at-spi2-atk
|
||||
at-spi2-core
|
||||
atk
|
||||
cairo
|
||||
cups
|
||||
dbus
|
||||
|
|
@ -29,6 +45,7 @@
|
|||
gtk3
|
||||
libdrm
|
||||
libgbm
|
||||
libglvnd
|
||||
libnotify
|
||||
libpulseaudio
|
||||
libuuid
|
||||
|
|
@ -37,6 +54,7 @@
|
|||
nspr
|
||||
nss
|
||||
pango
|
||||
pipewire
|
||||
systemd
|
||||
wayland
|
||||
libX11
|
||||
|
|
@ -92,8 +110,221 @@
|
|||
url = "${forgejoBaseUrl}/${debArtifact}";
|
||||
hash = x86_64DebHash;
|
||||
});
|
||||
localDebPath = builtins.getEnv "TENSAMIN_DEB";
|
||||
localPathPackage =
|
||||
if localDebPath == ""
|
||||
then
|
||||
pkgs.writeShellScriptBin "tensamin" ''
|
||||
echo "Set TENSAMIN_DEB to a local .deb path and run with --impure." >&2
|
||||
exit 1
|
||||
''
|
||||
else
|
||||
packageDeb (builtins.path {
|
||||
path = localDebPath;
|
||||
name = debArtifact;
|
||||
});
|
||||
in {
|
||||
default = defaultPackage;
|
||||
tensamin = defaultPackage;
|
||||
electron = defaultPackage;
|
||||
localPathForDev = localPathPackage;
|
||||
});
|
||||
|
||||
devShells = forAllSystems (system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [(import rust-overlay)];
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
android_sdk.accept_license = true;
|
||||
};
|
||||
};
|
||||
|
||||
electronRuntimeLibs = with pkgs; [
|
||||
alsa-lib
|
||||
at-spi2-atk
|
||||
at-spi2-core
|
||||
atk
|
||||
cairo
|
||||
cups
|
||||
dbus
|
||||
expat
|
||||
fontconfig
|
||||
freetype
|
||||
gdk-pixbuf
|
||||
glib
|
||||
gtk3
|
||||
libdrm
|
||||
libgbm
|
||||
libglvnd
|
||||
libnotify
|
||||
libpulseaudio
|
||||
libuuid
|
||||
libxkbcommon
|
||||
mesa
|
||||
nspr
|
||||
nss
|
||||
pango
|
||||
pipewire
|
||||
systemd
|
||||
wayland
|
||||
libX11
|
||||
libXScrnSaver
|
||||
libXcomposite
|
||||
libXcursor
|
||||
libXdamage
|
||||
libXext
|
||||
libXfixes
|
||||
libXi
|
||||
libXrandr
|
||||
libXtst
|
||||
libxcb
|
||||
];
|
||||
|
||||
buildToolsVersion = "35.0.0";
|
||||
ndkVersion = "29.0.14206865";
|
||||
android = pkgs.androidenv.composeAndroidPackages {
|
||||
cmdLineToolsVersion = "8.0";
|
||||
toolsVersion = "26.1.1";
|
||||
platformToolsVersion = "35.0.2";
|
||||
buildToolsVersions = [buildToolsVersion];
|
||||
platformVersions = ["35" "36"];
|
||||
includeSources = false;
|
||||
includeSystemImages = false;
|
||||
includeNDK = true;
|
||||
ndkVersions = [ndkVersion];
|
||||
useGoogleAPIs = false;
|
||||
};
|
||||
rustToolchain = pkgs.rust-bin.stable.latest.default.override {
|
||||
extensions = ["rust-src" "rust-analyzer"];
|
||||
targets = [
|
||||
"aarch64-linux-android"
|
||||
"armv7-linux-androideabi"
|
||||
"i686-linux-android"
|
||||
"x86_64-linux-android"
|
||||
"wasm32-unknown-unknown"
|
||||
];
|
||||
};
|
||||
|
||||
commonDeps = [rustToolchain pkgs.wasm-pack pkgs.lld];
|
||||
in rec {
|
||||
default = electron;
|
||||
|
||||
electron = pkgs.mkShell {
|
||||
packages = with pkgs;
|
||||
[
|
||||
nodejs_22
|
||||
corepack_22
|
||||
coreutils
|
||||
bun
|
||||
pkgs.electron
|
||||
pkg-config
|
||||
python3
|
||||
gcc
|
||||
gnumake
|
||||
git
|
||||
jq
|
||||
patchelf
|
||||
dpkg
|
||||
rpm
|
||||
fpm
|
||||
sudo
|
||||
curl
|
||||
fakeroot
|
||||
rsync
|
||||
xz
|
||||
]
|
||||
++ electronRuntimeLibs ++ commonDeps;
|
||||
|
||||
shellHook = ''
|
||||
export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath electronRuntimeLibs}:$LD_LIBRARY_PATH"
|
||||
export ELECTRON_ENABLE_LOGGING=1
|
||||
export ELECTRON_OZONE_PLATFORM_HINT="''${ELECTRON_OZONE_PLATFORM_HINT:-auto}"
|
||||
export NPM_CONFIG_TARGET_ARCH="''${NPM_CONFIG_TARGET_ARCH:-x64}"
|
||||
export npm_config_build_from_source=true
|
||||
export USE_SYSTEM_FPM=true
|
||||
|
||||
alias electron-install='cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)" && bun install'
|
||||
alias electron-build-web='cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)" && bun run build:web'
|
||||
alias electron-dev='bun run dev'
|
||||
alias electron-package='bun run package:linux'
|
||||
alias electron-validate='bun run validate'
|
||||
'';
|
||||
};
|
||||
|
||||
tauri = pkgs.mkShell {
|
||||
buildInputs = with pkgs;
|
||||
[
|
||||
jdk17
|
||||
gradle
|
||||
bun
|
||||
nodejs
|
||||
coreutils
|
||||
pkg-config
|
||||
git
|
||||
jq
|
||||
curl
|
||||
]
|
||||
++ [
|
||||
android.androidsdk
|
||||
android-studio-tools
|
||||
]
|
||||
++ commonDeps;
|
||||
|
||||
shellHook = ''
|
||||
sdkSource="${android.androidsdk}/libexec/android-sdk"
|
||||
if [ -d apps/tauri/src-tauri ]; then
|
||||
projectRoot="$PWD/apps/tauri"
|
||||
else
|
||||
projectRoot="$PWD"
|
||||
fi
|
||||
androidHome="$projectRoot/.android"
|
||||
sdkRoot="$androidHome/sdk"
|
||||
|
||||
mkdir -p "$androidHome"
|
||||
if [ -L "$sdkRoot" ]; then
|
||||
rm -f "$sdkRoot"
|
||||
fi
|
||||
mkdir -p "$sdkRoot"
|
||||
|
||||
ln -sfn "$sdkSource/build-tools" "$sdkRoot/build-tools"
|
||||
ln -sfn "$sdkSource/cmake" "$sdkRoot/cmake"
|
||||
ln -sfn "$sdkSource/licenses" "$sdkRoot/licenses"
|
||||
ln -sfn "$sdkSource/ndk" "$sdkRoot/ndk"
|
||||
ln -sfn "$sdkSource/ndk-bundle" "$sdkRoot/ndk-bundle"
|
||||
ln -sfn "$sdkSource/platforms" "$sdkRoot/platforms"
|
||||
ln -sfn "$sdkSource/platform-tools" "$sdkRoot/platform-tools"
|
||||
ln -sfn "$sdkSource/tools" "$sdkRoot/tools"
|
||||
|
||||
mkdir -p "$sdkRoot/cmdline-tools"
|
||||
ln -sfn "$sdkSource/cmdline-tools/8.0" "$sdkRoot/cmdline-tools/8.0"
|
||||
ln -sfn "8.0" "$sdkRoot/cmdline-tools/latest"
|
||||
|
||||
sdkRootAbs="$(realpath "$sdkRoot")"
|
||||
ndkRootAbs="''${sdkRootAbs}/ndk/${ndkVersion}"
|
||||
|
||||
export PATH="''${sdkRootAbs}/cmdline-tools/latest/bin:''${sdkRootAbs}/platform-tools:''${ndkRootAbs}:${pkgs.android-studio-tools}/bin:$PATH"
|
||||
export ANDROID_HOME="''${sdkRootAbs}"
|
||||
export ANDROID_SDK_ROOT="''${sdkRootAbs}"
|
||||
export ANDROID_NDK_ROOT="''${ndkRootAbs}"
|
||||
export ANDROID_NDK_HOME="$ANDROID_NDK_ROOT"
|
||||
export NDK_HOME="$ANDROID_NDK_ROOT"
|
||||
export NDK_PATH="$ANDROID_NDK_ROOT"
|
||||
export JAVA_HOME="${pkgs.jdk17}"
|
||||
|
||||
aapt2Path="''${sdkRootAbs}/build-tools/${buildToolsVersion}/aapt2"
|
||||
if [ -x "$aapt2Path" ]; then
|
||||
mkdir -p "$HOME/.gradle"
|
||||
gradleProperties="$HOME/.gradle/gradle.properties"
|
||||
touch "$gradleProperties"
|
||||
if grep -q '^android\.aapt2FromMavenOverride=' "$gradleProperties"; then
|
||||
sed -i "s|^android\.aapt2FromMavenOverride=.*|android.aapt2FromMavenOverride=$aapt2Path|" "$gradleProperties"
|
||||
else
|
||||
printf '\nandroid.aapt2FromMavenOverride=%s\n' "$aapt2Path" >> "$gradleProperties"
|
||||
fi
|
||||
fi
|
||||
'';
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
|||
22
licenses/@babel_runtime@7.29.7/LICENSE
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
||||
|
||||
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.
|
||||
21
licenses/@base-ui_react@1.6.0/LICENSE
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2019 Material-UI SAS
|
||||
|
||||
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.
|
||||
21
licenses/@base-ui_utils@0.3.1/LICENSE
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2019 Material-UI SAS
|
||||
|
||||
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.
|
||||
20
licenses/@floating-ui_core@1.7.5/LICENSE
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2021-present Floating UI contributors
|
||||
|
||||
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.
|
||||