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
18 changes: 11 additions & 7 deletions src/app/plugins/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down Expand Up @@ -474,7 +478,7 @@ export default async function PluginDetailPage({
<VersionSelector
slug={plugin.slug}
pluginType={plugin.pluginType}
versions={plugin.versions}
versions={displayVersions}
/>
<div
style={{
Expand Down
4 changes: 2 additions & 2 deletions src/app/plugins/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default async function PluginsPage({
const query = new URLSearchParams();
const currentPage = parseInt(searchParams.page as string) || 1;
query.set("page", currentPage.toString());
query.set("pageSize", "20");
query.set("pageSize", "10");
if (searchParams.q) query.set("q", searchParams.q as string);
if (searchParams.category)
query.set("category", searchParams.category as string);
Expand All @@ -49,7 +49,7 @@ export default async function PluginsPage({
page: 1,
totalPages: 1,
total: 0,
pageSize: 20,
pageSize: 10,
};

// Build pagination URL helper
Expand Down
32 changes: 16 additions & 16 deletions src/components/EditPluginForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -286,20 +286,20 @@ export default function EditPluginForm({ plugin }: { plugin: any }) {
}}
/>
{(session?.user as any)?.trustLevel !== "ADMIN" && (
<p
style={{
fontSize: "0.75rem",
color: "var(--status-warning)",
marginTop: "4px",
display: "flex",
alignItems: "center",
gap: "4px",
}}
>
<AlertTriangle size={12} /> Display name cannot be changed.
Contact an admin if you need to rename your plugin.
</p>
)}
<p
style={{
fontSize: "0.75rem",
color: "var(--status-warning)",
marginTop: "4px",
display: "flex",
alignItems: "center",
gap: "4px",
}}
>
<AlertTriangle size={12} /> Display name cannot be changed.
Contact an admin if you need to rename your plugin.
</p>
)}
</div>

<div>
Expand Down Expand Up @@ -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 &quot;semi-stable&quot; 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.
</p>
</div>

Expand Down
4 changes: 2 additions & 2 deletions src/components/SubmitReviewForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -759,8 +759,8 @@ export default function SubmitReviewForm({
>
Pre-release versions will not be listed by default. This is for
users to have a &quot;semi-stable&quot; 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.
</p>
</div>

Expand Down
Loading