Skip to content

Commit

Permalink
split to components and add OS detection
Browse files Browse the repository at this point in the history
  • Loading branch information
0auBSQ committed Oct 25, 2024
1 parent 0893dd0 commit b0072ab
Show file tree
Hide file tree
Showing 18 changed files with 1,555 additions and 1,137 deletions.
15 changes: 12 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"@tauri-apps/api": "^2.0.0-beta.4",
"@tauri-apps/plugin-fs": "^2.0.0-rc.1",
"@tauri-apps/plugin-http": "^2.0.0-rc.1",
"@tauri-apps/plugin-os": "^2.0.0",
"@tauri-apps/plugin-upload": "^2.0.0-rc.1",
"axios": "^1.7.7",
"axios-tauri-http-adapter": "^1.1.2",
Expand Down
79 changes: 64 additions & 15 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "app"
name = "OpenTaiko-Hub"
version = "0.1.0"
description = "A Tauri App"
authors = ["you"]
description = "Update manager and launcher for OpenTaiko"
authors = ["OpenTaiko Team"]
license = ""
repository = ""
default-run = "app"
default-run = "OpenTaiko-Hub"
edition = "2021"
rust-version = "1.80"

Expand All @@ -23,6 +23,7 @@ tauri-plugin-fs = "2.0.0-rc"
tauri-plugin-upload = "2.0.0-rc"
zip = "2.2.0"
tokio = "1.40.0"
tauri-plugin-os = "2.0.0-rc"

[features]
# this feature is used for production builds or when `devPath` points to the filesystem and the built-in dev server is disabled.
Expand Down
9 changes: 9 additions & 0 deletions src-tauri/capabilities/default.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"identifier": "default",
"description": "default capabilities",
"local": true,
"windows": ["main"],
"permissions": [
"os:default"
]
}
2 changes: 1 addition & 1 deletion src-tauri/gen/schemas/acl-manifests.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src-tauri/gen/schemas/capabilities.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"migrated":{"identifier":"migrated","description":"permissions that were migrated from v1","local":true,"windows":["main"],"permissions":[{"identifier":"http:default","allow":[{"url":"https://**/"},{"url":"http://**/"}]},"http:default"]},"migrated2":{"identifier":"migrated2","description":"permissions that were migrated from v1","local":true,"windows":["main"],"permissions":[{"identifier":"upload:default","allow":[{"url":"https://**/"},{"url":"http://**/"}]},"upload:default"]},"migrated3":{"identifier":"migrated3","description":"permissions that were migrated from v1","local":true,"windows":["main"],"permissions":[{"identifier":"fs:default","allow":[{"path":"**/*"}]},{"identifier":"fs:allow-copy-file","allow":[{"path":"**/*"}]},{"identifier":"fs:write-all","allow":[{"path":"**/*"}]},"fs:default","fs:allow-copy-file","fs:write-all","core:path:default","core:event:allow-listen","core:event:allow-unlisten"]}}
{"default":{"identifier":"default","description":"default capabilities","local":true,"windows":["main"],"permissions":["os:default"]},"migrated":{"identifier":"migrated","description":"permissions that were migrated from v1","local":true,"windows":["main"],"permissions":[{"identifier":"http:default","allow":[{"url":"https://**/"},{"url":"http://**/"}]},"http:default"]},"migrated2":{"identifier":"migrated2","description":"permissions that were migrated from v1","local":true,"windows":["main"],"permissions":[{"identifier":"upload:default","allow":[{"url":"https://**/"},{"url":"http://**/"}]},"upload:default"]},"migrated3":{"identifier":"migrated3","description":"permissions that were migrated from v1","local":true,"windows":["main"],"permissions":[{"identifier":"fs:default","allow":[{"path":"**/*"}]},{"identifier":"fs:allow-copy-file","allow":[{"path":"**/*"}]},{"identifier":"fs:write-all","allow":[{"path":"**/*"}]},"fs:default","fs:allow-copy-file","fs:write-all","core:path:default","core:event:allow-listen","core:event:allow-unlisten"]}}
119 changes: 119 additions & 0 deletions src-tauri/gen/schemas/desktop-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -6357,6 +6357,125 @@
"http:deny-fetch-send"
]
},
{
"description": "os:default -> This permission set configures which\noperating system information are available\nto gather from the frontend.\n\n#### Granted Permissions\n\nAll information except the host name are available.\n\n",
"type": "string",
"enum": [
"os:default"
]
},
{
"description": "os:allow-arch -> Enables the arch command without any pre-configured scope.",
"type": "string",
"enum": [
"os:allow-arch"
]
},
{
"description": "os:allow-exe-extension -> Enables the exe_extension command without any pre-configured scope.",
"type": "string",
"enum": [
"os:allow-exe-extension"
]
},
{
"description": "os:allow-family -> Enables the family command without any pre-configured scope.",
"type": "string",
"enum": [
"os:allow-family"
]
},
{
"description": "os:allow-hostname -> Enables the hostname command without any pre-configured scope.",
"type": "string",
"enum": [
"os:allow-hostname"
]
},
{
"description": "os:allow-locale -> Enables the locale command without any pre-configured scope.",
"type": "string",
"enum": [
"os:allow-locale"
]
},
{
"description": "os:allow-os-type -> Enables the os_type command without any pre-configured scope.",
"type": "string",
"enum": [
"os:allow-os-type"
]
},
{
"description": "os:allow-platform -> Enables the platform command without any pre-configured scope.",
"type": "string",
"enum": [
"os:allow-platform"
]
},
{
"description": "os:allow-version -> Enables the version command without any pre-configured scope.",
"type": "string",
"enum": [
"os:allow-version"
]
},
{
"description": "os:deny-arch -> Denies the arch command without any pre-configured scope.",
"type": "string",
"enum": [
"os:deny-arch"
]
},
{
"description": "os:deny-exe-extension -> Denies the exe_extension command without any pre-configured scope.",
"type": "string",
"enum": [
"os:deny-exe-extension"
]
},
{
"description": "os:deny-family -> Denies the family command without any pre-configured scope.",
"type": "string",
"enum": [
"os:deny-family"
]
},
{
"description": "os:deny-hostname -> Denies the hostname command without any pre-configured scope.",
"type": "string",
"enum": [
"os:deny-hostname"
]
},
{
"description": "os:deny-locale -> Denies the locale command without any pre-configured scope.",
"type": "string",
"enum": [
"os:deny-locale"
]
},
{
"description": "os:deny-os-type -> Denies the os_type command without any pre-configured scope.",
"type": "string",
"enum": [
"os:deny-os-type"
]
},
{
"description": "os:deny-platform -> Denies the platform command without any pre-configured scope.",
"type": "string",
"enum": [
"os:deny-platform"
]
},
{
"description": "os:deny-version -> Denies the version command without any pre-configured scope.",
"type": "string",
"enum": [
"os:deny-version"
]
},
{
"description": "upload:default -> This permission set configures what kind of\noperations are available from the upload plugin.\n\n#### Granted Permissions\n\nAll operations are enabled by default.\n\n",
"type": "string",
Expand Down
Loading

0 comments on commit b0072ab

Please sign in to comment.