diff --git a/src/app/plugins/[slug]/page.tsx b/src/app/plugins/[slug]/page.tsx index 5e07c71..8f8f345 100644 --- a/src/app/plugins/[slug]/page.tsx +++ b/src/app/plugins/[slug]/page.tsx @@ -155,15 +155,19 @@ export default async function PluginDetailPage({ ? "var(--status-warning)" : "var(--status-error)"; - // Determine active version from URL param or default to latest - const activeVersion = searchParams.v - ? plugin.versions?.find((v: any) => v.version === searchParams.v) || - plugin.versions?.[0] - : plugin.versions?.[0]; - const isAuthor = session?.user?.id === plugin.authorId; const repoOwnerDetail = plugin.repoUrl?.match(/github\.com\/([^/]+)/)?.[1]; + const displayVersions = + plugin.versions?.filter((v: any) => isAuthor || v.status === "APPROVED") || + []; + + // Determine active version from URL param or default to latest + const activeVersion = searchParams.v + ? displayVersions.find((v: any) => v.version === searchParams.v) || + displayVersions[0] + : displayVersions[0]; + const getRoleStyle = (role: string) => { switch (role) { case "COLLABORATOR": @@ -474,7 +478,7 @@ export default async function PluginDetailPage({
{(session?.user as any)?.trustLevel !== "ADMIN" && ( -

- Display name cannot be changed. - Contact an admin if you need to rename your plugin. -

- )} +

+ Display name cannot be changed. + Contact an admin if you need to rename your plugin. +

+ )}
@@ -535,8 +535,8 @@ export default function EditPluginForm({ plugin }: { plugin: any }) { > Pre-release versions will not be listed by default. This is for users to have a "semi-stable" preview version of your - updates. Pre-release versions are less likely to be rejected, since - a higher amount of bugs are tolerable. + updates. Pre-release versions are less likely to be rejected, + since a higher amount of bugs are tolerable.

diff --git a/src/components/SubmitReviewForm.tsx b/src/components/SubmitReviewForm.tsx index b09689b..8f26378 100644 --- a/src/components/SubmitReviewForm.tsx +++ b/src/components/SubmitReviewForm.tsx @@ -759,8 +759,8 @@ export default function SubmitReviewForm({ > Pre-release versions will not be listed by default. This is for users to have a "semi-stable" preview version of your - updates. Pre-release versions are less likely to be rejected, since - a higher amount of bugs are tolerable. + updates. Pre-release versions are less likely to be rejected, + since a higher amount of bugs are tolerable.