chore: fix native feature check
This commit is contained in:
@@ -24,10 +24,6 @@ export class UIFeature<F extends UIFeatureDescriptionTypes> implements UIFeature
|
||||
return isItemBasedFeature(this.item)
|
||||
}
|
||||
|
||||
get isFeatureDescription(): boolean {
|
||||
return isNativeFeature(this.item)
|
||||
}
|
||||
|
||||
get isThemeComponent(): boolean {
|
||||
return isItemBasedFeature(this.item) && isTheme(this.item)
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ import { Uuid } from '@standardnotes/domain-core'
|
||||
export interface UIFeatureInterface<F extends UIFeatureDescriptionTypes> {
|
||||
item: ComponentInterface | F
|
||||
get isComponent(): boolean
|
||||
get isFeatureDescription(): boolean
|
||||
get isThemeComponent(): boolean
|
||||
get asComponent(): ComponentInterface
|
||||
get asFeatureDescription(): F
|
||||
|
||||
@@ -19,10 +19,10 @@ export class GetFeatureUrl {
|
||||
return this.urlForFeatureOnDesktop(uiFeature)
|
||||
}
|
||||
|
||||
if (uiFeature.isFeatureDescription) {
|
||||
if (uiFeature.isNativeFeature) {
|
||||
return this.urlForNativeComponent(
|
||||
uiFeature.asFeatureDescription.identifier,
|
||||
uiFeature.asFeatureDescription.index_path,
|
||||
uiFeature.featureDescription.identifier,
|
||||
uiFeature.featureDescription.index_path,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -55,9 +55,9 @@ export class GetFeatureUrl {
|
||||
throw new Error('Desktop manager is not defined')
|
||||
}
|
||||
|
||||
if (uiFeature.isFeatureDescription) {
|
||||
if (uiFeature.isNativeFeature) {
|
||||
return `${this.desktopManager.getExtServerHost()}/components/${uiFeature.featureIdentifier}/${
|
||||
uiFeature.asFeatureDescription.index_path
|
||||
uiFeature.featureDescription.index_path
|
||||
}`
|
||||
} else {
|
||||
if (uiFeature.asComponent.local_url) {
|
||||
|
||||
@@ -59,7 +59,7 @@ export class RunWithPermissionsUseCase {
|
||||
return
|
||||
}
|
||||
|
||||
if (uiFeature.isFeatureDescription) {
|
||||
if (uiFeature.isNativeFeature) {
|
||||
runFunction()
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user