Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,18 @@ export function MarketplacePackagePage() {
return () => { cancelled = true; };
}, [packageId, localResult]);

// Seed cloud-install state: when the runtime advertises a default
// environment (per-subdomain ObjectOS), check whether this package is
// already installed in that env so the primary CTA renders as
// "Installed" on first paint instead of inviting another install.
// Seed cloud-install state so the primary CTA renders as "Installed" on
// first paint instead of inviting another install.
// NOTE: a tenant runtime (per-subdomain ObjectOS) has NO
// `defaultEnvironmentId` — but getCloudInstallationInfo's same-origin
// `/cloud-connection/installation` path resolves the env by hostname and
// does not need an explicit id (only the cloud-control-plane path needs
// one, and it no-ops on an empty id internally). So do NOT gate the probe
// on `currentEnvId` — that left the detail CTA stuck on "Install to
// cloud…" for every already-installed package in an env console.
useEffect(() => {
if (!packageId) return;
const currentEnvId = getRuntimeConfig().defaultEnvironmentId;
if (!currentEnvId) return;
const currentEnvId = getRuntimeConfig().defaultEnvironmentId ?? '';
let cancelled = false;
(async () => {
const info = await getCloudInstallationInfo(packageId, currentEnvId);
Expand Down
1 change: 1 addition & 0 deletions packages/i18n/src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1705,6 +1705,7 @@ const en = {
reinstall: 'Reinstall',
working: 'Working…',
installToCloud: 'Install to cloud…',
installed: 'Installed',
installing: 'Installing…',
uninstall: 'Uninstall',
uninstalling: 'Uninstalling…',
Expand Down
1 change: 1 addition & 0 deletions packages/i18n/src/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1699,6 +1699,7 @@ const zh = {
reinstall: '重新安装',
working: '处理中…',
installToCloud: '安装到云端…',
installed: '已安装',
installing: '安装中…',
uninstall: '卸载',
uninstalling: '卸载中…',
Expand Down
Loading