Skip to content

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

Sticky transcription header

Chocobozzzd2657b16fe84
diff --git a/client/src/app/+video-watch/shared/player-widgets/video-transcription.component.html b/client/src/app/+video-watch/shared/player-widgets/video-transcription.component.html
index e59afd4c41..3f039d92e8 100644
--- a/client/src/app/+video-watch/shared/player-widgets/video-transcription.component.html
+++ b/client/src/app/+video-watch/shared/player-widgets/video-transcription.component.html
@@ -1,24 +1,24 @@
<div class="widget-root">
- <div class="widget-header d-flex justify-content-between">
- <div class="widget-title" i18n>Transcription</div>
+ <div class="widget-top">
+ <div class="widget-header d-flex justify-content-between">
+ <div class="widget-title" i18n>Transcription</div>
- <div>
- <button
- class="border-0 p-0 me-3 settings-button" title="Settings" i18n-title
- (click)="isSettingsPanelCollapsed = !isSettingsPanelCollapsed" [attr.aria-expanded]="!isSettingsPanelCollapsed" aria-controls="video-transcription-settings-panel"
- >
- <my-global-icon iconName="filter"></my-global-icon>
- </button>
+ <div>
+ <button
+ class="border-0 p-0 me-3 settings-button" title="Settings" i18n-title
+ (click)="isSettingsPanelCollapsed = !isSettingsPanelCollapsed" [attr.aria-expanded]="!isSettingsPanelCollapsed" aria-controls="video-transcription-settings-panel"
+ >
+ <my-global-icon iconName="filter"></my-global-icon>
+ </button>
- <button class="border-0 p-0" title="Close transcription widget" i18n-title (click)="closeTranscription.emit()">
- <my-global-icon iconName="cross"></my-global-icon>
- </button>
+ <button class="border-0 p-0" title="Close transcription widget" i18n-title (click)="closeTranscription.emit()">
+ <my-global-icon iconName="cross"></my-global-icon>
+ </button>
+ </div>
</div>
- </div>
- <div class="widget-content">
- <div class="widget-content-padded">
+ <div class="widget-content-padded pt-2">
<div
id="video-transcription-settings-panel" class="settings-panel"
@@ -41,11 +41,13 @@
type="text" class="mb-3" name="search-transcript" i18n-placeholder placeholder="Search transcript"
(input)="onSearchChange($event)"
>
-
- @if (search && segments.length === 0) {
- <div i18n>No results for your search</div>
- }
</div>
+ </div>
+
+ <div class="widget-content">
+ @if (search && segments.length === 0) {
+ <div class="widget-content-padded" i18n>No results for your search</div>
+ }
@for (segment of segments; track segment) {
<div
diff --git a/client/src/app/+video-watch/shared/player-widgets/video-transcription.component.scss b/client/src/app/+video-watch/shared/player-widgets/video-transcription.component.scss
index 3c3ec55234..41cc963680 100644
--- a/client/src/app/+video-watch/shared/player-widgets/video-transcription.component.scss
+++ b/client/src/app/+video-watch/shared/player-widgets/video-transcription.component.scss
@@ -2,6 +2,22 @@
@use "_mixins" as *;
@use "_form-mixins" as *;
+.widget-root {
+ display: flex;
+ flex-direction: column;
+ overflow-y: hidden;
+}
+
+.widget-top {
+ flex: 0 0 auto;
+}
+
+.widget-content {
+ flex: 1 1 auto;
+ min-height: 0;
+ overflow-y: auto;
+}
+
.segment {
&.active,
&:hover {