refactor(editor): disable community nodes on desktop (#4335)

*  Disable community nodes on desktop

* 🔥 Remove logging
This commit is contained in:
Iván Ovejero
2022-10-13 13:42:12 +02:00
committed by GitHub
parent d45bc4999c
commit 12e821528b
3 changed files with 19 additions and 1 deletions

View File

@@ -36,7 +36,7 @@
:heading="$locale.baseText('settings.communityNodes.empty.title')"
:description="getEmptyStateDescription"
:buttonText="
isNpmAvailable
shouldShowInstallButton
? $locale.baseText('settings.communityNodes.empty.installPackageLabel')
: ''
"
@@ -146,7 +146,21 @@ export default mixins(
},
});
},
isDesktopDeployment() {
return this.$store.getters['settings/isDesktopDeployment'];
},
shouldShowInstallButton() {
return !this.isDesktopDeployment && this.isNpmAvailable;
},
actionBoxConfig() {
if (this.isDesktopDeployment) {
return {
calloutText: this.$locale.baseText('settings.communityNodes.notAvailableOnDesktop'),
calloutTheme: 'warning',
hideButton: true,
};
}
if (!this.isNpmAvailable) {
return {
calloutText: this.$locale.baseText(