Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix notif position on RTL layout

Chocobozzz8bec7726a6eb
diff --git a/client/src/app/app.component.html b/client/src/app/app.component.html
index b24524553e..8ab5159ec2 100644
--- a/client/src/app/app.component.html
+++ b/client/src/app/app.component.html
@@ -45,7 +45,7 @@
<my-confirm></my-confirm>
-<p-toast position="bottom-right">
+<p-toast [position]="toastPosition">
<ng-template let-message #message>
<div class="notification-block">
<my-global-icon [iconName]="getNotificationIcon(message)"></my-global-icon>
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts
index 8c638b246d..b4ba1809cd 100644
--- a/client/src/app/app.component.ts
+++ b/client/src/app/app.component.ts
@@ -99,6 +99,7 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
customCSS: SafeHtml
broadcastMessage: { message: string, dismissable: boolean, class: string } | null = null
hotkeysModalOpened = false
+ toastPosition: 'bottom-right' | 'bottom-left' = 'bottom-right'
private serverConfig: HTMLServerConfig
private userLoaded = false
@@ -166,6 +167,10 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
adminWelcomeModal.show({ showWelcome })
})
+
+ if (getLocaleDirection(this.localeId) === 'rtl') {
+ this.toastPosition = 'bottom-left'
+ }
}
ngAfterViewInit () {