]> 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 220d41d59b732736644afb5efff6c41de7dbb0cd..fa9c71e5bfd94800f228d4054838133be41f1ae9 100644 (file)
@@ -10,10 +10,19 @@ export class ScreenService {
     this.refreshWindowInnerWidth()
   }
 
-  isInSmallView () {
+  isInSmallView (marginLeft = 0) {
+    if (marginLeft > 0) {
+      const contentWidth = this.getWindowInnerWidth() - marginLeft
+      return contentWidth < 800
+    }
+
     return this.getWindowInnerWidth() < 800
   }
 
+  isInMediumView () {
+    return this.getWindowInnerWidth() < 1100
+  }
+
   isInMobileView () {
     return this.getWindowInnerWidth() < 500
   }