Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/cyberstorm-remix/app/commonComponents/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import "./Footer.css";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faDiscord, faGithub } from "@fortawesome/free-brands-svg-icons";
import { faBoltLightning } from "@fortawesome/free-solid-svg-icons";
import { ThunderstoreLogoHorizontal } from "@thunderstore/cyberstorm/src/svg/svg";
import {
Heading,
NewButton,
NewIcon,
NewLink,
} from "@thunderstore/cyberstorm/src";
ThunderstoreLogoHorizontal,
} from "@thunderstore/cyberstorm";
import { faArrowUpRight } from "@fortawesome/pro-solid-svg-icons";

const AD_IMAGE_SRC = "/cyberstorm-static/images/tsmm_screenshot.png";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,19 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import "./MobileNavigation.css";
import "./Navigation.css";
import {
Menu,
NewLink,
NewIcon,
Heading,
Menu,
Modal,
NewButton,
NewDropDown,
NewDropDownItem,
Modal,
NewDropDownDivider,
NewDropDownItem,
NewAvatar,
} from "@thunderstore/cyberstorm";
import {
NewIcon,
NewLink,
OverwolfLogo,
ThunderstoreLogo,
} from "@thunderstore/cyberstorm/src/svg/svg";
} from "@thunderstore/cyberstorm";
import { type CurrentUser } from "@thunderstore/dapper/types";

import {
Expand Down
4 changes: 2 additions & 2 deletions apps/cyberstorm-remix/app/p/packageEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import {
NewIcon,
NewSelectSearch,
NewTag,
formatToDisplayName,
useToast,
} from "@thunderstore/cyberstorm";
import "./packageEdit.css";
import {
Expand All @@ -15,7 +17,6 @@ import {
type PackageListingUpdateRequestData,
packageUnlist,
} from "@thunderstore/thunderstore-api";
import { formatToDisplayName } from "@thunderstore/cyberstorm/src/utils/utils";
import { DapperTs } from "@thunderstore/dapper-ts";
import { type OutletContextShape } from "~/root";
import {
Expand All @@ -25,7 +26,6 @@ import {
import { PageHeader } from "~/commonComponents/PageHeader/PageHeader";
import { useStrongForm } from "cyberstorm/utils/StrongForm/useStrongForm";
import { useReducer } from "react";
import { useToast } from "@thunderstore/cyberstorm/src/newComponents/Toast/Provider";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faBan, faCheck } from "@fortawesome/pro-solid-svg-icons";
import { ApiAction } from "@thunderstore/ts-api-react-actions";
Expand Down
120 changes: 58 additions & 62 deletions apps/cyberstorm-remix/app/p/packageListing.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,47 @@
import type {
LoaderFunctionArgs,
ShouldRevalidateFunctionArgs,
} from "react-router";
import {
memo,
type ReactElement,
Suspense,
useEffect,
useMemo,
useReducer,
useRef,
useState,
} from "react";
import {
Await,
Outlet,
useLoaderData,
useLocation,
useOutletContext,
type LoaderFunctionArgs,
type ShouldRevalidateFunctionArgs,
} from "react-router";
import { useHydrated } from "remix-utils/use-hydrated";
import {
faUsers,
faHandHoldingHeart,
faDownload,
faThumbsUp,
faWarning,
faCaretRight,
faScaleBalanced,
faCog,
} from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faArrowUpRight, faLips } from "@fortawesome/pro-solid-svg-icons";

import { CopyButton } from "app/commonComponents/CopyButton/CopyButton";
import { PageHeader } from "app/commonComponents/PageHeader/PageHeader";
import TeamMembers from "app/p/components/TeamMembers/TeamMembers";
import { type OutletContextShape } from "app/root";
import { useStrongForm } from "cyberstorm/utils/StrongForm/useStrongForm";
import { isPromise } from "cyberstorm/utils/typeChecks";
import {
getPublicEnvVariables,
getSessionTools,
} from "cyberstorm/security/publicEnvVariables";

import {
Drawer,
Heading,
Expand All @@ -20,11 +53,20 @@ import {
NewSelect,
NewTag,
NewTextInput,
RelativeTime,
type SelectOption,
SkeletonBox,
Tabs,
ThunderstoreLogo,
formatFileSize,
formatInteger,
formatToDisplayName,
useToast,
} from "@thunderstore/cyberstorm";
import "./packageListing.css";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { PackageLikeAction } from "@thunderstore/cyberstorm-forms";
import type { TagVariants } from "@thunderstore/cyberstorm-theme/src/components";
import type { CurrentUser } from "@thunderstore/dapper/types";
import { DapperTs, type DapperTsInterface } from "@thunderstore/dapper-ts";
import {
fetchPackagePermissions,
packageListingApprove,
Expand All @@ -33,55 +75,9 @@ import {
type PackageListingReportRequestData,
type RequestConfig,
} from "@thunderstore/thunderstore-api";
import { ThunderstoreLogo } from "@thunderstore/cyberstorm/src/svg/svg";
import {
faUsers,
faHandHoldingHeart,
faDownload,
faThumbsUp,
faWarning,
faCaretRight,
faScaleBalanced,
faCog,
} from "@fortawesome/free-solid-svg-icons";
import TeamMembers from "./components/TeamMembers/TeamMembers";
import {
memo,
type ReactElement,
Suspense,
useEffect,
useMemo,
useReducer,
useRef,
useState,
} from "react";
import { useHydrated } from "remix-utils/use-hydrated";
import { PackageLikeAction } from "@thunderstore/cyberstorm-forms";
import { PageHeader } from "~/commonComponents/PageHeader/PageHeader";
import { faArrowUpRight, faLips } from "@fortawesome/pro-solid-svg-icons";
import { RelativeTime } from "@thunderstore/cyberstorm/src/components/RelativeTime/RelativeTime";
import {
formatFileSize,
formatInteger,
formatToDisplayName,
} from "@thunderstore/cyberstorm/src/utils/utils";
import { DapperTs } from "@thunderstore/dapper-ts";
import { type OutletContextShape } from "~/root";
import { CopyButton } from "~/commonComponents/CopyButton/CopyButton";
import {
getPublicEnvVariables,
getSessionTools,
} from "cyberstorm/security/publicEnvVariables";
import { useToast } from "@thunderstore/cyberstorm/src/newComponents/Toast/Provider";
import { ApiAction } from "@thunderstore/ts-api-react-actions";
import type { TagVariants } from "@thunderstore/cyberstorm-theme/src/components";
import type { SelectOption } from "@thunderstore/cyberstorm/src/newComponents/Select/Select";
import { useStrongForm } from "cyberstorm/utils/StrongForm/useStrongForm";
import { getPackageListingDetails } from "@thunderstore/dapper-ts/src/methods/packageListings";
import { getCommunity } from "@thunderstore/dapper-ts/src/methods/communities";
import { getTeamDetails } from "@thunderstore/dapper-ts/src/methods/team";
import type { CurrentUser } from "@thunderstore/dapper/types";
import { isPromise } from "cyberstorm/utils/typeChecks";

import "./packageListing.css";

type PackageListingOutletContext = OutletContextShape & {
packageDownloadUrl?: string;
Expand Down Expand Up @@ -944,8 +940,8 @@ function ReportPackageForm(props: {
ReportPackageForm.displayName = "ReportPackageForm";

function packageTags(
listing: Awaited<ReturnType<typeof getPackageListingDetails>>,
community: Awaited<ReturnType<typeof getCommunity>>
listing: Awaited<ReturnType<DapperTsInterface["getPackageListingDetails"]>>,
community: Awaited<ReturnType<DapperTsInterface["getCommunity"]>>
) {
return listing.categories.map((category) => {
return (
Expand All @@ -965,8 +961,8 @@ function packageTags(
}

function packageBoxes(
listing: Awaited<ReturnType<typeof getPackageListingDetails>>,
community: Awaited<ReturnType<typeof getCommunity>>,
listing: Awaited<ReturnType<DapperTsInterface["getPackageListingDetails"]>>,
community: Awaited<ReturnType<DapperTsInterface["getCommunity"]>>,
domain: string
) {
const pt = packageTags(listing, community);
Expand Down Expand Up @@ -1019,7 +1015,7 @@ function packageBoxes(
// TODO: Enable when APIs are available
function managementTools(
packagePermissions: Awaited<ReturnType<typeof fetchPackagePermissions>>,
listing: Awaited<ReturnType<typeof getPackageListingDetails>>,
listing: Awaited<ReturnType<DapperTsInterface["getPackageListingDetails"]>>,
toast: ReturnType<typeof useToast>,
requestConfig: () => RequestConfig
) {
Expand Down Expand Up @@ -1110,8 +1106,8 @@ function likeAction(
}

const Actions = memo(function Actions(props: {
team: Awaited<ReturnType<typeof getTeamDetails>>;
listing: Awaited<ReturnType<typeof getPackageListingDetails>>;
team: Awaited<ReturnType<DapperTsInterface["getTeamDetails"]>>;
listing: Awaited<ReturnType<DapperTsInterface["getPackageListingDetails"]>>;
isLiked: boolean;
currentUser: CurrentUser | undefined;
likeUpdateTrigger: () => Promise<void>;
Expand Down Expand Up @@ -1190,7 +1186,7 @@ const Actions = memo(function Actions(props: {
function packageMeta(
lastUpdated: ReactElement | undefined,
firstUploaded: ReactElement | undefined,
listing: Awaited<ReturnType<typeof getPackageListingDetails>>
listing: Awaited<ReturnType<DapperTsInterface["getPackageListingDetails"]>>
) {
return (
<div className="package-listing-sidebar__meta">
Expand Down
2 changes: 1 addition & 1 deletion apps/cyberstorm-remix/app/p/tabs/Wiki/WikiNewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {
NewButton,
NewTextInput,
Tabs,
useToast,
} from "@thunderstore/cyberstorm";
import { useToast } from "@thunderstore/cyberstorm/src/newComponents/Toast/Provider";
import { useStrongForm } from "cyberstorm/utils/StrongForm/useStrongForm";
import { useReducer, useState } from "react";
import {
Expand Down
2 changes: 1 addition & 1 deletion apps/cyberstorm-remix/app/p/tabs/Wiki/WikiPageEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import {
NewLink,
NewTextInput,
Tabs,
useToast,
} from "@thunderstore/cyberstorm";
import { useToast } from "@thunderstore/cyberstorm/src/newComponents/Toast/Provider";
import { useStrongForm } from "cyberstorm/utils/StrongForm/useStrongForm";
import { useReducer, useState } from "react";
import {
Expand Down
2 changes: 1 addition & 1 deletion apps/cyberstorm-remix/app/settings/teams/Teams.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import {
NewLink,
NewTable,
NewTextInput,
useToast,
} from "@thunderstore/cyberstorm";
import { faPlus } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { useReducer, useState } from "react";
import { PageHeader } from "~/commonComponents/PageHeader/PageHeader";
import { useToast } from "@thunderstore/cyberstorm/src/newComponents/Toast/Provider";
import {
type RequestConfig,
teamCreate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import {
NewSelect,
NewTable,
NewTextInput,
type SelectOption,
useToast,
} from "@thunderstore/cyberstorm";
import { type LoaderFunctionArgs } from "react-router";
import { useLoaderData, useOutletContext, useRevalidator } from "react-router";
Expand All @@ -26,8 +28,6 @@ import { TableSort } from "@thunderstore/cyberstorm/src/newComponents/Table/Tabl
import { ApiAction } from "@thunderstore/ts-api-react-actions";
import { DapperTs } from "@thunderstore/dapper-ts";
import { getSessionTools } from "cyberstorm/security/publicEnvVariables";
import { useToast } from "@thunderstore/cyberstorm/src/newComponents/Toast/Provider";
import { type SelectOption } from "@thunderstore/cyberstorm/src/newComponents/Select/Select";
import { useStrongForm } from "cyberstorm/utils/StrongForm/useStrongForm";
import { useReducer, useState } from "react";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ import { type OutletContextShape } from "~/root";
import "./Profile.css";
import { DapperTs } from "@thunderstore/dapper-ts";
import { getSessionTools } from "cyberstorm/security/publicEnvVariables";
import { useToast } from "@thunderstore/cyberstorm/src/newComponents/Toast/Provider";
import { useStrongForm } from "cyberstorm/utils/StrongForm/useStrongForm";
import { useReducer } from "react";
import { NewButton, NewTextInput } from "@thunderstore/cyberstorm";
import { NewButton, NewTextInput, useToast } from "@thunderstore/cyberstorm";

export async function clientLoader({ params }: LoaderFunctionArgs) {
if (params.namespaceId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
NewTextInput,
Heading,
CodeBox,
useToast,
} from "@thunderstore/cyberstorm";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faPlus, faTrash } from "@fortawesome/free-solid-svg-icons";
Expand All @@ -25,7 +26,6 @@ import { type OutletContextShape } from "../../../../../root";
import { useReducer, useState } from "react";
import { DapperTs } from "@thunderstore/dapper-ts";
import { getSessionTools } from "cyberstorm/security/publicEnvVariables";
import { useToast } from "@thunderstore/cyberstorm/src/newComponents/Toast/Provider";
import { ApiAction } from "@thunderstore/ts-api-react-actions";
import { useStrongForm } from "cyberstorm/utils/StrongForm/useStrongForm";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import {
NewIcon,
NewLink,
NewTextInput,
useToast,
} from "@thunderstore/cyberstorm";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faTrashCan } from "@fortawesome/free-solid-svg-icons";
import { useNavigate, useOutletContext, useParams } from "react-router";

import { type OutletContextShape } from "~/root";
import { useToast } from "@thunderstore/cyberstorm/src/newComponents/Toast/Provider";
import {
type RequestConfig,
teamDisband,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import {
NewButton,
NewIcon,
NewTextInput,
useToast,
} from "@thunderstore/cyberstorm";
import { faTrashCan } from "@fortawesome/pro-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { NotLoggedIn } from "~/commonComponents/NotLoggedIn/NotLoggedIn";
import { type OutletContextShape } from "~/root";
import { useToast } from "@thunderstore/cyberstorm/src/newComponents/Toast/Provider";
import { useStrongForm } from "cyberstorm/utils/StrongForm/useStrongForm";
import { useReducer } from "react";
import { userDelete } from "@thunderstore/thunderstore-api";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { NewLink } from "@thunderstore/cyberstorm";
import { NewLink, OverwolfLogo, useToast } from "@thunderstore/cyberstorm";

import { useOutletContext } from "react-router";
import { buildAuthLoginUrl } from "cyberstorm/utils/ThunderstoreAuth";

import { useToast } from "@thunderstore/cyberstorm/src/newComponents/Toast/Provider";
import { userLinkedAccountDisconnect } from "../../../../../../packages/thunderstore-api/src";

import { Connection } from "~/commonComponents/Connection/Connection";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faGithub, faDiscord } from "@fortawesome/free-brands-svg-icons";
import { OverwolfLogo } from "@thunderstore/cyberstorm/src/svg/svg";
import { type ReactElement } from "react";
import { type OutletContextShape } from "~/root";
import { ApiAction } from "@thunderstore/ts-api-react-actions";
Expand Down
2 changes: 1 addition & 1 deletion apps/cyberstorm-remix/app/upload/upload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
NewTable,
NewTableSort,
NewTag,
useToast,
} from "@thunderstore/cyberstorm";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { PageHeader } from "../commonComponents/PageHeader/PageHeader";
Expand Down Expand Up @@ -43,7 +44,6 @@ import { type PackageSubmissionRequestData } from "@thunderstore/thunderstore-ap
import { type OutletContextShape } from "../root";
import { useStrongForm } from "cyberstorm/utils/StrongForm/useStrongForm";
import { postPackageSubmissionMetadata } from "@thunderstore/dapper-ts/src/methods/package";
import { useToast } from "@thunderstore/cyberstorm/src/newComponents/Toast/Provider";
import { faCheckCircle } from "@fortawesome/free-solid-svg-icons";
import { classnames } from "@thunderstore/cyberstorm/src/utils/utils";
import {
Expand Down
Loading
Loading