style: update everything to biome conventions
This commit is contained in:
88 files changed
+491
-708
No files matched your search
+28
-28
@@ -8,48 +8,48 @@ import axiosTauriApiAdapter from "axios-tauri-api-adapter";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
|
||||
export const axiosClient = axios.create({
|
||||
adapter: axiosTauriApiAdapter,
|
||||
headers: {
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
},
|
||||
timeout: 60000,
|
||||
adapter: axiosTauriApiAdapter,
|
||||
headers: {
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
},
|
||||
timeout: 60000,
|
||||
});
|
||||
|
||||
let deviceId = localStorage.getItem("deviceId");
|
||||
|
||||
if (!deviceId) {
|
||||
const randomId = uuidv4();
|
||||
localStorage.setItem("deviceId", randomId);
|
||||
const randomId = uuidv4();
|
||||
localStorage.setItem("deviceId", randomId);
|
||||
|
||||
deviceId = randomId;
|
||||
deviceId = randomId;
|
||||
}
|
||||
|
||||
const jellyfin = new Jellyfin({
|
||||
clientInfo: {
|
||||
name: "JellyPlayer",
|
||||
version: appVer,
|
||||
},
|
||||
deviceInfo: {
|
||||
name: "JellyPlayer",
|
||||
id: deviceId!,
|
||||
},
|
||||
clientInfo: {
|
||||
name: "JellyPlayer",
|
||||
version: appVer,
|
||||
},
|
||||
deviceInfo: {
|
||||
name: "JellyPlayer",
|
||||
id: deviceId!,
|
||||
},
|
||||
});
|
||||
|
||||
export const useApi = create<{
|
||||
api: Api | null;
|
||||
deviceId: string | null;
|
||||
jellyfin: Jellyfin;
|
||||
api: Api | null;
|
||||
deviceId: string | null;
|
||||
jellyfin: Jellyfin;
|
||||
}>(() => ({
|
||||
api: null,
|
||||
deviceId: deviceId,
|
||||
jellyfin: jellyfin,
|
||||
api: null,
|
||||
deviceId: deviceId,
|
||||
jellyfin: jellyfin,
|
||||
}));
|
||||
|
||||
export const createApi = (
|
||||
serverAddress: string,
|
||||
accessToken: string | undefined
|
||||
serverAddress: string,
|
||||
accessToken: string | undefined,
|
||||
) =>
|
||||
useApi.setState((state) => ({
|
||||
...state,
|
||||
api: jellyfin.createApi(serverAddress, accessToken, axiosClient),
|
||||
}));
|
||||
useApi.setState((state) => ({
|
||||
...state,
|
||||
api: jellyfin.createApi(serverAddress, accessToken, axiosClient),
|
||||
}));
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import { create } from "zustand";
|
||||
|
||||
const initialState = {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import { create } from "zustand";
|
||||
|
||||
export const useBackdropStore = create((set) => ({
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import { create } from "zustand";
|
||||
|
||||
export const useCarouselStore = create((set) => ({
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import { create } from "zustand";
|
||||
import { version } from "../../../package.json";
|
||||
import { getAllServers, getDefaultServer, getServer } from "../storage/servers";
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import { create } from "zustand";
|
||||
|
||||
export const useDrawerStore = create((set) => ({
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import { create } from "zustand";
|
||||
|
||||
export const usePlaybackStore = create((set) => ({
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import { create } from "zustand";
|
||||
|
||||
export const useServerStore = create(() => ({
|
||||
|
||||
Reference in new issue
Block a user