mirror of
https://github.com/YuzuZensai/Minikura.git
synced 2026-09-13 18:59:25 +00:00
🐛 fix: align dashboard with secured APIs
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
import { api } from "@/lib/api-client";
|
||||
|
||||
type ReverseProxyApi = {
|
||||
get: () => Promise<{ data?: unknown }>;
|
||||
get: () => Promise<{ data?: unknown; error?: unknown }>;
|
||||
(params: {
|
||||
id: string;
|
||||
}): {
|
||||
delete: () => Promise<{ data?: unknown; error?: unknown }>;
|
||||
"connection-info": { get: () => Promise<{ data?: unknown }> };
|
||||
patch: (body: unknown) => Promise<{ data?: unknown; error?: unknown }>;
|
||||
"connection-info": { get: () => Promise<{ data?: unknown; error?: unknown }> };
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
"use client";
|
||||
|
||||
import { useGSAP } from "@gsap/react";
|
||||
import gsap from "gsap";
|
||||
|
||||
gsap.registerPlugin(useGSAP);
|
||||
|
||||
export const motionEase = {
|
||||
out: "power3.out",
|
||||
inOut: "power2.inOut",
|
||||
expo: "expo.out",
|
||||
snap: "power4.out",
|
||||
} as const;
|
||||
|
||||
export const motionDuration = {
|
||||
fast: 0.32,
|
||||
base: 0.55,
|
||||
slow: 0.85,
|
||||
} as const;
|
||||
|
||||
export function prefersReducedMotion() {
|
||||
if (typeof window === "undefined") return false;
|
||||
return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
||||
}
|
||||
|
||||
export { gsap, useGSAP };
|
||||
@@ -71,7 +71,7 @@ function parseProxyServerConnections(
|
||||
): string[] {
|
||||
const backends = backendsByProxyId?.get(proxy.id);
|
||||
if (!backends) {
|
||||
return allServers.map((s) => s.id);
|
||||
return [];
|
||||
}
|
||||
const known = new Set(allServers.map((s) => s.id));
|
||||
return backends.filter((id) => known.has(id));
|
||||
|
||||
Reference in New Issue
Block a user