diff --git a/apps/obsidian/src/components/DatacoreCallout.tsx b/apps/obsidian/src/components/DatacoreCallout.tsx new file mode 100644 index 000000000..090286607 --- /dev/null +++ b/apps/obsidian/src/components/DatacoreCallout.tsx @@ -0,0 +1,32 @@ +import { useApp } from "./AppContext"; +import { AppWithPlugins } from "~/services/QueryEngine"; + +export const DatacoreCallout = () => { + const app = useApp(); + + const datacorePlugin = (app as AppWithPlugins)?.plugins?.plugins?.[ + "datacore" + ]; + + if (datacorePlugin) return null; + + return ( +
+
+ ⚠️ Datacore plugin required +
+
+

+ The Datacore plugin is required for Discourse Graphs to function. + Please install and enable it. +

+ + Install Datacore + +
+
+ ); +}; diff --git a/apps/obsidian/src/components/Settings.tsx b/apps/obsidian/src/components/Settings.tsx index 811e3d355..eed9e31c1 100644 --- a/apps/obsidian/src/components/Settings.tsx +++ b/apps/obsidian/src/components/Settings.tsx @@ -9,6 +9,7 @@ import NodeTypeSettings from "./NodeTypeSettings"; import GeneralSettings from "./GeneralSettings"; import { AdminPanelSettings } from "./AdminPanelSettings"; import { PluginProvider } from "./PluginContext"; +import { DatacoreCallout } from "./DatacoreCallout"; const Settings = () => { const [activeTab, setActiveTab] = useState("general"); @@ -29,6 +30,7 @@ const Settings = () => { return (
+