1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 01:39:37 +02:00

Compare commits

...

6 commits

Author SHA1 Message Date
Chocobozzz
94e55dfc6c
Merge branch 'release/7.3.x' into develop 2025-09-16 11:06:00 +02:00
Chocobozzz
bb0c71549a
Refactor player variables 2025-09-16 11:05:53 +02:00
Chocobozzz
2a648e6ea5
Fix docker production build 2025-09-16 06:36:25 +02:00
Chocobozzz
3a58afef10
Fix lint 2025-09-15 15:58:08 +02:00
Chocobozzz
84dbcb5f11
Decrease settings menu opacity 2025-09-15 15:40:01 +02:00
Chocobozzz
cd8ad77515
Fix settings menu overflow 2025-09-15 15:28:21 +02:00
12 changed files with 42 additions and 45 deletions

View file

@ -28,7 +28,7 @@ jobs:
git fetch --force --tags git fetch --force --tags
one="{ \"build-peertube\": true, \"file\": \"./support/docker/production/Dockerfile\", \"ref\": \"develop\", \"tags\": \"chocobozzz/peertube:develop-trixie,chocobozzz/peertube:develop\" }" one="{ \"build-peertube\": true, \"file\": \"./support/docker/production/Dockerfile\", \"ref\": \"develop\", \"tags\": \"chocobozzz/peertube:develop-trixie,chocobozzz/peertube:develop\" }"
two="{ \"build-peertube\": true, \"file\": \"./support/docker/production/Dockerfile\", \"ref\": \"master\", \"tags\": \"chocobozzz/peertube:production-bookworm,chocobozzz/peertube:$(git describe --abbrev=0)-bookworm\" }" two="{ \"build-peertube\": true, \"file\": \"./support/docker/production/Dockerfile.bookworm\", \"ref\": \"master\", \"tags\": \"chocobozzz/peertube:production-bookworm,chocobozzz/peertube:$(git describe --abbrev=0)-bookworm\" }"
three="{ \"build-peertube\": false, \"file\": \"./support/docker/production/Dockerfile.nginx\", \"ref\": \"master\", \"tags\": \"chocobozzz/peertube-webserver:latest\" }" three="{ \"build-peertube\": false, \"file\": \"./support/docker/production/Dockerfile.nginx\", \"ref\": \"master\", \"tags\": \"chocobozzz/peertube-webserver:latest\" }"
matrix="[$one,$two,$three]" matrix="[$one,$two,$three]"

View file

@ -1,4 +1,4 @@
import { CommonModule, NgClass } from '@angular/common' import { CommonModule } from '@angular/common'
import { Component, OnInit, inject, output, viewChild } from '@angular/core' import { Component, OnInit, inject, output, viewChild } from '@angular/core'
import { FormsModule, ReactiveFormsModule } from '@angular/forms' import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { Notifier, ServerService } from '@app/core' import { Notifier, ServerService } from '@app/core'

View file

@ -563,7 +563,7 @@ export class VideoService {
[VideoLicence['CC-BY-NC-ND']]: $localize`CC-BY-NC-ND`, [VideoLicence['CC-BY-NC-ND']]: $localize`CC-BY-NC-ND`,
[VideoLicence['CC0']]: '', [VideoLicence['CC0']]: '',
[VideoLicence.PDM]: $localize`Public domain mark`, [VideoLicence.PDM]: $localize`Public domain mark`,
[VideoLicence['COPYRIGHT']]: 'You are the owner of the content or you have the rights of the copyright holders' [VideoLicence['COPYRIGHT']]: $localize`You are the owner of the content or you have the rights of the copyright holders`
} }
return serverLicences.map(p => { return serverLicences.map(p => {

View file

@ -69,8 +69,8 @@
--alert-primary-bg: #{pvar(--primary-200)}; --alert-primary-bg: #{pvar(--primary-200)};
--alert-primary-border-color: #{pvar(--primary-300)}; --alert-primary-border-color: #{pvar(--primary-300)};
--embed-fg: #fff; --pt-player-fg: #fff;
--embed-big-play-bg: rgba(0, 0, 0, 0.8); --pt-player-big-play-bg: rgba(0, 0, 0, 0.8);
--menu-fg: #{pvar(--fg-400)}; --menu-fg: #{pvar(--fg-400)};
--menu-bg: #{pvar(--bg-secondary-400)}; --menu-bg: #{pvar(--bg-secondary-400)};
@ -78,8 +78,8 @@
--header-fg: #{pvar(--fg)}; --header-fg: #{pvar(--fg)};
--header-bg: #{pvar(--bg)}; --header-bg: #{pvar(--bg)};
--player-overlay-fg: #{pvar(--fg-400)}; --pt-player-overlay-secondary-fg: #{pvar(--fg-400)};
--player-overlay-bg: #{pvar(--bg-secondary-400)}; --pt-player-overlay-secondary-bg: #{pvar(--bg-secondary-400)};
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------

View file

@ -203,10 +203,10 @@ $variables: (
--alert-primary-fg: var(--alert-primary-fg), --alert-primary-fg: var(--alert-primary-fg),
--alert-primary-bg: var(--alert-primary-bg), --alert-primary-bg: var(--alert-primary-bg),
--alert-primary-border-color: var(--alert-primary-border-color), --alert-primary-border-color: var(--alert-primary-border-color),
--embed-fg: var(--embed-fg), --pt-player-fg: var(--pt-player-fg),
--embed-big-play-bg: var(--embed-big-play-bg), --pt-player-big-play-bg: var(--pt-player-big-play-bg),
--player-overlay-fg: var(--player-overlay-fg), --pt-player-overlay-secondary-fg: var(--pt-player-overlay-secondary-fg),
--player-overlay-bg: var(--player-overlay-bg) --pt-player-overlay-secondary-bg: var(--pt-player-overlay-secondary-bg)
); );
// SASS type check our CSS variables // SASS type check our CSS variables

View file

@ -1,9 +1,7 @@
@use "sass:color"; @use "sass:color";
$primary-foreground-color: #fff; $fg-opacity: 0.9;
$primary-foreground-opacity: 0.9; $fg-opacity-hover: 1;
$primary-foreground-opacity-hover: 1;
$primary-background-color: rgba(0, 0, 0, 0.8);
$font-size: 13px; $font-size: 13px;

View file

@ -6,15 +6,15 @@ $context-menu-width: 350px;
.video-js .vjs-contextmenu-ui-menu { .video-js .vjs-contextmenu-ui-menu {
position: absolute; position: absolute;
background-color: var(--embed-background-color); background-color: var(--pt-player-overlay-bg);
padding: 8px 0; padding: 8px 0;
border-radius: 4px; border-radius: 4px;
width: $context-menu-width; width: $context-menu-width;
z-index: 105; // On top of the progress bar z-index: 105; // On top of the progress bar
.vjs-menu-content { .vjs-menu-content {
opacity: $primary-foreground-opacity; opacity: $fg-opacity;
color: pvar(--embed-fg); color: pvar(--pt-player-fg);
font-size: $font-size !important; font-size: $font-size !important;
font-weight: $font-semibold; font-weight: $font-semibold;
} }
@ -27,7 +27,7 @@ $context-menu-width: 350px;
justify-content: flex-start; justify-content: flex-start;
&:hover { &:hover {
background-color: rgba(255, 255, 255, 0.2); background-color: var(--pt-player-overlay-bg-hover);
} }
[class^="vjs-icon-"] { [class^="vjs-icon-"] {

View file

@ -83,15 +83,15 @@ $chapter-marker-size: 9px;
.vjs-theater-control, .vjs-theater-control,
.vjs-caption-toggle-control, .vjs-caption-toggle-control,
.vjs-settings { .vjs-settings {
color: pvar(--embed-fg); color: pvar(--pt-player-fg);
transition: opacity 0.1s; transition: opacity 0.1s;
&:not(.vjs-disabled) { &:not(.vjs-disabled) {
opacity: $primary-foreground-opacity; opacity: $fg-opacity;
&:hover { &:hover {
opacity: $primary-foreground-opacity-hover; opacity: $fg-opacity-hover;
} }
} }
} }
@ -142,7 +142,7 @@ $chapter-marker-size: 9px;
.vjs-volume-vertical { .vjs-volume-vertical {
// On top of the progress bar // On top of the progress bar
z-index: 120; z-index: 120;
background-color: var(--embed-background-color); background-color: var(--pt-player-overlay-bg);
border-radius: 10px; border-radius: 10px;
bottom: 6.75em; bottom: 6.75em;
height: 7em; height: 7em;
@ -153,8 +153,8 @@ $chapter-marker-size: 9px;
.vjs-current-time, .vjs-current-time,
.vjs-duration, .vjs-duration,
.vjs-peertube { .vjs-peertube {
color: pvar(--embed-fg); color: pvar(--pt-player-fg);
opacity: $primary-foreground-opacity; opacity: $fg-opacity;
} }
.vjs-time-control { .vjs-time-control {
@ -195,7 +195,7 @@ $chapter-marker-size: 9px;
.vjs-pt-live-control { .vjs-pt-live-control {
width: auto; width: auto;
opacity: $primary-foreground-opacity; // videojs adds a .vjs-disabled when the live is synced opacity: $fg-opacity; // videojs adds a .vjs-disabled when the live is synced
font-size: var(--control-bar-font-size); font-size: var(--control-bar-font-size);
@include margin-right(auto); @include margin-right(auto);
@ -204,7 +204,7 @@ $chapter-marker-size: 9px;
cursor: pointer; cursor: pointer;
&:hover { &:hover {
opacity: $primary-foreground-opacity-hover; opacity: $fg-opacity-hover;
} }
} }
@ -275,7 +275,7 @@ $chapter-marker-size: 9px;
background-color: rgba(255, 255, 255, 0.2); background-color: rgba(255, 255, 255, 0.2);
.vjs-play-progress { .vjs-play-progress {
background: pvar(--embed-fg); background: pvar(--pt-player-fg);
// Not display the circle if the progress is not hovered // Not display the circle if the progress is not hovered
&::before { &::before {
@ -480,7 +480,7 @@ $chapter-marker-size: 9px;
&.enabled, &.enabled,
&.enabled:hover { &.enabled:hover {
opacity: $primary-foreground-opacity !important; opacity: $fg-opacity !important;
} }
&:focus { &:focus {

View file

@ -22,8 +22,8 @@
.nsfw-details { .nsfw-details {
width: 100%; width: 100%;
width: fit-content; width: fit-content;
background-color: pvar(--player-overlay-bg); background-color: pvar(--pt-player-overlay-secondary-bg);
color: pvar(--player-overlay-fg); color: pvar(--pt-player-overlay-secondary-fg);
max-width: calc(40% - 2 * var(--nsfw-info-margin-x)); max-width: calc(40% - 2 * var(--nsfw-info-margin-x));
padding: 1rem; padding: 1rem;
} }
@ -109,7 +109,7 @@
-webkit-mask-size: cover; -webkit-mask-size: cover;
width: 20px; width: 20px;
height: 20px; height: 20px;
background-color: pvar(--player-overlay-fg); background-color: pvar(--pt-player-overlay-secondary-fg);
display: block; display: block;
@include margin-left(auto); @include margin-left(auto);

View file

@ -5,10 +5,10 @@
@use "./_player-mixins" as *; @use "./_player-mixins" as *;
body { body {
--embed-foreground-color: #{$primary-foreground-color}; --pt-player-overlay-bg: rgba(0, 0, 0, 0.6);
--embed-background-color: #{$primary-background-color}; --pt-player-overlay-bg-hover: rgba(255, 255, 255, 0.15);
--embed-big-play-background-color: #{$primary-background-color}; --pt-player-big-play-background-color: rgba(0, 0, 0, 0.8);
// Prevent z-index bug with Firefox PiP button // Prevent z-index bug with Firefox PiP button
// See: // See:
@ -16,7 +16,7 @@ body {
// * https://bugzilla.mozilla.org/show_bug.cgi?id=1742585 // * https://bugzilla.mozilla.org/show_bug.cgi?id=1742585
// * https://bugzilla.mozilla.org/show_bug.cgi?id=1754604 // * https://bugzilla.mozilla.org/show_bug.cgi?id=1754604
@supports (-moz-orient: block) { @supports (-moz-orient: block) {
--embed-background-color: #000; --pt-player-overlay-bg: #000;
} }
} }
@ -27,7 +27,7 @@ body {
.video-js.vjs-peertube-skin { .video-js.vjs-peertube-skin {
font-size: $font-size; font-size: $font-size;
color: pvar(--embed-fg); color: pvar(--pt-player-fg);
&.disabled { &.disabled {
cursor: default; cursor: default;
@ -53,7 +53,7 @@ body {
height: calc(var(--big-play-button-size)); height: calc(var(--big-play-button-size));
margin-top: calc(var(--big-play-button-size) / 2 * -1); margin-top: calc(var(--big-play-button-size) / 2 * -1);
line-height: 1; line-height: 1;
background-color: pvar(--embed-big-play-bg); background-color: pvar(--pt-player-big-play-bg);
border-radius: 100%; border-radius: 100%;
transition: 0.2s background-color; transition: 0.2s background-color;
@ -85,7 +85,7 @@ body {
} }
.vjs-control-bar { .vjs-control-bar {
opacity: $primary-foreground-opacity-hover; opacity: $fg-opacity-hover;
} }
} }

View file

@ -10,7 +10,6 @@ $setting-transition-easing: ease-out;
.video-js { .video-js {
.vjs-settings-sub-menu-title { .vjs-settings-sub-menu-title {
width: 4em;
text-transform: initial; text-transform: initial;
} }
@ -18,12 +17,12 @@ $setting-transition-easing: ease-out;
position: absolute; position: absolute;
right: 0.5em; right: 0.5em;
bottom: 4em; bottom: 4em;
color: pvar(--embed-fg); color: pvar(--pt-player-fg);
margin: 0 auto; margin: 0 auto;
font-size: $font-size !important; font-size: $font-size !important;
z-index: 100; z-index: 100;
border-radius: 10px; border-radius: 10px;
background-color: var(--embed-background-color); background-color: var(--pt-player-overlay-bg);
width: auto; width: auto;
overflow: hidden; overflow: hidden;
@ -89,7 +88,7 @@ $setting-transition-easing: ease-out;
&:hover { &:hover {
cursor: pointer; cursor: pointer;
background-color: rgba(255, 255, 255, 0.2); background-color: var(--pt-player-overlay-bg-hover);
} }
&.disabled { &.disabled {

View file

@ -361,11 +361,11 @@ export class PeerTubeEmbed {
const body = document.getElementById('custom-css') const body = document.getElementById('custom-css')
if (this.playerOptionsBuilder.hasBigPlayBackgroundColor()) { if (this.playerOptionsBuilder.hasBigPlayBackgroundColor()) {
body.style.setProperty('--embed-big-play-background-color', this.playerOptionsBuilder.getBigPlayBackgroundColor()) body.style.setProperty('--pt-player-big-play-background-color', this.playerOptionsBuilder.getBigPlayBackgroundColor())
} }
if (this.playerOptionsBuilder.hasForegroundColor()) { if (this.playerOptionsBuilder.hasForegroundColor()) {
body.style.setProperty('--embed-foreground-color', this.playerOptionsBuilder.getForegroundColor()) body.style.setProperty('--pt-player-fg', this.playerOptionsBuilder.getForegroundColor())
} }
} }