Skip to content

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

Fix change detection in app component

Chocobozzzf954b5da2a9a
diff --git a/client/src/app/app.component.html b/client/src/app/app.component.html
index a7128d4fae..e505466339 100644
--- a/client/src/app/app.component.html
+++ b/client/src/app/app.component.html
@@ -22,7 +22,7 @@
<my-menu></my-menu>
</div>
- <div class="main-col container-fluid" [ngClass]="getMainColClasses()">
+ <div class="main-col container-fluid" [ngClass]="{ expanded: isMenuDisplayed === false }">
<div class="main-row">
<router-outlet></router-outlet>
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts
index 18115ae75d..d5ba24e235 100644
--- a/client/src/app/app.component.ts
+++ b/client/src/app/app.component.ts
@@ -112,11 +112,4 @@ export class AppComponent implements OnInit {
window.scrollTo(0, 0)
this.isMenuDisplayed = !this.isMenuDisplayed
}
-
- getMainColClasses () {
- // Take all width is the menu is not displayed
- if (this.isMenuDisplayed === false) return [ 'expanded' ]
-
- return []
- }
}
diff --git a/client/src/app/core/auth/auth.service.ts b/client/src/app/core/auth/auth.service.ts
index 4213da20c0..c3879d570a 100644
--- a/client/src/app/core/auth/auth.service.ts
+++ b/client/src/app/core/auth/auth.service.ts
@@ -122,7 +122,7 @@ export class AuthService {
scope: 'upload',
username,
password
- }
+ }
const headers = new HttpHeaders().set('Content-Type', 'application/x-www-form-urlencoded')
return this.http.post<UserLogin>(AuthService.BASE_TOKEN_URL, objectToUrlEncoded(body), { headers })
diff --git a/client/src/app/shared/misc/utils.ts b/client/src/app/shared/misc/utils.ts
index 79c93c1b35..727e339350 100644
--- a/client/src/app/shared/misc/utils.ts
+++ b/client/src/app/shared/misc/utils.ts
@@ -98,7 +98,7 @@ function lineFeedToHtml (obj: object, keyToNormalize: string) {
// Try to cache a little bit window.innerWidth
let windowInnerWidth = window.innerWidth
-setInterval(() => windowInnerWidth = window.innerWidth, 500)
+// setInterval(() => windowInnerWidth = window.innerWidth, 500)
function isInSmallView () {
return windowInnerWidth < 600
diff --git a/client/src/environments/environment.hmr.ts b/client/src/environments/environment.hmr.ts
index 78cc8a9925..20e2b8fcd1 100644
--- a/client/src/environments/environment.hmr.ts
+++ b/client/src/environments/environment.hmr.ts
@@ -1,5 +1,5 @@
export const environment = {
production: false,
hmr: true,
- apiUrl: 'http://192.168.1.42:9000'
+ apiUrl: 'http://localhost:9000'
}