move responsive ui

This commit is contained in:
2025-07-21 05:38:52 +03:00
parent ad51007693
commit 5061864270
4 changed files with 41 additions and 21 deletions
+10 -5
View File
@@ -6,7 +6,7 @@ from nicegui import ui
class PlyrVideoPlayer:
_plyr_installed = False
def __init__(self, src: str, poster_url: str = None):
def __init__(self, src: str, poster_url: str = None, minimal: bool = False):
if not PlyrVideoPlayer._plyr_installed:
install_plyr()
PlyrVideoPlayer._plyr_installed = True
@@ -35,10 +35,15 @@ class PlyrVideoPlayer:
options = {}
options.setdefault("settings", [])
options.setdefault("ratio", "16:9")
options.setdefault("controls",
["play-large", "play", "rewind", "fast-forward", "current-time", "progress", "duration",
"mute", "volume", "pip", "airplay", "download", "fullscreen"]
)
if minimal:
options.setdefault("controls",
["play-large", "play", "current-time", "progress", "mute", "pip", "airplay", "download",
"fullscreen"])
else:
options.setdefault("controls",
["play-large", "play", "rewind", "fast-forward", "current-time", "progress", "duration",
"mute", "volume", "pip", "airplay", "download", "fullscreen"]
)
js_options = str(options).replace("True", "true").replace("'", '"')
js = f"""
+1 -1
View File
@@ -30,7 +30,7 @@ class ContentDialog(ui.dialog):
with self.card:
self.additional_info_column = ui.column(wrap=False)
self.additional_info_column.classes("w-full")
self.additional_info_column.style("width: 50%; gap: 0")
self.additional_info_column.style("width: 50%; gap: 0; white-space: nowrap")
with self.additional_info_column:
release_date = self.content.release_date.split("-")[::-1]