Change design of audio player in web UI (#34520)
This commit is contained in:
		
					parent
					
						
							
								24c25ec4f5
							
						
					
				
			
			
				commit
				
					
						b4394ec129
					
				
			
		
					 26 changed files with 1476 additions and 1088 deletions
				
			
		|  | @ -6961,15 +6961,69 @@ a.status-card { | |||
|   overflow: hidden; | ||||
|   box-sizing: border-box; | ||||
|   position: relative; | ||||
|   background: var(--background-color); | ||||
|   background: var(--player-background-color, var(--background-color)); | ||||
|   color: var(--player-foreground-color); | ||||
|   border-radius: 8px; | ||||
|   padding-bottom: 44px; | ||||
|   width: 100%; | ||||
|   outline: 1px solid var(--media-outline-color); | ||||
|   outline-offset: -1px; | ||||
|   aspect-ratio: 16 / 9; | ||||
|   container: audio-player / inline-size; | ||||
| 
 | ||||
|   &__controls { | ||||
|     display: grid; | ||||
|     grid-template-columns: 1fr 1fr 1fr; | ||||
|     height: 100%; | ||||
| 
 | ||||
|     &__play { | ||||
|       display: flex; | ||||
|       align-items: center; | ||||
|       justify-content: center; | ||||
|       position: relative; | ||||
| 
 | ||||
|       .player-button { | ||||
|         position: absolute; | ||||
|         top: 50%; | ||||
|         inset-inline-start: 50%; | ||||
|         transform: translate(-50%, -50%); | ||||
|       } | ||||
| 
 | ||||
|       .icon { | ||||
|         filter: var(--overlay-icon-shadow); | ||||
|       } | ||||
|     } | ||||
| 
 | ||||
|     .player-button { | ||||
|       display: inline-block; | ||||
|       outline: 0; | ||||
|       padding: 5px; | ||||
|       flex: 0 0 auto; | ||||
|       background: transparent; | ||||
|       border: 0; | ||||
|       color: var(--player-foreground-color); | ||||
|       opacity: 0.75; | ||||
| 
 | ||||
|       .icon { | ||||
|         width: 48px; | ||||
|         height: 48px; | ||||
|       } | ||||
| 
 | ||||
|       &:active, | ||||
|       &:hover, | ||||
|       &:focus { | ||||
|         opacity: 1; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   &__visualizer { | ||||
|     max-width: 200px; | ||||
|   } | ||||
| 
 | ||||
|   &.inactive { | ||||
|     audio, | ||||
|     .video-player__seek, | ||||
|     .audio-player__controls, | ||||
|     .video-player__controls { | ||||
|       visibility: hidden; | ||||
|     } | ||||
|  | @ -6986,6 +7040,13 @@ a.status-card { | |||
|     opacity: 0.2; | ||||
|   } | ||||
| 
 | ||||
|   .video-player__seek__progress, | ||||
|   .video-player__seek__handle, | ||||
|   .video-player__volume__current, | ||||
|   .video-player__volume__handle { | ||||
|     background-color: var(--player-accent-color); | ||||
|   } | ||||
| 
 | ||||
|   .video-player__buttons button, | ||||
|   .video-player__buttons a { | ||||
|     color: currentColor; | ||||
|  | @ -7005,6 +7066,13 @@ a.status-card { | |||
|     color: currentColor; | ||||
|   } | ||||
| 
 | ||||
|   @container audio-player (max-width: 400px) { | ||||
|     .video-player__time, | ||||
|     .player-button.video-player__download__icon { | ||||
|       display: none; | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   .video-player__seek::before, | ||||
|   .video-player__seek__buffer, | ||||
|   .video-player__seek__progress { | ||||
|  | @ -7072,10 +7140,12 @@ a.status-card { | |||
|     ); | ||||
|     padding: 0 15px; | ||||
|     opacity: 0; | ||||
|     pointer-events: none; | ||||
|     transition: opacity 0.1s ease; | ||||
| 
 | ||||
|     &.active { | ||||
|       opacity: 1; | ||||
|       pointer-events: auto; | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|  | @ -7161,6 +7231,7 @@ a.status-card { | |||
|       background: transparent; | ||||
|       border: 0; | ||||
|       color: rgba($white, 0.75); | ||||
|       font-weight: 500; | ||||
| 
 | ||||
|       &:active, | ||||
|       &:hover, | ||||
|  | @ -8486,23 +8557,33 @@ noscript { | |||
|   bottom: 20px; | ||||
|   inset-inline-end: 20px; | ||||
|   width: 300px; | ||||
|   box-shadow: var(--dropdown-shadow); | ||||
| 
 | ||||
|   &__footer { | ||||
|     border-radius: 0 0 4px 4px; | ||||
|     background: lighten($ui-base-color, 4%); | ||||
|     padding: 10px; | ||||
|     padding-top: 12px; | ||||
|     background: var(--modal-background-variant-color); | ||||
|     backdrop-filter: var(--background-filter); | ||||
|     border: 1px solid var(--modal-border-color); | ||||
|     border-top: 0; | ||||
|     padding: 12px; | ||||
|     display: flex; | ||||
|     justify-content: space-between; | ||||
|   } | ||||
| 
 | ||||
|   &__header { | ||||
|     border-radius: 4px 4px 0 0; | ||||
|     background: lighten($ui-base-color, 4%); | ||||
|     padding: 10px; | ||||
|     background: var(--modal-background-variant-color); | ||||
|     backdrop-filter: var(--background-filter); | ||||
|     border: 1px solid var(--modal-border-color); | ||||
|     border-bottom: 0; | ||||
|     padding: 12px; | ||||
|     display: flex; | ||||
|     justify-content: space-between; | ||||
| 
 | ||||
|     .icon-button { | ||||
|       padding: 6px; | ||||
|     } | ||||
| 
 | ||||
|     &__account { | ||||
|       display: flex; | ||||
|       text-decoration: none; | ||||
|  | @ -8510,7 +8591,7 @@ noscript { | |||
|     } | ||||
| 
 | ||||
|     .account__avatar { | ||||
|       margin-inline-end: 10px; | ||||
|       margin-inline-end: 8px; | ||||
|     } | ||||
| 
 | ||||
|     .display-name { | ||||
|  | @ -8537,30 +8618,36 @@ noscript { | |||
| } | ||||
| 
 | ||||
| .picture-in-picture-placeholder { | ||||
|   border-radius: 8px; | ||||
|   box-sizing: border-box; | ||||
|   border: 2px dashed var(--background-border-color); | ||||
|   background: $base-shadow-color; | ||||
|   border: 1px dashed var(--background-border-color); | ||||
|   display: flex; | ||||
|   flex-direction: column; | ||||
|   align-items: center; | ||||
|   justify-content: center; | ||||
|   margin-top: 10px; | ||||
|   font-size: 16px; | ||||
|   margin-top: 16px; | ||||
|   font-size: 15px; | ||||
|   line-height: 21px; | ||||
|   font-weight: 500; | ||||
|   cursor: pointer; | ||||
|   color: $darker-text-color; | ||||
|   color: $dark-text-color; | ||||
|   aspect-ratio: 16 / 9; | ||||
| 
 | ||||
|   .icon { | ||||
|     width: 24px; | ||||
|     height: 24px; | ||||
|     margin-bottom: 10px; | ||||
|     width: 48px; | ||||
|     height: 48px; | ||||
|     margin-bottom: 8px; | ||||
|   } | ||||
| 
 | ||||
|   &:hover, | ||||
|   &:focus, | ||||
|   &:active { | ||||
|     border-color: lighten($ui-base-color, 12%); | ||||
|   &:active, | ||||
|   &:focus { | ||||
|     color: $darker-text-color; | ||||
|   } | ||||
| 
 | ||||
|   &:focus-visible { | ||||
|     outline: $ui-button-focus-outline; | ||||
|     border-color: transparent; | ||||
|   } | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -20,7 +20,7 @@ | |||
|   --on-surface-color: #{color.adjust($ui-base-color, $alpha: -0.5)}; | ||||
|   --avatar-border-radius: 8px; | ||||
|   --media-outline-color: #{rgba(#fcf8ff, 0.15)}; | ||||
|   --overlay-icon-shadow: drop-shadow(0 0 8px #{rgba($base-shadow-color, 0.25)}); | ||||
|   --overlay-icon-shadow: drop-shadow(0 0 8px #{rgba($base-shadow-color, 0.35)}); | ||||
|   --error-background-color: #{darken($error-red, 16%)}; | ||||
|   --error-active-background-color: #{darken($error-red, 12%)}; | ||||
|   --on-error-color: #fff; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue