Rewrite the restricted iterators and reorder the forward references. [skip build]
Checks / checks (push) Successful in 2m11s
Trigger cinny-mobile / dispatch (push) Successful in 2s

This commit is contained in:
2026-11-01 21:05:47 +11:00
parent 5477242661
commit 664b7eb739
25 changed files with 472 additions and 437 deletions
+37 -37
View File
@@ -31,43 +31,6 @@ import { pluginMarketplaceManager, pluginRegistry, SettingDefinition } from './P
import { stopPropagation } from '../../../utils/keyboard';
import { fuzzyFilter } from '../../../utils/fuzzy';
/**
* Renders settings UI for a plugin based on its settings schema
*/
function PluginSettingsRenderer({ pluginId }: { pluginId: string }) {
const schema = pluginRegistry.getPluginSettingsSchema(pluginId);
const [, forceUpdate] = useState({});
if (!schema || Object.keys(schema).length === 0) {
return (
<Box padding="300">
<Text size="T300" priority="300">
No settings available for this plugin.
</Text>
</Box>
);
}
const handleChange = (key: string, value: any) => {
pluginRegistry.setPluginSetting(pluginId, key, value);
forceUpdate({});
};
return (
<Box direction="Column" gap="300" style={{ padding: config.space.S400 }}>
{Object.entries(schema).map(([key, def]) => (
<SettingRenderer
key={key}
settingKey={key}
definition={def}
value={pluginRegistry.getPluginSetting(pluginId, key)}
onChange={(value) => handleChange(key, value)}
/>
))}
</Box>
);
}
/**
* Renders a single setting based on its type
*/
@@ -242,6 +205,43 @@ function SettingRenderer({
return null;
}
/**
* Renders settings UI for a plugin based on its settings schema
*/
function PluginSettingsRenderer({ pluginId }: { pluginId: string }) {
const schema = pluginRegistry.getPluginSettingsSchema(pluginId);
const [, forceUpdate] = useState({});
if (!schema || Object.keys(schema).length === 0) {
return (
<Box padding="300">
<Text size="T300" priority="300">
No settings available for this plugin.
</Text>
</Box>
);
}
const handleChange = (key: string, value: any) => {
pluginRegistry.setPluginSetting(pluginId, key, value);
forceUpdate({});
};
return (
<Box direction="Column" gap="300" style={{ padding: config.space.S400 }}>
{Object.entries(schema).map(([key, def]) => (
<SettingRenderer
key={key}
settingKey={key}
definition={def}
value={pluginRegistry.getPluginSetting(pluginId, key)}
onChange={(value) => handleChange(key, value)}
/>
))}
</Box>
);
}
function PluginAvatar({ thumbnail, name }: { thumbnail: string; name: string }) {
const [imageError, setImageError] = useState(false);