mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-12 09:18:14 +08:00
🚸 复制/下载时自动切换原图
This commit is contained in:
@@ -29,15 +29,9 @@
|
|||||||
{
|
{
|
||||||
"identifier": "http:default",
|
"identifier": "http:default",
|
||||||
"allow": [
|
"allow": [
|
||||||
{
|
{ "url": "https://*.miyoushe.com/*" },
|
||||||
"url": "https://*.miyoushe.com/*"
|
{ "url": "https://*.mihoyo.com/*" },
|
||||||
},
|
{ "url": "https://*.hoyoverse.com/*" }
|
||||||
{
|
|
||||||
"url": "https://*.mihoyo.com/*"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"url": "https://*.hoyoverse.com/*"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -14,74 +14,19 @@
|
|||||||
"core:window:default",
|
"core:window:default",
|
||||||
"core:path:allow-resolve-directory",
|
"core:path:allow-resolve-directory",
|
||||||
"core:path:default",
|
"core:path:default",
|
||||||
{
|
{ "identifier": "fs:allow-exists", "allow": [{ "path": "**" }] },
|
||||||
"identifier": "fs:allow-exists",
|
{ "identifier": "fs:allow-mkdir", "allow": [{ "path": "**" }] },
|
||||||
"allow": [
|
{ "identifier": "fs:allow-read-dir", "allow": [{ "path": "**" }] },
|
||||||
{
|
{ "identifier": "fs:allow-read-text-file", "allow": [{ "path": "**" }] },
|
||||||
"path": "**"
|
{ "identifier": "fs:allow-remove", "allow": [{ "path": "**" }] },
|
||||||
}
|
{ "identifier": "fs:allow-write-file", "allow": [{ "path": "**" }] },
|
||||||
]
|
{ "identifier": "fs:allow-write-text-file", "allow": [{ "path": "**" }] },
|
||||||
},
|
|
||||||
{
|
|
||||||
"identifier": "fs:allow-mkdir",
|
|
||||||
"allow": [
|
|
||||||
{
|
|
||||||
"path": "**"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"identifier": "fs:allow-read-dir",
|
|
||||||
"allow": [
|
|
||||||
{
|
|
||||||
"path": "**"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"identifier": "fs:allow-read-text-file",
|
|
||||||
"allow": [
|
|
||||||
{
|
|
||||||
"path": "**"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"identifier": "fs:allow-remove",
|
|
||||||
"allow": [
|
|
||||||
{
|
|
||||||
"path": "**"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"identifier": "fs:allow-write-file",
|
|
||||||
"allow": [
|
|
||||||
{
|
|
||||||
"path": "**"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"identifier": "fs:allow-write-text-file",
|
|
||||||
"allow": [
|
|
||||||
{
|
|
||||||
"path": "**"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"identifier": "http:default",
|
"identifier": "http:default",
|
||||||
"allow": [
|
"allow": [
|
||||||
{
|
{ "url": "https://*.miyoushe.com/*" },
|
||||||
"url": "https://*.miyoushe.com/*"
|
{ "url": "https://*.mihoyo.com/*" },
|
||||||
},
|
{ "url": "https://*.genshinnet.com/*" }
|
||||||
{
|
|
||||||
"url": "https://*.mihoyo.com/*"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"url": "https://*.genshinnet.com/*"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -33,86 +33,23 @@
|
|||||||
"core:window:allow-show",
|
"core:window:allow-show",
|
||||||
"core:window:allow-set-always-on-top",
|
"core:window:allow-set-always-on-top",
|
||||||
"core:window:default",
|
"core:window:default",
|
||||||
{
|
{ "identifier": "fs:allow-exists", "allow": [{ "path": "**" }] },
|
||||||
"identifier": "fs:allow-exists",
|
{ "identifier": "fs:allow-mkdir", "allow": [{ "path": "**" }] },
|
||||||
"allow": [
|
{ "identifier": "fs:allow-read-dir", "allow": [{ "path": "**" }] },
|
||||||
{
|
{ "identifier": "fs:allow-read-text-file", "allow": [{ "path": "**" }] },
|
||||||
"path": "**"
|
{ "identifier": "fs:allow-remove", "allow": [{ "path": "**" }] },
|
||||||
}
|
{ "identifier": "fs:allow-write-file", "allow": [{ "path": "**" }] },
|
||||||
]
|
{ "identifier": "fs:allow-write-text-file", "allow": [{ "path": "**" }] },
|
||||||
},
|
|
||||||
{
|
|
||||||
"identifier": "fs:allow-mkdir",
|
|
||||||
"allow": [
|
|
||||||
{
|
|
||||||
"path": "**"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"identifier": "fs:allow-read-dir",
|
|
||||||
"allow": [
|
|
||||||
{
|
|
||||||
"path": "**"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"identifier": "fs:allow-read-text-file",
|
|
||||||
"allow": [
|
|
||||||
{
|
|
||||||
"path": "**"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"identifier": "fs:allow-remove",
|
|
||||||
"allow": [
|
|
||||||
{
|
|
||||||
"path": "**"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"identifier": "fs:allow-write-file",
|
|
||||||
"allow": [
|
|
||||||
{
|
|
||||||
"path": "**"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"identifier": "fs:allow-write-text-file",
|
|
||||||
"allow": [
|
|
||||||
{
|
|
||||||
"path": "**"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"identifier": "http:default",
|
"identifier": "http:default",
|
||||||
"allow": [
|
"allow": [
|
||||||
{
|
{ "url": "https://*.miyoushe.com/*" },
|
||||||
"url": "https://*.miyoushe.com/*"
|
{ "url": "https://*.mihoyo.com/*" },
|
||||||
},
|
{ "url": "https://*.mihoyogift.com/*" },
|
||||||
{
|
{ "url": "https://*.bilibili.com/*" },
|
||||||
"url": "https://*.mihoyo.com/*"
|
{ "url": "http://*.hdslb.com/*" },
|
||||||
},
|
{ "url": "https://*.hoyoverse.com/*" },
|
||||||
{
|
{ "url": "https://*.genshinnet.com/*" }
|
||||||
"url": "https://*.mihoyogift.com/*"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"url": "https://*.bilibili.com/*"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"url": "http://*.hdslb.com/*"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"url": "https://*.hoyoverse.com/*"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"url": "https://*.genshinnet.com/*"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -21,7 +21,9 @@
|
|||||||
{
|
{
|
||||||
"description": "A list of capabilities.",
|
"description": "A list of capabilities.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["capabilities"],
|
"required": [
|
||||||
|
"capabilities"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"capabilities": {
|
"capabilities": {
|
||||||
"description": "The list of capabilities.",
|
"description": "The list of capabilities.",
|
||||||
@@ -37,7 +39,10 @@
|
|||||||
"Capability": {
|
"Capability": {
|
||||||
"description": "A grouping and boundary mechanism developers can use to isolate access to the IPC layer.\n\nIt controls application windows fine grained access to the Tauri core, application, or plugin commands. If a window is not matching any capability then it has no access to the IPC layer at all.\n\nThis can be done to create groups of windows, based on their required system access, which can reduce impact of frontend vulnerabilities in less privileged windows. Windows can be added to a capability by exact name (e.g. `main-window`) or glob patterns like `*` or `admin-*`. A Window can have none, one, or multiple associated capabilities.\n\n## Example\n\n```json { \"identifier\": \"main-user-files-write\", \"description\": \"This capability allows the `main` window on macOS and Windows access to `filesystem` write related commands and `dialog` commands to enable programatic access to files selected by the user.\", \"windows\": [ \"main\" ], \"permissions\": [ \"core:default\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] }, ], \"platforms\": [\"macOS\",\"windows\"] } ```",
|
"description": "A grouping and boundary mechanism developers can use to isolate access to the IPC layer.\n\nIt controls application windows fine grained access to the Tauri core, application, or plugin commands. If a window is not matching any capability then it has no access to the IPC layer at all.\n\nThis can be done to create groups of windows, based on their required system access, which can reduce impact of frontend vulnerabilities in less privileged windows. Windows can be added to a capability by exact name (e.g. `main-window`) or glob patterns like `*` or `admin-*`. A Window can have none, one, or multiple associated capabilities.\n\n## Example\n\n```json { \"identifier\": \"main-user-files-write\", \"description\": \"This capability allows the `main` window on macOS and Windows access to `filesystem` write related commands and `dialog` commands to enable programatic access to files selected by the user.\", \"windows\": [ \"main\" ], \"permissions\": [ \"core:default\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] }, ], \"platforms\": [\"macOS\",\"windows\"] } ```",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["identifier", "permissions"],
|
"required": [
|
||||||
|
"identifier",
|
||||||
|
"permissions"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"identifier": {
|
"identifier": {
|
||||||
"description": "Identifier of the capability.\n\n## Example\n\n`main-user-files-write`",
|
"description": "Identifier of the capability.\n\n## Example\n\n`main-user-files-write`",
|
||||||
@@ -88,7 +93,10 @@
|
|||||||
},
|
},
|
||||||
"platforms": {
|
"platforms": {
|
||||||
"description": "Limit which target platforms this capability applies to.\n\nBy default all platforms are targeted.\n\n## Example\n\n`[\"macOS\",\"windows\"]`",
|
"description": "Limit which target platforms this capability applies to.\n\nBy default all platforms are targeted.\n\n## Example\n\n`[\"macOS\",\"windows\"]`",
|
||||||
"type": ["array", "null"],
|
"type": [
|
||||||
|
"array",
|
||||||
|
"null"
|
||||||
|
],
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/Target"
|
"$ref": "#/definitions/Target"
|
||||||
}
|
}
|
||||||
@@ -98,7 +106,9 @@
|
|||||||
"CapabilityRemote": {
|
"CapabilityRemote": {
|
||||||
"description": "Configuration for remote URLs that are associated with the capability.",
|
"description": "Configuration for remote URLs that are associated with the capability.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["urls"],
|
"required": [
|
||||||
|
"urls"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"urls": {
|
"urls": {
|
||||||
"description": "Remote domains this capability refers to using the [URLPattern standard](https://urlpattern.spec.whatwg.org/).\n\n## Examples\n\n- \"https://*.mydomain.dev\": allows subdomains of mydomain.dev - \"https://mydomain.dev/api/*\": allows any subpath of mydomain.dev/api",
|
"description": "Remote domains this capability refers to using the [URLPattern standard](https://urlpattern.spec.whatwg.org/).\n\n## Examples\n\n- \"https://*.mydomain.dev\": allows subdomains of mydomain.dev - \"https://mydomain.dev/api/*\": allows any subpath of mydomain.dev/api",
|
||||||
@@ -1586,7 +1596,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["path"],
|
"required": [
|
||||||
|
"path"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"path": {
|
"path": {
|
||||||
"description": "A path that can be accessed by the webview when using the fs APIs.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
|
"description": "A path that can be accessed by the webview when using the fs APIs.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
|
||||||
@@ -1608,7 +1620,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["path"],
|
"required": [
|
||||||
|
"path"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"path": {
|
"path": {
|
||||||
"description": "A path that can be accessed by the webview when using the fs APIs.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
|
"description": "A path that can be accessed by the webview when using the fs APIs.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
|
||||||
@@ -1699,7 +1713,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["url"],
|
"required": [
|
||||||
|
"url"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"url": {
|
"url": {
|
||||||
"description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
|
"description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
|
||||||
@@ -1721,7 +1737,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["url"],
|
"required": [
|
||||||
|
"url"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"url": {
|
"url": {
|
||||||
"description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
|
"description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
|
||||||
@@ -1818,7 +1836,10 @@
|
|||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["cmd", "name"],
|
"required": [
|
||||||
|
"cmd",
|
||||||
|
"name"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"args": {
|
"args": {
|
||||||
"description": "The allowed arguments for the command execution.",
|
"description": "The allowed arguments for the command execution.",
|
||||||
@@ -1841,7 +1862,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["name", "sidecar"],
|
"required": [
|
||||||
|
"name",
|
||||||
|
"sidecar"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"args": {
|
"args": {
|
||||||
"description": "The allowed arguments for the command execution.",
|
"description": "The allowed arguments for the command execution.",
|
||||||
@@ -1872,7 +1896,10 @@
|
|||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["cmd", "name"],
|
"required": [
|
||||||
|
"cmd",
|
||||||
|
"name"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"args": {
|
"args": {
|
||||||
"description": "The allowed arguments for the command execution.",
|
"description": "The allowed arguments for the command execution.",
|
||||||
@@ -1895,7 +1922,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["name", "sidecar"],
|
"required": [
|
||||||
|
"name",
|
||||||
|
"sidecar"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"args": {
|
"args": {
|
||||||
"description": "The allowed arguments for the command execution.",
|
"description": "The allowed arguments for the command execution.",
|
||||||
@@ -1944,14 +1974,20 @@
|
|||||||
},
|
},
|
||||||
"allow": {
|
"allow": {
|
||||||
"description": "Data that defines what is allowed by the scope.",
|
"description": "Data that defines what is allowed by the scope.",
|
||||||
"type": ["array", "null"],
|
"type": [
|
||||||
|
"array",
|
||||||
|
"null"
|
||||||
|
],
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/Value"
|
"$ref": "#/definitions/Value"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"deny": {
|
"deny": {
|
||||||
"description": "Data that defines what is denied by the scope. This should be prioritized by validation logic.",
|
"description": "Data that defines what is denied by the scope. This should be prioritized by validation logic.",
|
||||||
"type": ["array", "null"],
|
"type": [
|
||||||
|
"array",
|
||||||
|
"null"
|
||||||
|
],
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/Value"
|
"$ref": "#/definitions/Value"
|
||||||
}
|
}
|
||||||
@@ -1959,7 +1995,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"required": ["identifier"]
|
"required": [
|
||||||
|
"identifier"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -5368,27 +5406,37 @@
|
|||||||
{
|
{
|
||||||
"description": "MacOS.",
|
"description": "MacOS.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["macOS"]
|
"enum": [
|
||||||
|
"macOS"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Windows.",
|
"description": "Windows.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["windows"]
|
"enum": [
|
||||||
|
"windows"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Linux.",
|
"description": "Linux.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["linux"]
|
"enum": [
|
||||||
|
"linux"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Android.",
|
"description": "Android.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["android"]
|
"enum": [
|
||||||
|
"android"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "iOS.",
|
"description": "iOS.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["iOS"]
|
"enum": [
|
||||||
|
"iOS"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -5402,7 +5450,9 @@
|
|||||||
{
|
{
|
||||||
"description": "A variable that is set while calling the command from the webview API.",
|
"description": "A variable that is set while calling the command from the webview API.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["validator"],
|
"required": [
|
||||||
|
"validator"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"raw": {
|
"raw": {
|
||||||
"description": "Marks the validator as a raw regex, meaning the plugin should not make any modification at runtime.\n\nThis means the regex will not match on the entire string by default, which might be exploited if your regex allow unexpected input to be considered valid. When using this option, make sure your regex is correct.",
|
"description": "Marks the validator as a raw regex, meaning the plugin should not make any modification at runtime.\n\nThis means the regex will not match on the entire string by default, which might be exploited if your regex allow unexpected input to be considered valid. When using this option, make sure your regex is correct.",
|
||||||
|
|||||||
@@ -21,7 +21,9 @@
|
|||||||
{
|
{
|
||||||
"description": "A list of capabilities.",
|
"description": "A list of capabilities.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["capabilities"],
|
"required": [
|
||||||
|
"capabilities"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"capabilities": {
|
"capabilities": {
|
||||||
"description": "The list of capabilities.",
|
"description": "The list of capabilities.",
|
||||||
@@ -37,7 +39,10 @@
|
|||||||
"Capability": {
|
"Capability": {
|
||||||
"description": "A grouping and boundary mechanism developers can use to isolate access to the IPC layer.\n\nIt controls application windows fine grained access to the Tauri core, application, or plugin commands. If a window is not matching any capability then it has no access to the IPC layer at all.\n\nThis can be done to create groups of windows, based on their required system access, which can reduce impact of frontend vulnerabilities in less privileged windows. Windows can be added to a capability by exact name (e.g. `main-window`) or glob patterns like `*` or `admin-*`. A Window can have none, one, or multiple associated capabilities.\n\n## Example\n\n```json { \"identifier\": \"main-user-files-write\", \"description\": \"This capability allows the `main` window on macOS and Windows access to `filesystem` write related commands and `dialog` commands to enable programatic access to files selected by the user.\", \"windows\": [ \"main\" ], \"permissions\": [ \"core:default\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] }, ], \"platforms\": [\"macOS\",\"windows\"] } ```",
|
"description": "A grouping and boundary mechanism developers can use to isolate access to the IPC layer.\n\nIt controls application windows fine grained access to the Tauri core, application, or plugin commands. If a window is not matching any capability then it has no access to the IPC layer at all.\n\nThis can be done to create groups of windows, based on their required system access, which can reduce impact of frontend vulnerabilities in less privileged windows. Windows can be added to a capability by exact name (e.g. `main-window`) or glob patterns like `*` or `admin-*`. A Window can have none, one, or multiple associated capabilities.\n\n## Example\n\n```json { \"identifier\": \"main-user-files-write\", \"description\": \"This capability allows the `main` window on macOS and Windows access to `filesystem` write related commands and `dialog` commands to enable programatic access to files selected by the user.\", \"windows\": [ \"main\" ], \"permissions\": [ \"core:default\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] }, ], \"platforms\": [\"macOS\",\"windows\"] } ```",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["identifier", "permissions"],
|
"required": [
|
||||||
|
"identifier",
|
||||||
|
"permissions"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"identifier": {
|
"identifier": {
|
||||||
"description": "Identifier of the capability.\n\n## Example\n\n`main-user-files-write`",
|
"description": "Identifier of the capability.\n\n## Example\n\n`main-user-files-write`",
|
||||||
@@ -88,7 +93,10 @@
|
|||||||
},
|
},
|
||||||
"platforms": {
|
"platforms": {
|
||||||
"description": "Limit which target platforms this capability applies to.\n\nBy default all platforms are targeted.\n\n## Example\n\n`[\"macOS\",\"windows\"]`",
|
"description": "Limit which target platforms this capability applies to.\n\nBy default all platforms are targeted.\n\n## Example\n\n`[\"macOS\",\"windows\"]`",
|
||||||
"type": ["array", "null"],
|
"type": [
|
||||||
|
"array",
|
||||||
|
"null"
|
||||||
|
],
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/Target"
|
"$ref": "#/definitions/Target"
|
||||||
}
|
}
|
||||||
@@ -98,7 +106,9 @@
|
|||||||
"CapabilityRemote": {
|
"CapabilityRemote": {
|
||||||
"description": "Configuration for remote URLs that are associated with the capability.",
|
"description": "Configuration for remote URLs that are associated with the capability.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["urls"],
|
"required": [
|
||||||
|
"urls"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"urls": {
|
"urls": {
|
||||||
"description": "Remote domains this capability refers to using the [URLPattern standard](https://urlpattern.spec.whatwg.org/).\n\n## Examples\n\n- \"https://*.mydomain.dev\": allows subdomains of mydomain.dev - \"https://mydomain.dev/api/*\": allows any subpath of mydomain.dev/api",
|
"description": "Remote domains this capability refers to using the [URLPattern standard](https://urlpattern.spec.whatwg.org/).\n\n## Examples\n\n- \"https://*.mydomain.dev\": allows subdomains of mydomain.dev - \"https://mydomain.dev/api/*\": allows any subpath of mydomain.dev/api",
|
||||||
@@ -1586,7 +1596,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["path"],
|
"required": [
|
||||||
|
"path"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"path": {
|
"path": {
|
||||||
"description": "A path that can be accessed by the webview when using the fs APIs.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
|
"description": "A path that can be accessed by the webview when using the fs APIs.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
|
||||||
@@ -1608,7 +1620,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["path"],
|
"required": [
|
||||||
|
"path"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"path": {
|
"path": {
|
||||||
"description": "A path that can be accessed by the webview when using the fs APIs.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
|
"description": "A path that can be accessed by the webview when using the fs APIs.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
|
||||||
@@ -1699,7 +1713,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["url"],
|
"required": [
|
||||||
|
"url"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"url": {
|
"url": {
|
||||||
"description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
|
"description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
|
||||||
@@ -1721,7 +1737,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["url"],
|
"required": [
|
||||||
|
"url"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"url": {
|
"url": {
|
||||||
"description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
|
"description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
|
||||||
@@ -1818,7 +1836,10 @@
|
|||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["cmd", "name"],
|
"required": [
|
||||||
|
"cmd",
|
||||||
|
"name"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"args": {
|
"args": {
|
||||||
"description": "The allowed arguments for the command execution.",
|
"description": "The allowed arguments for the command execution.",
|
||||||
@@ -1841,7 +1862,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["name", "sidecar"],
|
"required": [
|
||||||
|
"name",
|
||||||
|
"sidecar"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"args": {
|
"args": {
|
||||||
"description": "The allowed arguments for the command execution.",
|
"description": "The allowed arguments for the command execution.",
|
||||||
@@ -1872,7 +1896,10 @@
|
|||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["cmd", "name"],
|
"required": [
|
||||||
|
"cmd",
|
||||||
|
"name"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"args": {
|
"args": {
|
||||||
"description": "The allowed arguments for the command execution.",
|
"description": "The allowed arguments for the command execution.",
|
||||||
@@ -1895,7 +1922,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["name", "sidecar"],
|
"required": [
|
||||||
|
"name",
|
||||||
|
"sidecar"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"args": {
|
"args": {
|
||||||
"description": "The allowed arguments for the command execution.",
|
"description": "The allowed arguments for the command execution.",
|
||||||
@@ -1944,14 +1974,20 @@
|
|||||||
},
|
},
|
||||||
"allow": {
|
"allow": {
|
||||||
"description": "Data that defines what is allowed by the scope.",
|
"description": "Data that defines what is allowed by the scope.",
|
||||||
"type": ["array", "null"],
|
"type": [
|
||||||
|
"array",
|
||||||
|
"null"
|
||||||
|
],
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/Value"
|
"$ref": "#/definitions/Value"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"deny": {
|
"deny": {
|
||||||
"description": "Data that defines what is denied by the scope. This should be prioritized by validation logic.",
|
"description": "Data that defines what is denied by the scope. This should be prioritized by validation logic.",
|
||||||
"type": ["array", "null"],
|
"type": [
|
||||||
|
"array",
|
||||||
|
"null"
|
||||||
|
],
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/Value"
|
"$ref": "#/definitions/Value"
|
||||||
}
|
}
|
||||||
@@ -1959,7 +1995,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"required": ["identifier"]
|
"required": [
|
||||||
|
"identifier"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -5368,27 +5406,37 @@
|
|||||||
{
|
{
|
||||||
"description": "MacOS.",
|
"description": "MacOS.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["macOS"]
|
"enum": [
|
||||||
|
"macOS"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Windows.",
|
"description": "Windows.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["windows"]
|
"enum": [
|
||||||
|
"windows"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Linux.",
|
"description": "Linux.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["linux"]
|
"enum": [
|
||||||
|
"linux"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Android.",
|
"description": "Android.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["android"]
|
"enum": [
|
||||||
|
"android"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "iOS.",
|
"description": "iOS.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["iOS"]
|
"enum": [
|
||||||
|
"iOS"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -5402,7 +5450,9 @@
|
|||||||
{
|
{
|
||||||
"description": "A variable that is set while calling the command from the webview API.",
|
"description": "A variable that is set while calling the command from the webview API.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["validator"],
|
"required": [
|
||||||
|
"validator"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"raw": {
|
"raw": {
|
||||||
"description": "Marks the validator as a raw regex, meaning the plugin should not make any modification at runtime.\n\nThis means the regex will not match on the entire string by default, which might be exploited if your regex allow unexpected input to be considered valid. When using this option, make sure your regex is correct.",
|
"description": "Marks the validator as a raw regex, meaning the plugin should not make any modification at runtime.\n\nThis means the regex will not match on the entire string by default, which might be exploited if your regex allow unexpected input to be considered valid. When using this option, make sure your regex is correct.",
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
import TOverlay from "@comp/app/t-overlay.vue";
|
import TOverlay from "@comp/app/t-overlay.vue";
|
||||||
import showLoading from "@comp/func/loading.js";
|
import showLoading from "@comp/func/loading.js";
|
||||||
import showSnackbar from "@comp/func/snackbar.js";
|
import showSnackbar from "@comp/func/snackbar.js";
|
||||||
import { computed, ref, shallowRef } from "vue";
|
import { computed, nextTick, ref, shallowRef } from "vue";
|
||||||
|
|
||||||
import type { TpImage } from "./tp-image.vue";
|
import type { TpImage } from "./tp-image.vue";
|
||||||
|
|
||||||
@@ -63,6 +63,10 @@ async function onCopy(): Promise<void> {
|
|||||||
showSnackbar.warn("GIF 图片不支持复制到剪贴板");
|
showSnackbar.warn("GIF 图片不支持复制到剪贴板");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!showOri.value) {
|
||||||
|
showOri.value = true;
|
||||||
|
await nextTick();
|
||||||
|
}
|
||||||
await showLoading.start("正在复制图片到剪贴板");
|
await showLoading.start("正在复制图片到剪贴板");
|
||||||
const image = props.image.insert.image;
|
const image = props.image.insert.image;
|
||||||
if (buffer.value === null) buffer.value = await getImageBuffer(image);
|
if (buffer.value === null) buffer.value = await getImageBuffer(image);
|
||||||
@@ -73,6 +77,10 @@ async function onCopy(): Promise<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function onDownload(): Promise<void> {
|
async function onDownload(): Promise<void> {
|
||||||
|
if (!showOri.value) {
|
||||||
|
showOri.value = true;
|
||||||
|
await nextTick();
|
||||||
|
}
|
||||||
await showLoading.start("正在下载图片到本地");
|
await showLoading.start("正在下载图片到本地");
|
||||||
const image = props.image.insert.image;
|
const image = props.image.insert.image;
|
||||||
if (buffer.value === null) buffer.value = await getImageBuffer(image);
|
if (buffer.value === null) buffer.value = await getImageBuffer(image);
|
||||||
|
|||||||
Reference in New Issue
Block a user