Skip to content

Commit

Permalink
Add menu item to submit a plugin to Plugin Manager window
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismaltby committed Oct 24, 2024
1 parent d443660 commit 6331edf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/plugins/PluginManagerPlugins.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { PluginTypeSelect } from "components/forms/PluginTypeSelect";
import { BlankIcon, CheckIcon, SettingsIcon, UpdateIcon } from "ui/icons/Icons";
import { ConsistentWidthLabel } from "ui/util/ConsistentWidthLabel";
import { DropdownButton } from "ui/buttons/DropdownButton";
import { MenuItem } from "ui/menu/Menu";
import { MenuDivider, MenuItem } from "ui/menu/Menu";
import {
StyledPluginItemRow,
StyledPluginItemRowName,
Expand Down Expand Up @@ -43,6 +43,7 @@ import {
} from "shared/lib/plugins/pluginHelpers";
import { PillButton } from "ui/buttons/PillButton";
import { TooltipWrapper } from "ui/tooltips/Tooltip";
import { OFFICIAL_REPO_GITHUB_SUBMIT } from "consts";

export type PluginItem = {
id: string;
Expand Down Expand Up @@ -206,6 +207,12 @@ const PluginsManagerPlugins = ({
<MenuItem onClick={() => refreshData(true)}>
{l10n("FIELD_REFRESH_REPOSITORIES")}
</MenuItem>
<MenuDivider />
<MenuItem
onClick={() => API.app.openExternal(OFFICIAL_REPO_GITHUB_SUBMIT)}
>
{l10n("FIELD_SUBMIT_PLUGIN")}
</MenuItem>
</DropdownButton>
</StyledPluginManagerSearch>
<StyledPluginManagerSearchResults>
Expand Down
3 changes: 3 additions & 0 deletions src/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ const eventsRoot = path.normalize(`${rootDir}/src/lib/events`);
const assetsRoot = path.normalize(`${rootDir}/src/assets`);

export const OFFICIAL_REPO_URL = "https://plugins.gbstudio.dev/repository.json";
export const OFFICIAL_REPO_GITHUB =
"https://github.com/gb-studio-dev/gb-studio-plugins";
export const OFFICIAL_REPO_GITHUB_SUBMIT = `${OFFICIAL_REPO_GITHUB}#submitting-plugins`;

// Electron Settings
export const THEME_SETTING_KEY = "themeId";
Expand Down
1 change: 1 addition & 0 deletions src/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,7 @@
"FIELD_LAYER_OPACITY": "Layer Opacity",
"FIELD_HIDE_OTHER_LAYERS": "Hide Other Layers",
"FIELD_SHOW_TILE_VALUES": "Show Tile Values",
"FIELD_SUBMIT_PLUGIN": "Submit Plugin",

"// 7": "Asset Viewer ---------------------------------------------",
"ASSET_SEARCH": "Search...",
Expand Down

0 comments on commit 6331edf

Please sign in to comment.