diff --git a/ui-ngx/src/app/core/services/menu.models.ts b/ui-ngx/src/app/core/services/menu.models.ts index 0a80f4e1de..d3d8e1f399 100644 --- a/ui-ngx/src/app/core/services/menu.models.ts +++ b/ui-ngx/src/app/core/services/menu.models.ts @@ -68,7 +68,7 @@ export enum MenuId { mobile_center = 'mobile_center', mobile_apps = 'mobile_apps', mobile_bundles = 'mobile_bundles', - mobile_app_settings = 'mobile_app_settings', + mobile_qr_code_widget = 'mobile_qr_code_widget', settings = 'settings', general = 'general', mail_server = 'mail_server', @@ -304,14 +304,14 @@ export const menuSectionMap = new Map([ } ], [ - MenuId.mobile_app_settings, + MenuId.mobile_qr_code_widget, { - id: MenuId.mobile_app_settings, - name: 'admin.mobile-app.mobile-app', - fullName: 'admin.mobile-app.mobile-app', + id: MenuId.mobile_qr_code_widget, + name: 'mobile.qr-code-widget', + fullName: 'mobile.qr-code-widget', type: 'link', - path: '/mobile-center/mobile-app', - icon: 'smartphone' + path: '/mobile-center/qr-code-widget', + icon: 'qr_code' } ], [ @@ -714,7 +714,7 @@ const defaultUserMenuMap = new Map([ pages: [ {id: MenuId.mobile_apps}, {id: MenuId.mobile_bundles}, - {id: MenuId.mobile_app_settings} + {id: MenuId.mobile_qr_code_widget} ] }, { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/mobile-app-qrcode-widget.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/mobile-app-qrcode-widget.component.html index 1426d02a0d..625fe00a04 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/mobile-app-qrcode-widget.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/mobile-app-qrcode-widget.component.html @@ -27,13 +27,13 @@ [class.row-reverse]="mobileAppSettings?.qrCodeConfig.badgePosition === badgePosition.LEFT">
- + {{ 'widgets.mobile-app-qr-code.download-on-the-app-store' | translate }} - + {{ 'widgets.mobile-app-qr-code.get-it-on-google-play' | translate }} diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/mobile-app-qrcode-widget.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/mobile-app-qrcode-widget.component.ts index 875236abb5..e872ce06ce 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/mobile-app-qrcode-widget.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/mobile-app-qrcode-widget.component.ts @@ -157,8 +157,8 @@ export class MobileAppQrcodeWidgetComponent extends PageComponent implements OnI private updateQRCode(link: string) { import('qrcode').then((QRCode) => { - QRCode.toString(link, (err, string) => { - this.qrCodeSVG = string; + QRCode.toString(link, (err, svgElement) => { + this.qrCodeSVG = svgElement; this.cd.markForCheck(); }) }); diff --git a/ui-ngx/src/app/modules/home/pages/admin/admin.module.ts b/ui-ngx/src/app/modules/home/pages/admin/admin.module.ts index f00b4d01f1..5613e953c3 100644 --- a/ui-ngx/src/app/modules/home/pages/admin/admin.module.ts +++ b/ui-ngx/src/app/modules/home/pages/admin/admin.module.ts @@ -32,7 +32,6 @@ import { QueueComponent } from '@home/pages/admin/queue/queue.component'; import { RepositoryAdminSettingsComponent } from '@home/pages/admin/repository-admin-settings.component'; import { AutoCommitAdminSettingsComponent } from '@home/pages/admin/auto-commit-admin-settings.component'; import { TwoFactorAuthSettingsComponent } from '@home/pages/admin/two-factor-auth-settings.component'; -import { WidgetComponentsModule } from '@home/components/widget/widget-components.module'; import { OAuth2Module } from '@home/pages/admin/oauth2/oauth2.module'; @NgModule({ @@ -56,7 +55,6 @@ import { OAuth2Module } from '@home/pages/admin/oauth2/oauth2.module'; SharedModule, HomeComponentsModule, AdminRoutingModule, - WidgetComponentsModule, OAuth2Module ] }) diff --git a/ui-ngx/src/app/modules/home/pages/mobile/mobile-routing.module.ts b/ui-ngx/src/app/modules/home/pages/mobile/mobile-routing.module.ts index bfc9d4c95a..a0bc9bec0a 100644 --- a/ui-ngx/src/app/modules/home/pages/mobile/mobile-routing.module.ts +++ b/ui-ngx/src/app/modules/home/pages/mobile/mobile-routing.module.ts @@ -19,11 +19,9 @@ import { RouterModule, Routes } from '@angular/router'; import { RouterTabsComponent } from '@home/components/router-tabs.component'; import { Authority } from '@shared/models/authority.enum'; import { MenuId } from '@core/services/menu.models'; -import { MobileAppTableConfigResolver } from '@home/pages/mobile/applications/mobile-app-table-config.resolver'; -import { MobileQrCodeWidgetSettingsComponent } from '@home/pages/mobile/qr-code-widget/mobile-qr-code-widget-settings.component'; -import { ConfirmOnExitGuard } from '@core/guards/confirm-on-exit.guard'; import { applicationsRoutes } from '@home/pages/mobile/applications/applications-routing.module'; import { bundlesRoutes } from '@home/pages/mobile/bundes/bundles-routing.module'; +import { qrCodeWidgetRoutes } from '@home/pages/mobile/qr-code-widget/mobile-qr-code-widget-settings-routing.module'; const routes: Routes = [ { @@ -46,34 +44,12 @@ const routes: Routes = [ }, ...applicationsRoutes, ...bundlesRoutes, - { - path: 'mobile-app', - component: MobileQrCodeWidgetSettingsComponent, - canDeactivate: [ConfirmOnExitGuard], - data: { - auth: [Authority.SYS_ADMIN], - title: 'admin.mobile-app.mobile-app', - breadcrumb: { - menuId: MenuId.mobile_app_settings - } - } - } + ...qrCodeWidgetRoutes ] } ]; -routes.push( - { - path: 'security-settings/oauth2/mobile-applications', - pathMatch: 'full', - redirectTo: '/mobile-center/applications' - } -); - @NgModule({ - providers: [ - MobileAppTableConfigResolver - ], imports: [RouterModule.forChild(routes)], exports: [RouterModule] }) diff --git a/ui-ngx/src/app/modules/home/pages/mobile/mobile.module.ts b/ui-ngx/src/app/modules/home/pages/mobile/mobile.module.ts index 9c47d507c3..49f59aa147 100644 --- a/ui-ngx/src/app/modules/home/pages/mobile/mobile.module.ts +++ b/ui-ngx/src/app/modules/home/pages/mobile/mobile.module.ts @@ -21,6 +21,9 @@ import { HomeComponentsModule } from '@home/components/home-components.module'; import { MobileRoutingModule } from '@home/pages/mobile/mobile-routing.module'; import { MobileApplicationModule } from '@home/pages/mobile/applications/applications.module'; import { MobileBundlesModule } from '@home/pages/mobile/bundes/bundles.module'; +import { + MobileQrCodeWidgetSettingsModule +} from '@home/pages/mobile/qr-code-widget/mobile-qr-code-widget-settings.module'; @NgModule({ imports: [ @@ -29,6 +32,7 @@ import { MobileBundlesModule } from '@home/pages/mobile/bundes/bundles.module'; HomeComponentsModule, MobileApplicationModule, MobileBundlesModule, + MobileQrCodeWidgetSettingsModule, MobileRoutingModule, ] }) diff --git a/ui-ngx/src/app/modules/home/pages/mobile/qr-code-widget/mobile-qr-code-widget-settings-routing.module.ts b/ui-ngx/src/app/modules/home/pages/mobile/qr-code-widget/mobile-qr-code-widget-settings-routing.module.ts new file mode 100644 index 0000000000..98ce17e1d4 --- /dev/null +++ b/ui-ngx/src/app/modules/home/pages/mobile/qr-code-widget/mobile-qr-code-widget-settings-routing.module.ts @@ -0,0 +1,37 @@ +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; +import { Authority } from '@shared/models/authority.enum'; +import { MenuId } from '@core/services/menu.models'; +import { + MobileQrCodeWidgetSettingsComponent +} from '@home/pages/mobile/qr-code-widget/mobile-qr-code-widget-settings.component'; +import { ConfirmOnExitGuard } from '@core/guards/confirm-on-exit.guard'; + +export const qrCodeWidgetRoutes: Routes = [ + { + path: 'qr-code-widget', + component: MobileQrCodeWidgetSettingsComponent, + canDeactivate: [ConfirmOnExitGuard], + data: { + auth: [Authority.TENANT_ADMIN, Authority.SYS_ADMIN], + title: 'mobile.qr-code-widget', + breadcrumb: { + menuId: MenuId.mobile_qr_code_widget + } + } + } +]; + +const routes: Routes = [ + { + path: 'settings/mobile-app', + pathMatch: 'full', + redirectTo: '/mobile-center/qr-code-widget' + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class MobileQrCodeWidgetSettingsRoutingModule { } diff --git a/ui-ngx/src/app/modules/home/pages/mobile/qr-code-widget/mobile-qr-code-widget-settings.component.html b/ui-ngx/src/app/modules/home/pages/mobile/qr-code-widget/mobile-qr-code-widget-settings.component.html index 51e7c6f43d..021fae965c 100644 --- a/ui-ngx/src/app/modules/home/pages/mobile/qr-code-widget/mobile-qr-code-widget-settings.component.html +++ b/ui-ngx/src/app/modules/home/pages/mobile/qr-code-widget/mobile-qr-code-widget-settings.component.html @@ -34,110 +34,122 @@ {{ 'admin.mobile-app.custom' | translate }}
-
-
- - {{ 'admin.mobile-app.android' | translate }} - -
-
-
-
{{ 'admin.mobile-app.app-package-name' | translate }}
- - - - warning - - -
-
-
-
-
{{ 'admin.mobile-app.sha256-certificate-fingerprints' | translate }}
- - - - warning - - -
-
-
-
-
{{ 'admin.mobile-app.google-play-link' | translate }}
- - - - warning - - -
-
-
-
-
- - {{ 'admin.mobile-app.ios' | translate }} - -
-
-
-
{{ 'admin.mobile-app.app-id' | translate }}
- - - - warning - - -
-
-
-
-
{{ 'admin.mobile-app.app-store-link' | translate }}
- - - - warning - - -
-
+
+
{{ 'mobile.bundle' | translate }}
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -154,7 +166,7 @@ {{ 'admin.mobile-app.badges' | translate }} - + {{ badgePosition.value | translate }} diff --git a/ui-ngx/src/app/modules/home/pages/mobile/qr-code-widget/mobile-qr-code-widget-settings.component.ts b/ui-ngx/src/app/modules/home/pages/mobile/qr-code-widget/mobile-qr-code-widget-settings.component.ts index a6f9fa3f4f..4f5ffdbe14 100644 --- a/ui-ngx/src/app/modules/home/pages/mobile/qr-code-widget/mobile-qr-code-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/pages/mobile/qr-code-widget/mobile-qr-code-widget-settings.component.ts @@ -28,6 +28,7 @@ import { QrCodeSettings } from '@shared/models/mobile-app.models'; import { ActionUpdateMobileQrCodeEnabled } from '@core/auth/auth.actions'; +import { EntityType } from '@shared/models/entity-type.models'; @Component({ selector: 'tb-mobile-qr-code-widget', @@ -37,12 +38,12 @@ import { ActionUpdateMobileQrCodeEnabled } from '@core/auth/auth.actions'; export class MobileQrCodeWidgetSettingsComponent extends PageComponent implements HasConfirmForm, OnDestroy { mobileAppSettingsForm: FormGroup; - mobileAppSettings: QrCodeSettings; - private readonly destroy$ = new Subject(); + readonly badgePositionTranslationsMap = badgePositionTranslationsMap; + readonly entityType = EntityType; - badgePositionTranslationsMap = badgePositionTranslationsMap; + private readonly destroy$ = new Subject(); constructor(protected store: Store, private mobileAppService: MobileApplicationService, @@ -55,33 +56,36 @@ export class MobileQrCodeWidgetSettingsComponent extends PageComponent implement takeUntil(this.destroy$) ).subscribe(value => { if (value) { - this.mobileAppSettingsForm.get('androidConfig.appPackage').disable({emitEvent: false}); - this.mobileAppSettingsForm.get('androidConfig.sha256CertFingerprints').disable({emitEvent: false}); - this.mobileAppSettingsForm.get('androidConfig.storeLink').disable({emitEvent: false}); - this.mobileAppSettingsForm.get('iosConfig.appId').disable({emitEvent: false}); - this.mobileAppSettingsForm.get('iosConfig.storeLink').disable({emitEvent: false}); + this.mobileAppSettingsForm.get('mobileAppBundleId').disable({emitEvent: false}); + // this.mobileAppSettingsForm.get('androidConfig.appPackage').disable({emitEvent: false}); + // this.mobileAppSettingsForm.get('androidConfig.sha256CertFingerprints').disable({emitEvent: false}); + // this.mobileAppSettingsForm.get('androidConfig.storeLink').disable({emitEvent: false}); + // this.mobileAppSettingsForm.get('iosConfig.appId').disable({emitEvent: false}); + // this.mobileAppSettingsForm.get('iosConfig.storeLink').disable({emitEvent: false}); } else { - if (this.mobileAppSettingsForm.get('androidConfig.enabled').value) { - this.mobileAppSettingsForm.get('androidConfig.appPackage').enable({emitEvent: false}); - this.mobileAppSettingsForm.get('androidConfig.sha256CertFingerprints').enable({emitEvent: false}); - this.mobileAppSettingsForm.get('androidConfig.storeLink').enable({emitEvent: false}); - } - if (this.mobileAppSettingsForm.get('iosConfig.enabled').value) { - this.mobileAppSettingsForm.get('iosConfig.appId').enable({emitEvent: false}); - this.mobileAppSettingsForm.get('iosConfig.storeLink').enable({emitEvent: false}); - } + this.mobileAppSettingsForm.get('mobileAppBundleId').enable({emitEvent: false}); + + // if (this.mobileAppSettingsForm.get('androidConfig.enabled').value) { + // this.mobileAppSettingsForm.get('androidConfig.appPackage').enable({emitEvent: false}); + // this.mobileAppSettingsForm.get('androidConfig.sha256CertFingerprints').enable({emitEvent: false}); + // this.mobileAppSettingsForm.get('androidConfig.storeLink').enable({emitEvent: false}); + // } + // if (this.mobileAppSettingsForm.get('iosConfig.enabled').value) { + // this.mobileAppSettingsForm.get('iosConfig.appId').enable({emitEvent: false}); + // this.mobileAppSettingsForm.get('iosConfig.storeLink').enable({emitEvent: false}); + // } } }); - this.mobileAppSettingsForm.get('androidConfig.enabled').valueChanges.pipe( - takeUntil(this.destroy$) - ).subscribe(value => { - this.androidEnableChanged(value); - }); - this.mobileAppSettingsForm.get('iosConfig.enabled').valueChanges.pipe( - takeUntil(this.destroy$) - ).subscribe(value => { - this.iosEnableChanged(value); - }); + // this.mobileAppSettingsForm.get('androidConfig.enabled').valueChanges.pipe( + // takeUntil(this.destroy$) + // ).subscribe(value => { + // this.androidEnableChanged(value); + // }); + // this.mobileAppSettingsForm.get('iosConfig.enabled').valueChanges.pipe( + // takeUntil(this.destroy$) + // ).subscribe(value => { + // this.iosEnableChanged(value); + // }); this.mobileAppSettingsForm.get('qrCodeConfig.showOnHomePage').valueChanges.pipe( takeUntil(this.destroy$) ).subscribe(value => { @@ -98,13 +102,13 @@ export class MobileQrCodeWidgetSettingsComponent extends PageComponent implement takeUntil(this.destroy$) ).subscribe(value => { if (value) { - if (this.mobileAppSettingsForm.get('androidConfig.enabled').value || this.mobileAppSettingsForm.get('iosConfig.enabled').value) { - this.mobileAppSettingsForm.get('qrCodeConfig.badgeEnabled').enable({emitEvent: false}); - this.mobileAppSettingsForm.get('qrCodeConfig.badgePosition').enable({emitEvent: false}); - } else { - this.mobileAppSettingsForm.get('qrCodeConfig.badgeEnabled').disable({emitEvent: false}); - this.mobileAppSettingsForm.get('qrCodeConfig.badgePosition').disable({emitEvent: false}); - } + // if (this.mobileAppSettingsForm.get('androidConfig.enabled').value || this.mobileAppSettingsForm.get('iosConfig.enabled').value) { + // this.mobileAppSettingsForm.get('qrCodeConfig.badgeEnabled').enable({emitEvent: false}); + // this.mobileAppSettingsForm.get('qrCodeConfig.badgePosition').enable({emitEvent: false}); + // } else { + // this.mobileAppSettingsForm.get('qrCodeConfig.badgeEnabled').disable({emitEvent: false}); + // this.mobileAppSettingsForm.get('qrCodeConfig.badgePosition').disable({emitEvent: false}); + // } } else { this.mobileAppSettingsForm.get('qrCodeConfig.badgePosition').disable({emitEvent: false}); } @@ -129,17 +133,18 @@ export class MobileQrCodeWidgetSettingsComponent extends PageComponent implement private buildMobileAppSettingsForm() { this.mobileAppSettingsForm = this.fb.group({ useDefaultApp: [true], - androidConfig: this.fb.group({ - enabled: [true], - appPackage: [{value: '', disabled: true}, [Validators.required]], - sha256CertFingerprints: [{value: '', disabled: true}, [Validators.required]], - storeLink: ['', [Validators.required]] - }), - iosConfig: this.fb.group({ - enabled: [true], - appId: [{value: '', disabled: true}, [Validators.required]], - storeLink: ['', [Validators.required]] - }), + mobileAppBundleId: [{value: null, disabled: true}, Validators.required], + // androidConfig: this.fb.group({ + // enabled: [true], + // appPackage: [{value: '', disabled: true}, [Validators.required]], + // sha256CertFingerprints: [{value: '', disabled: true}, [Validators.required]], + // storeLink: ['', [Validators.required]] + // }), + // iosConfig: this.fb.group({ + // enabled: [true], + // appId: [{value: '', disabled: true}, [Validators.required]], + // storeLink: ['', [Validators.required]] + // }), qrCodeConfig: this.fb.group({ showOnHomePage: [true], badgeEnabled: [true], @@ -155,33 +160,33 @@ export class MobileQrCodeWidgetSettingsComponent extends PageComponent implement this.mobileAppSettingsForm.reset(this.mobileAppSettings); } - private androidEnableChanged(value: boolean): void { - if (value) { - if (!this.mobileAppSettingsForm.get('useDefaultApp').value) { - this.mobileAppSettingsForm.get('androidConfig.appPackage').enable({emitEvent: false}); - this.mobileAppSettingsForm.get('androidConfig.sha256CertFingerprints').enable({emitEvent: false}); - this.mobileAppSettingsForm.get('androidConfig.storeLink').enable({emitEvent: false}); - } - } else { - this.mobileAppSettingsForm.get('androidConfig.appPackage').disable({emitEvent: false}); - this.mobileAppSettingsForm.get('androidConfig.sha256CertFingerprints').disable({emitEvent: false}); - this.mobileAppSettingsForm.get('androidConfig.storeLink').disable({emitEvent: false}); - } - this.mobileAppSettingsForm.get('qrCodeConfig.badgeEnabled').updateValueAndValidity({onlySelf: true}); - } - - private iosEnableChanged(value: boolean): void { - if (value) { - if (!this.mobileAppSettingsForm.get('useDefaultApp').value) { - this.mobileAppSettingsForm.get('iosConfig.appId').enable({emitEvent: false}); - this.mobileAppSettingsForm.get('iosConfig.storeLink').enable({emitEvent: false}); - } - } else { - this.mobileAppSettingsForm.get('iosConfig.appId').disable({emitEvent: false}); - this.mobileAppSettingsForm.get('iosConfig.storeLink').disable({emitEvent: false}); - } - this.mobileAppSettingsForm.get('qrCodeConfig.badgeEnabled').updateValueAndValidity({onlySelf: true}); - } + // private androidEnableChanged(value: boolean): void { + // if (value) { + // if (!this.mobileAppSettingsForm.get('useDefaultApp').value) { + // this.mobileAppSettingsForm.get('androidConfig.appPackage').enable({emitEvent: false}); + // this.mobileAppSettingsForm.get('androidConfig.sha256CertFingerprints').enable({emitEvent: false}); + // this.mobileAppSettingsForm.get('androidConfig.storeLink').enable({emitEvent: false}); + // } + // } else { + // this.mobileAppSettingsForm.get('androidConfig.appPackage').disable({emitEvent: false}); + // this.mobileAppSettingsForm.get('androidConfig.sha256CertFingerprints').disable({emitEvent: false}); + // this.mobileAppSettingsForm.get('androidConfig.storeLink').disable({emitEvent: false}); + // } + // this.mobileAppSettingsForm.get('qrCodeConfig.badgeEnabled').updateValueAndValidity({onlySelf: true}); + // } + // + // private iosEnableChanged(value: boolean): void { + // if (value) { + // if (!this.mobileAppSettingsForm.get('useDefaultApp').value) { + // this.mobileAppSettingsForm.get('iosConfig.appId').enable({emitEvent: false}); + // this.mobileAppSettingsForm.get('iosConfig.storeLink').enable({emitEvent: false}); + // } + // } else { + // this.mobileAppSettingsForm.get('iosConfig.appId').disable({emitEvent: false}); + // this.mobileAppSettingsForm.get('iosConfig.storeLink').disable({emitEvent: false}); + // } + // this.mobileAppSettingsForm.get('qrCodeConfig.badgeEnabled').updateValueAndValidity({onlySelf: true}); + // } save(): void { const showOnHomePagePreviousValue = this.mobileAppSettings.qrCodeConfig.showOnHomePage; @@ -199,5 +204,4 @@ export class MobileQrCodeWidgetSettingsComponent extends PageComponent implement confirmForm(): FormGroup { return this.mobileAppSettingsForm; } - } diff --git a/ui-ngx/src/app/modules/home/pages/mobile/qr-code-widget/mobile-qr-code-widget-settings.module.ts b/ui-ngx/src/app/modules/home/pages/mobile/qr-code-widget/mobile-qr-code-widget-settings.module.ts new file mode 100644 index 0000000000..05e1d853c3 --- /dev/null +++ b/ui-ngx/src/app/modules/home/pages/mobile/qr-code-widget/mobile-qr-code-widget-settings.module.ts @@ -0,0 +1,26 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { SharedModule } from '@shared/shared.module'; +import { HomeComponentsModule } from '@home/components/home-components.module'; +import { + MobileQrCodeWidgetSettingsComponent +} from '@home/pages/mobile/qr-code-widget/mobile-qr-code-widget-settings.component'; +import { WidgetComponentsModule } from '@home/components/widget/widget-components.module'; +import { + MobileQrCodeWidgetSettingsRoutingModule +} from '@home/pages/mobile/qr-code-widget/mobile-qr-code-widget-settings-routing.module'; + + +@NgModule({ + declarations: [ + MobileQrCodeWidgetSettingsComponent + ], + imports: [ + CommonModule, + SharedModule, + HomeComponentsModule, + WidgetComponentsModule, + MobileQrCodeWidgetSettingsRoutingModule + ] +}) +export class MobileQrCodeWidgetSettingsModule { } diff --git a/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.html b/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.html index c860835026..cd0e7f2d1a 100644 --- a/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.html +++ b/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.html @@ -15,7 +15,8 @@ limitations under the License. --> - + {{ label | translate }} ; + @Output() entityChanged = new EventEmitter>(); @@ -274,11 +281,17 @@ export class EntityAutocompleteComponent implements ControlValueAccessor, OnInit this.notFoundEntities = 'queue-statistics.no-queue-statistics-text'; break; case EntityType.MOBILE_APP: - this.entityText = 'mobile.applications'; + this.entityText = 'mobile.application'; this.noEntitiesMatchingText = 'mobile.no-application-matching'; this.entityRequiredText = 'mobile.application-required'; this.notFoundEntities = 'mobile.no-application-text'; break; + case EntityType.MOBILE_APP_BUNDLE: + this.entityText = 'mobile.bundle'; + this.noEntitiesMatchingText = 'mobile.no-bundle-matching'; + this.entityRequiredText = 'mobile.bundle-required'; + this.notFoundEntities = 'mobile.no-bundle-text'; + break; case AliasEntityType.CURRENT_CUSTOMER: this.entityText = 'customer.default-customer'; this.noEntitiesMatchingText = 'customer.no-customers-matching'; diff --git a/ui-ngx/src/app/shared/models/mobile-app.models.ts b/ui-ngx/src/app/shared/models/mobile-app.models.ts index ce07a1ef71..bf1664768a 100644 --- a/ui-ngx/src/app/shared/models/mobile-app.models.ts +++ b/ui-ngx/src/app/shared/models/mobile-app.models.ts @@ -24,8 +24,8 @@ import { deepClone, isNotEmptyStr } from '@core/utils'; export interface QrCodeSettings extends HasTenantId { useDefaultApp: boolean; mobileAppBundleId: MobileAppBundleId - androidConfig: AndroidConfig; //TODO: need remove - iosConfig: IosConfig; //TODO: need remove + androidConfig: any; //TODO: need remove + iosConfig: any; //TODO: need remove qrCodeConfig: QRCodeConfig; defaultGooglePlayLink: string; defaultAppStoreLink: string; @@ -34,19 +34,6 @@ export interface QrCodeSettings extends HasTenantId { } } -export interface AndroidConfig { - enabled: boolean; - appPackage: string; - sha256CertFingerprints: string; - storeLink: string; -} - -export interface IosConfig { - enabled: boolean; - appId: string; - storeLink: string; -} - export interface QRCodeConfig { showOnHomePage: boolean; badgeEnabled: boolean; @@ -55,11 +42,6 @@ export interface QRCodeConfig { qrCodeLabel: string; } -export interface MobileOSBadgeURL { - iOS: string; - android: string; -} - export enum BadgePosition { RIGHT = 'RIGHT', LEFT = 'LEFT' @@ -70,8 +52,6 @@ export const badgePositionTranslationsMap = new Map([ [BadgePosition.LEFT, 'admin.mobile-app.left'] ]); -export type QrCodeConfig = AndroidConfig & IosConfig; - export enum MobileAppStatus { DRAFT = 'DRAFT', PUBLISHED = 'PUBLISHED', diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json index 1e6e58487e..90a55616ae 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -4071,6 +4071,7 @@ "application-package": "Application Package", "application-secret": "Application Secret", "application-secret-required": "Application Secret is required", + "application": "Application", "applications": "Applications", "copy-app-id": "Copy App ID", "copy-app-store-link": "Copy App Store link", @@ -4111,6 +4112,7 @@ "version-information": "Version information", "min-version-release-notes": "Min version release notes", "latest-version-release-notes": "Latest version release notes", + "bundle": "Bundle", "bundles": "Bundles", "add-bundle": "Add bundle", "title": "Title", @@ -4126,8 +4128,11 @@ "description": "Description", "basic-settings": "Basic settings", "no-application-matching": "No application matching '{{entity}}' were found.", + "no-bundle-matching": "No bundle matching '{{entity}}' were found.", "application-required": "Application is required.", + "bundle-required": "Bundle is required.", "no-application-text": "No applications found", + "no-bundle-text": "No bundle found", "layout": "Layout", "pages": "Pages", "hide-all-pages": "Hide all pages", @@ -4152,7 +4157,8 @@ "custom-page": "Custom page", "edit-page": "Edit page", "edit-custom-page": "Edit custom page", - "delete-page": "Delete page" + "delete-page": "Delete page", + "qr-code-widget": "QR code widget" }, "notification": { "action-button": "Action button",