Compare commits
265 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1f5ed2fbb0 | |||
| de4808f96d | |||
| 59076b0a35 | |||
| 484eadaf33 | |||
| 2572018e3f | |||
| ab9a24b89b | |||
| 33e924574a | |||
| 76f99ce999 | |||
| 241319ae1d | |||
| 40ea6e0b4e | |||
| 3fa0fc09bb | |||
| fef76bd504 | |||
| f8f2eefe03 | |||
| c665818395 | |||
| 2ba68760b9 | |||
| 5070476816 | |||
| 51cd283a5f | |||
| d44f0ee7a7 | |||
| b1b0565d12 | |||
| db526a1c97 | |||
| a3b553ddb4 | |||
| fecfd5533a | |||
| ed981027dd | |||
| 5092ea5e89 | |||
| ac2edc2159 | |||
| 59dd5f105a | |||
| 4db626354c | |||
| 383e636a8e | |||
| 1051db406a | |||
| ee3fb1dba6 | |||
| c34b2ea824 | |||
| 8a33595bbe | |||
| ff05a59e60 | |||
| bea474c550 | |||
| e5476aac94 | |||
| 7f025e5240 | |||
| 5700bd2213 | |||
| d402c3865a | |||
| 90ef77c872 | |||
| 51856e9e0a | |||
| 9741b97e8c | |||
| e421b9a2c0 | |||
| 371a2f7361 | |||
| 52c093ac9d | |||
| 6d6508f18e | |||
| 3fa814d1f0 | |||
| 1fe3dab64c | |||
| 5dadd205f5 | |||
| 3e15acea9a | |||
| 3e78173df9 | |||
| 64fac08bfb | |||
| fdc382dff0 | |||
| b2aea04567 | |||
| 3449dd5a8f | |||
| 57f69c6615 | |||
| cfb3ec0e21 | |||
| b8bf4ad360 | |||
| 87cc58527d | |||
| e0d2e2c53f | |||
| 9a7092ca44 | |||
| 606fa08dae | |||
| 62f1e40682 | |||
| c8e5614063 | |||
| 03c255ae20 | |||
| a706748dd3 | |||
| 7c1046d239 | |||
| a90f36b07e | |||
| e5249cff0b | |||
| d57df4debe | |||
| 1f649c7f1f | |||
| 0ca4cc914c | |||
| 9dcad78f44 | |||
| 4341d7f500 | |||
| 77149dc432 | |||
| 525abc4be5 | |||
| 14cee64c82 | |||
| 3fd283121f | |||
| ae8024565f | |||
| 2302c2db1c | |||
| 44c50c1275 | |||
| 415bf2abc3 | |||
| 36207a93f3 | |||
| 854754e10b | |||
| 1c2f137a8a | |||
| 8c67d44aef | |||
| cfd48b3b2e | |||
| 558e14bb4c | |||
| aef5dd6157 | |||
| 74ee7edc43 | |||
| 7e1c17a635 | |||
| 3c1f3874f4 | |||
| 51ddf6a715 | |||
| 62082b7086 | |||
| aee14ed426 | |||
| 9b2840db94 | |||
| 60064fce52 | |||
| 0058583583 | |||
| fb676626f1 | |||
| f445c704a1 | |||
| fd785ab5de | |||
| a1a82208ed | |||
| dc49de5341 | |||
| 4c2454d410 | |||
| fe6dd0ff9e | |||
| ab8d089b2b | |||
| ee02ea7746 | |||
| 9501cfa5f5 | |||
| e8069af804 | |||
| 0975a687a0 | |||
| 654a7299c3 | |||
| 58eab11faf | |||
| fb62d03f73 | |||
| 7e5e34420b | |||
| f12d35609a | |||
| 44273b9889 | |||
| 2f7e32b5e0 | |||
| 30bcf5dcc2 | |||
| 68579934c9 | |||
| 04459afbb6 | |||
| 3b2bd3065d | |||
| f930505de4 | |||
| 34319bd977 | |||
| 34737186fe | |||
| 4bd1f15bb9 | |||
| aabc4d3a24 | |||
| fc9b189e83 | |||
| b7ff3a6bdb | |||
| 04a0aea0ab | |||
| e564e2aa91 | |||
| 118f6b4334 | |||
| fd0a52aa86 | |||
| 52e3bdab26 | |||
| dd09e3c3f4 | |||
| 2797954799 | |||
| 025210be28 | |||
| 221f50f53b | |||
| 6bf1bd8d44 | |||
| 41fe9053a0 | |||
| 27bb5d9a27 | |||
| 3168e17603 | |||
| dd514e7a88 | |||
| 6e142b4230 | |||
| fd1c7c8dbb | |||
| 59c63f31cc | |||
| 3cbb55aa7b | |||
| 60765694f5 | |||
| fd75401aee | |||
| ca34972266 | |||
| 179184326b | |||
| d8efd3cd20 | |||
| 5d39ddcf22 | |||
| 2050a3bea2 | |||
| c078f57a09 | |||
| dc5721ac13 | |||
| 1d9741b52b | |||
| 7a37355e17 | |||
| 5cbd593e76 | |||
| f7600b5fff | |||
| fb85e5dd76 | |||
| 6f3f66794a | |||
| 79d6e19c4b | |||
| aebd4f6185 | |||
| 341a5320c3 | |||
| cc03ccf5e0 | |||
| 009299ebec | |||
| 204e5aacad | |||
| 8a45c35160 | |||
| ebf821afd1 | |||
| 984110a978 | |||
| 2b898f0786 | |||
| b2269333e3 | |||
| 41afcae399 | |||
| 9291e4d2ca | |||
| 3715f3c9a6 | |||
| 253ae66210 | |||
| 949e2d6c45 | |||
| 64a6240f79 | |||
| 77680f6ed8 | |||
| 8c3a6a253d | |||
| 57fd28126c | |||
| a34fade500 | |||
| 713c54ef83 | |||
| a9b2a9af84 | |||
| c23b3d4bc8 | |||
| 0dd97d9115 | |||
| 3912800db3 | |||
| c23d7c51f6 | |||
| 5906cf4335 | |||
| d4a54157f0 | |||
| 3d301c654e | |||
| 12e80ffe00 | |||
| a2fe55512f | |||
| d00519e3e3 | |||
| 6995127778 | |||
| c565a08d09 | |||
| cf4d7d4e6c | |||
| 72c2ce82c1 | |||
| 4654591d82 | |||
| feb1e93fcb | |||
| ff134a8ca4 | |||
| f8255e1db5 | |||
| b9bcb2b6af | |||
| 51819c601f | |||
| f7280c8830 | |||
| 0cb99bdaf1 | |||
| de04935b2f | |||
| b4c95b25df | |||
| de452d4373 | |||
| e271382982 | |||
| 3a350add23 | |||
| 3518a23fa0 | |||
| c6a1b86404 | |||
| 091a78f1d2 | |||
| 16f68c2397 | |||
| 16d87bf236 | |||
| e502a706d1 | |||
| 17e8014b69 | |||
| de732d0ab0 | |||
| e2e97db519 | |||
| 9ea9e05944 | |||
| d0482502e9 | |||
| 0c040bcc9a | |||
| 0d5e7e2892 | |||
| 01c913e83e | |||
| 532622d8b2 | |||
| 448846b834 | |||
| 3c52f30ea4 | |||
| f690777a91 | |||
| f946a7cf1f | |||
| b914775898 | |||
| 66b9eaa0e5 | |||
| e2fa6d3a1b | |||
| 6c823ae31a | |||
| f4c9e13250 | |||
| 121f68b449 | |||
| ec067a5997 | |||
| 5d170a5444 | |||
| 4dd7f5ddd8 | |||
| 998f86371c | |||
| 84f8bd5e1e | |||
| af943db6f8 | |||
| bc7eecf420 | |||
| 5081f30daf | |||
| 584eb61f16 | |||
| 7b053ba6f6 | |||
| 7701392500 | |||
| e4e19e001b | |||
| 78061c3455 | |||
| 6b079cfdd1 | |||
| 5f68990297 | |||
| 94678051df | |||
| 59644c5d22 | |||
| edde2dedf1 | |||
| 05aaad3aec | |||
| 279698700a | |||
| 2c00c0292c | |||
| 901dd560be | |||
| b867127329 | |||
| 132c58f80d | |||
| f8925b9687 | |||
| 1e60a9888d | |||
| 788989aa60 | |||
| 096b152731 | |||
| ad03b8e035 | |||
| d13e6bcb78 |
@@ -7,5 +7,5 @@ ignore = [
|
||||
# wry needs kuchiki on Android
|
||||
"RUSTSEC-2023-0019",
|
||||
# atty is only used when the `colored` feature is enabled on tauri-plugin-log
|
||||
"RUSTSEC-2021-0145"
|
||||
]
|
||||
"RUSTSEC-2021-0145",
|
||||
]
|
||||
|
||||
@@ -62,13 +62,17 @@
|
||||
"dialog",
|
||||
"fs",
|
||||
"global-shortcut",
|
||||
"opener",
|
||||
"http",
|
||||
"nfc",
|
||||
"notification",
|
||||
"os",
|
||||
"process",
|
||||
"shell",
|
||||
"updater"
|
||||
"store",
|
||||
"updater",
|
||||
"geolocation",
|
||||
"haptics"
|
||||
]
|
||||
},
|
||||
"api-example-js": {
|
||||
@@ -84,12 +88,14 @@
|
||||
"dialog-js",
|
||||
"fs-js",
|
||||
"global-shortcut-js",
|
||||
"opener-js",
|
||||
"http-js",
|
||||
"nfc-js",
|
||||
"notification-js",
|
||||
"os-js",
|
||||
"process-js",
|
||||
"shell-js",
|
||||
"store-js",
|
||||
"updater-js"
|
||||
],
|
||||
"postversion": "pnpm install --no-frozen-lockfile"
|
||||
@@ -101,14 +107,6 @@
|
||||
"dependencies": ["deep-link-js"],
|
||||
"postversion": "pnpm install --no-frozen-lockfile"
|
||||
},
|
||||
"authenticator": {
|
||||
"path": "./plugins/authenticator",
|
||||
"manager": "rust"
|
||||
},
|
||||
"authenticator-js": {
|
||||
"path": "./plugins/authenticator",
|
||||
"manager": "javascript"
|
||||
},
|
||||
"autostart": {
|
||||
"path": "./plugins/autostart",
|
||||
"manager": "rust"
|
||||
@@ -190,6 +188,14 @@
|
||||
"path": "./plugins/global-shortcut",
|
||||
"manager": "javascript"
|
||||
},
|
||||
"opener": {
|
||||
"path": "./plugins/opener",
|
||||
"manager": "rust"
|
||||
},
|
||||
"opener-js": {
|
||||
"path": "./plugins/opener",
|
||||
"manager": "javascript"
|
||||
},
|
||||
"haptics": {
|
||||
"path": "./plugins/haptics",
|
||||
"manager": "rust"
|
||||
@@ -274,7 +280,8 @@
|
||||
},
|
||||
"single-instance": {
|
||||
"path": "./plugins/single-instance",
|
||||
"manager": "rust"
|
||||
"manager": "rust",
|
||||
"dependencies": ["deep-link"]
|
||||
},
|
||||
"sql": {
|
||||
"path": "./plugins/sql",
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
"geolocation": major
|
||||
"geolocation-js": major
|
||||
---
|
||||
|
||||
Initial release.
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
"haptics": major
|
||||
"haptics-js": major
|
||||
---
|
||||
|
||||
Initial release.
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"tag": "rc",
|
||||
"changes": [
|
||||
".changes/geolocation-release.md",
|
||||
".changes/haptics-release.md",
|
||||
".changes/rc.md",
|
||||
".changes/shell-open-regex-match-string.md",
|
||||
".changes/shell-regex-match-string.md"
|
||||
]
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
---
|
||||
"authenticator": patch
|
||||
"autostart": patch
|
||||
"barcode-scanner": patch
|
||||
"biometric": patch
|
||||
"cli": patch
|
||||
"clipboard-manager": patch
|
||||
"deep-link": patch
|
||||
"dialog": patch
|
||||
"fs": patch
|
||||
"global-shortcut": patch
|
||||
"http": patch
|
||||
"localhost": patch
|
||||
"log-plugin": patch
|
||||
"nfc": patch
|
||||
"notification": patch
|
||||
"os": patch
|
||||
"persisted-scope": patch
|
||||
"positioner": patch
|
||||
"process": patch
|
||||
"shell": patch
|
||||
"single-instance": patch
|
||||
"sql": patch
|
||||
"store": patch
|
||||
"stronghold": patch
|
||||
"updater": patch
|
||||
"upload": patch
|
||||
"websocket": patch
|
||||
"window-state": patch
|
||||
"authenticator-js": patch
|
||||
"autostart-js": patch
|
||||
"barcode-scanner-js": patch
|
||||
"biometric-js": patch
|
||||
"cli-js": patch
|
||||
"clipboard-manager-js": patch
|
||||
"deep-link-js": patch
|
||||
"dialog-js": patch
|
||||
"fs-js": patch
|
||||
"global-shortcut-js": patch
|
||||
"http-js": patch
|
||||
"log-js": patch
|
||||
"nfc-js": patch
|
||||
"notification-js": patch
|
||||
"os-js": patch
|
||||
"positioner-js": patch
|
||||
"process-js": patch
|
||||
"shell-js": patch
|
||||
"sql-js": patch
|
||||
"store-js": patch
|
||||
"stronghold-js": patch
|
||||
"updater-js": patch
|
||||
"upload-js": patch
|
||||
"websocket-js": patch
|
||||
"window-state-js": patch
|
||||
"haptics": patch
|
||||
"haptics-js": patch
|
||||
"geolocation": patch
|
||||
"geolocation-js": patch
|
||||
---
|
||||
|
||||
Update to tauri RC.
|
||||
@@ -11,7 +11,7 @@ Use the following format:
|
||||
```md
|
||||
---
|
||||
"package-a": patch
|
||||
"package-b": minor
|
||||
"package-b": minor:feat
|
||||
---
|
||||
|
||||
Change summary goes here
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"shell": patch
|
||||
---
|
||||
|
||||
Change the `open` scope validator regex to match on the entire string.
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
"shell": patch
|
||||
---
|
||||
|
||||
Change the `execute` scope argument validator regex to match on the entire string by default.
|
||||
If this behavior is not desired check the `raw` boolean configuration option that is available along the `validator` string.
|
||||
@@ -7,23 +7,23 @@ name: Audit JavaScript
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
- cron: '0 0 * * *'
|
||||
push:
|
||||
branches:
|
||||
- v1
|
||||
- v2
|
||||
paths:
|
||||
- ".github/workflows/audit-javascript.yml"
|
||||
- "**/pnpm-lock.yaml"
|
||||
- "**/package.json"
|
||||
- '.github/workflows/audit-javascript.yml'
|
||||
- '**/pnpm-lock.yaml'
|
||||
- '**/package.json'
|
||||
pull_request:
|
||||
branches:
|
||||
- v1
|
||||
- v2
|
||||
paths:
|
||||
- ".github/workflows/audit-javascript.yml"
|
||||
- "**/pnpm-lock.yaml"
|
||||
- "**/package.json"
|
||||
- '.github/workflows/audit-javascript.yml'
|
||||
- '**/pnpm-lock.yaml'
|
||||
- '**/package.json'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
@@ -43,7 +43,7 @@ jobs:
|
||||
${{ runner.os }}-
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "lts/*"
|
||||
node-version: 'lts/*'
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 9.x.x
|
||||
|
||||
@@ -7,23 +7,23 @@ name: Audit Rust
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
- cron: '0 0 * * *'
|
||||
push:
|
||||
branches:
|
||||
- v1
|
||||
- v2
|
||||
paths:
|
||||
- ".github/workflows/audit-rust.yml"
|
||||
- "**/Cargo.lock"
|
||||
- "**/Cargo.toml"
|
||||
- '.github/workflows/audit-rust.yml'
|
||||
- '**/Cargo.lock'
|
||||
- '**/Cargo.toml'
|
||||
pull_request:
|
||||
branches:
|
||||
- v1
|
||||
- v2
|
||||
paths:
|
||||
- ".github/workflows/audit-rust.yml"
|
||||
- "**/Cargo.lock"
|
||||
- "**/Cargo.toml"
|
||||
- '.github/workflows/audit-rust.yml'
|
||||
- '**/Cargo.lock'
|
||||
- '**/Cargo.toml'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
|
||||
@@ -7,8 +7,8 @@ name: check generated files
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- ".github/workflows/check-generated-files.yml"
|
||||
- "**/guest-js/**"
|
||||
- '.github/workflows/check-generated-files.yml'
|
||||
- '**/guest-js/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
@@ -25,10 +25,6 @@ jobs:
|
||||
id: filter
|
||||
with:
|
||||
filters: |
|
||||
authenticator:
|
||||
- .github/workflows/check-generated-files.yml
|
||||
- plugins/authenticator/guest-js/**
|
||||
- plugins/authenticator/src/api-iife.js
|
||||
autostart:
|
||||
- .github/workflows/check-generated-files.yml
|
||||
- plugins/autostart/guest-js/**
|
||||
@@ -57,6 +53,10 @@ jobs:
|
||||
- .github/workflows/check-generated-files.yml
|
||||
- plugins/global-shortcut/guest-js/**
|
||||
- plugins/global-shortcut/src/api-iife.js
|
||||
opener:
|
||||
- .github/workflows/check-generated-files.yml
|
||||
- plugins/opener/guest-js/**
|
||||
- plugins/opener/src/api-iife.js
|
||||
haptics:
|
||||
- .github/workflows/check-generated-files.yml
|
||||
- plugins/haptics/guest-js/**
|
||||
@@ -140,7 +140,7 @@ jobs:
|
||||
${{ runner.os }}-
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "lts/*"
|
||||
node-version: 'lts/*'
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 9.x.x
|
||||
|
||||
@@ -27,4 +27,4 @@ jobs:
|
||||
uses: jbolda/covector/packages/action@covector-v0
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
command: "status"
|
||||
command: 'status'
|
||||
|
||||
@@ -17,6 +17,6 @@ jobs:
|
||||
uses: jbolda/covector/packages/action@covector-v0
|
||||
id: covector
|
||||
with:
|
||||
command: "status"
|
||||
command: 'status'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
comment: true
|
||||
comment: true
|
||||
|
||||
@@ -34,8 +34,8 @@ jobs:
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "lts/*"
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
node-version: 'lts/*'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
@@ -65,7 +65,7 @@ jobs:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.ORG_NPM_TOKEN }}
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
command: "version-or-publish"
|
||||
command: 'version-or-publish'
|
||||
createRelease: true
|
||||
recognizeContributors: true
|
||||
|
||||
@@ -78,8 +78,8 @@ jobs:
|
||||
uses: tauri-apps/create-pull-request@v3
|
||||
if: steps.covector.outputs.commandRan == 'version'
|
||||
with:
|
||||
title: "Publish New Versions (${{ github.ref_name }})"
|
||||
commit-message: "publish new versions"
|
||||
labels: "version updates"
|
||||
branch: "ci/release-${{ github.ref_name }}"
|
||||
title: 'Publish New Versions (${{ github.ref_name }})'
|
||||
commit-message: 'publish new versions'
|
||||
labels: 'version updates'
|
||||
branch: 'ci/release-${{ github.ref_name }}'
|
||||
body: ${{ steps.covector.outputs.change }}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
name: check formatting
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
rustfmt:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: install Rust stable and rustfmt
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: rustfmt
|
||||
|
||||
- name: run cargo fmt
|
||||
run: cargo fmt --all -- --check
|
||||
|
||||
prettier:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Cache pnpm modules
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 9.x.x
|
||||
run_install: true
|
||||
- run: pnpm format:check
|
||||
|
||||
taplo:
|
||||
name: taplo (.toml files)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: install Rust stable
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: install taplo-cli
|
||||
uses: taiki-e/install-action@v2
|
||||
with:
|
||||
tool: taplo-cli
|
||||
|
||||
- run: taplo fmt --check --diff
|
||||
@@ -10,15 +10,15 @@ on:
|
||||
- v1
|
||||
- v2
|
||||
paths:
|
||||
- ".github/workflows/integration-tests.yml"
|
||||
- "plugins/updater/src/**"
|
||||
- '.github/workflows/integration-tests.yml'
|
||||
- 'plugins/updater/src/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- v1
|
||||
- v2
|
||||
paths:
|
||||
- ".github/workflows/integration-tests.yml"
|
||||
- "plugins/updater/src/**"
|
||||
- '.github/workflows/integration-tests.yml'
|
||||
- 'plugins/updater/src/**'
|
||||
|
||||
jobs:
|
||||
run-integration-tests:
|
||||
@@ -27,7 +27,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: [ubuntu-latest, macos-latest, windows-latest]
|
||||
platform: [ubuntu-22.04, macos-latest, windows-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -38,10 +38,10 @@ jobs:
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: install Linux dependencies
|
||||
if: matrix.platform == 'ubuntu-latest'
|
||||
if: matrix.platform == 'ubuntu-22.04'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev libfuse2
|
||||
sudo apt-get install -y webkit2gtk-4.0 libwebkit2gtk-4.1-dev libayatana-appindicator3-dev libfuse2
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
|
||||
@@ -10,23 +10,23 @@ on:
|
||||
- v1
|
||||
- v2
|
||||
paths:
|
||||
- ".github/workflows/lint-javascript.yml"
|
||||
- "plugins/*/guest-js/**"
|
||||
- ".eslintignore"
|
||||
- ".eslintrc.json"
|
||||
- ".prettierignore"
|
||||
- "**/package.json"
|
||||
- '.github/workflows/lint-javascript.yml'
|
||||
- 'plugins/*/guest-js/**'
|
||||
- '.eslintignore'
|
||||
- '.eslintrc.json'
|
||||
- '.prettierignore'
|
||||
- '**/package.json'
|
||||
pull_request:
|
||||
branches:
|
||||
- v1
|
||||
- v2
|
||||
paths:
|
||||
- ".github/workflows/lint-javascript.yml"
|
||||
- "plugins/*/guest-js/**"
|
||||
- ".eslintignore"
|
||||
- ".eslintrc.json"
|
||||
- ".prettierignore"
|
||||
- "**/package.json"
|
||||
- '.github/workflows/lint-javascript.yml'
|
||||
- 'plugins/*/guest-js/**'
|
||||
- '.eslintignore'
|
||||
- '.eslintrc.json'
|
||||
- '.prettierignore'
|
||||
- '**/package.json'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
@@ -46,30 +46,10 @@ jobs:
|
||||
${{ runner.os }}-
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "lts/*"
|
||||
node-version: 'lts/*'
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 9.x.x
|
||||
run_install: true
|
||||
- name: eslint
|
||||
run: pnpm lint
|
||||
prettier:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Cache pnpm modules
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "lts/*"
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 9.x.x
|
||||
run_install: true
|
||||
- name: prettier check
|
||||
run: pnpm format-check
|
||||
|
||||
@@ -10,19 +10,19 @@ on:
|
||||
- v1
|
||||
- v2
|
||||
paths:
|
||||
- ".github/workflows/lint-rust.yml"
|
||||
- "plugins/*/src/**"
|
||||
- "!plugins/*/src/api-iife.js"
|
||||
- "**/Cargo.toml"
|
||||
- '.github/workflows/lint-rust.yml'
|
||||
- 'plugins/*/src/**'
|
||||
- '!plugins/*/src/api-iife.js'
|
||||
- '**/Cargo.toml'
|
||||
pull_request:
|
||||
branches:
|
||||
- v1
|
||||
- v2
|
||||
paths:
|
||||
- ".github/workflows/lint-rust.yml"
|
||||
- "plugins/*/src/**"
|
||||
- "!plugins/*/src/api-iife.js"
|
||||
- "**/Cargo.toml"
|
||||
- '.github/workflows/lint-rust.yml'
|
||||
- 'plugins/*/src/**'
|
||||
- '!plugins/*/src/api-iife.js'
|
||||
- '**/Cargo.toml'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
@@ -41,9 +41,6 @@ jobs:
|
||||
id: filter
|
||||
with:
|
||||
filters: |
|
||||
tauri-plugin-authenticator:
|
||||
- .github/workflows/lint-rust.yml
|
||||
- plugins/authenticator/**
|
||||
tauri-plugin-autostart:
|
||||
- .github/workflows/lint-rust.yml
|
||||
- plugins/autostart/**
|
||||
@@ -69,6 +66,9 @@ jobs:
|
||||
tauri-plugin-global-shortcut:
|
||||
- .github/workflows/lint-rust.yml
|
||||
- plugins/global-shortcut/**
|
||||
tauri-plugin-opener:
|
||||
- .github/workflows/lint-rust.yml
|
||||
- plugins/opener/**
|
||||
tauri-plugin-haptics:
|
||||
- .github/workflows/lint-rust.yml
|
||||
- plugins/haptics/**
|
||||
@@ -129,7 +129,7 @@ jobs:
|
||||
clippy:
|
||||
needs: changes
|
||||
if: ${{ needs.changes.outputs.packages != '[]' && needs.changes.outputs.packages != '' }}
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -138,10 +138,10 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: install webkit2gtk and libudev for [authenticator]
|
||||
- name: install webkit2gtk
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libudev-dev
|
||||
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev
|
||||
|
||||
- name: Install clippy with stable toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
@@ -150,32 +150,8 @@ jobs:
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: create dummy dist
|
||||
working-directory: examples/api
|
||||
run: mkdir dist
|
||||
|
||||
- name: clippy ${{ matrix.package }}
|
||||
if: matrix.package != 'tauri-plugin-sql'
|
||||
run: cargo clippy --package ${{ matrix.package }} --all-targets -- -D warnings
|
||||
|
||||
- name: clippy ${{ matrix.package }} mysql
|
||||
if: matrix.package == 'tauri-plugin-sql'
|
||||
run: cargo clippy --package ${{ matrix.package }} --all-targets --no-default-features --features mysql -- -D warnings
|
||||
|
||||
- name: clippy ${{ matrix.package }} postgres
|
||||
if: matrix.package == 'tauri-plugin-sql'
|
||||
run: cargo clippy --package ${{ matrix.package }} --all-targets --no-default-features --features postgres -- -D warnings
|
||||
|
||||
fmt:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install rustfmt with nightly toolchain
|
||||
uses: dtolnay/rust-toolchain@nightly
|
||||
with:
|
||||
components: rustfmt
|
||||
|
||||
- name: Check formatting
|
||||
run: cargo fmt --all -- --check
|
||||
- name: clippy ${{ matrix.package }} --all-features
|
||||
run: cargo clippy --package ${{ matrix.package }} --all-targets --all-features -- -D warnings
|
||||
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "lts/*"
|
||||
node-version: 'lts/*'
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
|
||||
@@ -10,21 +10,21 @@ on:
|
||||
- v1
|
||||
- v2
|
||||
paths:
|
||||
- ".github/workflows/test-rust.yml"
|
||||
- "plugins/*/src/**"
|
||||
- "!plugins/*/src/api-iife.js"
|
||||
- "**/Cargo.toml"
|
||||
- "**/Cargo.lock"
|
||||
- '.github/workflows/test-rust.yml'
|
||||
- 'plugins/*/src/**'
|
||||
- '!plugins/*/src/api-iife.js'
|
||||
- '**/Cargo.toml'
|
||||
- '**/Cargo.lock'
|
||||
pull_request:
|
||||
branches:
|
||||
- v1
|
||||
- v2
|
||||
paths:
|
||||
- ".github/workflows/test-rust.yml"
|
||||
- "plugins/*/src/**"
|
||||
- "!plugins/*/src/api-iife.js"
|
||||
- "**/Cargo.toml"
|
||||
- "**/Cargo.lock"
|
||||
- '.github/workflows/test-rust.yml'
|
||||
- 'plugins/*/src/**'
|
||||
- '!plugins/*/src/api-iife.js'
|
||||
- '**/Cargo.toml'
|
||||
- '**/Cargo.lock'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
@@ -44,10 +44,6 @@ jobs:
|
||||
with:
|
||||
base: v2
|
||||
filters: |
|
||||
tauri-plugin-authenticator:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- plugins/authenticator/**
|
||||
tauri-plugin-autostart:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
@@ -81,6 +77,10 @@ jobs:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- plugins/global-shortcut/**
|
||||
tauri-plugin-opener:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- plugins/opener/**
|
||||
tauri-plugin-haptics:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
@@ -167,32 +167,32 @@ jobs:
|
||||
- {
|
||||
target: x86_64-pc-windows-msvc,
|
||||
os: windows-latest,
|
||||
runner: "cargo",
|
||||
command: "test",
|
||||
runner: 'cargo',
|
||||
command: 'test'
|
||||
}
|
||||
- {
|
||||
target: x86_64-unknown-linux-gnu,
|
||||
os: ubuntu-latest,
|
||||
runner: "cargo",
|
||||
command: "test",
|
||||
os: ubuntu-22.04,
|
||||
runner: 'cargo',
|
||||
command: 'test'
|
||||
}
|
||||
- {
|
||||
target: aarch64-apple-darwin,
|
||||
os: macos-latest,
|
||||
runner: "cargo",
|
||||
command: "test",
|
||||
runner: 'cargo',
|
||||
command: 'test'
|
||||
}
|
||||
- {
|
||||
target: aarch64-apple-ios,
|
||||
os: macos-latest,
|
||||
runner: "cargo",
|
||||
command: "build",
|
||||
runner: 'cargo',
|
||||
command: 'build'
|
||||
}
|
||||
- {
|
||||
target: aarch64-linux-android,
|
||||
os: ubuntu-latest,
|
||||
runner: "cross",
|
||||
command: "build",
|
||||
runner: 'cross',
|
||||
command: 'build'
|
||||
}
|
||||
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
@@ -200,19 +200,13 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: install webkit2gtk and libudev for [authenticator]
|
||||
- name: install webkit2gtk
|
||||
if: contains(matrix.platform.target, 'unknown-linux')
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libudev-dev
|
||||
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev
|
||||
|
||||
- name: install openssl
|
||||
if: ${{ matrix.platform.os == 'windows-latest' && matrix.package == 'tauri-plugin-authenticator' }}
|
||||
run: |
|
||||
echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||
vcpkg install openssl:x64-windows-static-md
|
||||
|
||||
- uses: dtolnay/rust-toolchain@1.75.0
|
||||
- uses: dtolnay/rust-toolchain@1.77.2
|
||||
with:
|
||||
targets: ${{ matrix.platform.target }}
|
||||
|
||||
@@ -220,30 +214,14 @@ jobs:
|
||||
with:
|
||||
key: cache-${{ matrix.package }}-${{ matrix.platform.target }}
|
||||
|
||||
- name: create dummy dist
|
||||
working-directory: examples/api
|
||||
run: mkdir dist
|
||||
|
||||
- name: install cross
|
||||
if: ${{ matrix.platform.runner == 'cross' }}
|
||||
run: cargo +stable install cross --git https://github.com/cross-rs/cross
|
||||
|
||||
- name: test ${{ matrix.package }}
|
||||
if: matrix.package != 'tauri-plugin-sql' && matrix.package != 'tauri-plugin-http'
|
||||
if: matrix.package != 'tauri-plugin-http'
|
||||
run: ${{ matrix.platform.runner }} ${{ matrix.platform.command }} --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets --all-features
|
||||
|
||||
- name: test ${{ matrix.package }}
|
||||
if: matrix.package == 'tauri-plugin-http'
|
||||
run: ${{ matrix.platform.runner }} ${{ matrix.platform.command }} --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets
|
||||
|
||||
- name: test ${{ matrix.package }} sqlite
|
||||
if: matrix.package == 'tauri-plugin-sql'
|
||||
run: ${{ matrix.platform.runner }} ${{ matrix.platform.command }} --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets --features sqlite
|
||||
|
||||
- name: test ${{ matrix.package }} mysql
|
||||
if: matrix.package == 'tauri-plugin-sql'
|
||||
run: ${{ matrix.platform.runner }} ${{ matrix.platform.command }} --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets --features mysql
|
||||
|
||||
- name: test ${{ matrix.package }} postgres
|
||||
if: matrix.package == 'tauri-plugin-sql'
|
||||
run: ${{ matrix.platform.runner }} ${{ matrix.platform.command }} --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets --features postgres
|
||||
|
||||
@@ -1,8 +1,58 @@
|
||||
target
|
||||
node_modules
|
||||
dist-js
|
||||
dist
|
||||
# dependency directories
|
||||
node_modules/
|
||||
target/
|
||||
|
||||
# Optional npm and yarn cache directory
|
||||
.npm/
|
||||
.yarn/
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
|
||||
# .vscode workspace settings file
|
||||
.vscode/settings.json
|
||||
|
||||
# npm, yarn and bun lock files
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
bun.lockb
|
||||
|
||||
# rust compiled folders
|
||||
target/
|
||||
|
||||
# compiled plugins
|
||||
dist-js/
|
||||
|
||||
# plugins .tauri directory
|
||||
/plugins/*/.tauri
|
||||
|
||||
# examples
|
||||
examples/*/dist
|
||||
plugins/*/examples/*/dist
|
||||
examples/*/src-tauri/gen/schemas
|
||||
plugins/*/examples/*/src-tauri/gen/schemas
|
||||
|
||||
# logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# miscellaneous
|
||||
/.vs
|
||||
.DS_Store
|
||||
.Thumbs.db
|
||||
*.sublime*
|
||||
.idea
|
||||
.vscode
|
||||
.gradle
|
||||
**/capabilities/schemas
|
||||
debug.log
|
||||
TODO.md
|
||||
@@ -1,12 +1,27 @@
|
||||
target
|
||||
node_modules
|
||||
dist
|
||||
dist-js
|
||||
/.changes
|
||||
/.vscode
|
||||
|
||||
# dependcies and artifacts directories
|
||||
node_modules/
|
||||
target/
|
||||
dist-js/
|
||||
dist/
|
||||
|
||||
# lock files
|
||||
pnpm-lock.yaml
|
||||
Cargo.lock
|
||||
.build
|
||||
build
|
||||
|
||||
# examples gen directory
|
||||
examples/*/src-tauri/gen/
|
||||
plugins/*/examples/*/src-tauri/gen/
|
||||
|
||||
# autogenerated files
|
||||
**/autogenerated/**/*.md
|
||||
api-iife.js
|
||||
init-iife.js
|
||||
intermediates/
|
||||
*schema.json
|
||||
CHANGELOG.md
|
||||
*schema.json
|
||||
|
||||
# mobile build
|
||||
**/ios/.build
|
||||
**/.tauri
|
||||
plugins/*/android/build
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"singleQuote": true,
|
||||
"semi": false,
|
||||
"trailingComma": "none"
|
||||
}
|
||||
@@ -2,129 +2,129 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import readline from "readline";
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
import readline from 'readline'
|
||||
|
||||
const header = `Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
SPDX-License-Identifier: MIT`;
|
||||
SPDX-License-Identifier: MIT`
|
||||
const ignoredLicenses = [
|
||||
"// Copyright 2021 Flavio Oliveira",
|
||||
"// Copyright 2021 Jonas Kruckenberg",
|
||||
"// Copyright 2018-2023 the Deno authors.",
|
||||
];
|
||||
'// Copyright 2021 Flavio Oliveira',
|
||||
'// Copyright 2021 Jonas Kruckenberg',
|
||||
'// Copyright 2018-2023 the Deno authors.'
|
||||
]
|
||||
|
||||
const extensions = [".rs", ".js", ".ts", ".yml", ".swift", ".kt"];
|
||||
const extensions = ['.rs', '.js', '.ts', '.yml', '.swift', '.kt']
|
||||
const ignore = [
|
||||
"target",
|
||||
"templates",
|
||||
"node_modules",
|
||||
"gen",
|
||||
"dist",
|
||||
"dist-js",
|
||||
".svelte-kit",
|
||||
"api-iife.js",
|
||||
"init-iife.js",
|
||||
".build",
|
||||
"notify_rust",
|
||||
];
|
||||
'target',
|
||||
'templates',
|
||||
'node_modules',
|
||||
'gen',
|
||||
'dist',
|
||||
'dist-js',
|
||||
'.svelte-kit',
|
||||
'api-iife.js',
|
||||
'init-iife.js',
|
||||
'.build',
|
||||
'notify_rust'
|
||||
]
|
||||
|
||||
async function checkFile(file) {
|
||||
if (
|
||||
extensions.some((e) => file.endsWith(e)) &&
|
||||
!ignore.some((i) => file.includes(`${path.sep}${i}`))
|
||||
) {
|
||||
const fileStream = fs.createReadStream(file);
|
||||
const fileStream = fs.createReadStream(file)
|
||||
const rl = readline.createInterface({
|
||||
input: fileStream,
|
||||
crlfDelay: Infinity,
|
||||
});
|
||||
crlfDelay: Infinity
|
||||
})
|
||||
|
||||
let contents = ``;
|
||||
let i = 0;
|
||||
let contents = ``
|
||||
let i = 0
|
||||
for await (let line of rl) {
|
||||
// ignore empty lines, allow shebang, swift-tools-version and bundler license
|
||||
if (
|
||||
line.length === 0 ||
|
||||
line.startsWith("#!") ||
|
||||
line.startsWith("// swift-tools-version:") ||
|
||||
line.startsWith('#!') ||
|
||||
line.startsWith('// swift-tools-version:') ||
|
||||
ignoredLicenses.includes(line)
|
||||
) {
|
||||
continue;
|
||||
continue
|
||||
}
|
||||
|
||||
// strip comment marker
|
||||
if (line.startsWith("// ")) {
|
||||
line = line.substring(3);
|
||||
} else if (line.startsWith("# ")) {
|
||||
line = line.substring(2);
|
||||
if (line.startsWith('// ')) {
|
||||
line = line.substring(3)
|
||||
} else if (line.startsWith('# ')) {
|
||||
line = line.substring(2)
|
||||
}
|
||||
|
||||
contents += line;
|
||||
contents += line
|
||||
if (++i === 3) {
|
||||
break;
|
||||
break
|
||||
}
|
||||
contents += "\n";
|
||||
contents += '\n'
|
||||
}
|
||||
if (contents !== header) {
|
||||
return true;
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
|
||||
async function check(src) {
|
||||
const missingHeader = [];
|
||||
const missingHeader = []
|
||||
|
||||
for (const entry of fs.readdirSync(src, {
|
||||
withFileTypes: true,
|
||||
withFileTypes: true
|
||||
})) {
|
||||
const p = path.join(src, entry.name);
|
||||
const p = path.join(src, entry.name)
|
||||
|
||||
if (entry.isSymbolicLink() || ignore.includes(entry.name)) {
|
||||
continue;
|
||||
continue
|
||||
}
|
||||
|
||||
if (entry.isDirectory()) {
|
||||
const missing = await check(p);
|
||||
missingHeader.push(...missing);
|
||||
const missing = await check(p)
|
||||
missingHeader.push(...missing)
|
||||
} else {
|
||||
const isMissing = await checkFile(p);
|
||||
const isMissing = await checkFile(p)
|
||||
if (isMissing) {
|
||||
missingHeader.push(p);
|
||||
missingHeader.push(p)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return missingHeader;
|
||||
return missingHeader
|
||||
}
|
||||
|
||||
const [_bin, _script, ...files] = process.argv;
|
||||
const [_bin, _script, ...files] = process.argv
|
||||
|
||||
if (files.length > 0) {
|
||||
async function run() {
|
||||
const missing = [];
|
||||
const missing = []
|
||||
for (const f of files) {
|
||||
const isMissing = await checkFile(f);
|
||||
const isMissing = await checkFile(f)
|
||||
if (isMissing) {
|
||||
missing.push(f);
|
||||
missing.push(f)
|
||||
}
|
||||
}
|
||||
if (missing.length > 0) {
|
||||
console.log(missing.join("\n"));
|
||||
process.exit(1);
|
||||
console.log(missing.join('\n'))
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
run();
|
||||
run()
|
||||
} else {
|
||||
check(path.resolve(new URL(import.meta.url).pathname, "../../..")).then(
|
||||
check(path.resolve(new URL(import.meta.url).pathname, '../../..')).then(
|
||||
(missing) => {
|
||||
if (missing.length > 0) {
|
||||
console.log(missing.join("\n"));
|
||||
process.exit(1);
|
||||
console.log(missing.join('\n'))
|
||||
process.exit(1)
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
plugins/*/permissions/autogenerated/
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"rust-lang.rust-analyzer",
|
||||
"EditorConfig.EditorConfig",
|
||||
"esbenp.prettier-vscode",
|
||||
"tamasfe.even-better-toml"
|
||||
]
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
members = [
|
||||
"plugins/*",
|
||||
"plugins/*/tests/*",
|
||||
"plugins/updater/tests/updater-migration/v2-app",
|
||||
"plugins/*/examples/*/src-tauri",
|
||||
"examples/*/src-tauri",
|
||||
]
|
||||
@@ -9,24 +10,27 @@ resolver = "2"
|
||||
|
||||
[workspace.dependencies]
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
tracing = "0.1"
|
||||
log = "0.4"
|
||||
tauri = { version = "2.0.0-rc.0", default-features = false }
|
||||
tauri-build = "2.0.0-rc.0"
|
||||
tauri-plugin = "2.0.0-rc.0"
|
||||
tauri-utils = "2.0.0-rc.0"
|
||||
tauri = { version = "2", default-features = false }
|
||||
tauri-build = "2"
|
||||
tauri-plugin = "2"
|
||||
tauri-utils = "2"
|
||||
serde_json = "1"
|
||||
thiserror = "1"
|
||||
thiserror = "2"
|
||||
url = "2"
|
||||
schemars = "0.8"
|
||||
dunce = "1"
|
||||
specta = "=2.0.0-rc.16"
|
||||
specta = "=2.0.0-rc.20"
|
||||
glob = "0.3"
|
||||
zbus = "4"
|
||||
#tauri-specta = "=2.0.0-rc.11"
|
||||
|
||||
[workspace.package]
|
||||
edition = "2021"
|
||||
authors = ["Tauri Programme within The Commons Conservancy"]
|
||||
license = "Apache-2.0 OR MIT"
|
||||
rust-version = "1.75"
|
||||
rust-version = "1.77.2"
|
||||
repository = "https://github.com/tauri-apps/plugins-workspace"
|
||||
|
||||
# default to small, optimized release binaries
|
||||
@@ -36,6 +40,3 @@ codegen-units = 1
|
||||
lto = true
|
||||
incremental = false
|
||||
opt-level = "s"
|
||||
|
||||
[patch.crates-io]
|
||||
iota-crypto = { git = "https://github.com/iotaledger/crypto.rs", rev = "489aa0e7936d0e491503f778a83cfc6ed1b28fe7" }
|
||||
|
||||
@@ -1,37 +1,49 @@
|
||||
# Official Tauri Plugins
|
||||
|
||||
This repo and all plugins require a Rust version of at least **1.77.2**
|
||||
|
||||
## Plugins Found Here
|
||||
|
||||
| | | Win | Mac | Lin | iOS | And |
|
||||
| ----------------------------------------------- | ------------------------------------------------------ | --- | --- | --- | --- | --- |
|
||||
| [authenticator](plugins/authenticator) | Interface with hardware security keys. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [autostart](plugins/autostart) | Automatically launch your app at system startup. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [barcode-scanner](plugins/barcode-scanner) | Allows your mobile application to use the camera to scan QR codes, EAN-13 and other kinds of barcodes. | ? | ? | ? | ✅ | ✅ |
|
||||
| [biometric](plugins/biometric) | Prompt the user for biometric authentication on Android and iOS. | ? | ? | ? | ✅ | ✅ |
|
||||
| [cli](plugins/cli) | Parse arguments from your Command Line Interface | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [clipboard-manager](plugins/clipboard-manager) | Read and write to the system clipboard. | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [deep-link](plugins/deep-link) | Set your Tauri application as the default handler for an URL. | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [dialog](plugins/dialog) | Native system dialogs for opening and saving files along with message dialogs. | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [fs](plugins/fs) | Access the file system. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [global-shortcut](plugins/global-shortcut) | Register global shortcuts. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [http](plugins/http) | Access the HTTP client written in Rust. | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [localhost](plugins/localhost) | Use a localhost server in production apps. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [log](plugins/log) | Configurable logging. | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [nfc](plugins/nfc) | Read and write NFC tags on Android and iOS. | ? | ? | ? | ✅ | ✅ |
|
||||
| [notification](plugins/notification) | Send message notifications (brief auto-expiring OS window element) to your user. Can also be used with the Notification Web API. | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [os](plugins/os) | Read information about the operating system. | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [persisted-scope](plugins/persisted-scope) | Persist runtime scope changes on the filesystem. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [positioner](plugins/positioner) | Move windows to common locations. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [process](plugins/process) | This plugin provides APIs to access the current process. To spawn child processes, see the [`shell`](https://github.com/tauri-apps/tauri-plugin-shell) plugin. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [shell](plugins/shell) | Access the system shell. Allows you to spawn child processes and manage files and URLs using their default application. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [single-instance](plugins/single-instance) | Ensure a single instance of your tauri app is running. | ✅ | ? | ✅ | ? | ? |
|
||||
| [sql](plugins/sql) | Interface with SQL databases. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [store](plugins/store) | Persistent key value storage. | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [stronghold](plugins/stronghold) | Encrypted, secure database. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [updater](plugins/updater) | In-app updates for Tauri applications. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [upload](plugins/upload) | Tauri plugin for file uploads through HTTP. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [websocket](plugins/websocket) | Open a WebSocket connection using a Rust client in JS. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [window-state](plugins/window-state) | Persist window sizes and positions. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| | | Win | Mac | Lin | iOS | And |
|
||||
| ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | --- | --- | --- | --- |
|
||||
| [autostart](plugins/autostart) | Automatically launch your app at system startup. | ✅ | ✅ | ✅ | ❌ | ❌ |
|
||||
| [barcode-scanner](plugins/barcode-scanner) | Allows your mobile application to use the camera to scan QR codes, EAN-13 and other kinds of barcodes. | ? | ? | ? | ✅ | ✅ |
|
||||
| [biometric](plugins/biometric) | Prompt the user for biometric authentication on Android and iOS. | ? | ? | ? | ✅ | ✅ |
|
||||
| [cli](plugins/cli) | Parse arguments from your Command Line Interface | ✅ | ✅ | ✅ | ❌ | ❌ |
|
||||
| [clipboard-manager](plugins/clipboard-manager) | Read and write to the system clipboard. | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [deep-link](plugins/deep-link) | Set your Tauri application as the default handler for an URL. | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [dialog](plugins/dialog) | Native system dialogs for opening and saving files along with message dialogs. | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [fs](plugins/fs) | Access the file system. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [geolocation](plugins/geolocation) | Get and track current device position. | ? | ? | ? | ✅ | ✅ |
|
||||
| [global-shortcut](plugins/global-shortcut) | Register global shortcuts. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [haptics](plugins/haptics) | Haptic feedback and vibrations. | ? | ? | ? | ✅ | ✅ |
|
||||
| [http](plugins/http) | Access the HTTP client written in Rust. | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [localhost](plugins/localhost) | Use a localhost server in production apps. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [log](plugins/log) | Configurable logging. | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [nfc](plugins/nfc) | Read and write NFC tags on Android and iOS. | ? | ? | ? | ✅ | ✅ |
|
||||
| [notification](plugins/notification) | Send message notifications (brief auto-expiring OS window element) to your user. Can also be used with the Notification Web API. | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [opener](plugins/opener) | Open files and URLs using their default application. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [os](plugins/os) | Read information about the operating system. | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [persisted-scope](plugins/persisted-scope) | Persist runtime scope changes on the filesystem. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [positioner](plugins/positioner) | Move windows to common locations. | ✅ | ✅ | ✅ | ❌ | ❌ |
|
||||
| [process](plugins/process) | This plugin provides APIs to access the current process. To spawn child processes, see the [`shell`](https://github.com/tauri-apps/tauri-plugin-shell) plugin. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [shell](plugins/shell) | Access the system shell. Allows you to spawn child processes and manage files and URLs using their default application. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [single-instance](plugins/single-instance) | Ensure a single instance of your tauri app is running. | ✅ | ✅ | ✅ | ❌ | ❌ |
|
||||
| [sql](plugins/sql) | Interface with SQL databases. | ✅ | ✅ | ✅ | ? | ✅ |
|
||||
| [store](plugins/store) | Persistent key value storage. | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [stronghold](plugins/stronghold) | Encrypted, secure database. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [updater](plugins/updater) | In-app updates for Tauri applications. | ✅ | ✅ | ✅ | ❌ | ❌ |
|
||||
| [upload](plugins/upload) | Tauri plugin for file uploads through HTTP. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [websocket](plugins/websocket) | Open a WebSocket connection using a Rust client in JS. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [window-state](plugins/window-state) | Persist window sizes and positions. | ✅ | ✅ | ✅ | ❌ | ❌ |
|
||||
|
||||
_This repo and all plugins require a Rust version of at least **1.75**_
|
||||
- ✅: (Partially) Supported
|
||||
- ❌: Not supported
|
||||
- `?` : Unknown/Untested or Planned
|
||||
|
||||
## Contributing
|
||||
|
||||
PRs accepted. Please make sure to read the [Contributing Guide](https://github.com/tauri-apps/tauri/blob/dev/.github/CONTRIBUTING.md) before making a pull request.
|
||||
|
||||
## Partners
|
||||
|
||||
|
||||
@@ -20,4 +20,4 @@ We prefer to receive reports in English.
|
||||
|
||||
Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new).
|
||||
|
||||
Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app).
|
||||
Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app).
|
||||
|
||||
@@ -2,28 +2,29 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import eslint from "@eslint/js";
|
||||
import eslintConfigPrettier from "eslint-config-prettier";
|
||||
import eslintPluginSecurity from "eslint-plugin-security";
|
||||
import tseslint from "typescript-eslint";
|
||||
import eslint from '@eslint/js'
|
||||
import eslintConfigPrettier from 'eslint-config-prettier'
|
||||
import eslintPluginSecurity from 'eslint-plugin-security'
|
||||
import tseslint from 'typescript-eslint'
|
||||
|
||||
export default tseslint.config(
|
||||
{
|
||||
ignores: [
|
||||
"**/target",
|
||||
"**/node_modules",
|
||||
"**/examples",
|
||||
"**/dist",
|
||||
"**/dist-js",
|
||||
"**/build",
|
||||
"**/api-iife.js",
|
||||
"**/init-iife.js",
|
||||
"**/init.js",
|
||||
"**/rollup.config.js",
|
||||
"**/bindings.ts",
|
||||
".scripts",
|
||||
"eslint.config.js",
|
||||
],
|
||||
'**/target',
|
||||
'**/node_modules',
|
||||
'**/examples',
|
||||
'**/dist',
|
||||
'**/dist-js',
|
||||
'**/build',
|
||||
'**/api-iife.js',
|
||||
'**/init-iife.js',
|
||||
'**/init.js',
|
||||
'**/rollup.config.js',
|
||||
'**/bindings.ts',
|
||||
'**/.test-server',
|
||||
'.scripts',
|
||||
'eslint.config.js'
|
||||
]
|
||||
},
|
||||
eslint.configs.recommended,
|
||||
eslintConfigPrettier,
|
||||
@@ -31,7 +32,7 @@ export default tseslint.config(
|
||||
...tseslint.configs.recommendedTypeChecked,
|
||||
{
|
||||
languageOptions: {
|
||||
parserOptions: { project: true, tsconfigRootDir: import.meta.dirname },
|
||||
},
|
||||
},
|
||||
);
|
||||
parserOptions: { project: true, tsconfigRootDir: import.meta.dirname }
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
/node_modules/
|
||||
/.vscode/
|
||||
.DS_Store
|
||||
.cargo
|
||||
@@ -1,5 +1,100 @@
|
||||
# Changelog
|
||||
|
||||
## \[2.0.3]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `clipboard-manager-js@2.0.1`
|
||||
- Upgraded to `log-js@2.0.1`
|
||||
- Upgraded to `fs-js@2.0.3`
|
||||
- Upgraded to `opener-js@2.0.0`
|
||||
|
||||
## \[2.0.2]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `fs-js@2.0.2`
|
||||
|
||||
## \[2.0.1]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `dialog-js@2.0.1`
|
||||
- Upgraded to `fs-js@2.0.1`
|
||||
- Upgraded to `http-js@2.0.1`
|
||||
- Upgraded to `shell-js@2.0.1`
|
||||
- Upgraded to `store-js@2.1.0`
|
||||
|
||||
## \[2.0.0]
|
||||
|
||||
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `barcode-scanner-js@2.0.0`
|
||||
- Upgraded to `biometric-js@2.0.0`
|
||||
- Upgraded to `cli-js@2.0.0`
|
||||
- Upgraded to `clipboard-manager-js@2.0.0`
|
||||
- Upgraded to `fs-js@2.0.0`
|
||||
- Upgraded to `dialog-js@2.0.0`
|
||||
- Upgraded to `global-shortcut-js@2.0.0`
|
||||
- Upgraded to `http-js@2.0.0`
|
||||
- Upgraded to `log-js@2.0.0`
|
||||
- Upgraded to `nfc-js@2.0.0`
|
||||
- Upgraded to `notification-js@2.0.0`
|
||||
- Upgraded to `os-js@2.0.0`
|
||||
- Upgraded to `process-js@2.0.0`
|
||||
- Upgraded to `shell-js@2.0.0`
|
||||
- Upgraded to `store-js@2.0.0`
|
||||
- Upgraded to `updater-js@2.0.0`
|
||||
|
||||
## \[2.0.0-rc.5]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `store-js@2.0.0-rc.2`
|
||||
|
||||
## \[2.0.0-rc.4]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `barcode-scanner-js@2.0.0-rc.2`
|
||||
- Upgraded to `clipboard-manager-js@2.0.0-rc.2`
|
||||
|
||||
## \[2.0.0-rc.3]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `updater-js@2.0.0-rc.2`
|
||||
|
||||
## \[2.0.0-rc.2]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `barcode-scanner-js@2.0.0-rc.1`
|
||||
- Upgraded to `notification-js@2.0.0-rc.1`
|
||||
- Upgraded to `dialog-js@2.0.0-rc.1`
|
||||
- Upgraded to `biometric-js@2.0.0-rc.1`
|
||||
- Upgraded to `cli-js@2.0.0-rc.1`
|
||||
- Upgraded to `clipboard-manager-js@2.0.0-rc.1`
|
||||
- Upgraded to `fs-js@2.0.0-rc.2`
|
||||
- Upgraded to `global-shortcut-js@2.0.0-rc.1`
|
||||
- Upgraded to `http-js@2.0.0-rc.2`
|
||||
- Upgraded to `log-js@2.0.0-rc.1`
|
||||
- Upgraded to `nfc-js@2.0.0-rc.1`
|
||||
- Upgraded to `os-js@2.0.0-rc.1`
|
||||
- Upgraded to `process-js@2.0.0-rc.1`
|
||||
- Upgraded to `shell-js@2.0.0-rc.1`
|
||||
- Upgraded to `store-js@2.0.0-rc.1`
|
||||
- Upgraded to `updater-js@2.0.0-rc.1`
|
||||
|
||||
## \[2.0.0-rc.1]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `http-js@2.0.0-rc.1`
|
||||
- Upgraded to `fs-js@2.0.0-rc.1`
|
||||
|
||||
## \[2.0.0-rc.0]
|
||||
|
||||
### Dependencies
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
window.__TAURI_ISOLATION_HOOK__ = (payload) => {
|
||||
return payload;
|
||||
};
|
||||
return payload
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"moduleResolution": "node",
|
||||
"target": "esnext",
|
||||
"module": "esnext",
|
||||
"moduleResolution": "bundler",
|
||||
"target": "ESNext",
|
||||
"module": "ESNext",
|
||||
/**
|
||||
* svelte-preprocess cannot figure out whether you have
|
||||
* a value or a type, so tell TypeScript to enforce using
|
||||
* `import type` instead of `import` for Types.
|
||||
*/
|
||||
"importsNotUsedAsValues": "error",
|
||||
"verbatimModuleSyntax": true,
|
||||
"isolatedModules": true,
|
||||
"resolveJsonModule": true,
|
||||
/**
|
||||
@@ -18,8 +18,6 @@
|
||||
"sourceMap": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"baseUrl": ".",
|
||||
/**
|
||||
* Typecheck JS in `.svelte` and `.js` files by default.
|
||||
* Disable this if you'd like to use dynamic types.
|
||||
|
||||
@@ -1,40 +1,44 @@
|
||||
{
|
||||
"name": "svelte-app",
|
||||
"name": "api",
|
||||
"private": true,
|
||||
"version": "2.0.0-rc.0",
|
||||
"version": "2.0.3",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite --clearScreen false",
|
||||
"build": "vite build",
|
||||
"serve": "vite preview"
|
||||
"serve": "vite preview",
|
||||
"tauri": "tauri"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "2.0.0-rc.0",
|
||||
"@tauri-apps/plugin-barcode-scanner": "2.0.0-rc.0",
|
||||
"@tauri-apps/plugin-biometric": "2.0.0-rc.0",
|
||||
"@tauri-apps/plugin-cli": "2.0.0-rc.0",
|
||||
"@tauri-apps/plugin-clipboard-manager": "2.0.0-rc.0",
|
||||
"@tauri-apps/plugin-dialog": "2.0.0-rc.0",
|
||||
"@tauri-apps/plugin-fs": "2.0.0-rc.0",
|
||||
"@tauri-apps/plugin-global-shortcut": "2.0.0-rc.0",
|
||||
"@tauri-apps/plugin-http": "2.0.0-rc.0",
|
||||
"@tauri-apps/plugin-nfc": "2.0.0-rc.0",
|
||||
"@tauri-apps/plugin-notification": "2.0.0-rc.0",
|
||||
"@tauri-apps/plugin-os": "2.0.0-rc.0",
|
||||
"@tauri-apps/plugin-process": "2.0.0-rc.0",
|
||||
"@tauri-apps/plugin-shell": "2.0.0-rc.0",
|
||||
"@tauri-apps/plugin-updater": "2.0.0-rc.0",
|
||||
"@zerodevx/svelte-json-view": "1.0.9"
|
||||
"@tauri-apps/api": "2.1.1",
|
||||
"@tauri-apps/plugin-barcode-scanner": "2.0.0",
|
||||
"@tauri-apps/plugin-biometric": "2.0.0",
|
||||
"@tauri-apps/plugin-cli": "2.0.0",
|
||||
"@tauri-apps/plugin-clipboard-manager": "2.0.1",
|
||||
"@tauri-apps/plugin-dialog": "2.0.1",
|
||||
"@tauri-apps/plugin-fs": "2.0.3",
|
||||
"@tauri-apps/plugin-geolocation": "2.0.0",
|
||||
"@tauri-apps/plugin-global-shortcut": "2.0.0",
|
||||
"@tauri-apps/plugin-opener": "2.0.0",
|
||||
"@tauri-apps/plugin-haptics": "2.0.0",
|
||||
"@tauri-apps/plugin-http": "2.0.1",
|
||||
"@tauri-apps/plugin-nfc": "2.0.0",
|
||||
"@tauri-apps/plugin-notification": "2.0.0",
|
||||
"@tauri-apps/plugin-os": "2.0.0",
|
||||
"@tauri-apps/plugin-process": "2.0.0",
|
||||
"@tauri-apps/plugin-shell": "2.0.1",
|
||||
"@tauri-apps/plugin-store": "2.1.0",
|
||||
"@tauri-apps/plugin-updater": "2.0.0",
|
||||
"@zerodevx/svelte-json-view": "1.0.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify-json/codicon": "^1.1.37",
|
||||
"@iconify-json/ph": "^1.1.8",
|
||||
"@sveltejs/vite-plugin-svelte": "^3.0.1",
|
||||
"@tauri-apps/cli": "2.0.0-rc.0",
|
||||
"@unocss/extractor-svelte": "^0.61.0",
|
||||
"internal-ip": "7.0.0",
|
||||
"svelte": "^4.2.8",
|
||||
"unocss": "^0.61.0",
|
||||
"vite": "^5.0.13"
|
||||
"@sveltejs/vite-plugin-svelte": "^5.0.0",
|
||||
"@tauri-apps/cli": "2.1.0",
|
||||
"@unocss/extractor-svelte": "^0.65.0",
|
||||
"svelte": "^5.0.0",
|
||||
"unocss": "^0.65.0",
|
||||
"vite": "^6.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,197 @@
|
||||
# Changelog
|
||||
|
||||
## \[2.0.6]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `fs@2.1.0`
|
||||
- Upgraded to `updater@2.1.0`
|
||||
- Upgraded to `dialog@2.0.4`
|
||||
- Upgraded to `log-plugin@2.0.3`
|
||||
- Upgraded to `http@2.0.4`
|
||||
- Upgraded to `opener@2.0.0`
|
||||
|
||||
## \[2.0.5]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `clipboard-manager@2.0.2`
|
||||
- Upgraded to `log-plugin@2.0.2`
|
||||
|
||||
## \[2.0.4]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `fs@2.0.3`
|
||||
- Upgraded to `dialog@2.0.3`
|
||||
- Upgraded to `http@2.0.3`
|
||||
|
||||
## \[2.0.3]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `dialog@2.0.2`
|
||||
- Upgraded to `fs@2.0.2`
|
||||
- Upgraded to `http@2.0.2`
|
||||
- Upgraded to `shell@2.0.2`
|
||||
- Upgraded to `store@2.1.0`
|
||||
|
||||
## \[2.0.2]
|
||||
|
||||
- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `barcode-scanner@2.0.1`
|
||||
- Upgraded to `biometric@2.0.1`
|
||||
- Upgraded to `cli@2.0.1`
|
||||
- Upgraded to `clipboard-manager@2.0.1`
|
||||
- Upgraded to `fs@2.0.1`
|
||||
- Upgraded to `dialog@2.0.1`
|
||||
- Upgraded to `geolocation@2.0.1`
|
||||
- Upgraded to `global-shortcut@2.0.1`
|
||||
- Upgraded to `haptics@2.0.1`
|
||||
- Upgraded to `http@2.0.1`
|
||||
- Upgraded to `log-plugin@2.0.1`
|
||||
- Upgraded to `nfc@2.0.1`
|
||||
- Upgraded to `notification@2.0.1`
|
||||
- Upgraded to `os@2.0.1`
|
||||
- Upgraded to `process@2.0.1`
|
||||
- Upgraded to `shell@2.0.1`
|
||||
- Upgraded to `store@2.0.1`
|
||||
- Upgraded to `updater@2.0.2`
|
||||
|
||||
## \[2.0.1]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `updater@2.0.1`
|
||||
|
||||
## \[2.0.0]
|
||||
|
||||
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `barcode-scanner@2.0.0`
|
||||
- Upgraded to `biometric@2.0.0`
|
||||
- Upgraded to `cli@2.0.0`
|
||||
- Upgraded to `clipboard-manager@2.0.0`
|
||||
- Upgraded to `fs@2.0.0`
|
||||
- Upgraded to `dialog@2.0.0`
|
||||
- Upgraded to `global-shortcut@2.0.0`
|
||||
- Upgraded to `http@2.0.0`
|
||||
- Upgraded to `log-plugin@2.0.0`
|
||||
- Upgraded to `nfc@2.0.0`
|
||||
- Upgraded to `notification@2.0.0`
|
||||
- Upgraded to `os@2.0.0`
|
||||
- Upgraded to `process@2.0.0`
|
||||
- Upgraded to `shell@2.0.0`
|
||||
- Upgraded to `store@2.0.0`
|
||||
- Upgraded to `updater@2.0.0`
|
||||
|
||||
## \[2.0.0-rc.8]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `cli@2.0.0-rc.2`
|
||||
- Upgraded to `dialog@2.0.0-rc.8`
|
||||
- Upgraded to `fs@2.0.0-rc.6`
|
||||
- Upgraded to `shell@2.0.0-rc.4`
|
||||
- Upgraded to `store@2.0.0-rc.4`
|
||||
- Upgraded to `updater@2.0.0-rc.4`
|
||||
- Upgraded to `http@2.0.0-rc.6`
|
||||
|
||||
## \[2.0.0-rc.7]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `clipboard-manager@2.0.0-rc.4`
|
||||
- Upgraded to `fs@2.0.0-rc.5`
|
||||
- Upgraded to `notification@2.0.0-rc.5`
|
||||
- Upgraded to `dialog@2.0.0-rc.7`
|
||||
- Upgraded to `http@2.0.0-rc.5`
|
||||
|
||||
## \[2.0.0-rc.6]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `dialog@2.0.0-rc.6`
|
||||
- Upgraded to `fs@2.0.0-rc.4`
|
||||
- Upgraded to `http@2.0.0-rc.4`
|
||||
|
||||
## \[2.0.0-rc.5]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `barcode-scanner@2.0.0-rc.4`
|
||||
- Upgraded to `notification@2.0.0-rc.4`
|
||||
|
||||
## \[2.0.0-rc.4]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `fs@2.0.0-rc.3`
|
||||
- Upgraded to `dialog@2.0.0-rc.5`
|
||||
- Upgraded to `updater@2.0.0-rc.3`
|
||||
- Upgraded to `http@2.0.0-rc.3`
|
||||
|
||||
## \[2.0.0-rc.3]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `fs@2.0.0-rc.2`
|
||||
- Upgraded to `dialog@2.0.0-rc.4`
|
||||
- Upgraded to `http@2.0.0-rc.2`
|
||||
|
||||
## \[2.0.0-rc.2]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `barcode-scanner@2.0.0-rc.3`
|
||||
- Upgraded to `notification@2.0.0-rc.3`
|
||||
- Upgraded to `dialog@2.0.0-rc.3`
|
||||
- Upgraded to `fs@2.0.0-rc.1`
|
||||
- Upgraded to `global-shortcut@2.0.0-rc.2`
|
||||
- Upgraded to `store@2.0.0-rc.3`
|
||||
- Upgraded to `biometric@2.0.0-rc.3`
|
||||
- Upgraded to `cli@2.0.0-rc.1`
|
||||
- Upgraded to `clipboard-manager@2.0.0-rc.3`
|
||||
- Upgraded to `http@2.0.0-rc.1`
|
||||
- Upgraded to `log-plugin@2.0.0-rc.2`
|
||||
- Upgraded to `nfc@2.0.0-rc.3`
|
||||
- Upgraded to `os@2.0.0-rc.1`
|
||||
- Upgraded to `process@2.0.0-rc.1`
|
||||
- Upgraded to `shell@2.0.0-rc.3`
|
||||
- Upgraded to `updater@2.0.0-rc.2`
|
||||
|
||||
## \[2.0.0-rc.1]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `barcode-scanner@2.0.0-rc.2`
|
||||
- Upgraded to `biometric@2.0.0-rc.2`
|
||||
- Upgraded to `clipboard-manager@2.0.0-rc.2`
|
||||
- Upgraded to `dialog@2.0.0-rc.2`
|
||||
- Upgraded to `log-plugin@2.0.0-rc.1`
|
||||
- Upgraded to `nfc@2.0.0-rc.2`
|
||||
- Upgraded to `notification@2.0.0-rc.2`
|
||||
- Upgraded to `shell@2.0.0-rc.2`
|
||||
|
||||
## \[2.0.0-rc.0]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `dialog@2.0.0-rc.1`
|
||||
- Upgraded to `updater@2.0.0-rc.1`
|
||||
- Upgraded to `barcode-scanner@2.0.0-rc.1`
|
||||
- Upgraded to `clipboard-manager@2.0.0-rc.1`
|
||||
- Upgraded to `global-shortcut@2.0.0-rc.1`
|
||||
- Upgraded to `biometric@2.0.0-rc.1`
|
||||
- Upgraded to `nfc@2.0.0-rc.1`
|
||||
- Upgraded to `notification@2.0.0-rc.1`
|
||||
- Upgraded to `shell@2.0.0-rc.1`
|
||||
|
||||
## \[2.0.0-beta.17]
|
||||
|
||||
### Dependencies
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "api"
|
||||
publish = false
|
||||
version = "2.0.0-beta.17"
|
||||
version = "2.0.6"
|
||||
description = "An example Tauri Application showcasing the api"
|
||||
edition = "2021"
|
||||
rust-version = { workspace = true }
|
||||
@@ -19,21 +19,23 @@ serde_json = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
tiny_http = "0.12"
|
||||
log = { workspace = true }
|
||||
tauri-plugin-log = { path = "../../../plugins/log", version = "2.0.0-rc.0" }
|
||||
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.0.0-rc.0", features = [
|
||||
tauri-plugin-log = { path = "../../../plugins/log", version = "2.0.3" }
|
||||
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.1.0", features = [
|
||||
"watch",
|
||||
] }
|
||||
tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.0.0-rc.0" }
|
||||
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.0.0-rc.0" }
|
||||
tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.0.2" }
|
||||
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.0.4" }
|
||||
tauri-plugin-http = { path = "../../../plugins/http", features = [
|
||||
"multipart",
|
||||
], version = "2.0.0-rc.0" }
|
||||
tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.0.0-rc.0", features = [
|
||||
], version = "2.0.4" }
|
||||
tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.0.1", features = [
|
||||
"windows7-compat",
|
||||
] }
|
||||
tauri-plugin-os = { path = "../../../plugins/os", version = "2.0.0-rc.0" }
|
||||
tauri-plugin-process = { path = "../../../plugins/process", version = "2.0.0-rc.0" }
|
||||
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-rc.0" }
|
||||
tauri-plugin-os = { path = "../../../plugins/os", version = "2.0.1" }
|
||||
tauri-plugin-process = { path = "../../../plugins/process", version = "2.0.1" }
|
||||
tauri-plugin-opener = { path = "../../../plugins/opener", version = "2.0.0" }
|
||||
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.2" }
|
||||
tauri-plugin-store = { path = "../../../plugins/store", version = "2.1.0" }
|
||||
|
||||
[dependencies.tauri]
|
||||
workspace = true
|
||||
@@ -49,17 +51,17 @@ features = [
|
||||
]
|
||||
|
||||
[target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
|
||||
tauri-plugin-cli = { path = "../../../plugins/cli", version = "2.0.0-rc.0" }
|
||||
tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", version = "2.0.0-rc.0" }
|
||||
tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.0.0-rc.0" }
|
||||
tauri-plugin-cli = { path = "../../../plugins/cli", version = "2.0.1" }
|
||||
tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", version = "2.0.1" }
|
||||
tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.1.0" }
|
||||
tauri-plugin-window-state = { path = "../../../plugins/window-state", version = "2.0.0" }
|
||||
|
||||
[target."cfg(any(target_os = \"android\", target_os = \"ios\"))".dependencies]
|
||||
tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.0.0-rc.0" }
|
||||
tauri-plugin-nfc = { path = "../../../plugins/nfc", version = "2.0.0-rc.0" }
|
||||
tauri-plugin-biometric = { path = "../../../plugins/biometric/", version = "2.0.0-rc.0" }
|
||||
|
||||
[target."cfg(target_os = \"windows\")".dependencies]
|
||||
window-shadows = "0.2"
|
||||
tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.0.1" }
|
||||
tauri-plugin-nfc = { path = "../../../plugins/nfc", version = "2.0.1" }
|
||||
tauri-plugin-biometric = { path = "../../../plugins/biometric/", version = "2.0.1" }
|
||||
tauri-plugin-geolocation = { path = "../../../plugins/geolocation/", version = "2.0.1" }
|
||||
tauri-plugin-haptics = { path = "../../../plugins/haptics/", version = "2.0.1" }
|
||||
|
||||
[features]
|
||||
prod = ["tauri/custom-protocol"]
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string>Request camera access for WebRTC</string>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
<string>Request microphone access for WebRTC</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string>Request camera access for WebRTC</string>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
<string>Request microphone access for WebRTC</string>
|
||||
<key>NSFaceIDUsageDescription</key>
|
||||
<string>Authenticate with biometrics</string>
|
||||
<key>NFCReaderUsageDescription</key>
|
||||
<string>Read and write to NFC tags for testing</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
"$schema": "../gen/schemas/desktop-schema.json",
|
||||
"identifier": "run-app-base",
|
||||
"description": "Base permissions to run the app",
|
||||
"windows": [
|
||||
"main"
|
||||
],
|
||||
"windows": ["main"],
|
||||
"permissions": [
|
||||
"log:default",
|
||||
{
|
||||
@@ -55,6 +53,7 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"shell:allow-open",
|
||||
"shell:allow-kill",
|
||||
"shell:allow-stdin-write",
|
||||
"process:allow-exit",
|
||||
@@ -63,6 +62,9 @@
|
||||
"clipboard-manager:allow-write-text",
|
||||
"clipboard-manager:allow-read-image",
|
||||
"clipboard-manager:allow-write-image",
|
||||
"fs:allow-open",
|
||||
"fs:allow-write",
|
||||
"fs:allow-read",
|
||||
"fs:allow-rename",
|
||||
"fs:allow-mkdir",
|
||||
"fs:allow-remove",
|
||||
@@ -76,9 +78,13 @@
|
||||
"path": "$APPDATA/db/**"
|
||||
}
|
||||
],
|
||||
"deny": [
|
||||
"$APPDATA/db/*.stronghold"
|
||||
]
|
||||
"deny": ["$APPDATA/db/*.stronghold"]
|
||||
},
|
||||
"store:default",
|
||||
"opener:default",
|
||||
{
|
||||
"identifier": "opener:allow-open-path",
|
||||
"allow": [{ "path": "$APPDATA" }, { "path": "$APPDATA/**" }]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
"updater:default",
|
||||
"global-shortcut:allow-unregister",
|
||||
"global-shortcut:allow-register",
|
||||
"global-shortcut:allow-unregister-all"
|
||||
"global-shortcut:allow-unregister-all",
|
||||
{ "identifier": "fs:allow-watch", "allow": ["*", "**/*"] },
|
||||
"fs:allow-unwatch"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -11,6 +11,14 @@
|
||||
"barcode-scanner:allow-scan",
|
||||
"barcode-scanner:allow-cancel",
|
||||
"barcode-scanner:allow-request-permissions",
|
||||
"barcode-scanner:allow-check-permissions"
|
||||
"barcode-scanner:allow-check-permissions",
|
||||
"geolocation:allow-check-permissions",
|
||||
"geolocation:allow-request-permissions",
|
||||
"geolocation:allow-watch-position",
|
||||
"geolocation:allow-get-current-position",
|
||||
"haptics:allow-impact-feedback",
|
||||
"haptics:allow-notification-feedback",
|
||||
"haptics:allow-selection-feedback",
|
||||
"haptics:allow-vibrate"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
@@ -18,7 +19,7 @@
|
||||
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$USER_HOME$/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-2.0.0-beta.22/mobile/android" />
|
||||
<option value="$USER_HOME$/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-2.0.2/mobile/android" />
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
<option value="$PROJECT_DIR$/buildSrc" />
|
||||
@@ -26,6 +27,9 @@
|
||||
<option value="$PROJECT_DIR$/../../../../../plugins/biometric/android" />
|
||||
<option value="$PROJECT_DIR$/../../../../../plugins/clipboard-manager/android" />
|
||||
<option value="$PROJECT_DIR$/../../../../../plugins/dialog/android" />
|
||||
<option value="$PROJECT_DIR$/../../../../../plugins/fs/android" />
|
||||
<option value="$PROJECT_DIR$/../../../../../plugins/geolocation/android" />
|
||||
<option value="$PROJECT_DIR$/../../../../../plugins/haptics/android" />
|
||||
<option value="$PROJECT_DIR$/../../../../../plugins/nfc/android" />
|
||||
<option value="$PROJECT_DIR$/../../../../../plugins/notification/android" />
|
||||
<option value="$PROJECT_DIR$/../../../../../plugins/shell/android" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="KotlinJpsPluginSettings">
|
||||
<option name="version" value="1.9.10" />
|
||||
<option name="version" value="1.9.25" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -1,4 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
|
||||
|
||||
@@ -48,6 +48,9 @@ android {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
buildFeatures {
|
||||
buildConfig = true
|
||||
}
|
||||
}
|
||||
|
||||
rust {
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<!-- AndroidTV support -->
|
||||
<uses-feature android:name="android.software.leanback" android:required="false" />
|
||||
|
||||
<application
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
@@ -15,6 +19,8 @@
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<!-- AndroidTV support -->
|
||||
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
|
||||
</intent-filter>
|
||||
<!-- NFC PLUGIN. AUTO-GENERATED. DO NOT REMOVE. -->
|
||||
<intent-filter>
|
||||
|
||||
@@ -4,8 +4,8 @@ buildscript {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath("com.android.tools.build:gradle:8.3.2")
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21")
|
||||
classpath("com.android.tools.build:gradle:8.5.1")
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,6 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
compileOnly(gradleApi())
|
||||
implementation("com.android.tools.build:gradle:8.3.2")
|
||||
implementation("com.android.tools.build:gradle:8.5.1")
|
||||
}
|
||||
|
||||
|
||||
@@ -21,5 +21,4 @@ kotlin.code.style=official
|
||||
# resources declared in the library itself and none from the library's dependencies,
|
||||
# thereby reducing the size of the R class for that library
|
||||
android.nonTransitiveRClass=true
|
||||
android.defaults.buildfeatures.buildconfig=true
|
||||
android.nonFinalResIds=false
|
||||
@@ -1,6 +1,6 @@
|
||||
#Tue May 10 19:22:52 CST 2022
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
|
||||
|
Before Width: | Height: | Size: 844 B After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 152 KiB After Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 10 KiB |
@@ -3,6 +3,6 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>method</key>
|
||||
<string>development</string>
|
||||
<string>debugging</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17150" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17122"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="s0d-6b-0kx">
|
||||
<objects>
|
||||
<viewController id="Y6W-OH-hqX" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="5EZ-qb-Rvc">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<viewLayoutGuide key="safeArea" id="vDu-zF-Fre"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="Ief-a0-LHa" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
@@ -3,16 +3,17 @@
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 51;
|
||||
objectVersion = 56;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
2ECFC1BC47D948875C8CEC41 /* libapi.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FC53D4128D7F74E4E6338455 /* libapi.a */; };
|
||||
3043432501C9BC2DB6B4CB95 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 71EB788DE4662CFC0D97F567 /* CoreGraphics.framework */; };
|
||||
328B4ADB3700C1873BEB7B10 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = 90D3B673AFAB8D8AB561F616 /* main.mm */; };
|
||||
6F379F15DA085785BA2624D4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6B7E79E23E646BA7968B457C /* Assets.xcassets */; };
|
||||
832F9A55FEDEF3D807D8C40A /* libapp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 248286BAA086BB1A5F98B2B2 /* libapp.a */; };
|
||||
9AADB041D25772D04E543F15 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 62601E25FA39E62BE119B74D /* Metal.framework */; };
|
||||
9DDA3BE70DD0E4013973FE38 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6082E363D51372A7658C351 /* UIKit.framework */; };
|
||||
AC8BDC2C7A63FA3FDC5967F4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4B2D1B108AE002010BDEC6D2 /* LaunchScreen.storyboard */; };
|
||||
AFA0CA286325FD7A34968CA2 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 384966E551417F94A02D2706 /* Security.framework */; };
|
||||
B60763BD194DFACA215EC7DA /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC377692DC31A070A0188C9D /* QuartzCore.framework */; };
|
||||
C6D80743F168BDF017B7769E /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 59CFE20DCF760BE67D9CE3D6 /* WebKit.framework */; };
|
||||
@@ -21,25 +22,26 @@
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
0E96CE07CD20273DD46BF325 /* main.rs */ = {isa = PBXFileReference; path = main.rs; sourceTree = "<group>"; };
|
||||
1C1AB1B414CA2795AFBEDDB9 /* tray.rs */ = {isa = PBXFileReference; path = tray.rs; sourceTree = "<group>"; };
|
||||
0E96CE07CD20273DD46BF325 /* main.rs */ = {isa = PBXFileReference; lastKnownFileType = text; path = main.rs; sourceTree = "<group>"; };
|
||||
1C1AB1B414CA2795AFBEDDB9 /* tray.rs */ = {isa = PBXFileReference; lastKnownFileType = text; path = tray.rs; sourceTree = "<group>"; };
|
||||
248286BAA086BB1A5F98B2B2 /* libapp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libapp.a; sourceTree = "<group>"; };
|
||||
2F63E2AA460089BB58D40C79 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||
338E66700FD330B99D434DD7 /* MetalKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MetalKit.framework; path = System/Library/Frameworks/MetalKit.framework; sourceTree = SDKROOT; };
|
||||
384966E551417F94A02D2706 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
|
||||
4B2D1B108AE002010BDEC6D2 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
59CFE20DCF760BE67D9CE3D6 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
|
||||
5AC703CEBA41A121596066F3 /* api_iOS.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = api_iOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
5AC703CEBA41A121596066F3 /* Tauri API.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Tauri API.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
62601E25FA39E62BE119B74D /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; };
|
||||
6B7E79E23E646BA7968B457C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
71EB788DE4662CFC0D97F567 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
|
||||
74A8FDFB350B966F5AAD4A24 /* assets */ = {isa = PBXFileReference; lastKnownFileType = folder; path = assets; sourceTree = SOURCE_ROOT; };
|
||||
785D025E9542F7E098BF22B5 /* lib.rs */ = {isa = PBXFileReference; path = lib.rs; sourceTree = "<group>"; };
|
||||
785D025E9542F7E098BF22B5 /* lib.rs */ = {isa = PBXFileReference; lastKnownFileType = text; path = lib.rs; sourceTree = "<group>"; };
|
||||
879941AE3DAA14534BBC6391 /* api_iOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = api_iOS.entitlements; sourceTree = "<group>"; };
|
||||
90D3B673AFAB8D8AB561F616 /* main.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = "<group>"; };
|
||||
B6082E363D51372A7658C351 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
|
||||
DC377692DC31A070A0188C9D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
|
||||
EC8C7948C50C3C9B5D96CB61 /* bindings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = bindings.h; sourceTree = "<group>"; };
|
||||
F835F52713CE8F029D5D252C /* cmd.rs */ = {isa = PBXFileReference; path = cmd.rs; sourceTree = "<group>"; };
|
||||
FC53D4128D7F74E4E6338455 /* libapi.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libapi.a; sourceTree = "<group>"; };
|
||||
F835F52713CE8F029D5D252C /* cmd.rs */ = {isa = PBXFileReference; lastKnownFileType = text; path = cmd.rs; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -47,7 +49,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2ECFC1BC47D948875C8CEC41 /* libapi.a in Frameworks */,
|
||||
832F9A55FEDEF3D807D8C40A /* libapp.a in Frameworks */,
|
||||
3043432501C9BC2DB6B4CB95 /* CoreGraphics.framework in Frameworks */,
|
||||
9AADB041D25772D04E543F15 /* Metal.framework in Frameworks */,
|
||||
DFFF888045C8D9D9FB69E8FD /* MetalKit.framework in Frameworks */,
|
||||
@@ -66,6 +68,7 @@
|
||||
children = (
|
||||
74A8FDFB350B966F5AAD4A24 /* assets */,
|
||||
6B7E79E23E646BA7968B457C /* Assets.xcassets */,
|
||||
4B2D1B108AE002010BDEC6D2 /* LaunchScreen.storyboard */,
|
||||
F2116A6428EED18BE2A07E2B /* api_iOS */,
|
||||
86D903732E10FAC4D300E8DF /* Externals */,
|
||||
7A9A7AC155D9E22E54D6D847 /* Sources */,
|
||||
@@ -87,7 +90,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
71EB788DE4662CFC0D97F567 /* CoreGraphics.framework */,
|
||||
FC53D4128D7F74E4E6338455 /* libapi.a */,
|
||||
248286BAA086BB1A5F98B2B2 /* libapp.a */,
|
||||
62601E25FA39E62BE119B74D /* Metal.framework */,
|
||||
338E66700FD330B99D434DD7 /* MetalKit.framework */,
|
||||
DC377692DC31A070A0188C9D /* QuartzCore.framework */,
|
||||
@@ -101,7 +104,7 @@
|
||||
4AC51E67B71E27F15B02C5CD /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5AC703CEBA41A121596066F3 /* api_iOS.app */,
|
||||
5AC703CEBA41A121596066F3 /* Tauri API.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -169,7 +172,7 @@
|
||||
);
|
||||
name = api_iOS;
|
||||
productName = api_iOS;
|
||||
productReference = 5AC703CEBA41A121596066F3 /* api_iOS.app */;
|
||||
productReference = 5AC703CEBA41A121596066F3 /* Tauri API.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
@@ -178,7 +181,8 @@
|
||||
9BC88C3717DA5D4B78A51C15 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1200;
|
||||
BuildIndependentTargetsInParallel = YES;
|
||||
LastUpgradeCheck = 1430;
|
||||
TargetAttributes = {
|
||||
54DC6E273C78071F3BA12EF3 = {
|
||||
DevelopmentTeam = Q93MBH6S2F;
|
||||
@@ -186,7 +190,7 @@
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 8FA67D0F928A09CD639137D1 /* Build configuration list for PBXProject "api" */;
|
||||
compatibilityVersion = "Xcode 11.0";
|
||||
compatibilityVersion = "Xcode 14.0";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
@@ -208,6 +212,7 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
6F379F15DA085785BA2624D4 /* Assets.xcassets in Resources */,
|
||||
AC8BDC2C7A63FA3FDC5967F4 /* LaunchScreen.storyboard in Resources */,
|
||||
F86717F05E27C72C9FA1FB27 /* assets in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@@ -229,12 +234,13 @@
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(SRCROOT)/target/aarch64-apple-ios/${CONFIGURATION}/deps/libapi.a",
|
||||
"$(SRCROOT)/target/x86_64-apple-ios/${CONFIGURATION}/deps/libapi.a",
|
||||
"$(SRCROOT)/Externals/x86_64/${CONFIGURATION}/libapp.a",
|
||||
"$(SRCROOT)/Externals/arm64/${CONFIGURATION}/libapp.a",
|
||||
"$(SRCROOT)/Externals/arm64-sim/${CONFIGURATION}/libapp.a",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "node ../../../node_modules/.bin/../@tauri-apps/cli/tauri.js ios xcode-script -v --platform ${PLATFORM_DISPLAY_NAME:?} --sdk-root ${SDKROOT:?} --framework-search-paths \"${FRAMEWORK_SEARCH_PATHS:?}\" --header-search-paths \"${HEADER_SEARCH_PATHS:?}\" --gcc-preprocessor-definitions \"${GCC_PREPROCESSOR_DEFINITIONS:-}\" --configuration ${CONFIGURATION:?} ${FORCE_COLOR} ${ARCHS:?}";
|
||||
shellScript = "pnpm tauri ios xcode-script -v --platform ${PLATFORM_DISPLAY_NAME:?} --sdk-root ${SDKROOT:?} --framework-search-paths \"${FRAMEWORK_SEARCH_PATHS:?}\" --header-search-paths \"${HEADER_SEARCH_PATHS:?}\" --gcc-preprocessor-definitions \"${GCC_PREPROCESSOR_DEFINITIONS:-}\" --configuration ${CONFIGURATION:?} ${FORCE_COLOR} ${ARCHS:?}";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
@@ -380,20 +386,42 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = api_iOS/api_iOS.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = Q93MBH6S2F;
|
||||
ENABLE_BITCODE = NO;
|
||||
"EXCLUDED_ARCHS[sdk=iphoneos*]" = "arm64-sim x86_64";
|
||||
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\".\"",
|
||||
);
|
||||
INFOPLIST_FILE = api_iOS/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
"LIBRARY_SEARCH_PATHS[arch=arm64-sim]" = "$(inherited) $(PROJECT_DIR)/Externals/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
|
||||
"LIBRARY_SEARCH_PATHS[arch=arm64]" = "$(inherited) $(PROJECT_DIR)/Externals/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
|
||||
"LIBRARY_SEARCH_PATHS[arch=x86_64]" = "$(inherited) $(PROJECT_DIR)/Externals/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
|
||||
"LIBRARY_SEARCH_PATHS[arch=arm64-sim]" = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Externals/arm64-sim/$(CONFIGURATION)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)",
|
||||
"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)",
|
||||
);
|
||||
"LIBRARY_SEARCH_PATHS[arch=arm64]" = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)",
|
||||
"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)",
|
||||
);
|
||||
"LIBRARY_SEARCH_PATHS[arch=x86_64]" = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Externals/x86_64/$(CONFIGURATION)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)",
|
||||
"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.tauri.api;
|
||||
PRODUCT_NAME = "Tauri API";
|
||||
SDKROOT = iphoneos;
|
||||
@@ -413,20 +441,42 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = api_iOS/api_iOS.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = Q93MBH6S2F;
|
||||
ENABLE_BITCODE = NO;
|
||||
"EXCLUDED_ARCHS[sdk=iphoneos*]" = "arm64-sim x86_64";
|
||||
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\".\"",
|
||||
);
|
||||
INFOPLIST_FILE = api_iOS/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
"LIBRARY_SEARCH_PATHS[arch=arm64-sim]" = "$(inherited) $(PROJECT_DIR)/Externals/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
|
||||
"LIBRARY_SEARCH_PATHS[arch=arm64]" = "$(inherited) $(PROJECT_DIR)/Externals/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
|
||||
"LIBRARY_SEARCH_PATHS[arch=x86_64]" = "$(inherited) $(PROJECT_DIR)/Externals/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
|
||||
"LIBRARY_SEARCH_PATHS[arch=arm64-sim]" = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Externals/arm64-sim/$(CONFIGURATION)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)",
|
||||
"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)",
|
||||
);
|
||||
"LIBRARY_SEARCH_PATHS[arch=arm64]" = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)",
|
||||
"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)",
|
||||
);
|
||||
"LIBRARY_SEARCH_PATHS[arch=x86_64]" = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Externals/x86_64/$(CONFIGURATION)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)",
|
||||
"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.tauri.api;
|
||||
PRODUCT_NAME = "Tauri API";
|
||||
SDKROOT = iphoneos;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1200"
|
||||
LastUpgradeVersion = "1430"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NFCReaderUsageDescription</key>
|
||||
<string>NFC Test</string>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string>Request camera access for WebRTC</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
@@ -45,8 +41,12 @@
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>NSFaceIDUsageDescription</key>
|
||||
<string>Biometric Test</string>
|
||||
<string>Authenticate with biometrics</string>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string>Request camera access for WebRTC</string>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
<string>Request microphone access for WebRTC</string>
|
||||
<key>NFCReaderUsageDescription</key>
|
||||
<string>Read and write to NFC tags for testing</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -5,7 +5,6 @@
|
||||
<key>com.apple.developer.nfc.readersession.formats</key>
|
||||
<array>
|
||||
<string>TAG</string>
|
||||
<string>NDEF</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
name: api
|
||||
options:
|
||||
bundleIdPrefix: com.tauri
|
||||
bundleIdPrefix: com.tauri.api
|
||||
deploymentTarget:
|
||||
iOS: 13.0
|
||||
iOS: 14.0
|
||||
fileGroups: [../../src]
|
||||
configs:
|
||||
debug: debug
|
||||
@@ -36,6 +36,7 @@ targets:
|
||||
- path: assets
|
||||
buildPhase: resources
|
||||
type: folder
|
||||
- path: LaunchScreen.storyboard
|
||||
info:
|
||||
path: api_iOS/Info.plist
|
||||
properties:
|
||||
@@ -63,14 +64,16 @@ targets:
|
||||
base:
|
||||
ENABLE_BITCODE: false
|
||||
ARCHS: [arm64, arm64-sim]
|
||||
VALID_ARCHS: arm64 arm64-sim
|
||||
LIBRARY_SEARCH_PATHS[arch=x86_64]: $(inherited) $(PROJECT_DIR)/Externals/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
|
||||
LIBRARY_SEARCH_PATHS[arch=arm64]: $(inherited) $(PROJECT_DIR)/Externals/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
|
||||
LIBRARY_SEARCH_PATHS[arch=arm64-sim]: $(inherited) $(PROJECT_DIR)/Externals/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
|
||||
VALID_ARCHS: arm64 arm64-sim
|
||||
LIBRARY_SEARCH_PATHS[arch=x86_64]: $(inherited) $(PROJECT_DIR)/Externals/x86_64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
|
||||
LIBRARY_SEARCH_PATHS[arch=arm64]: $(inherited) $(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
|
||||
LIBRARY_SEARCH_PATHS[arch=arm64-sim]: $(inherited) $(PROJECT_DIR)/Externals/arm64-sim/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES: true
|
||||
EXCLUDED_ARCHS[sdk=iphonesimulator*]: arm64
|
||||
EXCLUDED_ARCHS[sdk=iphoneos*]: arm64-sim x86_64
|
||||
groups: [app]
|
||||
dependencies:
|
||||
- framework: libapi.a
|
||||
- framework: libapp.a
|
||||
embed: false
|
||||
- sdk: CoreGraphics.framework
|
||||
- sdk: Metal.framework
|
||||
@@ -80,9 +83,10 @@ targets:
|
||||
- sdk: UIKit.framework
|
||||
- sdk: WebKit.framework
|
||||
preBuildScripts:
|
||||
- script: node ../../../node_modules/.bin/../@tauri-apps/cli/tauri.js ios xcode-script -v --platform ${PLATFORM_DISPLAY_NAME:?} --sdk-root ${SDKROOT:?} --framework-search-paths "${FRAMEWORK_SEARCH_PATHS:?}" --header-search-paths "${HEADER_SEARCH_PATHS:?}" --gcc-preprocessor-definitions "${GCC_PREPROCESSOR_DEFINITIONS:-}" --configuration ${CONFIGURATION:?} ${FORCE_COLOR} ${ARCHS:?}
|
||||
- script: pnpm tauri ios xcode-script -v --platform ${PLATFORM_DISPLAY_NAME:?} --sdk-root ${SDKROOT:?} --framework-search-paths "${FRAMEWORK_SEARCH_PATHS:?}" --header-search-paths "${HEADER_SEARCH_PATHS:?}" --gcc-preprocessor-definitions "${GCC_PREPROCESSOR_DEFINITIONS:-}" --configuration ${CONFIGURATION:?} ${FORCE_COLOR} ${ARCHS:?}
|
||||
name: Build Rust Code
|
||||
basedOnDependencyAnalysis: false
|
||||
outputFiles:
|
||||
- $(SRCROOT)/target/aarch64-apple-ios/${CONFIGURATION}/deps/libapi.a
|
||||
- $(SRCROOT)/target/x86_64-apple-ios/${CONFIGURATION}/deps/libapi.a
|
||||
- $(SRCROOT)/Externals/x86_64/${CONFIGURATION}/libapp.a
|
||||
- $(SRCROOT)/Externals/arm64/${CONFIGURATION}/libapp.a
|
||||
- $(SRCROOT)/Externals/arm64-sim/${CONFIGURATION}/libapp.a
|
||||
|
||||
@@ -36,7 +36,9 @@ pub fn run() {
|
||||
.plugin(tauri_plugin_notification::init())
|
||||
.plugin(tauri_plugin_os::init())
|
||||
.plugin(tauri_plugin_process::init())
|
||||
.plugin(tauri_plugin_opener::init())
|
||||
.plugin(tauri_plugin_shell::init())
|
||||
.plugin(tauri_plugin_store::Builder::default().build())
|
||||
.setup(move |app| {
|
||||
#[cfg(desktop)]
|
||||
{
|
||||
@@ -44,6 +46,8 @@ pub fn run() {
|
||||
app.handle().plugin(tauri_plugin_cli::init())?;
|
||||
app.handle()
|
||||
.plugin(tauri_plugin_global_shortcut::Builder::new().build())?;
|
||||
app.handle()
|
||||
.plugin(tauri_plugin_window_state::Builder::new().build())?;
|
||||
app.handle()
|
||||
.plugin(tauri_plugin_updater::Builder::new().build())?;
|
||||
}
|
||||
@@ -52,6 +56,8 @@ pub fn run() {
|
||||
app.handle().plugin(tauri_plugin_barcode_scanner::init())?;
|
||||
app.handle().plugin(tauri_plugin_nfc::init())?;
|
||||
app.handle().plugin(tauri_plugin_biometric::init())?;
|
||||
app.handle().plugin(tauri_plugin_geolocation::init())?;
|
||||
app.handle().plugin(tauri_plugin_haptics::init())?;
|
||||
}
|
||||
|
||||
let mut webview_window_builder =
|
||||
@@ -63,7 +69,7 @@ pub fn run() {
|
||||
.title("Tauri API Validation")
|
||||
.inner_size(1000., 800.)
|
||||
.min_inner_size(600., 400.)
|
||||
.content_protected(true);
|
||||
.visible(false);
|
||||
}
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../node_modules/@tauri-apps/cli/schema.json",
|
||||
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
||||
"productName": "Tauri API",
|
||||
"version": "2.0.0",
|
||||
"identifier": "com.tauri.api",
|
||||
@@ -100,6 +100,9 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"iOS": {
|
||||
"minimumSystemVersion": "14.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,200 +1,222 @@
|
||||
<script>
|
||||
import { writable } from "svelte/store";
|
||||
import { open } from "@tauri-apps/plugin-shell";
|
||||
import { getCurrentWindow } from "@tauri-apps/api/window";
|
||||
import { getCurrentWebview } from "@tauri-apps/api/webview";
|
||||
import * as os from "@tauri-apps/plugin-os";
|
||||
import { writable } from 'svelte/store'
|
||||
import { getCurrentWindow } from '@tauri-apps/api/window'
|
||||
import { getCurrentWebview } from '@tauri-apps/api/webview'
|
||||
import * as os from '@tauri-apps/plugin-os'
|
||||
|
||||
import Welcome from "./views/Welcome.svelte";
|
||||
import Cli from "./views/Cli.svelte";
|
||||
import Communication from "./views/Communication.svelte";
|
||||
import Dialog from "./views/Dialog.svelte";
|
||||
import FileSystem from "./views/FileSystem.svelte";
|
||||
import Http from "./views/Http.svelte";
|
||||
import Notifications from "./views/Notifications.svelte";
|
||||
import Shortcuts from "./views/Shortcuts.svelte";
|
||||
import Shell from "./views/Shell.svelte";
|
||||
import Updater from "./views/Updater.svelte";
|
||||
import Clipboard from "./views/Clipboard.svelte";
|
||||
import WebRTC from "./views/WebRTC.svelte";
|
||||
import Scanner from "./views/Scanner.svelte";
|
||||
import Biometric from "./views/Biometric.svelte";
|
||||
import Welcome from './views/Welcome.svelte'
|
||||
import Cli from './views/Cli.svelte'
|
||||
import Communication from './views/Communication.svelte'
|
||||
import Dialog from './views/Dialog.svelte'
|
||||
import FileSystem from './views/FileSystem.svelte'
|
||||
import Http from './views/Http.svelte'
|
||||
import Notifications from './views/Notifications.svelte'
|
||||
import Shortcuts from './views/Shortcuts.svelte'
|
||||
import Shell from './views/Shell.svelte'
|
||||
import Opener from './views/Opener.svelte'
|
||||
import Store from './views/Store.svelte'
|
||||
import Updater from './views/Updater.svelte'
|
||||
import Clipboard from './views/Clipboard.svelte'
|
||||
import WebRTC from './views/WebRTC.svelte'
|
||||
import Scanner from './views/Scanner.svelte'
|
||||
import Biometric from './views/Biometric.svelte'
|
||||
import Geolocation from './views/Geolocation.svelte'
|
||||
import Haptics from './views/Haptics.svelte'
|
||||
|
||||
import { onMount, tick } from "svelte";
|
||||
import { ask } from "@tauri-apps/plugin-dialog";
|
||||
import Nfc from "./views/Nfc.svelte";
|
||||
import { onMount, tick } from 'svelte'
|
||||
import { ask } from '@tauri-apps/plugin-dialog'
|
||||
import Nfc from './views/Nfc.svelte'
|
||||
|
||||
const appWindow = getCurrentWindow();
|
||||
const appWindow = getCurrentWindow()
|
||||
|
||||
if (appWindow.label !== "main") {
|
||||
if (appWindow.label !== 'main') {
|
||||
appWindow.onCloseRequested(async (event) => {
|
||||
const confirmed = await confirm("Are you sure?");
|
||||
const confirmed = await confirm('Are you sure?')
|
||||
if (!confirmed) {
|
||||
// user did not confirm closing the window; let's prevent it
|
||||
event.preventDefault();
|
||||
event.preventDefault()
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
getCurrentWebview().onDragDropEvent((event) => {
|
||||
onMessage(`File drop: ${JSON.stringify(event.payload)}`);
|
||||
});
|
||||
onMessage(`File drop: ${JSON.stringify(event.payload)}`)
|
||||
})
|
||||
|
||||
const userAgent = navigator.userAgent.toLowerCase();
|
||||
const isMobile =
|
||||
userAgent.includes("android") || userAgent.includes("iphone");
|
||||
const userAgent = navigator.userAgent.toLowerCase()
|
||||
const isMobile = userAgent.includes('android') || userAgent.includes('iphone')
|
||||
|
||||
const views = [
|
||||
{
|
||||
label: "Welcome",
|
||||
label: 'Welcome',
|
||||
component: Welcome,
|
||||
icon: "i-ph-hand-waving",
|
||||
icon: 'i-ph-hand-waving'
|
||||
},
|
||||
{
|
||||
label: "Communication",
|
||||
label: 'Communication',
|
||||
component: Communication,
|
||||
icon: "i-codicon-radio-tower",
|
||||
icon: 'i-codicon-radio-tower'
|
||||
},
|
||||
!isMobile && {
|
||||
label: "CLI",
|
||||
label: 'CLI',
|
||||
component: Cli,
|
||||
icon: "i-codicon-terminal",
|
||||
icon: 'i-codicon-terminal'
|
||||
},
|
||||
{
|
||||
label: "Dialog",
|
||||
label: 'Dialog',
|
||||
component: Dialog,
|
||||
icon: "i-codicon-multiple-windows",
|
||||
icon: 'i-codicon-multiple-windows'
|
||||
},
|
||||
{
|
||||
label: "File system",
|
||||
label: 'File system',
|
||||
component: FileSystem,
|
||||
icon: "i-codicon-files",
|
||||
icon: 'i-codicon-files'
|
||||
},
|
||||
{
|
||||
label: "HTTP",
|
||||
label: 'HTTP',
|
||||
component: Http,
|
||||
icon: "i-ph-globe-hemisphere-west",
|
||||
icon: 'i-ph-globe-hemisphere-west'
|
||||
},
|
||||
{
|
||||
label: "Notifications",
|
||||
label: 'Notifications',
|
||||
component: Notifications,
|
||||
icon: "i-codicon-bell-dot",
|
||||
icon: 'i-codicon-bell-dot'
|
||||
},
|
||||
!isMobile && {
|
||||
label: "Shortcuts",
|
||||
label: 'Shortcuts',
|
||||
component: Shortcuts,
|
||||
icon: "i-codicon-record-keys",
|
||||
icon: 'i-codicon-record-keys'
|
||||
},
|
||||
{
|
||||
label: "Shell",
|
||||
label: 'Shell',
|
||||
component: Shell,
|
||||
icon: "i-codicon-terminal-bash",
|
||||
icon: 'i-codicon-terminal-bash'
|
||||
},
|
||||
{
|
||||
label: 'Opener',
|
||||
component: Opener,
|
||||
icon: 'i-codicon-link-external'
|
||||
},
|
||||
{
|
||||
label: 'Store',
|
||||
component: Store,
|
||||
icon: 'i-codicon-file-code'
|
||||
},
|
||||
!isMobile && {
|
||||
label: "Updater",
|
||||
label: 'Updater',
|
||||
component: Updater,
|
||||
icon: "i-codicon-cloud-download",
|
||||
icon: 'i-codicon-cloud-download'
|
||||
},
|
||||
{
|
||||
label: "Clipboard",
|
||||
label: 'Clipboard',
|
||||
component: Clipboard,
|
||||
icon: "i-codicon-clippy",
|
||||
icon: 'i-codicon-clippy'
|
||||
},
|
||||
{
|
||||
label: "WebRTC",
|
||||
label: 'WebRTC',
|
||||
component: WebRTC,
|
||||
icon: "i-ph-broadcast",
|
||||
icon: 'i-ph-broadcast'
|
||||
},
|
||||
isMobile && {
|
||||
label: "Scanner",
|
||||
label: 'Scanner',
|
||||
component: Scanner,
|
||||
icon: "i-ph-scan",
|
||||
icon: 'i-ph-scan'
|
||||
},
|
||||
isMobile && {
|
||||
label: "NFC",
|
||||
label: 'NFC',
|
||||
component: Nfc,
|
||||
icon: "i-ph-nfc",
|
||||
icon: 'i-ph-nfc'
|
||||
},
|
||||
isMobile && {
|
||||
label: "Biometric",
|
||||
label: 'Biometric',
|
||||
component: Biometric,
|
||||
icon: "i-ph-scan",
|
||||
icon: 'i-ph-scan'
|
||||
},
|
||||
];
|
||||
isMobile && {
|
||||
label: 'Geolocation',
|
||||
component: Geolocation,
|
||||
icon: 'i-ph-map-pin'
|
||||
},
|
||||
isMobile && {
|
||||
label: 'Haptics',
|
||||
component: Haptics,
|
||||
icon: 'i-ph-vibrate'
|
||||
}
|
||||
]
|
||||
|
||||
let selected = views[0];
|
||||
let selected = views[0]
|
||||
function select(view) {
|
||||
selected = view;
|
||||
selected = view
|
||||
}
|
||||
|
||||
// Window controls
|
||||
let isWindowMaximized;
|
||||
let isWindowMaximized
|
||||
onMount(async () => {
|
||||
isWindowMaximized = await appWindow.isMaximized();
|
||||
isWindowMaximized = await appWindow.isMaximized()
|
||||
appWindow.onResized(async () => {
|
||||
isWindowMaximized = await appWindow.isMaximized();
|
||||
});
|
||||
});
|
||||
isWindowMaximized = await appWindow.isMaximized()
|
||||
})
|
||||
})
|
||||
|
||||
function minimize() {
|
||||
appWindow.minimize();
|
||||
appWindow.minimize()
|
||||
}
|
||||
|
||||
async function toggleMaximize() {
|
||||
(await appWindow.isMaximized())
|
||||
;(await appWindow.isMaximized())
|
||||
? appWindow.unmaximize()
|
||||
: appWindow.maximize();
|
||||
: appWindow.maximize()
|
||||
}
|
||||
|
||||
let confirmed_close = false;
|
||||
let confirmed_close = false
|
||||
async function close() {
|
||||
if (!confirmed_close) {
|
||||
confirmed_close = await ask(
|
||||
"Are you sure that you want to close this window?",
|
||||
'Are you sure that you want to close this window?',
|
||||
{
|
||||
title: "Tauri API",
|
||||
title: 'Tauri API'
|
||||
}
|
||||
);
|
||||
)
|
||||
if (confirmed_close) {
|
||||
appWindow.close();
|
||||
appWindow.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// dark/light
|
||||
let isDark;
|
||||
let isDark
|
||||
onMount(() => {
|
||||
isDark = localStorage && localStorage.getItem("theme") == "dark";
|
||||
applyTheme(isDark);
|
||||
});
|
||||
isDark = localStorage && localStorage.getItem('theme') == 'dark'
|
||||
applyTheme(isDark)
|
||||
})
|
||||
function applyTheme(isDark) {
|
||||
const html = document.querySelector("html");
|
||||
isDark ? html.classList.add("dark") : html.classList.remove("dark");
|
||||
localStorage && localStorage.setItem("theme", isDark ? "dark" : "");
|
||||
const html = document.querySelector('html')
|
||||
isDark ? html.classList.add('dark') : html.classList.remove('dark')
|
||||
localStorage && localStorage.setItem('theme', isDark ? 'dark' : '')
|
||||
}
|
||||
function toggleDark() {
|
||||
isDark = !isDark;
|
||||
applyTheme(isDark);
|
||||
isDark = !isDark
|
||||
applyTheme(isDark)
|
||||
}
|
||||
|
||||
// Console
|
||||
let messages = writable([]);
|
||||
let consoleTextEl;
|
||||
let messages = writable([])
|
||||
let consoleTextEl
|
||||
async function onMessage(value) {
|
||||
messages.update((r) => [
|
||||
...r,
|
||||
{
|
||||
html:
|
||||
`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> ` +
|
||||
(typeof value === "string" ? value : JSON.stringify(value, null, 1)) +
|
||||
"</pre>",
|
||||
},
|
||||
]);
|
||||
await tick();
|
||||
if (consoleTextEl) consoleTextEl.scrollTop = consoleTextEl.scrollHeight;
|
||||
(typeof value === 'string' ? value : JSON.stringify(value, null, 1)) +
|
||||
'</pre>'
|
||||
}
|
||||
])
|
||||
await tick()
|
||||
if (consoleTextEl) consoleTextEl.scrollTop = consoleTextEl.scrollHeight
|
||||
}
|
||||
|
||||
// this function is renders HTML without sanitizing it so it's insecure
|
||||
// this function renders HTML without sanitizing it so it's insecure
|
||||
// we only use it with our own input data
|
||||
async function insecureRenderHtml(html) {
|
||||
messages.update((r) => [
|
||||
@@ -203,111 +225,109 @@
|
||||
html:
|
||||
`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> ` +
|
||||
html +
|
||||
"</pre>",
|
||||
},
|
||||
]);
|
||||
await tick();
|
||||
if (consoleTextEl) consoleTextEl.scrollTop = consoleTextEl.scrollHeight;
|
||||
'</pre>'
|
||||
}
|
||||
])
|
||||
await tick()
|
||||
if (consoleTextEl) consoleTextEl.scrollTop = consoleTextEl.scrollHeight
|
||||
}
|
||||
|
||||
function clear() {
|
||||
messages.update(() => []);
|
||||
messages.update(() => [])
|
||||
}
|
||||
|
||||
let consoleEl, consoleH, cStartY;
|
||||
let minConsoleHeight = 50;
|
||||
let consoleEl, consoleH, cStartY
|
||||
let minConsoleHeight = 50
|
||||
function startResizingConsole(e) {
|
||||
cStartY = e.clientY;
|
||||
cStartY = e.clientY
|
||||
|
||||
const styles = window.getComputedStyle(consoleEl);
|
||||
consoleH = parseInt(styles.height, 10);
|
||||
const styles = window.getComputedStyle(consoleEl)
|
||||
consoleH = parseInt(styles.height, 10)
|
||||
|
||||
const moveHandler = (e) => {
|
||||
const dy = e.clientY - cStartY;
|
||||
const newH = consoleH - dy;
|
||||
const dy = e.clientY - cStartY
|
||||
const newH = consoleH - dy
|
||||
consoleEl.style.height = `${
|
||||
newH < minConsoleHeight ? minConsoleHeight : newH
|
||||
}px`;
|
||||
};
|
||||
}px`
|
||||
}
|
||||
const upHandler = () => {
|
||||
document.removeEventListener("mouseup", upHandler);
|
||||
document.removeEventListener("mousemove", moveHandler);
|
||||
};
|
||||
document.addEventListener("mouseup", upHandler);
|
||||
document.addEventListener("mousemove", moveHandler);
|
||||
document.removeEventListener('mouseup', upHandler)
|
||||
document.removeEventListener('mousemove', moveHandler)
|
||||
}
|
||||
document.addEventListener('mouseup', upHandler)
|
||||
document.addEventListener('mousemove', moveHandler)
|
||||
}
|
||||
|
||||
let isWindows;
|
||||
let isWindows
|
||||
onMount(async () => {
|
||||
isWindows = (await os.platform()) === "windows";
|
||||
});
|
||||
isWindows = (await os.platform()) === 'windows'
|
||||
})
|
||||
|
||||
// mobile
|
||||
let isSideBarOpen = false;
|
||||
let sidebar;
|
||||
let sidebarToggle;
|
||||
let isDraggingSideBar = false;
|
||||
let draggingStartPosX = 0;
|
||||
let draggingEndPosX = 0;
|
||||
const clamp = (min, num, max) => Math.min(Math.max(num, min), max);
|
||||
let isSideBarOpen = false
|
||||
let sidebar
|
||||
let sidebarToggle
|
||||
let isDraggingSideBar = false
|
||||
let draggingStartPosX = 0
|
||||
let draggingEndPosX = 0
|
||||
const clamp = (min, num, max) => Math.min(Math.max(num, min), max)
|
||||
|
||||
function toggleSidebar(sidebar, isSideBarOpen) {
|
||||
sidebar.style.setProperty(
|
||||
"--translate-x",
|
||||
`${isSideBarOpen ? "0" : "-18.75"}rem`
|
||||
);
|
||||
'--translate-x',
|
||||
`${isSideBarOpen ? '0' : '-18.75'}rem`
|
||||
)
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
sidebar = document.querySelector("#sidebar");
|
||||
sidebarToggle = document.querySelector("#sidebarToggle");
|
||||
sidebar = document.querySelector('#sidebar')
|
||||
sidebarToggle = document.querySelector('#sidebarToggle')
|
||||
|
||||
document.addEventListener("click", (e) => {
|
||||
document.addEventListener('click', (e) => {
|
||||
if (sidebarToggle.contains(e.target)) {
|
||||
isSideBarOpen = !isSideBarOpen;
|
||||
isSideBarOpen = !isSideBarOpen
|
||||
} else if (isSideBarOpen && !sidebar.contains(e.target)) {
|
||||
isSideBarOpen = false;
|
||||
isSideBarOpen = false
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
document.addEventListener("touchstart", (e) => {
|
||||
if (sidebarToggle.contains(e.target)) return;
|
||||
document.addEventListener('touchstart', (e) => {
|
||||
if (sidebarToggle.contains(e.target)) return
|
||||
|
||||
const x = e.touches[0].clientX;
|
||||
const x = e.touches[0].clientX
|
||||
if ((0 < x && x < 20 && !isSideBarOpen) || isSideBarOpen) {
|
||||
isDraggingSideBar = true;
|
||||
draggingStartPosX = x;
|
||||
isDraggingSideBar = true
|
||||
draggingStartPosX = x
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
document.addEventListener("touchmove", (e) => {
|
||||
document.addEventListener('touchmove', (e) => {
|
||||
if (isDraggingSideBar) {
|
||||
const x = e.touches[0].clientX;
|
||||
draggingEndPosX = x;
|
||||
const delta = (x - draggingStartPosX) / 10;
|
||||
const x = e.touches[0].clientX
|
||||
draggingEndPosX = x
|
||||
const delta = (x - draggingStartPosX) / 10
|
||||
sidebar.style.setProperty(
|
||||
"--translate-x",
|
||||
'--translate-x',
|
||||
`-${clamp(0, isSideBarOpen ? 0 - delta : 18.75 - delta, 18.75)}rem`
|
||||
);
|
||||
)
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
document.addEventListener("touchend", () => {
|
||||
document.addEventListener('touchend', () => {
|
||||
if (isDraggingSideBar) {
|
||||
const delta = (draggingEndPosX - draggingStartPosX) / 10;
|
||||
isSideBarOpen = isSideBarOpen
|
||||
? delta > -(18.75 / 2)
|
||||
: delta > 18.75 / 2;
|
||||
const delta = (draggingEndPosX - draggingStartPosX) / 10
|
||||
isSideBarOpen = isSideBarOpen ? delta > -(18.75 / 2) : delta > 18.75 / 2
|
||||
}
|
||||
|
||||
isDraggingSideBar = false;
|
||||
});
|
||||
});
|
||||
isDraggingSideBar = false
|
||||
})
|
||||
})
|
||||
|
||||
$: {
|
||||
const sidebar = document.querySelector("#sidebar");
|
||||
const sidebar = document.querySelector('#sidebar')
|
||||
if (sidebar) {
|
||||
toggleSidebar(sidebar, isSideBarOpen);
|
||||
toggleSidebar(sidebar, isSideBarOpen)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -325,42 +345,46 @@
|
||||
children:h-100% children:w-12 children:inline-flex
|
||||
children:items-center children:justify-center"
|
||||
>
|
||||
<span
|
||||
title={isDark ? "Switch to Light mode" : "Switch to Dark mode"}
|
||||
class="hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"
|
||||
<button
|
||||
aria-label="Toggle dark mode"
|
||||
title={isDark ? 'Switch to Light mode' : 'Switch to Dark mode'}
|
||||
class="bg-inherit border-none hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"
|
||||
on:click={toggleDark}
|
||||
>
|
||||
{#if isDark}
|
||||
<div class="i-ph-sun" />
|
||||
<div class="i-ph-sun"></div>
|
||||
{:else}
|
||||
<div class="i-ph-moon" />
|
||||
<div class="i-ph-moon"></div>
|
||||
{/if}
|
||||
</span>
|
||||
<span
|
||||
</button>
|
||||
<button
|
||||
aria-label="Minimize window"
|
||||
title="Minimize"
|
||||
class="hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"
|
||||
class="bg-inherit border-none hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"
|
||||
on:click={minimize}
|
||||
>
|
||||
<div class="i-codicon-chrome-minimize" />
|
||||
</span>
|
||||
<span
|
||||
title={isWindowMaximized ? "Restore" : "Maximize"}
|
||||
class="hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"
|
||||
<div class="i-codicon-chrome-minimize"></div>
|
||||
</button>
|
||||
<button
|
||||
aria-label="Maximize window"
|
||||
title={isWindowMaximized ? 'Restore' : 'Maximize'}
|
||||
class="bg-inherit border-none hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"
|
||||
on:click={toggleMaximize}
|
||||
>
|
||||
{#if isWindowMaximized}
|
||||
<div class="i-codicon-chrome-restore" />
|
||||
<div class="i-codicon-chrome-restore"></div>
|
||||
{:else}
|
||||
<div class="i-codicon-chrome-maximize" />
|
||||
<div class="i-codicon-chrome-maximize"></div>
|
||||
{/if}
|
||||
</span>
|
||||
<span
|
||||
</button>
|
||||
<button
|
||||
aria-label="Close window"
|
||||
title="Close"
|
||||
class="hover:bg-red-700 dark:hover:bg-red-700 hover:text-darkPrimaryText active:bg-red-700/90 dark:active:bg-red-700/90 active:text-darkPrimaryText"
|
||||
class="bg-inherit border-none hover:bg-red-700 dark:hover:bg-red-700 hover:text-darkPrimaryText active:bg-red-700/90 dark:active:bg-red-700/90 active:text-darkPrimaryText"
|
||||
on:click={close}
|
||||
>
|
||||
<div class="i-codicon-chrome-close" />
|
||||
</span>
|
||||
<div class="i-codicon-chrome-close"></div>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
{/if}
|
||||
@@ -368,13 +392,13 @@
|
||||
<!-- Sidebar toggle, only visible on small screens -->
|
||||
<div
|
||||
id="sidebarToggle"
|
||||
class="z-2000 sidebar-toggle display-none lt-sm:flex justify-center absolute items-center w-8 h-8 rd-8
|
||||
class="z-2000 sidebar-toggle hidden lt-sm:flex justify-center absolute items-center w-8 h-8 rd-8
|
||||
bg-accent dark:bg-darkAccent active:bg-accentDark dark:active:bg-darkAccentDark"
|
||||
>
|
||||
{#if isSideBarOpen}
|
||||
<span class="i-codicon-close animate-duration-300ms animate-fade-in" />
|
||||
<span class="i-codicon-close animate-duration-300ms animate-fade-in"></span>
|
||||
{:else}
|
||||
<span class="i-codicon-menu animate-duration-300ms animate-fade-in" />
|
||||
<span class="i-codicon-menu animate-duration-300ms animate-fade-in"></span>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -386,24 +410,21 @@
|
||||
class="lt-sm:h-screen lt-sm:shadow-lg lt-sm:shadow lt-sm:transition-transform lt-sm:absolute lt-sm:z-1999
|
||||
bg-darkPrimaryLighter transition-colors-250 overflow-hidden grid select-none px-2"
|
||||
>
|
||||
<img
|
||||
on:click={() => open("https://tauri.app/")}
|
||||
class="self-center p-7 cursor-pointer"
|
||||
src="tauri_logo.png"
|
||||
alt="Tauri logo"
|
||||
/>
|
||||
<a href="https://tauri.app" target="_blank">
|
||||
<img class="p-7" src="tauri_logo.png" alt="Tauri logo" />
|
||||
</a>
|
||||
{#if !isWindows}
|
||||
<a href="##" class="nv justify-between h-8" on:click={toggleDark}>
|
||||
{#if isDark}
|
||||
Switch to Light mode
|
||||
<div class="i-ph-sun" />
|
||||
<div class="i-ph-sun"></div>
|
||||
{:else}
|
||||
Switch to Dark mode
|
||||
<div class="i-ph-moon" />
|
||||
<div class="i-ph-moon"></div>
|
||||
{/if}
|
||||
</a>
|
||||
<br />
|
||||
<div class="bg-white/5 h-2px" />
|
||||
<div class="bg-white/5 h-2px"></div>
|
||||
<br />
|
||||
{/if}
|
||||
|
||||
@@ -413,7 +434,7 @@
|
||||
href="https://tauri.app/v1/guides/"
|
||||
>
|
||||
Documentation
|
||||
<span class="i-codicon-link-external" />
|
||||
<span class="i-codicon-link-external"></span>
|
||||
</a>
|
||||
<a
|
||||
class="nv justify-between h-8"
|
||||
@@ -421,7 +442,7 @@
|
||||
href="https://github.com/tauri-apps/tauri"
|
||||
>
|
||||
GitHub
|
||||
<span class="i-codicon-link-external" />
|
||||
<span class="i-codicon-link-external"></span>
|
||||
</a>
|
||||
<a
|
||||
class="nv justify-between h-8"
|
||||
@@ -429,10 +450,10 @@
|
||||
href="https://github.com/tauri-apps/tauri/tree/dev/examples/api"
|
||||
>
|
||||
Source
|
||||
<span class="i-codicon-link-external" />
|
||||
<span class="i-codicon-link-external"></span>
|
||||
</a>
|
||||
<br />
|
||||
<div class="bg-white/5 h-2px" />
|
||||
<div class="bg-white/5 h-2px"></div>
|
||||
<br />
|
||||
<div
|
||||
class="flex flex-col overflow-y-auto children-h-10 children-flex-none gap-1"
|
||||
@@ -443,11 +464,11 @@
|
||||
href="##"
|
||||
class="nv {selected === view ? 'nv_selected' : ''}"
|
||||
on:click={() => {
|
||||
select(view);
|
||||
isSideBarOpen = false;
|
||||
select(view)
|
||||
isSideBarOpen = false
|
||||
}}
|
||||
>
|
||||
<div class="{view.icon} mr-2" />
|
||||
<div class="{view.icon} mr-2"></div>
|
||||
<p>{view.label}</p></a
|
||||
>
|
||||
{/if}
|
||||
@@ -476,21 +497,23 @@
|
||||
id="console"
|
||||
class="select-none h-15rem grid grid-rows-[2px_2rem_1fr] gap-1 overflow-hidden"
|
||||
>
|
||||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||
<div
|
||||
on:mousedown={startResizingConsole}
|
||||
class="bg-black/20 h-2px cursor-ns-resize"
|
||||
/>
|
||||
></div>
|
||||
<div class="flex justify-between items-center px-2">
|
||||
<p class="font-semibold">Console</p>
|
||||
<div
|
||||
class="cursor-pointer h-85% rd-1 p-1 flex justify-center items-center
|
||||
<button
|
||||
aria-label="Clear Console"
|
||||
class="cursor-pointer h-85% rd-1 p-1 flex justify-center items-center border-none bg-inherit
|
||||
hover:bg-hoverOverlay dark:hover:bg-darkHoverOverlay
|
||||
active:bg-hoverOverlay/25 dark:active:bg-darkHoverOverlay/25
|
||||
"
|
||||
on:click={clear}
|
||||
>
|
||||
<div class="i-codicon-clear-all" />
|
||||
</div>
|
||||
<div class="i-codicon-clear-all"></div>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
bind:this={consoleTextEl}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
font-family: "Rubik", sans-serif;
|
||||
font-family: 'Rubik', sans-serif;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
|
||||
export function arrayBufferToBase64(buffer, callback) {
|
||||
const blob = new Blob([buffer], {
|
||||
type: "application/octet-binary",
|
||||
});
|
||||
const reader = new FileReader();
|
||||
type: 'application/octet-binary'
|
||||
})
|
||||
const reader = new FileReader()
|
||||
reader.onload = function (evt) {
|
||||
const dataurl = evt.target.result;
|
||||
callback(dataurl.substr(dataurl.indexOf(",") + 1));
|
||||
};
|
||||
reader.readAsDataURL(blob);
|
||||
const dataurl = evt.target.result
|
||||
callback(dataurl.substr(dataurl.indexOf(',') + 1))
|
||||
}
|
||||
reader.readAsDataURL(blob)
|
||||
}
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import "uno.css";
|
||||
import "./app.css";
|
||||
import App from "./App.svelte";
|
||||
import 'uno.css'
|
||||
import './app.css'
|
||||
import App from './App.svelte'
|
||||
import { mount } from 'svelte'
|
||||
|
||||
const app = new App({
|
||||
target: document.querySelector("#app"),
|
||||
});
|
||||
const app = mount(App, {
|
||||
target: document.querySelector('#app')
|
||||
})
|
||||
|
||||
export default app;
|
||||
export default app
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<script>
|
||||
import { getMatches } from "@tauri-apps/plugin-cli";
|
||||
import { getMatches } from '@tauri-apps/plugin-cli'
|
||||
|
||||
export let onMessage;
|
||||
export let onMessage
|
||||
|
||||
function cliMatches() {
|
||||
getMatches().then(onMessage).catch(onMessage);
|
||||
getMatches().then(onMessage).catch(onMessage)
|
||||
}
|
||||
</script>
|
||||
|
||||
<p>
|
||||
<div>
|
||||
This binary can be run from the terminal and takes the following arguments:
|
||||
<code class="code-block flex flex-wrap my-2">
|
||||
<pre>
|
||||
@@ -17,7 +17,7 @@
|
||||
--verbose</pre>
|
||||
</code>
|
||||
Additionally, it has a <code>update --background</code> subcommand.
|
||||
</p>
|
||||
</div>
|
||||
<br />
|
||||
<div class="note">
|
||||
Note that the arguments are only parsed, not implemented.
|
||||
|
||||
@@ -1,59 +1,59 @@
|
||||
<script>
|
||||
import * as clipboard from "@tauri-apps/plugin-clipboard-manager";
|
||||
import { open } from "@tauri-apps/plugin-dialog";
|
||||
import { arrayBufferToBase64 } from "../lib/utils";
|
||||
import { readFile } from "@tauri-apps/plugin-fs";
|
||||
import * as clipboard from '@tauri-apps/plugin-clipboard-manager'
|
||||
import { open } from '@tauri-apps/plugin-dialog'
|
||||
import { arrayBufferToBase64 } from '../lib/utils'
|
||||
import { readFile } from '@tauri-apps/plugin-fs'
|
||||
|
||||
export let onMessage;
|
||||
export let insecureRenderHtml;
|
||||
let text = "clipboard message";
|
||||
export let onMessage
|
||||
export let insecureRenderHtml
|
||||
let text = 'clipboard message'
|
||||
|
||||
function writeText() {
|
||||
clipboard
|
||||
.writeText(text)
|
||||
.then(() => {
|
||||
onMessage("Wrote to the clipboard");
|
||||
onMessage('Wrote to the clipboard')
|
||||
})
|
||||
.catch(onMessage);
|
||||
.catch(onMessage)
|
||||
}
|
||||
|
||||
async function writeImage() {
|
||||
try {
|
||||
const res = await open({
|
||||
title: "Image to write to clipboard",
|
||||
const path = await open({
|
||||
title: 'Image to write to clipboard',
|
||||
filters: [
|
||||
{
|
||||
name: "Clipboard IMG",
|
||||
extensions: ["png", "jpg", "jpeg"],
|
||||
},
|
||||
],
|
||||
});
|
||||
const bytes = await readFile(res.path);
|
||||
await clipboard.writeImage(bytes);
|
||||
onMessage("wrote image");
|
||||
name: 'Clipboard IMG',
|
||||
extensions: ['png', 'jpg', 'jpeg']
|
||||
}
|
||||
]
|
||||
})
|
||||
const bytes = await readFile(path)
|
||||
await clipboard.writeImage(bytes)
|
||||
onMessage('wrote image')
|
||||
} catch (e) {
|
||||
onMessage(e);
|
||||
onMessage(e)
|
||||
}
|
||||
}
|
||||
|
||||
async function read() {
|
||||
try {
|
||||
const image = await clipboard.readImage();
|
||||
const image = await clipboard.readImage()
|
||||
arrayBufferToBase64(await image.rgba(), function (base64) {
|
||||
const src = "data:image/png;base64," + base64;
|
||||
insecureRenderHtml('<img src="' + src + '"></img>');
|
||||
});
|
||||
return;
|
||||
const src = 'data:image/png;base64,' + base64
|
||||
insecureRenderHtml('<img src="' + src + '"></img>')
|
||||
})
|
||||
return
|
||||
} catch (_) {}
|
||||
|
||||
clipboard
|
||||
.readText()
|
||||
.then((contents) => {
|
||||
onMessage(`Clipboard contents: ${contents}`);
|
||||
onMessage(`Clipboard contents: ${contents}`)
|
||||
})
|
||||
.catch((e) => {
|
||||
onMessage(e);
|
||||
});
|
||||
onMessage(e)
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -65,6 +65,5 @@
|
||||
/>
|
||||
<button class="btn" type="button" on:click={writeText}>Write</button>
|
||||
<button class="btn" type="button" on:click={writeImage}>Pick Image</button>
|
||||
|
||||
<button class="btn" type="button" on:click={read}>Read</button>
|
||||
</div>
|
||||
|
||||
@@ -23,11 +23,7 @@
|
||||
|
||||
async function prompt() {
|
||||
confirm("Do you want to do something?")
|
||||
.then((res) =>
|
||||
onMessage(
|
||||
res ? "Yes" : "No"
|
||||
)
|
||||
)
|
||||
.then((res) => onMessage(res ? "Yes" : "No"))
|
||||
.catch(onMessage);
|
||||
}
|
||||
|
||||
@@ -67,14 +63,15 @@
|
||||
if (Array.isArray(res)) {
|
||||
onMessage(res);
|
||||
} else {
|
||||
var pathToRead = typeof res === "string" ? res : res.path;
|
||||
var pathToRead = res;
|
||||
var isFile = pathToRead.match(/\S+\.\S+$/g);
|
||||
readFile(pathToRead)
|
||||
.then(function (response) {
|
||||
if (isFile) {
|
||||
if (
|
||||
pathToRead.includes(".png") ||
|
||||
pathToRead.includes(".jpg")
|
||||
pathToRead.includes(".jpg") ||
|
||||
pathToRead.includes(".jpeg")
|
||||
) {
|
||||
arrayBufferToBase64(
|
||||
new Uint8Array(response),
|
||||
@@ -144,5 +141,7 @@
|
||||
>Open save dialog</button
|
||||
>
|
||||
<button class="btn" id="prompt-dialog" on:click={prompt}>Prompt</button>
|
||||
<button class="btn" id="custom-prompt-dialog" on:click={promptCustom}>Prompt (custom)</button>
|
||||
<button class="btn" id="custom-prompt-dialog" on:click={promptCustom}
|
||||
>Prompt (custom)</button
|
||||
>
|
||||
<button class="btn" id="message-dialog" on:click={msg}>Message</button>
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<script>
|
||||
import {
|
||||
checkPermissions,
|
||||
requestPermissions,
|
||||
getCurrentPosition
|
||||
} from '@tauri-apps/plugin-geolocation'
|
||||
|
||||
export let onMessage
|
||||
|
||||
async function getPosition() {
|
||||
let permissions = await checkPermissions()
|
||||
if (
|
||||
permissions.location === 'prompt' ||
|
||||
permissions.location === 'prompt-with-rationale'
|
||||
) {
|
||||
permissions = await requestPermissions(['location'])
|
||||
}
|
||||
|
||||
if (permissions.location === 'granted') {
|
||||
getCurrentPosition().then(onMessage).catch(onMessage)
|
||||
} else {
|
||||
onMessage('permission denied')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<button class="btn" id="cli-matches" on:click={getPosition}>
|
||||
Get Position
|
||||
</button>
|
||||
@@ -0,0 +1,46 @@
|
||||
<script>
|
||||
import {
|
||||
vibrate,
|
||||
impactFeedback,
|
||||
notificationFeedback,
|
||||
selectionFeedback
|
||||
} from '@tauri-apps/plugin-haptics'
|
||||
|
||||
export let onMessage
|
||||
</script>
|
||||
|
||||
<div>
|
||||
<button
|
||||
class="btn"
|
||||
on:click={() => vibrate(300).then(onMessage).catch(onMessage)}
|
||||
>vibrate short</button
|
||||
>
|
||||
<button
|
||||
class="btn"
|
||||
on:click={() => vibrate(1500).then(onMessage).catch(onMessage)}
|
||||
>vibrate long</button
|
||||
>
|
||||
<button
|
||||
class="btn"
|
||||
on:click={() => impactFeedback('medium').then(onMessage).catch(onMessage)}
|
||||
>impact medium</button
|
||||
>
|
||||
<button
|
||||
class="btn"
|
||||
on:click={() =>
|
||||
notificationFeedback('warning').then(onMessage).catch(onMessage)}
|
||||
>notification warning</button
|
||||
>
|
||||
<button
|
||||
class="btn"
|
||||
on:click={() => selectionFeedback().then(onMessage).catch(onMessage)}
|
||||
>selection</button
|
||||
>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<p>
|
||||
Depending on your device settings for haptic feedback some of the buttons may
|
||||
not work.
|
||||
</p>
|
||||
@@ -1,69 +1,69 @@
|
||||
<script>
|
||||
import { fetch as tauriFetch } from "@tauri-apps/plugin-http";
|
||||
import { JsonView } from "@zerodevx/svelte-json-view";
|
||||
import { fetch as tauriFetch } from '@tauri-apps/plugin-http'
|
||||
import { JsonView } from '@zerodevx/svelte-json-view'
|
||||
|
||||
let httpMethod = "GET";
|
||||
let httpBody = "";
|
||||
let httpMethod = 'GET'
|
||||
let httpBody = ''
|
||||
|
||||
export let onMessage;
|
||||
export let onMessage
|
||||
|
||||
async function makeHttpRequest() {
|
||||
let method = httpMethod || "GET";
|
||||
let method = httpMethod || 'GET'
|
||||
|
||||
const options = {
|
||||
method: method || "GET",
|
||||
headers: {},
|
||||
};
|
||||
method: method || 'GET',
|
||||
headers: {}
|
||||
}
|
||||
|
||||
let bodyType;
|
||||
let bodyType
|
||||
|
||||
if (method !== "GET") {
|
||||
options.body = httpBody;
|
||||
if (method !== 'GET') {
|
||||
options.body = httpBody
|
||||
|
||||
if (
|
||||
(httpBody.startsWith("{") && httpBody.endsWith("}")) ||
|
||||
(httpBody.startsWith("[") && httpBody.endsWith("]"))
|
||||
(httpBody.startsWith('{') && httpBody.endsWith('}')) ||
|
||||
(httpBody.startsWith('[') && httpBody.endsWith(']'))
|
||||
) {
|
||||
options.headers["Content-Type"] = "application/json";
|
||||
bodyType = "json";
|
||||
} else if (httpBody !== "") {
|
||||
bodyType = "text";
|
||||
options.headers['Content-Type'] = 'application/json'
|
||||
bodyType = 'json'
|
||||
} else if (httpBody !== '') {
|
||||
bodyType = 'text'
|
||||
}
|
||||
}
|
||||
|
||||
const response = await tauriFetch("http://localhost:3003", options);
|
||||
const response = await tauriFetch('http://localhost:3003', options)
|
||||
const body =
|
||||
bodyType === "json" ? await response.json() : await response.text();
|
||||
bodyType === 'json' ? await response.json() : await response.text()
|
||||
|
||||
onMessage({
|
||||
url: response.url,
|
||||
status: response.status,
|
||||
ok: response.ok,
|
||||
headers: Object.fromEntries(response.headers.entries()),
|
||||
body,
|
||||
});
|
||||
body
|
||||
})
|
||||
}
|
||||
|
||||
/// http form
|
||||
let foo = "baz";
|
||||
let bar = "qux";
|
||||
let result = null;
|
||||
let foo = 'baz'
|
||||
let bar = 'qux'
|
||||
let result = null
|
||||
|
||||
async function doPost() {
|
||||
const form = new FormData();
|
||||
form.append("foo", foo);
|
||||
form.append("bar", bar);
|
||||
const response = await tauriFetch("http://localhost:3003/tauri", {
|
||||
method: "POST",
|
||||
body: form,
|
||||
});
|
||||
const form = new FormData()
|
||||
form.append('foo', foo)
|
||||
form.append('bar', bar)
|
||||
const response = await tauriFetch('http://localhost:3003/tauri', {
|
||||
method: 'POST',
|
||||
body: form
|
||||
})
|
||||
result = {
|
||||
url: response.url,
|
||||
status: response.status,
|
||||
ok: response.ok,
|
||||
headers: Object.fromEntries(response.headers.entries()),
|
||||
body: await response.text(),
|
||||
};
|
||||
body: await response.text()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
placeholder="Request body"
|
||||
rows="5"
|
||||
bind:value={httpBody}
|
||||
/>
|
||||
></textarea>
|
||||
<br />
|
||||
<button class="btn" id="make-request"> Make request </button>
|
||||
</form>
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
<script>
|
||||
import * as opener from '@tauri-apps/plugin-opener'
|
||||
|
||||
export let onMessage
|
||||
|
||||
let url = ''
|
||||
let urlProgram = ''
|
||||
function openUrl() {
|
||||
opener.openUrl(url, urlProgram ? urlProgram : undefined).catch(onMessage)
|
||||
}
|
||||
|
||||
let path = ''
|
||||
let pathProgram = ''
|
||||
function openPath() {
|
||||
opener
|
||||
.openPath(path, pathProgram ? pathProgram : undefined)
|
||||
.catch(onMessage)
|
||||
}
|
||||
|
||||
let revealPath = ''
|
||||
function revealItemInDir() {
|
||||
opener.revealItemInDir(revealPath).catch(onMessage)
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-2">
|
||||
<form
|
||||
class="flex flex-row gap-2 items-center"
|
||||
on:submit|preventDefault={openUrl}
|
||||
>
|
||||
<button class="btn" type="submit">Open URL</button>
|
||||
<input
|
||||
class="input grow"
|
||||
placeholder="Type the URL to open..."
|
||||
bind:value={url}
|
||||
/>
|
||||
<span> with </span>
|
||||
<input class="input" bind:value={urlProgram} />
|
||||
</form>
|
||||
|
||||
<form
|
||||
class="flex flex-row gap-2 items-center"
|
||||
on:submit|preventDefault={openPath}
|
||||
>
|
||||
<button class="btn" type="submit">Open Path</button>
|
||||
<input
|
||||
class="input grow"
|
||||
placeholder="Type the path to open..."
|
||||
bind:value={path}
|
||||
/>
|
||||
<span> with </span>
|
||||
<input class="input" bind:value={pathProgram} />
|
||||
</form>
|
||||
|
||||
<form
|
||||
class="flex flex-row gap-2 items-center"
|
||||
on:submit|preventDefault={revealItemInDir}
|
||||
>
|
||||
<button class="btn" type="submit">Reveal</button>
|
||||
<input
|
||||
class="input grow"
|
||||
placeholder="Type the path to reveal..."
|
||||
bind:value={revealPath}
|
||||
/>
|
||||
</form>
|
||||
</div>
|
||||
@@ -1,38 +1,44 @@
|
||||
<script>
|
||||
import { scan, checkPermissions, requestPermissions, Format, cancel } from "@tauri-apps/plugin-barcode-scanner";
|
||||
import {
|
||||
scan,
|
||||
checkPermissions,
|
||||
requestPermissions,
|
||||
Format,
|
||||
cancel
|
||||
} from '@tauri-apps/plugin-barcode-scanner'
|
||||
|
||||
export let onMessage;
|
||||
export let onMessage
|
||||
|
||||
let scanning = false;
|
||||
let windowed = true;
|
||||
let formats = [Format.QRCode];
|
||||
const supportedFormats = [Format.QRCode, Format.EAN13];
|
||||
let scanning = false
|
||||
let windowed = true
|
||||
let formats = [Format.QRCode]
|
||||
const supportedFormats = [Format.QRCode, Format.EAN13]
|
||||
|
||||
async function startScan() {
|
||||
let permission = await checkPermissions();
|
||||
let permission = await checkPermissions()
|
||||
if (permission === 'prompt') {
|
||||
permission = await requestPermissions();
|
||||
permission = await requestPermissions()
|
||||
}
|
||||
if (permission === 'granted') {
|
||||
scanning = true;
|
||||
scanning = true
|
||||
scan({ windowed, formats })
|
||||
.then((res) => {
|
||||
scanning = false;
|
||||
onMessage(res);
|
||||
scanning = false
|
||||
onMessage(res)
|
||||
})
|
||||
.catch((error) => {
|
||||
scanning = false;
|
||||
onMessage(error);
|
||||
});
|
||||
scanning = false
|
||||
onMessage(error)
|
||||
})
|
||||
} else {
|
||||
onMessage('Permission denied')
|
||||
}
|
||||
}
|
||||
|
||||
async function cancelScan() {
|
||||
await cancel();
|
||||
scanning = false;
|
||||
onMessage("cancelled");
|
||||
await cancel()
|
||||
scanning = false
|
||||
onMessage('cancelled')
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -59,11 +65,12 @@
|
||||
<div class="barcode-scanner--area--container">
|
||||
<div class="relative">
|
||||
<p>Aim your camera at a QR code</p>
|
||||
<button class="btn" type="button" on:click={cancelScan}>Cancel</button>
|
||||
<button class="btn" type="button" on:click={cancelScan}>Cancel</button
|
||||
>
|
||||
</div>
|
||||
<div class="square surround-cover">
|
||||
<div class="barcode-scanner--area--outer surround-cover">
|
||||
<div class="barcode-scanner--area--inner" />
|
||||
<div class="barcode-scanner--area--inner"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -111,7 +118,7 @@
|
||||
transition: 0.3s;
|
||||
}
|
||||
.square:after {
|
||||
content: "";
|
||||
content: '';
|
||||
top: 0;
|
||||
display: block;
|
||||
padding-bottom: 100%;
|
||||
@@ -141,7 +148,8 @@
|
||||
width: 100%;
|
||||
margin: 1rem;
|
||||
border: 2px solid #fff;
|
||||
box-shadow: 0px 0px 2px 1px rgb(0 0 0 / 0.5),
|
||||
box-shadow:
|
||||
0px 0px 2px 1px rgb(0 0 0 / 0.5),
|
||||
inset 0px 0px 2px 1px rgb(0 0 0 / 0.5);
|
||||
border-radius: 1rem;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
}
|
||||
|
||||
function writeToStdin() {
|
||||
child.write(stdin).catch(onMessage);
|
||||
child.write(`${stdin}\n`).catch(onMessage);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
<script>
|
||||
import { LazyStore } from "@tauri-apps/plugin-store";
|
||||
import { onMount } from "svelte";
|
||||
|
||||
export let onMessage;
|
||||
|
||||
let key;
|
||||
let value;
|
||||
|
||||
let store = new LazyStore("cache.json");
|
||||
let cache = {};
|
||||
|
||||
async function refreshEntries() {
|
||||
try {
|
||||
const values = await store.entries();
|
||||
cache = {};
|
||||
for (const [key, value] of values) {
|
||||
cache[key] = value;
|
||||
}
|
||||
} catch (error) {
|
||||
onMessage(error);
|
||||
}
|
||||
}
|
||||
|
||||
onMount(async () => {
|
||||
await refreshEntries();
|
||||
});
|
||||
|
||||
async function write(key, value) {
|
||||
try {
|
||||
if (value) {
|
||||
await store.set(key, value);
|
||||
} else {
|
||||
await store.delete(key);
|
||||
}
|
||||
const v = await store.get(key);
|
||||
if (v === undefined) {
|
||||
delete cache[key];
|
||||
cache = cache;
|
||||
} else {
|
||||
cache[key] = v;
|
||||
}
|
||||
} catch (error) {
|
||||
onMessage(error);
|
||||
}
|
||||
}
|
||||
|
||||
async function reset() {
|
||||
try {
|
||||
await store.reset();
|
||||
} catch (error) {
|
||||
onMessage(error);
|
||||
}
|
||||
await refreshEntries();
|
||||
}
|
||||
|
||||
async function close() {
|
||||
try {
|
||||
await store.close();
|
||||
onMessage("Store is now closed, any new operations will error out");
|
||||
} catch (error) {
|
||||
onMessage(error);
|
||||
}
|
||||
}
|
||||
|
||||
function reopen() {
|
||||
store = new LazyStore("cache.json");
|
||||
onMessage("We made a new `LazyStore` instance, operations will now work");
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col childre:grow gap-1">
|
||||
<div class="flex flex-col flex-row-md gap-4">
|
||||
<div class="flex items-center gap-1">
|
||||
Key:
|
||||
<input class="grow input" bind:value={key} />
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-1">
|
||||
Value:
|
||||
<input class="grow input" bind:value />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button class="btn" on:click={() => write(key, value)}>Write</button>
|
||||
<button class="btn" on:click={() => reset()}>Reset</button>
|
||||
<button class="btn" on:click={() => close()}>Close</button>
|
||||
<button class="btn" on:click={() => reopen()}>Re-open</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{#each Object.entries(cache) as [k, v]}
|
||||
<div>{k} = {v}</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,56 +1,56 @@
|
||||
<script>
|
||||
import { check } from "@tauri-apps/plugin-updater";
|
||||
import { relaunch } from "@tauri-apps/plugin-process";
|
||||
import { check } from '@tauri-apps/plugin-updater'
|
||||
import { relaunch } from '@tauri-apps/plugin-process'
|
||||
|
||||
export let onMessage;
|
||||
export let onMessage
|
||||
|
||||
let isChecking, isInstalling, newUpdate;
|
||||
let isChecking, isInstalling, newUpdate
|
||||
let totalSize = 0,
|
||||
downloadedSize = 0;
|
||||
downloadedSize = 0
|
||||
|
||||
async function checkUpdate() {
|
||||
isChecking = true;
|
||||
isChecking = true
|
||||
try {
|
||||
const update = await check();
|
||||
onMessage(`Should update: ${update.available}`);
|
||||
onMessage(update);
|
||||
const update = await check()
|
||||
onMessage(`Should update: ${update.available}`)
|
||||
onMessage(update)
|
||||
|
||||
newUpdate = update;
|
||||
newUpdate = update
|
||||
} catch (e) {
|
||||
onMessage(e);
|
||||
onMessage(e)
|
||||
} finally {
|
||||
isChecking = false;
|
||||
isChecking = false
|
||||
}
|
||||
}
|
||||
|
||||
async function install() {
|
||||
isInstalling = true;
|
||||
downloadedSize = 0;
|
||||
isInstalling = true
|
||||
downloadedSize = 0
|
||||
try {
|
||||
await newUpdate.downloadAndInstall((downloadProgress) => {
|
||||
switch (downloadProgress.event) {
|
||||
case "Started":
|
||||
totalSize = downloadProgress.data.contentLength;
|
||||
break;
|
||||
case "Progress":
|
||||
downloadedSize += downloadProgress.data.chunkLength;
|
||||
break;
|
||||
case "Finished":
|
||||
break;
|
||||
case 'Started':
|
||||
totalSize = downloadProgress.data.contentLength
|
||||
break
|
||||
case 'Progress':
|
||||
downloadedSize += downloadProgress.data.chunkLength
|
||||
break
|
||||
case 'Finished':
|
||||
break
|
||||
}
|
||||
});
|
||||
onMessage("Installation complete, restarting...");
|
||||
await new Promise((resolve) => setTimeout(resolve, 2000));
|
||||
await relaunch();
|
||||
})
|
||||
onMessage('Installation complete, restarting...')
|
||||
await new Promise((resolve) => setTimeout(resolve, 2000))
|
||||
await relaunch()
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
onMessage(e);
|
||||
console.error(e)
|
||||
onMessage(e)
|
||||
} finally {
|
||||
isInstalling = false;
|
||||
isInstalling = false
|
||||
}
|
||||
}
|
||||
|
||||
$: progress = totalSize ? Math.round((downloadedSize / totalSize) * 100) : 0;
|
||||
$: progress = totalSize ? Math.round((downloadedSize / totalSize) * 100) : 0
|
||||
</script>
|
||||
|
||||
<div class="flex children:grow children:h10">
|
||||
@@ -61,7 +61,7 @@
|
||||
{:else}
|
||||
<div class="progress">
|
||||
<span>{progress}%</span>
|
||||
<div class="progress-bar" style="width: {progress}%" />
|
||||
<div class="progress-bar" style="width: {progress}%"></div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -2,43 +2,43 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import { defineConfig, presetIcons, presetUno, presetWebFonts } from "unocss";
|
||||
import extractorSvelte from "@unocss/extractor-svelte";
|
||||
import { defineConfig, presetIcons, presetUno, presetWebFonts } from 'unocss'
|
||||
import extractorSvelte from '@unocss/extractor-svelte'
|
||||
|
||||
export default defineConfig({
|
||||
theme: {
|
||||
colors: {
|
||||
primary: "#FFFFFF",
|
||||
primaryLighter: "#e9ecef",
|
||||
darkPrimary: "#1B1B1D",
|
||||
darkPrimaryLighter: "#242526",
|
||||
primaryText: "#1C1E21",
|
||||
darkPrimaryText: "#E3E3E3",
|
||||
secondaryText: "#858A91",
|
||||
darkSecondaryText: "#C2C5CA",
|
||||
accent: "#3578E5",
|
||||
accentDark: "#306cce",
|
||||
accentDarker: "#2d66c3",
|
||||
accentDarkest: "#2554a0",
|
||||
accentLight: "#538ce9",
|
||||
accentLighter: "#72a1ed",
|
||||
accentLightest: "#9abcf2",
|
||||
accentText: "#FFFFFF",
|
||||
darkAccent: "#67d6ed",
|
||||
darkAccentDark: "#49cee9",
|
||||
darkAccentDarker: "#39cae8",
|
||||
darkAccentDarkest: "#19b5d5",
|
||||
darkAccentLight: "#85def1",
|
||||
darkAccentLighter: "#95e2f2",
|
||||
darkAccentLightest: "#c2eff8",
|
||||
darkAccentText: "#1C1E21",
|
||||
code: "#d6d8da",
|
||||
codeDark: "#282a2e",
|
||||
hoverOverlay: "rgba(0,0,0,.05)",
|
||||
hoverOverlayDarker: "rgba(0,0,0,.1)",
|
||||
darkHoverOverlay: "hsla(0,0%,100%,.05)",
|
||||
darkHoverOverlayDarker: "hsla(0,0%,100%,.1)",
|
||||
},
|
||||
primary: '#FFFFFF',
|
||||
primaryLighter: '#e9ecef',
|
||||
darkPrimary: '#1B1B1D',
|
||||
darkPrimaryLighter: '#242526',
|
||||
primaryText: '#1C1E21',
|
||||
darkPrimaryText: '#E3E3E3',
|
||||
secondaryText: '#858A91',
|
||||
darkSecondaryText: '#C2C5CA',
|
||||
accent: '#3578E5',
|
||||
accentDark: '#306cce',
|
||||
accentDarker: '#2d66c3',
|
||||
accentDarkest: '#2554a0',
|
||||
accentLight: '#538ce9',
|
||||
accentLighter: '#72a1ed',
|
||||
accentLightest: '#9abcf2',
|
||||
accentText: '#FFFFFF',
|
||||
darkAccent: '#67d6ed',
|
||||
darkAccentDark: '#49cee9',
|
||||
darkAccentDarker: '#39cae8',
|
||||
darkAccentDarkest: '#19b5d5',
|
||||
darkAccentLight: '#85def1',
|
||||
darkAccentLighter: '#95e2f2',
|
||||
darkAccentLightest: '#c2eff8',
|
||||
darkAccentText: '#1C1E21',
|
||||
code: '#d6d8da',
|
||||
codeDark: '#282a2e',
|
||||
hoverOverlay: 'rgba(0,0,0,.05)',
|
||||
hoverOverlayDarker: 'rgba(0,0,0,.1)',
|
||||
darkHoverOverlay: 'hsla(0,0%,100%,.05)',
|
||||
darkHoverOverlayDarker: 'hsla(0,0%,100%,.1)'
|
||||
}
|
||||
},
|
||||
preflights: [
|
||||
{
|
||||
@@ -54,7 +54,7 @@ export default defineConfig({
|
||||
code {
|
||||
font-size: ${theme.fontSize.xs[0]};
|
||||
font-family: ${theme.fontFamily.mono};
|
||||
border-radius: ${theme.borderRadius["DEFAULT"]};
|
||||
border-radius: ${theme.borderRadius['DEFAULT']};
|
||||
background-color: ${theme.colors.code};
|
||||
}
|
||||
|
||||
@@ -66,8 +66,8 @@ export default defineConfig({
|
||||
.dark code {
|
||||
background-color: ${theme.colors.codeDark};
|
||||
}
|
||||
`,
|
||||
},
|
||||
`
|
||||
}
|
||||
],
|
||||
shortcuts: {
|
||||
btn: `select-none outline-none shadow-md p-2 rd-1 text-primaryText border-none font-400 dark:font-600
|
||||
@@ -81,20 +81,20 @@ export default defineConfig({
|
||||
note: `decoration-none flex-inline items-center relative p-2 rd-1
|
||||
border-l-4 border-accent dark:border-darkAccent
|
||||
bg-accent/10 dark:bg-darkAccent/10`,
|
||||
"note-red":
|
||||
"note bg-red-700/10 dark:bg-red-700/10 after:bg-red-700 dark:after:bg-red-700",
|
||||
'note-red':
|
||||
'note bg-red-700/10 dark:bg-red-700/10 after:bg-red-700 dark:after:bg-red-700',
|
||||
input:
|
||||
"h-10 flex items-center outline-none border-none p-2 rd-1 shadow-md bg-primaryLighter dark:bg-darkPrimaryLighter text-primaryText dark:text-darkPrimaryText",
|
||||
'h-10 flex items-center outline-none border-none p-2 rd-1 shadow-md bg-primaryLighter dark:bg-darkPrimaryLighter text-primaryText dark:text-darkPrimaryText'
|
||||
},
|
||||
presets: [
|
||||
presetUno(),
|
||||
presetIcons(),
|
||||
presetWebFonts({
|
||||
fonts: {
|
||||
sans: "Rubik",
|
||||
mono: ["Fira Code", "Fira Mono:400,700"],
|
||||
},
|
||||
}),
|
||||
sans: 'Rubik',
|
||||
mono: ['Fira Code', 'Fira Mono:400,700']
|
||||
}
|
||||
})
|
||||
],
|
||||
extractors: [extractorSvelte],
|
||||
});
|
||||
extractors: [extractorSvelte]
|
||||
})
|
||||
|
||||