fixed tauri permissions

This commit is contained in:
Vomitblood 2024-11-11 23:46:07 +08:00
parent cfcfea282b
commit 36f00fc1d7
5 changed files with 20 additions and 25 deletions

View file

@ -1,20 +1,30 @@
{ {
"$schema": "../gen/schemas/desktop-schema.json", "$schema": "../gen/schemas/desktop-schema.json",
"identifier": "default",
"description": "enables the default permissions", "description": "enables the default permissions",
"windows": [ "identifier": "default-capability",
"main"
],
"permissions": [ "permissions": [
"core:default", "core:default",
"http:default", "http:default",
"core:window:default",
"core:window:allow-start-dragging",
"core:window:allow-is-fullscreen",
"core:window:allow-minimize",
"core:window:allow-toggle-maximize",
"core:window:allow-close",
"http:allow-fetch",
{ {
"identifier": "http:allow-fetch",
"allow": [ "allow": [
{ {
"url": "https://ip.vomitblood.com" "url": "https://*.vomitblood.com"
} },
] {
"url": "http://localhost"
} }
],
"identifier": "http:default"
}
],
"windows": [
"main"
] ]
} }

View file

@ -3,22 +3,7 @@
"app": { "app": {
"security": { "security": {
"capabilities": [ "capabilities": [
{ "default-capability"
"identifier": "default",
"permissions": [
"core:window:default",
"core:window:allow-start-dragging",
"core:window:allow-is-fullscreen",
"core:window:allow-minimize",
"core:window:allow-toggle-maximize",
"core:window:allow-close",
"http:default",
"http:allow-fetch"
],
"windows": [
"main"
]
}
], ],
"csp": null "csp": null
}, },

View file

@ -4,7 +4,7 @@ import { useAtom } from "jotai";
import { MouseEvent, useState } from "react"; import { MouseEvent, useState } from "react";
import { serverConnectionAtom, serverUrlAtom } from "../../lib/jotai"; import { serverConnectionAtom, serverUrlAtom } from "../../lib/jotai";
import { defaultSettings } from "../../lib/settings"; import { defaultSettings } from "../../lib/settings";
import { ServerUrlInput } from "../Home/ServerUrlInput"; import { ServerUrlInput } from "./ServerUrlInput";
export const ServerStatus = () => { export const ServerStatus = () => {
// contexts // contexts

View file

@ -2,7 +2,7 @@ import { Box, Button, Container, Grid2, Switch, TextField, Typography, useTheme
import { HeaderBar } from "../HeaderBar/HeaderBar"; import { HeaderBar } from "../HeaderBar/HeaderBar";
import { AttackItem } from "./AttackItem"; import { AttackItem } from "./AttackItem";
import { ServerUrlInput } from "./ServerUrlInput"; import { ServerUrlInput } from "../HeaderBar/ServerUrlInput";
export const Layout = () => { export const Layout = () => {
// contexts // contexts