]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix menu dropdowns
authorChocobozzz <me@florianbigard.com>
Mon, 22 May 2023 06:10:52 +0000 (08:10 +0200)
committerChocobozzz <me@florianbigard.com>
Mon, 22 May 2023 06:22:57 +0000 (08:22 +0200)
Better responsive
Avoid menu scrollbar displayed in notification popove

client/src/app/menu/menu.component.html
client/src/app/menu/menu.component.scss
client/src/app/menu/menu.component.ts
client/src/app/menu/notification.component.html
server/tests/peertube-runner/live-transcoding.ts

index 0786b953b071707bbf5a24e09b4817f022ecbf5b..8b90fb78bade49224fe3f9661f463cad746d7769 100644 (file)
@@ -5,7 +5,7 @@
         <div>
           <div
             class="logged-in-more" ngbDropdown #dropdown="ngbDropdown" placement="bottom-left auto"
-            [container]="dropdownContainer" (openChange)="onDropdownOpenChange($event)" autoClose="outside"
+            container="body" (openChange)="onDropdownOpenChange($event)" autoClose="outside"
           >
             <button class="border-0 text-start" ngbDropdownToggle>
               <my-actor-avatar [actor]="user.account" actorType="account" size="34"></my-actor-avatar>
index 4b1ed65ced9be0d89d66dfe059c86ca4ebb4bb84..d88025c335ff895fb70638c6be5cd76cfb6551a4 100644 (file)
@@ -114,7 +114,7 @@ my-notification {
         display: inherit !important;
       }
 
-      .dropdown-toggle {
+      &.dropdown-toggle {
         max-width: 88% !important;
       }
     }
@@ -144,7 +144,7 @@ my-notification {
     /* fill space when on mobile */
     max-width: calc(100% - 80px);
 
-    .dropdown-toggle {
+    &.dropdown-toggle {
       max-width: 100%;
     }
 
@@ -171,7 +171,8 @@ my-notification {
   > .dropdown-toggle:first-child {
     display: flex;
     align-items: center;
-    padding: 5px 7px;
+    width: 100%;
+    padding: 5px 25px 5px 7px;
   }
 }
 
index 896c824b8ac16fab1219819f7e3eaec867ef2647..410abe6fa474c436ff2b801613d3ef73dbd66e0c 100644 (file)
@@ -86,12 +86,6 @@ export class MenuComponent implements OnInit, OnDestroy {
     return this.screenService.isInMobileView()
   }
 
-  get dropdownContainer () {
-    if (this.isInMobileView) return null
-
-    return 'body' as 'body'
-  }
-
   get language () {
     return this.languageChooserModal.getCurrentLanguage()
   }
index 907828efb7cb070eb8a0478b165984b377392ef7..921d7643f1828b405f7a4ee27be3dc64652fa7f2 100644 (file)
@@ -4,7 +4,7 @@
 </ng-template>
 
 <button
-  [ngbPopover]="popContent" autoClose="outside" placement="bottom" container={this} popoverClass="popover-notifications"
+  [ngbPopover]="popContent" autoClose="outside" placement="bottom" container="body" popoverClass="popover-notifications"
   i18n-title title="View your notifications"
   class="border-0 text-start" [ngClass]="{ 'notification-inbox-popover': true, 'shown': opened, 'hidden': isInMobileView }"
   #popover="ngbPopover" (shown)="onPopoverShown()" (hidden)="onPopoverHidden()"
index 17e1f3078080d704e38d3ad1eb226de1e7f77180..e7ef941c642b5a6a8c9343e92913515f3688e234 100644 (file)
@@ -76,7 +76,7 @@ describe('Test Live transcoding in peertube-runner program', function () {
     })
 
     it('Should save a replay', async function () {
-      this.timeout(120000)
+      this.timeout(240000)
 
       const { video } = await servers[0].live.quickCreate({ permanentLive: true, saveReplay: true })