mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-09-01 23:27:14 +00:00
feat(web): hide sidebar new-version prompt for edition=cloud
Cloud instances are upgraded centrally by the operator, so surfacing a GitHub 'new version available' badge to tenants is misleading and actionable only by the operator. Skip the release check entirely when edition=cloud.
This commit is contained in:
@@ -1674,11 +1674,17 @@ export default function HomeSidebar({
|
|||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Cloud edition is updated centrally by the operator, so end users should
|
||||||
|
// not see a "new version available" prompt in the sidebar. Skip the GitHub
|
||||||
|
// release check entirely for edition=cloud.
|
||||||
|
if (systemInfo?.edition !== 'cloud') {
|
||||||
getCloudServiceClientSync()
|
getCloudServiceClientSync()
|
||||||
.getLangBotReleases()
|
.getLangBotReleases()
|
||||||
.then((releases) => {
|
.then((releases) => {
|
||||||
if (releases && releases.length > 0) {
|
if (releases && releases.length > 0) {
|
||||||
const latestStable = releases.find((r) => !r.prerelease && !r.draft);
|
const latestStable = releases.find(
|
||||||
|
(r) => !r.prerelease && !r.draft,
|
||||||
|
);
|
||||||
const latest = latestStable || releases[0];
|
const latest = latestStable || releases[0];
|
||||||
setLatestRelease(latest);
|
setLatestRelease(latest);
|
||||||
|
|
||||||
@@ -1692,6 +1698,7 @@ export default function HomeSidebar({
|
|||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error('Failed to fetch releases:', error);
|
console.error('Failed to fetch releases:', error);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
getCloudServiceClientSync()
|
getCloudServiceClientSync()
|
||||||
.getGitHubRepoInfo()
|
.getGitHubRepoInfo()
|
||||||
|
|||||||
Reference in New Issue
Block a user