Skip to content

Commit

Permalink
Merge pull request #2645 from IDEMSInternational/fix/rtl-applies-to-a…
Browse files Browse the repository at this point in the history
…pp-launch-pop-ups

fix: rtl language config is applied to app launch templates
  • Loading branch information
chrismclarke authored Dec 20, 2024
2 parents 5d66e2a + e9c5365 commit 3881530
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
class="popup-backdrop"
(click)="dismissOnBackdrop($event)"
[attr.data-fullscreen]="props.fullscreen ? true : null"
[dir]="templateTranslateService.languageDirection()"
[attr.data-variant]="props.variant ? props.variant : null"
>
<div class="popup-container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Component, Input } from "@angular/core";
import { ModalController } from "@ionic/angular";
import { FlowTypes } from "../../../models";
import { TemplateContainerComponent } from "../../../template-container.component";
import { TemplateTranslateService } from "../../../services/template-translate.service";

@Component({
templateUrl: "./popup.component.html",
Expand All @@ -14,7 +15,12 @@ import { TemplateContainerComponent } from "../../../template-container.componen
export class TemplatePopupComponent {
@Input() props: ITemplatePopupComponentProps;

constructor(private modalCtrl: ModalController) {}
constructor(
private modalCtrl: ModalController,
// HACK: Since pop-ups can be launched outside of main app container (e.g. as part of launch actions),
// handle RTL language support directly in this component
public templateTranslateService: TemplateTranslateService
) {}

/**
* When templates emit completed/uncompleted value from standalone popup close the popup
Expand Down

0 comments on commit 3881530

Please sign in to comment.