this repo has no description

moonbase: split incompatible dependencies into its own section

Changed files
+18 -7
packages
core-extensions
src
moonbase
webpackModules
ui
extensions
+18 -7
packages/core-extensions/src/moonbase/webpackModules/ui/extensions/info.tsx
···
const version = ext.manifest?.version;
const dependencies: Dependency[] = [];
if (ext.manifest.dependencies != null) {
dependencies.push(
...ext.manifest.dependencies.map((dep) => ({
···
}
if (ext.manifest.incompatible != null) {
-
dependencies.push(
...ext.manifest.incompatible.map((dep) => ({
id: dep,
type: DependencyType.Incompatible
···
{dependencies.length > 0 && (
<InfoSection title="Dependencies">
{dependencies.map((dep) => {
-
/*const colors = {
-
[DependencyType.Dependency]: "var(--bg-mod-strong)",
-
[DependencyType.Optional]: "var(--bg-mod-faint)",
-
[DependencyType.Incompatible]: "var(--red-400)"
-
};
-
const color = colors[dep.type];*/
const name = MoonbaseSettingsStore.tryGetExtensionName(dep.id);
return (
···
const version = ext.manifest?.version;
const dependencies: Dependency[] = [];
+
const incompatible: Dependency[] = [];
+
if (ext.manifest.dependencies != null) {
dependencies.push(
...ext.manifest.dependencies.map((dep) => ({
···
}
if (ext.manifest.incompatible != null) {
+
incompatible.push(
...ext.manifest.incompatible.map((dep) => ({
id: dep,
type: DependencyType.Incompatible
···
{dependencies.length > 0 && (
<InfoSection title="Dependencies">
{dependencies.map((dep) => {
+
const name = MoonbaseSettingsStore.tryGetExtensionName(dep.id);
+
+
// TODO: figure out a decent way to distinguish suggested
+
return (
+
<Badge color="var(--bg-mod-strong)" key={dep.id}>
+
{name}
+
</Badge>
+
);
+
})}
+
</InfoSection>
+
)}
+
+
{incompatible.length > 0 && (
+
<InfoSection title="Incompatible">
+
{incompatible.map((dep) => {
const name = MoonbaseSettingsStore.tryGetExtensionName(dep.id);
return (