-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3a2e457
commit be4bf80
Showing
24 changed files
with
566 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
client/src/app/+videos/+video-watch/shared/player-widgets/player-widget.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
@use '_variables' as *; | ||
@use '_mixins' as *; | ||
|
||
.widget-root { | ||
position: relative; | ||
min-width: 200px; | ||
width: 25vw; | ||
max-width: 470px; | ||
height: 66vh; | ||
background-color: pvar(--mainBackgroundColor); | ||
overflow-y: auto; | ||
border-bottom: 1px solid $separator-border-color; | ||
|
||
.widget-header { | ||
background-color: pvar(--submenuBackgroundColor); | ||
padding: 1rem 2rem; | ||
} | ||
|
||
.widget-content-padded { | ||
padding: 0 2rem; | ||
} | ||
|
||
.widget-title { | ||
font-size: 18px; | ||
font-weight: $font-semibold; | ||
|
||
.pt-badge { | ||
@include margin-left(5px); | ||
} | ||
} | ||
|
||
.widget-content { | ||
padding-top: 0.5rem; | ||
padding-bottom: 0.5rem; | ||
} | ||
} | ||
|
62 changes: 62 additions & 0 deletions
62
client/src/app/+videos/+video-watch/shared/player-widgets/video-transcription.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<div class="widget-root"> | ||
|
||
<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> | ||
|
||
<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 class="widget-content"> | ||
<div class="widget-content-padded"> | ||
|
||
<div | ||
id="video-transcription-settings-panel" class="settings-panel" | ||
#settingsPanel #settingsPanelCollapse="ngbCollapse" [ngbCollapse]="isSettingsPanelCollapsed" | ||
(shown)="settingsPanelShown = true" (hidden)="settingsPanelShown = false" | ||
> | ||
<div class="card"> | ||
<div class="card-body"> | ||
<label i18n for="transcription-language">Language</label> | ||
|
||
<my-select-options | ||
labelForId="transcription-language" [items]="languagesOptions" | ||
[(ngModel)]="currentLanguage" (ngModelChange)="updateCurrentCaption()" clearable="false" | ||
></my-select-options> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<input | ||
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 | ||
role="button" tabindex="0" class="segment widget-content-padded pt-1 pb-1" | ||
i18n-title title="Jump to this segment" | ||
*ngFor="let segment of segments" | ||
(keyup.enter)="onSegmentClick($event, segment)" (click)="onSegmentClick($event, segment)" | ||
[ngClass]="getSegmentClasses(segment)" | ||
> | ||
<strong class="segment-start me-2">{{ segment.startFormatted }}</strong> | ||
<span class="segment-text fs-7">{{ segment.text }}</span> | ||
</div> | ||
</div> | ||
|
||
</div> |
26 changes: 26 additions & 0 deletions
26
client/src/app/+videos/+video-watch/shared/player-widgets/video-transcription.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
@use '_variables' as *; | ||
@use '_mixins' as *; | ||
|
||
.segment { | ||
&.active, | ||
&:hover { | ||
background: pvar(--mainBackgroundHoverColor); | ||
} | ||
} | ||
|
||
input[type=text] { | ||
@include peertube-input-text(100%); | ||
} | ||
|
||
.settings-button my-global-icon { | ||
width: 18px; | ||
height: 18px; | ||
} | ||
|
||
.settings-panel { | ||
position: absolute; | ||
width: 100%; | ||
padding: 0 1.5rem; | ||
left: 0; | ||
right: 0; | ||
} |
Oops, something went wrong.