diff --git a/packages/studiocms_core/src/schemas/config/dashboard.ts b/packages/studiocms_core/src/schemas/config/dashboard.ts
index 81cc36b59..04be331b3 100644
--- a/packages/studiocms_core/src/schemas/config/dashboard.ts
+++ b/packages/studiocms_core/src/schemas/config/dashboard.ts
@@ -38,6 +38,15 @@ export const dashboardConfigSchema = z
* Developer Options/Configuration
*/
developerConfig: developerConfigSchema,
+ /**
+ * OPTIONAL - This allows the user to enable or disable the version check for the dashboard
+ *
+ * This will check for the latest version of StudioCMS and notify the user
+ * if there is a new version available.
+ *
+ * @default true
+ */
+ versionCheck: z.boolean().optional().default(true),
})
.optional()
.default({});
diff --git a/packages/studiocms_dashboard/package.json b/packages/studiocms_dashboard/package.json
index cb80951fb..a2c8f8afd 100644
--- a/packages/studiocms_dashboard/package.json
+++ b/packages/studiocms_dashboard/package.json
@@ -44,7 +44,8 @@
"@inox-tools/runtime-logger": "catalog:studiocms-shared",
"@matthiesenxyz/astrodtsbuilder": "catalog:studiocms-shared",
"@matthiesenxyz/integration-utils": "catalog:studiocms-shared",
- "@fontsource-variable/onest": "catalog:studiocms-shared"
+ "@fontsource-variable/onest": "catalog:studiocms-shared",
+ "semver": "catalog:studiocms"
},
"peerDependencies": {
"astro": "catalog:min",
@@ -53,6 +54,7 @@
"vite": "catalog:min"
},
"devDependencies": {
- "typescript": "catalog:"
+ "typescript": "catalog:",
+ "@types/semver": "catalog:studiocms"
}
}
diff --git a/packages/studiocms_dashboard/src/components/SingleSidebar.astro b/packages/studiocms_dashboard/src/components/SingleSidebar.astro
index 0650cd83c..321136ece 100644
--- a/packages/studiocms_dashboard/src/components/SingleSidebar.astro
+++ b/packages/studiocms_dashboard/src/components/SingleSidebar.astro
@@ -1,12 +1,16 @@
---
+import { dashboardConfig } from 'studiocms:config';
import { useTranslations } from 'studiocms:i18n';
import { StudioCMSRoutes } from 'studiocms:lib';
import { Divider, Dropdown, Sidebar, User } from '@studiocms/ui/components';
import StudioCMSLogo from '../components/StudioCMSLogo.astro';
import SidebarLink from './SidebarLink.astro';
+import VersionCheck from './islands/VersionCheck.astro';
import Admin from './islands/sidebar/Admin.astro';
import UserAccount from './islands/sidebar/UserAccount.astro';
+const { versionCheck } = dashboardConfig;
+
const lang = 'en-us';
const t = useTranslations(lang, '@studiocms/dashboard:sidebar');
---
@@ -29,7 +33,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:sidebar');
Loading
-
+