Bug fixes for selected cell plugin list
This commit is contained in:
parent
cc625d9029
commit
ae6b3bff12
@ -121,7 +121,6 @@ const CellData: React.FC<Props> = ({ selectedCell, counts }) => {
|
|||||||
<span>{data.plugins_count}</span>
|
<span>{data.plugins_count}</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2>Loaded Plugins</h2>
|
|
||||||
<PluginList selectedCell={selectedCell} />
|
<PluginList selectedCell={selectedCell} />
|
||||||
<CellModList mods={data.mods} counts={counts} />
|
<CellModList mods={data.mods} counts={counts} />
|
||||||
</>
|
</>
|
||||||
|
@ -297,6 +297,7 @@ const Map: React.FC = () => {
|
|||||||
clearSelectedCell();
|
clearSelectedCell();
|
||||||
}
|
}
|
||||||
} else if (router.query.plugin && typeof router.query.plugin === "string") {
|
} else if (router.query.plugin && typeof router.query.plugin === "string") {
|
||||||
|
clearSelectedCell();
|
||||||
clearSelectedCells();
|
clearSelectedCells();
|
||||||
setSidebarOpen(true);
|
setSidebarOpen(true);
|
||||||
if (plugins && plugins.length > 0 && pluginsPending === 0) {
|
if (plugins && plugins.length > 0 && pluginsPending === 0) {
|
||||||
|
@ -16,7 +16,11 @@ const PluginsList: React.FC<Props> = ({ selectedCell }) => {
|
|||||||
selectedCell
|
selectedCell
|
||||||
? state.plugins.plugins.filter((plugin) =>
|
? state.plugins.plugins.filter((plugin) =>
|
||||||
plugin.parsed?.cells.some(
|
plugin.parsed?.cells.some(
|
||||||
(cell) => cell.x === selectedCell.x && cell.y === selectedCell.y
|
(cell) =>
|
||||||
|
cell.x === selectedCell.x &&
|
||||||
|
cell.y === selectedCell.y &&
|
||||||
|
// TODO: support other worlds
|
||||||
|
cell.world_form_id === 60
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
: state.plugins.plugins
|
: state.plugins.plugins
|
||||||
@ -25,6 +29,7 @@ const PluginsList: React.FC<Props> = ({ selectedCell }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
{selectedCell && plugins.length > 0 && <h2>Loaded Plugins</h2>}
|
||||||
<ol className={styles["plugin-list"]}>
|
<ol className={styles["plugin-list"]}>
|
||||||
{plugins.map((plugin) => (
|
{plugins.map((plugin) => (
|
||||||
<li key={plugin.filename} title={plugin.filename}>
|
<li key={plugin.filename} title={plugin.filename}>
|
||||||
|
Loading…
Reference in New Issue
Block a user