diff --git a/README.md b/README.md index 69324ac984..2adef6cc5f 100644 --- a/README.md +++ b/README.md @@ -123,11 +123,14 @@ After starting the dashboard, you can visit http://localhost:4040 in your browse ## Compatibility ### Parse Server -Parse Dashboard is compatible with the following Parse Server versions. +Parse Dashboard is compatible with the following versions of Parse Server. -| Parse Dashboard Version | Parse Server Version | Compatible | -|-------------------------|----------------------|------------| -| >=1.0 | >= 2.1.4 | ✅ Yes | +| Parse Dashboard | Parse Server | +|-----------------|------------------| +| >= 1.0.0 | >= 2.1.4 < 7.0.0 | +| >= 8.0.0 | >= 7.0.0 | + +Parse Dashboard automatically checks the Parse Server version when connecting and displays a warning if the server version does not meet the minimum required version. The required Parse Server version is defined in the `supportedParseServerVersion` field in `package.json`. ### Node.js Parse Dashboard is continuously tested with the most recent releases of Node.js to ensure compatibility. We follow the [Node.js Long Term Support plan](https://github.com/nodejs/Release) and only test against versions that are officially supported and have not reached their end-of-life date. diff --git a/package.json b/package.json index 311c4663b5..18e23885c2 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "Push Status Page", "Relation Editor" ], + "supportedParseServerVersion": ">=7.0.0", "keywords": [ "parse", "dashboard" diff --git a/src/dashboard/Apps/AppsIndex.react.js b/src/dashboard/Apps/AppsIndex.react.js index 8160ceb9e8..6927e77f8c 100644 --- a/src/dashboard/Apps/AppsIndex.react.js +++ b/src/dashboard/Apps/AppsIndex.react.js @@ -82,25 +82,32 @@ const AppCard = ({ app, icon }) => { return (
  • - - {icon ? ( - - ) : ( - - )} - -
    - {app.name} - {versionMessage} +
    + + {icon ? ( + + ) : ( + + )} + +
    + {app.name} + {versionMessage} +
    + + + + +
    - - - - - + {!app.serverInfo.error && app.serverInfo.versionWarning && ( +
    + ⚠️ {app.serverInfo.versionWarning} +
    + )}
  • ); }; diff --git a/src/dashboard/Apps/AppsIndex.scss b/src/dashboard/Apps/AppsIndex.scss index af86385eeb..e56f9e3849 100644 --- a/src/dashboard/Apps/AppsIndex.scss +++ b/src/dashboard/Apps/AppsIndex.scss @@ -103,13 +103,11 @@ margin: 0 auto; li { - display: flex; cursor: pointer; background: #193040; border-radius: 5px; margin: 14px 0; - padding: 0 9px; - height: 74px; + min-height: 74px; &:hover{ background: #172C3B; @@ -117,6 +115,12 @@ } } +.appCardContent { + display: flex; + padding: 0 9px; + min-height: 74px; +} + .icon { display: block; float: left; @@ -190,6 +194,17 @@ @include ellipsis(); } +.versionWarning { + background: rgba(255, 152, 0, 0.15); + border-top: 1px solid rgba(255, 152, 0, 0.3); + color: #ff9800; + font-size: 11px; + padding: 8px 12px; + line-height: 1.4; + word-wrap: break-word; + border-radius: 0 0 5px 5px; +} + .edit { @include DosisFont; position: absolute; diff --git a/src/dashboard/Dashboard.js b/src/dashboard/Dashboard.js index 58e0552828..bedf0e1d78 100644 --- a/src/dashboard/Dashboard.js +++ b/src/dashboard/Dashboard.js @@ -55,6 +55,8 @@ import { Helmet } from 'react-helmet'; import Playground from './Data/Playground/Playground.react'; import DashboardSettings from './Settings/DashboardSettings/DashboardSettings.react'; import Security from './Settings/Security/Security.react'; +import semver from 'semver'; +import packageInfo from '../../package.json'; const ShowSchemaOverview = false; //In progress features. Change false to true to work on this feature. @@ -138,6 +140,19 @@ export default class Dashboard extends React.Component { .then( serverInfo => { app.serverInfo = serverInfo; + + // Check Parse Server version compatibility + const supportedVersion = packageInfo.supportedParseServerVersion; + const serverVersion = serverInfo.parseServerVersion; + + if (serverVersion && serverVersion !== 'unknown' && supportedVersion) { + const cleanedVersion = semver.valid(semver.coerce(serverVersion)); + if (cleanedVersion && !semver.satisfies(cleanedVersion, supportedVersion)) { + app.serverInfo.versionWarning = + `Parse Server ${serverVersion} is not officially supported by this version of Parse Dashboard. You may encounter issues or reduced functionality. Supported Parse Server versions are ${supportedVersion}. Either upgrade Parse Server, or downgrade Parse Dashboard to a compatible version.`; + } + } + return app; }, error => {