Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
15a7f10dec | ||
|
|
65a5d05713 | ||
|
|
8632ed9875 | ||
|
|
3af5970424 | ||
|
|
3c8fb8ac96 | ||
|
|
251ad63ea6 | ||
|
|
c7b713ac80 | ||
|
|
d4d4538630 | ||
|
|
d2677e64dd | ||
|
|
0ae108ca11 | ||
|
|
5236c1ccf6 | ||
|
|
72389f5872 |
@@ -13,6 +13,7 @@
|
||||
"reecebrowne",
|
||||
"DarioGii",
|
||||
"ConnorYoh",
|
||||
"EthanHealy01"
|
||||
"EthanHealy01",
|
||||
"balazs-szucs"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "gradle" # See documentation for possible values
|
||||
directories:
|
||||
directories:
|
||||
- "/" # Location of package manifests
|
||||
- "/app/common"
|
||||
- "/app/core"
|
||||
|
||||
+1
-1
@@ -200,4 +200,4 @@
|
||||
from_name: "tauri"
|
||||
- name: "license-review-required"
|
||||
color: "EDEDED"
|
||||
description: "This PR requires a license review"
|
||||
description: "This PR requires a license review"
|
||||
|
||||
@@ -271,7 +271,7 @@ jobs:
|
||||
- name: Set up SSH
|
||||
run: |
|
||||
mkdir -p ~/.ssh/
|
||||
echo "${{ secrets.VPS_SSH_KEY }}" > ../private.key
|
||||
echo "${{ secrets.NEW_VPS_SSH_KEY }}" > ../private.key
|
||||
sudo chmod 600 ../private.key
|
||||
|
||||
- name: Deploy V2 to VPS
|
||||
@@ -316,16 +316,16 @@ jobs:
|
||||
ports:
|
||||
- "${V2_PORT}:80" # Frontend port (same as regular PRs)
|
||||
environment:
|
||||
VITE_API_BASE_URL: "http://${{ secrets.VPS_HOST }}:${BACKEND_PORT}"
|
||||
VITE_API_BASE_URL: "http://${{ secrets.NEW_VPS_HOST }}:${BACKEND_PORT}"
|
||||
depends_on:
|
||||
- stirling-pdf-v2-backend
|
||||
restart: on-failure:5
|
||||
EOF
|
||||
|
||||
# Deploy to VPS
|
||||
scp -i ../private.key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null docker-compose.yml ${{ secrets.VPS_USERNAME }}@${{ secrets.VPS_HOST }}:/tmp/docker-compose-v2.yml
|
||||
scp -i ../private.key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null docker-compose.yml ${{ secrets.NEW_VPS_USERNAME }}@${{ secrets.NEW_VPS_HOST }}:/tmp/docker-compose-v2.yml
|
||||
|
||||
ssh -i ../private.key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -T ${{ secrets.VPS_USERNAME }}@${{ secrets.VPS_HOST }} << ENDSSH
|
||||
ssh -i ../private.key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -T ${{ secrets.NEW_VPS_USERNAME }}@${{ secrets.NEW_VPS_HOST }} << ENDSSH
|
||||
# Create V2 PR-specific directories
|
||||
mkdir -p /stirling/V2-PR-${{ needs.check-pr.outputs.pr_number }}/{data,config,logs}
|
||||
|
||||
@@ -375,7 +375,7 @@ jobs:
|
||||
}
|
||||
}
|
||||
|
||||
const deploymentUrl = `http://${{ secrets.VPS_HOST }}:${v2Port}`;
|
||||
const deploymentUrl = `http://${{ secrets.NEW_VPS_HOST }}:${v2Port}`;
|
||||
const httpsUrl = `https://${v2Port}.ssl.stirlingpdf.cloud`;
|
||||
|
||||
const commentBody = `## 🚀 V2 Auto-Deployment Complete!\n\n` +
|
||||
@@ -450,12 +450,12 @@ jobs:
|
||||
- name: Set up SSH
|
||||
run: |
|
||||
mkdir -p ~/.ssh/
|
||||
echo "${{ secrets.VPS_SSH_KEY }}" > ../private.key
|
||||
echo "${{ secrets.NEW_VPS_SSH_KEY }}" > ../private.key
|
||||
sudo chmod 600 ../private.key
|
||||
|
||||
- name: Cleanup V2 deployment
|
||||
run: |
|
||||
ssh -i ../private.key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -T ${{ secrets.VPS_USERNAME }}@${{ secrets.VPS_HOST }} << 'ENDSSH'
|
||||
ssh -i ../private.key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -T ${{ secrets.NEW_VPS_USERNAME }}@${{ secrets.NEW_VPS_HOST }} << 'ENDSSH'
|
||||
if [ -d "/stirling/V2-PR-${{ github.event.pull_request.number }}" ]; then
|
||||
echo "Found V2 PR directory, proceeding with cleanup..."
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@ jobs:
|
||||
- name: Set up SSH
|
||||
run: |
|
||||
mkdir -p ~/.ssh/
|
||||
echo "${{ secrets.VPS_SSH_KEY }}" > ../private.key
|
||||
echo "${{ secrets.NEW_VPS_SSH_KEY }}" > ../private.key
|
||||
sudo chmod 600 ../private.key
|
||||
|
||||
- name: Deploy to VPS
|
||||
@@ -252,9 +252,9 @@ jobs:
|
||||
EOF
|
||||
|
||||
# Then copy the file and execute commands
|
||||
scp -i ../private.key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null docker-compose.yml ${{ secrets.VPS_USERNAME }}@${{ secrets.VPS_HOST }}:/tmp/docker-compose.yml
|
||||
scp -i ../private.key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null docker-compose.yml ${{ secrets.NEW_VPS_USERNAME }}@${{ secrets.NEW_VPS_HOST }}:/tmp/docker-compose.yml
|
||||
|
||||
ssh -i ../private.key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -T ${{ secrets.VPS_USERNAME }}@${{ secrets.VPS_HOST }} << ENDSSH
|
||||
ssh -i ../private.key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -T ${{ secrets.NEW_VPS_USERNAME }}@${{ secrets.NEW_VPS_HOST }} << ENDSSH
|
||||
# Create PR-specific directories
|
||||
mkdir -p /stirling/PR-${{ needs.check-comment.outputs.pr_number }}/{data,config,logs}
|
||||
|
||||
@@ -336,7 +336,7 @@ jobs:
|
||||
const prNumber = ${{ needs.check-comment.outputs.pr_number }};
|
||||
const securityStatus = process.env.security_status || "Security Disabled";
|
||||
|
||||
const deploymentUrl = `http://${{ secrets.VPS_HOST }}:${prNumber}`;
|
||||
const deploymentUrl = `http://${{ secrets.NEW_VPS_HOST }}:${prNumber}`;
|
||||
const commentBody = `## 🚀 PR Test Deployment\n\n` +
|
||||
`Your PR has been deployed for testing!\n\n` +
|
||||
`🔗 **Test URL:** [${deploymentUrl}](${deploymentUrl})\n` +
|
||||
|
||||
@@ -8,7 +8,7 @@ permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
SERVER_IP: ${{ secrets.VPS_IP }} # Add this to your GitHub secrets
|
||||
SERVER_IP: ${{ secrets.NEW_VPS_IP }} # Add this to your GitHub secrets
|
||||
CLEANUP_PERFORMED: "false" # Add flag to track if cleanup occurred
|
||||
|
||||
jobs:
|
||||
@@ -100,14 +100,14 @@ jobs:
|
||||
if: steps.remove-label-comment.outputs.present == 'true'
|
||||
run: |
|
||||
mkdir -p ~/.ssh/
|
||||
echo "${{ secrets.VPS_SSH_KEY }}" > ../private.key
|
||||
echo "${{ secrets.NEW_VPS_SSH_KEY }}" > ../private.key
|
||||
sudo chmod 600 ../private.key
|
||||
|
||||
- name: Cleanup PR deployment
|
||||
if: steps.remove-label-comment.outputs.present == 'true'
|
||||
id: cleanup
|
||||
run: |
|
||||
ssh -i ../private.key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -T ${{ secrets.VPS_USERNAME }}@${{ secrets.VPS_HOST }} << 'ENDSSH'
|
||||
ssh -i ../private.key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -T ${{ secrets.NEW_VPS_USERNAME }}@${{ secrets.NEW_VPS_HOST }} << 'ENDSSH'
|
||||
if [ -d "/stirling/PR-${{ github.event.pull_request.number }}" ]; then
|
||||
echo "Found PR directory, proceeding with cleanup..."
|
||||
|
||||
|
||||
@@ -97,6 +97,7 @@ jobs:
|
||||
with:
|
||||
name: test-reports-jdk-${{ matrix.jdk-version }}-spring-security-${{ matrix.spring-security }}
|
||||
path: |
|
||||
app/**/build/reports/jacoco/test
|
||||
app/**/build/reports/tests/
|
||||
app/**/build/test-results/
|
||||
app/**/build/reports/problems/
|
||||
@@ -104,6 +105,17 @@ jobs:
|
||||
retention-days: 3
|
||||
if-no-files-found: warn
|
||||
|
||||
- name: Add coverage to PR with spring security ${{ matrix.spring-security }} and JDK ${{ matrix.jdk-version }}
|
||||
id: jacoco
|
||||
uses: madrapps/jacoco-report@50d3aff4548aa991e6753342d9ba291084e63848 # v1.7.2
|
||||
with:
|
||||
paths: |
|
||||
${{ github.workspace }}/**/build/reports/jacoco/test/jacocoTestReport.xml
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
min-coverage-overall: 10
|
||||
min-coverage-changed-files: 0
|
||||
comment-type: summary
|
||||
|
||||
check-generateOpenApiDocs:
|
||||
if: needs.files-changed.outputs.openapi == 'true'
|
||||
needs: [files-changed]
|
||||
|
||||
@@ -119,7 +119,7 @@ jobs:
|
||||
- name: Set up SSH
|
||||
run: |
|
||||
mkdir -p ~/.ssh/
|
||||
echo "${{ secrets.VPS_SSH_KEY }}" > ../private.key
|
||||
echo "${{ secrets.NEW_VPS_SSH_KEY }}" > ../private.key
|
||||
chmod 600 ../private.key
|
||||
|
||||
- name: Deploy to VPS on port 3000
|
||||
@@ -158,17 +158,17 @@ jobs:
|
||||
ports:
|
||||
- "3000:80"
|
||||
environment:
|
||||
VITE_API_BASE_URL: "http://${{ secrets.VPS_HOST }}:13000"
|
||||
VITE_API_BASE_URL: "http://${{ secrets.NEW_VPS_HOST }}:13000"
|
||||
depends_on:
|
||||
- backend
|
||||
restart: on-failure:5
|
||||
EOF
|
||||
|
||||
# Copy to remote with unique name
|
||||
scp -i ../private.key -o StrictHostKeyChecking=no $UNIQUE_NAME ${{ secrets.VPS_USERNAME }}@${{ secrets.VPS_HOST }}:/tmp/$UNIQUE_NAME
|
||||
scp -i ../private.key -o StrictHostKeyChecking=no $UNIQUE_NAME ${{ secrets.NEW_VPS_USERNAME }}@${{ secrets.NEW_VPS_HOST }}:/tmp/$UNIQUE_NAME
|
||||
|
||||
# SSH and rename/move atomically to avoid interference
|
||||
ssh -i ../private.key -o StrictHostKeyChecking=no ${{ secrets.VPS_USERNAME }}@${{ secrets.VPS_HOST }} << ENDSSH
|
||||
ssh -i ../private.key -o StrictHostKeyChecking=no ${{ secrets.NEW_VPS_USERNAME }}@${{ secrets.NEW_VPS_HOST }} << ENDSSH
|
||||
mkdir -p /stirling/V2/{data,config,logs}
|
||||
mv /tmp/$UNIQUE_NAME /stirling/V2/docker-compose.yml
|
||||
cd /stirling/V2
|
||||
|
||||
@@ -26,18 +26,6 @@ on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
# cancel in-progress jobs if a new job is triggered
|
||||
# This is useful to avoid running multiple builds for the same branch if a new commit is pushed
|
||||
# or a pull request is updated.
|
||||
# It helps to save resources and time by ensuring that only the latest commit is built and tested
|
||||
# This is particularly useful for long-running jobs that may take a while to complete.
|
||||
# The `group` is set to a combination of the workflow name, event name, and branch name.
|
||||
# This ensures that jobs are grouped by the workflow and branch, allowing for cancellation of
|
||||
# in-progress jobs when a new commit is pushed to the same branch or a new pull request is opened.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref_name || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
@@ -87,15 +75,15 @@ jobs:
|
||||
echo 'matrix={"include":[{"platform":"macos-15","args":"--target aarch64-apple-darwin","name":"macos-aarch64"},{"platform":"macos-15-intel","args":"--target x86_64-apple-darwin","name":"macos-x86_64"}]}' >> $GITHUB_OUTPUT
|
||||
;;
|
||||
"linux")
|
||||
echo 'matrix={"include":[{"platform":"ubuntu-22.04","args":"--target x86_64-unknown-linux-gnu -b appimage","name":"linux-x86_64-appimage"},{"platform":"ubuntu-22.04","args":"--target x86_64-unknown-linux-gnu -b deb","name":"linux-x86_64-deb"},{"platform":"ubuntu-22.04","args":"--target x86_64-unknown-linux-gnu -b rpm","name":"linux-x86_64-rpm"}]}' >> $GITHUB_OUTPUT
|
||||
echo 'matrix={"include":[{"platform":"ubuntu-22.04","args":"","name":"linux-x86_64"}]}' >> $GITHUB_OUTPUT
|
||||
;;
|
||||
*)
|
||||
echo 'matrix={"include":[{"platform":"windows-latest","args":"--target x86_64-pc-windows-msvc","name":"windows-x86_64"},{"platform":"macos-15","args":"--target aarch64-apple-darwin","name":"macos-aarch64"},{"platform":"macos-15-intel","args":"--target x86_64-apple-darwin","name":"macos-x86_64"},{"platform":"ubuntu-22.04","args":"--target x86_64-unknown-linux-gnu -b appimage","name":"linux-x86_64-appimage"},{"platform":"ubuntu-22.04","args":"--target x86_64-unknown-linux-gnu -b deb","name":"linux-x86_64-deb"},{"platform":"ubuntu-22.04","args":"--target x86_64-unknown-linux-gnu -b rpm","name":"linux-x86_64-rpm"}]}' >> $GITHUB_OUTPUT
|
||||
echo 'matrix={"include":[{"platform":"windows-latest","args":"--target x86_64-pc-windows-msvc","name":"windows-x86_64"},{"platform":"macos-15","args":"--target aarch64-apple-darwin","name":"macos-aarch64"},{"platform":"macos-15-intel","args":"--target x86_64-apple-darwin","name":"macos-x86_64"},{"platform":"ubuntu-22.04","args":"","name":"linux-x86_64"}]}' >> $GITHUB_OUTPUT
|
||||
;;
|
||||
esac
|
||||
else
|
||||
# For push/release events, build all platforms
|
||||
echo 'matrix={"include":[{"platform":"windows-latest","args":"--target x86_64-pc-windows-msvc","name":"windows-x86_64"},{"platform":"macos-15","args":"--target aarch64-apple-darwin","name":"macos-aarch64"},{"platform":"macos-15-intel","args":"--target x86_64-apple-darwin","name":"macos-x86_64"},{"platform":"ubuntu-22.04","args":"--target x86_64-unknown-linux-gnu -b appimage","name":"linux-x86_64-appimage"},{"platform":"ubuntu-22.04","args":"--target x86_64-unknown-linux-gnu -b deb","name":"linux-x86_64-deb"},{"platform":"ubuntu-22.04","args":"--target x86_64-unknown-linux-gnu -b rpm","name":"linux-x86_64-rpm"}]}' >> $GITHUB_OUTPUT
|
||||
echo 'matrix={"include":[{"platform":"windows-latest","args":"--target x86_64-pc-windows-msvc","name":"windows-x86_64"},{"platform":"macos-15","args":"--target aarch64-apple-darwin","name":"macos-aarch64"},{"platform":"macos-15-intel","args":"--target x86_64-apple-darwin","name":"macos-x86_64"},{"platform":"ubuntu-22.04","args":"","name":"linux-x86_64"}]}' >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
build-jars:
|
||||
@@ -182,60 +170,10 @@ jobs:
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: Install dependencies (ubuntu only)
|
||||
if: matrix.platform == 'ubuntu-22.04' && matrix.name != 'linux-x86_64-appimage'
|
||||
if: matrix.platform == 'ubuntu-22.04'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
# Dependencies explanation:
|
||||
# - libwebkit2gtk-4.1-dev: WebKit engine for Tauri v2 (4.0 was for v1)
|
||||
# - libappindicator3-dev: System tray support
|
||||
# - librsvg2-dev: SVG rendering
|
||||
# - patchelf: Required for AppImage packaging
|
||||
# - libxdo-dev: Keyboard/mouse automation
|
||||
# - libasound2-dev: Audio support
|
||||
# - libopenblas-dev: GPU acceleration support
|
||||
# - libx11-dev: X11 development files for window system interaction
|
||||
# - libxtst-dev: X11 testing extensions for input simulation
|
||||
# - libxrandr-dev: X11 RandR extension for display configuration
|
||||
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libxdo-dev libasound2-dev libopenblas-dev libx11-dev libxtst-dev libxrandr-dev
|
||||
|
||||
- name: Install macOS DMG tooling
|
||||
if: startsWith(matrix.platform, 'macos')
|
||||
run: |
|
||||
brew list create-dmg >/dev/null 2>&1 || brew install create-dmg
|
||||
|
||||
- name: Install dependencies (appimage only)
|
||||
if: matrix.platform == 'ubuntu-22.04' && matrix.name == 'linux-x86_64-appimage'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
|
||||
sudo apt-get install -y \
|
||||
build-essential \
|
||||
curl \
|
||||
wget \
|
||||
file \
|
||||
libgtk-3-dev \
|
||||
libxdo-dev \
|
||||
libssl-dev \
|
||||
libappindicator3-dev \
|
||||
librsvg2-dev \
|
||||
openjdk-17-jre-headless \
|
||||
patchelf
|
||||
|
||||
mkdir -p /tmp/ubuntu-packages
|
||||
cd /tmp/ubuntu-packages
|
||||
wget https://launchpadlibrarian.net/723972773/libwebkit2gtk-4.1-0_2.44.0-0ubuntu0.22.04.1_amd64.deb || { echo "Failed to download libwebkit2gtk-4.1-0"; exit 1; }
|
||||
wget https://launchpadlibrarian.net/723972761/libwebkit2gtk-4.1-dev_2.44.0-0ubuntu0.22.04.1_amd64.deb || { echo "Failed to download libwebkit2gtk-4.1-dev"; exit 1; }
|
||||
wget https://launchpadlibrarian.net/723972770/libjavascriptcoregtk-4.1-0_2.44.0-0ubuntu0.22.04.1_amd64.deb || { echo "Failed to download libjavascriptcoregtk-4.1-0"; exit 1; }
|
||||
wget https://launchpadlibrarian.net/723972746/libjavascriptcoregtk-4.1-dev_2.44.0-0ubuntu0.22.04.1_amd64.deb || { echo "Failed to download libjavascriptcoregtk-4.1-dev"; exit 1; }
|
||||
wget https://launchpadlibrarian.net/723972735/gir1.2-javascriptcoregtk-4.1_2.44.0-0ubuntu0.22.04.1_amd64.deb || { echo "Failed to download gir1.2-javascriptcoregtk-4.1"; exit 1; }
|
||||
wget https://launchpadlibrarian.net/723972739/gir1.2-webkit2-4.1_2.44.0-0ubuntu0.22.04.1_amd64.deb || { echo "Failed to download gir1.2-webkit2-4.1"; exit 1; }
|
||||
wget https://launchpadlibrarian.net/606433947/libicu70_70.1-2ubuntu1_amd64.deb || { echo "Failed to download libicu70"; exit 1; }
|
||||
wget https://launchpadlibrarian.net/606433941/libicu-dev_70.1-2ubuntu1_amd64.deb || { echo "Failed to download libicu-dev"; exit 1; }
|
||||
wget https://launchpadlibrarian.net/606433945/icu-devtools_70.1-2ubuntu1_amd64.deb || { echo "Failed to download icu-devtools"; exit 1; }
|
||||
wget https://launchpadlibrarian.net/595623693/libjpeg8_8c-2ubuntu10_amd64.deb || { echo "Failed to download libjpeg8"; exit 1; }
|
||||
wget https://launchpadlibrarian.net/587202140/libjpeg-turbo8_2.1.2-0ubuntu1_amd64.deb || { echo "Failed to download libjpeg-turbo8"; exit 1; }
|
||||
wget https://launchpadlibrarian.net/592959859/xdg-desktop-portal-gtk_1.14.0-1build1_amd64.deb || { echo "Failed to download xdg-desktop-portal-gtk"; exit 1; }
|
||||
sudo apt-get install -y /tmp/ubuntu-packages/*.deb
|
||||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libjavascriptcoregtk-4.0-dev libsoup2.4-dev libjavascriptcoregtk-4.1-dev libsoup-3.0-dev
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
@@ -330,7 +268,7 @@ jobs:
|
||||
|
||||
- name: Install frontend dependencies
|
||||
working-directory: ./frontend
|
||||
run: npm install
|
||||
run: npm ci
|
||||
|
||||
# DigiCert KeyLocker Setup (Cloud HSM)
|
||||
- name: Setup DigiCert KeyLocker
|
||||
@@ -443,35 +381,6 @@ jobs:
|
||||
echo "APPLE_SIGNING_IDENTITY=$CERT_ID" >> $GITHUB_ENV
|
||||
echo "Certificate imported successfully."
|
||||
|
||||
- name: Check DMG creation dependencies (macOS only)
|
||||
if: matrix.platform == 'macos-15' || matrix.platform == 'macos-15-intel'
|
||||
run: |
|
||||
echo "🔍 Checking DMG creation dependencies on ${{ matrix.platform }}..."
|
||||
echo "hdiutil version: $(hdiutil --version || echo 'NOT FOUND')"
|
||||
echo "create-dmg availability: $(which create-dmg || echo 'NOT FOUND')"
|
||||
echo "Available disk space: $(df -h /tmp | tail -1)"
|
||||
echo "macOS version: $(sw_vers -productVersion)"
|
||||
echo "Available tools:"
|
||||
ls -la /usr/bin/hd* || echo "No hd* tools found"
|
||||
|
||||
- name: Generate temporary GPG key for AppImage
|
||||
if: matrix.platform == 'ubuntu-22.04' && matrix.name == 'linux-x86_64-appimage'
|
||||
run: |
|
||||
cat >keyparams <<EOF
|
||||
%no-protection
|
||||
Key-Type: RSA
|
||||
Key-Length: 2048
|
||||
Name-Real: CI AppImage Signer
|
||||
Name-Email: ci-appimage@example.invalid
|
||||
Expire-Date: 0
|
||||
%commit
|
||||
EOF
|
||||
gpg --batch --generate-key keyparams
|
||||
export GPG_FINGERPRINT=$(gpg --batch --with-colons --list-secret-keys | awk -F: '/^fpr:/ {print $10; exit}')
|
||||
echo "GPG_FINGERPRINT=$GPG_FINGERPRINT" >> $GITHUB_ENV
|
||||
echo "Generated temporary GPG key:"
|
||||
gpg --list-secret-keys --keyid-format=long
|
||||
|
||||
- name: Build Tauri app
|
||||
uses: tauri-apps/tauri-action@v0
|
||||
env:
|
||||
@@ -495,15 +404,6 @@ jobs:
|
||||
tauriScript: npx tauri
|
||||
args: ${{ matrix.args }}
|
||||
|
||||
- name: Cleanup temporary GPG key
|
||||
if: matrix.platform == 'ubuntu-22.04' && matrix.name == 'linux-x86_64-appimage'
|
||||
run: |
|
||||
if [ -n "${GPG_FINGERPRINT:-}" ]; then
|
||||
gpg --batch --yes --delete-secret-keys "$GPG_FINGERPRINT" || true
|
||||
gpg --batch --yes --delete-keys "$GPG_FINGERPRINT" || true
|
||||
fi
|
||||
rm -f keyparams
|
||||
|
||||
# Sign with DigiCert KeyLocker (post-build)
|
||||
- name: Sign Windows binaries with DigiCert KeyLocker
|
||||
if: ${{ matrix.platform == 'windows-latest' && env.SM_API_KEY != '' && (github.event_name == 'release' || github.ref == 'refs/heads/V2-master') }}
|
||||
@@ -609,13 +509,10 @@ jobs:
|
||||
find . -name "*.msi" -exec cp {} "../../../dist/Stirling-PDF-${{ matrix.name }}.msi" \;
|
||||
elif [ "${{ matrix.platform }}" = "macos-15" ] || [ "${{ matrix.platform }}" = "macos-15-intel" ]; then
|
||||
find . -name "*.dmg" -exec cp {} "../../../dist/Stirling-PDF-${{ matrix.name }}.dmg" \;
|
||||
# find . -name "*.app" -exec cp -r {} "../../../dist/Stirling-PDF-${{ matrix.name }}.app" \;
|
||||
elif [ "${{ matrix.platform }}" = "ubuntu-22.04" ]; then
|
||||
find . -name "*.deb" -exec cp {} "../../../dist/Stirling-PDF-${{ matrix.name }}.deb" \;
|
||||
find . -name "*.rpm" -exec cp {} "../../../dist/Stirling-PDF-${{ matrix.name }}.rpm" \;
|
||||
find . -name "*.AppImage" -exec cp {} "../../../dist/Stirling-PDF-${{ matrix.name }}.AppImage" \;
|
||||
find . -name "*.app" -exec cp -r {} "../../../dist/Stirling-PDF-${{ matrix.name }}.app" \;
|
||||
else
|
||||
echo "Unknown platform: ${{ matrix.platform }}"
|
||||
find . -name "*.deb" -exec cp {} "../../../dist/Stirling-PDF-${{ matrix.name }}.deb" \;
|
||||
find . -name "*.AppImage" -exec cp {} "../../../dist/Stirling-PDF-${{ matrix.name }}.AppImage" \;
|
||||
fi
|
||||
|
||||
- name: Upload build artifacts
|
||||
@@ -670,11 +567,10 @@ jobs:
|
||||
tag_name: v${{ needs.determine-matrix.outputs.version }}
|
||||
generate_release_notes: true
|
||||
files: |
|
||||
./artifacts/**/Stirling-PDF-*.jar
|
||||
./artifacts/**/Stirling-PDF-*.msi
|
||||
./artifacts/**/Stirling-PDF-*.dmg
|
||||
./artifacts/**/Stirling-PDF-*.deb
|
||||
./artifacts/**/Stirling-PDF-*.rpm
|
||||
./artifacts/**/Stirling-PDF-*.AppImage
|
||||
./artifacts/**/*.jar
|
||||
./artifacts/**/*.msi
|
||||
./artifacts/**/*.dmg
|
||||
./artifacts/**/*.deb
|
||||
./artifacts/**/*.AppImage
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
@@ -23,18 +23,6 @@ on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
# cancel in-progress jobs if a new job is triggered
|
||||
# This is useful to avoid running multiple builds for the same branch if a new commit is pushed
|
||||
# or a pull request is updated.
|
||||
# It helps to save resources and time by ensuring that only the latest commit is built and tested
|
||||
# This is particularly useful for long-running jobs that may take a while to complete.
|
||||
# The `group` is set to a combination of the workflow name, event name, and branch name.
|
||||
# This ensures that jobs are grouped by the workflow and branch, allowing for cancellation of
|
||||
# in-progress jobs when a new commit is pushed to the same branch or a new pull request is opened.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref_name || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
@@ -45,11 +33,6 @@ jobs:
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Determine build matrix
|
||||
id: set-matrix
|
||||
run: |
|
||||
@@ -62,15 +45,15 @@ jobs:
|
||||
echo 'matrix={"include":[{"platform":"macos-15","args":"--target aarch64-apple-darwin","name":"macos-aarch64"},{"platform":"macos-15-intel","args":"--target x86_64-apple-darwin","name":"macos-x86_64"}]}' >> $GITHUB_OUTPUT
|
||||
;;
|
||||
"linux")
|
||||
echo 'matrix={"include":[{"platform":"ubuntu-22.04","args":"--target x86_64-unknown-linux-gnu -b appimage","name":"linux-x86_64-appimage"},{"platform":"ubuntu-22.04","args":"--target x86_64-unknown-linux-gnu -b deb","name":"linux-x86_64-deb"},{"platform":"ubuntu-22.04","args":"--target x86_64-unknown-linux-gnu -b rpm","name":"linux-x86_64-rpm"}]}' >> $GITHUB_OUTPUT
|
||||
echo 'matrix={"include":[{"platform":"ubuntu-22.04","args":"","name":"linux-x86_64"}]}' >> $GITHUB_OUTPUT
|
||||
;;
|
||||
*)
|
||||
echo 'matrix={"include":[{"platform":"windows-latest","args":"--target x86_64-pc-windows-msvc","name":"windows-x86_64"},{"platform":"macos-15","args":"--target aarch64-apple-darwin","name":"macos-aarch64"},{"platform":"macos-15-intel","args":"--target x86_64-apple-darwin","name":"macos-x86_64"},{"platform":"ubuntu-22.04","args":"--target x86_64-unknown-linux-gnu -b appimage","name":"linux-x86_64-appimage"},{"platform":"ubuntu-22.04","args":"--target x86_64-unknown-linux-gnu -b deb","name":"linux-x86_64-deb"},{"platform":"ubuntu-22.04","args":"--target x86_64-unknown-linux-gnu -b rpm","name":"linux-x86_64-rpm"}]}' >> $GITHUB_OUTPUT
|
||||
echo 'matrix={"include":[{"platform":"windows-latest","args":"--target x86_64-pc-windows-msvc","name":"windows-x86_64"},{"platform":"macos-15","args":"--target aarch64-apple-darwin","name":"macos-aarch64"},{"platform":"macos-15-intel","args":"--target x86_64-apple-darwin","name":"macos-x86_64"},{"platform":"ubuntu-22.04","args":"","name":"linux-x86_64"}]}' >> $GITHUB_OUTPUT
|
||||
;;
|
||||
esac
|
||||
else
|
||||
# For PR/push events, build all platforms
|
||||
echo 'matrix={"include":[{"platform":"windows-latest","args":"--target x86_64-pc-windows-msvc","name":"windows-x86_64"},{"platform":"macos-15","args":"--target aarch64-apple-darwin","name":"macos-aarch64"},{"platform":"macos-15-intel","args":"--target x86_64-apple-darwin","name":"macos-x86_64"},{"platform":"ubuntu-22.04","args":"--target x86_64-unknown-linux-gnu -b appimage","name":"linux-x86_64-appimage"},{"platform":"ubuntu-22.04","args":"--target x86_64-unknown-linux-gnu -b deb","name":"linux-x86_64-deb"},{"platform":"ubuntu-22.04","args":"--target x86_64-unknown-linux-gnu -b rpm","name":"linux-x86_64-rpm"}]}' >> $GITHUB_OUTPUT
|
||||
echo 'matrix={"include":[{"platform":"windows-latest","args":"--target x86_64-pc-windows-msvc","name":"windows-x86_64"},{"platform":"macos-15","args":"--target aarch64-apple-darwin","name":"macos-aarch64"},{"platform":"macos-15-intel","args":"--target x86_64-apple-darwin","name":"macos-x86_64"},{"platform":"ubuntu-22.04","args":"","name":"linux-x86_64"}]}' >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
build:
|
||||
@@ -91,61 +74,11 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: install dependencies (ubuntu only)
|
||||
if: matrix.platform == 'ubuntu-22.04' && matrix.name != 'linux-x86_64-appimage'
|
||||
- name: Install dependencies (ubuntu only)
|
||||
if: matrix.platform == 'ubuntu-22.04'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
# Dependencies explanation:
|
||||
# - libwebkit2gtk-4.1-dev: WebKit engine for Tauri v2 (4.0 was for v1)
|
||||
# - libappindicator3-dev: System tray support
|
||||
# - librsvg2-dev: SVG rendering
|
||||
# - patchelf: Required for AppImage packaging
|
||||
# - libxdo-dev: Keyboard/mouse automation
|
||||
# - libasound2-dev: Audio support
|
||||
# - libopenblas-dev: GPU acceleration support
|
||||
# - libx11-dev: X11 development files for window system interaction
|
||||
# - libxtst-dev: X11 testing extensions for input simulation
|
||||
# - libxrandr-dev: X11 RandR extension for display configuration
|
||||
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libxdo-dev libasound2-dev libopenblas-dev libx11-dev libxtst-dev libxrandr-dev
|
||||
|
||||
- name: Install macOS DMG tooling
|
||||
if: startsWith(matrix.platform, 'macos')
|
||||
run: |
|
||||
brew list create-dmg >/dev/null 2>&1 || brew install create-dmg
|
||||
|
||||
- name: Install dependencies (appimage only)
|
||||
if: matrix.platform == 'ubuntu-22.04' && matrix.name == 'linux-x86_64-appimage'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
|
||||
sudo apt-get install -y \
|
||||
build-essential \
|
||||
curl \
|
||||
wget \
|
||||
file \
|
||||
libgtk-3-dev \
|
||||
libxdo-dev \
|
||||
libssl-dev \
|
||||
libappindicator3-dev \
|
||||
librsvg2-dev \
|
||||
openjdk-17-jre-headless \
|
||||
patchelf
|
||||
|
||||
mkdir -p /tmp/ubuntu-packages
|
||||
cd /tmp/ubuntu-packages
|
||||
wget https://launchpadlibrarian.net/723972773/libwebkit2gtk-4.1-0_2.44.0-0ubuntu0.22.04.1_amd64.deb || { echo "Failed to download libwebkit2gtk-4.1-0"; exit 1; }
|
||||
wget https://launchpadlibrarian.net/723972761/libwebkit2gtk-4.1-dev_2.44.0-0ubuntu0.22.04.1_amd64.deb || { echo "Failed to download libwebkit2gtk-4.1-dev"; exit 1; }
|
||||
wget https://launchpadlibrarian.net/723972770/libjavascriptcoregtk-4.1-0_2.44.0-0ubuntu0.22.04.1_amd64.deb || { echo "Failed to download libjavascriptcoregtk-4.1-0"; exit 1; }
|
||||
wget https://launchpadlibrarian.net/723972746/libjavascriptcoregtk-4.1-dev_2.44.0-0ubuntu0.22.04.1_amd64.deb || { echo "Failed to download libjavascriptcoregtk-4.1-dev"; exit 1; }
|
||||
wget https://launchpadlibrarian.net/723972735/gir1.2-javascriptcoregtk-4.1_2.44.0-0ubuntu0.22.04.1_amd64.deb || { echo "Failed to download gir1.2-javascriptcoregtk-4.1"; exit 1; }
|
||||
wget https://launchpadlibrarian.net/723972739/gir1.2-webkit2-4.1_2.44.0-0ubuntu0.22.04.1_amd64.deb || { echo "Failed to download gir1.2-webkit2-4.1"; exit 1; }
|
||||
wget https://launchpadlibrarian.net/606433947/libicu70_70.1-2ubuntu1_amd64.deb || { echo "Failed to download libicu70"; exit 1; }
|
||||
wget https://launchpadlibrarian.net/606433941/libicu-dev_70.1-2ubuntu1_amd64.deb || { echo "Failed to download libicu-dev"; exit 1; }
|
||||
wget https://launchpadlibrarian.net/606433945/icu-devtools_70.1-2ubuntu1_amd64.deb || { echo "Failed to download icu-devtools"; exit 1; }
|
||||
wget https://launchpadlibrarian.net/595623693/libjpeg8_8c-2ubuntu10_amd64.deb || { echo "Failed to download libjpeg8"; exit 1; }
|
||||
wget https://launchpadlibrarian.net/587202140/libjpeg-turbo8_2.1.2-0ubuntu1_amd64.deb || { echo "Failed to download libjpeg-turbo8"; exit 1; }
|
||||
wget https://launchpadlibrarian.net/592959859/xdg-desktop-portal-gtk_1.14.0-1build1_amd64.deb || { echo "Failed to download xdg-desktop-portal-gtk"; exit 1; }
|
||||
sudo apt-get install -y /tmp/ubuntu-packages/*.deb
|
||||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libjavascriptcoregtk-4.0-dev libsoup2.4-dev libjavascriptcoregtk-4.1-dev libsoup-3.0-dev
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
@@ -166,18 +99,6 @@ jobs:
|
||||
java-version: "21"
|
||||
distribution: "temurin"
|
||||
|
||||
- name: Make libjvm discoverable (appimage only)
|
||||
if: matrix.platform == 'ubuntu-22.04' && matrix.name == 'linux-x86_64-appimage'
|
||||
run: |
|
||||
JAVA_LIBJVM="$JAVA_HOME/lib/server/libjvm.so"
|
||||
if [ -f "$JAVA_LIBJVM" ]; then
|
||||
sudo ln -sf "$JAVA_LIBJVM" /usr/lib/libjvm.so
|
||||
echo "Linked libjvm from $JAVA_LIBJVM"
|
||||
else
|
||||
echo "libjvm not found at $JAVA_LIBJVM"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Build Java backend with JLink
|
||||
working-directory: ./
|
||||
shell: bash
|
||||
@@ -377,24 +298,6 @@ jobs:
|
||||
echo "Available tools:"
|
||||
ls -la /usr/bin/hd* || echo "No hd* tools found"
|
||||
|
||||
- name: Generate temporary GPG key for AppImage
|
||||
if: matrix.platform == 'ubuntu-22.04' && matrix.name == 'linux-x86_64-appimage'
|
||||
run: |
|
||||
cat >keyparams <<EOF
|
||||
%no-protection
|
||||
Key-Type: RSA
|
||||
Key-Length: 2048
|
||||
Name-Real: CI AppImage Signer
|
||||
Name-Email: ci-appimage@example.invalid
|
||||
Expire-Date: 0
|
||||
%commit
|
||||
EOF
|
||||
gpg --batch --generate-key keyparams
|
||||
export GPG_FINGERPRINT=$(gpg --batch --with-colons --list-secret-keys | awk -F: '/^fpr:/ {print $10; exit}')
|
||||
echo "GPG_FINGERPRINT=$GPG_FINGERPRINT" >> $GITHUB_ENV
|
||||
echo "Generated temporary GPG key:"
|
||||
gpg --list-secret-keys --keyid-format=long
|
||||
|
||||
- name: Build Tauri app
|
||||
uses: tauri-apps/tauri-action@v0
|
||||
env:
|
||||
@@ -405,33 +308,19 @@ jobs:
|
||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||
APPLE_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
||||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||
# APPIMAGETOOL_SIGN_PASSPHRASE: ${{ secrets.APPIMAGETOOL_SIGN_PASSPHRASE }}
|
||||
APPIMAGETOOL_SIGN_PASSPHRASE: ${{ secrets.APPIMAGETOOL_SIGN_PASSPHRASE }}
|
||||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
||||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
||||
VITE_SUPABASE_PUBLISHABLE_DEFAULT_KEY: ${{ secrets.VITE_SUPABASE_PUBLISHABLE_DEFAULT_KEY }}
|
||||
VITE_SAAS_SERVER_URL: ${{ secrets.VITE_SAAS_SERVER_URL }}
|
||||
# Enable Windows signing only when ALL of the following are true:
|
||||
# - The build is running on the Windows platform (matrix.platform == 'windows-latest')
|
||||
# - The build is triggered from the main branch (github.ref == 'refs/heads/main')
|
||||
# - The DigiCert KeyLocker HSM is NOT being used (env.SM_API_KEY == '')
|
||||
# - A Windows certificate is available (env.WINDOWS_CERTIFICATE != '')
|
||||
# If all conditions are met, SIGN=1 (enable signing); otherwise, SIGN=0 (disable signing).
|
||||
SIGN: ${{ (matrix.platform == 'windows-latest' && github.ref == 'refs/heads/main' && env.SM_API_KEY == '' && env.WINDOWS_CERTIFICATE != '') && '1' || '0' }}
|
||||
# Only enable Windows signing in Tauri when on main
|
||||
SIGN: ${{ github.ref == 'refs/heads/main' && (env.SM_API_KEY == '' && env.WINDOWS_CERTIFICATE != '') && '1' || '0' }}
|
||||
CI: true
|
||||
with:
|
||||
projectPath: ./frontend
|
||||
tauriScript: npx tauri
|
||||
args: ${{ matrix.args }}
|
||||
|
||||
- name: Cleanup temporary GPG key
|
||||
if: matrix.platform == 'ubuntu-22.04' && matrix.name == 'linux-x86_64-appimage'
|
||||
run: |
|
||||
if [ -n "${GPG_FINGERPRINT:-}" ]; then
|
||||
gpg --batch --yes --delete-secret-keys "$GPG_FINGERPRINT" || true
|
||||
gpg --batch --yes --delete-keys "$GPG_FINGERPRINT" || true
|
||||
fi
|
||||
rm -f keyparams
|
||||
|
||||
# Sign with DigiCert KeyLocker (post-build)
|
||||
- name: Sign Windows binaries with DigiCert KeyLocker
|
||||
if: ${{ matrix.platform == 'windows-latest' && env.SM_API_KEY != '' && github.ref == 'refs/heads/main' }}
|
||||
@@ -618,13 +507,9 @@ jobs:
|
||||
find . -name "*.msi" -exec cp {} "../../../dist/Stirling-PDF-${{ matrix.name }}.msi" \;
|
||||
elif [ "${{ matrix.platform }}" = "macos-15" ] || [ "${{ matrix.platform }}" = "macos-15-intel" ]; then
|
||||
find . -name "*.dmg" -exec cp {} "../../../dist/Stirling-PDF-${{ matrix.name }}.dmg" \;
|
||||
# find . -name "*.app" -exec cp -r {} "../../../dist/Stirling-PDF-${{ matrix.name }}.app" \;
|
||||
elif [ "${{ matrix.platform }}" = "ubuntu-22.04" ]; then
|
||||
find . -name "*.deb" -exec cp {} "../../../dist/Stirling-PDF-${{ matrix.name }}.deb" \;
|
||||
find . -name "*.rpm" -exec cp {} "../../../dist/Stirling-PDF-${{ matrix.name }}.rpm" \;
|
||||
find . -name "*.AppImage" -exec cp {} "../../../dist/Stirling-PDF-${{ matrix.name }}.AppImage" \;
|
||||
else
|
||||
echo "Unknown platform: ${{ matrix.platform }}"
|
||||
find . -name "*.deb" -exec cp {} "../../../dist/Stirling-PDF-${{ matrix.name }}.deb" \;
|
||||
find . -name "*.AppImage" -exec cp {} "../../../dist/Stirling-PDF-${{ matrix.name }}.AppImage" \;
|
||||
fi
|
||||
|
||||
- name: Verify Windows Code Signature
|
||||
@@ -714,16 +599,13 @@ jobs:
|
||||
echo "❌ No macOS artifacts found"
|
||||
exit 1
|
||||
fi
|
||||
elif [ "${{ matrix.platform }}" = "ubuntu-22.04" ]; then
|
||||
else
|
||||
echo "Checking for Linux artifacts..."
|
||||
find . -name "*.deb" -o -name "*.AppImage" -o -name "*.rpm" | head -5
|
||||
if [ $(find . -name "*.deb" -o -name "*.AppImage" -o -name "*.rpm" | wc -l) -eq 0 ]; then
|
||||
find . -name "*.deb" -o -name "*.AppImage" | head -5
|
||||
if [ $(find . -name "*.deb" -o -name "*.AppImage" | wc -l) -eq 0 ]; then
|
||||
echo "❌ No Linux artifacts found"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "Unknown platform: ${{ matrix.platform }}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "✅ Build artifacts found for ${{ matrix.name }}"
|
||||
@@ -733,7 +615,7 @@ jobs:
|
||||
run: |
|
||||
cd ./frontend/src-tauri/target
|
||||
echo "Artifact sizes for ${{ matrix.name }}:"
|
||||
find . -name "*.exe" -o -name "*.dmg" -o -name "*.deb" -o -name "*.AppImage" -o -name "*.rpm" -o -name "*.msi" | while read file; do
|
||||
find . -name "*.exe" -o -name "*.dmg" -o -name "*.deb" -o -name "*.AppImage" -o -name "*.msi" | while read file; do
|
||||
if [ -f "$file" ]; then
|
||||
size=$(stat -c%s "$file" 2>/dev/null || stat -f%z "$file" 2>/dev/null || echo "unknown")
|
||||
echo "$file: $size bytes"
|
||||
|
||||
@@ -76,7 +76,7 @@ jobs:
|
||||
- name: Set up SSH
|
||||
run: |
|
||||
mkdir -p ~/.ssh/
|
||||
echo "${{ secrets.VPS_SSH_KEY }}" > ../private.key
|
||||
echo "${{ secrets.NEW_VPS_SSH_KEY }}" > ../private.key
|
||||
sudo chmod 600 ../private.key
|
||||
|
||||
- name: Deploy to VPS
|
||||
@@ -107,9 +107,9 @@ jobs:
|
||||
restart: on-failure:5
|
||||
EOF
|
||||
|
||||
scp -i ../private.key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null docker-compose.yml ${{ secrets.VPS_USERNAME }}@${{ secrets.VPS_HOST }}:/tmp/docker-compose.yml
|
||||
scp -i ../private.key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null docker-compose.yml ${{ secrets.NEW_VPS_USERNAME }}@${{ secrets.NEW_VPS_HOST }}:/tmp/docker-compose.yml
|
||||
|
||||
ssh -i ../private.key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ${{ secrets.VPS_USERNAME }}@${{ secrets.VPS_HOST }} << EOF
|
||||
ssh -i ../private.key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ${{ secrets.NEW_VPS_USERNAME }}@${{ secrets.NEW_VPS_HOST }} << EOF
|
||||
mkdir -p /stirling/test-${{ github.sha }}/{data,config,logs}
|
||||
mv /tmp/docker-compose.yml /stirling/test-${{ github.sha }}/docker-compose.yml
|
||||
cd /stirling/test-${{ github.sha }}
|
||||
@@ -161,7 +161,7 @@ jobs:
|
||||
npm install
|
||||
npm run build
|
||||
npm install dashcam-chrome --save
|
||||
Start-Process "C:/Program Files/Google/Chrome/Application/chrome.exe" -ArgumentList "--start-maximized", "--load-extension=$(pwd)/node_modules/dashcam-chrome/build", "http://${{ secrets.VPS_HOST }}:1337"
|
||||
Start-Process "C:/Program Files/Google/Chrome/Application/chrome.exe" -ArgumentList "--start-maximized", "--load-extension=$(pwd)/node_modules/dashcam-chrome/build", "http://${{ secrets.NEW_VPS_HOST }}:1337"
|
||||
Start-Sleep -Seconds 20
|
||||
prompt: |
|
||||
1. /run testing/testdriver/test.yml
|
||||
@@ -183,13 +183,13 @@ jobs:
|
||||
- name: Set up SSH
|
||||
run: |
|
||||
mkdir -p ~/.ssh/
|
||||
echo "${{ secrets.VPS_SSH_KEY }}" > ../private.key
|
||||
echo "${{ secrets.NEW_VPS_SSH_KEY }}" > ../private.key
|
||||
sudo chmod 600 ../private.key
|
||||
|
||||
- name: Cleanup deployment
|
||||
if: always()
|
||||
run: |
|
||||
ssh -i ../private.key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ${{ secrets.VPS_USERNAME }}@${{ secrets.VPS_HOST }} << EOF
|
||||
ssh -i ../private.key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ${{ secrets.NEW_VPS_USERNAME }}@${{ secrets.NEW_VPS_HOST }} << EOF
|
||||
cd /stirling/test-${{ github.sha }}
|
||||
docker-compose down
|
||||
cd /stirling
|
||||
|
||||
+11
-8
@@ -94,16 +94,19 @@ public class RuntimePathConfig {
|
||||
defaultSOfficePath, operations != null ? operations.getSoffice() : null);
|
||||
|
||||
// Initialize Tesseract data path
|
||||
String defaultTessDataPath =
|
||||
isDocker ? "/usr/share/tesseract-ocr/5/tessdata" : "/usr/share/tessdata";
|
||||
|
||||
// Priority: config setting > TESSDATA_PREFIX env var > default path
|
||||
String tessPath = system.getTessdataDir();
|
||||
String tessdataDir = java.lang.System.getenv("TESSDATA_PREFIX");
|
||||
String tessdataPrefix = java.lang.System.getenv("TESSDATA_PREFIX");
|
||||
String defaultPath = "/usr/share/tesseract-ocr/5/tessdata";
|
||||
|
||||
if (tessPath != null && !tessPath.isEmpty()) {
|
||||
this.tessDataPath = tessPath;
|
||||
} else if (tessdataPrefix != null && !tessdataPrefix.isEmpty()) {
|
||||
this.tessDataPath = tessdataPrefix;
|
||||
} else {
|
||||
this.tessDataPath = defaultPath;
|
||||
}
|
||||
|
||||
this.tessDataPath =
|
||||
resolvePath(
|
||||
defaultTessDataPath,
|
||||
(tessPath != null && !tessPath.isEmpty()) ? tessPath : tessdataDir);
|
||||
log.info("Using Tesseract data path: {}", this.tessDataPath);
|
||||
}
|
||||
|
||||
|
||||
@@ -418,6 +418,15 @@ public class ApplicationProperties {
|
||||
|
||||
// 'https://app.example.com'). If not set, falls back to backendUrl.
|
||||
private boolean enableMobileScanner = false; // Enable mobile phone QR code upload feature
|
||||
private MobileScannerSettings mobileScannerSettings = new MobileScannerSettings();
|
||||
|
||||
@Data
|
||||
public static class MobileScannerSettings {
|
||||
private boolean convertToPdf = true; // Whether to automatically convert images to PDF
|
||||
private String imageResolution = "full"; // Options: "full", "reduced"
|
||||
private String pageFormat = "A4"; // Options: "keep", "A4", "letter"
|
||||
private boolean stretchToFit = false; // Whether to stretch image to fill page
|
||||
}
|
||||
|
||||
public boolean isAnalyticsEnabled() {
|
||||
return this.getEnableAnalytics() != null && this.getEnableAnalytics();
|
||||
|
||||
@@ -191,7 +191,7 @@ public class UIDataController {
|
||||
}
|
||||
|
||||
private List<String> getAvailableTesseractLanguages() {
|
||||
String tessdataDir = applicationProperties.getSystem().getTessdataDir();
|
||||
String tessdataDir = runtimePathConfig.getTessDataPath();
|
||||
java.io.File[] files = new java.io.File(tessdataDir).listFiles();
|
||||
if (files == null) {
|
||||
return Collections.emptyList();
|
||||
|
||||
+10
-5
@@ -10,6 +10,7 @@ import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.util.HtmlUtils;
|
||||
|
||||
import io.github.pixee.security.Filenames;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@@ -152,20 +153,24 @@ public class ConvertEmlToPDF {
|
||||
}
|
||||
|
||||
private static @NotNull String buildErrorMessage(Exception e, String originalFilename) {
|
||||
String safeFilename = HtmlUtils.htmlEscape(originalFilename);
|
||||
String exceptionMessage = e.getMessage();
|
||||
String safeExceptionMessage =
|
||||
exceptionMessage == null ? "Unknown error" : HtmlUtils.htmlEscape(exceptionMessage);
|
||||
String errorMessage;
|
||||
if (e.getMessage() != null && e.getMessage().contains("Invalid EML")) {
|
||||
if (exceptionMessage != null && exceptionMessage.contains("Invalid EML")) {
|
||||
errorMessage =
|
||||
"Invalid EML file format. Please ensure you've uploaded a valid email"
|
||||
+ " file ("
|
||||
+ originalFilename
|
||||
+ safeFilename
|
||||
+ ").";
|
||||
} else if (e.getMessage() != null && e.getMessage().contains("WeasyPrint")) {
|
||||
} else if (exceptionMessage != null && exceptionMessage.contains("WeasyPrint")) {
|
||||
errorMessage =
|
||||
"PDF generation failed for "
|
||||
+ originalFilename
|
||||
+ safeFilename
|
||||
+ ". This may be due to complex email formatting.";
|
||||
} else {
|
||||
errorMessage = "Conversion failed for " + originalFilename + ": " + e.getMessage();
|
||||
errorMessage = "Conversion failed for " + safeFilename + ": " + safeExceptionMessage;
|
||||
}
|
||||
return errorMessage;
|
||||
}
|
||||
|
||||
+16
-1
@@ -75,10 +75,25 @@ public class ConfigController {
|
||||
String frontendUrl = applicationProperties.getSystem().getFrontendUrl();
|
||||
configData.put("frontendUrl", frontendUrl != null ? frontendUrl : "");
|
||||
|
||||
// Add mobile scanner setting
|
||||
// Add mobile scanner settings
|
||||
configData.put(
|
||||
"enableMobileScanner",
|
||||
applicationProperties.getSystem().isEnableMobileScanner());
|
||||
configData.put(
|
||||
"mobileScannerConvertToPdf",
|
||||
applicationProperties.getSystem().getMobileScannerSettings().isConvertToPdf());
|
||||
configData.put(
|
||||
"mobileScannerImageResolution",
|
||||
applicationProperties
|
||||
.getSystem()
|
||||
.getMobileScannerSettings()
|
||||
.getImageResolution());
|
||||
configData.put(
|
||||
"mobileScannerPageFormat",
|
||||
applicationProperties.getSystem().getMobileScannerSettings().getPageFormat());
|
||||
configData.put(
|
||||
"mobileScannerStretchToFit",
|
||||
applicationProperties.getSystem().getMobileScannerSettings().isStretchToFit());
|
||||
|
||||
// Extract values from ApplicationProperties
|
||||
configData.put("appNameNavbar", applicationProperties.getUi().getAppNameNavbar());
|
||||
|
||||
+59
-1
@@ -31,6 +31,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import stirling.software.common.model.ApplicationProperties;
|
||||
import stirling.software.common.service.MobileScannerService;
|
||||
import stirling.software.common.service.MobileScannerService.FileMetadata;
|
||||
|
||||
@@ -51,9 +52,31 @@ import stirling.software.common.service.MobileScannerService.FileMetadata;
|
||||
public class MobileScannerController {
|
||||
|
||||
private final MobileScannerService mobileScannerService;
|
||||
private final ApplicationProperties applicationProperties;
|
||||
|
||||
public MobileScannerController(MobileScannerService mobileScannerService) {
|
||||
public MobileScannerController(
|
||||
MobileScannerService mobileScannerService,
|
||||
ApplicationProperties applicationProperties) {
|
||||
this.mobileScannerService = mobileScannerService;
|
||||
this.applicationProperties = applicationProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if mobile scanner feature is enabled
|
||||
*
|
||||
* @return Error response if disabled, null if enabled
|
||||
*/
|
||||
private ResponseEntity<Map<String, Object>> checkFeatureEnabled() {
|
||||
if (!applicationProperties.getSystem().isEnableMobileScanner()) {
|
||||
return ResponseEntity.status(HttpStatus.FORBIDDEN)
|
||||
.body(
|
||||
Map.of(
|
||||
"error",
|
||||
"Mobile scanner feature is not enabled",
|
||||
"enabled",
|
||||
false));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -71,10 +94,16 @@ public class MobileScannerController {
|
||||
description = "Session created successfully",
|
||||
content = @Content(schema = @Schema(implementation = SessionInfoResponse.class)))
|
||||
@ApiResponse(responseCode = "400", description = "Invalid session ID")
|
||||
@ApiResponse(responseCode = "403", description = "Mobile scanner feature not enabled")
|
||||
public ResponseEntity<Map<String, Object>> createSession(
|
||||
@Parameter(description = "Session ID for QR code", required = true) @PathVariable
|
||||
String sessionId) {
|
||||
|
||||
ResponseEntity<Map<String, Object>> featureCheck = checkFeatureEnabled();
|
||||
if (featureCheck != null) {
|
||||
return featureCheck;
|
||||
}
|
||||
|
||||
try {
|
||||
MobileScannerService.SessionInfo sessionInfo =
|
||||
mobileScannerService.createSession(sessionId);
|
||||
@@ -109,10 +138,16 @@ public class MobileScannerController {
|
||||
description = "Session is valid",
|
||||
content = @Content(schema = @Schema(implementation = SessionInfoResponse.class)))
|
||||
@ApiResponse(responseCode = "404", description = "Session not found or expired")
|
||||
@ApiResponse(responseCode = "403", description = "Mobile scanner feature not enabled")
|
||||
public ResponseEntity<Map<String, Object>> validateSession(
|
||||
@Parameter(description = "Session ID to validate", required = true) @PathVariable
|
||||
String sessionId) {
|
||||
|
||||
ResponseEntity<Map<String, Object>> featureCheck = checkFeatureEnabled();
|
||||
if (featureCheck != null) {
|
||||
return featureCheck;
|
||||
}
|
||||
|
||||
MobileScannerService.SessionInfo sessionInfo =
|
||||
mobileScannerService.validateSession(sessionId);
|
||||
|
||||
@@ -147,6 +182,7 @@ public class MobileScannerController {
|
||||
description = "Files uploaded successfully",
|
||||
content = @Content(schema = @Schema(implementation = UploadResponse.class)))
|
||||
@ApiResponse(responseCode = "400", description = "Invalid session ID or files")
|
||||
@ApiResponse(responseCode = "403", description = "Mobile scanner feature not enabled")
|
||||
@ApiResponse(responseCode = "500", description = "Upload failed")
|
||||
public ResponseEntity<Map<String, Object>> uploadFiles(
|
||||
@Parameter(description = "Session ID from QR code", required = true) @PathVariable
|
||||
@@ -154,6 +190,11 @@ public class MobileScannerController {
|
||||
@Parameter(description = "Files to upload", required = true) @RequestParam("files")
|
||||
List<MultipartFile> files) {
|
||||
|
||||
ResponseEntity<Map<String, Object>> featureCheck = checkFeatureEnabled();
|
||||
if (featureCheck != null) {
|
||||
return featureCheck;
|
||||
}
|
||||
|
||||
try {
|
||||
if (files == null || files.isEmpty()) {
|
||||
return ResponseEntity.badRequest().body(Map.of("error", "No files provided"));
|
||||
@@ -194,10 +235,16 @@ public class MobileScannerController {
|
||||
responseCode = "200",
|
||||
description = "File list retrieved",
|
||||
content = @Content(schema = @Schema(implementation = FileListResponse.class)))
|
||||
@ApiResponse(responseCode = "403", description = "Mobile scanner feature not enabled")
|
||||
public ResponseEntity<Map<String, Object>> getSessionFiles(
|
||||
@Parameter(description = "Session ID", required = true) @PathVariable
|
||||
String sessionId) {
|
||||
|
||||
ResponseEntity<Map<String, Object>> featureCheck = checkFeatureEnabled();
|
||||
if (featureCheck != null) {
|
||||
return featureCheck;
|
||||
}
|
||||
|
||||
List<FileMetadata> files = mobileScannerService.getSessionFiles(sessionId);
|
||||
|
||||
Map<String, Object> response = new HashMap<>();
|
||||
@@ -221,12 +268,17 @@ public class MobileScannerController {
|
||||
description =
|
||||
"Download a file that was uploaded to a session. File is automatically deleted after download.")
|
||||
@ApiResponse(responseCode = "200", description = "File downloaded successfully")
|
||||
@ApiResponse(responseCode = "403", description = "Mobile scanner feature not enabled")
|
||||
@ApiResponse(responseCode = "404", description = "File or session not found")
|
||||
public ResponseEntity<Resource> downloadFile(
|
||||
@Parameter(description = "Session ID", required = true) @PathVariable String sessionId,
|
||||
@Parameter(description = "Filename to download", required = true) @PathVariable
|
||||
String filename) {
|
||||
|
||||
if (!applicationProperties.getSystem().isEnableMobileScanner()) {
|
||||
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
|
||||
}
|
||||
|
||||
try {
|
||||
Path filePath = mobileScannerService.getFile(sessionId, filename);
|
||||
|
||||
@@ -268,10 +320,16 @@ public class MobileScannerController {
|
||||
summary = "Delete a session",
|
||||
description = "Manually delete a session and all its uploaded files")
|
||||
@ApiResponse(responseCode = "200", description = "Session deleted successfully")
|
||||
@ApiResponse(responseCode = "403", description = "Mobile scanner feature not enabled")
|
||||
public ResponseEntity<Map<String, Object>> deleteSession(
|
||||
@Parameter(description = "Session ID to delete", required = true) @PathVariable
|
||||
String sessionId) {
|
||||
|
||||
ResponseEntity<Map<String, Object>> featureCheck = checkFeatureEnabled();
|
||||
if (featureCheck != null) {
|
||||
return featureCheck;
|
||||
}
|
||||
|
||||
mobileScannerService.deleteSession(sessionId);
|
||||
|
||||
return ResponseEntity.ok(
|
||||
|
||||
@@ -204,11 +204,65 @@ public class VeraPDFService {
|
||||
detectedFlavours = detectionParser.getFlavours();
|
||||
}
|
||||
|
||||
// For PDF/A flavours, we need to validate first to check if PDF/A identification exists in
|
||||
// XMP
|
||||
// If declaredFlavour is PDF/A, do a quick validation to check for PDF/A identification
|
||||
// schema
|
||||
boolean hasValidPdfaMetadata = false;
|
||||
if (isPdfaFlavour(declaredFlavour)) {
|
||||
try (PDFAParser quickParser =
|
||||
Foundries.defaultInstance()
|
||||
.createParser(new ByteArrayInputStream(pdfBytes), declaredFlavour)) {
|
||||
PDFAValidator quickValidator =
|
||||
Foundries.defaultInstance().createValidator(declaredFlavour, false);
|
||||
ValidationResult quickResult = quickValidator.validate(quickParser);
|
||||
|
||||
// Check if the document has the PDF/A Identification extension schema (clause
|
||||
// 6.7.11, test 1)
|
||||
// OR if it lacks XMP metadata entirely (clause 6.7.2, test 1)
|
||||
// If either of these errors is present, the document is NOT a declared PDF/A
|
||||
hasValidPdfaMetadata = true;
|
||||
for (TestAssertion assertion : quickResult.getTestAssertions()) {
|
||||
if (assertion.getStatus() == TestAssertion.Status.FAILED
|
||||
&& assertion.getRuleId() != null) {
|
||||
String clause = assertion.getRuleId().getClause();
|
||||
int testNumber = assertion.getRuleId().getTestNumber();
|
||||
|
||||
// Missing XMP metadata entirely (clause 6.7.2, test 1)
|
||||
if ("6.7.2".equals(clause) && testNumber == 1) {
|
||||
hasValidPdfaMetadata = false;
|
||||
log.debug(
|
||||
"Document lacks XMP metadata (6.7.2): {}",
|
||||
assertion.getMessage());
|
||||
break;
|
||||
}
|
||||
|
||||
// Missing PDF/A identification schema in XMP (clause 6.7.11, test 1)
|
||||
if ("6.7.11".equals(clause) && testNumber == 1) {
|
||||
hasValidPdfaMetadata = false;
|
||||
log.debug(
|
||||
"Document lacks PDF/A identification in XMP (6.7.11): {}",
|
||||
assertion.getMessage());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.debug("Error checking for PDF/A identification: {}", e.getMessage());
|
||||
hasValidPdfaMetadata = false;
|
||||
}
|
||||
}
|
||||
|
||||
List<PDFAFlavour> flavoursToValidate = new ArrayList<>();
|
||||
boolean hasPdfaDeclaration = isPdfaFlavour(declaredFlavour);
|
||||
boolean hasPdfaDeclaration = isPdfaFlavour(declaredFlavour) && hasValidPdfaMetadata;
|
||||
|
||||
if (declaredFlavour != null) {
|
||||
flavoursToValidate.add(declaredFlavour);
|
||||
boolean isDeclaredPdfa = isPdfaFlavour(declaredFlavour);
|
||||
if (isDeclaredPdfa && hasPdfaDeclaration) {
|
||||
flavoursToValidate.add(declaredFlavour);
|
||||
} else if (!isDeclaredPdfa) {
|
||||
flavoursToValidate.add(declaredFlavour);
|
||||
}
|
||||
}
|
||||
|
||||
for (PDFAFlavour flavour : detectedFlavours) {
|
||||
|
||||
@@ -146,6 +146,11 @@ system:
|
||||
backendUrl: '' # Backend base URL for SAML/OAuth/API callbacks (e.g. 'http://localhost:8080' for dev, 'https://api.example.com' for production). REQUIRED for SSO authentication to work correctly. This is where your IdP will send SAML responses and OAuth callbacks. Leave empty to default to 'http://localhost:8080' in development.
|
||||
frontendUrl: '' # Frontend URL for invite email links (e.g. 'https://app.example.com'). Optional - if not set, will use backendUrl. This is the URL users click in invite emails.
|
||||
enableMobileScanner: false # Enable mobile phone QR code upload feature. Requires frontendUrl to be configured.
|
||||
mobileScannerSettings:
|
||||
convertToPdf: true # Automatically convert uploaded images to PDF format. If false, images are kept as-is.
|
||||
imageResolution: full # Image resolution for mobile uploads: 'full' (original size) or 'reduced' (max 1200px on longest side). Only applies when convertToPdf is true.
|
||||
pageFormat: A4 # Page format for converted PDFs: 'keep' (original image dimensions), 'A4' (A4 page size), or 'letter' (US Letter page size). Only applies when convertToPdf is true.
|
||||
stretchToFit: false # Whether to stretch images to fill the entire page (may distort aspect ratio). If false, images are centered with preserved aspect ratio. Only applies when convertToPdf is true.
|
||||
serverCertificate:
|
||||
enabled: true # Enable server-side certificate for "Sign with Stirling-PDF" option
|
||||
organizationName: Stirling-PDF # Organization name for generated certificates
|
||||
|
||||
+5
-1
@@ -169,7 +169,10 @@ public class ProprietaryUIDataController {
|
||||
|
||||
OAUTH2 oauth = securityProps.getOauth2();
|
||||
|
||||
if (oauth != null && oauth.getEnabled()) {
|
||||
// Only add OAuth2 providers if loginMethod allows it
|
||||
if (oauth != null
|
||||
&& oauth.getEnabled()
|
||||
&& securityProps.isOauth2Active()) { // This checks loginMethod
|
||||
if (oauth.isSettingsValid()) {
|
||||
String firstChar = String.valueOf(oauth.getProvider().charAt(0));
|
||||
String clientName =
|
||||
@@ -201,6 +204,7 @@ public class ProprietaryUIDataController {
|
||||
}
|
||||
|
||||
SAML2 saml2 = securityProps.getSaml2();
|
||||
// Only add SAML2 providers if loginMethod allows it
|
||||
if (securityProps.isSaml2Active() && applicationProperties.getPremium().isEnabled()) {
|
||||
String samlIdp = saml2.getProvider();
|
||||
String saml2AuthenticationPath = "/saml2/authenticate/" + saml2.getRegistrationId();
|
||||
|
||||
+13
@@ -21,6 +21,7 @@ import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import stirling.software.common.model.ApplicationProperties;
|
||||
import stirling.software.proprietary.audit.AuditEventType;
|
||||
import stirling.software.proprietary.audit.AuditLevel;
|
||||
import stirling.software.proprietary.audit.Audited;
|
||||
@@ -44,6 +45,7 @@ public class AuthController {
|
||||
private final JwtServiceInterface jwtService;
|
||||
private final CustomUserDetailsService userDetailsService;
|
||||
private final LoginAttemptService loginAttemptService;
|
||||
private final ApplicationProperties.Security securityProperties;
|
||||
|
||||
/**
|
||||
* Login endpoint - replaces Supabase signInWithPassword
|
||||
@@ -60,6 +62,17 @@ public class AuthController {
|
||||
HttpServletRequest httpRequest,
|
||||
HttpServletResponse response) {
|
||||
try {
|
||||
// Check if username/password authentication is allowed
|
||||
if (!securityProperties.isUserPass()) {
|
||||
log.warn(
|
||||
"Username/password login attempted but not allowed by current login method configuration");
|
||||
return ResponseEntity.status(HttpStatus.FORBIDDEN)
|
||||
.body(
|
||||
Map.of(
|
||||
"error",
|
||||
"Username/password authentication is not enabled. Please use the configured authentication method."));
|
||||
}
|
||||
|
||||
// Validate input parameters
|
||||
if (request.getUsername() == null || request.getUsername().trim().isEmpty()) {
|
||||
log.warn("Login attempt with null or empty username");
|
||||
|
||||
+123
-9
@@ -14,6 +14,8 @@ plugins {
|
||||
import com.github.jk1.license.render.*
|
||||
import groovy.json.JsonOutput
|
||||
import groovy.json.JsonSlurper
|
||||
import groovy.xml.XmlSlurper
|
||||
import org.gradle.api.tasks.testing.Test
|
||||
|
||||
ext {
|
||||
springBootVersion = "3.5.7"
|
||||
@@ -60,7 +62,7 @@ repositories {
|
||||
|
||||
allprojects {
|
||||
group = 'stirling.software'
|
||||
version = '2.2.0'
|
||||
version = '2.2.1'
|
||||
|
||||
configurations.configureEach {
|
||||
exclude group: 'commons-logging', module: 'commons-logging'
|
||||
@@ -183,30 +185,142 @@ subprojects {
|
||||
}
|
||||
}
|
||||
|
||||
compileJava {
|
||||
options.compilerArgs << "-parameters"
|
||||
tasks.named("compileJava", JavaCompile).configure {
|
||||
options.compilerArgs.add("-parameters")
|
||||
}
|
||||
|
||||
test {
|
||||
def jacocoReport = tasks.named("jacocoTestReport")
|
||||
|
||||
tasks.withType(Test).configureEach {
|
||||
useJUnitPlatform()
|
||||
finalizedBy jacocoTestReport
|
||||
finalizedBy(jacocoReport)
|
||||
}
|
||||
|
||||
jacocoTestReport {
|
||||
dependsOn test
|
||||
jacocoReport.configure {
|
||||
dependsOn(tasks.named("test"))
|
||||
reports {
|
||||
xml.required.set(true)
|
||||
csv.required.set(false)
|
||||
html.required.set(true)
|
||||
}
|
||||
doLast {
|
||||
def xmlReport = reports.xml.outputLocation.get().asFile
|
||||
if (!xmlReport.exists()) {
|
||||
logger.lifecycle("Jacoco coverage report not found at ${xmlReport}")
|
||||
return
|
||||
}
|
||||
|
||||
def xmlContent = xmlReport.getText("UTF-8")
|
||||
xmlContent = xmlContent.replaceFirst('(?s)<!DOCTYPE.*?>', '')
|
||||
def report = new XmlSlurper(false, false).parseText(xmlContent)
|
||||
def counters = report.counter.collectEntries { counter ->
|
||||
def type = counter.@type.text()
|
||||
def covered = counter.@covered.text() as BigDecimal
|
||||
def missed = counter.@missed.text() as BigDecimal
|
||||
[(type): [covered: covered, missed: missed]]
|
||||
}
|
||||
|
||||
def thresholds = [
|
||||
LINE : 0.16,
|
||||
INSTRUCTION: 0.14,
|
||||
BRANCH : 0.09
|
||||
]
|
||||
|
||||
def types = ["LINE", "INSTRUCTION", "BRANCH"]
|
||||
def headers = ["Metric", "Coverage", "Covered/Total", "Status", "Target"]
|
||||
|
||||
def rows = types.collect { String type ->
|
||||
def data = counters[type]
|
||||
if (!data) {
|
||||
return [type, "—", "—", "No data", ""]
|
||||
}
|
||||
|
||||
def total = data.covered + data.missed
|
||||
if (total == 0) {
|
||||
return [type, "—", "0/${total.toBigInteger()}", "No executions", ""]
|
||||
}
|
||||
|
||||
def ratio = data.covered / total * 100
|
||||
def coverageText = String.format(Locale.ROOT, "%.2f%%", ratio)
|
||||
def coveredText = String.format(Locale.ROOT, "%d/%d",
|
||||
data.covered.toBigInteger(),
|
||||
total.toBigInteger())
|
||||
|
||||
def threshold = thresholds[type]
|
||||
def thresholdPercent = threshold != null ? threshold * 100 : null
|
||||
def targetText = thresholdPercent != null ?
|
||||
String.format(Locale.ROOT, ">= %.2f%%", thresholdPercent) : ""
|
||||
def passed = thresholdPercent != null ? ratio >= thresholdPercent : null
|
||||
def statusText = passed == null ? "" : (passed ? "PASS" : "FAIL")
|
||||
|
||||
return [type, coverageText, coveredText, statusText, targetText]
|
||||
}
|
||||
|
||||
def columnIndexes = (0..<headers.size())
|
||||
def columnWidths = columnIndexes.collect { idx ->
|
||||
Math.max(headers[idx].length(), rows.collect { row ->
|
||||
row[idx] != null ? row[idx].toString().length() : 0
|
||||
}.max() ?: 0)
|
||||
}
|
||||
|
||||
def formatRow = { List<String> values ->
|
||||
columnIndexes.collect { idx ->
|
||||
def value = values[idx] ?: ""
|
||||
value.padRight(columnWidths[idx])
|
||||
}.join(" | ")
|
||||
}
|
||||
|
||||
def separator = columnIndexes.collect { idx ->
|
||||
''.padRight(columnWidths[idx], '-')
|
||||
}.join("-+-")
|
||||
|
||||
logger.lifecycle("")
|
||||
logger.lifecycle("==== JaCoCo Coverage Summary ====")
|
||||
logger.lifecycle(formatRow(headers))
|
||||
logger.lifecycle(separator)
|
||||
rows.each { row ->
|
||||
logger.lifecycle(formatRow(row))
|
||||
}
|
||||
logger.lifecycle(separator)
|
||||
|
||||
def htmlReport = reports.html.outputLocation.get().asFile
|
||||
logger.lifecycle("Detailed HTML report available at: ${htmlReport}")
|
||||
if (rows.any { it[3] == "FAIL" }) {
|
||||
logger.lifecycle("Some coverage targets were missed. Please review the detailed report above.")
|
||||
} else if (rows.any { it[3] == "PASS" }) {
|
||||
logger.lifecycle("Great job! All tracked coverage metrics meet their targets.")
|
||||
}
|
||||
logger.lifecycle("=================================\n")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named("build") {
|
||||
dependsOn jacocoReport
|
||||
}
|
||||
|
||||
jacocoTestCoverageVerification {
|
||||
dependsOn jacocoTestReport
|
||||
dependsOn jacocoReport
|
||||
violationRules {
|
||||
rule {
|
||||
enabled = true
|
||||
element = 'BUNDLE'
|
||||
// Bytecode-Anweisungen abgedeckt
|
||||
limit {
|
||||
minimum = 0.0
|
||||
counter = 'INSTRUCTION'
|
||||
value = 'COVEREDRATIO'
|
||||
minimum = 0.14
|
||||
}
|
||||
// wie viele Quellcode-Zeilen abgedeckt
|
||||
limit {
|
||||
counter = 'LINE'
|
||||
value = 'COVEREDRATIO'
|
||||
minimum = 0.16
|
||||
}
|
||||
// Verzweigungen (if/else, switch) abgedeckt; misst Logik-Abdeckung
|
||||
limit {
|
||||
counter = 'BRANCH'
|
||||
value = 'COVEREDRATIO'
|
||||
minimum = 0.09
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Supports MODE parameter: BOTH (default), FRONTEND, BACKEND
|
||||
|
||||
# Stage 1: Build Frontend
|
||||
FROM node:20-alpine AS frontend-build
|
||||
FROM node:20-alpine@sha256:658d0f63e501824d6c23e06d4bb95c71e7d704537c9d9272f488ac03a370d448 AS frontend-build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
@@ -15,7 +15,7 @@ COPY frontend .
|
||||
RUN DISABLE_ADDITIONAL_FEATURES=false VITE_API_BASE_URL=/ npm run build
|
||||
|
||||
# Stage 2: Build Backend (server-only JAR - no UI)
|
||||
FROM gradle:8.14-jdk21 AS backend-build
|
||||
FROM gradle:8.14-jdk21@sha256:051d9a116793bdc5175a3f97a545718b750489eee85a7da20913c8a53f722a72 AS backend-build
|
||||
|
||||
COPY build.gradle .
|
||||
COPY settings.gradle .
|
||||
@@ -35,7 +35,7 @@ RUN DISABLE_ADDITIONAL_FEATURES=false \
|
||||
./gradlew clean build -x spotlessApply -x spotlessCheck -x test -x sonarqube
|
||||
|
||||
# Stage 3: Final unified image
|
||||
FROM alpine:3.22.1
|
||||
FROM alpine:3.22.1@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1
|
||||
|
||||
ARG VERSION_TAG
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Supports MODE parameter: BOTH (default), FRONTEND, BACKEND
|
||||
|
||||
# Stage 1: Build Frontend
|
||||
FROM node:20-alpine AS frontend-build
|
||||
FROM node:20-alpine@sha256:658d0f63e501824d6c23e06d4bb95c71e7d704537c9d9272f488ac03a370d448 AS frontend-build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
@@ -15,7 +15,7 @@ COPY frontend .
|
||||
RUN DISABLE_ADDITIONAL_FEATURES=true VITE_API_BASE_URL=/ npm run build
|
||||
|
||||
# Stage 2: Build Backend
|
||||
FROM gradle:8.14-jdk21 AS backend-build
|
||||
FROM gradle:8.14-jdk21@sha256:051d9a116793bdc5175a3f97a545718b750489eee85a7da20913c8a53f722a72 AS backend-build
|
||||
|
||||
COPY build.gradle .
|
||||
COPY settings.gradle .
|
||||
@@ -34,7 +34,7 @@ RUN DISABLE_ADDITIONAL_FEATURES=true \
|
||||
./gradlew clean build -x spotlessApply -x spotlessCheck -x test -x sonarqube
|
||||
|
||||
# Stage 3: Final unified ultra-lite image
|
||||
FROM alpine:3.22.1
|
||||
FROM alpine:3.22.1@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1
|
||||
|
||||
ARG VERSION_TAG
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
# ========================================
|
||||
# STAGE 1: Build stage - Alpine with Gradle
|
||||
# ========================================
|
||||
FROM gradle:8.14-jdk21 AS build
|
||||
FROM gradle:8.14-jdk21@sha256:051d9a116793bdc5175a3f97a545718b750489eee85a7da20913c8a53f722a72 AS build
|
||||
|
||||
COPY build.gradle .
|
||||
COPY settings.gradle .
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
# ========================================
|
||||
# STAGE 1: Build stage - Gradle
|
||||
# ========================================
|
||||
FROM gradle:8.14-jdk21 AS build
|
||||
FROM gradle:8.14-jdk21@sha256:051d9a116793bdc5175a3f97a545718b750489eee85a7da20913c8a53f722a72 AS build
|
||||
|
||||
COPY build.gradle .
|
||||
COPY settings.gradle .
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# ========================================
|
||||
# STAGE 1: Build stage - Gradle
|
||||
# ========================================
|
||||
FROM gradle:8.14-jdk21 AS build
|
||||
FROM gradle:8.14-jdk21@sha256:051d9a116793bdc5175a3f97a545718b750489eee85a7da20913c8a53f722a72 AS build
|
||||
|
||||
COPY build.gradle .
|
||||
COPY settings.gradle .
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Single JAR contains both frontend and backend
|
||||
|
||||
# Stage 1: Build application with embedded frontend
|
||||
FROM gradle:8.14-jdk21 AS build
|
||||
FROM gradle:8.14-jdk21@sha256:051d9a116793bdc5175a3f97a545718b750489eee85a7da20913c8a53f722a72 AS build
|
||||
|
||||
# Install Node.js and npm for frontend build
|
||||
RUN apt-get update && apt-get install -y \
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Single JAR contains both frontend and backend with extra fonts for air-gapped environments
|
||||
|
||||
# Stage 1: Build application with embedded frontend
|
||||
FROM gradle:8.14-jdk21 AS build
|
||||
FROM gradle:8.14-jdk21@sha256:051d9a116793bdc5175a3f97a545718b750489eee85a7da20913c8a53f722a72 AS build
|
||||
|
||||
# Install Node.js and npm for frontend build
|
||||
RUN apt-get update && apt-get install -y \
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Single JAR contains both frontend and backend with minimal dependencies
|
||||
|
||||
# Stage 1: Build application with embedded frontend
|
||||
FROM gradle:8.14-jdk21 AS build
|
||||
FROM gradle:8.14-jdk21@sha256:051d9a116793bdc5175a3f97a545718b750489eee85a7da20913c8a53f722a72 AS build
|
||||
|
||||
# Install Node.js and npm for frontend build
|
||||
RUN apt-get update && apt-get install -y \
|
||||
@@ -36,7 +36,7 @@ RUN DISABLE_ADDITIONAL_FEATURES=true \
|
||||
./gradlew clean build -PbuildWithFrontend=true -x spotlessApply -x spotlessCheck -x test -x sonarqube
|
||||
|
||||
# Stage 2: Runtime image
|
||||
FROM alpine:3.22.1
|
||||
FROM alpine:3.22.1@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1
|
||||
|
||||
ARG VERSION_TAG
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Frontend Dockerfile - React/Vite application
|
||||
FROM node:20-alpine AS build
|
||||
FROM node:20-alpine@sha256:658d0f63e501824d6c23e06d4bb95c71e7d704537c9d9272f488ac03a370d448 AS build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
@@ -16,7 +16,7 @@ COPY frontend .
|
||||
RUN npm run build
|
||||
|
||||
# Production stage
|
||||
FROM nginx:alpine
|
||||
FROM nginx:alpine@sha256:8491795299c8e739b7fcc6285d531d9812ce2666e07bd3dd8db00020ad132295
|
||||
|
||||
# Copy built files from build stage
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
|
||||
@@ -14,17 +14,20 @@ echo "==================================="
|
||||
setup_ocr() {
|
||||
echo "Setting up OCR languages..."
|
||||
|
||||
# Copy tessdata
|
||||
mkdir -p /usr/share/tessdata
|
||||
cp -rn /usr/share/tessdata-original/* /usr/share/tessdata 2>/dev/null || true
|
||||
# In Alpine, tesseract uses /usr/share/tessdata
|
||||
TESSDATA_DIR="/usr/share/tessdata"
|
||||
|
||||
if [ -d /usr/share/tesseract-ocr/4.00/tessdata ]; then
|
||||
cp -r /usr/share/tesseract-ocr/4.00/tessdata/* /usr/share/tessdata 2>/dev/null || true
|
||||
# Create tessdata directory
|
||||
mkdir -p "$TESSDATA_DIR"
|
||||
|
||||
# Restore system languages from backup (Dockerfile moved them to tessdata-original)
|
||||
if [ -d /usr/share/tessdata-original ]; then
|
||||
echo "Restoring system tessdata from backup..."
|
||||
cp -rn /usr/share/tessdata-original/* "$TESSDATA_DIR"/ 2>/dev/null || true
|
||||
fi
|
||||
|
||||
if [ -d /usr/share/tesseract-ocr/5/tessdata ]; then
|
||||
cp -r /usr/share/tesseract-ocr/5/tessdata/* /usr/share/tessdata 2>/dev/null || true
|
||||
fi
|
||||
# Note: If user mounted custom languages to /usr/share/tessdata, they'll be overlaid here.
|
||||
# The cp -rn above won't overwrite user files, just adds missing system files.
|
||||
|
||||
# Install additional languages if specified
|
||||
if [[ -n "$TESSERACT_LANGS" ]]; then
|
||||
@@ -32,10 +35,15 @@ setup_ocr() {
|
||||
pattern='^[a-zA-Z]{2,4}(_[a-zA-Z]{2,4})?$'
|
||||
for LANG in $SPACE_SEPARATED_LANGS; do
|
||||
if [[ $LANG =~ $pattern ]]; then
|
||||
echo "Installing tesseract language: $LANG"
|
||||
apk add --no-cache "tesseract-ocr-data-$LANG" 2>/dev/null || true
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Point to the consolidated location
|
||||
export TESSDATA_PREFIX="$TESSDATA_DIR"
|
||||
echo "Using TESSDATA_PREFIX=$TESSDATA_PREFIX"
|
||||
}
|
||||
|
||||
# Function to setup user permissions (from init-without-ocr.sh)
|
||||
|
||||
Generated
+1099
-1405
File diff suppressed because it is too large
Load Diff
@@ -43,7 +43,7 @@
|
||||
"@supabase/supabase-js": "^2.47.13",
|
||||
"@tailwindcss/postcss": "^4.1.13",
|
||||
"@tanstack/react-virtual": "^3.13.12",
|
||||
"@tauri-apps/api": "^2.9.1",
|
||||
"@tauri-apps/api": "^2.5.0",
|
||||
"@tauri-apps/plugin-fs": "^2.4.0",
|
||||
"@tauri-apps/plugin-http": "^2.5.4",
|
||||
"@tauri-apps/plugin-shell": "^2.3.3",
|
||||
@@ -129,7 +129,7 @@
|
||||
"@iconify-json/material-symbols": "^1.2.48",
|
||||
"@iconify/utils": "^3.0.2",
|
||||
"@playwright/test": "^1.55.0",
|
||||
"@tauri-apps/cli": "^2.9.5",
|
||||
"@tauri-apps/cli": "^2.5.0",
|
||||
"@testing-library/dom": "^10.4.1",
|
||||
"@testing-library/jest-dom": "^6.8.0",
|
||||
"@testing-library/react": "^16.3.0",
|
||||
|
||||
@@ -441,6 +441,13 @@ currentVersion = "Current Version"
|
||||
latestVersion = "Latest Version"
|
||||
checkForUpdates = "Check for Updates"
|
||||
viewDetails = "View Details"
|
||||
serverNeedsUpdate = "Server needs to be updated by administrator"
|
||||
|
||||
[settings.general.versionInfo]
|
||||
title = "Version Information"
|
||||
description = "Desktop and server version details"
|
||||
desktop = "Desktop Version"
|
||||
server = "Server Version"
|
||||
|
||||
[settings.security]
|
||||
title = "Security"
|
||||
@@ -4277,6 +4284,8 @@ fetchError = "Failed to load settings"
|
||||
saveError = "Failed to save settings"
|
||||
saved = "Settings saved successfully"
|
||||
saveSuccess = "Settings saved successfully"
|
||||
success = "Settings saved successfully"
|
||||
error = "Failed to save settings"
|
||||
save = "Save Changes"
|
||||
discard = "Discard"
|
||||
restartRequired = "Restart Required"
|
||||
@@ -4543,6 +4552,19 @@ connect = "Connect"
|
||||
disconnect = "Disconnect"
|
||||
disconnected = "Provider disconnected successfully"
|
||||
disconnectError = "Failed to disconnect provider"
|
||||
mobileScannerConvertToPdf = "Convert Images to PDF"
|
||||
mobileScannerConvertToPdfDesc = "Automatically convert uploaded images to PDF format. If disabled, images will be kept as-is."
|
||||
mobileScannerImageResolution = "Image Resolution"
|
||||
mobileScannerImageResolutionDesc = "Resolution of uploaded images. \"Reduced\" scales images to max 1200px to reduce file size."
|
||||
imageResolutionFull = "Full (Original Size)"
|
||||
imageResolutionReduced = "Reduced (Max 1200px)"
|
||||
mobileScannerPageFormat = "Page Format"
|
||||
mobileScannerPageFormatDesc = "PDF page size for converted images. \"Keep\" uses original image dimensions."
|
||||
pageFormatKeep = "Keep (Original Dimensions)"
|
||||
pageFormatA4 = "A4 (210×297mm)"
|
||||
pageFormatLetter = "Letter (8.5×11in)"
|
||||
mobileScannerStretchToFit = "Stretch to Fit"
|
||||
mobileScannerStretchToFitDesc = "Stretch images to fill the entire page. If disabled, images are centered with preserved aspect ratio."
|
||||
|
||||
[admin.settings.connections.ssoAutoLogin]
|
||||
label = "SSO Auto Login"
|
||||
@@ -4617,6 +4639,19 @@ enable = "Enable QR Code Upload"
|
||||
description = "Allow users to upload files from mobile devices by scanning a QR code"
|
||||
note = "Note: Requires Frontend URL to be configured. "
|
||||
link = "Configure in System Settings"
|
||||
mobileScannerConvertToPdf = "Convert Images to PDF"
|
||||
mobileScannerConvertToPdfDesc = "Automatically convert uploaded images to PDF format. If disabled, images will be kept as-is."
|
||||
mobileScannerImageResolution = "Image Resolution"
|
||||
mobileScannerImageResolutionDesc = "Resolution of uploaded images. \"Reduced\" scales images to max 1200px to reduce file size."
|
||||
imageResolutionFull = "Full (Original Size)"
|
||||
imageResolutionReduced = "Reduced (Max 1200px)"
|
||||
mobileScannerPageFormat = "Page Format"
|
||||
mobileScannerPageFormatDesc = "PDF page size for converted images. \"Keep\" uses original image dimensions."
|
||||
pageFormatKeep = "Keep (Original Dimensions)"
|
||||
pageFormatA4 = "A4 (210×297mm)"
|
||||
pageFormatLetter = "Letter (8.5×11in)"
|
||||
mobileScannerStretchToFit = "Stretch to Fit"
|
||||
mobileScannerStretchToFitDesc = "Stretch images to fill the entire page. If disabled, images are centered with preserved aspect ratio."
|
||||
|
||||
[admin.settings.database]
|
||||
title = "Database"
|
||||
@@ -4990,6 +5025,7 @@ noRecentFiles = "No recent files found"
|
||||
googleDriveNotAvailable = "Google Drive integration not available"
|
||||
mobileUpload = "Mobile Upload"
|
||||
mobileShort = "Mobile"
|
||||
mobileUploadNotAvailable = "Mobile upload not enabled"
|
||||
downloadSelected = "Download Selected"
|
||||
saveSelected = "Save Selected"
|
||||
openFiles = "Open Files"
|
||||
@@ -6217,6 +6253,7 @@ description = "Enter the full URL of your self-hosted Stirling PDF server"
|
||||
|
||||
[setup.server.error]
|
||||
emptyUrl = "Please enter a server URL"
|
||||
invalidUrl = "Invalid URL format. Please enter a valid URL like https://your-server.com"
|
||||
unreachable = "Could not connect to server"
|
||||
testFailed = "Connection test failed"
|
||||
configFetch = "Failed to fetch server configuration. Please check the URL and try again."
|
||||
@@ -6463,7 +6500,8 @@ failed = "An error occurred while adding text to the PDF."
|
||||
|
||||
[mobileUpload]
|
||||
title = "Upload from Mobile"
|
||||
description = "Scan this QR code with your mobile device to upload photos directly to this page."
|
||||
description = "Scan to upload photos. Images auto-convert to PDF."
|
||||
descriptionNoConvert = "Scan to upload photos from your mobile device."
|
||||
error = "Connection Error"
|
||||
pollingError = "Error checking for files"
|
||||
sessionId = "Session ID"
|
||||
@@ -6472,7 +6510,8 @@ expiryWarning = "Session Expiring Soon"
|
||||
expiryWarningMessage = "This QR code will expire in {{seconds}} seconds. A new code will be generated automatically."
|
||||
filesReceived = "{{count}} file(s) received"
|
||||
connected = "Mobile device connected"
|
||||
instructions = "Open the camera app on your phone and scan this code. Files will be transferred directly between devices."
|
||||
instructions = "Scan with your phone camera. Images convert to PDF automatically."
|
||||
instructionsNoConvert = "Scan with your phone camera to upload files."
|
||||
|
||||
[mobileScanner]
|
||||
title = "Mobile Scanner"
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
unsavedChanges = "Tá athruithe gan sábháil agat ar do PDF."
|
||||
pendingRedactionsTitle = "Eagarthóireacht Neamhfheidhmithe"
|
||||
pendingRedactions = "Tá eagarthóireachtaí neamhfheidhmithe agat a chaillfear."
|
||||
areYouSure = "An bhfuil tú cinnte gur mian leat imeacht?"
|
||||
unsavedChangesTitle = "Athruithe Gan Sábháil"
|
||||
keepWorking = "Lean ort ag obair"
|
||||
discardChanges = "Caith uait & Fág"
|
||||
discardRedactions = "Scrios & Fág"
|
||||
applyAndContinue = "Sábháil & Fág"
|
||||
exportAndContinue = "Easpórtáil & Lean ar aghaidh"
|
||||
cancel = "Cealaigh"
|
||||
@@ -124,14 +127,14 @@ submit = "Cuir isteach"
|
||||
success = "D’éirigh leis"
|
||||
undoDataMismatch = "Ní féidir a chealú: tá sonraí na hoibríochta truaillithe"
|
||||
undoFailed = "Theip ar chealú na hoibríochta"
|
||||
undoQuotaError = "Ní féidir a chealú: níl dóthain spáis stórála ann"
|
||||
undoStorageError = "Críochnaíodh an cealú ach níorbh fhéidir roinnt comhad a shábháil sa stóras"
|
||||
undoSuccess = "Cealaíodh an oibríocht go rathúil"
|
||||
unsupported = "Ní thacaítear leis"
|
||||
undoQuotaError = "Ní féidir é a chealú: easpa spáis stórála"
|
||||
undoStorageError = "Cealú críochnaithe ach níorbh fhéidir roinnt comhad a shábháil chuig an stóras"
|
||||
undoSuccess = "Oibríocht cealaithe go rathúil"
|
||||
unsupported = "Gan tacaíocht"
|
||||
|
||||
[toolPanel]
|
||||
placeholder = "Roghnaigh uirlis chun tosú"
|
||||
alpha = "Alpha"
|
||||
alpha = "Alfa"
|
||||
premiumFeature = "Gné Préimhe:"
|
||||
comingSoon = "Ag teacht go luath:"
|
||||
|
||||
@@ -340,6 +343,10 @@ advance = "Casta"
|
||||
edit = "Féach ar & Cuir in Eagar"
|
||||
popular = "Coitianta"
|
||||
|
||||
[footer]
|
||||
discord = "Discord"
|
||||
issues = "GitHub"
|
||||
|
||||
[settings.preferences]
|
||||
title = "Sainroghanna"
|
||||
|
||||
@@ -435,6 +442,25 @@ latestVersion = "Leagan is Déanaí"
|
||||
checkForUpdates = "Seiceáil le haghaidh Nuashonruithe"
|
||||
viewDetails = "Féach Sonraí"
|
||||
|
||||
[settings.security]
|
||||
title = "Slándáil"
|
||||
description = "Nuashonraigh do phasfhocal chun do chuntas a choinneáil slán."
|
||||
|
||||
[settings.security.password]
|
||||
subtitle = "Athraigh do phasfhocal. Logálfar amach thú tar éis an nuashonraithe."
|
||||
required = "Tá gach réimse riachtanach."
|
||||
mismatch = "Ní hionann na pasfhocail nua."
|
||||
error = "Ní féidir an focal faire a nuashonrú. Fíoraigh do phasfhocal reatha agus déan iarracht arís."
|
||||
success = "Nuashonraíodh an focal faire go rathúil. Sínigh isteach arís le do thoil."
|
||||
ssoDisabled = "Déanann do sholáthraí aitheantais athruithe ar phasfhocail a bhainistiú."
|
||||
current = "Focal faire reatha"
|
||||
currentPlaceholder = "Cuir isteach do phasfhocal reatha"
|
||||
new = "Pasfhocal nua"
|
||||
newPlaceholder = "Cuir isteach focal faire nua"
|
||||
confirm = "Deimhnigh an focal faire nua"
|
||||
confirmPlaceholder = "Ath-iontráil do phasfhocal nua"
|
||||
update = "Nuashonraigh an focal faire"
|
||||
|
||||
[settings.hotkeys]
|
||||
title = "Aicearraí Méarchláir"
|
||||
description = "Saincheap aicearraí méarchláir chun rochtain thapa ar uirlisí. Cliceáil \"Athraigh aicearra\" agus brúigh teaglaim eochracha nua. Brúigh Esc chun cealú."
|
||||
@@ -488,11 +514,16 @@ low = "Íseal"
|
||||
title = "Athraigh Dintiúir"
|
||||
header = "Nuashonraigh Sonraí do Chuntais"
|
||||
changePassword = "Tá dintiúir réamhshocraithe logáil isteach á úsáid agat. Cuir isteach pasfhocal nua le do thoil"
|
||||
ssoManaged = "Déanann do sholáthraí aitheantais bainistíocht ar do chuntas."
|
||||
newUsername = "Ainm Úsáideora Nua"
|
||||
oldPassword = "Pasfhocal reatha"
|
||||
newPassword = "Focal Faire Nua"
|
||||
confirmNewPassword = "Deimhnigh Pasfhocal Nua"
|
||||
submit = "Cuir Athruithe isteach"
|
||||
credsUpdated = "Cuntas nuashonraithe"
|
||||
description = "Athruithe sábháilte. Logáil isteach arís le do thoil."
|
||||
error = "Ní féidir an t-ainm úsáideora a nuashonrú. Fíoraigh do phasfhocal agus déan iarracht arís."
|
||||
changeUsername = "Nuashonraigh d'ainm úsáideora. Logálfar amach thú tar éis an nuashonraithe."
|
||||
|
||||
[account]
|
||||
title = "Socruithe cuntas"
|
||||
@@ -704,7 +735,12 @@ title = "Braith & Roinn Grianghraif Scanta"
|
||||
desc = "Braith agus roinn grianghraif scanta ina leathanaigh ar leith"
|
||||
|
||||
[home.sign]
|
||||
tags = "síniú,uathshíniú"
|
||||
tags = "síniú, uathghraf"
|
||||
title = "Sínigh"
|
||||
desc = "Cuireann síniú le PDF trí líníocht, téacs nó íomhá"
|
||||
|
||||
[home.annotate]
|
||||
tags = "anótáil, aibhsigh, tarraing"
|
||||
title = "Comhartha"
|
||||
desc = "Cuireann síniú le PDF trí líníocht, téacs nó íomhá"
|
||||
|
||||
@@ -922,14 +958,15 @@ title = "Eagarthóir Téacs PDF"
|
||||
desc = "Cuir téacs agus íomhánna atá ann cheana in eagar laistigh de PDFanna"
|
||||
|
||||
[home.addText]
|
||||
tags = "téacs,anótáil,lipéad"
|
||||
title = "Cuir Téacs Leis"
|
||||
tags = "annotate,highlight,draw"
|
||||
title = "Annotate"
|
||||
desc = "Cuir téacs saincheaptha in áit ar bith i do PDF"
|
||||
|
||||
[landing]
|
||||
addFiles = "Cuir Comhaid Leis"
|
||||
uploadFromComputer = "Uaslódáil ón ríomhaire"
|
||||
openFromComputer = "Oscail ón ríomhaire"
|
||||
mobileUpload = "Uaslódáil ó Shoghluaiste"
|
||||
|
||||
[viewPdf]
|
||||
tags = "amharc, léamh, anótáil, téacs, íomhá"
|
||||
@@ -1104,10 +1141,10 @@ bullet3 = "Scoilfidh an córas ag teorainneacha leathanaigh"
|
||||
|
||||
[split.tooltip.byCount]
|
||||
title = "Scoilt de réir Líon"
|
||||
text = "Cruthaigh il‑PDFanna le líon sonrach leathanach nó cáipéisí an ceann."
|
||||
text = "Cruthaigh il-PDFanna le líon sonrach leathanach nó doiciméad an ceann."
|
||||
bullet1 = "Líon Leathanach: Líon seasta leathanach in aghaidh an chomhaid"
|
||||
bullet2 = "Líon Cáipéisí: Líon seasta comhad aschuir"
|
||||
bullet3 = "Úsáideach do shreafaí oibre baisc‑phróiseála"
|
||||
bullet2 = "Líon na nDoiciméad: Líon socraithe comhad aschuir"
|
||||
bullet3 = "Úsáideach le haghaidh sreafaí oibre próiseála baisce"
|
||||
|
||||
[split.tooltip.byChapters]
|
||||
title = "Scoilt de réir Caibidlí"
|
||||
@@ -1244,7 +1281,22 @@ errorConversion = "Tharla earráid agus an comhad á thiontú."
|
||||
cbzOptions = "Roghanna CBZ go PDF"
|
||||
optimizeForEbook = "Optamaigh PDF do léitheoirí ríomhleabhar (úsáideann Ghostscript)"
|
||||
cbzOutputOptions = "Roghanna PDF go CBZ"
|
||||
cbzDpi = "DPI do rindreáil íomhá"
|
||||
cbzDpi = "DPI le haghaidh rindreáil íomhá"
|
||||
cbrOptions = "CRoghanna BR"
|
||||
cbrOutputOptions = "Roghanna PDF go CBR"
|
||||
cbrDpi = "DPI le haghaidh rindreáil íomhá"
|
||||
|
||||
[convert.ebookOptions]
|
||||
ebookOptions = "Roghanna ríomhleabhar go PDF"
|
||||
ebookOptionsDesc = "Roghanna chun ríomhleabhair a thiontú go PDF"
|
||||
embedAllFonts = "Leabaigh gach cló"
|
||||
embedAllFontsDesc = "Cuir na clónna uile ón ríomhleabhar isteach sa PDF a ghintear"
|
||||
includeTableOfContents = "Cuir clár ábhair san áireamh"
|
||||
includeTableOfContentsDesc = "Cuir clár ábhair ginte leis an PDF a eascraíonn as"
|
||||
includePageNumbers = "Cuir uimhreacha leathanach san áireamh"
|
||||
includePageNumbersDesc = "Cuir uimhreacha leathanach leis an PDF ginte"
|
||||
optimizeForEbookPdf = "Optamaigh do léitheoirí ríomhleabhar"
|
||||
optimizeForEbookPdfDesc = "An PDF a bharrfheabhsú le haghaidh léamh ríomhleabhar (méid comhaid níos lú, rindreáil níos fearr ar ghléasanna eInk)"
|
||||
|
||||
[imageToPdf]
|
||||
tags = "comhshó, img, jpg, pictiúr, grianghraf"
|
||||
@@ -1356,12 +1408,17 @@ defaultImageLabel = "Íomhá uaslódáilte"
|
||||
|
||||
[attachments]
|
||||
tags = "embed,attach,file,attachment,attachments"
|
||||
title = "Add attachments"
|
||||
header = "Add attachments"
|
||||
title = "Cuir Ceangaltáin leis"
|
||||
header = "Cuir Ceangaltáin leis"
|
||||
add = "Cuir Iatán Leis"
|
||||
remove = "Bain Iatán"
|
||||
embed = "Leabaigh Iatán"
|
||||
submit = "Add attachments"
|
||||
embed = "Leabaigh an Ceangaltán"
|
||||
convertToPdfA3b = "Tiontaigh go PDF/A-3b"
|
||||
convertToPdfA3bDescription = "Cruthaíonn sé PDF cartlannaithe le ceangaltáin leabaithe"
|
||||
convertToPdfA3bTooltip = "Is formáid chartlainne í PDF/A-3b a chinntíonn caomhnú fadtéarmach. Ceadaíonn sí formáidí comhaid treallacha a leabú mar cheangaltáin. Éilíonn an comhshó Ghostscript agus d’fhéadfadh sé go dtógfadh sé níos faide i gcás comhad mór."
|
||||
convertToPdfA3bTooltipHeader = "Maidir le Comhshó PDF/A-3b"
|
||||
convertToPdfA3bTooltipTitle = "Cad a dhéanann sé"
|
||||
submit = "Cuir Ceangaltáin leis"
|
||||
|
||||
[watermark]
|
||||
title = "Cuir Uisce leis"
|
||||
@@ -1496,9 +1553,9 @@ bullet3 = "Coinníonn íomhánna ar ardtaifeach an cháilíocht níos fearr"
|
||||
[watermark.tooltip.file.recommendations]
|
||||
title = "Cleachtais is Fearr"
|
||||
text = "Leideanna le haghaidh torthaí optamacha i gcomharthaí uisce íomhá."
|
||||
bullet1 = "Úsáid lógónna nó stampaí le cúlraí trédhearcacha"
|
||||
bullet1 = "Bain úsáid as lógónna nó stampaí le cúlraí trédhearcacha"
|
||||
bullet2 = "Oibríonn dearaí simplí níos fearr ná íomhánna casta"
|
||||
bullet3 = "Smaoinigh ar mhéid deiridh an doiciméid agus taifeach á roghnú"
|
||||
bullet3 = "Smaoinigh ar mhéid deiridh an doiciméid agus tú ag roghnú taifeach"
|
||||
|
||||
[watermark.tooltip.formatting.header]
|
||||
title = "Formáidiú agus Leagan Amach"
|
||||
@@ -1517,8 +1574,8 @@ bullet3 = "Cruthaíonn teimhneacht níos ísle comharthaí uisce níos míne"
|
||||
|
||||
[watermark.tooltip.formatting.spacing]
|
||||
title = "Rialú Spásála"
|
||||
text = "Coigeartaigh an spásáil idir comharthaí uisce athchleachtaithe ar fud an leathanaigh."
|
||||
bullet1 = "Spásáil chothrománach: Fad idir comharthaí uisce ó chlé go deas"
|
||||
text = "Coigeartaigh an spásáil idir uiscemharcanna athuair ar fud an leathanaigh."
|
||||
bullet1 = "Spásáil chothrománach: An fad idir na huiscemharcanna ó chlé go deas"
|
||||
bullet2 = "Spásáil ingearach: Fad idir comharthaí uisce ó bharr go bun"
|
||||
bullet3 = "Cruthaíonn luachanna níos airde patrúin níos scaipthe"
|
||||
|
||||
@@ -1526,9 +1583,9 @@ bullet3 = "Cruthaíonn luachanna níos airde patrúin níos scaipthe"
|
||||
title = "Rogha Slándála"
|
||||
text = "Tiontaigh an PDF deiridh go formáid bunaithe ar íomhánna ar mhaithe le slándáil fheabhsaithe."
|
||||
bullet1 = "Coscann sé roghnú téacs agus cóipeáil"
|
||||
bullet2 = "Déanann sé comharthaí uisce níos deacra a bhaint"
|
||||
bullet3 = "Mar thoradh air sin tá méideanna comhaid níos mó"
|
||||
bullet4 = "Is fearr d’ábhar íogair nó faoi chóipcheart"
|
||||
bullet2 = "Déanann sé níos deacra uiscemharcanna a bhaint"
|
||||
bullet3 = "Torthaí i méideanna comhaid níos mó"
|
||||
bullet4 = "Is fearr le haghaidh ábhar íogair nó cóipchirt"
|
||||
|
||||
[watermark.type]
|
||||
1 = "Téacs"
|
||||
@@ -2190,11 +2247,11 @@ useCase2 = "Roinn baisceanna leaba chothrom ina gcomhaid ar leith"
|
||||
useCase3 = "Bris colláisí ina ngrianghraif aonair"
|
||||
useCase4 = "Tarraing grianghraif ó dhoiciméid"
|
||||
quickFixes = "Deisiúcháin thapa"
|
||||
problem1 = "Ní braitheadh grianghraif → méadaigh Tolerance go 30-50"
|
||||
problem2 = "An iomarca braiteanna bréagacha → méadaigh Minimum Area go 15,000-20,000"
|
||||
problem3 = "Tá barróga rómhall → méadaigh Border Size go 5-10"
|
||||
problem4 = "Ní dhírítear grianghraif claonta → ísligh Angle Threshold go ~5°"
|
||||
problem5 = "Boscaí deannaigh/torainn → méadaigh Minimum Contour Area go 1000-2000"
|
||||
problem1 = "Grianghraif gan bhrath → méadaigh an Lamháltas go 30-50"
|
||||
problem2 = "An iomarca braite bréagacha → méadaigh an Limistéar Íosta go 15,000-20,000"
|
||||
problem3 = "Tá na bearrtha ró-dhlúth → méadaigh Méid na Teorann go 5-10"
|
||||
problem4 = "Grianghraif chlaonta gan a bheith díreach → ísligh an Tairseach Uillinne go ~5°"
|
||||
problem5 = "Boscaí deannaigh/torainn → méadaigh an Limistéar Comhrian Íosta go 1000-2000"
|
||||
setupTips = "Leideanna socraithe"
|
||||
tip1 = "Úsáid cúlra éadrom, simplí"
|
||||
tip2 = "Fág bearna bheag (≈1 cm) idir grianghraif"
|
||||
@@ -2306,6 +2363,10 @@ saved = "Sábháilte"
|
||||
label = "Uaslódáil íomhá sínithe"
|
||||
placeholder = "Roghnaigh comhad íomhá"
|
||||
hint = "Uaslódáil íomhá PNG nó JPG de do shíniú"
|
||||
backgroundRemovalFailedMessage = "Níorbh fhéidir an cúlra a bhaint den íomhá. Íomhá bhunaidh á húsáid ina ionad."
|
||||
backgroundRemovalFailedTitle = "Theip ar bhaint an chúlra"
|
||||
processing = "Íomhá á phróiseáil..."
|
||||
removeBackground = "Bain an cúlra bán (déan trédhearcach)"
|
||||
|
||||
[sign.instructions]
|
||||
title = "Conas síniú a chur leis"
|
||||
@@ -2351,6 +2412,11 @@ note = "Baineann maolú eilimintí idirghníomhacha ón PDF, rud a fhágann nach
|
||||
label = "Flatten foirmeacha amháin"
|
||||
desc = "Maolaigh réimsí foirme amháin, fág eilimintí idirghníomhacha eile slán"
|
||||
|
||||
[flatten.renderDpi]
|
||||
label = "DPI rindreála (roghnach, molta 150 DPI)"
|
||||
help = "Fág bán chun réamhshocrú an chórais a úsáid. Géaraíonn DPI níos airde an t-aschur ach méadaíonn sé an t-am próiseála agus méid an chomhaid."
|
||||
placeholder = "m.sh. 150"
|
||||
|
||||
[flatten.results]
|
||||
title = "Torthaí Maolaithe"
|
||||
|
||||
@@ -2376,6 +2442,8 @@ bullet2 = "Oibríonn naisc fós nuair a chliceáiltear orthu"
|
||||
bullet3 = "Fanann nótaí agus tráchtanna le feiceáil"
|
||||
bullet4 = "Cabhraíonn leabharmharcanna leat nascleanúint a dhéanamh fós"
|
||||
|
||||
|
||||
|
||||
[repair]
|
||||
tags = "deisiú, athchóiriú, ceartú, aisghabháil"
|
||||
title = "Deisiúchán"
|
||||
@@ -2813,10 +2881,10 @@ bullet3 = "Nuair a fhilltear & a chairnítear: Léamh 1→2→3→4→5→6→7
|
||||
[bookletImposition.tooltip.printing]
|
||||
title = "Conas a Chlódófar & a Chruaifear"
|
||||
text = "Lean na céimeanna seo le haghaidh leabhrán foirfe:"
|
||||
bullet1 = "Clóigh dhá thaobh le 'Flip on long edge'"
|
||||
bullet1 = "Priontáil déthaobhach le 'Flip ar an imeall fada'"
|
||||
bullet2 = "Carn na bileoga in ord, fill ina leath"
|
||||
bullet3 = "Grádaigh nó ceangail feadh an droma fhillte"
|
||||
bullet4 = "Do phrintéirí imeall gearr: Cumasaigh an rogha 'Flip on short edge'"
|
||||
bullet4 = "I gcás printéirí imeall gearr: Cumasaigh an rogha 'Flip ar an imeall gearr'"
|
||||
|
||||
[bookletImposition.tooltip.manualDuplex]
|
||||
title = "Dúphléacs Láimhe (Printéirí Aon-taobh)"
|
||||
@@ -2857,8 +2925,8 @@ label = "Fachtóir Scála"
|
||||
[adjustPageScale.pageSize]
|
||||
label = "Spriocmhéid Leathanaigh"
|
||||
keep = "Coinnigh an méid bunaidh"
|
||||
letter = "Letter"
|
||||
legal = "Legal"
|
||||
letter = "Litir"
|
||||
legal = "Dlíthiúil"
|
||||
|
||||
[adjustPageScale.error]
|
||||
failed = "Tharla earráid agus scála na leathanach á choigeartú."
|
||||
@@ -2925,6 +2993,7 @@ header = "PDF a ghearradh"
|
||||
submit = "Cuir isteach"
|
||||
noFileSelected = "Roghnaigh comhad PDF chun tosú ar bhearradh"
|
||||
reset = "Athshocraigh go PDF iomlán"
|
||||
autoCrop = "Spás bán a bhearradh go huathoibríoch"
|
||||
|
||||
[crop.preview]
|
||||
title = "Roghnú Limistéir Bhearrtha"
|
||||
@@ -3158,6 +3227,7 @@ automaticDesc = "Ceil téacs bunaithe ar théarmaí cuardaigh"
|
||||
manual = "Láimhe"
|
||||
manualDesc = "Cliceáil agus tarraing chun limistéir shonracha a cheilt"
|
||||
manualComingSoon = "Ceilt láimhe ag teacht go luath"
|
||||
automaticDisabledTooltip = "Roghnaigh comhaid sa bhainisteoir comhad chun comhaid iolracha a cheilt ag an am céanna"
|
||||
|
||||
[redact.auto]
|
||||
header = "Ceilt Uathoibríoch"
|
||||
@@ -3223,13 +3293,40 @@ text = "Ní mheaitseálfar ach focail iomlána, ní meaitseálacha páirteacha.
|
||||
|
||||
[redact.tooltip.advanced.convert]
|
||||
title = "Tiontaigh go PDF-Image"
|
||||
text = "Tiontaíonn sé an PDF go PDF bunaithe ar íomhá tar éis ceilte. Cinntíonn sé seo go mbaintear téacs taobh thiar de bhoscaí ceilte go hiomlán agus nach féidir é a ghnóthú."
|
||||
text = "Athraíonn sé an PDF go PDF bunaithe ar íomhá tar éis eagarthóireachta. Cinntíonn sé seo go mbaintear téacs taobh thiar de bhoscaí eagarthóireachta go hiomlán agus nach féidir é a aisghabháil."
|
||||
|
||||
[redact.tooltip.manual.header]
|
||||
title = "Rialuithe Eagarthóireachta Láimhe"
|
||||
|
||||
[redact.tooltip.manual.markText]
|
||||
title = "Uirlis Téacs Marcála"
|
||||
text = "Roghnaigh téacs go díreach ar an PDF chun é a mharcáil le haghaidh eagarthóireachta. Cliceáil agus tarraing chun téacs ar leith ar mhaith leat a chealú a aibhsiú."
|
||||
|
||||
[redact.tooltip.manual.markArea]
|
||||
title = "Uirlis Limistéir Mharcáilte"
|
||||
text = "Tarraing limistéir dhronuilleogacha ar an PDF chun réigiúin a mharcáil le haghaidh eagarthóireachta. Úsáideach chun íomhánna, sínithe, nó cruthanna neamhrialta a cheilt."
|
||||
|
||||
[redact.tooltip.manual.apply]
|
||||
title = "Cuir Eagarthóireacht i bhFeidhm"
|
||||
text = "Tar éis duit ábhar a mharcáil, cliceáil 'Cuir i bhFeidhm' chun na réimsí marcáilte go léir a cheilt go buan. Taispeánann an comhaireamh atá ar feitheamh cé mhéad cheilt atá réidh le cur i bhfeidhm."
|
||||
bullet1 = "Marcáil an oiread limistéar agus is gá sula gcuirtear i bhfeidhm é"
|
||||
bullet2 = "Cuirtear gach eagarthóireacht atá ar feitheamh i bhfeidhm ag an am céanna"
|
||||
bullet3 = "Ní féidir eagarthóireachtaí a chealú tar éis iad a chur i bhfeidhm"
|
||||
|
||||
[redact.manual]
|
||||
header = "Ceilt Láimhe"
|
||||
textBasedRedaction = "Ceilt bunaithe ar théacs"
|
||||
pageBasedRedaction = "Ceilt bunaithe ar leathanach"
|
||||
convertPDFToImageLabel = "Tiontaigh PDF go PDF-Image (Úsáidtear chun téacs taobh thiar den bhosca a bhaint)"
|
||||
title = "Uirlisí Eagarthóireachta"
|
||||
instructions = "Roghnaigh téacs nó tarraing limistéir ar an PDF chun ábhar a mharcáil le haghaidh eagarthóireachta."
|
||||
markText = "Marcáil Téacs"
|
||||
markArea = "Marcáil Limistéar"
|
||||
pendingLabel = "Ar feitheamh:"
|
||||
applyWarning = "⚠️ Feidhmchlár buan, ní féidir é a chealú agus scriosfar na sonraí faoi."
|
||||
apply = "Cuir isteach"
|
||||
noMarks = "Gan aon mharcanna eagarthóireachta. Bain úsáid as na huirlisí thuas chun ábhar a mharcáil le haghaidh eagarthóireachta."
|
||||
header = "Eagarthóireacht Láimhe"
|
||||
controlsTitle = "Rialuithe Eagarthóireachta Láimhe"
|
||||
textBasedRedaction = "Eagarthóireacht Téacsbhunaithe"
|
||||
pageBasedRedaction = "Eagarthóireacht Leathanachbhunaithe"
|
||||
convertPDFToImageLabel = "Tiontaigh PDF go PDF-Íomhá (Úsáidtear é chun téacs taobh thiar den bhosca a bhaint)"
|
||||
export = "Easpórtáil"
|
||||
upload = "Uaslódáil"
|
||||
boxRedaction = "Ceilt trí bhosca a tharraingt"
|
||||
@@ -3342,6 +3439,19 @@ placeholder = "Cuir isteach líon na rannán cothrománach"
|
||||
label = "Rannáin Ingearach"
|
||||
placeholder = "Cuir isteach líon na rannáin ingearacha"
|
||||
|
||||
[split-by-sections.splitMode]
|
||||
label = "Mód Scoilte"
|
||||
description = "Roghnaigh conas na leathanaigh a roinnt"
|
||||
splitAll = "Scoilt na leathanaigh uile"
|
||||
splitAllExceptFirst = "Roinn gach rud seachas an chéad cheann"
|
||||
splitAllExceptLast = "Roinn gach rud seachas an ceann deireanach"
|
||||
splitAllExceptFirstAndLast = "Roinn gach rud seachas an chéad cheann agus an ceann deireanach"
|
||||
custom = "Leathanaigh saincheaptha"
|
||||
|
||||
[split-by-sections.customPages]
|
||||
label = "Uimhreacha Leathanaigh Saincheaptha"
|
||||
placeholder = "m.sh. 2,4,6"
|
||||
|
||||
[AddStampRequest]
|
||||
tags = "Stampa, Cuir íomhá, íomhá lár, Uisce, PDF, Leabú, Saincheap"
|
||||
header = "Stampa PDF"
|
||||
@@ -3481,7 +3591,7 @@ certHint = "Uaslódáil teastas X.509 iontaofa le bailíochtú i gcoinne foinse
|
||||
title = "Socruithe Bailíochtaithe"
|
||||
|
||||
[replaceColor]
|
||||
tags = "Ionadaigh Dath,Oibríochtaí Leathanaigh,Back end,server side"
|
||||
tags = "Athsholáthar Dath, Oibríochtaí Leathanaigh, Cúlchríoch, Taobh an Fhreastalaí"
|
||||
|
||||
[replaceColor.labels]
|
||||
settings = "Socruithe"
|
||||
@@ -3520,7 +3630,7 @@ bullet2 = "Dath cúlra - Socraigh dath cúlra an doiciméid"
|
||||
|
||||
[replaceColor.tooltip.cmyk]
|
||||
title = "Tiontaigh go CMYK"
|
||||
text = "Tiontaigh an PDF ó spás datha RGB go spás datha CMYK, optamaithe le haghaidh priontála gairmiúla. Tiontaíonn an próiseas seo dathanna go samhail Cyan, Magenta, Yellow, Black a úsáideann printéirí."
|
||||
text = "Tiontaigh an PDF ó spás dathanna RGB go spás dathanna CMYK, atá optamaithe le haghaidh priontála gairmiúla. Tiontaíonn an próiseas seo dathanna go dtí an tsamhail Cian, Magenta, Buí, Dubh a úsáideann printéirí."
|
||||
|
||||
[replaceColor.error]
|
||||
failed = "Tharla earráid agus ionadú datha á phróiseáil."
|
||||
@@ -3539,8 +3649,8 @@ signinTitle = "Sínigh isteach le do thoil"
|
||||
ssoSignIn = "Logáil isteach trí Chlárú Aonair"
|
||||
oAuth2AutoCreateDisabled = "OAUTH2 Uath-Chruthaigh Úsáideoir faoi Mhíchumas"
|
||||
oAuth2AdminBlockedUser = "Tá bac faoi láthair ar chlárú nó logáil isteach úsáideoirí neamhchláraithe. Déan teagmháil leis an riarthóir le do thoil."
|
||||
oAuth2RequiresLicense = "Teastaíonn ceadúnas íoctha (Server nó Enterprise) chun logáil isteach le OAuth/SSO. Déan teagmháil leis an riarthóir chun do phlean a uasghrádú."
|
||||
saml2RequiresLicense = "Teastaíonn ceadúnas íoctha (Server nó Enterprise) chun logáil isteach le SAML. Déan teagmháil leis an riarthóir chun do phlean a uasghrádú."
|
||||
oAuth2RequiresLicense = "Éilíonn logáil isteach OAuth/SSO ceadúnas Freastalaí nó Fiontraíochta. Téigh i dteagmháil leis an riarthóir le do phlean a uasghrádú."
|
||||
saml2RequiresLicense = "Éilíonn logáil isteach SAML ceadúnas Fiontraíochta. Téigh i dteagmháil leis an riarthóir le do phlean a uasghrádú."
|
||||
maxUsersReached = "Sroicheadh an líon uasta úsáideoirí do do cheadúnas reatha. Déan teagmháil leis an riarthóir chun do phlean a uasghrádú nó suíocháin bhreise a chur leis."
|
||||
oauth2RequestNotFound = "Níor aimsíodh iarratas údaraithe"
|
||||
oauth2InvalidUserInfoResponse = "Freagra Neamhbhailí Faisnéise Úsáideora"
|
||||
@@ -3692,7 +3802,7 @@ title = "PDF Coigeartaithe"
|
||||
title = "Comhbhrúigh"
|
||||
desc = "Comhbhrúigh PDFanna chun a méid comhaid a laghdú."
|
||||
header = "Comhbhrúigh PDF"
|
||||
credit = "Úsáideann an tseirbhís seo qpdf le haghaidh Comhbhrú/Optimization PDF."
|
||||
credit = "Úsáideann an tseirbhís seo qpdf le haghaidh Comhbhrú/Optamú PDF."
|
||||
submit = "Comhbhrúigh"
|
||||
|
||||
[compress.method]
|
||||
@@ -3703,6 +3813,19 @@ filesize = "Méid an Chomhaid"
|
||||
[compress.grayscale]
|
||||
label = "Cuir Scála Liath i bhFeidhm le Comhbhrú"
|
||||
|
||||
[compress.linearize]
|
||||
label = "Líneáil PDF le haghaidh féachana gréasáin thapa"
|
||||
|
||||
[compress.lineArt]
|
||||
label = "Íomhánna a thiontú go healaín líne"
|
||||
description = "Úsáideann sé ImageMagick chun leathanaigh a laghdú go dubh agus bán ardchodarsnachta chun an laghdú méide is mó is féidir a bhaint amach."
|
||||
unavailable = "Níl ImageMagick suiteáilte ná cumasaithe ar an bhfreastalaí seo"
|
||||
detailLevel = "Leibhéal mionsonraí"
|
||||
edgeEmphasis = "Béim imeall"
|
||||
edgeLow = "Séimh"
|
||||
edgeMedium = "Cothromaithe"
|
||||
edgeHigh = "Láidir"
|
||||
|
||||
[compress.tooltip.header]
|
||||
title = "Forbhreathnú ar Shocruithe Comhbhrúite"
|
||||
|
||||
@@ -3720,6 +3843,10 @@ bullet2 = "Laghdaíonn luachanna níos airde an méid comhaid"
|
||||
title = "Liathscála"
|
||||
text = "Roghnaigh an rogha seo chun gach íomhá a thiontú go dubh agus bán, rud a d'fhéadfadh méid an chomhaid a laghdú go mór, go háirithe do PDFanna scanta nó do dhoiciméid lán d’íomhánna."
|
||||
|
||||
[compress.tooltip.lineArt]
|
||||
text = "Tiontaigh leathanaigh go dubh agus bán ardchodarsnachta ag baint úsáide as ImageMagick. Bain úsáid as leibhéal mionsonraí chun rialú a dhéanamh ar cé mhéad ábhair a thagann chun bheith dubh, agus béim imeall chun rialú a dhéanamh ar cé chomh ionsaitheach agus a bhraitear imill."
|
||||
title = "Ealaín Líne"
|
||||
|
||||
[compress.error]
|
||||
failed = "Tharla earráid agus an PDF á chomhbhrú."
|
||||
|
||||
@@ -3732,6 +3859,11 @@ failed = "Tharla earráid agus an PDF á chomhbhrú."
|
||||
_value = "Socruithe Comhbhrúite"
|
||||
1 = "1-3 comhbhrú PDF,</br> 4-6 comhbhrú éadrom íomhá,</br> 7-9 comhbhrú dian íomhá Laghdóidh sé cáilíocht na n-íomhánna go mór"
|
||||
|
||||
[compress.compressionLevel]
|
||||
range1to3 = "Coinníonn luachanna níos ísle cáilíocht ach bíonn comhaid níos mó mar thoradh orthu"
|
||||
range4to6 = "Comhbhrú meánach le laghdú measartha ar cháilíocht"
|
||||
range7to9 = "Laghdaíonn luachanna níos airde méid an chomhaid go suntasach ach d’fhéadfadh soiléireacht na híomhá a laghdú"
|
||||
|
||||
[decrypt]
|
||||
passwordPrompt = "Tá an comhad seo cosanta ag pasfhocal. Cuir isteach an pasfhocal le do thoil:"
|
||||
cancelled = "Cealaíodh an oibríocht le haghaidh PDF: {0}"
|
||||
@@ -3885,7 +4017,7 @@ showPreferencesBtn = "Bainistigh sainroghanna"
|
||||
|
||||
[cookieBanner.popUp.description]
|
||||
1 = "Úsáidimid fianáin agus teicneolaíochtaí eile chun Stirling PDF a dhéanamh níos fearr duit—ag cabhrú linn ár n-uirlisí a fheabhsú agus gnéithe a thógáil a thaitneoidh leat."
|
||||
2 = "If you’d rather not, clicking 'No Thanks' will only enable the essential cookies needed to keep things running smoothly."
|
||||
2 = "Mura mian leat, ní chuirfear ar chumas ach na fianáin riachtanacha atá riachtanach chun go n-oibreoidh rudaí go réidh má chliceálann tú ar 'Níl Go raibh maith agat'."
|
||||
|
||||
[cookieBanner.preferencesModal]
|
||||
title = "Lárionad Sainroghanna Toilithe"
|
||||
@@ -3902,7 +4034,7 @@ subtitle = "Úsáid Fianáin"
|
||||
3 = "Tá do phríobháideachas agus do mhuinín i gcroílár ár gcuid oibre."
|
||||
|
||||
[cookieBanner.preferencesModal.necessary]
|
||||
description = "These cookies are essential for the website to function properly. They enable core features like setting your privacy preferences, logging in, and filling out forms—which is why they can’t be turned off."
|
||||
description = "Tá na fianáin seo riachtanach chun go bhfeidhmeoidh an suíomh Gréasáin i gceart. Cuireann siad gnéithe lárnacha ar chumas amhail do chuid roghanna príobháideachais a shocrú, logáil isteach agus foirmeacha a líonadh—agus is é sin an fáth nach féidir iad a mhúchadh."
|
||||
|
||||
[cookieBanner.preferencesModal.necessary.title]
|
||||
1 = "Fianáin Riachtanacha go Docht"
|
||||
@@ -3913,8 +4045,8 @@ title = "Anailísíocht"
|
||||
description = "Cuidíonn na fianáin seo linn a thuiscint conas a úsáidtear ár n-uirlisí, ionas gur féidir linn díriú ar na gnéithe is tábhachtaí dár bpobal a thógáil. Bí cinnte—ní féidir le Stirling PDF agus ní dhéanfaidh sé riamh ábhar na ndoiciméad a n-oibríonn tú leo a rianú."
|
||||
|
||||
[cookieBanner.services]
|
||||
posthog = "PostHog Analytics"
|
||||
scarf = "Scarf Pixel"
|
||||
posthog = "Anailísíocht PostHog"
|
||||
scarf = "Scairf Picteilín"
|
||||
|
||||
[removeMetadata]
|
||||
submit = "Bain Meiteashonraí"
|
||||
@@ -3970,23 +4102,98 @@ selectByNumber = "Roghnaigh de réir Uimhreacha Leathanaigh"
|
||||
deleteSelected = "Scrios na Leathanaigh Roghnaithe"
|
||||
closePdf = "Dún an PDF"
|
||||
exportAll = "Easpórtáil an PDF"
|
||||
downloadSelected = "Íoslódáil na Comhaid Roghnaithe"
|
||||
downloadAll = "Íoslódáil Uile"
|
||||
saveAll = "Sábháil Uile"
|
||||
toggleTheme = "Athraigh an Téama"
|
||||
toggleBookmarks = "Scoránaigh Leabharmharcanna"
|
||||
downloadSelected = "Íoslódáil Comhaid Roghnaithe"
|
||||
annotations = "Anótálacha"
|
||||
exportSelected = "Easpórtáil Leathanaigh Roghnaithe"
|
||||
saveChanges = "Sábháil Athruithe"
|
||||
toggleTheme = "Téama a Athsholáthar"
|
||||
language = "Teanga"
|
||||
search = "Cuardaigh an PDF"
|
||||
panMode = "Mód Pánála"
|
||||
toggleAnnotations = "Infheictheacht Anótálacha a Athrú"
|
||||
search = "Cuardaigh PDF"
|
||||
panMode = "Mód Pan"
|
||||
applyRedactionsFirst = "Cuir eagarthóireachtaí i bhfeidhm ar dtús"
|
||||
rotateLeft = "Rothlaigh ar Chlé"
|
||||
rotateRight = "Rothlaigh ar Dheis"
|
||||
toggleSidebar = "Athraigh an Barra Taoibh"
|
||||
exportSelected = "Easpórtáil na Leathanaigh Roghnaithe"
|
||||
toggleAnnotations = "Athraigh Infheictheacht Anótálacha"
|
||||
annotationMode = "Athraigh Mód Anótála"
|
||||
toggleSidebar = "Barra Taobh a Athraigh"
|
||||
toggleBookmarks = "Leabharmharcanna a Athsholáthar"
|
||||
print = "Priontáil PDF"
|
||||
draw = "Tarraing"
|
||||
redact = "Leasaigh"
|
||||
exitRedaction = "Scoir Mód Eagarthóireachta"
|
||||
save = "Sábháil"
|
||||
downloadAll = "Íoslódáil Gach Rud"
|
||||
saveAll = "Sábháil Uile"
|
||||
|
||||
[textAlign]
|
||||
left = "Ar chlé"
|
||||
center = "Lár"
|
||||
right = "Ar dheis"
|
||||
|
||||
[annotation]
|
||||
title = "Anótáil"
|
||||
desc = "Bain úsáid as aird a tharraingt, peann, téacs agus nótaí. Fanann athruithe beo—níl gá le leacú."
|
||||
highlight = "Aibhsigh"
|
||||
pen = "Peann"
|
||||
text = "Bosca téacs"
|
||||
note = "Nóta"
|
||||
rectangle = "Dronuilleog"
|
||||
ellipse = "Éilips"
|
||||
select = "Roghnaigh"
|
||||
exit = "Scoir mód anótála"
|
||||
strokeWidth = "Leithead"
|
||||
opacity = "Teimhneacht"
|
||||
strokeOpacity = "Teimhneacht Stróc"
|
||||
fillOpacity = "Teimhneacht Líonadh"
|
||||
fontSize = "Méid an chló"
|
||||
chooseColor = "Roghnaigh dath"
|
||||
color = "Dath"
|
||||
strokeColor = "Dath Stróc"
|
||||
fillColor = "Dath Líonta"
|
||||
underline = "Folínigh"
|
||||
strikeout = "Stailc amach"
|
||||
squiggly = "Scriobláil"
|
||||
inkHighlighter = "Aibhseoir Saorláimhe"
|
||||
freehandHighlighter = "Aibhseoir Saorláimhe"
|
||||
square = "Cearnóg"
|
||||
circle = "Ciorcal"
|
||||
polygon = "Polagán"
|
||||
line = "Líne"
|
||||
stamp = "Cuir Íomhá leis"
|
||||
textMarkup = "Marcáil Téacs"
|
||||
drawing = "Líníocht"
|
||||
shapes = "Cruthanna"
|
||||
notesStamps = "Nótaí & Stampaí"
|
||||
settings = "Socruithe"
|
||||
borderOn = "Teorainn: Ar"
|
||||
borderOff = "Teorainn: As"
|
||||
editInk = "Peann a Chur in Eagar"
|
||||
editLine = "Líne a Chur in Eagar"
|
||||
editNote = "Cuir Nóta in Eagar"
|
||||
editText = "Cuir Bosca Téacs in Eagar"
|
||||
editTextMarkup = "Cuir Marcáil Téacs in Eagar"
|
||||
editSelected = "Cuir an nóta in Eagar"
|
||||
editSquare = "Cuir Cearnóg in Eagar"
|
||||
editCircle = "Cuir Ciorcal in Eagar"
|
||||
editPolygon = "Cuir Polagán in Eagar"
|
||||
unsupportedType = "Ní thacaítear go hiomlán leis an gcineál seo anótála le haghaidh eagarthóireachta."
|
||||
textAlignment = "Ailíniú Téacs"
|
||||
noteIcon = "Deilbhín Nóta"
|
||||
imagePreview = "Réamhamharc"
|
||||
contents = "Téacs"
|
||||
backgroundColor = "Dath an chúlra"
|
||||
clearBackground = "Bain an cúlra"
|
||||
noBackground = "Gan chúlra"
|
||||
stampSettings = "Socruithe Stampa"
|
||||
savingCopy = "Ag ullmhú íoslódáil..."
|
||||
saveFailed = "Ní féidir cóip a shábháil"
|
||||
saveReady = "Íoslódáil réidh"
|
||||
selectAndMove = "Roghnaigh agus Cuir in Eagar"
|
||||
editSelectDescription = "Cliceáil ar nóta atá ann cheana féin chun a dhath, a theimhneacht, a théacs nó a mhéid a chur in eagar."
|
||||
editStampHint = "Chun an íomhá a athrú, scrios an stampa seo agus cuir ceann nua leis."
|
||||
editSwitchToSelect = "Athraigh go Roghnaigh agus Cuir in Eagar chun an nóta seo a chur in eagar."
|
||||
undo = "Cealaigh"
|
||||
redo = "Athdhéan"
|
||||
applyChanges = "Cuir Athruithe i bhFeidhm"
|
||||
saveChanges = "Sábháil Athruithe"
|
||||
|
||||
[search]
|
||||
@@ -4038,12 +4245,20 @@ settings = "Socruí"
|
||||
adminSettings = "Socruí riar."
|
||||
allTools = "All Tools"
|
||||
reader = "Léamh"
|
||||
tours = "Turais"
|
||||
showMeAround = "Taispeáin dom timpeall"
|
||||
|
||||
[quickAccess.toursTooltip]
|
||||
admin = "Féach ar na treoracha anseo: Turas uirlisí, turas leagan amach nua V2, agus turas an Riarthóra."
|
||||
user = "Féach ar na treoracha anseo: Turas uirlisí agus turas leagan amach an V2 nua."
|
||||
|
||||
[quickAccess.helpMenu]
|
||||
toolsTour = "Turas na nUirlisí"
|
||||
toolsTourDesc = "Faigh amach cad is féidir leis na huirlisí a dhéanamh"
|
||||
adminTour = "Turas an Riarthóra"
|
||||
adminTourDesc = "Déan iniúchadh ar shocruithe agus gnéithe an riarthóra"
|
||||
whatsNewTour = "Féach cad atá nua i V2"
|
||||
whatsNewTourDesc = "Tabhair cuairt ar an leagan amach nuashonraithe"
|
||||
|
||||
[admin]
|
||||
error = "Earráid"
|
||||
@@ -4185,6 +4400,13 @@ description = "Conair chuig inrite WeasyPrint le haghaidh tiontaithe HTML go PDF
|
||||
label = "Inrite Unoconvert"
|
||||
description = "Conair chuig LibreOffice unoconvert le haghaidh tiontaithe doiciméad (fág folamh don réamhshocrú: /opt/venv/bin/unoconvert)"
|
||||
|
||||
[admin.settings.general.frontendUrl]
|
||||
label = "URL tosaigh"
|
||||
description = "URL bunúsach don tosaigh (m.sh., https://pdf.example.com). Úsáidtear é le haghaidh naisc cuireadh ríomhphoist agus uaslódálacha cóid QR soghluaiste. Fág folamh chun URL cúil a úsáid."
|
||||
|
||||
[admin.settings.badge]
|
||||
clickToUpgrade = "Cliceáil chun sonraí an phlean a fheiceáil"
|
||||
|
||||
[admin.settings.security]
|
||||
title = "Slándáil"
|
||||
description = "Cumraigh fíordheimhniú, iompar logála isteach, agus polasaithe slándála."
|
||||
@@ -4192,7 +4414,7 @@ authentication = "Fíordheimhniú"
|
||||
|
||||
[admin.settings.security.ssoNotice]
|
||||
title = "An bhfuil tú ag lorg socruithe SSO/SAML?"
|
||||
message = "Aistríodh soláthraithe fíordheimhnithe OAuth2 agus SAML2 go dtí an roghchlár Connections ar mhaithe le bainistíocht níos éasca."
|
||||
message = "Tá soláthraithe fíordheimhnithe OAuth2 agus SAML2 bogtha go dtí an roghchlár Naisc le haghaidh bainistíocht níos éasca."
|
||||
|
||||
[admin.settings.security.enableLogin]
|
||||
label = "Cumasaigh Logáil Isteach"
|
||||
@@ -4364,7 +4586,7 @@ description = "Cosc ar chlárú úsáideoirí nua trí OAuth2"
|
||||
|
||||
[admin.settings.connections.oauth2.scopes]
|
||||
label = "Scóipeanna OAuth2"
|
||||
description = "Liosta scartha le camóga de scóipeanna OAuth2 le hiarraidh (m.sh., openid, profile, email)"
|
||||
description = "Liosta scartha le camóga de raonta OAuth2 le hiarraidh (m.sh., openid, próifíl, ríomhphost)"
|
||||
|
||||
[admin.settings.connections.saml2]
|
||||
label = "SAML2"
|
||||
@@ -4389,6 +4611,13 @@ description = "Cruthaigh cuntais úsáideora go huathoibríoch ar an gcéad log
|
||||
label = "Cuir Clárú ar Chosc"
|
||||
description = "Cosc ar chlárú úsáideoirí nua trí SAML2"
|
||||
|
||||
[admin.settings.connections.mobileScanner]
|
||||
description = "Ceadaigh d’úsáideoirí comhaid a uaslódáil ó ghléasanna soghluaiste trí chód QR a scanadh"
|
||||
enable = "Cumasaigh Uaslódáil Cód QR"
|
||||
label = "Uaslódáil Fón Póca"
|
||||
link = "Cumraigh i Socruithe an Chórais"
|
||||
note = "Nóta: Éilíonn sé go mbeidh URL an Tosaigh cumraithe."
|
||||
|
||||
[admin.settings.database]
|
||||
title = "Bunachar Sonraí"
|
||||
description = "Cumraigh socruithe ceangail bunachair shonraí saincheaptha le haghaidh imscaradh fiontraíochta."
|
||||
@@ -4517,10 +4746,10 @@ description = "Cumraigh teorainneacha seisiúin agus teorainneacha ama do gach f
|
||||
libreOffice = "LibreOffice"
|
||||
pdfToHtml = "PDF go HTML"
|
||||
qpdf = "QPDF"
|
||||
tesseract = "Tesseract OCR"
|
||||
tesseract = "OCR Tesseract"
|
||||
pythonOpenCv = "Python OpenCV"
|
||||
weasyPrint = "WeasyPrint"
|
||||
installApp = "Suiteáil App"
|
||||
installApp = "Suiteáil Aop"
|
||||
calibre = "Calibre"
|
||||
ghostscript = "Ghostscript"
|
||||
ocrMyPdf = "OCRmyPDF"
|
||||
@@ -4570,6 +4799,10 @@ description = "Ceadaigh do riarthóirí úsáideoirí a thabhairt cuireadh trí
|
||||
label = "URL an Tosaigh"
|
||||
description = "Bun‑URL don tosaigh (m.sh. https://pdf.example.com). Úsáidtear é chun naisc chuireadh a ghiniúint i ríomhphoist. Fág folamh chun URL an chúlchórais a úsáid."
|
||||
|
||||
[admin.settings.mail.frontendUrlNote]
|
||||
link = "Cumraigh i Socruithe an Chórais"
|
||||
note = "Nóta: Éilíonn sé go mbeidh URL an Tosaigh cumraithe. "
|
||||
|
||||
[admin.settings.legal]
|
||||
title = "Doiciméid Dhlíthiúla"
|
||||
description = "Cumraigh naisc le doiciméid agus polasaithe dlíthiúla."
|
||||
@@ -4636,6 +4869,7 @@ title = "Ceadúnas Gníomhach"
|
||||
file = "Foinse: Comhad ceadúnais ({{path}})"
|
||||
key = "Foinse: Eochair ceadúnais"
|
||||
type = "Cineál: {{type}}"
|
||||
|
||||
noInput = "Tabhair eochair ceadúnais nó uaslódáil comhad teastais, le do thoil"
|
||||
success = "Rath"
|
||||
|
||||
@@ -4653,11 +4887,11 @@ description = "Cumraigh gnéithe roghnacha agus feidhmiúlacht."
|
||||
|
||||
[admin.settings.features.serverCertificate]
|
||||
label = "Deimhniú Freastalaí"
|
||||
description = "Cumraigh giniúint deimhnithe ar thaobh an fhreastalaí don fheidhmiúlacht \"Sign with Stirling-PDF\""
|
||||
description = "Cumraigh giniúint deimhnithe ar thaobh an fhreastalaí don fheidhmiúlacht \"Sínigh le Stirling-PDF\""
|
||||
|
||||
[admin.settings.features.serverCertificate.enabled]
|
||||
label = "Cumasaigh Deimhniú Freastalaí"
|
||||
description = "Cumasaigh deimhniú taobh an fhreastalaí don rogha \"Sign with Stirling-PDF\""
|
||||
description = "Cumasaigh deimhniú taobh an fhreastalaí don rogha \"Sínigh le Stirling-PDF\""
|
||||
|
||||
[admin.settings.features.serverCertificate.organizationName]
|
||||
label = "Ainm Eagraíochta"
|
||||
@@ -4682,8 +4916,8 @@ label = "Críochphointí Díchumasaithe"
|
||||
description = "Roghnaigh críochphointí aonair le díchumasú"
|
||||
|
||||
[admin.settings.endpoints.groupsToRemove]
|
||||
label = "Grúpaí Críochphointí Díchumasaithe"
|
||||
description = "Roghnaigh grúpaí críochphointí le díchumasú"
|
||||
label = "Grúpaí Deireadhphointe Díchumasaithe"
|
||||
description = "Roghnaigh grúpaí críochphointe le díchumasú"
|
||||
|
||||
[fileUpload]
|
||||
selectFile = "Roghnaigh comhad"
|
||||
@@ -4696,7 +4930,7 @@ loadFromStorage = "Luchtaigh ón Stóráil"
|
||||
filesAvailable = "comhaid ar fáil"
|
||||
loading = "Á lódáil..."
|
||||
or = "nó"
|
||||
dropFileHere = "Scaoil an comhad anseo nó cliceáil chun uaslódáil"
|
||||
dropFileHere = "Scaoil comhad anseo nó cliceáil chun é a uaslódáil"
|
||||
dropFilesHere = "Scaoil comhaid anseo nó cliceáil an cnaipe uaslódála"
|
||||
dropFilesHereOpen = "Scaoil comhaid anseo nó cliceáil an cnaipe Oscail"
|
||||
pdfFilesOnly = "Comhaid PDF amháin"
|
||||
@@ -4750,10 +4984,12 @@ searchFiles = "Cuardaigh comhaid..."
|
||||
recent = "Le Déanaí"
|
||||
localFiles = "Comhaid Logánta"
|
||||
googleDrive = "Google Drive"
|
||||
googleDriveShort = "Drive"
|
||||
googleDriveShort = "Tiomáint"
|
||||
myFiles = "Mo Chomhaid"
|
||||
noRecentFiles = "Níor aimsíodh comhaid le déanaí"
|
||||
googleDriveNotAvailable = "Níl comhtháthú Google Drive ar fáil"
|
||||
mobileUpload = "Uaslódáil Soghluaiste"
|
||||
mobileShort = "Soghluaiste"
|
||||
downloadSelected = "Íoslódáil Roghnaithe"
|
||||
saveSelected = "Sábháil Roghnaithe"
|
||||
openFiles = "Oscail Comhaid"
|
||||
@@ -5069,6 +5305,7 @@ loading = "Á lódáil..."
|
||||
back = "Siar"
|
||||
continue = "Lean ar aghaidh"
|
||||
error = "Earráid"
|
||||
save = "Sábháil"
|
||||
|
||||
[config.overview]
|
||||
title = "Cumraíocht an Fheidhmchláir"
|
||||
@@ -5211,7 +5448,7 @@ noSearchResults = "Níor aimsíodh uirlisí"
|
||||
noTools = "Níl aon uirlisí ar fáil"
|
||||
|
||||
[onboarding]
|
||||
allTools = "This is the <strong>All Tools</strong> panel, where you can browse and select from all available PDF tools."
|
||||
allTools = "Seo é an painéal <strong>Gach Uirlis</strong>, áit ar féidir leat brabhsáil agus roghnú astu na huirlisí PDF uile atá ar fáil."
|
||||
selectCropTool = "Roghnaímis an uirlis <strong>Bearradh</strong> chun a léiriú conas ceann de na huirlisí a úsáid."
|
||||
toolInterface = "Seo comhéadan na huirlise <strong>Bearradh</strong>. Mar a fheiceann tú, níl mórán ann fós mar nár chuir muid aon chomhaid PDF leis le hoibriú leo go fóill."
|
||||
filesButton = "Ligeann an cnaipe <strong>Comhaid</strong> ar an mBarra Rochtana Thapa duit PDFanna a uaslódáil chun na huirlisí a úsáid orthu."
|
||||
@@ -5235,6 +5472,16 @@ finish = "Críochnaigh"
|
||||
startTour = "Tosaigh an Turas"
|
||||
startTourDescription = "Téigh ar thuras treoraithe de phríomhghnéithe Stirling PDF"
|
||||
|
||||
[onboarding.whatsNew]
|
||||
quickAccess = "Tosaigh ag an ráille <strong>Rochtain Thapa</strong> chun léim idir Léitheoir, Uathoibriú, do chuid comhad, agus na turais go léir."
|
||||
leftPanel = "Liostaítear gach rud is féidir leat a dhéanamh sa phainéal <strong>Uirlisí</strong> ar chlé. Brabhsáil catagóirí nó déan cuardach chun uirlis a aimsiú go tapa."
|
||||
fileUpload = "Úsáid an cnaipe <strong>Comhaid</strong> chun PDF le déanaí a uaslódáil nó a roghnú. Lódálfaimid sampla ionas gur féidir leat an spás oibre a fheiceáil."
|
||||
rightRail = "Tá gníomhartha tapa ar an <strong>Ráille Deas</strong> chun comhaid a roghnú, téama nó teanga a athrú, agus torthaí a íoslódáil."
|
||||
topBar = "Ligeann an barra uachtarach duit malartú idir <strong>Amharcóir</strong>, <strong>Eagarthóir Leathanaigh</strong>, agus <strong>Comhaid Ghníomhacha</strong>."
|
||||
pageEditorView = "Téigh go dtí an tEagarthóir Leathanach chun leathanaigh a athordú, a rothlú nó a scriosadh."
|
||||
activeFilesView = "Bain úsáid as Comhaid Ghníomhacha chun gach rud atá oscailte agat a fheiceáil agus chun a roghnú cad atá le hoibriú air."
|
||||
wrapUp = "Sin atá nua i V2. Oscail an roghchlár <strong>Turais</strong> am ar bith chun é seo, an turas Uirlisí, nó an turas Riarthóra a athsheinm."
|
||||
|
||||
[onboarding.welcomeModal]
|
||||
title = "Fáilte go Stirling PDF!"
|
||||
description = "Ar mhaith leat turas gasta 1 nóiméad a dhéanamh chun na príomhghnéithe agus conas tosú a fhoghlaim?"
|
||||
@@ -5255,6 +5502,10 @@ download = "Íoslódáil →"
|
||||
showMeAround = "Taispeáin timpeall dom"
|
||||
skipTheTour = "Scipeáil an turas"
|
||||
|
||||
[onboarding.tourOverview]
|
||||
title = "Forbhreathnú ar an Turas"
|
||||
body = "Tagann Stirling PDF V2 le mórán uirlisí agus leagan amach athnuaite. Tabhair cuairt ghearr chun a fheiceáil cad a d'athraigh agus cá háit le fáil na gnéithe atá uait."
|
||||
|
||||
[onboarding.serverLicense]
|
||||
skip = "Scipeáil faoi láthair"
|
||||
seePlans = "Féach ar Phleananna →"
|
||||
@@ -5277,17 +5528,17 @@ adminBodyLoginDisabled = "Nuair a chumasaíonn tú mód logála isteach, is féi
|
||||
userBody = "Tabhair cuireadh do chomhoibrithe, sann róil, agus coinnigh do dhoiciméid eagraithe in aon spás oibre slán amháin. Cumasaigh mód logála isteach aon uair is mian leat dul thar úsáid aonair."
|
||||
|
||||
[onboarding.securityCheck]
|
||||
message = "Rinneadh athruithe suntasacha ar an bhfeidhmchlár le déanaí. D’fhéadfadh aird do riarthóra freastalaí a bheith de dhíth. Deimhnigh do ról le do thoil chun leanúint ar aghaidh."
|
||||
message = "Tá athruithe suntasacha déanta ar an bhfeidhmchlár le déanaí. B’fhéidir go mbeidh aird riarthóir do fhreastalaí ag teastáil. Deimhnigh do ról le leanúint ar aghaidh."
|
||||
|
||||
[adminOnboarding]
|
||||
welcome = "Fáilte go dtí an <strong>Admin Tour</strong>! Déanaimis iniúchadh ar na gnéithe agus na socruithe fiontraíochta cumhachtacha atá ar fáil do riarthóirí córais."
|
||||
configButton = "Cliceáil an cnaipe <strong>Config</strong> chun rochtain a fháil ar gach socrú córais agus rialú riaracháin."
|
||||
welcome = "Fáilte go dtí an <strong>Turas Riaracháin</strong>! Déanaimis iniúchadh ar na gnéithe agus na socruithe cumhachtacha fiontraíochta atá ar fáil do riarthóirí córais."
|
||||
configButton = "Cliceáil an cnaipe <strong>Cumraíocht</strong> chun rochtain a fháil ar shocruithe an chórais agus ar rialuithe riaracháin go léir."
|
||||
settingsOverview = "Seo é an <strong>Painéal Socruithe</strong>. Tá socruithe riaracháin eagraithe de réir catagóire le haghaidh nascleanúna éasca."
|
||||
teamsAndUsers = "Bainistigh <strong>Foirne</strong> agus úsáideoirí aonair anseo. Is féidir leat úsáideoirí nua a thabhairt isteach trí r-phost, naisc inroinnte, nó cuntais shaincheaptha a chruthú dóibh tú féin."
|
||||
systemCustomization = "Tá bealaí fairsinge againn chun an UI a shaincheapadh: ligeann <strong>System Settings</strong> duit ainm agus teangacha an aipe a athrú, cuireann <strong>Features</strong> bainistíocht teastais freastalaí ar fáil, agus ligeann <strong>Endpoints</strong> duit uirlisí áirithe a chumasú nó a dhíchumasú do d’úsáideoirí."
|
||||
systemCustomization = "Tá bealaí fairsinge againn chun an comhéadan úsáideora a shaincheapadh: Ligeann <strong>Socruithe Córais</strong> duit ainm agus teangacha an aip a athrú, ceadaíonn <strong>Gnéithe</strong> bainistíocht teastais freastalaí, agus ligeann <strong>Deireadhphointí</strong> duit uirlisí sonracha a chumasú nó a dhíchumasú do d'úsáideoirí."
|
||||
databaseSection = "Le haghaidh timpeallachtaí táirgthe ardleibhéil, tá socruithe againn chun <strong>nascanna le bunachair shonraí sheachtracha</strong> a chumasú ionas gur féidir leat comhtháthú le d’infreastruchtúr atá ann cheana."
|
||||
connectionsSection = "Tacaíonn an rannán <strong>Connections</strong> le modhanna logála isteach éagsúla lena n-áirítear SSO saincheaptha agus soláthraithe SAML ar nós Google agus GitHub, móide comhtháthuithe ríomhphoist le haghaidh fógraí agus cumarsáide."
|
||||
adminTools = "Ar deireadh, tá uirlisí riaracháin ardleibhéil againn mar <strong>Auditing</strong> chun gníomhaíocht chórais a rianú agus <strong>Usage Analytics</strong> chun monatóireacht a dhéanamh ar conas a idirghníomhaíonn d’úsáideoirí leis an ardán."
|
||||
adminTools = "Ar deireadh, tá uirlisí riaracháin ardleibhéil againn ar nós <strong>Iniúchadh</strong> chun gníomhaíocht chórais a rianú agus <strong>Anailísíocht Úsáide</strong> chun monatóireacht a dhéanamh ar an gcaoi a n-idirghníomhaíonn d'úsáideoirí leis an ardán."
|
||||
wrapUp = "Sin é an turas riaracháin! Chonaic tú na gnéithe fiontraíochta a dhéanann Stirling PDF ina réiteach cumhachtach, saincheaptha d’eagraíochtaí. Is féidir an turas seo a rochtain am ar bith ón roghchlár <strong>Cabhair</strong>."
|
||||
|
||||
[workspace]
|
||||
@@ -5334,7 +5585,7 @@ user = "Úsáideoir"
|
||||
[workspace.people.addMember]
|
||||
title = "Cuir Ball Leis"
|
||||
username = "Ainm Úsáideora (R-phost)"
|
||||
usernamePlaceholder = "user@example.com"
|
||||
usernamePlaceholder = "úsáideoir@sampla.com"
|
||||
password = "Focal Faire"
|
||||
passwordPlaceholder = "Cuir isteach focal faire"
|
||||
role = "Ról"
|
||||
@@ -5396,7 +5647,7 @@ error = "Níor éirigh le focal faire a nuashonrú"
|
||||
tab = "Cuireadh Ríomhphoist"
|
||||
description = "Clóscríobh nó greamaigh seoltaí ríomhphoist thíos, scartha le camóga. Gheobhaidh úsáideoirí dintiúir logála isteach trí r-phost."
|
||||
emails = "Seoltaí Ríomhphoist"
|
||||
emailsPlaceholder = "user1@example.com, user2@example.com"
|
||||
emailsPlaceholder = "úsáideoir1@sampla.com, úsáideoir2@sampla.com"
|
||||
emailsRequired = "Tá ar a laghad seoladh ríomhphoist amháin de dhíth"
|
||||
submit = "Seol Cuirí"
|
||||
success = "Tugadh cuireadh d’úsáideoir(í) go rathúil"
|
||||
@@ -5568,6 +5819,28 @@ contactSales = "Déan Teagmháil le Díolacháin"
|
||||
contactToUpgrade = "Déan teagmháil linn chun do phlean a uasghrádú nó a shaincheapadh"
|
||||
maxUsers = "Uaslíon Úsáideoirí"
|
||||
upTo = "Suas le"
|
||||
getLicense = "Faigh Ceadúnas Freastalaí"
|
||||
upgradeToEnterprise = "Uasghrádú go Fiontar"
|
||||
selectPeriod = "Roghnaigh Tréimhse Billeála"
|
||||
monthlyBilling = "Billeáil Mhíosúil"
|
||||
yearlyBilling = "Billeáil Bhliantúil"
|
||||
checkoutOpened = "Seiceáil Oscailte"
|
||||
checkoutInstructions = "Críochnaigh do cheannachán sa chluaisín Stripe. Tar éis íocaíochta, fill ar ais anseo agus athnuachan an leathanach chun do cheadúnas a ghníomhachtú. Gheobhaidh tú ríomhphost le d’eochair cheadúnais freisin."
|
||||
activateLicense = "Gníomhachtaigh Do Cheadúnas"
|
||||
|
||||
[plan.static.licenseActivation]
|
||||
checkoutOpened = "Seiceáil Oscailte i gCluaisín Nua"
|
||||
instructions = "Comhlánaigh do cheannachán sa chluaisín Stripe. Nuair a bheidh d’íocaíocht críochnaithe, gheobhaidh tú ríomhphost le d’eochair cheadúnais."
|
||||
enterKey = "Cuir isteach d’eochair cheadúnais thíos chun do phlean a ghníomhachtú:"
|
||||
keyDescription = "Greamaigh an eochair cheadúnais ó do ríomhphost"
|
||||
activate = "Gníomhachtaigh an Ceadúnas"
|
||||
doLater = "Déanfaidh mé é seo níos déanaí"
|
||||
success = "Ceadúnas Gníomhachtaithe!"
|
||||
successMessage = "Tá do cheadúnas gníomhachtaithe go rathúil. Is féidir leat an fhuinneog seo a dhúnadh anois."
|
||||
|
||||
[plan.static.billingPortal]
|
||||
title = "Fíorú Ríomhphoist Riachtanach"
|
||||
message = "Beidh ort do sheoladh ríomhphoist a fhíorú i dtairseach billeála Stripe. Seiceáil do ríomhphost le haghaidh nasc logála isteach."
|
||||
|
||||
[plan.period]
|
||||
month = "mí"
|
||||
@@ -5588,12 +5861,12 @@ highlight2 = "Uirlisí PDF Casta"
|
||||
highlight3 = "Gan comharthaí uisce"
|
||||
|
||||
[plan.enterprise]
|
||||
name = "Enterprise"
|
||||
name = "Fiontar"
|
||||
highlight1 = "Praghsáil shaincheaptha"
|
||||
highlight2 = "Tacaíocht thiomnaithe"
|
||||
highlight3 = "Na gnéithe is déanaí"
|
||||
requiresServer = "Teastaíonn Freastalaí"
|
||||
requiresServerMessage = "Uasghrádaigh go dtí an plean Freastalaí ar dtús sula n-uasghrádaíonn tú go Enterprise."
|
||||
requiresServerMessage = "Uasghrádaigh go dtí an plean Freastalaí ar dtús sula n-uasghrádaíonn tú go Fiontraíochta."
|
||||
|
||||
[plan.feature]
|
||||
title = "Gné"
|
||||
@@ -5625,7 +5898,7 @@ none = "Gan Síntiús"
|
||||
[billing]
|
||||
manageBilling = "Bainistigh Billeáil"
|
||||
updateSeats = "Nuashonraigh Suíocháin"
|
||||
updateEnterpriseSeats = "Nuashonraigh Suíocháin Enterprise"
|
||||
updateEnterpriseSeats = "Nuashonraigh Suíocháin Fiontraíochta"
|
||||
currentSeats = "Suíocháin Reatha"
|
||||
minimumSeats = "Íosmhéid Suíochán"
|
||||
basedOnUsers = "(úsáideoirí reatha)"
|
||||
@@ -5657,7 +5930,7 @@ seeInfo = "Féach eolas"
|
||||
|
||||
[payment]
|
||||
preparing = "Do sheiceáil amach á ullmhú..."
|
||||
redirecting = "Ag atreorú chuig checkout slán..."
|
||||
redirecting = "Ag atreorú chuig an tseiceáil amach slán..."
|
||||
upgradeTitle = "Uasghrádaigh go {{planName}}"
|
||||
success = "D’éirigh leis an Íocaíocht!"
|
||||
successMessage = "Gníomhachtaíodh do shíntiús go rathúil. Gheobhaidh tú ríomhphost dearbhaithe go luath."
|
||||
@@ -5696,7 +5969,7 @@ emailInvalid = "Cuir isteach seoladh ríomhphoist bailí"
|
||||
title = "Cuir isteach do Ríomhphost"
|
||||
description = "Úsáidfimid é seo chun d’eochair cheadúnais agus admhálacha a sheoladh."
|
||||
emailLabel = "Seoladh Ríomhphoist"
|
||||
emailPlaceholder = "your@email.com"
|
||||
emailPlaceholder = "do@ríomhphost.com"
|
||||
continue = "Lean ar aghaidh"
|
||||
modalTitle = "Tosaigh - {{planName}}"
|
||||
|
||||
@@ -5771,6 +6044,8 @@ notAvailable = "Níl an córas iniúchta ar fáil"
|
||||
notAvailableMessage = "Níl an córas iniúchta cumraithe nó níl sé ar fáil."
|
||||
disabled = "Tá logáil iniúchta díchumasaithe"
|
||||
disabledMessage = "Cumasaigh logáil iniúchta i gcumraíocht d’fheidhmchláir chun imeachtaí an chórais a rianú."
|
||||
enterpriseRequired = "Ceadúnas Fiontraíochta Riachtanach"
|
||||
enterpriseRequiredMessage = "Is gné fiontraíochta é an córas logála iniúchóireachta. Uasghrádaigh go ceadúnas fiontraíochta le rochtain a fháil ar logaí iniúchóireachta agus anailísíocht."
|
||||
|
||||
[audit.error]
|
||||
title = "Earráid agus an córas iniúchta á lódáil"
|
||||
@@ -6025,6 +6300,8 @@ reset = "Athshocraigh Athruithe"
|
||||
downloadJson = "Íoslódáil JSON"
|
||||
generatePdf = "Gin PDF"
|
||||
saveChanges = "Sábháil Athruithe"
|
||||
applyChanges = "Cuir Athruithe i bhFeidhm"
|
||||
downloadCopy = "Íoslódáil Cóip"
|
||||
|
||||
[pdfTextEditor.options.autoScaleText]
|
||||
title = "Scálaigh téacs go huathoibríoch chun boscaí a fheistiú"
|
||||
@@ -6043,6 +6320,24 @@ descriptionInline = "Leid: Coinnigh Ctrl (Cmd) nó Shift chun boscaí téacs a r
|
||||
title = "Glasáil téacs curtha in eagar le heilimint PDF aonair"
|
||||
description = "Nuair atá cumasaithe, easpórtálann an t-eagarthóir gach bosca téacs curtha in eagar mar eilimint téacs PDF amháin chun glifaí forluiteacha nó clónna measctha a sheachaint."
|
||||
|
||||
[pdfTextEditor.options.advanced]
|
||||
title = "Socruithe Ardleibhéil"
|
||||
|
||||
[pdfTextEditor.tooltip.header]
|
||||
title = "Teorainneacha Réamhamhairc"
|
||||
|
||||
[pdfTextEditor.tooltip.textFocus]
|
||||
title = "Fócas Téacs agus Íomhá"
|
||||
text = "Díríonn an spás oibre seo ar théacs a chur in eagar agus íomhánna leabaithe a athshuíomh. Coinnítear saothar ealaíne leathanaigh casta, giuirléidí foirmeacha, agus grafaicí srathacha le haghaidh onnmhairithe ach ní féidir iad a chur in eagar go hiomlán anseo."
|
||||
|
||||
[pdfTextEditor.tooltip.previewVariance]
|
||||
title = "Réamhamharc ar an Éagsúlacht"
|
||||
text = "B’fhéidir nach dtaispeánfar roinnt amharcléirithe (amhail teorainneacha tábla, cruthanna, nó cuma anótála) go díreach sa réamhamharc. Coinníonn an PDF easpórtáilte na horduithe líníochta bunaidh aon uair is féidir."
|
||||
|
||||
[pdfTextEditor.tooltip.alpha]
|
||||
title = "Amharcóir Alfa"
|
||||
text = "Tá an breathnóir alfa seo fós ag forbairt—d’fhéadfadh clónna, dathanna, éifeachtaí trédhearcachta agus sonraí leagan amach áirithe athrú beagán. Déan seiceáil dhúbailte ar an PDF ginte sula roinneann tú é."
|
||||
|
||||
[pdfTextEditor.manual]
|
||||
mergeTooltip = "Cumaisc na boscaí roghnaithe"
|
||||
merge = "Cumaisc an roghnú"
|
||||
@@ -6079,10 +6374,10 @@ notIdealFor2 = "Irisí, bróisiúir, nó doiciméid le dearadh trom"
|
||||
notIdealFor3 = "Lámhleabhair treoracha le leagan amach casta"
|
||||
limitations = "Teorainneacha Reatha:"
|
||||
limitation1 = "Féadfaidh rindreáil cló a bheith beagán difriúil ón PDF bunaidh"
|
||||
limitation2 = "Caomhnaítear grafaicí casta, réimsí foirme agus anótálacha ach ní féidir iad a chur in eagar"
|
||||
limitation3 = "D’fhéadfadh go dtógfadh tiontú agus próiseáil comhaid mhóra tamall"
|
||||
knownIssues = "Fadhbanna Aitheanta (Á Socrú):"
|
||||
issue1 = "Ní chaomhnaítear dath téacs faoi láthair (cuirfear leis go luath)"
|
||||
limitation2 = "Coinnítear grafaicí casta, réimsí foirme agus nótaí ach ní féidir iad a chur in eagar"
|
||||
limitation3 = "D’fhéadfadh sé go dtógfadh sé tamall comhaid mhóra a thiontú agus a phróiseáil"
|
||||
knownIssues = "Fadhbanna Aitheanta (Á Réiteach):"
|
||||
issue1 = "Níl dath an téacs caomhnaithe faoi láthair (cuirfear leis go luath é)"
|
||||
issue2 = "Tá níos mó saincheisteanna ailínithe agus spásála i Mód Míre — moltar Mód Líne Aonair"
|
||||
issue3 = "Tá an réamhamharc difriúil ón PDF easpórtáilte — tá PDFanna easpórtáilte níos gaire don bhunleagan"
|
||||
issue4 = "D’fhéadfadh go mbeadh coigeartú láimhe de dhíth ar ailíniú téacs rothlaithe"
|
||||
@@ -6164,3 +6459,56 @@ title = "Torthaí Cur Téacs"
|
||||
|
||||
[addText.error]
|
||||
failed = "Tharla earráid agus téacs á chur leis an PDF."
|
||||
|
||||
[mobileUpload]
|
||||
title = "Uaslódáil ó Shoghluaiste"
|
||||
description = "Scan an cód QR seo le do ghléas soghluaiste chun grianghraif a uaslódáil go díreach chuig an leathanach seo."
|
||||
error = "Earráid Ceangail"
|
||||
pollingError = "Earráid ag seiceáil comhad"
|
||||
sessionId = "Aitheantas Seisiúin"
|
||||
sessionCreateError = "Theip ar chruthú seisiúin"
|
||||
expiryWarning = "Seisiún ag Dul in Éag go Luath"
|
||||
expiryWarningMessage = "Rachaidh an cód QR seo in éag i {{seconds}} soicind. Ginfear cód nua go huathoibríoch."
|
||||
filesReceived = "{{count}} comhad(anna) faighte"
|
||||
connected = "Gléas soghluaiste ceangailte"
|
||||
instructions = "Oscail an aip ceamara ar do ghuthán agus scan an cód seo. Aistreofar comhaid go díreach idir gléasanna."
|
||||
|
||||
[mobileScanner]
|
||||
title = "Scanóir Soghluaiste"
|
||||
noSession = "Seisiún Neamhbhailí"
|
||||
noSessionMessage = "Scanáil cód QR bailí le do thoil chun rochtain a fháil ar an leathanach seo."
|
||||
validating = "Ag bailíochtú an tseisiúin..."
|
||||
sessionInvalid = "Earráid Seisiúin"
|
||||
sessionExpired = "Tá an seisiún seo imithe in éag. Athnuachan agus déan iarracht arís."
|
||||
sessionNotFound = "Níor aimsíodh an seisiún. Athnuachan agus déan iarracht arís."
|
||||
sessionValidationError = "Ní féidir an seisiún a fhíorú. Déan iarracht arís."
|
||||
uploadSuccess = "Uaslódáil Rathúil!"
|
||||
uploadSuccessMessage = "Tá do chuid íomhánna aistrithe."
|
||||
httpsRequired = "Éilíonn rochtain ceamara HTTPS nó localhost. Bain úsáid as HTTPS nó rochtain trí localhost."
|
||||
uploadFailed = "Theip ar an uaslódáil. Déan iarracht arís."
|
||||
uploading = "Ag uaslódáil..."
|
||||
connected = "Ceangailte"
|
||||
connecting = "Ag ceangal..."
|
||||
chooseMethod = "Roghnaigh Modh Uaslódála"
|
||||
chooseMethodDescription = "Roghnaigh conas is mian leat doiciméid a scanadh agus a uaslódáil"
|
||||
camera = "Ceamara"
|
||||
cameraDescription = "Scan doiciméid ag baint úsáide as ceamara do ghléis le braiteadh imeall uathoibríoch"
|
||||
fileUpload = "Uaslódáil Comhad"
|
||||
fileDescription = "Uaslódáil grianghraif nó doiciméid atá ann cheana féin ó do ghléas"
|
||||
cameraAccessDenied = "Diúltaíodh rochtain ceamara. Cumasaigh rochtain ceamara le do thoil."
|
||||
back= "Ar ais"
|
||||
settings = "Socruithe"
|
||||
edgeDetection = "Braith Imeall"
|
||||
flashlight = "Splanc"
|
||||
flash = "Splanc"
|
||||
processing = "Ag Próiseáil..."
|
||||
capture = "Gabh Grianghraf"
|
||||
selectFilesPrompt = "Roghnaigh comhaid le huaslódáil"
|
||||
selectImage = "Roghnaigh Íomhá"
|
||||
preview = "Réamhamharc"
|
||||
retake = "Athghlac"
|
||||
addToBatch = "Cuir le Baisc"
|
||||
upload = "Uaslódáil"
|
||||
batchImages = "Baisc"
|
||||
clearBatch = "Glan"
|
||||
uploadAll = "Uaslódáil Gach Rud"
|
||||
|
||||
+2
-2
@@ -132,9 +132,9 @@
|
||||
|
||||
/**
|
||||
* Extracts and undistorts the image detected within the frame.
|
||||
*
|
||||
*
|
||||
* Returns `null` if no paper is detected.
|
||||
*
|
||||
*
|
||||
* @param {*} image image to process
|
||||
* @param {*} resultWidth desired result paper width
|
||||
* @param {*} resultHeight desired result paper height
|
||||
|
||||
+2
-3
@@ -20,7 +20,7 @@
|
||||
root.cv = factory();
|
||||
}
|
||||
}(this, function () {
|
||||
|
||||
|
||||
var cv = (function() {
|
||||
var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
|
||||
return (
|
||||
@@ -40,9 +40,8 @@ if (typeof exports === 'object' && typeof module === 'object')
|
||||
define([], function() { return cv; });
|
||||
else if (typeof exports === 'object')
|
||||
exports["cv"] = cv;
|
||||
|
||||
|
||||
if (typeof Module === 'undefined')
|
||||
Module = {};
|
||||
return cv(Module);
|
||||
}));
|
||||
|
||||
Generated
+761
-432
File diff suppressed because it is too large
Load Diff
@@ -4,9 +4,7 @@ version = "0.1.0"
|
||||
description = "Stirling-PDF Desktop Application"
|
||||
authors = ["Stirling-PDF Contributors"]
|
||||
license = ""
|
||||
repository = "https://github.com/Stirling-Tools/Stirling-PDF"
|
||||
homepage = "https://www.stirlingpdf.com"
|
||||
documentation = "https://docs.stirlingpdf.com"
|
||||
repository = ""
|
||||
edition = "2021"
|
||||
rust-version = "1.77.2"
|
||||
|
||||
@@ -20,37 +18,37 @@ name = "app_lib"
|
||||
crate-type = ["staticlib", "cdylib", "rlib"]
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "2.5.3", features = [] }
|
||||
tauri-build = { version = "2.2.0", features = [] }
|
||||
|
||||
[dependencies]
|
||||
serde_json = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
log = "0.4"
|
||||
tauri = { version = "2.9.4", features = [ "devtools"] }
|
||||
tauri-plugin-log = "2.7.1"
|
||||
tauri-plugin-shell = "2.3.3"
|
||||
tauri = { version = "2.9.0", features = [ "devtools"] }
|
||||
tauri-plugin-log = "2.0.0-rc"
|
||||
tauri-plugin-shell = "2.1.0"
|
||||
tauri-plugin-fs = "2.4.4"
|
||||
tauri-plugin-http = "2.5.4"
|
||||
tauri-plugin-http = { version = "2.4.4", features = ["dangerous-settings"] }
|
||||
tauri-plugin-single-instance = { version = "2.3.6", features = ["deep-link"] }
|
||||
tauri-plugin-store = "2.4.1"
|
||||
tauri-plugin-opener = "2.5.2"
|
||||
keyring = { version = "3.6.3", features = ["apple-native", "windows-native"] }
|
||||
tokio = { version = "1.48", features = ["time", "sync"] }
|
||||
reqwest = { version = "0.12", features = ["json"] }
|
||||
tauri-plugin-store = "2.1.0"
|
||||
tauri-plugin-opener = "2.0.0"
|
||||
tauri-plugin-deep-link = "2.4.5"
|
||||
keyring = { version = "3.6.1", features = ["apple-native", "windows-native"] }
|
||||
tokio = { version = "1.0", features = ["time", "sync"] }
|
||||
reqwest = { version = "0.11", features = ["json"] }
|
||||
tiny_http = "0.12"
|
||||
url = "2.5"
|
||||
urlencoding = "2.1"
|
||||
sha2 = "0.10"
|
||||
base64 = "0.22"
|
||||
rand = "0.9"
|
||||
rand = "0.8"
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
core-foundation = "0.10"
|
||||
core-services = "1.0"
|
||||
|
||||
[target.'cfg(target_os = "windows")'.dependencies]
|
||||
windows = { version = "0.61", features = [
|
||||
windows = { version = "0.58", features = [
|
||||
"Win32_Foundation",
|
||||
"Win32_System_Com",
|
||||
"Win32_UI_Shell",
|
||||
|
||||
@@ -13,9 +13,29 @@
|
||||
"allow": [
|
||||
{ "url": "http://*" },
|
||||
{ "url": "http://*:*" },
|
||||
{ "url": "https://*" }
|
||||
{ "url": "https://*" },
|
||||
{ "url": "https://*:*" },
|
||||
{ "url": "http://192.168.*.*" },
|
||||
{ "url": "http://192.168.*.*:*" },
|
||||
{ "url": "https://192.168.*.*" },
|
||||
{ "url": "https://192.168.*.*:*" },
|
||||
{ "url": "http://10.*.*.*" },
|
||||
{ "url": "http://10.*.*.*:*" },
|
||||
{ "url": "https://10.*.*.*" },
|
||||
{ "url": "https://10.*.*.*:*" },
|
||||
{ "url": "http://172.16.*.*" },
|
||||
{ "url": "http://172.16.*.*:*" },
|
||||
{ "url": "https://172.16.*.*" },
|
||||
{ "url": "https://172.16.*.*:*" },
|
||||
{ "url": "http://localhost:*" },
|
||||
{ "url": "https://localhost:*" },
|
||||
{ "url": "http://127.0.0.1:*" },
|
||||
{ "url": "https://127.0.0.1:*" }
|
||||
]
|
||||
},
|
||||
"http:allow-fetch-cancel",
|
||||
"http:allow-fetch-read-body",
|
||||
"http:allow-fetch-send",
|
||||
{
|
||||
"identifier": "fs:allow-read-file",
|
||||
"allow": [{ "path": "**" }]
|
||||
|
||||
@@ -6,8 +6,8 @@ use tauri_plugin_store::StoreExt;
|
||||
use tiny_http::{Response, Server};
|
||||
use sha2::{Sha256, Digest};
|
||||
use base64::{Engine as _, engine::general_purpose::URL_SAFE_NO_PAD};
|
||||
use rand::Rng;
|
||||
use rand::distr::Alphanumeric;
|
||||
use rand::{thread_rng, Rng};
|
||||
use rand::distributions::Alphanumeric;
|
||||
|
||||
const STORE_FILE: &str = "connection.json";
|
||||
const USER_INFO_KEY: &str = "user_info";
|
||||
@@ -319,7 +319,7 @@ pub async fn login(
|
||||
|
||||
/// Generate PKCE code_verifier (random 43-128 character string)
|
||||
fn generate_code_verifier() -> String {
|
||||
rand::rng()
|
||||
thread_rng()
|
||||
.sample_iter(&Alphanumeric)
|
||||
.take(128)
|
||||
.map(char::from)
|
||||
|
||||
@@ -40,33 +40,8 @@ fn dispatch_deep_link(app: &AppHandle, url: &str) {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
fn configure_linux_webview() {
|
||||
let mut applied_settings = Vec::new();
|
||||
|
||||
if std::env::var_os("WEBKIT_DISABLE_COMPOSITING_MODE").is_none() {
|
||||
std::env::set_var("WEBKIT_DISABLE_COMPOSITING_MODE", "1");
|
||||
applied_settings.push("WEBKIT_DISABLE_COMPOSITING_MODE=1 (software rendering)");
|
||||
}
|
||||
|
||||
if std::env::var_os("WEBKIT_DISABLE_DMABUF_RENDERER").is_none() {
|
||||
std::env::set_var("WEBKIT_DISABLE_DMABUF_RENDERER", "1");
|
||||
applied_settings.push("WEBKIT_DISABLE_DMABUF_RENDERER=1 (fallback EGL renderer)");
|
||||
}
|
||||
|
||||
if !applied_settings.is_empty() {
|
||||
add_log(format!(
|
||||
"🛠️ Applied Linux WebKit fallbacks to avoid EGL issues: {}",
|
||||
applied_settings.join(", ")
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
#[cfg(target_os = "linux")]
|
||||
configure_linux_webview();
|
||||
|
||||
tauri::Builder::default()
|
||||
.plugin(
|
||||
tauri_plugin_log::Builder::new()
|
||||
|
||||
@@ -3,8 +3,7 @@ Version=1.0
|
||||
Type=Application
|
||||
Name=Stirling-PDF
|
||||
Comment=Locally hosted web application that allows you to perform various operations on PDF files
|
||||
TryExec={{exec}}
|
||||
Exec={{exec}} %F
|
||||
Exec=/usr/bin/stirling-pdf
|
||||
Icon={{icon}}
|
||||
Terminal=false
|
||||
MimeType=application/pdf;
|
||||
@@ -13,4 +12,4 @@ Actions=open-file;
|
||||
|
||||
[Desktop Action open-file]
|
||||
Name=Open PDF File
|
||||
Exec={{exec}} %F
|
||||
Exec=/usr/bin/stirling-pdf %F
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
||||
"productName": "Stirling-PDF",
|
||||
"version": "2.2.0",
|
||||
"version": "2.2.1",
|
||||
"identifier": "stirling.pdf.dev",
|
||||
"build": {
|
||||
"frontendDist": "../dist",
|
||||
@@ -25,7 +25,6 @@
|
||||
"targets": [
|
||||
"deb",
|
||||
"rpm",
|
||||
"appimage",
|
||||
"dmg",
|
||||
"msi"
|
||||
],
|
||||
@@ -57,12 +56,6 @@
|
||||
"linux": {
|
||||
"deb": {
|
||||
"desktopTemplate": "stirling-pdf.desktop"
|
||||
},
|
||||
"rpm": {
|
||||
"desktopTemplate": "stirling-pdf.desktop"
|
||||
},
|
||||
"appimage": {
|
||||
"bundleMediaFramework": false
|
||||
}
|
||||
},
|
||||
"windows": {
|
||||
@@ -92,4 +85,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,8 @@ import { useFileManagerContext } from '@app/contexts/FileManagerContext';
|
||||
import { useGoogleDrivePicker } from '@app/hooks/useGoogleDrivePicker';
|
||||
import { useFileActionTerminology } from '@app/hooks/useFileActionTerminology';
|
||||
import { useFileActionIcons } from '@app/hooks/useFileActionIcons';
|
||||
import { useAppConfig } from '@app/contexts/AppConfigContext';
|
||||
import { useIsMobile } from '@app/hooks/useIsMobile';
|
||||
import MobileUploadModal from '@app/components/shared/MobileUploadModal';
|
||||
|
||||
interface FileSourceButtonsProps {
|
||||
@@ -24,6 +26,9 @@ const FileSourceButtons: React.FC<FileSourceButtonsProps> = ({
|
||||
const icons = useFileActionIcons();
|
||||
const UploadIcon = icons.upload;
|
||||
const [mobileUploadModalOpen, setMobileUploadModalOpen] = useState(false);
|
||||
const { config } = useAppConfig();
|
||||
const isMobile = useIsMobile();
|
||||
const isMobileUploadEnabled = config?.enableMobileScanner && !isMobile;
|
||||
|
||||
const handleGoogleDriveClick = async () => {
|
||||
try {
|
||||
@@ -127,15 +132,17 @@ const FileSourceButtons: React.FC<FileSourceButtonsProps> = ({
|
||||
onClick={handleMobileUploadClick}
|
||||
fullWidth={!horizontal}
|
||||
size={horizontal ? "xs" : "sm"}
|
||||
disabled={!isMobileUploadEnabled}
|
||||
styles={{
|
||||
root: {
|
||||
backgroundColor: 'transparent',
|
||||
border: 'none',
|
||||
'&:hover': {
|
||||
backgroundColor: 'var(--mantine-color-gray-0)'
|
||||
backgroundColor: isMobileUploadEnabled ? 'var(--mantine-color-gray-0)' : 'transparent'
|
||||
}
|
||||
}
|
||||
}}
|
||||
title={!isMobileUploadEnabled ? t('fileManager.mobileUploadNotAvailable', 'Mobile upload not available') : undefined}
|
||||
>
|
||||
{horizontal ? t('fileManager.mobileShort', 'Mobile') : t('fileManager.mobileUpload', 'Mobile Upload')}
|
||||
</Button>
|
||||
|
||||
@@ -9,6 +9,7 @@ import CheckRoundedIcon from '@mui/icons-material/CheckRounded';
|
||||
import WarningRoundedIcon from '@mui/icons-material/WarningRounded';
|
||||
import { Z_INDEX_OVER_FILE_MANAGER_MODAL } from '@app/styles/zIndex';
|
||||
import { withBasePath } from '@app/constants/app';
|
||||
import { convertImageToPdf, isImageFile } from '@app/utils/imageToPdfUtils';
|
||||
|
||||
interface MobileUploadModalProps {
|
||||
opened: boolean;
|
||||
@@ -132,10 +133,25 @@ export default function MobileUploadModal({ opened, onClose, onFilesReceived }:
|
||||
|
||||
if (downloadResponse.ok) {
|
||||
const blob = await downloadResponse.blob();
|
||||
const file = new File([blob], fileMetadata.filename, {
|
||||
let file = new File([blob], fileMetadata.filename, {
|
||||
type: fileMetadata.contentType || 'image/jpeg'
|
||||
});
|
||||
|
||||
// Convert images to PDF if enabled
|
||||
if (isImageFile(file) && config?.mobileScannerConvertToPdf !== false) {
|
||||
try {
|
||||
file = await convertImageToPdf(file, {
|
||||
imageResolution: config?.mobileScannerImageResolution as 'full' | 'reduced' | undefined,
|
||||
pageFormat: config?.mobileScannerPageFormat as 'keep' | 'A4' | 'letter' | undefined,
|
||||
stretchToFit: config?.mobileScannerStretchToFit,
|
||||
});
|
||||
console.log('Converted image to PDF:', file.name);
|
||||
} catch (convertError) {
|
||||
console.warn('Failed to convert image to PDF, using original file:', convertError);
|
||||
// Continue with original image file if conversion fails
|
||||
}
|
||||
}
|
||||
|
||||
processedFiles.current.add(fileMetadata.filename);
|
||||
setFilesReceived((prev) => prev + 1);
|
||||
onFilesReceived([file]);
|
||||
@@ -256,10 +272,15 @@ export default function MobileUploadModal({ opened, onClose, onFilesReceived }:
|
||||
variant="light"
|
||||
>
|
||||
<Text size="sm">
|
||||
{t(
|
||||
'mobileUpload.description',
|
||||
'Scan this QR code with your mobile device to upload photos directly to this page.'
|
||||
)}
|
||||
{config?.mobileScannerConvertToPdf !== false
|
||||
? t(
|
||||
'mobileUpload.description',
|
||||
'Scan this QR code with your mobile device to upload photos. Images will be automatically converted to PDF.'
|
||||
)
|
||||
: t(
|
||||
'mobileUpload.descriptionNoConvert',
|
||||
'Scan this QR code with your mobile device to upload photos.'
|
||||
)}
|
||||
</Text>
|
||||
</Alert>
|
||||
|
||||
@@ -308,10 +329,15 @@ export default function MobileUploadModal({ opened, onClose, onFilesReceived }:
|
||||
)}
|
||||
|
||||
<Text size="xs" c="dimmed" ta="center" style={{ maxWidth: '300px' }}>
|
||||
{t(
|
||||
'mobileUpload.instructions',
|
||||
'Open the camera app on your phone and scan this code. Files will be uploaded through the server.'
|
||||
)}
|
||||
{config?.mobileScannerConvertToPdf !== false
|
||||
? t(
|
||||
'mobileUpload.instructions',
|
||||
'Open the camera app on your phone and scan this code. Images will be automatically converted to PDF.'
|
||||
)
|
||||
: t(
|
||||
'mobileUpload.instructionsNoConvert',
|
||||
'Open the camera app on your phone and scan this code. Files will be uploaded through the server.'
|
||||
)}
|
||||
</Text>
|
||||
|
||||
<Text
|
||||
|
||||
@@ -45,6 +45,10 @@ export interface AppConfig {
|
||||
SSOAutoLogin?: boolean;
|
||||
serverCertificateEnabled?: boolean;
|
||||
enableMobileScanner?: boolean;
|
||||
mobileScannerConvertToPdf?: boolean;
|
||||
mobileScannerImageResolution?: string;
|
||||
mobileScannerPageFormat?: string;
|
||||
mobileScannerStretchToFit?: boolean;
|
||||
appVersion?: string;
|
||||
machineType?: string;
|
||||
activeSecurity?: boolean;
|
||||
|
||||
@@ -38,7 +38,7 @@ const FREE_LICENSE_INFO: LicenseInfo = {
|
||||
|
||||
const BASE_NO_LOGIN_CONFIG: AppConfig = {
|
||||
enableAnalytics: true,
|
||||
appVersion: '2.2.0',
|
||||
appVersion: '2.2.1',
|
||||
serverCertificateEnabled: false,
|
||||
enableAlphaFunctionality: false,
|
||||
serverPort: 8080,
|
||||
|
||||
@@ -0,0 +1,297 @@
|
||||
import { PDFDocument, PageSizes } from 'pdf-lib';
|
||||
|
||||
export interface ImageToPdfOptions {
|
||||
imageResolution?: 'full' | 'reduced';
|
||||
pageFormat?: 'keep' | 'A4' | 'letter';
|
||||
stretchToFit?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert an image file to a PDF file
|
||||
* @param imageFile - The image file to convert (JPEG, PNG, etc.)
|
||||
* @param options - Conversion options
|
||||
* @returns A Promise that resolves to a PDF File object
|
||||
*/
|
||||
export async function convertImageToPdf(
|
||||
imageFile: File,
|
||||
options: ImageToPdfOptions = {}
|
||||
): Promise<File> {
|
||||
const {
|
||||
imageResolution = 'full',
|
||||
pageFormat = 'A4',
|
||||
stretchToFit = false,
|
||||
} = options;
|
||||
try {
|
||||
// Create a new PDF document
|
||||
const pdfDoc = await PDFDocument.create();
|
||||
|
||||
// Read the image file as an array buffer
|
||||
let imageBytes = await imageFile.arrayBuffer();
|
||||
|
||||
// Apply image resolution reduction if requested
|
||||
if (imageResolution === 'reduced') {
|
||||
const reducedImage = await reduceImageResolution(imageFile, 1200); // Max 1200px on longest side
|
||||
imageBytes = await reducedImage.arrayBuffer();
|
||||
}
|
||||
|
||||
// Embed the image based on its type
|
||||
let image;
|
||||
const imageType = imageFile.type.toLowerCase();
|
||||
|
||||
if (imageType === 'image/jpeg' || imageType === 'image/jpg') {
|
||||
image = await pdfDoc.embedJpg(imageBytes);
|
||||
} else if (imageType === 'image/png') {
|
||||
image = await pdfDoc.embedPng(imageBytes);
|
||||
} else {
|
||||
// For other image types, try to convert to PNG first using canvas
|
||||
const convertedImage = await convertImageToPng(imageFile);
|
||||
const convertedBytes = await convertedImage.arrayBuffer();
|
||||
image = await pdfDoc.embedPng(convertedBytes);
|
||||
}
|
||||
|
||||
// Get image dimensions
|
||||
const { width: imageWidth, height: imageHeight } = image;
|
||||
|
||||
// Determine page dimensions based on pageFormat option
|
||||
let pageWidth: number;
|
||||
let pageHeight: number;
|
||||
|
||||
if (pageFormat === 'keep') {
|
||||
// Use original image dimensions
|
||||
pageWidth = imageWidth;
|
||||
pageHeight = imageHeight;
|
||||
} else if (pageFormat === 'letter') {
|
||||
// US Letter: 8.5" x 11" = 612 x 792 points
|
||||
pageWidth = PageSizes.Letter[0];
|
||||
pageHeight = PageSizes.Letter[1];
|
||||
} else {
|
||||
// A4: 210mm x 297mm = 595 x 842 points (default)
|
||||
pageWidth = PageSizes.A4[0];
|
||||
pageHeight = PageSizes.A4[1];
|
||||
}
|
||||
|
||||
// Adjust page orientation based on image orientation if using standard page size
|
||||
if (pageFormat !== 'keep') {
|
||||
const imageIsLandscape = imageWidth > imageHeight;
|
||||
const pageIsLandscape = pageWidth > pageHeight;
|
||||
|
||||
// Rotate page to match image orientation
|
||||
if (imageIsLandscape !== pageIsLandscape) {
|
||||
[pageWidth, pageHeight] = [pageHeight, pageWidth];
|
||||
}
|
||||
}
|
||||
|
||||
// Create a page
|
||||
const page = pdfDoc.addPage([pageWidth, pageHeight]);
|
||||
|
||||
// Calculate image placement based on stretchToFit option
|
||||
let drawX: number;
|
||||
let drawY: number;
|
||||
let drawWidth: number;
|
||||
let drawHeight: number;
|
||||
|
||||
if (stretchToFit || pageFormat === 'keep') {
|
||||
// Stretch/fill to page
|
||||
drawX = 0;
|
||||
drawY = 0;
|
||||
drawWidth = pageWidth;
|
||||
drawHeight = pageHeight;
|
||||
} else {
|
||||
// Fit within page bounds while preserving aspect ratio
|
||||
const imageAspectRatio = imageWidth / imageHeight;
|
||||
const pageAspectRatio = pageWidth / pageHeight;
|
||||
|
||||
if (imageAspectRatio > pageAspectRatio) {
|
||||
// Image is wider than page - fit to width
|
||||
drawWidth = pageWidth;
|
||||
drawHeight = pageWidth / imageAspectRatio;
|
||||
drawX = 0;
|
||||
drawY = (pageHeight - drawHeight) / 2; // Center vertically
|
||||
} else {
|
||||
// Image is taller than page - fit to height
|
||||
drawHeight = pageHeight;
|
||||
drawWidth = pageHeight * imageAspectRatio;
|
||||
drawY = 0;
|
||||
drawX = (pageWidth - drawWidth) / 2; // Center horizontally
|
||||
}
|
||||
}
|
||||
|
||||
// Draw the image on the page
|
||||
page.drawImage(image, {
|
||||
x: drawX,
|
||||
y: drawY,
|
||||
width: drawWidth,
|
||||
height: drawHeight,
|
||||
});
|
||||
|
||||
// Save the PDF to bytes
|
||||
const pdfBytes = await pdfDoc.save();
|
||||
|
||||
// Create a filename by replacing the image extension with .pdf
|
||||
const pdfFilename = imageFile.name.replace(/\.[^.]+$/, '.pdf');
|
||||
|
||||
// Create a File object from the PDF bytes
|
||||
const pdfFile = new File([new Uint8Array(pdfBytes)], pdfFilename, {
|
||||
type: 'application/pdf',
|
||||
});
|
||||
|
||||
return pdfFile;
|
||||
} catch (error) {
|
||||
console.error('Error converting image to PDF:', error);
|
||||
throw new Error(
|
||||
`Failed to convert image to PDF: ${error instanceof Error ? error.message : 'Unknown error'}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert an image file to PNG using canvas
|
||||
* This is used for image types that pdf-lib doesn't directly support
|
||||
*/
|
||||
async function convertImageToPng(imageFile: File): Promise<File> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const img = new Image();
|
||||
const url = URL.createObjectURL(imageFile);
|
||||
|
||||
img.onload = () => {
|
||||
try {
|
||||
// Create a canvas with the image dimensions
|
||||
const canvas = document.createElement('canvas');
|
||||
canvas.width = img.width;
|
||||
canvas.height = img.height;
|
||||
|
||||
// Draw the image on the canvas
|
||||
const ctx = canvas.getContext('2d');
|
||||
if (!ctx) {
|
||||
throw new Error('Failed to get canvas context');
|
||||
}
|
||||
ctx.drawImage(img, 0, 0);
|
||||
|
||||
// Convert canvas to blob
|
||||
canvas.toBlob(
|
||||
(blob) => {
|
||||
if (!blob) {
|
||||
reject(new Error('Failed to convert canvas to blob'));
|
||||
return;
|
||||
}
|
||||
|
||||
// Create a File object from the blob
|
||||
const pngFilename = imageFile.name.replace(/\.[^.]+$/, '.png');
|
||||
const pngFile = new File([blob], pngFilename, {
|
||||
type: 'image/png',
|
||||
});
|
||||
|
||||
URL.revokeObjectURL(url);
|
||||
resolve(pngFile);
|
||||
},
|
||||
'image/png',
|
||||
1.0
|
||||
);
|
||||
} catch (error) {
|
||||
URL.revokeObjectURL(url);
|
||||
reject(error);
|
||||
}
|
||||
};
|
||||
|
||||
img.onerror = () => {
|
||||
URL.revokeObjectURL(url);
|
||||
reject(new Error('Failed to load image'));
|
||||
};
|
||||
|
||||
img.src = url;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reduce image resolution to a maximum dimension
|
||||
* @param imageFile - The image file to reduce
|
||||
* @param maxDimension - Maximum width or height in pixels
|
||||
* @returns A Promise that resolves to a reduced resolution image file
|
||||
*/
|
||||
async function reduceImageResolution(
|
||||
imageFile: File,
|
||||
maxDimension: number
|
||||
): Promise<File> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const img = new Image();
|
||||
const url = URL.createObjectURL(imageFile);
|
||||
|
||||
img.onload = () => {
|
||||
try {
|
||||
const { width, height } = img;
|
||||
|
||||
// Check if reduction is needed
|
||||
if (width <= maxDimension && height <= maxDimension) {
|
||||
URL.revokeObjectURL(url);
|
||||
resolve(imageFile); // No reduction needed
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate new dimensions while preserving aspect ratio
|
||||
let newWidth: number;
|
||||
let newHeight: number;
|
||||
|
||||
if (width > height) {
|
||||
newWidth = maxDimension;
|
||||
newHeight = (height / width) * maxDimension;
|
||||
} else {
|
||||
newHeight = maxDimension;
|
||||
newWidth = (width / height) * maxDimension;
|
||||
}
|
||||
|
||||
// Create a canvas with the new dimensions
|
||||
const canvas = document.createElement('canvas');
|
||||
canvas.width = newWidth;
|
||||
canvas.height = newHeight;
|
||||
|
||||
// Draw the resized image on the canvas
|
||||
const ctx = canvas.getContext('2d');
|
||||
if (!ctx) {
|
||||
throw new Error('Failed to get canvas context');
|
||||
}
|
||||
ctx.drawImage(img, 0, 0, newWidth, newHeight);
|
||||
|
||||
// Convert canvas to blob (preserve original format if possible)
|
||||
const outputType = imageFile.type.startsWith('image/')
|
||||
? imageFile.type
|
||||
: 'image/jpeg';
|
||||
|
||||
canvas.toBlob(
|
||||
(blob) => {
|
||||
if (!blob) {
|
||||
reject(new Error('Failed to convert canvas to blob'));
|
||||
return;
|
||||
}
|
||||
|
||||
// Create a File object from the blob
|
||||
const reducedFile = new File([blob], imageFile.name, {
|
||||
type: outputType,
|
||||
});
|
||||
|
||||
URL.revokeObjectURL(url);
|
||||
resolve(reducedFile);
|
||||
},
|
||||
outputType,
|
||||
0.9 // Quality (only applies to JPEG)
|
||||
);
|
||||
} catch (error) {
|
||||
URL.revokeObjectURL(url);
|
||||
reject(error);
|
||||
}
|
||||
};
|
||||
|
||||
img.onerror = () => {
|
||||
URL.revokeObjectURL(url);
|
||||
reject(new Error('Failed to load image'));
|
||||
};
|
||||
|
||||
img.src = url;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a file is an image
|
||||
*/
|
||||
export function isImageFile(file: File): boolean {
|
||||
return file.type.startsWith('image/');
|
||||
}
|
||||
@@ -20,36 +20,67 @@ export const ServerSelection: React.FC<ServerSelectionProps> = ({ onSelect, load
|
||||
const handleSubmit = async (e: React.FormEvent) => {
|
||||
e.preventDefault();
|
||||
|
||||
// Normalize URL: trim and remove trailing slashes
|
||||
const url = customUrl.trim().replace(/\/+$/, '');
|
||||
// Normalize and validate URL
|
||||
let url = customUrl.trim().replace(/\/+$/, '');
|
||||
|
||||
if (!url) {
|
||||
setTestError(t('setup.server.error.emptyUrl', 'Please enter a server URL'));
|
||||
return;
|
||||
}
|
||||
|
||||
// Auto-add https:// if no protocol specified
|
||||
if (!url.startsWith('http://') && !url.startsWith('https://')) {
|
||||
console.log('[ServerSelection] No protocol specified, adding https://');
|
||||
url = `https://${url}`;
|
||||
setCustomUrl(url); // Update the input field
|
||||
}
|
||||
|
||||
// Validate URL format
|
||||
try {
|
||||
const urlObj = new URL(url);
|
||||
console.log('[ServerSelection] Valid URL:', {
|
||||
protocol: urlObj.protocol,
|
||||
hostname: urlObj.hostname,
|
||||
port: urlObj.port,
|
||||
pathname: urlObj.pathname,
|
||||
});
|
||||
} catch (err) {
|
||||
console.error('[ServerSelection] Invalid URL format:', err);
|
||||
setTestError(t('setup.server.error.invalidUrl', 'Invalid URL format. Please enter a valid URL like https://your-server.com'));
|
||||
return;
|
||||
}
|
||||
|
||||
// Test connection before proceeding
|
||||
setTesting(true);
|
||||
setTestError(null);
|
||||
setSecurityDisabled(false);
|
||||
|
||||
try {
|
||||
const isReachable = await connectionModeService.testConnection(url);
|
||||
console.log(`[ServerSelection] Testing connection to: ${url}`);
|
||||
|
||||
if (!isReachable) {
|
||||
setTestError(t('setup.server.error.unreachable', 'Could not connect to server'));
|
||||
try {
|
||||
const testResult = await connectionModeService.testConnection(url);
|
||||
|
||||
if (!testResult.success) {
|
||||
console.error('[ServerSelection] Connection test failed:', testResult);
|
||||
setTestError(testResult.error || t('setup.server.error.unreachable', 'Could not connect to server'));
|
||||
setTesting(false);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('[ServerSelection] ✅ Connection test successful');
|
||||
|
||||
// Fetch OAuth providers and check if login is enabled
|
||||
const enabledProviders: SSOProviderConfig[] = [];
|
||||
try {
|
||||
console.log('[ServerSelection] Fetching login configuration...');
|
||||
const response = await fetch(`${url}/api/v1/proprietary/ui-data/login`);
|
||||
|
||||
// Check if security is disabled (status 403 or error response)
|
||||
// Check if security is disabled (status 403, 401, or 404 - endpoint doesn't exist)
|
||||
if (!response.ok) {
|
||||
if (response.status === 403 || response.status === 401) {
|
||||
console.warn(`[ServerSelection] Login config request failed with status ${response.status}`);
|
||||
|
||||
if (response.status === 403 || response.status === 401 || response.status === 404) {
|
||||
console.log('[ServerSelection] Security/SSO not configured on this server (or endpoint does not exist)');
|
||||
setSecurityDisabled(true);
|
||||
setTesting(false);
|
||||
return;
|
||||
@@ -65,10 +96,11 @@ export const ServerSelection: React.FC<ServerSelectionProps> = ({ onSelect, load
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
console.log('Login UI data:', data);
|
||||
console.log('[ServerSelection] Login UI data:', data);
|
||||
|
||||
// Check if the response indicates security is disabled
|
||||
if (data.enableLogin === false || data.securityEnabled === false) {
|
||||
console.log('[ServerSelection] Security is explicitly disabled in config');
|
||||
setSecurityDisabled(true);
|
||||
setTesting(false);
|
||||
return;
|
||||
@@ -90,32 +122,39 @@ export const ServerSelection: React.FC<ServerSelectionProps> = ({ onSelect, load
|
||||
});
|
||||
});
|
||||
|
||||
console.log('[ServerSelection] Detected OAuth providers:', enabledProviders);
|
||||
console.log('[ServerSelection] ✅ Detected OAuth providers:', enabledProviders);
|
||||
} catch (err) {
|
||||
console.error('[ServerSelection] Failed to fetch login configuration', err);
|
||||
console.error('[ServerSelection] ❌ Failed to fetch login configuration:', err);
|
||||
|
||||
// Check if it's a security disabled error
|
||||
if (err instanceof Error && (err.message.includes('403') || err.message.includes('401'))) {
|
||||
console.log('[ServerSelection] Security is disabled (error-based detection)');
|
||||
setSecurityDisabled(true);
|
||||
setTesting(false);
|
||||
return;
|
||||
}
|
||||
|
||||
// For any other error (network, CORS, invalid JSON, etc.), show error and don't proceed
|
||||
const errorMessage = err instanceof Error ? err.message : 'Unknown error';
|
||||
console.error('[ServerSelection] Configuration fetch error details:', errorMessage);
|
||||
|
||||
setTestError(
|
||||
t('setup.server.error.configFetch', 'Failed to fetch server configuration. Please check the URL and try again.')
|
||||
t('setup.server.error.configFetch', 'Failed to fetch server configuration: {{error}}', {
|
||||
error: errorMessage
|
||||
})
|
||||
);
|
||||
setTesting(false);
|
||||
return;
|
||||
}
|
||||
|
||||
// Connection successful - pass URL and OAuth providers
|
||||
console.log('[ServerSelection] ✅ Server selection complete, proceeding to login');
|
||||
onSelect({
|
||||
url,
|
||||
enabledOAuthProviders: enabledProviders.length > 0 ? enabledProviders : undefined,
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('Connection test failed:', error);
|
||||
console.error('[ServerSelection] ❌ Unexpected error during connection test:', error);
|
||||
setTestError(
|
||||
error instanceof Error
|
||||
? error.message
|
||||
|
||||
@@ -101,7 +101,12 @@ export const SetupWizard: React.FC<SetupWizardProps> = ({ onComplete }) => {
|
||||
};
|
||||
|
||||
const handleSelfHostedLogin = async (username: string, password: string) => {
|
||||
console.log('[SetupWizard] 🔐 Starting self-hosted login');
|
||||
console.log(`[SetupWizard] Server: ${serverConfig?.url}`);
|
||||
console.log(`[SetupWizard] Username: ${username}`);
|
||||
|
||||
if (!serverConfig) {
|
||||
console.error('[SetupWizard] ❌ No server configured');
|
||||
setError('No server configured');
|
||||
return;
|
||||
}
|
||||
@@ -110,19 +115,35 @@ export const SetupWizard: React.FC<SetupWizardProps> = ({ onComplete }) => {
|
||||
setLoading(true);
|
||||
setError(null);
|
||||
|
||||
console.log('[SetupWizard] Step 1: Authenticating with server...');
|
||||
await authService.login(serverConfig.url, username, password);
|
||||
console.log('[SetupWizard] ✅ Authentication successful');
|
||||
|
||||
console.log('[SetupWizard] Step 2: Switching to self-hosted mode...');
|
||||
await connectionModeService.switchToSelfHosted(serverConfig);
|
||||
console.log('[SetupWizard] ✅ Switched to self-hosted mode');
|
||||
|
||||
console.log('[SetupWizard] Step 3: Initializing external backend...');
|
||||
await tauriBackendService.initializeExternalBackend();
|
||||
console.log('[SetupWizard] ✅ External backend initialized');
|
||||
|
||||
console.log('[SetupWizard] ✅ Setup complete, calling onComplete()');
|
||||
onComplete();
|
||||
} catch (err) {
|
||||
console.error('Self-hosted login failed:', err);
|
||||
setError(err instanceof Error ? err.message : 'Self-hosted login failed');
|
||||
console.error('[SetupWizard] ❌ Self-hosted login failed:', err);
|
||||
const errorMessage = err instanceof Error ? err.message : 'Self-hosted login failed';
|
||||
console.error('[SetupWizard] Error message:', errorMessage);
|
||||
setError(errorMessage);
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
const handleSelfHostedOAuthSuccess = async (_userInfo: UserInfo) => {
|
||||
console.log('[SetupWizard] 🔐 OAuth login successful, completing setup');
|
||||
console.log(`[SetupWizard] Server: ${serverConfig?.url}`);
|
||||
|
||||
if (!serverConfig) {
|
||||
console.error('[SetupWizard] ❌ No server configured');
|
||||
setError('No server configured');
|
||||
return;
|
||||
}
|
||||
@@ -131,13 +152,22 @@ export const SetupWizard: React.FC<SetupWizardProps> = ({ onComplete }) => {
|
||||
setLoading(true);
|
||||
setError(null);
|
||||
|
||||
// OAuth already completed by authService.loginWithOAuth
|
||||
console.log('[SetupWizard] Step 1: OAuth already completed');
|
||||
console.log('[SetupWizard] Step 2: Switching to self-hosted mode...');
|
||||
await connectionModeService.switchToSelfHosted(serverConfig);
|
||||
console.log('[SetupWizard] ✅ Switched to self-hosted mode');
|
||||
|
||||
console.log('[SetupWizard] Step 3: Initializing external backend...');
|
||||
await tauriBackendService.initializeExternalBackend();
|
||||
console.log('[SetupWizard] ✅ External backend initialized');
|
||||
|
||||
console.log('[SetupWizard] ✅ Setup complete, calling onComplete()');
|
||||
onComplete();
|
||||
} catch (err) {
|
||||
console.error('Self-hosted OAuth login completion failed:', err);
|
||||
setError(err instanceof Error ? err.message : 'Failed to complete login');
|
||||
console.error('[SetupWizard] ❌ Self-hosted OAuth login completion failed:', err);
|
||||
const errorMessage = err instanceof Error ? err.message : 'Failed to complete login';
|
||||
console.error('[SetupWizard] Error message:', errorMessage);
|
||||
setError(errorMessage);
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -223,19 +223,24 @@ export class AuthService {
|
||||
}
|
||||
|
||||
async login(serverUrl: string, username: string, password: string): Promise<UserInfo> {
|
||||
try {
|
||||
console.log('Logging in to:', serverUrl);
|
||||
console.log(`[Desktop AuthService] 🔐 Starting login to: ${serverUrl}`);
|
||||
console.log(`[Desktop AuthService] Username: ${username}`);
|
||||
|
||||
try {
|
||||
// Validate SaaS configuration if connecting to SaaS
|
||||
if (serverUrl === STIRLING_SAAS_URL) {
|
||||
if (!STIRLING_SAAS_URL) {
|
||||
console.error('[Desktop AuthService] ❌ VITE_SAAS_SERVER_URL is not configured');
|
||||
throw new Error('VITE_SAAS_SERVER_URL is not configured');
|
||||
}
|
||||
if (!SUPABASE_KEY) {
|
||||
console.error('[Desktop AuthService] ❌ VITE_SUPABASE_PUBLISHABLE_DEFAULT_KEY is not configured');
|
||||
throw new Error('VITE_SUPABASE_PUBLISHABLE_DEFAULT_KEY is not configured');
|
||||
}
|
||||
}
|
||||
|
||||
console.log('[Desktop AuthService] Invoking Rust login command...');
|
||||
|
||||
// Call Rust login command (bypasses CORS)
|
||||
const response = await invoke<LoginResponse>('login', {
|
||||
serverUrl,
|
||||
@@ -247,21 +252,26 @@ export class AuthService {
|
||||
|
||||
const { token, username: returnedUsername, email } = response;
|
||||
|
||||
console.log('[Desktop AuthService] Login successful, saving token...');
|
||||
console.log('[Desktop AuthService] ✅ Login response received');
|
||||
console.log(`[Desktop AuthService] Username from response: ${returnedUsername || username}`);
|
||||
|
||||
// Save token to all storage locations
|
||||
try {
|
||||
console.log('[Desktop AuthService] Saving token to storage...');
|
||||
await this.saveTokenEverywhere(token);
|
||||
console.log('[Desktop AuthService] ✅ Token saved successfully');
|
||||
} catch (error) {
|
||||
console.error('[Desktop AuthService] Failed to save token:', error);
|
||||
console.error('[Desktop AuthService] ❌ Failed to save token:', error);
|
||||
throw new Error('Failed to save authentication token');
|
||||
}
|
||||
|
||||
// Save user info to store
|
||||
console.log('[Desktop AuthService] Saving user info...');
|
||||
await invoke('save_user_info', {
|
||||
username: returnedUsername || username,
|
||||
email,
|
||||
});
|
||||
console.log('[Desktop AuthService] ✅ User info saved');
|
||||
|
||||
const userInfo: UserInfo = {
|
||||
username: returnedUsername || username,
|
||||
@@ -270,10 +280,60 @@ export class AuthService {
|
||||
|
||||
this.setAuthStatus('authenticated', userInfo);
|
||||
|
||||
console.log('Login successful');
|
||||
console.log('[Desktop AuthService] ✅ Login completed successfully');
|
||||
return userInfo;
|
||||
} catch (error) {
|
||||
console.error('Login failed:', error);
|
||||
console.error('[Desktop AuthService] ❌ Login failed:', error);
|
||||
|
||||
// Provide more detailed error messages based on the error type
|
||||
if (error instanceof Error) {
|
||||
const errMsg = error.message.toLowerCase();
|
||||
|
||||
// Authentication errors
|
||||
if (errMsg.includes('401') || errMsg.includes('unauthorized') || errMsg.includes('invalid credentials')) {
|
||||
console.error('[Desktop AuthService] Authentication failed - invalid credentials');
|
||||
this.setAuthStatus('unauthenticated', null);
|
||||
throw new Error('Invalid username or password. Please check your credentials and try again.');
|
||||
}
|
||||
// Server not found or unreachable
|
||||
else if (errMsg.includes('connection refused') || errMsg.includes('econnrefused')) {
|
||||
console.error('[Desktop AuthService] Server connection refused');
|
||||
this.setAuthStatus('unauthenticated', null);
|
||||
throw new Error('Cannot connect to server. Please check the server URL and ensure the server is running.');
|
||||
}
|
||||
// Timeout
|
||||
else if (errMsg.includes('timeout') || errMsg.includes('timed out')) {
|
||||
console.error('[Desktop AuthService] Login request timed out');
|
||||
this.setAuthStatus('unauthenticated', null);
|
||||
throw new Error('Login request timed out. Please check your network connection and try again.');
|
||||
}
|
||||
// DNS failure
|
||||
else if (errMsg.includes('getaddrinfo') || errMsg.includes('dns') || errMsg.includes('not found') || errMsg.includes('enotfound')) {
|
||||
console.error('[Desktop AuthService] DNS resolution failed');
|
||||
this.setAuthStatus('unauthenticated', null);
|
||||
throw new Error('Cannot resolve server address. Please check the server URL is correct.');
|
||||
}
|
||||
// SSL/TLS errors
|
||||
else if (errMsg.includes('ssl') || errMsg.includes('tls') || errMsg.includes('certificate') || errMsg.includes('cert')) {
|
||||
console.error('[Desktop AuthService] SSL/TLS error');
|
||||
this.setAuthStatus('unauthenticated', null);
|
||||
throw new Error('SSL/TLS certificate error. Server may have an invalid or self-signed certificate.');
|
||||
}
|
||||
// 404 - endpoint not found
|
||||
else if (errMsg.includes('404') || errMsg.includes('not found')) {
|
||||
console.error('[Desktop AuthService] Login endpoint not found');
|
||||
this.setAuthStatus('unauthenticated', null);
|
||||
throw new Error('Login endpoint not found. Please ensure you are connecting to a valid Stirling PDF server.');
|
||||
}
|
||||
// 403 - security disabled
|
||||
else if (errMsg.includes('403') || errMsg.includes('forbidden')) {
|
||||
console.error('[Desktop AuthService] Login disabled on server');
|
||||
this.setAuthStatus('unauthenticated', null);
|
||||
throw new Error('Login is not enabled on this server. Please enable security mode (DOCKER_ENABLE_SECURITY=true).');
|
||||
}
|
||||
}
|
||||
|
||||
// Generic error fallback
|
||||
this.setAuthStatus('unauthenticated', null);
|
||||
throw error;
|
||||
}
|
||||
|
||||
@@ -19,6 +19,20 @@ export interface ConnectionConfig {
|
||||
server_config: ServerConfig | null;
|
||||
}
|
||||
|
||||
export interface DiagnosticResult {
|
||||
stage: string;
|
||||
success: boolean;
|
||||
message: string;
|
||||
duration?: number;
|
||||
}
|
||||
|
||||
export interface ConnectionTestResult {
|
||||
success: boolean;
|
||||
error?: string;
|
||||
errorCode?: string;
|
||||
diagnostics?: DiagnosticResult[];
|
||||
}
|
||||
|
||||
export class ConnectionModeService {
|
||||
private static instance: ConnectionModeService;
|
||||
private currentConfig: ConnectionConfig | null = null;
|
||||
@@ -105,25 +119,767 @@ export class ConnectionModeService {
|
||||
console.log('Switched to self-hosted mode successfully');
|
||||
}
|
||||
|
||||
async testConnection(url: string): Promise<boolean> {
|
||||
console.log(`[ConnectionModeService] Testing connection to: ${url}`);
|
||||
try {
|
||||
// Test connection by hitting the health/status endpoint
|
||||
const healthUrl = `${url.replace(/\/$/, '')}/api/v1/info/status`;
|
||||
const response = await fetch(healthUrl, {
|
||||
method: 'GET',
|
||||
connectTimeout: 10000,
|
||||
});
|
||||
/**
|
||||
* Test connection to a server URL with comprehensive multi-stage diagnostics
|
||||
* @returns Detailed test results with diagnostics and recommendations
|
||||
*/
|
||||
async testConnection(url: string): Promise<ConnectionTestResult> {
|
||||
console.log(`[ConnectionModeService] 🔍 Starting comprehensive connection diagnostics for: ${url}`);
|
||||
console.log(`[ConnectionModeService] ==================== DIAGNOSTIC SESSION START ====================`);
|
||||
console.log(`[ConnectionModeService] System Information:`);
|
||||
console.log(`[ConnectionModeService] - User Agent: ${navigator.userAgent}`);
|
||||
console.log(`[ConnectionModeService] - Platform: ${navigator.platform}`);
|
||||
console.log(`[ConnectionModeService] - Online: ${navigator.onLine}`);
|
||||
console.log(`[ConnectionModeService] - Connection Type: ${(navigator as any).connection?.effectiveType || 'unknown'}`);
|
||||
console.log(`[ConnectionModeService] - Language: ${navigator.language}`);
|
||||
console.log(`[ConnectionModeService] - Cookies Enabled: ${navigator.cookieEnabled}`);
|
||||
console.log(`[ConnectionModeService] - Hardware Concurrency: ${navigator.hardwareConcurrency || 'unknown'} cores`);
|
||||
console.log(`[ConnectionModeService] - Max Touch Points: ${navigator.maxTouchPoints}`);
|
||||
|
||||
const isOk = response.ok;
|
||||
console.log(`[ConnectionModeService] Server connection test result: ${isOk}`);
|
||||
return isOk;
|
||||
} catch (error) {
|
||||
console.warn('[ConnectionModeService] Server connection test failed:', error);
|
||||
// Check for proxy environment variables
|
||||
console.log(`[ConnectionModeService] Environment Check:`);
|
||||
const envProxy = (window as any).process?.env?.HTTP_PROXY || (window as any).process?.env?.HTTPS_PROXY;
|
||||
if (envProxy) {
|
||||
console.log(`[ConnectionModeService] - Proxy detected: ${envProxy}`);
|
||||
} else {
|
||||
console.log(`[ConnectionModeService] - No proxy environment variables detected`);
|
||||
}
|
||||
|
||||
// Check if running in Tauri (v2 uses different detection)
|
||||
console.log(`[ConnectionModeService] - Checking Tauri context...`);
|
||||
console.log(`[ConnectionModeService] - window.__TAURI__ type: ${typeof (window as any).__TAURI__}`);
|
||||
console.log(`[ConnectionModeService] - window.__TAURI_INTERNALS__ type: ${typeof (window as any).__TAURI_INTERNALS__}`);
|
||||
console.log(`[ConnectionModeService] - window.location.href:`, window.location.href);
|
||||
console.log(`[ConnectionModeService] - window.location.protocol:`, window.location.protocol);
|
||||
|
||||
// Tauri v2 detection: check for __TAURI_INTERNALS__ or tauri:// protocol
|
||||
const isTauriV2 = typeof (window as any).__TAURI_INTERNALS__ !== 'undefined' ||
|
||||
window.location.protocol === 'tauri:' ||
|
||||
window.location.hostname === 'tauri.localhost';
|
||||
const isTauriV1 = typeof (window as any).__TAURI__ !== 'undefined';
|
||||
const isTauri = isTauriV1 || isTauriV2;
|
||||
|
||||
console.log(`[ConnectionModeService] - Running in Tauri v1: ${isTauriV1}`);
|
||||
console.log(`[ConnectionModeService] - Running in Tauri v2: ${isTauriV2}`);
|
||||
console.log(`[ConnectionModeService] - Running in Tauri: ${isTauri}`);
|
||||
|
||||
if (isTauri) {
|
||||
if (isTauriV1) {
|
||||
const tauriApi = (window as any).__TAURI__;
|
||||
console.log(`[ConnectionModeService] - Tauri v1 API:`, tauriApi);
|
||||
}
|
||||
if (isTauriV2) {
|
||||
console.log(`[ConnectionModeService] - Tauri v2 detected via internals/protocol`);
|
||||
const internals = (window as any).__TAURI_INTERNALS__;
|
||||
console.log(`[ConnectionModeService] - Tauri internals:`, internals);
|
||||
}
|
||||
}
|
||||
|
||||
const diagnostics: DiagnosticResult[] = [];
|
||||
const healthUrl = `${url.replace(/\/$/, '')}/api/v1/info/status`;
|
||||
const isLocal = this.isLocalAddress(url);
|
||||
const isHttpUrl = url.startsWith('http://');
|
||||
const isHttpsUrl = url.startsWith('https://');
|
||||
|
||||
console.log(`[ConnectionModeService] Connection Parameters:`);
|
||||
console.log(`[ConnectionModeService] - Target URL: ${url}`);
|
||||
console.log(`[ConnectionModeService] - Health endpoint: ${healthUrl}`);
|
||||
console.log(`[ConnectionModeService] - Is local address: ${isLocal}`);
|
||||
console.log(`[ConnectionModeService] - Protocol: ${isHttpUrl ? 'HTTP' : isHttpsUrl ? 'HTTPS' : 'Unknown'}`);
|
||||
console.log(`[ConnectionModeService] ================================================================`);
|
||||
|
||||
// STAGE 1: Test the protocol they specified
|
||||
if (isHttpUrl) {
|
||||
console.log(`[ConnectionModeService] Stage 1: Testing HTTP (as specified in URL)`);
|
||||
const stage1Result = await this.testHTTP(healthUrl, 'Stage 1: HTTP (as specified)');
|
||||
diagnostics.push(stage1Result);
|
||||
|
||||
if (stage1Result.success) {
|
||||
console.log(`[ConnectionModeService] ✅ Connection successful with HTTP`);
|
||||
|
||||
// Log success summary
|
||||
console.log(`[ConnectionModeService] ==================== DIAGNOSTIC SUMMARY ====================`);
|
||||
console.log(`[ConnectionModeService] ✅ CONNECTION SUCCESSFUL`);
|
||||
console.log(`[ConnectionModeService] Protocol: HTTP (as requested by user)`);
|
||||
console.log(`[ConnectionModeService] Duration: ${stage1Result.duration}ms`);
|
||||
console.log(`[ConnectionModeService] ==================== DIAGNOSTIC SESSION END ====================`);
|
||||
|
||||
return {
|
||||
success: true,
|
||||
diagnostics,
|
||||
};
|
||||
}
|
||||
|
||||
// HTTP failed, try HTTPS as fallback
|
||||
console.log(`[ConnectionModeService] Stage 2: HTTP failed, trying HTTPS`);
|
||||
const httpsUrl = healthUrl.replace('http://', 'https://');
|
||||
const stage2Result = await this.testHTTPS(httpsUrl, 'Stage 2: Trying HTTPS', false);
|
||||
diagnostics.push(stage2Result);
|
||||
|
||||
if (stage2Result.success) {
|
||||
return {
|
||||
success: false,
|
||||
error: 'Server is only accessible via HTTPS, not HTTP.',
|
||||
errorCode: 'HTTP_NOT_AVAILABLE',
|
||||
diagnostics,
|
||||
};
|
||||
}
|
||||
|
||||
// Both failed, continue with more diagnostics below
|
||||
} else {
|
||||
// HTTPS URL or no protocol - test HTTPS
|
||||
console.log(`[ConnectionModeService] Stage 1: Testing HTTPS with full certificate validation`);
|
||||
const stage1Result = await this.testHTTPS(healthUrl, 'Stage 1: Standard HTTPS', false);
|
||||
diagnostics.push(stage1Result);
|
||||
|
||||
if (stage1Result.success) {
|
||||
console.log(`[ConnectionModeService] ✅ Connection successful with standard HTTPS`);
|
||||
|
||||
// Log success summary
|
||||
console.log(`[ConnectionModeService] ==================== DIAGNOSTIC SUMMARY ====================`);
|
||||
console.log(`[ConnectionModeService] ✅ CONNECTION SUCCESSFUL`);
|
||||
console.log(`[ConnectionModeService] Protocol: HTTPS with valid certificate`);
|
||||
console.log(`[ConnectionModeService] Duration: ${stage1Result.duration}ms`);
|
||||
console.log(`[ConnectionModeService] ==================== DIAGNOSTIC SESSION END ====================`);
|
||||
|
||||
return { success: true, diagnostics };
|
||||
}
|
||||
|
||||
// STAGE 2: Test with certificate validation disabled (diagnose cert issues)
|
||||
console.log(`[ConnectionModeService] Stage 2: Testing HTTPS with certificate validation disabled`);
|
||||
const stage2Result = await this.testHTTPS(healthUrl, 'Stage 2: HTTPS (no cert validation)', true);
|
||||
diagnostics.push(stage2Result);
|
||||
|
||||
if (stage2Result.success) {
|
||||
console.log(`[ConnectionModeService] ⚠️ Certificate issue detected - works without validation`);
|
||||
return {
|
||||
success: false,
|
||||
error: 'SSL certificate validation failed. The server has an invalid, self-signed, or untrusted certificate.',
|
||||
errorCode: 'SSL_CERTIFICATE_INVALID',
|
||||
diagnostics,
|
||||
};
|
||||
}
|
||||
|
||||
// STAGE 3: Try HTTP instead (for local/internal servers)
|
||||
console.log(`[ConnectionModeService] Stage 3: Testing HTTP instead of HTTPS`);
|
||||
const httpUrl = healthUrl.replace('https://', 'http://');
|
||||
const stage3Result = await this.testHTTP(httpUrl, 'Stage 3: HTTP (unencrypted)');
|
||||
diagnostics.push(stage3Result);
|
||||
|
||||
if (stage3Result.success) {
|
||||
console.log(`[ConnectionModeService] ⚠️ HTTP works but HTTPS doesn't`);
|
||||
return {
|
||||
success: false,
|
||||
error: 'Server is only accessible via HTTP (not HTTPS).',
|
||||
errorCode: 'HTTPS_NOT_AVAILABLE',
|
||||
diagnostics,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// STAGE 4: Test with longer timeout (diagnose slow connections)
|
||||
console.log(`[ConnectionModeService] Stage 4: Testing with extended timeout (30s)`);
|
||||
const stage4Result = await this.testWithLongTimeout(healthUrl);
|
||||
diagnostics.push(stage4Result);
|
||||
|
||||
if (stage4Result.success) {
|
||||
console.log(`[ConnectionModeService] ⚠️ Connection slow but eventually successful`);
|
||||
return {
|
||||
success: true,
|
||||
diagnostics,
|
||||
};
|
||||
}
|
||||
|
||||
// STAGE 5A: Test external connectivity with standard endpoint
|
||||
console.log(`[ConnectionModeService] Stage 5A: Testing external connectivity (google.com)`);
|
||||
const stage5aResult = await this.testStage5_ExternalConnectivity();
|
||||
diagnostics.push(stage5aResult);
|
||||
|
||||
// STAGE 5B: Test with alternative endpoint (in case google is blocked)
|
||||
console.log(`[ConnectionModeService] Stage 5B: Testing alternative endpoint (cloudflare.com)`);
|
||||
const stage5bResult = await this.testAlternativeEndpoint();
|
||||
diagnostics.push(stage5bResult);
|
||||
|
||||
// STAGE 5C: Test with HTTP vs HTTPS for external endpoint
|
||||
console.log(`[ConnectionModeService] Stage 5C: Testing HTTP external endpoint`);
|
||||
const stage5cResult = await this.testHTTPExternal();
|
||||
diagnostics.push(stage5cResult);
|
||||
|
||||
if (!stage5aResult.success && !stage5bResult.success && !stage5cResult.success) {
|
||||
console.log(`[ConnectionModeService] ❌ No external connectivity - network/firewall issue`);
|
||||
return {
|
||||
success: false,
|
||||
error: 'No internet connectivity detected. All network requests are failing.',
|
||||
errorCode: 'NETWORK_BLOCKED',
|
||||
diagnostics,
|
||||
};
|
||||
}
|
||||
|
||||
// If some external endpoints work but not the target, it's more specific
|
||||
if (stage5aResult.success || stage5bResult.success || stage5cResult.success) {
|
||||
console.log(`[ConnectionModeService] ✅ External connectivity confirmed - issue is specific to target server`);
|
||||
}
|
||||
|
||||
// STAGE 6: Test DNS resolution for the target server
|
||||
console.log(`[ConnectionModeService] Stage 6: Testing DNS resolution for target server`);
|
||||
const urlObj = new URL(url);
|
||||
const stage6Result = await this.testStage6_DNSResolution(urlObj.hostname);
|
||||
diagnostics.push(stage6Result);
|
||||
|
||||
if (!stage6Result.success && stage6Result.message.includes('DNS lookup failed')) {
|
||||
console.log(`[ConnectionModeService] ❌ DNS resolution failed for target server`);
|
||||
return {
|
||||
success: false,
|
||||
error: `Cannot resolve hostname: ${urlObj.hostname}`,
|
||||
errorCode: 'DNS_RESOLUTION_FAILED',
|
||||
diagnostics,
|
||||
};
|
||||
}
|
||||
|
||||
// STAGE 7: Try different HTTP method (HEAD instead of GET)
|
||||
console.log(`[ConnectionModeService] Stage 7: Testing with HEAD method`);
|
||||
const stage7Result = await this.testWithHEADMethod(healthUrl);
|
||||
diagnostics.push(stage7Result);
|
||||
|
||||
if (stage7Result.success) {
|
||||
console.log(`[ConnectionModeService] ⚠️ HEAD method works but GET doesn't - unusual server behavior`);
|
||||
return {
|
||||
success: false,
|
||||
error: 'Server responds to HEAD requests but not GET requests.',
|
||||
errorCode: 'METHOD_MISMATCH',
|
||||
diagnostics,
|
||||
};
|
||||
}
|
||||
|
||||
// STAGE 8: Try with modified User-Agent
|
||||
console.log(`[ConnectionModeService] Stage 8: Testing with browser User-Agent`);
|
||||
const stage8Result = await this.testWithBrowserUserAgent(healthUrl);
|
||||
diagnostics.push(stage8Result);
|
||||
|
||||
if (stage8Result.success) {
|
||||
console.log(`[ConnectionModeService] ⚠️ Works with browser User-Agent - server may be blocking desktop apps`);
|
||||
return {
|
||||
success: false,
|
||||
error: 'Server blocks Tauri/desktop app User-Agent but allows browser User-Agent.',
|
||||
errorCode: 'USER_AGENT_BLOCKED',
|
||||
diagnostics,
|
||||
};
|
||||
}
|
||||
|
||||
// STAGE 9: Final analysis - server-specific issue
|
||||
console.log(`[ConnectionModeService] ❌ Server unreachable - all diagnostic tests failed`);
|
||||
|
||||
// Analyze timing patterns
|
||||
const avgDuration = diagnostics
|
||||
.filter(d => !d.success && d.duration)
|
||||
.reduce((sum, d) => sum + (d.duration || 0), 0) /
|
||||
diagnostics.filter(d => !d.success && d.duration).length;
|
||||
|
||||
// Log comprehensive diagnostic summary
|
||||
console.log(`[ConnectionModeService] ==================== DIAGNOSTIC SUMMARY ====================`);
|
||||
console.log(`[ConnectionModeService] Total tests run: ${diagnostics.length}`);
|
||||
console.log(`[ConnectionModeService] Passed: ${diagnostics.filter(d => d.success).length}`);
|
||||
console.log(`[ConnectionModeService] Failed: ${diagnostics.filter(d => !d.success).length}`);
|
||||
console.log(`[ConnectionModeService] Average failure time: ${avgDuration.toFixed(0)}ms`);
|
||||
console.log(`[ConnectionModeService] ---------------------------------------------------------------`);
|
||||
diagnostics.forEach((diag) => {
|
||||
const icon = diag.success ? '✅' : '❌';
|
||||
console.log(`[ConnectionModeService] ${icon} ${diag.stage}: ${diag.message} (${diag.duration}ms)`);
|
||||
});
|
||||
console.log(`[ConnectionModeService] ================================================================`);
|
||||
console.log(`[ConnectionModeService] Error Code: SERVER_UNREACHABLE`);
|
||||
|
||||
// Log timing-based analysis
|
||||
if (avgDuration < 100) {
|
||||
console.log(`[ConnectionModeService] Analysis: Immediate rejections (<${avgDuration.toFixed(0)}ms) suggest firewall/antivirus blocking`);
|
||||
} else if (avgDuration > 5000) {
|
||||
console.log(`[ConnectionModeService] Analysis: Timeouts (avg ${(avgDuration/1000).toFixed(1)}s) suggest server not responding or network route blocked`);
|
||||
} else {
|
||||
console.log(`[ConnectionModeService] Analysis: Server may be down, blocking connections, or behind a firewall`);
|
||||
}
|
||||
|
||||
console.log(`[ConnectionModeService] ==================== DIAGNOSTIC SESSION END ====================`);
|
||||
|
||||
return {
|
||||
success: false,
|
||||
error: 'Cannot connect to server. Internet works but this specific server is unreachable.',
|
||||
errorCode: 'SERVER_UNREACHABLE',
|
||||
diagnostics,
|
||||
};
|
||||
}
|
||||
|
||||
private isLocalAddress(url: string): boolean {
|
||||
try {
|
||||
const urlObj = new URL(url);
|
||||
const hostname = urlObj.hostname.toLowerCase();
|
||||
return (
|
||||
hostname === 'localhost' ||
|
||||
hostname === '127.0.0.1' ||
|
||||
hostname === '::1' ||
|
||||
hostname.startsWith('192.168.') ||
|
||||
hostname.startsWith('10.') ||
|
||||
hostname.startsWith('172.16.') ||
|
||||
hostname.endsWith('.local')
|
||||
);
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private async testHTTPS(url: string, stageName: string, disableCertValidation: boolean): Promise<DiagnosticResult> {
|
||||
const startTime = Date.now();
|
||||
try {
|
||||
console.log(`[ConnectionModeService] 🔗 ${stageName}: Attempting fetch to ${url}`);
|
||||
console.log(`[ConnectionModeService] - Certificate validation: ${disableCertValidation ? 'DISABLED' : 'ENABLED'}`);
|
||||
|
||||
const fetchOptions: any = {
|
||||
method: 'GET',
|
||||
connectTimeout: 10000,
|
||||
};
|
||||
|
||||
if (disableCertValidation) {
|
||||
fetchOptions.danger = {
|
||||
acceptInvalidCerts: true,
|
||||
acceptInvalidHostnames: true,
|
||||
};
|
||||
}
|
||||
|
||||
console.log(`[ConnectionModeService] - Fetch options:`, JSON.stringify(fetchOptions));
|
||||
const response = await fetch(url, fetchOptions);
|
||||
const duration = Date.now() - startTime;
|
||||
|
||||
console.log(`[ConnectionModeService] ✅ ${stageName}: Response received - HTTP ${response.status} (${duration}ms)`);
|
||||
|
||||
if (response.ok) {
|
||||
return {
|
||||
stage: stageName,
|
||||
success: true,
|
||||
message: disableCertValidation
|
||||
? 'Connected successfully when certificate validation disabled'
|
||||
: 'Successfully connected with full certificate validation',
|
||||
duration,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
stage: stageName,
|
||||
success: false,
|
||||
message: `Server returned HTTP ${response.status}`,
|
||||
duration,
|
||||
};
|
||||
} catch (error) {
|
||||
const duration = Date.now() - startTime;
|
||||
|
||||
// Enhanced error logging
|
||||
console.error(`[ConnectionModeService] ❌ ${stageName}: Request failed (${duration}ms)`);
|
||||
console.error(`[ConnectionModeService] - Error type: ${error?.constructor?.name || typeof error}`);
|
||||
console.error(`[ConnectionModeService] - Error message: ${error instanceof Error ? error.message : String(error)}`);
|
||||
|
||||
// Log full error object structure for debugging
|
||||
if (error && typeof error === 'object') {
|
||||
console.error(`[ConnectionModeService] - Error keys:`, Object.keys(error));
|
||||
console.error(`[ConnectionModeService] - Error object:`, JSON.stringify(error, Object.getOwnPropertyNames(error), 2));
|
||||
}
|
||||
|
||||
// Categorize error type
|
||||
const errorMsg = error instanceof Error ? error.message : String(error);
|
||||
const errorLower = errorMsg.toLowerCase();
|
||||
|
||||
let detailedMessage = `Failed: ${errorMsg}`;
|
||||
|
||||
if (errorLower.includes('timeout') || errorLower.includes('timed out')) {
|
||||
detailedMessage = `Timeout after ${duration}ms - server not responding`;
|
||||
} else if (errorLower.includes('certificate') || errorLower.includes('cert') || errorLower.includes('ssl') || errorLower.includes('tls')) {
|
||||
detailedMessage = `SSL/TLS error - ${errorMsg}`;
|
||||
} else if (errorLower.includes('connection refused') || errorLower.includes('econnrefused')) {
|
||||
detailedMessage = `Connection refused - server may not be running`;
|
||||
} else if (errorLower.includes('network') || errorLower.includes('dns') || errorLower.includes('enotfound')) {
|
||||
detailedMessage = `Network error - ${errorMsg}`;
|
||||
} else if (errorLower.includes('blocked') || errorLower.includes('filtered')) {
|
||||
detailedMessage = `Request blocked - possible firewall/antivirus`;
|
||||
} else if (duration < 100) {
|
||||
detailedMessage = `Immediate rejection (<${duration}ms) - likely blocked by firewall/antivirus`;
|
||||
}
|
||||
|
||||
console.error(`[ConnectionModeService] - Categorized as: ${detailedMessage}`);
|
||||
|
||||
return {
|
||||
stage: stageName,
|
||||
success: false,
|
||||
message: detailedMessage,
|
||||
duration,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private async testHTTP(url: string, stageName: string): Promise<DiagnosticResult> {
|
||||
const startTime = Date.now();
|
||||
try {
|
||||
console.log(`[ConnectionModeService] 🔗 ${stageName}: Attempting fetch to ${url}`);
|
||||
|
||||
const response = await fetch(url, {
|
||||
method: 'GET',
|
||||
connectTimeout: 10000,
|
||||
});
|
||||
const duration = Date.now() - startTime;
|
||||
|
||||
console.log(`[ConnectionModeService] ✅ ${stageName}: Response received - HTTP ${response.status} (${duration}ms)`);
|
||||
|
||||
if (response.ok) {
|
||||
return {
|
||||
stage: stageName,
|
||||
success: true,
|
||||
message: 'Successfully connected using HTTP',
|
||||
duration,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
stage: stageName,
|
||||
success: false,
|
||||
message: `Server returned HTTP ${response.status}`,
|
||||
duration,
|
||||
};
|
||||
} catch (error) {
|
||||
const duration = Date.now() - startTime;
|
||||
|
||||
// Enhanced error logging
|
||||
console.error(`[ConnectionModeService] ❌ ${stageName}: Request failed (${duration}ms)`);
|
||||
console.error(`[ConnectionModeService] - Error type: ${error?.constructor?.name || typeof error}`);
|
||||
console.error(`[ConnectionModeService] - Error message: ${error instanceof Error ? error.message : String(error)}`);
|
||||
|
||||
if (error && typeof error === 'object') {
|
||||
console.error(`[ConnectionModeService] - Error object:`, JSON.stringify(error, Object.getOwnPropertyNames(error), 2));
|
||||
}
|
||||
|
||||
const errorMsg = error instanceof Error ? error.message : String(error);
|
||||
const errorLower = errorMsg.toLowerCase();
|
||||
|
||||
let detailedMessage = `Failed: ${errorMsg}`;
|
||||
|
||||
if (errorLower.includes('timeout') || errorLower.includes('timed out')) {
|
||||
detailedMessage = `Timeout after ${duration}ms - server not responding`;
|
||||
} else if (duration < 100) {
|
||||
detailedMessage = `Immediate rejection (<${duration}ms) - likely blocked by firewall/antivirus`;
|
||||
}
|
||||
|
||||
console.error(`[ConnectionModeService] - Categorized as: ${detailedMessage}`);
|
||||
|
||||
return {
|
||||
stage: stageName,
|
||||
success: false,
|
||||
message: detailedMessage,
|
||||
duration,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private async testWithLongTimeout(url: string): Promise<DiagnosticResult> {
|
||||
const startTime = Date.now();
|
||||
try {
|
||||
const response = await fetch(url, {
|
||||
method: 'GET',
|
||||
connectTimeout: 30000, // 30 seconds
|
||||
});
|
||||
const duration = Date.now() - startTime;
|
||||
|
||||
if (response.ok) {
|
||||
return {
|
||||
stage: 'Stage 4: Extended timeout (30s)',
|
||||
success: true,
|
||||
message: `Connected after ${duration}ms (slow connection)`,
|
||||
duration,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
stage: 'Stage 4: Extended timeout (30s)',
|
||||
success: false,
|
||||
message: `Server returned HTTP ${response.status}`,
|
||||
duration,
|
||||
};
|
||||
} catch (error) {
|
||||
const duration = Date.now() - startTime;
|
||||
const errorMsg = error instanceof Error ? error.message : 'Unknown error';
|
||||
return {
|
||||
stage: 'Stage 4: Extended timeout (30s)',
|
||||
success: false,
|
||||
message: `Failed: ${errorMsg}`,
|
||||
duration,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private async testStage5_ExternalConnectivity(): Promise<DiagnosticResult> {
|
||||
const startTime = Date.now();
|
||||
try {
|
||||
console.log(`[ConnectionModeService] 🌐 Stage 5A: Testing external connectivity (google.com)`);
|
||||
|
||||
// Test connectivity to a reliable external service
|
||||
const response = await fetch('https://www.google.com', {
|
||||
method: 'HEAD',
|
||||
connectTimeout: 5000,
|
||||
});
|
||||
const duration = Date.now() - startTime;
|
||||
|
||||
console.log(`[ConnectionModeService] ✅ Stage 5A: External connectivity confirmed - HTTP ${response.status} (${duration}ms)`);
|
||||
|
||||
if (response.ok || response.status === 301 || response.status === 302) {
|
||||
return {
|
||||
stage: 'Stage 5A: External (google.com)',
|
||||
success: true,
|
||||
message: 'Internet connectivity confirmed via google.com',
|
||||
duration,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
stage: 'Stage 5A: External (google.com)',
|
||||
success: false,
|
||||
message: `Unexpected response from google.com: ${response.status}`,
|
||||
duration,
|
||||
};
|
||||
} catch (error) {
|
||||
const duration = Date.now() - startTime;
|
||||
console.error(`[ConnectionModeService] ❌ Stage 5A: External connectivity test failed (${duration}ms)`);
|
||||
console.error(`[ConnectionModeService] - Error:`, error);
|
||||
|
||||
const errorMsg = error instanceof Error ? error.message : String(error);
|
||||
return {
|
||||
stage: 'Stage 5A: External (google.com)',
|
||||
success: false,
|
||||
message: `Failed: ${errorMsg}`,
|
||||
duration,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private async testAlternativeEndpoint(): Promise<DiagnosticResult> {
|
||||
const startTime = Date.now();
|
||||
try {
|
||||
console.log(`[ConnectionModeService] 🌐 Stage 5B: Testing alternative endpoint (cloudflare.com)`);
|
||||
|
||||
const response = await fetch('https://1.1.1.1', {
|
||||
method: 'HEAD',
|
||||
connectTimeout: 5000,
|
||||
});
|
||||
const duration = Date.now() - startTime;
|
||||
|
||||
console.log(`[ConnectionModeService] ✅ Stage 5B: Alternative endpoint success - HTTP ${response.status} (${duration}ms)`);
|
||||
|
||||
if (response.ok || response.status === 301 || response.status === 302 || response.status === 403) {
|
||||
return {
|
||||
stage: 'Stage 5B: External (cloudflare)',
|
||||
success: true,
|
||||
message: 'Alternative endpoint (1.1.1.1) reachable',
|
||||
duration,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
stage: 'Stage 5B: External (cloudflare)',
|
||||
success: false,
|
||||
message: `Unexpected response: ${response.status}`,
|
||||
duration,
|
||||
};
|
||||
} catch (error) {
|
||||
const duration = Date.now() - startTime;
|
||||
console.error(`[ConnectionModeService] ❌ Stage 5B: Alternative endpoint failed (${duration}ms)`);
|
||||
console.error(`[ConnectionModeService] - Error:`, error);
|
||||
|
||||
const errorMsg = error instanceof Error ? error.message : String(error);
|
||||
return {
|
||||
stage: 'Stage 5B: External (cloudflare)',
|
||||
success: false,
|
||||
message: `Failed: ${errorMsg}`,
|
||||
duration,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private async testHTTPExternal(): Promise<DiagnosticResult> {
|
||||
const startTime = Date.now();
|
||||
try {
|
||||
console.log(`[ConnectionModeService] 🌐 Stage 5C: Testing HTTP external endpoint (httpbin.org)`);
|
||||
|
||||
// Try HTTP (not HTTPS) to see if TLS/SSL is the issue
|
||||
const response = await fetch('http://httpbin.org/status/200', {
|
||||
method: 'GET',
|
||||
connectTimeout: 5000,
|
||||
});
|
||||
const duration = Date.now() - startTime;
|
||||
|
||||
console.log(`[ConnectionModeService] ✅ Stage 5C: HTTP endpoint success - HTTP ${response.status} (${duration}ms)`);
|
||||
|
||||
if (response.ok) {
|
||||
return {
|
||||
stage: 'Stage 5C: External HTTP (no TLS)',
|
||||
success: true,
|
||||
message: 'HTTP (unencrypted) connectivity works',
|
||||
duration,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
stage: 'Stage 5C: External HTTP (no TLS)',
|
||||
success: false,
|
||||
message: `Unexpected response: ${response.status}`,
|
||||
duration,
|
||||
};
|
||||
} catch (error) {
|
||||
const duration = Date.now() - startTime;
|
||||
console.error(`[ConnectionModeService] ❌ Stage 5C: HTTP external failed (${duration}ms)`);
|
||||
console.error(`[ConnectionModeService] - Error:`, error);
|
||||
|
||||
const errorMsg = error instanceof Error ? error.message : String(error);
|
||||
return {
|
||||
stage: 'Stage 5C: External HTTP (no TLS)',
|
||||
success: false,
|
||||
message: `Failed: ${errorMsg}`,
|
||||
duration,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private async testStage6_DNSResolution(hostname: string): Promise<DiagnosticResult> {
|
||||
const startTime = Date.now();
|
||||
try {
|
||||
console.log(`[ConnectionModeService] 🔍 Stage 6: Testing DNS resolution for ${hostname}`);
|
||||
|
||||
// Try to resolve DNS by making a HEAD request to the base domain
|
||||
// If DNS fails, we'll get an immediate error
|
||||
const testUrl = `https://${hostname}`;
|
||||
await fetch(testUrl, {
|
||||
method: 'HEAD',
|
||||
connectTimeout: 3000,
|
||||
});
|
||||
const duration = Date.now() - startTime;
|
||||
|
||||
console.log(`[ConnectionModeService] ✅ Stage 6: DNS resolved successfully (${duration}ms)`);
|
||||
|
||||
return {
|
||||
stage: 'Stage 6: DNS resolution',
|
||||
success: true,
|
||||
message: `DNS resolution successful for ${hostname}`,
|
||||
duration,
|
||||
};
|
||||
} catch (error) {
|
||||
const duration = Date.now() - startTime;
|
||||
const errorMsg = error instanceof Error ? error.message : String(error);
|
||||
const errorLower = errorMsg.toLowerCase();
|
||||
|
||||
console.error(`[ConnectionModeService] ❌ Stage 6: DNS test failed (${duration}ms)`);
|
||||
console.error(`[ConnectionModeService] - Error:`, errorMsg);
|
||||
|
||||
// Check if it's a DNS-specific error
|
||||
if (errorLower.includes('dns') || errorLower.includes('enotfound') || errorLower.includes('getaddrinfo')) {
|
||||
return {
|
||||
stage: 'Stage 6: DNS resolution',
|
||||
success: false,
|
||||
message: `DNS lookup failed - cannot resolve ${hostname}`,
|
||||
duration,
|
||||
};
|
||||
}
|
||||
|
||||
// If we got here, DNS might be working but connection failed for other reasons
|
||||
return {
|
||||
stage: 'Stage 6: DNS resolution',
|
||||
success: false,
|
||||
message: `DNS test inconclusive: ${errorMsg}`,
|
||||
duration,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private async testWithHEADMethod(url: string): Promise<DiagnosticResult> {
|
||||
const startTime = Date.now();
|
||||
try {
|
||||
console.log(`[ConnectionModeService] 🔗 Stage 7: Testing with HEAD method`);
|
||||
|
||||
const response = await fetch(url, {
|
||||
method: 'HEAD',
|
||||
connectTimeout: 10000,
|
||||
});
|
||||
const duration = Date.now() - startTime;
|
||||
|
||||
console.log(`[ConnectionModeService] ✅ Stage 7: HEAD method success - HTTP ${response.status} (${duration}ms)`);
|
||||
|
||||
if (response.ok) {
|
||||
return {
|
||||
stage: 'Stage 7: HEAD method',
|
||||
success: true,
|
||||
message: 'HEAD method works (GET does not)',
|
||||
duration,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
stage: 'Stage 7: HEAD method',
|
||||
success: false,
|
||||
message: `HEAD method returned ${response.status}`,
|
||||
duration,
|
||||
};
|
||||
} catch (error) {
|
||||
const duration = Date.now() - startTime;
|
||||
console.error(`[ConnectionModeService] ❌ Stage 7: HEAD method failed (${duration}ms)`);
|
||||
|
||||
const errorMsg = error instanceof Error ? error.message : String(error);
|
||||
return {
|
||||
stage: 'Stage 7: HEAD method',
|
||||
success: false,
|
||||
message: `Failed: ${errorMsg}`,
|
||||
duration,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private async testWithBrowserUserAgent(url: string): Promise<DiagnosticResult> {
|
||||
const startTime = Date.now();
|
||||
try {
|
||||
console.log(`[ConnectionModeService] 🔗 Stage 8: Testing with browser User-Agent`);
|
||||
|
||||
// Try with a standard browser User-Agent instead of Tauri's default
|
||||
const response = await fetch(url, {
|
||||
method: 'GET',
|
||||
connectTimeout: 10000,
|
||||
headers: {
|
||||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36',
|
||||
},
|
||||
});
|
||||
const duration = Date.now() - startTime;
|
||||
|
||||
console.log(`[ConnectionModeService] ✅ Stage 8: Browser User-Agent success - HTTP ${response.status} (${duration}ms)`);
|
||||
|
||||
if (response.ok) {
|
||||
return {
|
||||
stage: 'Stage 8: Browser User-Agent',
|
||||
success: true,
|
||||
message: 'Works with browser User-Agent (blocked with desktop UA)',
|
||||
duration,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
stage: 'Stage 8: Browser User-Agent',
|
||||
success: false,
|
||||
message: `Browser UA returned ${response.status}`,
|
||||
duration,
|
||||
};
|
||||
} catch (error) {
|
||||
const duration = Date.now() - startTime;
|
||||
console.error(`[ConnectionModeService] ❌ Stage 8: Browser User-Agent failed (${duration}ms)`);
|
||||
|
||||
const errorMsg = error instanceof Error ? error.message : String(error);
|
||||
return {
|
||||
stage: 'Stage 8: Browser User-Agent',
|
||||
success: false,
|
||||
message: `Failed: ${errorMsg}`,
|
||||
duration,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async isFirstLaunch(): Promise<boolean> {
|
||||
try {
|
||||
const result = await invoke<boolean>('is_first_launch');
|
||||
|
||||
@@ -87,7 +87,7 @@ class TauriHttpClient {
|
||||
}
|
||||
}
|
||||
|
||||
private createError(message: string, config?: TauriHttpRequestConfig, code?: string, response?: TauriHttpResponse): TauriHttpError {
|
||||
private createError(message: string, config?: TauriHttpRequestConfig, code?: string, response?: TauriHttpResponse, originalError?: unknown): TauriHttpError {
|
||||
const error = new Error(message) as TauriHttpError;
|
||||
error.config = config;
|
||||
error.code = code;
|
||||
@@ -99,6 +99,21 @@ class TauriHttpClient {
|
||||
config: error.config,
|
||||
code: error.code,
|
||||
});
|
||||
|
||||
// Log detailed error information for debugging
|
||||
console.error('[TauriHttpClient] Error details:', {
|
||||
message,
|
||||
code,
|
||||
url: config?.url,
|
||||
method: config?.method,
|
||||
status: response?.status,
|
||||
originalError: originalError instanceof Error ? {
|
||||
name: originalError.name,
|
||||
message: originalError.message,
|
||||
stack: originalError.stack,
|
||||
} : originalError,
|
||||
});
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
@@ -224,10 +239,38 @@ class TauriHttpClient {
|
||||
|
||||
// Check for HTTP errors
|
||||
if (!response.ok) {
|
||||
// Create more descriptive error messages based on status code
|
||||
let errorMessage = `Request failed with status code ${response.status}`;
|
||||
let errorCode = 'ERR_BAD_REQUEST';
|
||||
|
||||
if (response.status === 401) {
|
||||
errorMessage = 'Authentication failed - Invalid credentials';
|
||||
errorCode = 'ERR_UNAUTHORIZED';
|
||||
} else if (response.status === 403) {
|
||||
errorMessage = 'Access denied - Insufficient permissions';
|
||||
errorCode = 'ERR_FORBIDDEN';
|
||||
} else if (response.status === 404) {
|
||||
errorMessage = 'Endpoint not found - Server may not support this operation';
|
||||
errorCode = 'ERR_NOT_FOUND';
|
||||
} else if (response.status === 500) {
|
||||
errorMessage = 'Internal server error - Please check server logs';
|
||||
errorCode = 'ERR_SERVER_ERROR';
|
||||
} else if (response.status === 502 || response.status === 503 || response.status === 504) {
|
||||
errorMessage = 'Server unavailable or timeout - Please try again';
|
||||
errorCode = 'ERR_SERVICE_UNAVAILABLE';
|
||||
}
|
||||
|
||||
console.error(`[TauriHttpClient] HTTP Error ${response.status}:`, {
|
||||
url,
|
||||
method,
|
||||
status: response.status,
|
||||
statusText: response.statusText,
|
||||
});
|
||||
|
||||
const error = this.createError(
|
||||
`Request failed with status code ${response.status}`,
|
||||
errorMessage,
|
||||
finalConfig,
|
||||
'ERR_BAD_REQUEST',
|
||||
errorCode,
|
||||
httpResponse
|
||||
);
|
||||
|
||||
@@ -258,12 +301,66 @@ class TauriHttpClient {
|
||||
throw error;
|
||||
}
|
||||
|
||||
// Create new error for network/other failures
|
||||
const errorMessage = error instanceof Error ? error.message : 'Network Error';
|
||||
// Create detailed error messages for network/other failures
|
||||
let errorMessage = 'Network Error';
|
||||
let errorCode = 'ERR_NETWORK';
|
||||
|
||||
if (error instanceof Error) {
|
||||
const errMsg = error.message.toLowerCase();
|
||||
|
||||
// Connection refused - server not running or wrong port
|
||||
if (errMsg.includes('connection refused') || errMsg.includes('econnrefused')) {
|
||||
errorMessage = `Unable to connect to server at ${url}. Server may not be running or port is incorrect.`;
|
||||
errorCode = 'ERR_CONNECTION_REFUSED';
|
||||
}
|
||||
// Timeout - server too slow or unreachable
|
||||
else if (errMsg.includes('timeout') || errMsg.includes('timed out')) {
|
||||
errorMessage = `Connection timed out to ${url}. Server is not responding or is too slow.`;
|
||||
errorCode = 'ERR_TIMEOUT';
|
||||
}
|
||||
// DNS failure - invalid domain or network issue
|
||||
else if (errMsg.includes('getaddrinfo') || errMsg.includes('dns') || errMsg.includes('not found') || errMsg.includes('enotfound')) {
|
||||
errorMessage = `Cannot resolve server address: ${url}. Please check the URL is correct.`;
|
||||
errorCode = 'ERR_DNS_FAILURE';
|
||||
}
|
||||
// SSL/TLS errors - certificate issues
|
||||
else if (errMsg.includes('ssl') || errMsg.includes('tls') || errMsg.includes('certificate') || errMsg.includes('cert')) {
|
||||
errorMessage = `SSL/TLS certificate error for ${url}. Server may have invalid or self-signed certificate.`;
|
||||
errorCode = 'ERR_SSL_ERROR';
|
||||
}
|
||||
// Protocol errors - wrong protocol (http vs https)
|
||||
else if (errMsg.includes('protocol') || errMsg.includes('https') || errMsg.includes('http')) {
|
||||
errorMessage = `Protocol error connecting to ${url}. Try using https:// instead of http:// or vice versa.`;
|
||||
errorCode = 'ERR_PROTOCOL';
|
||||
}
|
||||
// CORS errors
|
||||
else if (errMsg.includes('cors')) {
|
||||
errorMessage = `CORS error connecting to ${url}. Server may not allow requests from this application.`;
|
||||
errorCode = 'ERR_CORS';
|
||||
}
|
||||
// Generic error with original message
|
||||
else {
|
||||
errorMessage = `Network error: ${error.message}`;
|
||||
errorCode = 'ERR_NETWORK';
|
||||
}
|
||||
|
||||
console.error('[TauriHttpClient] Network error:', {
|
||||
url,
|
||||
method,
|
||||
errorType: errorCode,
|
||||
originalMessage: error.message,
|
||||
stack: error.stack,
|
||||
});
|
||||
} else {
|
||||
console.error('[TauriHttpClient] Unknown error type:', error);
|
||||
}
|
||||
|
||||
const httpError = this.createError(
|
||||
errorMessage,
|
||||
finalConfig,
|
||||
'ERR_NETWORK'
|
||||
errorCode,
|
||||
undefined,
|
||||
error
|
||||
);
|
||||
|
||||
// Run error interceptors
|
||||
|
||||
+165
-2
@@ -1,13 +1,14 @@
|
||||
import { useEffect } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { Stack, Text, Loader, Group, Divider, Paper, Switch, Badge, Anchor } from '@mantine/core';
|
||||
import { Stack, Text, Loader, Group, Divider, Paper, Switch, Badge, Anchor, Select, Collapse } from '@mantine/core';
|
||||
import { alert } from '@app/components/toast';
|
||||
import LocalIcon from '@app/components/shared/LocalIcon';
|
||||
import RestartConfirmationModal from '@app/components/shared/config/RestartConfirmationModal';
|
||||
import { useRestartServer } from '@app/components/shared/config/useRestartServer';
|
||||
import { useAdminSettings } from '@app/hooks/useAdminSettings';
|
||||
import PendingBadge from '@app/components/shared/config/PendingBadge';
|
||||
import { Z_INDEX_CONFIG_MODAL } from '@app/styles/zIndex';
|
||||
import ProviderCard from '@app/components/shared/config/configSections/ProviderCard';
|
||||
import {
|
||||
ALL_PROVIDERS,
|
||||
@@ -46,6 +47,10 @@ interface ConnectionsSettingsData {
|
||||
};
|
||||
ssoAutoLogin?: boolean;
|
||||
enableMobileScanner?: boolean;
|
||||
mobileScannerConvertToPdf?: boolean;
|
||||
mobileScannerImageResolution?: string;
|
||||
mobileScannerPageFormat?: string;
|
||||
mobileScannerStretchToFit?: boolean;
|
||||
}
|
||||
|
||||
export default function AdminConnectionsSection() {
|
||||
@@ -78,7 +83,11 @@ export default function AdminConnectionsSection() {
|
||||
saml2: securityData.saml2 || {},
|
||||
mail: mailData || {},
|
||||
ssoAutoLogin: premiumData.proFeatures?.ssoAutoLogin || false,
|
||||
enableMobileScanner: systemData.enableMobileScanner || false
|
||||
enableMobileScanner: systemData.enableMobileScanner || false,
|
||||
mobileScannerConvertToPdf: systemData.mobileScannerSettings?.convertToPdf !== false,
|
||||
mobileScannerImageResolution: systemData.mobileScannerSettings?.imageResolution || 'full',
|
||||
mobileScannerPageFormat: systemData.mobileScannerSettings?.pageFormat || 'A4',
|
||||
mobileScannerStretchToFit: systemData.mobileScannerSettings?.stretchToFit || false
|
||||
};
|
||||
|
||||
// Merge pending blocks from all four endpoints
|
||||
@@ -98,6 +107,18 @@ export default function AdminConnectionsSection() {
|
||||
if (systemData._pending?.enableMobileScanner !== undefined) {
|
||||
pendingBlock.enableMobileScanner = systemData._pending.enableMobileScanner;
|
||||
}
|
||||
if (systemData._pending?.mobileScannerSettings?.convertToPdf !== undefined) {
|
||||
pendingBlock.mobileScannerConvertToPdf = systemData._pending.mobileScannerSettings.convertToPdf;
|
||||
}
|
||||
if (systemData._pending?.mobileScannerSettings?.imageResolution !== undefined) {
|
||||
pendingBlock.mobileScannerImageResolution = systemData._pending.mobileScannerSettings.imageResolution;
|
||||
}
|
||||
if (systemData._pending?.mobileScannerSettings?.pageFormat !== undefined) {
|
||||
pendingBlock.mobileScannerPageFormat = systemData._pending.mobileScannerSettings.pageFormat;
|
||||
}
|
||||
if (systemData._pending?.mobileScannerSettings?.stretchToFit !== undefined) {
|
||||
pendingBlock.mobileScannerStretchToFit = systemData._pending.mobileScannerSettings.stretchToFit;
|
||||
}
|
||||
|
||||
if (Object.keys(pendingBlock).length > 0) {
|
||||
result._pending = pendingBlock;
|
||||
@@ -356,6 +377,35 @@ export default function AdminConnectionsSection() {
|
||||
|
||||
const response = await apiClient.put('/api/v1/admin/settings', { settings: deltaSettings });
|
||||
|
||||
if (response.status === 200) {
|
||||
alert({
|
||||
alertType: 'success',
|
||||
title: t('admin.settings.success', 'Settings saved successfully')
|
||||
});
|
||||
fetchSettings();
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to save mobile scanner setting:', error);
|
||||
alert({
|
||||
alertType: 'error',
|
||||
title: t('admin.settings.error', 'Failed to save settings')
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const handleMobileScannerSettingsSave = async (settingKey: string, newValue: string | boolean) => {
|
||||
// Block save if login is disabled or mobile scanner is not enabled
|
||||
if (!validateLoginEnabled() || !settings?.enableMobileScanner) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const deltaSettings = {
|
||||
[`system.mobileScannerSettings.${settingKey}`]: newValue
|
||||
};
|
||||
|
||||
const response = await apiClient.put('/api/v1/admin/settings', { settings: deltaSettings });
|
||||
|
||||
if (response.status === 200) {
|
||||
alert({
|
||||
alertType: 'success',
|
||||
@@ -471,6 +521,119 @@ export default function AdminConnectionsSection() {
|
||||
<PendingBadge show={isFieldPending('enableMobileScanner')} />
|
||||
</Group>
|
||||
</div>
|
||||
|
||||
{/* Mobile Scanner Settings - Only show when enabled */}
|
||||
<Collapse in={settings?.enableMobileScanner || false}>
|
||||
<Stack gap="md" mt="md" ml="lg" style={{ borderLeft: '2px solid var(--mantine-color-gray-3)', paddingLeft: '1rem' }}>
|
||||
{/* Convert to PDF */}
|
||||
<div>
|
||||
<Text size="sm" fw={500} mb="xs">
|
||||
{t('admin.settings.connections.mobileScannerConvertToPdf', 'Convert Images to PDF')}
|
||||
</Text>
|
||||
<Text size="xs" c="dimmed" mb="sm">
|
||||
{t('admin.settings.connections.mobileScannerConvertToPdfDesc', 'Automatically convert uploaded images to PDF format. If disabled, images will be kept as-is.')}
|
||||
</Text>
|
||||
<Group gap="xs">
|
||||
<Switch
|
||||
checked={settings?.mobileScannerConvertToPdf !== false}
|
||||
onChange={(e) => {
|
||||
if (!loginEnabled) return;
|
||||
const newValue = e.target.checked;
|
||||
setSettings({ ...settings, mobileScannerConvertToPdf: newValue });
|
||||
handleMobileScannerSettingsSave('convertToPdf', newValue);
|
||||
}}
|
||||
disabled={!loginEnabled}
|
||||
/>
|
||||
<PendingBadge show={isFieldPending('mobileScannerConvertToPdf')} />
|
||||
</Group>
|
||||
</div>
|
||||
|
||||
{/* PDF Conversion Settings - Only show when convertToPdf is enabled */}
|
||||
{settings?.mobileScannerConvertToPdf !== false && (
|
||||
<>
|
||||
{/* Image Resolution */}
|
||||
<div>
|
||||
<Text size="sm" fw={500} mb="xs">
|
||||
{t('admin.settings.connections.mobileScannerImageResolution', 'Image Resolution')}
|
||||
</Text>
|
||||
<Text size="xs" c="dimmed" mb="sm">
|
||||
{t('admin.settings.connections.mobileScannerImageResolutionDesc', 'Resolution of uploaded images. "Reduced" scales images to max 1200px to reduce file size.')}
|
||||
</Text>
|
||||
<Group gap="xs">
|
||||
<Select
|
||||
value={settings?.mobileScannerImageResolution || 'full'}
|
||||
onChange={(value) => {
|
||||
if (!loginEnabled) return;
|
||||
setSettings({ ...settings, mobileScannerImageResolution: value || 'full' });
|
||||
handleMobileScannerSettingsSave('imageResolution', value || 'full');
|
||||
}}
|
||||
data={[
|
||||
{ value: 'full', label: t('admin.settings.connections.imageResolutionFull', 'Full (Original Size)') },
|
||||
{ value: 'reduced', label: t('admin.settings.connections.imageResolutionReduced', 'Reduced (Max 1200px)') }
|
||||
]}
|
||||
disabled={!loginEnabled}
|
||||
style={{ width: '250px' }}
|
||||
comboboxProps={{ zIndex: Z_INDEX_CONFIG_MODAL }}
|
||||
/>
|
||||
<PendingBadge show={isFieldPending('mobileScannerImageResolution')} />
|
||||
</Group>
|
||||
</div>
|
||||
|
||||
{/* Page Format */}
|
||||
<div>
|
||||
<Text size="sm" fw={500} mb="xs">
|
||||
{t('admin.settings.connections.mobileScannerPageFormat', 'Page Format')}
|
||||
</Text>
|
||||
<Text size="xs" c="dimmed" mb="sm">
|
||||
{t('admin.settings.connections.mobileScannerPageFormatDesc', 'PDF page size for converted images. "Keep" uses original image dimensions.')}
|
||||
</Text>
|
||||
<Group gap="xs">
|
||||
<Select
|
||||
value={settings?.mobileScannerPageFormat || 'A4'}
|
||||
onChange={(value) => {
|
||||
if (!loginEnabled) return;
|
||||
setSettings({ ...settings, mobileScannerPageFormat: value || 'A4' });
|
||||
handleMobileScannerSettingsSave('pageFormat', value || 'A4');
|
||||
}}
|
||||
data={[
|
||||
{ value: 'keep', label: t('admin.settings.connections.pageFormatKeep', 'Keep (Original Dimensions)') },
|
||||
{ value: 'A4', label: t('admin.settings.connections.pageFormatA4', 'A4 (210×297mm)') },
|
||||
{ value: 'letter', label: t('admin.settings.connections.pageFormatLetter', 'Letter (8.5×11in)') }
|
||||
]}
|
||||
disabled={!loginEnabled}
|
||||
style={{ width: '250px' }}
|
||||
comboboxProps={{ zIndex: Z_INDEX_CONFIG_MODAL }}
|
||||
/>
|
||||
<PendingBadge show={isFieldPending('mobileScannerPageFormat')} />
|
||||
</Group>
|
||||
</div>
|
||||
|
||||
{/* Stretch to Fit */}
|
||||
<div>
|
||||
<Text size="sm" fw={500} mb="xs">
|
||||
{t('admin.settings.connections.mobileScannerStretchToFit', 'Stretch to Fit')}
|
||||
</Text>
|
||||
<Text size="xs" c="dimmed" mb="sm">
|
||||
{t('admin.settings.connections.mobileScannerStretchToFitDesc', 'Stretch images to fill the entire page. If disabled, images are centered with preserved aspect ratio.')}
|
||||
</Text>
|
||||
<Group gap="xs">
|
||||
<Switch
|
||||
checked={settings?.mobileScannerStretchToFit || false}
|
||||
onChange={(e) => {
|
||||
if (!loginEnabled) return;
|
||||
const newValue = e.target.checked;
|
||||
setSettings({ ...settings, mobileScannerStretchToFit: newValue });
|
||||
handleMobileScannerSettingsSave('stretchToFit', newValue);
|
||||
}}
|
||||
disabled={!loginEnabled}
|
||||
/>
|
||||
<PendingBadge show={isFieldPending('mobileScannerStretchToFit')} />
|
||||
</Group>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</Stack>
|
||||
</Collapse>
|
||||
</Stack>
|
||||
</Paper>
|
||||
|
||||
|
||||
+33
-19
@@ -31,11 +31,13 @@ import { useNavigate } from 'react-router-dom';
|
||||
import UpdateSeatsButton from '@app/components/shared/UpdateSeatsButton';
|
||||
import { useLicense } from '@app/contexts/LicenseContext';
|
||||
import ChangeUserPasswordModal from '@app/components/shared/ChangeUserPasswordModal';
|
||||
import { useAuth } from '@app/auth/UseSession';
|
||||
|
||||
export default function PeopleSection() {
|
||||
const { t } = useTranslation();
|
||||
const { config } = useAppConfig();
|
||||
const { loginEnabled } = useLoginRequired();
|
||||
const { user: currentUser } = useAuth();
|
||||
const navigate = useNavigate();
|
||||
const { licenseInfo: globalLicenseInfo } = useLicense();
|
||||
const [users, setUsers] = useState<User[]>([]);
|
||||
@@ -77,6 +79,7 @@ export default function PeopleSection() {
|
||||
? t('workspace.people.license.noSlotsAvailable', 'No user slots available')
|
||||
: null;
|
||||
|
||||
const isCurrentUser = (user: User) => currentUser?.username === user.username;
|
||||
|
||||
// Form state for edit user modal
|
||||
const [editForm, setEditForm] = useState({
|
||||
@@ -463,7 +466,10 @@ export default function PeopleSection() {
|
||||
</Table.Tr>
|
||||
) : (
|
||||
filteredUsers.map((user) => (
|
||||
<Table.Tr key={user.id}>
|
||||
<Table.Tr
|
||||
key={user.id}
|
||||
style={isCurrentUser(user) ? { backgroundColor: 'rgba(34, 139, 230, 0.08)' } : undefined}
|
||||
>
|
||||
<Table.Td>
|
||||
<Group gap="xs" wrap="nowrap">
|
||||
<Tooltip
|
||||
@@ -577,13 +583,15 @@ export default function PeopleSection() {
|
||||
</ActionIcon>
|
||||
</Menu.Target>
|
||||
<Menu.Dropdown style={{ zIndex: Z_INDEX_OVER_CONFIG_MODAL }}>
|
||||
<Menu.Item
|
||||
leftSection={<LocalIcon icon="edit" width="1rem" height="1rem" />}
|
||||
onClick={() => openEditModal(user)}
|
||||
disabled={!loginEnabled}
|
||||
>
|
||||
{t('workspace.people.editRole')}
|
||||
</Menu.Item>
|
||||
{!isCurrentUser(user) && (
|
||||
<Menu.Item
|
||||
leftSection={<LocalIcon icon="edit" width="1rem" height="1rem" />}
|
||||
onClick={() => openEditModal(user)}
|
||||
disabled={!loginEnabled}
|
||||
>
|
||||
{t('workspace.people.editRole')}
|
||||
</Menu.Item>
|
||||
)}
|
||||
<Menu.Item
|
||||
leftSection={<LocalIcon icon="lock" width="1rem" height="1rem" />}
|
||||
onClick={() => openChangePasswordModal(user)}
|
||||
@@ -591,17 +599,23 @@ export default function PeopleSection() {
|
||||
>
|
||||
{t('workspace.people.changePassword.action', 'Change password')}
|
||||
</Menu.Item>
|
||||
<Menu.Item
|
||||
leftSection={user.enabled ? <LocalIcon icon="person-off" width="1rem" height="1rem" /> : <LocalIcon icon="person-check" width="1rem" height="1rem" />}
|
||||
onClick={() => handleToggleEnabled(user)}
|
||||
disabled={!loginEnabled}
|
||||
>
|
||||
{user.enabled ? t('workspace.people.disable') : t('workspace.people.enable')}
|
||||
</Menu.Item>
|
||||
<Menu.Divider />
|
||||
<Menu.Item color="red" leftSection={<LocalIcon icon="delete" width="1rem" height="1rem" />} onClick={() => handleDeleteUser(user)} disabled={!loginEnabled}>
|
||||
{t('workspace.people.deleteUser')}
|
||||
</Menu.Item>
|
||||
{!isCurrentUser(user) && (
|
||||
<Menu.Item
|
||||
leftSection={user.enabled ? <LocalIcon icon="person-off" width="1rem" height="1rem" /> : <LocalIcon icon="person-check" width="1rem" height="1rem" />}
|
||||
onClick={() => handleToggleEnabled(user)}
|
||||
disabled={!loginEnabled}
|
||||
>
|
||||
{user.enabled ? t('workspace.people.disable') : t('workspace.people.enable')}
|
||||
</Menu.Item>
|
||||
)}
|
||||
{!isCurrentUser(user) && (
|
||||
<>
|
||||
<Menu.Divider />
|
||||
<Menu.Item color="red" leftSection={<LocalIcon icon="delete" width="1rem" height="1rem" />} onClick={() => handleDeleteUser(user)} disabled={!loginEnabled}>
|
||||
{t('workspace.people.deleteUser')}
|
||||
</Menu.Item>
|
||||
</>
|
||||
)}
|
||||
</Menu.Dropdown>
|
||||
</Menu>
|
||||
</Group>
|
||||
|
||||
@@ -36,6 +36,7 @@ export default function Login() {
|
||||
const [enabledProviders, setEnabledProviders] = useState<OAuthProvider[]>([]);
|
||||
const [hasSSOProviders, setHasSSOProviders] = useState(false);
|
||||
const [_enableLogin, setEnableLogin] = useState<boolean | null>(null);
|
||||
const [loginMethod, setLoginMethod] = useState<string>('all');
|
||||
const backendProbe = useBackendProbe();
|
||||
const [isFirstTimeSetup, setIsFirstTimeSetup] = useState(false);
|
||||
const [showDefaultCredentials, setShowDefaultCredentials] = useState(false);
|
||||
@@ -115,6 +116,7 @@ export default function Login() {
|
||||
const providerPaths = Object.keys(data.providerList || {});
|
||||
|
||||
setEnabledProviders(providerPaths);
|
||||
setLoginMethod(data.loginMethod || 'all');
|
||||
} catch (err) {
|
||||
console.error('[Login] Failed to fetch enabled providers:', err);
|
||||
}
|
||||
@@ -125,18 +127,25 @@ export default function Login() {
|
||||
}
|
||||
}, [navigate, backendProbe.status, backendProbe.loginDisabled]);
|
||||
|
||||
// Update hasSSOProviders and showEmailForm when enabledProviders changes
|
||||
// Update hasSSOProviders and showEmailForm when enabledProviders or loginMethod changes
|
||||
useEffect(() => {
|
||||
// In debug mode, check if any providers exist in the config
|
||||
const hasProviders = DEBUG_SHOW_ALL_PROVIDERS
|
||||
? Object.keys(oauthProviderConfig).length > 0
|
||||
: enabledProviders.length > 0;
|
||||
setHasSSOProviders(hasProviders);
|
||||
// If no SSO providers, show email form by default
|
||||
if (!hasProviders) {
|
||||
|
||||
// Check if username/password authentication is allowed
|
||||
const isUserPassAllowed = loginMethod === 'all' || loginMethod === 'normal';
|
||||
|
||||
// Show email form if no SSO providers exist AND username/password is allowed
|
||||
if (!hasProviders && isUserPassAllowed) {
|
||||
setShowEmailForm(true);
|
||||
} else if (!isUserPassAllowed) {
|
||||
// Hide email form if username/password auth is not allowed
|
||||
setShowEmailForm(false);
|
||||
}
|
||||
}, [enabledProviders]);
|
||||
}, [enabledProviders, loginMethod]);
|
||||
|
||||
// Handle query params (email prefill, success messages, and session expiry)
|
||||
useEffect(() => {
|
||||
@@ -326,13 +335,13 @@ export default function Login() {
|
||||
enabledProviders={enabledProviders}
|
||||
/>
|
||||
|
||||
{/* Divider between OAuth and Email - only show if SSO is available */}
|
||||
{hasSSOProviders && (
|
||||
{/* Divider between OAuth and Email - only show if SSO is available and username/password is allowed */}
|
||||
{hasSSOProviders && (loginMethod === 'all' || loginMethod === 'normal') && (
|
||||
<DividerWithText text={t('signup.or', 'or')} respondsToDarkMode={false} opacity={0.4} />
|
||||
)}
|
||||
|
||||
{/* Sign in with email button - only show if SSO providers exist */}
|
||||
{hasSSOProviders && !showEmailForm && (
|
||||
{/* Sign in with email button - only show if SSO providers exist and username/password is allowed */}
|
||||
{hasSSOProviders && !showEmailForm && (loginMethod === 'all' || loginMethod === 'normal') && (
|
||||
<div className="auth-section">
|
||||
<button
|
||||
type="button"
|
||||
@@ -345,8 +354,8 @@ export default function Login() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Email form - show by default if no SSO, or when button clicked */}
|
||||
{showEmailForm && (
|
||||
{/* Email form - show by default if no SSO, or when button clicked, but ONLY if username/password is allowed */}
|
||||
{showEmailForm && (loginMethod === 'all' || loginMethod === 'normal') && (
|
||||
<div style={{ marginTop: hasSSOProviders ? '1rem' : '0' }}>
|
||||
<EmailPasswordForm
|
||||
email={email}
|
||||
@@ -360,8 +369,8 @@ export default function Login() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Help section - only show on first-time setup with default credentials */}
|
||||
{isFirstTimeSetup && showDefaultCredentials && (
|
||||
{/* Help section - only show on first-time setup with default credentials and username/password auth allowed */}
|
||||
{isFirstTimeSetup && showDefaultCredentials && (loginMethod === 'all' || loginMethod === 'normal') && (
|
||||
<Alert
|
||||
color="blue"
|
||||
variant="light"
|
||||
|
||||
@@ -213,6 +213,23 @@
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* Fix Mantine Button internal spans to not crop content */
|
||||
.oauth-button-vertical .mantine-Button-inner {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.oauth-button-vertical .mantine-Button-label {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
gap: 0.75rem;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.oauth-icon-small {
|
||||
width: 1.75rem; /* 28px */
|
||||
height: 1.75rem; /* 28px */
|
||||
|
||||
@@ -48,7 +48,7 @@ const FREE_LICENSE_INFO: LicenseInfo = {
|
||||
|
||||
const BASE_NO_LOGIN_CONFIG: AppConfig = {
|
||||
enableAnalytics: true,
|
||||
appVersion: '2.2.0',
|
||||
appVersion: '2.2.1',
|
||||
serverCertificateEnabled: false,
|
||||
enableAlphaFunctionality: false,
|
||||
enableDesktopInstallSlide: true,
|
||||
|
||||
@@ -426,6 +426,42 @@ ignore = [
|
||||
'lang.tir',
|
||||
'lang.uig',
|
||||
'language.direction',
|
||||
'admin.settings.advanced.processExecutor.calibre',
|
||||
'admin.settings.advanced.processExecutor.ghostscript',
|
||||
'admin.settings.advanced.processExecutor.libreOffice',
|
||||
'admin.settings.advanced.processExecutor.ocrMyPdf',
|
||||
'admin.settings.advanced.processExecutor.pythonOpenCv',
|
||||
'admin.settings.advanced.processExecutor.qpdf',
|
||||
'admin.settings.advanced.processExecutor.weasyPrint',
|
||||
'admin.settings.connections.oauth2.label',
|
||||
'admin.settings.connections.saml2.label',
|
||||
'admin.settings.database.port.label',
|
||||
'admin.settings.legal.impressum.label',
|
||||
'convert.dpi',
|
||||
'convert.markdown',
|
||||
'convert.pptExt',
|
||||
'endpointStatistics.dataTypeApi',
|
||||
'endpointStatistics.dataTypeUi',
|
||||
'fileManager.googleDrive',
|
||||
'getPdfInfo.other.javaScript',
|
||||
'getPdfInfo.other.xmp',
|
||||
'getPdfInfo.summary.tech.javaScript',
|
||||
'home.devApi.title',
|
||||
'legal.impressum',
|
||||
'plan.pro.name',
|
||||
'pro',
|
||||
'removeBlanks.whitePercent.unit',
|
||||
'settings.connection.mode.saas',
|
||||
'setup.mode.saas.title',
|
||||
'setup.server.type.saas',
|
||||
'showJS.tags',
|
||||
'usage.controls.dataType.api',
|
||||
'usage.controls.dataType.ui',
|
||||
'validateSignature.downloadType.csv',
|
||||
'validateSignature.downloadType.json',
|
||||
'validateSignature.downloadType.pdf',
|
||||
'footer.discord',
|
||||
'footer.issues',
|
||||
]
|
||||
|
||||
[hi_IN]
|
||||
|
||||
+15
-23
@@ -68,36 +68,28 @@ fi
|
||||
|
||||
# # === tessdata ===
|
||||
# # Prepare Tesseract OCR data directory.
|
||||
REAL_TESSDATA="/usr/share/tesseract-ocr/5/tessdata"
|
||||
SEC_TESSDATA="/usr/share/tessdata"
|
||||
# In Debian, tesseract looks in /usr/share/tesseract-ocr/5/tessdata
|
||||
# For backwards compatibility, copy any user-mounted files from /usr/share/tessdata
|
||||
TESSDATA_SYSTEM="/usr/share/tesseract-ocr/5/tessdata"
|
||||
TESSDATA_MOUNT="/usr/share/tessdata"
|
||||
|
||||
log_warn() {
|
||||
echo "[init][warn] $*" >&2
|
||||
}
|
||||
|
||||
if [ -d "$REAL_TESSDATA" ] && [ -w "$REAL_TESSDATA" ]; then
|
||||
log_warn "Skipping tessdata adjustments; directory writable: $REAL_TESSDATA"
|
||||
else
|
||||
log_warn "Skipping tessdata adjustments; directory missing or not writable: $REAL_TESSDATA"
|
||||
# Ensure system tessdata directory exists
|
||||
mkdir -p "$TESSDATA_SYSTEM" 2>/dev/null || true
|
||||
|
||||
# For backwards compatibility: if user mounted custom languages to /usr/share/tessdata,
|
||||
# copy them to the system location where Tesseract actually looks
|
||||
if [ -d "$TESSDATA_MOUNT" ] && [ "$(ls -A "$TESSDATA_MOUNT" 2>/dev/null)" ]; then
|
||||
log_warn "Found user-mounted tessdata in $TESSDATA_MOUNT, copying to system location $TESSDATA_SYSTEM"
|
||||
cp -rn "$TESSDATA_MOUNT"/* "$TESSDATA_SYSTEM"/ 2>/dev/null || true
|
||||
fi
|
||||
|
||||
if [ -d /usr/share/tesseract-ocr/5/tessdata ]; then
|
||||
REAL_TESSDATA="/usr/share/tesseract-ocr/5/tessdata"
|
||||
log_warn "Using /usr/share/tesseract-ocr/5/tessdata as TESSDATA_PREFIX"
|
||||
elif [ -d /usr/share/tessdata ]; then
|
||||
REAL_TESSDATA="/usr/share/tessdata"
|
||||
log_warn "Using /usr/share/tessdata as TESSDATA_PREFIX"
|
||||
elif [ -d /tessdata ]; then
|
||||
REAL_TESSDATA="/tessdata"
|
||||
log_warn "Using /tessdata as TESSDATA_PREFIX"
|
||||
else
|
||||
REAL_TESSDATA=""
|
||||
log_warn "No tessdata directory found"
|
||||
fi
|
||||
|
||||
if [ -n "$REAL_TESSDATA" ]; then
|
||||
export TESSDATA_PREFIX="$REAL_TESSDATA"
|
||||
fi
|
||||
# Set TESSDATA_PREFIX to system location
|
||||
export TESSDATA_PREFIX="$TESSDATA_SYSTEM"
|
||||
log_warn "Using TESSDATA_PREFIX=$TESSDATA_PREFIX"
|
||||
|
||||
# === Temp dir ===
|
||||
# Ensure the temporary directory exists and has proper permissions.
|
||||
|
||||
Reference in New Issue
Block a user