mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-07-22 17:10:53 +02:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 03afae6d72 | |||
| 57ac986453 | |||
| 2ed6d6c1de | |||
| cdfd462955 | |||
| d6e0b6bbb1 | |||
| 40ae0a7fa0 | |||
| edc52ea056 | |||
| a0d949d93e | |||
| 13c63af965 | |||
| cad301fcc1 | |||
| 254f222e0e | |||
| b1439be667 | |||
| d157387722 |
@@ -1,7 +1,17 @@
|
|||||||
[advisories]
|
[advisories]
|
||||||
ignore = [
|
ignore = [
|
||||||
|
# rsa Marvin Attack
|
||||||
|
"RUSTSEC-2023-0071",
|
||||||
# time crate can't be updated in the repo because of MSRV, users are unaffected
|
# time crate can't be updated in the repo because of MSRV, users are unaffected
|
||||||
"RUSTSEC-2026-0009",
|
"RUSTSEC-2026-0009",
|
||||||
# libflate crates can't be updated in the repo because of MSRV, users are unaffected
|
# libflate crates can't be updated in the repo because of MSRV, users are unaffected
|
||||||
"RUSTSEC-2026-0105",
|
"RUSTSEC-2026-0105",
|
||||||
|
# quick-xml, need an update in plist, can't be updated in the repo because of MSRV, users are unaffected
|
||||||
|
# Also needs on update in wayland-scanner > arboard > tauri-plugin-clipboard-manager
|
||||||
|
"RUSTSEC-2026-0194",
|
||||||
|
# quick-xml, need an update in plist, can't be updated in the repo because of MSRV, users are unaffected
|
||||||
|
# Also needs on update in wayland-scanner > arboard > tauri-plugin-clipboard-manager
|
||||||
|
"RUSTSEC-2026-0195",
|
||||||
|
# quinn-proto, can't be updated in the repo because of MSRV, users are unaffected
|
||||||
|
"RUSTSEC-2026-0185",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
"log": minor:feat
|
|
||||||
"log-js": minor
|
|
||||||
---
|
|
||||||
|
|
||||||
Added the `FileOpenStrategy` for log rotation. It defaults to append into existing file if any (previous behaviour), and brings a new feature to create a new file per session: `FileOpenStrategy::Rotate`.
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
positioner: patch
|
|
||||||
positioner-js: patch
|
|
||||||
---
|
|
||||||
|
|
||||||
Replaced a panic in `calculate_position` with an error return when the window has no associated monitor (e.g. during display sleep or monitor reconfiguration).
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
"log": patch
|
|
||||||
"log-js": patch
|
|
||||||
---
|
|
||||||
|
|
||||||
Removed an unused dependency `byte-unit`.
|
|
||||||
@@ -33,20 +33,19 @@ jobs:
|
|||||||
audit-js:
|
audit-js:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
- name: Cache pnpm modules
|
- name: Cache pnpm modules
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v6
|
||||||
with:
|
with:
|
||||||
path: ~/.pnpm-store
|
path: ~/.pnpm-store
|
||||||
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-
|
${{ runner.os }}-
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v7
|
||||||
with:
|
with:
|
||||||
node-version: 'lts/*'
|
node-version: 'lts/*'
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v6
|
||||||
with:
|
with:
|
||||||
version: 10.x.x
|
|
||||||
run_install: true
|
run_install: true
|
||||||
- name: audit
|
- name: audit
|
||||||
run: pnpm audit
|
run: pnpm audit
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ jobs:
|
|||||||
audit-rust:
|
audit-rust:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
- uses: rustsec/audit-check@v2
|
- uses: rustsec/audit-check@v2
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ jobs:
|
|||||||
check:
|
check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
|
|
||||||
- name: check change files end with .md
|
- name: check change files end with .md
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
packages: ${{ steps.filter.outputs.changes }}
|
packages: ${{ steps.filter.outputs.changes }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
- uses: dorny/paths-filter@v2
|
- uses: dorny/paths-filter@v2
|
||||||
id: filter
|
id: filter
|
||||||
with:
|
with:
|
||||||
@@ -153,21 +153,20 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
|
|
||||||
- name: Cache pnpm modules
|
- name: Cache pnpm modules
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v6
|
||||||
with:
|
with:
|
||||||
path: ~/.pnpm-store
|
path: ~/.pnpm-store
|
||||||
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-
|
${{ runner.os }}-
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v7
|
||||||
with:
|
with:
|
||||||
node-version: 'lts/*'
|
node-version: 'lts/*'
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v6
|
||||||
with:
|
with:
|
||||||
version: 10.x.x
|
|
||||||
run_install: true
|
run_install: true
|
||||||
|
|
||||||
- name: build api
|
- name: build api
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ jobs:
|
|||||||
check:
|
check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
- uses: dorny/paths-filter@v2
|
- uses: dorny/paths-filter@v2
|
||||||
id: filter
|
id: filter
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # required for use of git history
|
fetch-depth: 0 # required for use of git history
|
||||||
- name: covector status
|
- name: covector status
|
||||||
|
|||||||
@@ -28,18 +28,17 @@ jobs:
|
|||||||
successfulPublish: ${{ steps.covector.outputs.successfulPublish }}
|
successfulPublish: ${{ steps.covector.outputs.successfulPublish }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # required for use of git history
|
fetch-depth: 0 # required for use of git history
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v7
|
||||||
with:
|
with:
|
||||||
node-version: 'lts/*'
|
node-version: 'lts/*'
|
||||||
registry-url: 'https://registry.npmjs.org'
|
registry-url: 'https://registry.npmjs.org'
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v6
|
||||||
with:
|
with:
|
||||||
version: 10.x.x
|
|
||||||
run_install: true
|
run_install: true
|
||||||
|
|
||||||
- name: cargo login
|
- name: cargo login
|
||||||
@@ -74,7 +73,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Create Pull Request With Versions Bumped
|
- name: Create Pull Request With Versions Bumped
|
||||||
id: cpr
|
id: cpr
|
||||||
uses: peter-evans/create-pull-request@dd2324fc52d5d43c699a5636bcf19fceaa70c284 # 7.0.7
|
uses: peter-evans/create-pull-request@v8.1.1
|
||||||
if: steps.covector.outputs.commandRan == 'version'
|
if: steps.covector.outputs.commandRan == 'version'
|
||||||
with:
|
with:
|
||||||
title: 'Publish New Versions (${{ github.ref_name }})'
|
title: 'Publish New Versions (${{ github.ref_name }})'
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
|
|
||||||
- name: install Rust stable and rustfmt
|
- name: install Rust stable and rustfmt
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
@@ -25,20 +25,19 @@ jobs:
|
|||||||
prettier:
|
prettier:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
- name: Cache pnpm modules
|
- name: Cache pnpm modules
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v6
|
||||||
with:
|
with:
|
||||||
path: ~/.pnpm-store
|
path: ~/.pnpm-store
|
||||||
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-
|
${{ runner.os }}-
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v7
|
||||||
with:
|
with:
|
||||||
node-version: 'lts/*'
|
node-version: 'lts/*'
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v6
|
||||||
with:
|
with:
|
||||||
version: 10.x.x
|
|
||||||
run_install: true
|
run_install: true
|
||||||
- run: pnpm format:check
|
- run: pnpm format:check
|
||||||
|
|
||||||
@@ -46,7 +45,7 @@ jobs:
|
|||||||
name: taplo (.toml files)
|
name: taplo (.toml files)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
|
|
||||||
- name: install Rust stable
|
- name: install Rust stable
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ jobs:
|
|||||||
platform: [ubuntu-22.04, macos-latest, windows-latest]
|
platform: [ubuntu-22.04, macos-latest, windows-latest]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
|||||||
@@ -36,20 +36,19 @@ jobs:
|
|||||||
eslint:
|
eslint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
- name: Cache pnpm modules
|
- name: Cache pnpm modules
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v6
|
||||||
with:
|
with:
|
||||||
path: ~/.pnpm-store
|
path: ~/.pnpm-store
|
||||||
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-
|
${{ runner.os }}-
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v7
|
||||||
with:
|
with:
|
||||||
node-version: 'lts/*'
|
node-version: 'lts/*'
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v6
|
||||||
with:
|
with:
|
||||||
version: 10.x.x
|
|
||||||
run_install: true
|
run_install: true
|
||||||
- name: eslint
|
- name: eslint
|
||||||
run: pnpm lint
|
run: pnpm lint
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
packages: ${{ steps.filter.outputs.changes }}
|
packages: ${{ steps.filter.outputs.changes }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
- uses: dorny/paths-filter@v2
|
- uses: dorny/paths-filter@v2
|
||||||
id: filter
|
id: filter
|
||||||
with:
|
with:
|
||||||
@@ -136,7 +136,7 @@ jobs:
|
|||||||
package: ${{ fromJSON(needs.changes.outputs.packages) }}
|
package: ${{ fromJSON(needs.changes.outputs.packages) }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
|
|
||||||
- name: install webkit2gtk
|
- name: install webkit2gtk
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -19,26 +19,25 @@ jobs:
|
|||||||
sync-to-mirrors:
|
sync-to-mirrors:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
|
|
||||||
- name: Fetch git tags
|
- name: Fetch git tags
|
||||||
run: git fetch origin 'refs/tags/*:refs/tags/*'
|
run: git fetch origin 'refs/tags/*:refs/tags/*'
|
||||||
|
|
||||||
- name: Cache pnpm modules
|
- name: Cache pnpm modules
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v6
|
||||||
with:
|
with:
|
||||||
path: ~/.pnpm-store
|
path: ~/.pnpm-store
|
||||||
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-
|
${{ runner.os }}-
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v7
|
||||||
with:
|
with:
|
||||||
node-version: 'lts/*'
|
node-version: 'lts/*'
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v6
|
||||||
with:
|
with:
|
||||||
version: 10.x.x
|
|
||||||
run_install: true
|
run_install: true
|
||||||
|
|
||||||
- name: Build packages
|
- name: Build packages
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
packages: ${{ steps.filter.outputs.changes }}
|
packages: ${{ steps.filter.outputs.changes }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
- uses: dorny/paths-filter@v2
|
- uses: dorny/paths-filter@v2
|
||||||
id: filter
|
id: filter
|
||||||
with:
|
with:
|
||||||
@@ -225,7 +225,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.platform.os }}
|
runs-on: ${{ matrix.platform.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
|
|
||||||
- name: install webkit2gtk
|
- name: install webkit2gtk
|
||||||
if: contains(matrix.platform.target, 'unknown-linux')
|
if: contains(matrix.platform.target, 'unknown-linux')
|
||||||
|
|||||||
Generated
+1627
-2986
File diff suppressed because it is too large
Load Diff
+2
-8
@@ -11,7 +11,7 @@ resolver = "2"
|
|||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
log = "0.4"
|
log = "0.4.21"
|
||||||
tauri = { version = "2.10", default-features = false }
|
tauri = { version = "2.10", default-features = false }
|
||||||
tauri-build = "2.5"
|
tauri-build = "2.5"
|
||||||
tauri-plugin = "2.5"
|
tauri-plugin = "2.5"
|
||||||
@@ -19,7 +19,7 @@ tauri-utils = "2.8"
|
|||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
thiserror = "2"
|
thiserror = "2"
|
||||||
url = "2"
|
url = "2"
|
||||||
schemars = "1"
|
schemars = "0.8"
|
||||||
dunce = "1"
|
dunce = "1"
|
||||||
specta = "^2.0.0-rc.16"
|
specta = "^2.0.0-rc.16"
|
||||||
glob = "0.3"
|
glob = "0.3"
|
||||||
@@ -39,9 +39,3 @@ codegen-units = 1
|
|||||||
lto = true
|
lto = true
|
||||||
incremental = false
|
incremental = false
|
||||||
opt-level = "s"
|
opt-level = "s"
|
||||||
|
|
||||||
[patch.crates-io]
|
|
||||||
tauri = { git = "https://github.com/tauri-apps/tauri.git", tag = "tauri-cef-v3.0.0-alpha.13" }
|
|
||||||
tauri-utils = { git = "https://github.com/tauri-apps/tauri.git", tag = "tauri-cef-v3.0.0-alpha.13" }
|
|
||||||
tauri-plugin = { git = "https://github.com/tauri-apps/tauri.git", tag = "tauri-cef-v3.0.0-alpha.13" }
|
|
||||||
tauri-build = { git = "https://github.com/tauri-apps/tauri.git", tag = "tauri-cef-v3.0.0-alpha.13" }
|
|
||||||
|
|||||||
@@ -1,5 +1,18 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## \[2.0.42]
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
|
||||||
|
- Upgraded to `dialog-js@2.7.2`
|
||||||
|
- Upgraded to `store-js@2.4.4`
|
||||||
|
|
||||||
|
## \[2.0.41]
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
|
||||||
|
- Upgraded to `log-js@2.9.0`
|
||||||
|
|
||||||
## \[2.0.40]
|
## \[2.0.40]
|
||||||
|
|
||||||
### Dependencies
|
### Dependencies
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en" theme="dark">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta
|
<meta
|
||||||
name="viewport"
|
name="viewport"
|
||||||
content="width=device-width, initial-scale=1.0, viewport-fit=cover, user-scalable=0"
|
content="width=device-width, initial-scale=1.0, viewport-fit=cover, user-scalable=0"
|
||||||
/>
|
/>
|
||||||
<title>Svelte + Vite App</title>
|
<meta name="color-scheme" content="dark light" />
|
||||||
|
<title>API Example App</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
+21
-21
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "api",
|
"name": "api",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "2.0.40",
|
"version": "2.0.42",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --clearScreen false",
|
"dev": "vite --clearScreen false",
|
||||||
@@ -11,32 +11,32 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^2.11.0",
|
"@tauri-apps/api": "^2.11.0",
|
||||||
"@tauri-apps/plugin-barcode-scanner": "^2.4.5",
|
"@tauri-apps/plugin-barcode-scanner": "workspace:*",
|
||||||
"@tauri-apps/plugin-biometric": "^2.3.2",
|
"@tauri-apps/plugin-biometric": "workspace:*",
|
||||||
"@tauri-apps/plugin-cli": "^2.4.1",
|
"@tauri-apps/plugin-cli": "workspace:*",
|
||||||
"@tauri-apps/plugin-clipboard-manager": "^2.3.2",
|
"@tauri-apps/plugin-clipboard-manager": "workspace:*",
|
||||||
"@tauri-apps/plugin-dialog": "^2.7.1",
|
"@tauri-apps/plugin-dialog": "2",
|
||||||
"@tauri-apps/plugin-fs": "^2.5.1",
|
"@tauri-apps/plugin-fs": "workspace:*",
|
||||||
"@tauri-apps/plugin-geolocation": "^2.3.2",
|
"@tauri-apps/plugin-geolocation": "workspace:*",
|
||||||
"@tauri-apps/plugin-global-shortcut": "^2.3.2",
|
"@tauri-apps/plugin-global-shortcut": "workspace:*",
|
||||||
"@tauri-apps/plugin-haptics": "^2.3.2",
|
"@tauri-apps/plugin-haptics": "workspace:*",
|
||||||
"@tauri-apps/plugin-http": "^2.5.9",
|
"@tauri-apps/plugin-http": "workspace:*",
|
||||||
"@tauri-apps/plugin-nfc": "^2.3.5",
|
"@tauri-apps/plugin-nfc": "workspace:*",
|
||||||
"@tauri-apps/plugin-notification": "^2.3.3",
|
"@tauri-apps/plugin-notification": "workspace:*",
|
||||||
"@tauri-apps/plugin-opener": "^2.5.4",
|
"@tauri-apps/plugin-opener": "workspace:*",
|
||||||
"@tauri-apps/plugin-os": "^2.3.2",
|
"@tauri-apps/plugin-os": "workspace:*",
|
||||||
"@tauri-apps/plugin-process": "^2.3.1",
|
"@tauri-apps/plugin-process": "workspace:*",
|
||||||
"@tauri-apps/plugin-shell": "^2.3.5",
|
"@tauri-apps/plugin-shell": "workspace:*",
|
||||||
"@tauri-apps/plugin-store": "^2.4.3",
|
"@tauri-apps/plugin-store": "2",
|
||||||
"@tauri-apps/plugin-updater": "^2.10.1",
|
"@tauri-apps/plugin-updater": "workspace:*",
|
||||||
"@tauri-apps/plugin-upload": "^2.4.0",
|
"@tauri-apps/plugin-upload": "workspace:*",
|
||||||
"@zerodevx/svelte-json-view": "1.0.11"
|
"@zerodevx/svelte-json-view": "1.0.11"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@iconify-json/codicon": "^1.2.49",
|
"@iconify-json/codicon": "^1.2.49",
|
||||||
"@iconify-json/ph": "^1.2.2",
|
"@iconify-json/ph": "^1.2.2",
|
||||||
"@sveltejs/vite-plugin-svelte": "^7.0.0",
|
"@sveltejs/vite-plugin-svelte": "^7.0.0",
|
||||||
"@tauri-apps/cli-cef": "3.0.0-alpha.6",
|
"@tauri-apps/cli": "2.11.4",
|
||||||
"@unocss/extractor-svelte": "^66.6.7",
|
"@unocss/extractor-svelte": "^66.6.7",
|
||||||
"svelte": "^5.54.0",
|
"svelte": "^5.54.0",
|
||||||
"unocss": "^66.6.7",
|
"unocss": "^66.6.7",
|
||||||
|
|||||||
@@ -1,5 +1,18 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## \[2.0.46]
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
|
||||||
|
- Upgraded to `dialog@2.7.2`
|
||||||
|
- Upgraded to `store@2.4.4`
|
||||||
|
|
||||||
|
## \[2.0.45]
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
|
||||||
|
- Upgraded to `log@2.9.0`
|
||||||
|
|
||||||
## \[2.0.44]
|
## \[2.0.44]
|
||||||
|
|
||||||
### Dependencies
|
### Dependencies
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "api"
|
name = "api"
|
||||||
publish = false
|
publish = false
|
||||||
version = "2.0.44"
|
version = "2.0.46"
|
||||||
description = "An example Tauri Application showcasing the api"
|
description = "An example Tauri Application showcasing the api"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
rust-version = { workspace = true }
|
rust-version = { workspace = true }
|
||||||
@@ -20,12 +20,12 @@ serde = { workspace = true }
|
|||||||
tiny_http = "0.12"
|
tiny_http = "0.12"
|
||||||
time = "0.3"
|
time = "0.3"
|
||||||
log = { workspace = true }
|
log = { workspace = true }
|
||||||
tauri-plugin-log = { path = "../../../plugins/log", version = "2.8.0" }
|
tauri-plugin-log = { path = "../../../plugins/log", version = "2.9.0" }
|
||||||
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.5.1", features = [
|
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.5.1", features = [
|
||||||
"watch",
|
"watch",
|
||||||
] }
|
] }
|
||||||
tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.3.2" }
|
tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.3.2" }
|
||||||
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.7.1" }
|
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.7.2" }
|
||||||
tauri-plugin-http = { path = "../../../plugins/http", features = [
|
tauri-plugin-http = { path = "../../../plugins/http", features = [
|
||||||
"multipart",
|
"multipart",
|
||||||
"cookies",
|
"cookies",
|
||||||
@@ -37,7 +37,7 @@ tauri-plugin-os = { path = "../../../plugins/os", version = "2.3.2" }
|
|||||||
tauri-plugin-process = { path = "../../../plugins/process", version = "2.3.1" }
|
tauri-plugin-process = { path = "../../../plugins/process", version = "2.3.1" }
|
||||||
tauri-plugin-opener = { path = "../../../plugins/opener", version = "2.5.4" }
|
tauri-plugin-opener = { path = "../../../plugins/opener", version = "2.5.4" }
|
||||||
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.3.5" }
|
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.3.5" }
|
||||||
tauri-plugin-store = { path = "../../../plugins/store", version = "2.4.3" }
|
tauri-plugin-store = { path = "../../../plugins/store", version = "2.4.4" }
|
||||||
tauri-plugin-upload = { path = "../../../plugins/upload", version = "2.3.0" }
|
tauri-plugin-upload = { path = "../../../plugins/upload", version = "2.3.0" }
|
||||||
|
|
||||||
[dependencies.tauri]
|
[dependencies.tauri]
|
||||||
|
|||||||
@@ -15,10 +15,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"core:default",
|
"core:default",
|
||||||
|
"core:app:allow-set-app-theme",
|
||||||
"fs:default",
|
"fs:default",
|
||||||
"core:window:allow-minimize",
|
"core:window:allow-minimize",
|
||||||
"core:window:allow-maximize",
|
"core:window:allow-toggle-maximize",
|
||||||
"core:window:allow-unmaximize",
|
|
||||||
"core:window:allow-close",
|
"core:window:allow-close",
|
||||||
"core:window:allow-start-dragging",
|
"core:window:allow-start-dragging",
|
||||||
"notification:default",
|
"notification:default",
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
package com.tauri.api
|
package com.tauri.api
|
||||||
|
|
||||||
class MainActivity : TauriActivity()
|
import android.os.Bundle
|
||||||
|
import androidx.activity.enableEdgeToEdge
|
||||||
|
|
||||||
|
class MainActivity : TauriActivity() {
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
enableEdgeToEdge()
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="Theme.api" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
<style name="Theme.api" parent="Theme.Material3.DayNight.NoActionBar">
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="Theme.api" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
<style name="Theme.api" parent="Theme.Material3.DayNight.NoActionBar">
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
+17
-1
@@ -21,7 +21,23 @@ open class BuildTask : DefaultTask() {
|
|||||||
runTauriCli(executable)
|
runTauriCli(executable)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
||||||
runTauriCli("$executable.cmd")
|
// Try different Windows-specific extensions
|
||||||
|
val fallbacks = listOf(
|
||||||
|
"$executable.exe",
|
||||||
|
"$executable.cmd",
|
||||||
|
"$executable.bat",
|
||||||
|
)
|
||||||
|
|
||||||
|
var lastException: Exception = e
|
||||||
|
for (fallback in fallbacks) {
|
||||||
|
try {
|
||||||
|
runTauriCli(fallback)
|
||||||
|
return
|
||||||
|
} catch (fallbackException: Exception) {
|
||||||
|
lastException = fallbackException
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw lastException
|
||||||
} else {
|
} else {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
#Tue May 10 19:22:52 CST 2022
|
#Tue May 10 19:22:52 CST 2022
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
+128
-195
@@ -1,7 +1,16 @@
|
|||||||
<script>
|
<script module lang="ts">
|
||||||
|
export type ViewProps = {
|
||||||
|
onMessage: (value: unknown) => void
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import { onMount, tick } from 'svelte'
|
||||||
import { writable } from 'svelte/store'
|
import { writable } from 'svelte/store'
|
||||||
import { getCurrentWindow } from '@tauri-apps/api/window'
|
import { MediaQuery } from 'svelte/reactivity'
|
||||||
|
import { getCurrentWindow, type Theme } from '@tauri-apps/api/window'
|
||||||
import { getCurrentWebview } from '@tauri-apps/api/webview'
|
import { getCurrentWebview } from '@tauri-apps/api/webview'
|
||||||
|
import { setTheme } from '@tauri-apps/api/app'
|
||||||
import * as os from '@tauri-apps/plugin-os'
|
import * as os from '@tauri-apps/plugin-os'
|
||||||
|
|
||||||
import Welcome from './views/Welcome.svelte'
|
import Welcome from './views/Welcome.svelte'
|
||||||
@@ -23,11 +32,10 @@
|
|||||||
import Biometric from './views/Biometric.svelte'
|
import Biometric from './views/Biometric.svelte'
|
||||||
import Geolocation from './views/Geolocation.svelte'
|
import Geolocation from './views/Geolocation.svelte'
|
||||||
import Haptics from './views/Haptics.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 Nfc from './views/Nfc.svelte'
|
||||||
|
|
||||||
|
import TitleBar from './lib/TitleBar.svelte'
|
||||||
|
|
||||||
const appWindow = getCurrentWindow()
|
const appWindow = getCurrentWindow()
|
||||||
|
|
||||||
if (appWindow.label !== 'main') {
|
if (appWindow.label !== 'main') {
|
||||||
@@ -148,114 +156,98 @@
|
|||||||
component: Haptics,
|
component: Haptics,
|
||||||
icon: 'i-ph-vibrate'
|
icon: 'i-ph-vibrate'
|
||||||
}
|
}
|
||||||
]
|
].filter(Boolean) as {
|
||||||
|
label: string
|
||||||
|
component: typeof Haptics
|
||||||
|
icon: string
|
||||||
|
}[]
|
||||||
|
let selected = $state.raw(views[0])
|
||||||
|
|
||||||
let selected = views[0]
|
// dark/light themes
|
||||||
function select(view) {
|
const preferDark = new MediaQuery('prefers-color-scheme: dark')
|
||||||
selected = view
|
let theme = $state<Theme | 'auto'>(
|
||||||
}
|
(localStorage.getItem('theme') as Theme | null) || 'auto'
|
||||||
|
)
|
||||||
|
|
||||||
// Window controls
|
async function switchTheme() {
|
||||||
let isWindowMaximized
|
switch (theme) {
|
||||||
onMount(async () => {
|
case 'dark':
|
||||||
isWindowMaximized = await appWindow.isMaximized()
|
theme = 'light'
|
||||||
appWindow.onResized(async () => {
|
break
|
||||||
isWindowMaximized = await appWindow.isMaximized()
|
case 'light':
|
||||||
})
|
theme = 'auto'
|
||||||
})
|
break
|
||||||
|
case 'auto':
|
||||||
function minimize() {
|
theme = 'dark'
|
||||||
appWindow.minimize()
|
break
|
||||||
}
|
|
||||||
|
|
||||||
async function toggleMaximize() {
|
|
||||||
;(await appWindow.isMaximized())
|
|
||||||
? appWindow.unmaximize()
|
|
||||||
: appWindow.maximize()
|
|
||||||
}
|
|
||||||
|
|
||||||
let confirmed_close = false
|
|
||||||
async function close() {
|
|
||||||
if (!confirmed_close) {
|
|
||||||
confirmed_close = await ask(
|
|
||||||
'Are you sure that you want to close this window?',
|
|
||||||
{
|
|
||||||
title: 'Tauri API'
|
|
||||||
}
|
|
||||||
)
|
|
||||||
if (confirmed_close) {
|
|
||||||
appWindow.close()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
applyTheme()
|
||||||
}
|
}
|
||||||
|
|
||||||
// dark/light
|
function applyTheme() {
|
||||||
let isDark
|
const isDark = theme === 'auto' ? preferDark.current : theme === 'dark'
|
||||||
onMount(() => {
|
if (isDark) {
|
||||||
isDark = localStorage && localStorage.getItem('theme') == 'dark'
|
document.documentElement.classList.add('dark')
|
||||||
applyTheme(isDark)
|
document.documentElement.classList.remove('light')
|
||||||
|
} else {
|
||||||
|
document.documentElement.classList.remove('dark')
|
||||||
|
document.documentElement.classList.add('light')
|
||||||
|
}
|
||||||
|
setTheme(theme === 'auto' ? null : theme)
|
||||||
|
localStorage.setItem('theme', theme)
|
||||||
|
}
|
||||||
|
|
||||||
|
$effect(() => {
|
||||||
|
applyTheme()
|
||||||
})
|
})
|
||||||
function applyTheme(isDark) {
|
|
||||||
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)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Console
|
// Console
|
||||||
let messages = writable([])
|
const messages = writable<string[]>([])
|
||||||
let consoleTextEl
|
let consoleTextEl: HTMLDivElement
|
||||||
async function onMessage(value) {
|
|
||||||
|
// this function is renders HTML without sanitizing it so it's insecure
|
||||||
|
// we only use it with our own input data
|
||||||
|
async function insecureRenderHtml(html: string) {
|
||||||
messages.update((r) => [
|
messages.update((r) => [
|
||||||
...r,
|
...r,
|
||||||
{
|
`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> ${html}</pre>`
|
||||||
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()
|
await tick()
|
||||||
if (consoleTextEl) consoleTextEl.scrollTop = consoleTextEl.scrollHeight
|
consoleTextEl.scrollTop = consoleTextEl.scrollHeight
|
||||||
}
|
}
|
||||||
|
|
||||||
// this function renders HTML without sanitizing it so it's insecure
|
async function onMessage(value: unknown) {
|
||||||
// we only use it with our own input data
|
const valueStr =
|
||||||
async function insecureRenderHtml(html) {
|
typeof value === 'string'
|
||||||
messages.update((r) => [
|
? value
|
||||||
...r,
|
: JSON.stringify(
|
||||||
{
|
value instanceof ArrayBuffer
|
||||||
html:
|
? Array.from(new Uint8Array(value))
|
||||||
`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> ` +
|
: value,
|
||||||
html +
|
null,
|
||||||
'</pre>'
|
1
|
||||||
}
|
)
|
||||||
])
|
insecureRenderHtml(valueStr)
|
||||||
await tick()
|
|
||||||
if (consoleTextEl) consoleTextEl.scrollTop = consoleTextEl.scrollHeight
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function clear() {
|
function clear() {
|
||||||
messages.update(() => [])
|
messages.update(() => [])
|
||||||
}
|
}
|
||||||
|
|
||||||
let consoleEl, consoleH, cStartY
|
let consoleEl: HTMLDivElement
|
||||||
let minConsoleHeight = 50
|
let consoleH = 0
|
||||||
function startResizingConsole(e) {
|
let cStartY = 0
|
||||||
|
const minConsoleHeight = 50
|
||||||
|
function startResizingConsole(e: MouseEvent) {
|
||||||
cStartY = e.clientY
|
cStartY = e.clientY
|
||||||
|
|
||||||
const styles = window.getComputedStyle(consoleEl)
|
const styles = window.getComputedStyle(consoleEl)
|
||||||
consoleH = parseInt(styles.height, 10)
|
consoleH = parseInt(styles.height, 10)
|
||||||
|
|
||||||
const moveHandler = (e) => {
|
const moveHandler = (e: MouseEvent) => {
|
||||||
const dy = e.clientY - cStartY
|
const dy = e.clientY - cStartY
|
||||||
const newH = consoleH - dy
|
const newH = consoleH - dy
|
||||||
consoleEl.style.height = `${
|
consoleEl.style.height = `${newH < minConsoleHeight ? minConsoleHeight : newH}px`
|
||||||
newH < minConsoleHeight ? minConsoleHeight : newH
|
|
||||||
}px`
|
|
||||||
}
|
}
|
||||||
const upHandler = () => {
|
const upHandler = () => {
|
||||||
document.removeEventListener('mouseup', upHandler)
|
document.removeEventListener('mouseup', upHandler)
|
||||||
@@ -265,21 +257,19 @@
|
|||||||
document.addEventListener('mousemove', moveHandler)
|
document.addEventListener('mousemove', moveHandler)
|
||||||
}
|
}
|
||||||
|
|
||||||
let isWindows
|
let isWindows = os.platform() === 'windows'
|
||||||
onMount(async () => {
|
|
||||||
isWindows = (await os.platform()) === 'windows'
|
|
||||||
})
|
|
||||||
|
|
||||||
// mobile
|
// mobile
|
||||||
let isSideBarOpen = false
|
let isSideBarOpen = $state(false)
|
||||||
let sidebar
|
let sidebar: HTMLElement
|
||||||
let sidebarToggle
|
let sidebarToggle: HTMLElement
|
||||||
let isDraggingSideBar = false
|
let isDraggingSideBar = false
|
||||||
let draggingStartPosX = 0
|
let draggingStartPosX = 0
|
||||||
let draggingEndPosX = 0
|
let draggingEndPosX = 0
|
||||||
const clamp = (min, num, max) => Math.min(Math.max(num, min), max)
|
const clamp = (min: number, num: number, max: number) =>
|
||||||
|
Math.min(Math.max(num, min), max)
|
||||||
|
|
||||||
function toggleSidebar(sidebar, isSideBarOpen) {
|
function toggleSidebar() {
|
||||||
sidebar.style.setProperty(
|
sidebar.style.setProperty(
|
||||||
'--translate-x',
|
'--translate-x',
|
||||||
`${isSideBarOpen ? '0' : '-18.75'}rem`
|
`${isSideBarOpen ? '0' : '-18.75'}rem`
|
||||||
@@ -287,10 +277,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
sidebar = document.querySelector('#sidebar')
|
|
||||||
sidebarToggle = document.querySelector('#sidebarToggle')
|
|
||||||
|
|
||||||
document.addEventListener('click', (e) => {
|
document.addEventListener('click', (e) => {
|
||||||
|
if (!(e.target instanceof Node)) return
|
||||||
|
|
||||||
if (sidebarToggle.contains(e.target)) {
|
if (sidebarToggle.contains(e.target)) {
|
||||||
isSideBarOpen = !isSideBarOpen
|
isSideBarOpen = !isSideBarOpen
|
||||||
} else if (isSideBarOpen && !sidebar.contains(e.target)) {
|
} else if (isSideBarOpen && !sidebar.contains(e.target)) {
|
||||||
@@ -299,6 +288,7 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
document.addEventListener('touchstart', (e) => {
|
document.addEventListener('touchstart', (e) => {
|
||||||
|
if (!(e.target instanceof Node)) return
|
||||||
if (sidebarToggle.contains(e.target)) return
|
if (sidebarToggle.contains(e.target)) return
|
||||||
|
|
||||||
const x = e.touches[0].clientX
|
const x = e.touches[0].clientX
|
||||||
@@ -330,76 +320,22 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
$: {
|
$effect(() => {
|
||||||
const sidebar = document.querySelector('#sidebar')
|
toggleSidebar()
|
||||||
if (sidebar) {
|
})
|
||||||
toggleSidebar(sidebar, isSideBarOpen)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- custom titlebar for Windows -->
|
<!-- custom titlebar for Windows -->
|
||||||
{#if isWindows}
|
{#if isWindows}
|
||||||
<div
|
<TitleBar {appWindow} {theme} {switchTheme} />
|
||||||
class="w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"
|
|
||||||
data-tauri-drag-region
|
|
||||||
>
|
|
||||||
<span class="lt-sm:pl-10 text-darkPrimaryText">Tauri API Validation</span>
|
|
||||||
<span
|
|
||||||
class="
|
|
||||||
h-100%
|
|
||||||
children:h-100% children:w-12 children:inline-flex
|
|
||||||
children:items-center children:justify-center"
|
|
||||||
>
|
|
||||||
<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>
|
|
||||||
{:else}
|
|
||||||
<div class="i-ph-moon"></div>
|
|
||||||
{/if}
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
aria-label="Minimize window"
|
|
||||||
title="Minimize"
|
|
||||||
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"></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>
|
|
||||||
{:else}
|
|
||||||
<div class="i-codicon-chrome-maximize"></div>
|
|
||||||
{/if}
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
aria-label="Close window"
|
|
||||||
title="Close"
|
|
||||||
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"></div>
|
|
||||||
</button>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<!-- Sidebar toggle, only visible on small screens -->
|
<!-- Sidebar toggle, only visible on small screens -->
|
||||||
<div
|
<div
|
||||||
id="sidebarToggle"
|
id="sidebarToggle"
|
||||||
class="z-2000 sidebar-toggle hidden lt-sm:flex justify-center absolute items-center w-8 h-8 rd-8
|
bind:this={sidebarToggle}
|
||||||
bg-accent dark:bg-darkAccent active:bg-accentDark dark:active:bg-darkAccentDark"
|
class="z-2000 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 text-accentText dark:text-darkAccentText"
|
||||||
>
|
>
|
||||||
{#if isSideBarOpen}
|
{#if isSideBarOpen}
|
||||||
<span class="i-codicon-close animate-duration-300ms animate-fade-in"></span>
|
<span class="i-codicon-close animate-duration-300ms animate-fade-in"></span>
|
||||||
@@ -409,10 +345,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="flex h-screen w-screen overflow-hidden children-pt8 children-pb-2 text-primaryText dark:text-darkPrimaryText"
|
class="flex h-screen w-screen overflow-hidden text-primaryText dark:text-darkPrimaryText"
|
||||||
>
|
>
|
||||||
<aside
|
<aside
|
||||||
id="sidebar"
|
id="sidebar"
|
||||||
|
bind:this={sidebar}
|
||||||
class="lt-sm:h-screen lt-sm:shadow-lg lt-sm:shadow lt-sm:transition-transform lt-sm:absolute lt-sm:z-1999
|
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"
|
bg-darkPrimaryLighter transition-colors-250 overflow-hidden grid select-none px-2"
|
||||||
>
|
>
|
||||||
@@ -420,13 +357,16 @@
|
|||||||
<img class="p-7" src="tauri_logo.png" alt="Tauri logo" />
|
<img class="p-7" src="tauri_logo.png" alt="Tauri logo" />
|
||||||
</a>
|
</a>
|
||||||
{#if !isWindows}
|
{#if !isWindows}
|
||||||
<a href="##" class="nv justify-between h-8" on:click={toggleDark}>
|
<a href="##" class="nv justify-between" onclick={switchTheme}>
|
||||||
{#if isDark}
|
{#if theme === 'auto'}
|
||||||
Switch to Light mode
|
|
||||||
<div class="i-ph-sun"></div>
|
|
||||||
{:else}
|
|
||||||
Switch to Dark mode
|
Switch to Dark mode
|
||||||
|
<div class="i-ph-circle-half-fill"></div>
|
||||||
|
{:else if theme === 'dark'}
|
||||||
|
Switch to Light mode
|
||||||
<div class="i-ph-moon"></div>
|
<div class="i-ph-moon"></div>
|
||||||
|
{:else if theme === 'light'}
|
||||||
|
Switch to Auto mode
|
||||||
|
<div class="i-ph-sun"></div>
|
||||||
{/if}
|
{/if}
|
||||||
</a>
|
</a>
|
||||||
<br />
|
<br />
|
||||||
@@ -435,7 +375,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<a
|
<a
|
||||||
class="nv justify-between h-8"
|
class="nv justify-between"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
href="https://tauri.app/v1/guides/"
|
href="https://tauri.app/v1/guides/"
|
||||||
>
|
>
|
||||||
@@ -443,7 +383,7 @@
|
|||||||
<span class="i-codicon-link-external"></span>
|
<span class="i-codicon-link-external"></span>
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
class="nv justify-between h-8"
|
class="nv justify-between"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
href="https://github.com/tauri-apps/tauri"
|
href="https://github.com/tauri-apps/tauri"
|
||||||
>
|
>
|
||||||
@@ -451,7 +391,7 @@
|
|||||||
<span class="i-codicon-link-external"></span>
|
<span class="i-codicon-link-external"></span>
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
class="nv justify-between h-8"
|
class="nv justify-between"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
href="https://github.com/tauri-apps/tauri/tree/dev/examples/api"
|
href="https://github.com/tauri-apps/tauri/tree/dev/examples/api"
|
||||||
>
|
>
|
||||||
@@ -461,23 +401,19 @@
|
|||||||
<br />
|
<br />
|
||||||
<div class="bg-white/5 h-2px"></div>
|
<div class="bg-white/5 h-2px"></div>
|
||||||
<br />
|
<br />
|
||||||
<div
|
<div class="flex flex-col overflow-y-auto children-flex-none gap-1">
|
||||||
class="flex flex-col overflow-y-auto children-h-10 children-flex-none gap-1"
|
|
||||||
>
|
|
||||||
{#each views as view}
|
{#each views as view}
|
||||||
{#if view}
|
<a
|
||||||
<a
|
href="##"
|
||||||
href="##"
|
class="nv {selected === view ? 'nv_selected' : ''}"
|
||||||
class="nv {selected === view ? 'nv_selected' : ''}"
|
onclick={() => {
|
||||||
on:click={() => {
|
selected = view
|
||||||
select(view)
|
isSideBarOpen = false
|
||||||
isSideBarOpen = false
|
}}
|
||||||
}}
|
>
|
||||||
>
|
<div class="{view.icon} mr-2"></div>
|
||||||
<div class="{view.icon} mr-2"></div>
|
<p>{view.label}</p></a
|
||||||
<p>{view.label}</p></a
|
>
|
||||||
>
|
|
||||||
{/if}
|
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
@@ -489,11 +425,7 @@
|
|||||||
<h1>{selected.label}</h1>
|
<h1>{selected.label}</h1>
|
||||||
<div class="overflow-y-auto">
|
<div class="overflow-y-auto">
|
||||||
<div class="mr-2">
|
<div class="mr-2">
|
||||||
<svelte:component
|
<selected.component {onMessage} />
|
||||||
this={selected.component}
|
|
||||||
{onMessage}
|
|
||||||
{insecureRenderHtml}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -503,20 +435,21 @@
|
|||||||
id="console"
|
id="console"
|
||||||
class="select-none h-15rem grid grid-rows-[2px_2rem_1fr] gap-1 overflow-hidden"
|
class="select-none h-15rem grid grid-rows-[2px_2rem_1fr] gap-1 overflow-hidden"
|
||||||
>
|
>
|
||||||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
||||||
<div
|
<div
|
||||||
on:mousedown={startResizingConsole}
|
role="button"
|
||||||
|
tabindex="0"
|
||||||
|
onmousedown={startResizingConsole}
|
||||||
class="bg-black/20 h-2px cursor-ns-resize"
|
class="bg-black/20 h-2px cursor-ns-resize"
|
||||||
></div>
|
></div>
|
||||||
<div class="flex justify-between items-center px-2">
|
<div class="flex justify-between items-center px-2">
|
||||||
<p class="font-semibold">Console</p>
|
<p class="font-semibold">Console</p>
|
||||||
<button
|
<button
|
||||||
aria-label="Clear Console"
|
aria-label="Clear Console"
|
||||||
class="cursor-pointer h-85% rd-1 p-1 flex justify-center items-center border-none bg-inherit
|
class="cursor-pointer h-85% rd-1 p-1 flex justify-center items-center border-none
|
||||||
hover:bg-hoverOverlay dark:hover:bg-darkHoverOverlay
|
hover:bg-hoverOverlay dark:hover:bg-darkHoverOverlay
|
||||||
active:bg-hoverOverlay/25 dark:active:bg-darkHoverOverlay/25
|
active:bg-hoverOverlay/25 dark:active:bg-darkHoverOverlay/25
|
||||||
"
|
"
|
||||||
on:click={clear}
|
onclick={clear}
|
||||||
>
|
>
|
||||||
<div class="i-codicon-clear-all"></div>
|
<div class="i-codicon-clear-all"></div>
|
||||||
</button>
|
</button>
|
||||||
@@ -525,8 +458,8 @@
|
|||||||
bind:this={consoleTextEl}
|
bind:this={consoleTextEl}
|
||||||
class="px-2 overflow-y-auto all:font-mono code-block all:text-xs select-text mr-2"
|
class="px-2 overflow-y-auto all:font-mono code-block all:text-xs select-text mr-2"
|
||||||
>
|
>
|
||||||
{#each $messages as r}
|
{#each $messages as messageHtml}
|
||||||
{@html r.html}
|
{@html messageHtml}
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,3 +1,14 @@
|
|||||||
|
:root {
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
:root.dark {
|
||||||
|
color-scheme: dark;
|
||||||
|
}
|
||||||
|
:root.light {
|
||||||
|
color-scheme: light;
|
||||||
|
}
|
||||||
|
|
||||||
*:not(h1, h2, h3, h4, h5, h6) {
|
*:not(h1, h2, h3, h4, h5, h6) {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@@ -8,6 +19,11 @@
|
|||||||
font-family: 'Rubik', sans-serif;
|
font-family: 'Rubik', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
color: inherit;
|
||||||
|
background-color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
width: 0.25rem;
|
width: 0.25rem;
|
||||||
height: 3px;
|
height: 3px;
|
||||||
@@ -33,27 +49,34 @@ code.code-block {
|
|||||||
width: 18.75rem;
|
width: 18.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 640px) {
|
@media screen and (width < 640px) {
|
||||||
#sidebar {
|
#sidebar {
|
||||||
--translate-x: -18.75rem;
|
--translate-x: -18.75rem;
|
||||||
transform: translateX(var(--translate-x));
|
transform: translateX(var(--translate-x));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-toggle {
|
#sidebar,
|
||||||
margin-top: 0.5rem;
|
main {
|
||||||
margin-left: 0.5rem;
|
padding-top: calc(env(safe-area-inset-top) + 2rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
#sidebar {
|
||||||
overflow: hidden;
|
padding-left: calc(env(safe-area-inset-left) + 0.5rem);
|
||||||
padding: env(safe-area-inset-top) env(safe-area-inset-right)
|
}
|
||||||
env(safe-area-inset-bottom) env(safe-area-inset-left);
|
|
||||||
|
main {
|
||||||
|
padding-right: env(safe-area-inset-right);
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebarToggle {
|
||||||
|
margin-top: calc(env(safe-area-inset-top) + 0.5rem);
|
||||||
|
margin-left: calc(env(safe-area-inset-left) + 0.5rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
#sidebar,
|
#sidebar,
|
||||||
#console {
|
#console {
|
||||||
padding-bottom: calc(env(safe-area-inset-bottom) + 24px);
|
padding-bottom: calc(env(safe-area-inset-bottom) + 1.5rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
.transparent {
|
.transparent {
|
||||||
|
|||||||
@@ -0,0 +1,103 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import type { Theme, Window } from '@tauri-apps/api/window'
|
||||||
|
import { ask } from '@tauri-apps/plugin-dialog'
|
||||||
|
import { onMount } from 'svelte'
|
||||||
|
|
||||||
|
let {
|
||||||
|
appWindow,
|
||||||
|
switchTheme,
|
||||||
|
theme
|
||||||
|
}: { appWindow: Window; switchTheme: () => void; theme: Theme | 'auto' } =
|
||||||
|
$props()
|
||||||
|
|
||||||
|
// Window controls
|
||||||
|
let isWindowMaximized = $state(false)
|
||||||
|
onMount(async () => {
|
||||||
|
isWindowMaximized = await appWindow.isMaximized()
|
||||||
|
appWindow.onResized(async () => {
|
||||||
|
isWindowMaximized = await appWindow.isMaximized()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
async function minimize() {
|
||||||
|
await appWindow.minimize()
|
||||||
|
}
|
||||||
|
|
||||||
|
async function toggleMaximize() {
|
||||||
|
await appWindow.toggleMaximize()
|
||||||
|
}
|
||||||
|
|
||||||
|
let confirmedClose = false
|
||||||
|
async function close() {
|
||||||
|
if (!confirmedClose) {
|
||||||
|
confirmedClose = await ask(
|
||||||
|
'Are you sure that you want to close this window?',
|
||||||
|
{
|
||||||
|
title: 'Tauri API'
|
||||||
|
}
|
||||||
|
)
|
||||||
|
if (confirmedClose) {
|
||||||
|
appWindow.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="w-screen select-none h-8 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"
|
||||||
|
data-tauri-drag-region
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="h-100% pl-2 flex-1 flex items-center lt-sm:pl-10 lt-lg:text-darkPrimaryText [app-region:drag]"
|
||||||
|
>Tauri API Validation</span
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="
|
||||||
|
h-100%
|
||||||
|
children:h-100% children:w-12 children:inline-flex
|
||||||
|
children:items-center children:justify-center"
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
aria-label="Toggle dark mode"
|
||||||
|
title={theme ? 'Switch to Light mode' : 'Switch to Dark mode'}
|
||||||
|
class="border-none hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"
|
||||||
|
onclick={switchTheme}
|
||||||
|
>
|
||||||
|
{#if theme === 'auto'}
|
||||||
|
<div title="Switch to Dark mode" class="i-ph-circle-half-fill"></div>
|
||||||
|
{:else if theme === 'dark'}
|
||||||
|
<div title="Switch to Light mode" class="i-ph-moon"></div>
|
||||||
|
{:else if theme === 'light'}
|
||||||
|
<div title="Switch to Auto mode" class="i-ph-sun"></div>
|
||||||
|
{/if}
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
aria-label="Minimize window"
|
||||||
|
title="Minimize"
|
||||||
|
class="border-none hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"
|
||||||
|
onclick={minimize}
|
||||||
|
>
|
||||||
|
<div class="i-codicon-chrome-minimize"></div>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
aria-label="Maximize window"
|
||||||
|
title={isWindowMaximized ? 'Restore' : 'Maximize'}
|
||||||
|
class="border-none hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"
|
||||||
|
onclick={toggleMaximize}
|
||||||
|
>
|
||||||
|
{#if isWindowMaximized}
|
||||||
|
<div class="i-codicon-chrome-restore"></div>
|
||||||
|
{:else}
|
||||||
|
<div class="i-codicon-chrome-maximize"></div>
|
||||||
|
{/if}
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
aria-label="Close window"
|
||||||
|
title="Close"
|
||||||
|
class="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"
|
||||||
|
onclick={close}
|
||||||
|
>
|
||||||
|
<div class="i-codicon-chrome-close"></div>
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
@@ -5,7 +5,6 @@
|
|||||||
import { readFile } from '@tauri-apps/plugin-fs'
|
import { readFile } from '@tauri-apps/plugin-fs'
|
||||||
|
|
||||||
export let onMessage
|
export let onMessage
|
||||||
export let insecureRenderHtml
|
|
||||||
let text = 'clipboard message'
|
let text = 'clipboard message'
|
||||||
|
|
||||||
function writeText() {
|
function writeText() {
|
||||||
@@ -41,7 +40,7 @@
|
|||||||
const image = await clipboard.readImage()
|
const image = await clipboard.readImage()
|
||||||
arrayBufferToBase64(await image.rgba(), function (base64) {
|
arrayBufferToBase64(await image.rgba(), function (base64) {
|
||||||
const src = 'data:image/png;base64,' + base64
|
const src = 'data:image/png;base64,' + base64
|
||||||
insecureRenderHtml('<img src="' + src + '"></img>')
|
onMessage('<img src="' + src + '"></img>')
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
|
|||||||
@@ -1,129 +1,138 @@
|
|||||||
<script>
|
<script lang="ts">
|
||||||
import { open, save, confirm, message } from "@tauri-apps/plugin-dialog";
|
import {
|
||||||
import { readFile } from "@tauri-apps/plugin-fs";
|
open,
|
||||||
|
save,
|
||||||
|
confirm,
|
||||||
|
message,
|
||||||
|
type PickerMode,
|
||||||
|
type FileAccessMode
|
||||||
|
} from '@tauri-apps/plugin-dialog'
|
||||||
|
import { readFile } from '@tauri-apps/plugin-fs'
|
||||||
|
import type { ViewProps } from '../App.svelte'
|
||||||
|
|
||||||
export let onMessage;
|
let { onMessage }: ViewProps = $props()
|
||||||
export let insecureRenderHtml;
|
|
||||||
let defaultPath = null;
|
|
||||||
let filter = null;
|
|
||||||
let multiple = false;
|
|
||||||
let directory = false;
|
|
||||||
let pickerMode = "document";
|
|
||||||
let fileAccessMode = "scoped";
|
|
||||||
|
|
||||||
function arrayBufferToBase64(buffer, callback) {
|
let defaultPath: string | undefined = $state()
|
||||||
|
let filter = $state('')
|
||||||
|
let multiple = $state(false)
|
||||||
|
let directory = $state(false)
|
||||||
|
let pickerMode: PickerMode = $state('document')
|
||||||
|
let fileAccessMode: FileAccessMode = $state('scoped')
|
||||||
|
|
||||||
|
function arrayBufferToBase64(
|
||||||
|
buffer: ArrayBuffer,
|
||||||
|
callback: (base64: string) => void
|
||||||
|
) {
|
||||||
var blob = new Blob([buffer], {
|
var blob = new Blob([buffer], {
|
||||||
type: "application/octet-binary",
|
type: 'application/octet-binary'
|
||||||
});
|
})
|
||||||
var reader = new FileReader();
|
var reader = new FileReader()
|
||||||
reader.onload = function (evt) {
|
reader.onload = function (evt) {
|
||||||
var dataurl = evt.target.result;
|
var dataurl = evt.target!.result as string
|
||||||
callback(dataurl.substr(dataurl.indexOf(",") + 1));
|
callback(dataurl.split(',')[1])
|
||||||
};
|
}
|
||||||
reader.readAsDataURL(blob);
|
reader.readAsDataURL(blob)
|
||||||
}
|
}
|
||||||
|
|
||||||
async function prompt() {
|
async function prompt() {
|
||||||
confirm("Do you want to do something?")
|
confirm('Do you want to do something?')
|
||||||
.then((res) => onMessage(res ? "Yes" : "No"))
|
.then((res) => onMessage(res ? 'Yes' : 'No'))
|
||||||
.catch(onMessage);
|
.catch(onMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
async function promptCustom() {
|
async function promptCustom() {
|
||||||
confirm("Is Tauri awesome?", {
|
confirm('Is Tauri awesome?', {
|
||||||
okLabel: "Absolutely",
|
okLabel: 'Absolutely',
|
||||||
cancelLabel: "Totally",
|
cancelLabel: 'Totally'
|
||||||
})
|
})
|
||||||
.then((res) =>
|
.then((res) =>
|
||||||
onMessage(
|
onMessage(
|
||||||
res ? "Tauri is absolutely awesome" : "Tauri is totally awesome"
|
res ? 'Tauri is absolutely awesome' : 'Tauri is totally awesome'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.catch(onMessage);
|
.catch(onMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
async function msg() {
|
async function msg() {
|
||||||
await message("Tauri is awesome!").then((res) => onMessage(res));
|
await message('Tauri is awesome!').then((res) => onMessage(res))
|
||||||
}
|
}
|
||||||
|
|
||||||
async function msgCustom(result) {
|
async function msgCustom() {
|
||||||
const buttons = { yes: "awesome", no: "amazing", cancel: "stunning" };
|
const buttons = { yes: 'awesome', no: 'amazing', cancel: 'stunning' }
|
||||||
await message(`Tauri is: `, { buttons })
|
await message(`Tauri is: `, { buttons })
|
||||||
.then((res) => onMessage(`Tauri is ${res}`))
|
.then((res) => onMessage(`Tauri is ${res}`))
|
||||||
.catch(onMessage);
|
.catch(onMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
async function openDialog() {
|
async function openDialog() {
|
||||||
try {
|
try {
|
||||||
var result = await open({
|
const result = await open({
|
||||||
title: "My wonderful open dialog",
|
title: 'My wonderful open dialog',
|
||||||
defaultPath,
|
defaultPath,
|
||||||
filters: filter
|
filters: filter
|
||||||
? [
|
? [
|
||||||
{
|
{
|
||||||
name: "Tauri Example",
|
name: 'Tauri Example',
|
||||||
extensions: filter.split(",").map((f) => f.trim()),
|
extensions: filter.split(',').map((f) => f.trim())
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
: [],
|
: [],
|
||||||
multiple,
|
multiple,
|
||||||
directory,
|
directory,
|
||||||
pickerMode,
|
pickerMode,
|
||||||
fileAccessMode,
|
fileAccessMode
|
||||||
})
|
})
|
||||||
|
|
||||||
if (Array.isArray(result)) {
|
if (Array.isArray(result)) {
|
||||||
onMessage(result);
|
onMessage(result)
|
||||||
|
} else if (result === null) {
|
||||||
|
onMessage('user cancelled the selection')
|
||||||
} else {
|
} else {
|
||||||
var pathToRead = result;
|
const pathToRead = result
|
||||||
var isFile = pathToRead.match(/\S+\.\S+$/g);
|
const isFile = pathToRead.match(/\S+\.\S+$/g)
|
||||||
|
|
||||||
await readFile(pathToRead)
|
await readFile(pathToRead).then(function (res) {
|
||||||
.then(function (res) {
|
if (isFile) {
|
||||||
if (isFile) {
|
if (
|
||||||
if (
|
pathToRead.includes('.png')
|
||||||
pathToRead.includes(".png") ||
|
|| pathToRead.includes('.jpg')
|
||||||
pathToRead.includes(".jpg") ||
|
|| pathToRead.includes('.jpeg')
|
||||||
pathToRead.includes(".jpeg")
|
) {
|
||||||
) {
|
arrayBufferToBase64(res.buffer, function (base64) {
|
||||||
arrayBufferToBase64(
|
const src = 'data:image/png;base64,' + base64
|
||||||
new Uint8Array(res),
|
onMessage('<img src="' + src + '"></img>')
|
||||||
function (base64) {
|
})
|
||||||
var src = "data:image/png;base64," + base64;
|
|
||||||
insecureRenderHtml('<img src="' + src + '"></img>');
|
|
||||||
}
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
// Convert byte array to UTF-8 string
|
|
||||||
const decoder = new TextDecoder('utf-8');
|
|
||||||
const text = decoder.decode(new Uint8Array(res));
|
|
||||||
onMessage(text);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
onMessage(res);
|
// Convert byte array to UTF-8 string
|
||||||
|
const decoder = new TextDecoder('utf-8')
|
||||||
|
const text = decoder.decode(res)
|
||||||
|
onMessage(text)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
onMessage(res)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} catch(exception) {
|
} catch (exception) {
|
||||||
onMessage(exception)
|
onMessage(exception)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveDialog() {
|
function saveDialog() {
|
||||||
save({
|
save({
|
||||||
title: "My wonderful save dialog",
|
title: 'My wonderful save dialog',
|
||||||
defaultPath,
|
defaultPath,
|
||||||
filters: filter
|
filters: filter
|
||||||
? [
|
? [
|
||||||
{
|
{
|
||||||
name: "Tauri Example",
|
name: 'Tauri Example',
|
||||||
extensions: filter.split(",").map((f) => f.trim()),
|
extensions: filter.split(',').map((f) => f.trim())
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
: [],
|
: []
|
||||||
})
|
})
|
||||||
.then(onMessage)
|
.then(onMessage)
|
||||||
.catch(onMessage);
|
.catch(onMessage)
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -171,15 +180,16 @@
|
|||||||
<br />
|
<br />
|
||||||
|
|
||||||
<div class="flex flex-wrap flex-col md:flex-row gap-2 children:flex-shrink-0">
|
<div class="flex flex-wrap flex-col md:flex-row gap-2 children:flex-shrink-0">
|
||||||
<button class="btn" id="open-dialog" on:click={openDialog}>Open dialog</button>
|
<button class="btn" id="open-dialog" onclick={openDialog}>Open dialog</button>
|
||||||
<button class="btn" id="save-dialog" on:click={saveDialog}
|
<button class="btn" id="save-dialog" onclick={saveDialog}
|
||||||
>Open save dialog</button
|
>Open save dialog</button
|
||||||
>
|
>
|
||||||
<button class="btn" id="prompt-dialog" on:click={prompt}>Prompt</button>
|
<button class="btn" id="prompt-dialog" onclick={prompt}>Prompt</button>
|
||||||
<button class="btn" id="custom-prompt-dialog" on:click={promptCustom}
|
<button class="btn" id="custom-prompt-dialog" onclick={promptCustom}
|
||||||
>Prompt (custom)</button
|
>Prompt (custom)</button
|
||||||
>
|
>
|
||||||
<button class="btn" id="message-dialog" on:click={msg}>Message</button>
|
<button class="btn" id="message-dialog" onclick={msg}>Message</button>
|
||||||
<button class="btn" id="message-dialog" on:click={msgCustom}>Message (custom)</button>
|
<button class="btn" id="message-dialog" onclick={msgCustom}
|
||||||
|
>Message (custom)</button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
import { arrayBufferToBase64 } from '../lib/utils'
|
import { arrayBufferToBase64 } from '../lib/utils'
|
||||||
import { onDestroy, onMount } from 'svelte'
|
import { onDestroy, onMount } from 'svelte'
|
||||||
|
|
||||||
const { onMessage, insecureRenderHtml } = $props()
|
const { onMessage } = $props()
|
||||||
|
|
||||||
let path = $state('')
|
let path = $state('')
|
||||||
let img
|
let img
|
||||||
@@ -118,12 +118,12 @@
|
|||||||
new Uint8Array(response),
|
new Uint8Array(response),
|
||||||
function (base64) {
|
function (base64) {
|
||||||
const src = 'data:image/png;base64,' + base64
|
const src = 'data:image/png;base64,' + base64
|
||||||
insecureRenderHtml('<img src="' + src + '"></img>')
|
onMessage('<img src="' + src + '"></img>')
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
const value = String.fromCharCode.apply(null, response)
|
const value = String.fromCharCode.apply(null, response)
|
||||||
insecureRenderHtml(
|
onMessage(
|
||||||
'<textarea id="file-response"></textarea><button id="file-save">Save</button>'
|
'<textarea id="file-response"></textarea><button id="file-save">Save</button>'
|
||||||
)
|
)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
+1
-11
@@ -25,15 +25,5 @@
|
|||||||
"typescript-eslint": "8.58.2"
|
"typescript-eslint": "8.58.2"
|
||||||
},
|
},
|
||||||
"minimumReleaseAge": 4320,
|
"minimumReleaseAge": 4320,
|
||||||
"pnpm": {
|
"packageManager": "pnpm@11.13.0"
|
||||||
"overrides": {
|
|
||||||
"esbuild@<0.25.0": ">=0.25.0"
|
|
||||||
},
|
|
||||||
"onlyBuiltDependencies": [
|
|
||||||
"esbuild"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"pnpm": "^10.16.0"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-disable"
|
||||||
|
description = "Enables the disable command without any pre-configured scope."
|
||||||
|
commands.allow = ["disable"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-disable"
|
||||||
|
description = "Denies the disable command without any pre-configured scope."
|
||||||
|
commands.deny = ["disable"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-enable"
|
||||||
|
description = "Enables the enable command without any pre-configured scope."
|
||||||
|
commands.allow = ["enable"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-enable"
|
||||||
|
description = "Denies the enable command without any pre-configured scope."
|
||||||
|
commands.deny = ["enable"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-is-enabled"
|
||||||
|
description = "Enables the is_enabled command without any pre-configured scope."
|
||||||
|
commands.allow = ["is_enabled"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-is-enabled"
|
||||||
|
description = "Denies the is_enabled command without any pre-configured scope."
|
||||||
|
commands.deny = ["is_enabled"]
|
||||||
@@ -24,17 +24,10 @@
|
|||||||
},
|
},
|
||||||
"permission": {
|
"permission": {
|
||||||
"description": "A list of inlined permissions",
|
"description": "A list of inlined permissions",
|
||||||
|
"default": [],
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/Permission"
|
"$ref": "#/definitions/Permission"
|
||||||
},
|
|
||||||
"default": []
|
|
||||||
},
|
|
||||||
"commands": {
|
|
||||||
"description": "A list of command names that get `allow-$command` and `deny-$command` permissions\nautogenerated on demand instead of being stored as explicit permissions.\n\nSee [`Manifest::command_permission`] and the ACL resolver for how these are expanded.",
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -42,6 +35,9 @@
|
|||||||
"DefaultPermission": {
|
"DefaultPermission": {
|
||||||
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
|
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"permissions"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"version": {
|
"version": {
|
||||||
"description": "The version of the permission.",
|
"description": "The version of the permission.",
|
||||||
@@ -50,10 +46,10 @@
|
|||||||
"null"
|
"null"
|
||||||
],
|
],
|
||||||
"format": "uint64",
|
"format": "uint64",
|
||||||
"minimum": 1
|
"minimum": 1.0
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "Human-readable description of what the permission does.\nTauri convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
|
"description": "Human-readable description of what the permission does. Tauri convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.",
|
||||||
"type": [
|
"type": [
|
||||||
"string",
|
"string",
|
||||||
"null"
|
"null"
|
||||||
@@ -66,14 +62,16 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"required": [
|
|
||||||
"permissions"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"PermissionSet": {
|
"PermissionSet": {
|
||||||
"description": "A set of direct permissions grouped together under a new name.",
|
"description": "A set of direct permissions grouped together under a new name.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"description",
|
||||||
|
"identifier",
|
||||||
|
"permissions"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"identifier": {
|
"identifier": {
|
||||||
"description": "A unique identifier for the permission.",
|
"description": "A unique identifier for the permission.",
|
||||||
@@ -87,19 +85,17 @@
|
|||||||
"description": "All permissions this set contains.",
|
"description": "All permissions this set contains.",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"$ref": "#/definitions/PermissionKind"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"required": [
|
|
||||||
"identifier",
|
|
||||||
"description",
|
|
||||||
"permissions"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"Permission": {
|
"Permission": {
|
||||||
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
|
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"identifier"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"version": {
|
"version": {
|
||||||
"description": "The version of the permission.",
|
"description": "The version of the permission.",
|
||||||
@@ -108,14 +104,14 @@
|
|||||||
"null"
|
"null"
|
||||||
],
|
],
|
||||||
"format": "uint64",
|
"format": "uint64",
|
||||||
"minimum": 1
|
"minimum": 1.0
|
||||||
},
|
},
|
||||||
"identifier": {
|
"identifier": {
|
||||||
"description": "A unique identifier for the permission.",
|
"description": "A unique identifier for the permission.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "Human-readable description of what the permission does.\nTauri internal convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
|
"description": "Human-readable description of what the permission does. Tauri internal convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.",
|
||||||
"type": [
|
"type": [
|
||||||
"string",
|
"string",
|
||||||
"null"
|
"null"
|
||||||
@@ -151,10 +147,7 @@
|
|||||||
"$ref": "#/definitions/Target"
|
"$ref": "#/definitions/Target"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"required": [
|
|
||||||
"identifier"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"Commands": {
|
"Commands": {
|
||||||
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
|
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
|
||||||
@@ -162,24 +155,24 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"allow": {
|
"allow": {
|
||||||
"description": "Allowed command.",
|
"description": "Allowed command.",
|
||||||
|
"default": [],
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
}
|
||||||
"default": []
|
|
||||||
},
|
},
|
||||||
"deny": {
|
"deny": {
|
||||||
"description": "Denied command, which takes priority.",
|
"description": "Denied command, which takes priority.",
|
||||||
|
"default": [],
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
}
|
||||||
"default": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Scopes": {
|
"Scopes": {
|
||||||
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```",
|
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"allow": {
|
"allow": {
|
||||||
@@ -264,27 +257,84 @@
|
|||||||
{
|
{
|
||||||
"description": "MacOS.",
|
"description": "MacOS.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "macOS"
|
"enum": [
|
||||||
|
"macOS"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Windows.",
|
"description": "Windows.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "windows"
|
"enum": [
|
||||||
|
"windows"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Linux.",
|
"description": "Linux.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "linux"
|
"enum": [
|
||||||
|
"linux"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Android.",
|
"description": "Android.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "android"
|
"enum": [
|
||||||
|
"android"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "iOS.",
|
"description": "iOS.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "iOS"
|
"enum": [
|
||||||
|
"iOS"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"PermissionKind": {
|
||||||
|
"type": "string",
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"description": "Enables the disable command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "allow-disable",
|
||||||
|
"markdownDescription": "Enables the disable command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the disable command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "deny-disable",
|
||||||
|
"markdownDescription": "Denies the disable command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the enable command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "allow-enable",
|
||||||
|
"markdownDescription": "Enables the enable command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the enable command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "deny-enable",
|
||||||
|
"markdownDescription": "Denies the enable command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the is_enabled command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "allow-is-enabled",
|
||||||
|
"markdownDescription": "Enables the is_enabled command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the is_enabled command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "deny-is-enabled",
|
||||||
|
"markdownDescription": "Denies the is_enabled command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "This permission set configures if your\napplication can enable or disable auto\nstarting the application on boot.\n\n#### Granted Permissions\n\nIt allows all to check, enable and\ndisable the automatic start on boot.\n\n\n#### This default permission set includes:\n\n- `allow-enable`\n- `allow-disable`\n- `allow-is-enabled`",
|
||||||
|
"type": "string",
|
||||||
|
"const": "default",
|
||||||
|
"markdownDescription": "This permission set configures if your\napplication can enable or disable auto\nstarting the application on boot.\n\n#### Granted Permissions\n\nIt allows all to check, enable and\ndisable the automatic start on boot.\n\n\n#### This default permission set includes:\n\n- `allow-enable`\n- `allow-disable`\n- `allow-is-enabled`"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-cancel"
|
||||||
|
description = "Enables the cancel command without any pre-configured scope."
|
||||||
|
commands.allow = ["cancel"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-cancel"
|
||||||
|
description = "Denies the cancel command without any pre-configured scope."
|
||||||
|
commands.deny = ["cancel"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-check-permissions"
|
||||||
|
description = "Enables the check_permissions command without any pre-configured scope."
|
||||||
|
commands.allow = ["check_permissions"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-check-permissions"
|
||||||
|
description = "Denies the check_permissions command without any pre-configured scope."
|
||||||
|
commands.deny = ["check_permissions"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-open-app-settings"
|
||||||
|
description = "Enables the open_app_settings command without any pre-configured scope."
|
||||||
|
commands.allow = ["open_app_settings"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-open-app-settings"
|
||||||
|
description = "Denies the open_app_settings command without any pre-configured scope."
|
||||||
|
commands.deny = ["open_app_settings"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-request-permissions"
|
||||||
|
description = "Enables the request_permissions command without any pre-configured scope."
|
||||||
|
commands.allow = ["request_permissions"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-request-permissions"
|
||||||
|
description = "Denies the request_permissions command without any pre-configured scope."
|
||||||
|
commands.deny = ["request_permissions"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-scan"
|
||||||
|
description = "Enables the scan command without any pre-configured scope."
|
||||||
|
commands.allow = ["scan"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-scan"
|
||||||
|
description = "Denies the scan command without any pre-configured scope."
|
||||||
|
commands.deny = ["scan"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-vibrate"
|
||||||
|
description = "Enables the vibrate command without any pre-configured scope."
|
||||||
|
commands.allow = ["vibrate"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-vibrate"
|
||||||
|
description = "Denies the vibrate command without any pre-configured scope."
|
||||||
|
commands.deny = ["vibrate"]
|
||||||
@@ -24,17 +24,10 @@
|
|||||||
},
|
},
|
||||||
"permission": {
|
"permission": {
|
||||||
"description": "A list of inlined permissions",
|
"description": "A list of inlined permissions",
|
||||||
|
"default": [],
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/Permission"
|
"$ref": "#/definitions/Permission"
|
||||||
},
|
|
||||||
"default": []
|
|
||||||
},
|
|
||||||
"commands": {
|
|
||||||
"description": "A list of command names that get `allow-$command` and `deny-$command` permissions\nautogenerated on demand instead of being stored as explicit permissions.\n\nSee [`Manifest::command_permission`] and the ACL resolver for how these are expanded.",
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -42,6 +35,9 @@
|
|||||||
"DefaultPermission": {
|
"DefaultPermission": {
|
||||||
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
|
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"permissions"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"version": {
|
"version": {
|
||||||
"description": "The version of the permission.",
|
"description": "The version of the permission.",
|
||||||
@@ -50,10 +46,10 @@
|
|||||||
"null"
|
"null"
|
||||||
],
|
],
|
||||||
"format": "uint64",
|
"format": "uint64",
|
||||||
"minimum": 1
|
"minimum": 1.0
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "Human-readable description of what the permission does.\nTauri convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
|
"description": "Human-readable description of what the permission does. Tauri convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.",
|
||||||
"type": [
|
"type": [
|
||||||
"string",
|
"string",
|
||||||
"null"
|
"null"
|
||||||
@@ -66,14 +62,16 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"required": [
|
|
||||||
"permissions"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"PermissionSet": {
|
"PermissionSet": {
|
||||||
"description": "A set of direct permissions grouped together under a new name.",
|
"description": "A set of direct permissions grouped together under a new name.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"description",
|
||||||
|
"identifier",
|
||||||
|
"permissions"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"identifier": {
|
"identifier": {
|
||||||
"description": "A unique identifier for the permission.",
|
"description": "A unique identifier for the permission.",
|
||||||
@@ -87,19 +85,17 @@
|
|||||||
"description": "All permissions this set contains.",
|
"description": "All permissions this set contains.",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"$ref": "#/definitions/PermissionKind"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"required": [
|
|
||||||
"identifier",
|
|
||||||
"description",
|
|
||||||
"permissions"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"Permission": {
|
"Permission": {
|
||||||
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
|
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"identifier"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"version": {
|
"version": {
|
||||||
"description": "The version of the permission.",
|
"description": "The version of the permission.",
|
||||||
@@ -108,14 +104,14 @@
|
|||||||
"null"
|
"null"
|
||||||
],
|
],
|
||||||
"format": "uint64",
|
"format": "uint64",
|
||||||
"minimum": 1
|
"minimum": 1.0
|
||||||
},
|
},
|
||||||
"identifier": {
|
"identifier": {
|
||||||
"description": "A unique identifier for the permission.",
|
"description": "A unique identifier for the permission.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "Human-readable description of what the permission does.\nTauri internal convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
|
"description": "Human-readable description of what the permission does. Tauri internal convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.",
|
||||||
"type": [
|
"type": [
|
||||||
"string",
|
"string",
|
||||||
"null"
|
"null"
|
||||||
@@ -151,10 +147,7 @@
|
|||||||
"$ref": "#/definitions/Target"
|
"$ref": "#/definitions/Target"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"required": [
|
|
||||||
"identifier"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"Commands": {
|
"Commands": {
|
||||||
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
|
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
|
||||||
@@ -162,24 +155,24 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"allow": {
|
"allow": {
|
||||||
"description": "Allowed command.",
|
"description": "Allowed command.",
|
||||||
|
"default": [],
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
}
|
||||||
"default": []
|
|
||||||
},
|
},
|
||||||
"deny": {
|
"deny": {
|
||||||
"description": "Denied command, which takes priority.",
|
"description": "Denied command, which takes priority.",
|
||||||
|
"default": [],
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
}
|
||||||
"default": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Scopes": {
|
"Scopes": {
|
||||||
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```",
|
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"allow": {
|
"allow": {
|
||||||
@@ -264,27 +257,120 @@
|
|||||||
{
|
{
|
||||||
"description": "MacOS.",
|
"description": "MacOS.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "macOS"
|
"enum": [
|
||||||
|
"macOS"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Windows.",
|
"description": "Windows.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "windows"
|
"enum": [
|
||||||
|
"windows"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Linux.",
|
"description": "Linux.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "linux"
|
"enum": [
|
||||||
|
"linux"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Android.",
|
"description": "Android.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "android"
|
"enum": [
|
||||||
|
"android"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "iOS.",
|
"description": "iOS.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "iOS"
|
"enum": [
|
||||||
|
"iOS"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"PermissionKind": {
|
||||||
|
"type": "string",
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"description": "Enables the cancel command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "allow-cancel",
|
||||||
|
"markdownDescription": "Enables the cancel command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the cancel command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "deny-cancel",
|
||||||
|
"markdownDescription": "Denies the cancel command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the check_permissions command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "allow-check-permissions",
|
||||||
|
"markdownDescription": "Enables the check_permissions command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the check_permissions command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "deny-check-permissions",
|
||||||
|
"markdownDescription": "Denies the check_permissions command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the open_app_settings command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "allow-open-app-settings",
|
||||||
|
"markdownDescription": "Enables the open_app_settings command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the open_app_settings command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "deny-open-app-settings",
|
||||||
|
"markdownDescription": "Denies the open_app_settings command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the request_permissions command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "allow-request-permissions",
|
||||||
|
"markdownDescription": "Enables the request_permissions command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the request_permissions command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "deny-request-permissions",
|
||||||
|
"markdownDescription": "Denies the request_permissions command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the scan command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "allow-scan",
|
||||||
|
"markdownDescription": "Enables the scan command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the scan command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "deny-scan",
|
||||||
|
"markdownDescription": "Denies the scan command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the vibrate command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "allow-vibrate",
|
||||||
|
"markdownDescription": "Enables the vibrate command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the vibrate command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "deny-vibrate",
|
||||||
|
"markdownDescription": "Denies the vibrate command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "This permission set configures which\nbarcode scanning features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all barcode related features.\n\n\n#### This default permission set includes:\n\n- `allow-cancel`\n- `allow-check-permissions`\n- `allow-open-app-settings`\n- `allow-request-permissions`\n- `allow-scan`\n- `allow-vibrate`",
|
||||||
|
"type": "string",
|
||||||
|
"const": "default",
|
||||||
|
"markdownDescription": "This permission set configures which\nbarcode scanning features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all barcode related features.\n\n\n#### This default permission set includes:\n\n- `allow-cancel`\n- `allow-check-permissions`\n- `allow-open-app-settings`\n- `allow-request-permissions`\n- `allow-scan`\n- `allow-vibrate`"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-authenticate"
|
||||||
|
description = "Enables the authenticate command without any pre-configured scope."
|
||||||
|
commands.allow = ["authenticate"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-authenticate"
|
||||||
|
description = "Denies the authenticate command without any pre-configured scope."
|
||||||
|
commands.deny = ["authenticate"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-status"
|
||||||
|
description = "Enables the status command without any pre-configured scope."
|
||||||
|
commands.allow = ["status"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-status"
|
||||||
|
description = "Denies the status command without any pre-configured scope."
|
||||||
|
commands.deny = ["status"]
|
||||||
@@ -24,17 +24,10 @@
|
|||||||
},
|
},
|
||||||
"permission": {
|
"permission": {
|
||||||
"description": "A list of inlined permissions",
|
"description": "A list of inlined permissions",
|
||||||
|
"default": [],
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/Permission"
|
"$ref": "#/definitions/Permission"
|
||||||
},
|
|
||||||
"default": []
|
|
||||||
},
|
|
||||||
"commands": {
|
|
||||||
"description": "A list of command names that get `allow-$command` and `deny-$command` permissions\nautogenerated on demand instead of being stored as explicit permissions.\n\nSee [`Manifest::command_permission`] and the ACL resolver for how these are expanded.",
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -42,6 +35,9 @@
|
|||||||
"DefaultPermission": {
|
"DefaultPermission": {
|
||||||
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
|
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"permissions"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"version": {
|
"version": {
|
||||||
"description": "The version of the permission.",
|
"description": "The version of the permission.",
|
||||||
@@ -50,10 +46,10 @@
|
|||||||
"null"
|
"null"
|
||||||
],
|
],
|
||||||
"format": "uint64",
|
"format": "uint64",
|
||||||
"minimum": 1
|
"minimum": 1.0
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "Human-readable description of what the permission does.\nTauri convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
|
"description": "Human-readable description of what the permission does. Tauri convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.",
|
||||||
"type": [
|
"type": [
|
||||||
"string",
|
"string",
|
||||||
"null"
|
"null"
|
||||||
@@ -66,14 +62,16 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"required": [
|
|
||||||
"permissions"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"PermissionSet": {
|
"PermissionSet": {
|
||||||
"description": "A set of direct permissions grouped together under a new name.",
|
"description": "A set of direct permissions grouped together under a new name.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"description",
|
||||||
|
"identifier",
|
||||||
|
"permissions"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"identifier": {
|
"identifier": {
|
||||||
"description": "A unique identifier for the permission.",
|
"description": "A unique identifier for the permission.",
|
||||||
@@ -87,19 +85,17 @@
|
|||||||
"description": "All permissions this set contains.",
|
"description": "All permissions this set contains.",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"$ref": "#/definitions/PermissionKind"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"required": [
|
|
||||||
"identifier",
|
|
||||||
"description",
|
|
||||||
"permissions"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"Permission": {
|
"Permission": {
|
||||||
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
|
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"identifier"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"version": {
|
"version": {
|
||||||
"description": "The version of the permission.",
|
"description": "The version of the permission.",
|
||||||
@@ -108,14 +104,14 @@
|
|||||||
"null"
|
"null"
|
||||||
],
|
],
|
||||||
"format": "uint64",
|
"format": "uint64",
|
||||||
"minimum": 1
|
"minimum": 1.0
|
||||||
},
|
},
|
||||||
"identifier": {
|
"identifier": {
|
||||||
"description": "A unique identifier for the permission.",
|
"description": "A unique identifier for the permission.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "Human-readable description of what the permission does.\nTauri internal convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
|
"description": "Human-readable description of what the permission does. Tauri internal convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.",
|
||||||
"type": [
|
"type": [
|
||||||
"string",
|
"string",
|
||||||
"null"
|
"null"
|
||||||
@@ -151,10 +147,7 @@
|
|||||||
"$ref": "#/definitions/Target"
|
"$ref": "#/definitions/Target"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"required": [
|
|
||||||
"identifier"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"Commands": {
|
"Commands": {
|
||||||
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
|
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
|
||||||
@@ -162,24 +155,24 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"allow": {
|
"allow": {
|
||||||
"description": "Allowed command.",
|
"description": "Allowed command.",
|
||||||
|
"default": [],
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
}
|
||||||
"default": []
|
|
||||||
},
|
},
|
||||||
"deny": {
|
"deny": {
|
||||||
"description": "Denied command, which takes priority.",
|
"description": "Denied command, which takes priority.",
|
||||||
|
"default": [],
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
}
|
||||||
"default": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Scopes": {
|
"Scopes": {
|
||||||
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```",
|
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"allow": {
|
"allow": {
|
||||||
@@ -264,27 +257,72 @@
|
|||||||
{
|
{
|
||||||
"description": "MacOS.",
|
"description": "MacOS.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "macOS"
|
"enum": [
|
||||||
|
"macOS"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Windows.",
|
"description": "Windows.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "windows"
|
"enum": [
|
||||||
|
"windows"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Linux.",
|
"description": "Linux.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "linux"
|
"enum": [
|
||||||
|
"linux"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Android.",
|
"description": "Android.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "android"
|
"enum": [
|
||||||
|
"android"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "iOS.",
|
"description": "iOS.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "iOS"
|
"enum": [
|
||||||
|
"iOS"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"PermissionKind": {
|
||||||
|
"type": "string",
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"description": "Enables the authenticate command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "allow-authenticate",
|
||||||
|
"markdownDescription": "Enables the authenticate command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the authenticate command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "deny-authenticate",
|
||||||
|
"markdownDescription": "Denies the authenticate command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the status command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "allow-status",
|
||||||
|
"markdownDescription": "Enables the status command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the status command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "deny-status",
|
||||||
|
"markdownDescription": "Denies the status command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "This permission set configures which\nbiometric features are by default exposed.\n\n#### Granted Permissions\n\nIt allows acccess to all biometric commands.\n\n\n#### This default permission set includes:\n\n- `allow-authenticate`\n- `allow-status`",
|
||||||
|
"type": "string",
|
||||||
|
"const": "default",
|
||||||
|
"markdownDescription": "This permission set configures which\nbiometric features are by default exposed.\n\n#### Granted Permissions\n\nIt allows acccess to all biometric commands.\n\n\n#### This default permission set includes:\n\n- `allow-authenticate`\n- `allow-status`"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-cli-matches"
|
||||||
|
description = "Enables the cli_matches command without any pre-configured scope."
|
||||||
|
commands.allow = ["cli_matches"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-cli-matches"
|
||||||
|
description = "Denies the cli_matches command without any pre-configured scope."
|
||||||
|
commands.deny = ["cli_matches"]
|
||||||
@@ -24,17 +24,10 @@
|
|||||||
},
|
},
|
||||||
"permission": {
|
"permission": {
|
||||||
"description": "A list of inlined permissions",
|
"description": "A list of inlined permissions",
|
||||||
|
"default": [],
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/Permission"
|
"$ref": "#/definitions/Permission"
|
||||||
},
|
|
||||||
"default": []
|
|
||||||
},
|
|
||||||
"commands": {
|
|
||||||
"description": "A list of command names that get `allow-$command` and `deny-$command` permissions\nautogenerated on demand instead of being stored as explicit permissions.\n\nSee [`Manifest::command_permission`] and the ACL resolver for how these are expanded.",
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -42,6 +35,9 @@
|
|||||||
"DefaultPermission": {
|
"DefaultPermission": {
|
||||||
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
|
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"permissions"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"version": {
|
"version": {
|
||||||
"description": "The version of the permission.",
|
"description": "The version of the permission.",
|
||||||
@@ -50,10 +46,10 @@
|
|||||||
"null"
|
"null"
|
||||||
],
|
],
|
||||||
"format": "uint64",
|
"format": "uint64",
|
||||||
"minimum": 1
|
"minimum": 1.0
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "Human-readable description of what the permission does.\nTauri convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
|
"description": "Human-readable description of what the permission does. Tauri convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.",
|
||||||
"type": [
|
"type": [
|
||||||
"string",
|
"string",
|
||||||
"null"
|
"null"
|
||||||
@@ -66,14 +62,16 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"required": [
|
|
||||||
"permissions"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"PermissionSet": {
|
"PermissionSet": {
|
||||||
"description": "A set of direct permissions grouped together under a new name.",
|
"description": "A set of direct permissions grouped together under a new name.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"description",
|
||||||
|
"identifier",
|
||||||
|
"permissions"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"identifier": {
|
"identifier": {
|
||||||
"description": "A unique identifier for the permission.",
|
"description": "A unique identifier for the permission.",
|
||||||
@@ -87,19 +85,17 @@
|
|||||||
"description": "All permissions this set contains.",
|
"description": "All permissions this set contains.",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"$ref": "#/definitions/PermissionKind"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"required": [
|
|
||||||
"identifier",
|
|
||||||
"description",
|
|
||||||
"permissions"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"Permission": {
|
"Permission": {
|
||||||
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
|
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"identifier"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"version": {
|
"version": {
|
||||||
"description": "The version of the permission.",
|
"description": "The version of the permission.",
|
||||||
@@ -108,14 +104,14 @@
|
|||||||
"null"
|
"null"
|
||||||
],
|
],
|
||||||
"format": "uint64",
|
"format": "uint64",
|
||||||
"minimum": 1
|
"minimum": 1.0
|
||||||
},
|
},
|
||||||
"identifier": {
|
"identifier": {
|
||||||
"description": "A unique identifier for the permission.",
|
"description": "A unique identifier for the permission.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "Human-readable description of what the permission does.\nTauri internal convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
|
"description": "Human-readable description of what the permission does. Tauri internal convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.",
|
||||||
"type": [
|
"type": [
|
||||||
"string",
|
"string",
|
||||||
"null"
|
"null"
|
||||||
@@ -151,10 +147,7 @@
|
|||||||
"$ref": "#/definitions/Target"
|
"$ref": "#/definitions/Target"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"required": [
|
|
||||||
"identifier"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"Commands": {
|
"Commands": {
|
||||||
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
|
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
|
||||||
@@ -162,24 +155,24 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"allow": {
|
"allow": {
|
||||||
"description": "Allowed command.",
|
"description": "Allowed command.",
|
||||||
|
"default": [],
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
}
|
||||||
"default": []
|
|
||||||
},
|
},
|
||||||
"deny": {
|
"deny": {
|
||||||
"description": "Denied command, which takes priority.",
|
"description": "Denied command, which takes priority.",
|
||||||
|
"default": [],
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
}
|
||||||
"default": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Scopes": {
|
"Scopes": {
|
||||||
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```",
|
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"allow": {
|
"allow": {
|
||||||
@@ -264,27 +257,60 @@
|
|||||||
{
|
{
|
||||||
"description": "MacOS.",
|
"description": "MacOS.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "macOS"
|
"enum": [
|
||||||
|
"macOS"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Windows.",
|
"description": "Windows.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "windows"
|
"enum": [
|
||||||
|
"windows"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Linux.",
|
"description": "Linux.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "linux"
|
"enum": [
|
||||||
|
"linux"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Android.",
|
"description": "Android.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "android"
|
"enum": [
|
||||||
|
"android"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "iOS.",
|
"description": "iOS.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "iOS"
|
"enum": [
|
||||||
|
"iOS"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"PermissionKind": {
|
||||||
|
"type": "string",
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"description": "Enables the cli_matches command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "allow-cli-matches",
|
||||||
|
"markdownDescription": "Enables the cli_matches command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the cli_matches command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "deny-cli-matches",
|
||||||
|
"markdownDescription": "Denies the cli_matches command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Allows reading the CLI matches\n#### This default permission set includes:\n\n- `allow-cli-matches`",
|
||||||
|
"type": "string",
|
||||||
|
"const": "default",
|
||||||
|
"markdownDescription": "Allows reading the CLI matches\n#### This default permission set includes:\n\n- `allow-cli-matches`"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-clear"
|
||||||
|
description = "Enables the clear command without any pre-configured scope."
|
||||||
|
commands.allow = ["clear"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-clear"
|
||||||
|
description = "Denies the clear command without any pre-configured scope."
|
||||||
|
commands.deny = ["clear"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-read-image"
|
||||||
|
description = "Enables the read_image command without any pre-configured scope."
|
||||||
|
commands.allow = ["read_image"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-read-image"
|
||||||
|
description = "Denies the read_image command without any pre-configured scope."
|
||||||
|
commands.deny = ["read_image"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-read-text"
|
||||||
|
description = "Enables the read_text command without any pre-configured scope."
|
||||||
|
commands.allow = ["read_text"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-read-text"
|
||||||
|
description = "Denies the read_text command without any pre-configured scope."
|
||||||
|
commands.deny = ["read_text"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-write-html"
|
||||||
|
description = "Enables the write_html command without any pre-configured scope."
|
||||||
|
commands.allow = ["write_html"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-write-html"
|
||||||
|
description = "Denies the write_html command without any pre-configured scope."
|
||||||
|
commands.deny = ["write_html"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-write-image"
|
||||||
|
description = "Enables the write_image command without any pre-configured scope."
|
||||||
|
commands.allow = ["write_image"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-write-image"
|
||||||
|
description = "Denies the write_image command without any pre-configured scope."
|
||||||
|
commands.deny = ["write_image"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-write-text"
|
||||||
|
description = "Enables the write_text command without any pre-configured scope."
|
||||||
|
commands.allow = ["write_text"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-write-text"
|
||||||
|
description = "Denies the write_text command without any pre-configured scope."
|
||||||
|
commands.deny = ["write_text"]
|
||||||
@@ -24,17 +24,10 @@
|
|||||||
},
|
},
|
||||||
"permission": {
|
"permission": {
|
||||||
"description": "A list of inlined permissions",
|
"description": "A list of inlined permissions",
|
||||||
|
"default": [],
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/Permission"
|
"$ref": "#/definitions/Permission"
|
||||||
},
|
|
||||||
"default": []
|
|
||||||
},
|
|
||||||
"commands": {
|
|
||||||
"description": "A list of command names that get `allow-$command` and `deny-$command` permissions\nautogenerated on demand instead of being stored as explicit permissions.\n\nSee [`Manifest::command_permission`] and the ACL resolver for how these are expanded.",
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -42,6 +35,9 @@
|
|||||||
"DefaultPermission": {
|
"DefaultPermission": {
|
||||||
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
|
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"permissions"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"version": {
|
"version": {
|
||||||
"description": "The version of the permission.",
|
"description": "The version of the permission.",
|
||||||
@@ -50,10 +46,10 @@
|
|||||||
"null"
|
"null"
|
||||||
],
|
],
|
||||||
"format": "uint64",
|
"format": "uint64",
|
||||||
"minimum": 1
|
"minimum": 1.0
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "Human-readable description of what the permission does.\nTauri convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
|
"description": "Human-readable description of what the permission does. Tauri convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.",
|
||||||
"type": [
|
"type": [
|
||||||
"string",
|
"string",
|
||||||
"null"
|
"null"
|
||||||
@@ -66,14 +62,16 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"required": [
|
|
||||||
"permissions"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"PermissionSet": {
|
"PermissionSet": {
|
||||||
"description": "A set of direct permissions grouped together under a new name.",
|
"description": "A set of direct permissions grouped together under a new name.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"description",
|
||||||
|
"identifier",
|
||||||
|
"permissions"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"identifier": {
|
"identifier": {
|
||||||
"description": "A unique identifier for the permission.",
|
"description": "A unique identifier for the permission.",
|
||||||
@@ -87,19 +85,17 @@
|
|||||||
"description": "All permissions this set contains.",
|
"description": "All permissions this set contains.",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"$ref": "#/definitions/PermissionKind"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"required": [
|
|
||||||
"identifier",
|
|
||||||
"description",
|
|
||||||
"permissions"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"Permission": {
|
"Permission": {
|
||||||
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
|
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"identifier"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"version": {
|
"version": {
|
||||||
"description": "The version of the permission.",
|
"description": "The version of the permission.",
|
||||||
@@ -108,14 +104,14 @@
|
|||||||
"null"
|
"null"
|
||||||
],
|
],
|
||||||
"format": "uint64",
|
"format": "uint64",
|
||||||
"minimum": 1
|
"minimum": 1.0
|
||||||
},
|
},
|
||||||
"identifier": {
|
"identifier": {
|
||||||
"description": "A unique identifier for the permission.",
|
"description": "A unique identifier for the permission.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "Human-readable description of what the permission does.\nTauri internal convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
|
"description": "Human-readable description of what the permission does. Tauri internal convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.",
|
||||||
"type": [
|
"type": [
|
||||||
"string",
|
"string",
|
||||||
"null"
|
"null"
|
||||||
@@ -151,10 +147,7 @@
|
|||||||
"$ref": "#/definitions/Target"
|
"$ref": "#/definitions/Target"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"required": [
|
|
||||||
"identifier"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"Commands": {
|
"Commands": {
|
||||||
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
|
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
|
||||||
@@ -162,24 +155,24 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"allow": {
|
"allow": {
|
||||||
"description": "Allowed command.",
|
"description": "Allowed command.",
|
||||||
|
"default": [],
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
}
|
||||||
"default": []
|
|
||||||
},
|
},
|
||||||
"deny": {
|
"deny": {
|
||||||
"description": "Denied command, which takes priority.",
|
"description": "Denied command, which takes priority.",
|
||||||
|
"default": [],
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
}
|
||||||
"default": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Scopes": {
|
"Scopes": {
|
||||||
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```",
|
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"allow": {
|
"allow": {
|
||||||
@@ -264,27 +257,120 @@
|
|||||||
{
|
{
|
||||||
"description": "MacOS.",
|
"description": "MacOS.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "macOS"
|
"enum": [
|
||||||
|
"macOS"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Windows.",
|
"description": "Windows.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "windows"
|
"enum": [
|
||||||
|
"windows"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Linux.",
|
"description": "Linux.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "linux"
|
"enum": [
|
||||||
|
"linux"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Android.",
|
"description": "Android.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "android"
|
"enum": [
|
||||||
|
"android"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "iOS.",
|
"description": "iOS.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "iOS"
|
"enum": [
|
||||||
|
"iOS"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"PermissionKind": {
|
||||||
|
"type": "string",
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"description": "Enables the clear command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "allow-clear",
|
||||||
|
"markdownDescription": "Enables the clear command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the clear command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "deny-clear",
|
||||||
|
"markdownDescription": "Denies the clear command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the read_image command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "allow-read-image",
|
||||||
|
"markdownDescription": "Enables the read_image command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the read_image command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "deny-read-image",
|
||||||
|
"markdownDescription": "Denies the read_image command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the read_text command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "allow-read-text",
|
||||||
|
"markdownDescription": "Enables the read_text command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the read_text command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "deny-read-text",
|
||||||
|
"markdownDescription": "Denies the read_text command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the write_html command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "allow-write-html",
|
||||||
|
"markdownDescription": "Enables the write_html command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the write_html command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "deny-write-html",
|
||||||
|
"markdownDescription": "Denies the write_html command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the write_image command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "allow-write-image",
|
||||||
|
"markdownDescription": "Enables the write_image command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the write_image command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "deny-write-image",
|
||||||
|
"markdownDescription": "Denies the write_image command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the write_text command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "allow-write-text",
|
||||||
|
"markdownDescription": "Enables the write_text command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the write_text command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "deny-write-text",
|
||||||
|
"markdownDescription": "Denies the write_text command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "No features are enabled by default, as we believe\nthe clipboard can be inherently dangerous and it is \napplication specific if read and/or write access is needed.\n\nClipboard interaction needs to be explicitly enabled.\n",
|
||||||
|
"type": "string",
|
||||||
|
"const": "default",
|
||||||
|
"markdownDescription": "No features are enabled by default, as we believe\nthe clipboard can be inherently dangerous and it is \napplication specific if read and/or write access is needed.\n\nClipboard interaction needs to be explicitly enabled.\n"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,10 +11,10 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^2.11.0",
|
"@tauri-apps/api": "^2.11.0",
|
||||||
"@tauri-apps/plugin-deep-link": "2.4.9"
|
"@tauri-apps/plugin-deep-link": "workspace:*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tauri-apps/cli-cef": "3.0.0-alpha.6",
|
"@tauri-apps/cli": "2.11.4",
|
||||||
"typescript": "^6.0.0",
|
"typescript": "^6.0.0",
|
||||||
"vite": "^8.0.1"
|
"vite": "^8.0.1"
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="Theme.deep_link_example" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
<style name="Theme.deep_link_example" parent="Theme.Material3.DayNight.NoActionBar">
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="Theme.deep_link_example" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
<style name="Theme.deep_link_example" parent="Theme.Material3.DayNight.NoActionBar">
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -28,6 +28,6 @@
|
|||||||
"@tauri-apps/api": "^2.11.0"
|
"@tauri-apps/api": "^2.11.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tauri-apps/cli-cef": "3.0.0-alpha.6"
|
"@tauri-apps/cli": "2.11.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-get-current"
|
||||||
|
description = "Enables the get_current command without any pre-configured scope."
|
||||||
|
commands.allow = ["get_current"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-get-current"
|
||||||
|
description = "Denies the get_current command without any pre-configured scope."
|
||||||
|
commands.deny = ["get_current"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-is-registered"
|
||||||
|
description = "Enables the is_registered command without any pre-configured scope."
|
||||||
|
commands.allow = ["is_registered"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-is-registered"
|
||||||
|
description = "Denies the is_registered command without any pre-configured scope."
|
||||||
|
commands.deny = ["is_registered"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-register"
|
||||||
|
description = "Enables the register command without any pre-configured scope."
|
||||||
|
commands.allow = ["register"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-register"
|
||||||
|
description = "Denies the register command without any pre-configured scope."
|
||||||
|
commands.deny = ["register"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-unregister"
|
||||||
|
description = "Enables the unregister command without any pre-configured scope."
|
||||||
|
commands.allow = ["unregister"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-unregister"
|
||||||
|
description = "Denies the unregister command without any pre-configured scope."
|
||||||
|
commands.deny = ["unregister"]
|
||||||
@@ -24,17 +24,10 @@
|
|||||||
},
|
},
|
||||||
"permission": {
|
"permission": {
|
||||||
"description": "A list of inlined permissions",
|
"description": "A list of inlined permissions",
|
||||||
|
"default": [],
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/Permission"
|
"$ref": "#/definitions/Permission"
|
||||||
},
|
|
||||||
"default": []
|
|
||||||
},
|
|
||||||
"commands": {
|
|
||||||
"description": "A list of command names that get `allow-$command` and `deny-$command` permissions\nautogenerated on demand instead of being stored as explicit permissions.\n\nSee [`Manifest::command_permission`] and the ACL resolver for how these are expanded.",
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -42,6 +35,9 @@
|
|||||||
"DefaultPermission": {
|
"DefaultPermission": {
|
||||||
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
|
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"permissions"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"version": {
|
"version": {
|
||||||
"description": "The version of the permission.",
|
"description": "The version of the permission.",
|
||||||
@@ -50,10 +46,10 @@
|
|||||||
"null"
|
"null"
|
||||||
],
|
],
|
||||||
"format": "uint64",
|
"format": "uint64",
|
||||||
"minimum": 1
|
"minimum": 1.0
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "Human-readable description of what the permission does.\nTauri convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
|
"description": "Human-readable description of what the permission does. Tauri convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.",
|
||||||
"type": [
|
"type": [
|
||||||
"string",
|
"string",
|
||||||
"null"
|
"null"
|
||||||
@@ -66,14 +62,16 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"required": [
|
|
||||||
"permissions"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"PermissionSet": {
|
"PermissionSet": {
|
||||||
"description": "A set of direct permissions grouped together under a new name.",
|
"description": "A set of direct permissions grouped together under a new name.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"description",
|
||||||
|
"identifier",
|
||||||
|
"permissions"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"identifier": {
|
"identifier": {
|
||||||
"description": "A unique identifier for the permission.",
|
"description": "A unique identifier for the permission.",
|
||||||
@@ -87,19 +85,17 @@
|
|||||||
"description": "All permissions this set contains.",
|
"description": "All permissions this set contains.",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"$ref": "#/definitions/PermissionKind"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"required": [
|
|
||||||
"identifier",
|
|
||||||
"description",
|
|
||||||
"permissions"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"Permission": {
|
"Permission": {
|
||||||
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
|
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"identifier"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"version": {
|
"version": {
|
||||||
"description": "The version of the permission.",
|
"description": "The version of the permission.",
|
||||||
@@ -108,14 +104,14 @@
|
|||||||
"null"
|
"null"
|
||||||
],
|
],
|
||||||
"format": "uint64",
|
"format": "uint64",
|
||||||
"minimum": 1
|
"minimum": 1.0
|
||||||
},
|
},
|
||||||
"identifier": {
|
"identifier": {
|
||||||
"description": "A unique identifier for the permission.",
|
"description": "A unique identifier for the permission.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "Human-readable description of what the permission does.\nTauri internal convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
|
"description": "Human-readable description of what the permission does. Tauri internal convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.",
|
||||||
"type": [
|
"type": [
|
||||||
"string",
|
"string",
|
||||||
"null"
|
"null"
|
||||||
@@ -151,10 +147,7 @@
|
|||||||
"$ref": "#/definitions/Target"
|
"$ref": "#/definitions/Target"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"required": [
|
|
||||||
"identifier"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"Commands": {
|
"Commands": {
|
||||||
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
|
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
|
||||||
@@ -162,24 +155,24 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"allow": {
|
"allow": {
|
||||||
"description": "Allowed command.",
|
"description": "Allowed command.",
|
||||||
|
"default": [],
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
}
|
||||||
"default": []
|
|
||||||
},
|
},
|
||||||
"deny": {
|
"deny": {
|
||||||
"description": "Denied command, which takes priority.",
|
"description": "Denied command, which takes priority.",
|
||||||
|
"default": [],
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
}
|
||||||
"default": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Scopes": {
|
"Scopes": {
|
||||||
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```",
|
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"allow": {
|
"allow": {
|
||||||
@@ -264,27 +257,96 @@
|
|||||||
{
|
{
|
||||||
"description": "MacOS.",
|
"description": "MacOS.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "macOS"
|
"enum": [
|
||||||
|
"macOS"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Windows.",
|
"description": "Windows.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "windows"
|
"enum": [
|
||||||
|
"windows"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Linux.",
|
"description": "Linux.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "linux"
|
"enum": [
|
||||||
|
"linux"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Android.",
|
"description": "Android.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "android"
|
"enum": [
|
||||||
|
"android"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "iOS.",
|
"description": "iOS.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "iOS"
|
"enum": [
|
||||||
|
"iOS"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"PermissionKind": {
|
||||||
|
"type": "string",
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"description": "Enables the get_current command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "allow-get-current",
|
||||||
|
"markdownDescription": "Enables the get_current command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the get_current command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "deny-get-current",
|
||||||
|
"markdownDescription": "Denies the get_current command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the is_registered command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "allow-is-registered",
|
||||||
|
"markdownDescription": "Enables the is_registered command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the is_registered command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "deny-is-registered",
|
||||||
|
"markdownDescription": "Denies the is_registered command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the register command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "allow-register",
|
||||||
|
"markdownDescription": "Enables the register command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the register command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "deny-register",
|
||||||
|
"markdownDescription": "Denies the register command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the unregister command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "allow-unregister",
|
||||||
|
"markdownDescription": "Enables the unregister command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the unregister command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "deny-unregister",
|
||||||
|
"markdownDescription": "Denies the unregister command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Allows reading the opened deep link via the get_current command\n#### This default permission set includes:\n\n- `allow-get-current`",
|
||||||
|
"type": "string",
|
||||||
|
"const": "default",
|
||||||
|
"markdownDescription": "Allows reading the opened deep link via the get_current command\n#### This default permission set includes:\n\n- `allow-get-current`"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -540,7 +540,7 @@ pub fn init<R: Runtime>() -> TauriPlugin<R, Option<config::Config>> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
.on_event(|_app, _event| {
|
.on_event(|_app, _event| {
|
||||||
#[cfg(desktop)]
|
#[cfg(any(target_os = "macos", target_os = "ios"))]
|
||||||
if let tauri::RunEvent::Opened { urls } = _event {
|
if let tauri::RunEvent::Opened { urls } = _event {
|
||||||
use tauri::Emitter;
|
use tauri::Emitter;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## \[2.7.2]
|
||||||
|
|
||||||
|
- [`40ae0a7f`](https://github.com/tauri-apps/plugins-workspace/commit/40ae0a7fa0ecc9b0cdbd952297f7a17f37308229) ([#3491](https://github.com/tauri-apps/plugins-workspace/pull/3491) by [@Legend-Master](https://github.com/tauri-apps/plugins-workspace/../../Legend-Master)) Use `com.google.android.material.dialog.MaterialAlertDialogBuilder` instead of `AlertDialog` so the dialog follows the app's theme
|
||||||
|
|
||||||
## \[2.7.1]
|
## \[2.7.1]
|
||||||
|
|
||||||
### Dependencies
|
### Dependencies
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tauri-plugin-dialog"
|
name = "tauri-plugin-dialog"
|
||||||
version = "2.7.1"
|
version = "2.7.2"
|
||||||
description = "Native system dialogs for opening and saving files along with message dialogs on your Tauri application."
|
description = "Native system dialogs for opening and saving files along with message dialogs on your Tauri application."
|
||||||
edition = { workspace = true }
|
edition = { workspace = true }
|
||||||
authors = { workspace = true }
|
authors = { workspace = true }
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ android {
|
|||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
implementation("androidx.core:core-ktx:1.9.0")
|
implementation("androidx.core:core-ktx:1.9.0")
|
||||||
implementation("androidx.appcompat:appcompat:1.6.0")
|
implementation("androidx.appcompat:appcompat:1.7.1")
|
||||||
implementation("com.google.android.material:material:1.7.0")
|
implementation("com.google.android.material:material:1.13.0")
|
||||||
testImplementation("junit:junit:4.13.2")
|
testImplementation("junit:junit:4.13.2")
|
||||||
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
||||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
|
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
package app.tauri.dialog
|
package app.tauri.dialog
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.app.AlertDialog
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
@@ -21,6 +20,7 @@ import app.tauri.plugin.Invoke
|
|||||||
import app.tauri.plugin.JSArray
|
import app.tauri.plugin.JSArray
|
||||||
import app.tauri.plugin.JSObject
|
import app.tauri.plugin.JSObject
|
||||||
import app.tauri.plugin.Plugin
|
import app.tauri.plugin.Plugin
|
||||||
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
|
|
||||||
@InvokeArg
|
@InvokeArg
|
||||||
class Filter {
|
class Filter {
|
||||||
@@ -158,7 +158,7 @@ class DialogPlugin(private val activity: Activity): Plugin(activity) {
|
|||||||
|
|
||||||
Handler(Looper.getMainLooper())
|
Handler(Looper.getMainLooper())
|
||||||
.post {
|
.post {
|
||||||
val builder = AlertDialog.Builder(activity)
|
val builder = MaterialAlertDialogBuilder(activity)
|
||||||
|
|
||||||
if (args.title != null) {
|
if (args.title != null) {
|
||||||
builder.setTitle(args.title)
|
builder.setTitle(args.title)
|
||||||
@@ -191,8 +191,7 @@ class DialogPlugin(private val activity: Activity): Plugin(activity) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val dialog = builder.create()
|
builder.show()
|
||||||
dialog.show()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tauri-apps/plugin-dialog",
|
"name": "@tauri-apps/plugin-dialog",
|
||||||
"version": "2.7.1",
|
"version": "2.7.2",
|
||||||
"license": "MIT OR Apache-2.0",
|
"license": "MIT OR Apache-2.0",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Tauri Programme within The Commons Conservancy"
|
"Tauri Programme within The Commons Conservancy"
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-message"
|
||||||
|
description = "Enables the message command without any pre-configured scope."
|
||||||
|
commands.allow = ["message"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-message"
|
||||||
|
description = "Denies the message command without any pre-configured scope."
|
||||||
|
commands.deny = ["message"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-open"
|
||||||
|
description = "Enables the open command without any pre-configured scope."
|
||||||
|
commands.allow = ["open"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-open"
|
||||||
|
description = "Denies the open command without any pre-configured scope."
|
||||||
|
commands.deny = ["open"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-save"
|
||||||
|
description = "Enables the save command without any pre-configured scope."
|
||||||
|
commands.allow = ["save"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-save"
|
||||||
|
description = "Denies the save command without any pre-configured scope."
|
||||||
|
commands.deny = ["save"]
|
||||||
@@ -22,6 +22,32 @@ All dialog types are enabled.
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
`dialog:allow-ask`
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
Enables the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
`dialog:deny-ask`
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
Denies the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|
||||||
@@ -103,32 +129,6 @@ Denies the save command without any pre-configured scope.
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|
||||||
`dialog:allow-ask`
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
|
|
||||||
Enables the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)
|
|
||||||
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
|
|
||||||
`dialog:deny-ask`
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
|
|
||||||
Denies the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)
|
|
||||||
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
|
|
||||||
`dialog:allow-confirm`
|
`dialog:allow-confirm`
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -24,17 +24,10 @@
|
|||||||
},
|
},
|
||||||
"permission": {
|
"permission": {
|
||||||
"description": "A list of inlined permissions",
|
"description": "A list of inlined permissions",
|
||||||
|
"default": [],
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/Permission"
|
"$ref": "#/definitions/Permission"
|
||||||
},
|
|
||||||
"default": []
|
|
||||||
},
|
|
||||||
"commands": {
|
|
||||||
"description": "A list of command names that get `allow-$command` and `deny-$command` permissions\nautogenerated on demand instead of being stored as explicit permissions.\n\nSee [`Manifest::command_permission`] and the ACL resolver for how these are expanded.",
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -42,6 +35,9 @@
|
|||||||
"DefaultPermission": {
|
"DefaultPermission": {
|
||||||
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
|
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"permissions"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"version": {
|
"version": {
|
||||||
"description": "The version of the permission.",
|
"description": "The version of the permission.",
|
||||||
@@ -50,10 +46,10 @@
|
|||||||
"null"
|
"null"
|
||||||
],
|
],
|
||||||
"format": "uint64",
|
"format": "uint64",
|
||||||
"minimum": 1
|
"minimum": 1.0
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "Human-readable description of what the permission does.\nTauri convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
|
"description": "Human-readable description of what the permission does. Tauri convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.",
|
||||||
"type": [
|
"type": [
|
||||||
"string",
|
"string",
|
||||||
"null"
|
"null"
|
||||||
@@ -66,14 +62,16 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"required": [
|
|
||||||
"permissions"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"PermissionSet": {
|
"PermissionSet": {
|
||||||
"description": "A set of direct permissions grouped together under a new name.",
|
"description": "A set of direct permissions grouped together under a new name.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"description",
|
||||||
|
"identifier",
|
||||||
|
"permissions"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"identifier": {
|
"identifier": {
|
||||||
"description": "A unique identifier for the permission.",
|
"description": "A unique identifier for the permission.",
|
||||||
@@ -87,19 +85,17 @@
|
|||||||
"description": "All permissions this set contains.",
|
"description": "All permissions this set contains.",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"$ref": "#/definitions/PermissionKind"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"required": [
|
|
||||||
"identifier",
|
|
||||||
"description",
|
|
||||||
"permissions"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"Permission": {
|
"Permission": {
|
||||||
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
|
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"identifier"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"version": {
|
"version": {
|
||||||
"description": "The version of the permission.",
|
"description": "The version of the permission.",
|
||||||
@@ -108,14 +104,14 @@
|
|||||||
"null"
|
"null"
|
||||||
],
|
],
|
||||||
"format": "uint64",
|
"format": "uint64",
|
||||||
"minimum": 1
|
"minimum": 1.0
|
||||||
},
|
},
|
||||||
"identifier": {
|
"identifier": {
|
||||||
"description": "A unique identifier for the permission.",
|
"description": "A unique identifier for the permission.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "Human-readable description of what the permission does.\nTauri internal convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
|
"description": "Human-readable description of what the permission does. Tauri internal convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.",
|
||||||
"type": [
|
"type": [
|
||||||
"string",
|
"string",
|
||||||
"null"
|
"null"
|
||||||
@@ -151,10 +147,7 @@
|
|||||||
"$ref": "#/definitions/Target"
|
"$ref": "#/definitions/Target"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"required": [
|
|
||||||
"identifier"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"Commands": {
|
"Commands": {
|
||||||
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
|
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
|
||||||
@@ -162,24 +155,24 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"allow": {
|
"allow": {
|
||||||
"description": "Allowed command.",
|
"description": "Allowed command.",
|
||||||
|
"default": [],
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
}
|
||||||
"default": []
|
|
||||||
},
|
},
|
||||||
"deny": {
|
"deny": {
|
||||||
"description": "Denied command, which takes priority.",
|
"description": "Denied command, which takes priority.",
|
||||||
|
"default": [],
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
}
|
||||||
"default": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Scopes": {
|
"Scopes": {
|
||||||
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```",
|
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"allow": {
|
"allow": {
|
||||||
@@ -264,27 +257,108 @@
|
|||||||
{
|
{
|
||||||
"description": "MacOS.",
|
"description": "MacOS.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "macOS"
|
"enum": [
|
||||||
|
"macOS"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Windows.",
|
"description": "Windows.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "windows"
|
"enum": [
|
||||||
|
"windows"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Linux.",
|
"description": "Linux.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "linux"
|
"enum": [
|
||||||
|
"linux"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Android.",
|
"description": "Android.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "android"
|
"enum": [
|
||||||
|
"android"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "iOS.",
|
"description": "iOS.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "iOS"
|
"enum": [
|
||||||
|
"iOS"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"PermissionKind": {
|
||||||
|
"type": "string",
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"description": "Enables the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)",
|
||||||
|
"type": "string",
|
||||||
|
"const": "allow-ask",
|
||||||
|
"markdownDescription": "Enables the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)",
|
||||||
|
"type": "string",
|
||||||
|
"const": "deny-ask",
|
||||||
|
"markdownDescription": "Denies the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the message command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "allow-message",
|
||||||
|
"markdownDescription": "Enables the message command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the message command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "deny-message",
|
||||||
|
"markdownDescription": "Denies the message command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the open command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "allow-open",
|
||||||
|
"markdownDescription": "Enables the open command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the open command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "deny-open",
|
||||||
|
"markdownDescription": "Denies the open command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the save command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "allow-save",
|
||||||
|
"markdownDescription": "Enables the save command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the save command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "deny-save",
|
||||||
|
"markdownDescription": "Denies the save command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)",
|
||||||
|
"type": "string",
|
||||||
|
"const": "allow-confirm",
|
||||||
|
"markdownDescription": "Enables the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)",
|
||||||
|
"type": "string",
|
||||||
|
"const": "deny-confirm",
|
||||||
|
"markdownDescription": "Denies the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n\n#### This default permission set includes:\n\n- `allow-message`\n- `allow-save`\n- `allow-open`",
|
||||||
|
"type": "string",
|
||||||
|
"const": "default",
|
||||||
|
"markdownDescription": "This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n\n#### This default permission set includes:\n\n- `allow-message`\n- `allow-save`\n- `allow-open`"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ ios = { level = "partial", notes = "Access is restricted to Application folder b
|
|||||||
tauri-plugin = { workspace = true, features = ["build"] }
|
tauri-plugin = { workspace = true, features = ["build"] }
|
||||||
schemars = { workspace = true }
|
schemars = { workspace = true }
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
|
toml = "1.0"
|
||||||
|
tauri-utils = { workspace = true }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
|
|||||||
+85
-36
@@ -7,6 +7,8 @@ use std::{
|
|||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
use tauri_utils::acl::manifest::PermissionFile;
|
||||||
|
|
||||||
#[path = "src/scope.rs"]
|
#[path = "src/scope.rs"]
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
mod scope;
|
mod scope;
|
||||||
@@ -75,35 +77,35 @@ const BASE_DIR_VARS: &[&str] = &[
|
|||||||
"APPCACHE",
|
"APPCACHE",
|
||||||
"APPLOG",
|
"APPLOG",
|
||||||
];
|
];
|
||||||
// `write_file` and `read_text_file_lines` allow nested commands, so their permissions are
|
const COMMANDS: &[(&str, &[&str])] = &[
|
||||||
// manually authored in `permissions/commands/` instead of being autogenerated from this list.
|
("mkdir", &[]),
|
||||||
const COMMANDS: &[&str] = &[
|
("create", &[]),
|
||||||
"mkdir",
|
("copy_file", &[]),
|
||||||
"create",
|
("remove", &[]),
|
||||||
"copy_file",
|
("rename", &[]),
|
||||||
"remove",
|
("truncate", &[]),
|
||||||
"rename",
|
("ftruncate", &[]),
|
||||||
"truncate",
|
("write", &[]),
|
||||||
"ftruncate",
|
("write_file", &["open", "write"]),
|
||||||
"write",
|
("write_text_file", &[]),
|
||||||
"write_text_file",
|
("read_dir", &[]),
|
||||||
"read_dir",
|
("read_file", &[]),
|
||||||
"read_file",
|
("read", &[]),
|
||||||
"read",
|
("open", &[]),
|
||||||
"open",
|
("read_text_file", &[]),
|
||||||
"read_text_file",
|
("read_text_file_lines", &["read_text_file_lines_next"]),
|
||||||
"read_text_file_lines_next",
|
("read_text_file_lines_next", &[]),
|
||||||
"seek",
|
("seek", &[]),
|
||||||
"stat",
|
("stat", &[]),
|
||||||
"lstat",
|
("lstat", &[]),
|
||||||
"fstat",
|
("fstat", &[]),
|
||||||
"exists",
|
("exists", &[]),
|
||||||
"watch",
|
("watch", &[]),
|
||||||
// TODO: Remove this in v3
|
// TODO: Remove this in v3
|
||||||
"unwatch",
|
("unwatch", &[]),
|
||||||
"size",
|
("size", &[]),
|
||||||
"start_accessing_security_scoped_resource",
|
("start_accessing_security_scoped_resource", &[]),
|
||||||
"stop_accessing_security_scoped_resource",
|
("stop_accessing_security_scoped_resource", &[]),
|
||||||
];
|
];
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
@@ -209,12 +211,59 @@ permissions = [
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tauri_plugin::Builder::new(COMMANDS)
|
tauri_plugin::Builder::new(
|
||||||
.global_api_script_path("./api-iife.js")
|
&COMMANDS
|
||||||
.global_scope_schema(
|
.iter()
|
||||||
schemars::SchemaGenerator::new(schemars::generate::SchemaSettings::draft07())
|
// FIXME: https://docs.rs/crate/tauri-plugin-fs/2.1.0/builds/1571296
|
||||||
.into_root_schema_for::<FsScopeEntry>(),
|
.filter(|c| c.1.is_empty())
|
||||||
)
|
.map(|c| c.0)
|
||||||
.android_path("android")
|
.collect::<Vec<_>>(),
|
||||||
.build();
|
)
|
||||||
|
.global_api_script_path("./api-iife.js")
|
||||||
|
.global_scope_schema(schemars::schema_for!(FsScopeEntry))
|
||||||
|
.android_path("android")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
// workaround to include nested permissions as `tauri_plugin` doesn't support it
|
||||||
|
let permissions_dir = autogenerated.join("commands");
|
||||||
|
for (command, nested_commands) in COMMANDS {
|
||||||
|
if nested_commands.is_empty() {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
let permission_path = permissions_dir.join(format!("{command}.toml"));
|
||||||
|
|
||||||
|
let content = std::fs::read_to_string(&permission_path)
|
||||||
|
.unwrap_or_else(|_| panic!("failed to read {command}.toml"));
|
||||||
|
|
||||||
|
let mut permission_file = toml::from_str::<PermissionFile>(&content)
|
||||||
|
.unwrap_or_else(|_| panic!("failed to deserialize {command}.toml"));
|
||||||
|
|
||||||
|
for p in permission_file
|
||||||
|
.permission
|
||||||
|
.iter_mut()
|
||||||
|
.filter(|p| p.identifier.starts_with("allow"))
|
||||||
|
{
|
||||||
|
for c in nested_commands.iter().map(|s| s.to_string()) {
|
||||||
|
if !p.commands.allow.contains(&c) {
|
||||||
|
p.commands.allow.push(c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let out = toml::to_string_pretty(&permission_file)
|
||||||
|
.unwrap_or_else(|_| panic!("failed to serialize {command}.toml"));
|
||||||
|
let out = format!(
|
||||||
|
r#"# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
{out}"#
|
||||||
|
);
|
||||||
|
|
||||||
|
if content != out {
|
||||||
|
std::fs::write(permission_path, out)
|
||||||
|
.unwrap_or_else(|_| panic!("failed to write {command}.toml"));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-copy-file"
|
||||||
|
description = "Enables the copy_file command without any pre-configured scope."
|
||||||
|
commands.allow = ["copy_file"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-copy-file"
|
||||||
|
description = "Denies the copy_file command without any pre-configured scope."
|
||||||
|
commands.deny = ["copy_file"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-create"
|
||||||
|
description = "Enables the create command without any pre-configured scope."
|
||||||
|
commands.allow = ["create"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-create"
|
||||||
|
description = "Denies the create command without any pre-configured scope."
|
||||||
|
commands.deny = ["create"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-exists"
|
||||||
|
description = "Enables the exists command without any pre-configured scope."
|
||||||
|
commands.allow = ["exists"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-exists"
|
||||||
|
description = "Denies the exists command without any pre-configured scope."
|
||||||
|
commands.deny = ["exists"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-fstat"
|
||||||
|
description = "Enables the fstat command without any pre-configured scope."
|
||||||
|
commands.allow = ["fstat"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-fstat"
|
||||||
|
description = "Denies the fstat command without any pre-configured scope."
|
||||||
|
commands.deny = ["fstat"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-ftruncate"
|
||||||
|
description = "Enables the ftruncate command without any pre-configured scope."
|
||||||
|
commands.allow = ["ftruncate"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-ftruncate"
|
||||||
|
description = "Denies the ftruncate command without any pre-configured scope."
|
||||||
|
commands.deny = ["ftruncate"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-lstat"
|
||||||
|
description = "Enables the lstat command without any pre-configured scope."
|
||||||
|
commands.allow = ["lstat"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-lstat"
|
||||||
|
description = "Denies the lstat command without any pre-configured scope."
|
||||||
|
commands.deny = ["lstat"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-mkdir"
|
||||||
|
description = "Enables the mkdir command without any pre-configured scope."
|
||||||
|
commands.allow = ["mkdir"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-mkdir"
|
||||||
|
description = "Denies the mkdir command without any pre-configured scope."
|
||||||
|
commands.deny = ["mkdir"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-open"
|
||||||
|
description = "Enables the open command without any pre-configured scope."
|
||||||
|
commands.allow = ["open"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-open"
|
||||||
|
description = "Denies the open command without any pre-configured scope."
|
||||||
|
commands.deny = ["open"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-read"
|
||||||
|
description = "Enables the read command without any pre-configured scope."
|
||||||
|
commands.allow = ["read"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-read"
|
||||||
|
description = "Denies the read command without any pre-configured scope."
|
||||||
|
commands.deny = ["read"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-read-dir"
|
||||||
|
description = "Enables the read_dir command without any pre-configured scope."
|
||||||
|
commands.allow = ["read_dir"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-read-dir"
|
||||||
|
description = "Denies the read_dir command without any pre-configured scope."
|
||||||
|
commands.deny = ["read_dir"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-read-file"
|
||||||
|
description = "Enables the read_file command without any pre-configured scope."
|
||||||
|
commands.allow = ["read_file"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-read-file"
|
||||||
|
description = "Denies the read_file command without any pre-configured scope."
|
||||||
|
commands.deny = ["read_file"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-read-text-file"
|
||||||
|
description = "Enables the read_text_file command without any pre-configured scope."
|
||||||
|
commands.allow = ["read_text_file"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-read-text-file"
|
||||||
|
description = "Denies the read_text_file command without any pre-configured scope."
|
||||||
|
commands.deny = ["read_text_file"]
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-read-text-file-lines"
|
||||||
|
description = "Enables the read_text_file_lines command without any pre-configured scope."
|
||||||
|
|
||||||
|
[permission.commands]
|
||||||
|
allow = [
|
||||||
|
"read_text_file_lines",
|
||||||
|
"read_text_file_lines_next",
|
||||||
|
]
|
||||||
|
deny = []
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-read-text-file-lines"
|
||||||
|
description = "Denies the read_text_file_lines command without any pre-configured scope."
|
||||||
|
|
||||||
|
[permission.commands]
|
||||||
|
allow = []
|
||||||
|
deny = ["read_text_file_lines"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-read-text-file-lines-next"
|
||||||
|
description = "Enables the read_text_file_lines_next command without any pre-configured scope."
|
||||||
|
commands.allow = ["read_text_file_lines_next"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-read-text-file-lines-next"
|
||||||
|
description = "Denies the read_text_file_lines_next command without any pre-configured scope."
|
||||||
|
commands.deny = ["read_text_file_lines_next"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-remove"
|
||||||
|
description = "Enables the remove command without any pre-configured scope."
|
||||||
|
commands.allow = ["remove"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-remove"
|
||||||
|
description = "Denies the remove command without any pre-configured scope."
|
||||||
|
commands.deny = ["remove"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-rename"
|
||||||
|
description = "Enables the rename command without any pre-configured scope."
|
||||||
|
commands.allow = ["rename"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-rename"
|
||||||
|
description = "Denies the rename command without any pre-configured scope."
|
||||||
|
commands.deny = ["rename"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-seek"
|
||||||
|
description = "Enables the seek command without any pre-configured scope."
|
||||||
|
commands.allow = ["seek"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-seek"
|
||||||
|
description = "Denies the seek command without any pre-configured scope."
|
||||||
|
commands.deny = ["seek"]
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Automatically generated - DO NOT EDIT!
|
||||||
|
|
||||||
|
"$schema" = "../../schemas/schema.json"
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-size"
|
||||||
|
description = "Enables the size command without any pre-configured scope."
|
||||||
|
commands.allow = ["size"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "deny-size"
|
||||||
|
description = "Denies the size command without any pre-configured scope."
|
||||||
|
commands.deny = ["size"]
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user