]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/misc/screen.service.ts
add aria-hidden to non-descriptive icons (#2844)
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / misc / screen.service.ts
index 9c71a8c831587a5df2d7136145f9b537be039b8e..fa9c71e5bfd94800f228d4054838133be41f1ae9 100644 (file)
@@ -10,7 +10,12 @@ export class ScreenService {
     this.refreshWindowInnerWidth()
   }
 
-  isInSmallView () {
+  isInSmallView (marginLeft = 0) {
+    if (marginLeft > 0) {
+      const contentWidth = this.getWindowInnerWidth() - marginLeft
+      return contentWidth < 800
+    }
+
     return this.getWindowInnerWidth() < 800
   }