Skip to content

Commit

Permalink
Fix Integration,Profile Download Console and Refactoring path
Browse files Browse the repository at this point in the history
* Fix integration skin service

* Edit font download console

* Edit Gml.Web.Client

* Refactoring path
  • Loading branch information
Scondic authored Jun 27, 2024
1 parent f97f569 commit 3a59499
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 9 deletions.
6 changes: 1 addition & 5 deletions src/core/providers/QueryProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ export function QueryProvider({ children }: PropsWithChildren) {
defaultOptions: {
queries: {
refetchOnWindowFocus: false,
retry: (failureCount, error) => {
return !(
isAxiosError(error) && error.response?.data.statusCode === HttpStatusCode.NotFound
);
},
retry: false,
},
},
}),
Expand Down
16 changes: 16 additions & 0 deletions src/shared/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,19 @@ export const HREF_GET_DATALIFE_ENGINE_AUTH_PHP =
"https://raw.githubusercontent.com/GamerVII-NET/Gml.Modules.Auth/master/DLE/auth.php";
export const HREF_DOCUMENTATION_CUSTOM_ENDPOINT =
"https://gml-launcher.github.io/Gml.Docs/integrations-auth-custom.html";

export const DEFAULT_TIMEOUT = 30000;
export const RETRY_DELAY_MAX = 10;
export const RETRY_ATTEMPTS_MAX = 5;
export const OFFLINE_RETRY_DELAY = 2000;
export const OFFLINE_RETRY_ATTEMPTS_MAX = 0;
export const SECOND = 1000;
export const MINUTE = 60 * SECOND;
export const HOUR = 60 * MINUTE;
export const DAY = 24 * HOUR;
export const WEEK = 7 * DAY;
export const MONTH = 4 * WEEK;
export const YEAR = 12 * MONTH;
export const MINUTE_IN_SECONDS = 60;
export const HOUR_IN_SECONDS = 60 * MINUTE_IN_SECONDS;
export const DAY_IN_SECONDS = 24 * HOUR_IN_SECONDS;
6 changes: 3 additions & 3 deletions src/shared/hooks/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from './useProfiles';
export * from './useAuthorization';
export * from './useIntegraions';
export * from "./useProfiles";
export * from "./useAuthorization";
export * from "./useIntegrations";
File renamed without changes.
11 changes: 10 additions & 1 deletion src/widgets/client-hub/ui/DownloadClientHub.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,28 @@

import React, { useEffect, useRef } from "react";

import { Ubuntu_Mono } from "next/font/google";

import { ProfileExtendedBaseEntity } from "@/shared/api/contracts";
import { Button } from "@/shared/ui/button";
import { Progress } from "@/shared/ui/progress";
import { Textarea } from "@/shared/ui/textarea";
import { Icons } from "@/shared/ui/icons";

import { useConnectionHub } from "../lib/useConnectionHub";
import { cn } from "@/shared/lib/utils";

interface DownloadClientHubProps {
profile?: ProfileExtendedBaseEntity;
isLoading?: boolean;
}

const ubuntuMono = Ubuntu_Mono({
subsets: ["latin"],
variable: "--font-sans",
weight: "400",
});

export function DownloadClientHub(props: DownloadClientHubProps) {
const {
onDownloadDistributive,
Expand Down Expand Up @@ -97,7 +106,7 @@ export function DownloadClientHub(props: DownloadClientHubProps) {
<Textarea
ref={textareaRef}
value={logs.join("\n")}
className="h-64 max-h-64"
className={cn("h-64 max-h-64 font-sans", ubuntuMono.variable)}
readOnly
/>
</div>
Expand Down

0 comments on commit 3a59499

Please sign in to comment.