Fix server validation on app startup #74
This commit is contained in:
2 files changed
+6
-5
No files matched your search
@@ -17,7 +17,7 @@ tauri-build = { version = "1.2.1", features = [] }
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
tauri = { version = "1.2.2", features = ["api-all", "devtools"] }
|
tauri = { version = "1.2.2", features = ["devtools", "http-all", "process-exit", "process-relaunch", "shell-all", "window-set-fullscreen"] }
|
||||||
tauri-plugin-store = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "dev" }
|
tauri-plugin-store = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "dev" }
|
||||||
tauri-plugin-localhost = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
|
tauri-plugin-localhost = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
|
||||||
portpicker = "0.1" # used in the example to pick a random free port
|
portpicker = "0.1" # used in the example to pick a random free port
|
||||||
|
|||||||
+5
-4
@@ -68,8 +68,8 @@ import { version as appVer } from "../package.json";
|
|||||||
import { v4 as uuidv4 } from "uuid";
|
import { v4 as uuidv4 } from "uuid";
|
||||||
import { delServer, getServer } from "./utils/storage/servers.js";
|
import { delServer, getServer } from "./utils/storage/servers.js";
|
||||||
import { delUser, getUser } from "./utils/storage/user.js";
|
import { delUser, getUser } from "./utils/storage/user.js";
|
||||||
import { getSystemApi } from "@jellyfin/sdk/lib/utils/api/system-api.js";
|
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import axios from "axios";
|
||||||
|
|
||||||
const jellyfin = new Jellyfin({
|
const jellyfin = new Jellyfin({
|
||||||
clientInfo: {
|
clientInfo: {
|
||||||
@@ -182,6 +182,7 @@ function App() {
|
|||||||
enqueueSnackbar("Unable to verfiy server address.", {
|
enqueueSnackbar("Unable to verfiy server address.", {
|
||||||
variant: "error",
|
variant: "error",
|
||||||
});
|
});
|
||||||
|
console.error(error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -243,13 +244,13 @@ function App() {
|
|||||||
if (reason && reason == "backdropClick") {
|
if (reason && reason == "backdropClick") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let result = await relaunch();
|
await relaunch();
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleRemoveServer = async () => {
|
const handleRemoveServer = async () => {
|
||||||
await delServer();
|
await delServer();
|
||||||
await delUser();
|
await delUser();
|
||||||
let result = await relaunch();
|
await relaunch();
|
||||||
};
|
};
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user