Chungus 2.0

This commit is contained in:
Owen
2025-10-10 11:27:15 -07:00
parent f64a477c3d
commit d92b87b7c8
224 changed files with 1507 additions and 1586 deletions

View File

@@ -1,29 +0,0 @@
/*
* This file is part of a proprietary work.
*
* Copyright (c) 2025 Fossorial, Inc.
* All rights reserved.
*
* This file is licensed under the Fossorial Commercial License.
* You may not use this file except in compliance with the License.
* Unauthorized use, copying, modification, or distribution is strictly prohibited.
*
* This file is not licensed under the AGPLv3.
*/
"use client";
import RemoteExitNodeContext from "@app/contexts/privateRemoteExitNodeContext";
import { build } from "@server/build";
import { useContext } from "react";
export function useRemoteExitNodeContext() {
if (build == "oss") {
return null;
}
const context = useContext(RemoteExitNodeContext);
if (context === undefined) {
throw new Error("useRemoteExitNodeContext must be used within a RemoteExitNodeProvider");
}
return context;
}

View File

@@ -1,29 +0,0 @@
/*
* This file is part of a proprietary work.
*
* Copyright (c) 2025 Fossorial, Inc.
* All rights reserved.
*
* This file is licensed under the Fossorial Commercial License.
* You may not use this file except in compliance with the License.
* Unauthorized use, copying, modification, or distribution is strictly prohibited.
*
* This file is not licensed under the AGPLv3.
*/
import PrivateSubscriptionStatusContext from "@app/contexts/privateSubscriptionStatusContext";
import { build } from "@server/build";
import { useContext } from "react";
export function usePrivateSubscriptionStatusContext() {
if (build == "oss") {
return null;
}
const context = useContext(PrivateSubscriptionStatusContext);
if (context === undefined) {
throw new Error(
"usePrivateSubscriptionStatusContext must be used within an PrivateSubscriptionStatusProvider"
);
}
return context;
}

View File

@@ -1,21 +1,8 @@
/*
* This file is part of a proprietary work.
*
* Copyright (c) 2025 Fossorial, Inc.
* All rights reserved.
*
* This file is licensed under the Fossorial Commercial License.
* You may not use this file except in compliance with the License.
* Unauthorized use, copying, modification, or distribution is strictly prohibited.
*
* This file is not licensed under the AGPLv3.
*/
"use client";
import { useState, useCallback, useEffect } from "react";
import { AxiosResponse } from "axios";
import { GetCertificateResponse } from "@server/routers/private/certificates";
import { GetCertificateResponse } from "#private/routers/certificates";
import { createApiClient } from "@app/lib/api";
import { useEnvContext } from "@app/hooks/useEnvContext";

View File

@@ -0,0 +1,16 @@
"use client";
import RemoteExitNodeContext from "@app/contexts/remoteExitNodeContext";
import { build } from "@server/build";
import { useContext } from "react";
export function useRemoteExitNodeContext() {
if (build == "oss") {
return null;
}
const context = useContext(RemoteExitNodeContext);
if (context === undefined) {
throw new Error("useRemoteExitNodeContext must be used within a RemoteExitNodeProvider");
}
return context;
}

View File

@@ -0,0 +1,16 @@
import SubscriptionStatusContext from "@app/contexts/subscriptionStatusContext";
import { build } from "@server/build";
import { useContext } from "react";
export function useSubscriptionStatusContext() {
if (build == "oss") {
return null;
}
const context = useContext(SubscriptionStatusContext);
if (context === undefined) {
throw new Error(
"useSubscriptionStatusContext must be used within an SubscriptionStatusProvider"
);
}
return context;
}