diff --git a/apps/cyberstorm-remix/app/p/packageListing.tsx b/apps/cyberstorm-remix/app/p/packageListing.tsx index b5562845e..cb9b22a9c 100644 --- a/apps/cyberstorm-remix/app/p/packageListing.tsx +++ b/apps/cyberstorm-remix/app/p/packageListing.tsx @@ -27,7 +27,7 @@ import { faCog, faArrowUpRight, faUsers, - faDonate, + faHandHoldingHeart, faDownload, faThumbsUp, // faFlag, @@ -35,6 +35,8 @@ import { faFileLines, faFilePlus, faCodeBranch, + faBook, + faCodeSimple, } from "@fortawesome/pro-solid-svg-icons"; import { WrapperCard } from "@thunderstore/cyberstorm/src/components/WrapperCard/WrapperCard"; import Meta from "./components/Meta/Meta"; @@ -199,6 +201,10 @@ export default function Community() { ? "changelog" : location.pathname.endsWith("/versions") ? "versions" + : location.pathname.endsWith("/wiki") + ? "wiki" + : location.pathname.endsWith("/source") + ? "source" : "details"; return ( @@ -308,11 +314,27 @@ export default function Community() { currentTab === "details" ? tabsStyles.active : "" )} > - + Details + + + + + Wiki + {listing.has_changelog ? ( - + Changelog @@ -342,11 +364,27 @@ export default function Community() { currentTab === "versions" ? tabsStyles.active : "" )} > - + Versions + + + + + Source + @@ -385,11 +423,7 @@ export default function Community() { {mappedPackageTagList} } - headerIcon={ - - - - } + headerIcon={} /> ) : null} @@ -410,7 +444,7 @@ const DonateButton = (props: { donationLink: string }) => ( paddingSize="mediumSquare" > - + ); diff --git a/apps/cyberstorm-remix/cyberstorm/utils/LinkLibrary.tsx b/apps/cyberstorm-remix/cyberstorm/utils/LinkLibrary.tsx index 4f2530734..6732f4f57 100644 --- a/apps/cyberstorm-remix/cyberstorm/utils/LinkLibrary.tsx +++ b/apps/cyberstorm-remix/cyberstorm/utils/LinkLibrary.tsx @@ -46,6 +46,11 @@ const library: LinkLibrary = { MarkdownPreview: (p) => Link({ ...p, url: "/developers/markdown-preview/" }), Package: (p) => Link({ ...p, url: `/c/${p.community}/p/${p.namespace}/${p.package}/` }), + PackageWiki: (p) => + Link({ + ...p, + url: `/c/${p.community}/p/${p.namespace}/${p.package}/wiki`, + }), PackageChangelog: (p) => Link({ ...p, @@ -56,6 +61,11 @@ const library: LinkLibrary = { ...p, url: `/c/${p.community}/p/${p.namespace}/${p.package}/versions`, }), + PackageSource: (p) => + Link({ + ...p, + url: `/c/${p.community}/p/${p.namespace}/${p.package}/source`, + }), PackageDependants: (p) => Link({ ...p, diff --git a/packages/cyberstorm/src/components/Links/LinkingProvider.tsx b/packages/cyberstorm/src/components/Links/LinkingProvider.tsx index 830fcc9b8..e84b2795f 100644 --- a/packages/cyberstorm/src/components/Links/LinkingProvider.tsx +++ b/packages/cyberstorm/src/components/Links/LinkingProvider.tsx @@ -78,10 +78,14 @@ export interface LinkLibrary { MarkdownPreview: NoRequiredProps; /** Package's detail view */ Package: (props: AnyProps & PackageProps) => RE | null; + /** Package's wiki view */ + PackageWiki: (props: AnyProps & PackageProps) => RE | null; /** Package's changelog view */ PackageChangelog: (props: AnyProps & PackageProps) => RE | null; /** Package's versions view */ PackageVersions: (props: AnyProps & PackageProps) => RE | null; + /** Package's source view */ + PackageSource: (props: AnyProps & PackageProps) => RE | null; /** View listing other packages that depend on this package */ PackageDependants: (props: AnyProps & PackageProps) => RE | null; /** Package format docs */ @@ -119,8 +123,10 @@ const library: LinkLibrary = { ManifestValidator: noop, MarkdownPreview: noop, Package: noop, + PackageWiki: noop, PackageChangelog: noop, PackageVersions: noop, + PackageSource: noop, PackageDependants: noop, PackageFormatDocs: noop, PackageVersion: noop, diff --git a/packages/cyberstorm/src/components/Links/Links.tsx b/packages/cyberstorm/src/components/Links/Links.tsx index e7fae79c1..ca9c43031 100644 --- a/packages/cyberstorm/src/components/Links/Links.tsx +++ b/packages/cyberstorm/src/components/Links/Links.tsx @@ -52,8 +52,10 @@ export type CyberstormLinkIds = | "ManifestValidator" | "MarkdownPreview" | "Package" + | "PackageWiki" | "PackageChangelog" | "PackageVersions" + | "PackageSource" | "PackageDependants" | "PackageFormatDocs" | "PackageVersion" diff --git a/packages/cyberstorm/src/components/WrapperCard/WrapperCard.module.css b/packages/cyberstorm/src/components/WrapperCard/WrapperCard.module.css index bedc83a9a..81b165542 100644 --- a/packages/cyberstorm/src/components/WrapperCard/WrapperCard.module.css +++ b/packages/cyberstorm/src/components/WrapperCard/WrapperCard.module.css @@ -28,7 +28,5 @@ } .icon { - width: 1em; - height: 1em; color: var(--color-text--tertiary); }