chore: bundle font assets

This commit is contained in:
Xinrea
2025-10-25 12:40:15 +08:00
parent e82159b9a2
commit b7a76e8f10
7 changed files with 1007 additions and 60 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

View File

@@ -1,19 +1,19 @@
@font-face { @font-face {
font-family: 'Roboto'; font-family: "Roboto";
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
font-display: swap; font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Me5Q.ttf) format('truetype'); src: url(./fonts/KFOmCnqEu92Fr1Me5Q.ttf) format("truetype");
} }
@font-face { @font-face {
font-family: 'Roboto'; font-family: "Roboto";
font-style: normal; font-style: normal;
font-weight: 500; font-weight: 500;
font-display: swap; font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v27/KFOlCnqEu92Fr1MmEU9vAw.ttf) format('truetype'); src: url(./fonts/KFOlCnqEu92Fr1MmEU9vAw.ttf) format("truetype");
} }
.youtube-theme { .youtube-theme {
font-family: 'Roboto', sans-serif; font-family: "Roboto", sans-serif;
} }
.youtube-theme .shaka-bottom-controls { .youtube-theme .shaka-bottom-controls {
width: 100%; width: 100%;
@@ -27,18 +27,18 @@
display: flex; display: flex;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-box-direction: normal; -webkit-box-direction: normal;
-ms-flex-direction: column; -ms-flex-direction: column;
flex-direction: column; flex-direction: column;
} }
.youtube-theme .shaka-ad-controls { .youtube-theme .shaka-ad-controls {
-webkit-box-ordinal-group: 2; -webkit-box-ordinal-group: 2;
-ms-flex-order: 1; -ms-flex-order: 1;
order: 1; order: 1;
} }
.youtube-theme .shaka-controls-button-panel { .youtube-theme .shaka-controls-button-panel {
-webkit-box-ordinal-group: 3; -webkit-box-ordinal-group: 3;
-ms-flex-order: 2; -ms-flex-order: 2;
order: 2; order: 2;
height: 40px; height: 40px;
padding: 0 10px; padding: 0 10px;
} }
@@ -48,36 +48,36 @@
} }
.youtube-theme .shaka-small-play-button { .youtube-theme .shaka-small-play-button {
-webkit-box-ordinal-group: -2; -webkit-box-ordinal-group: -2;
-ms-flex-order: -3; -ms-flex-order: -3;
order: -3; order: -3;
} }
.youtube-theme .shaka-mute-button { .youtube-theme .shaka-mute-button {
-webkit-box-ordinal-group: -1; -webkit-box-ordinal-group: -1;
-ms-flex-order: -2; -ms-flex-order: -2;
order: -2; order: -2;
} }
.youtube-theme .shaka-controls-button-panel > * { .youtube-theme .shaka-controls-button-panel > * {
margin: 0; margin: 0;
padding: 3px 8px; padding: 3px 8px;
color: #EEE; color: #eee;
height: 40px; height: 40px;
} }
.youtube-theme .shaka-controls-button-panel > *:focus { .youtube-theme .shaka-controls-button-panel > *:focus {
outline: none; outline: none;
-webkit-box-shadow: inset 0 0 0 2px rgba(27, 127, 204, 0.8); -webkit-box-shadow: inset 0 0 0 2px rgba(27, 127, 204, 0.8);
box-shadow: inset 0 0 0 2px rgba(27, 127, 204, 0.8); box-shadow: inset 0 0 0 2px rgba(27, 127, 204, 0.8);
color: #FFF; color: #fff;
} }
.youtube-theme .shaka-controls-button-panel > *:hover { .youtube-theme .shaka-controls-button-panel > *:hover {
color: #FFF; color: #fff;
} }
.youtube-theme .shaka-controls-button-panel .shaka-volume-bar-container { .youtube-theme .shaka-controls-button-panel .shaka-volume-bar-container {
position: relative; position: relative;
z-index: 10; z-index: 10;
left: -1px; left: -1px;
-webkit-box-ordinal-group: 0; -webkit-box-ordinal-group: 0;
-ms-flex-order: -1; -ms-flex-order: -1;
order: -1; order: -1;
opacity: 0; opacity: 0;
width: 0px; width: 0px;
-webkit-transition: width 0.2s cubic-bezier(0.4, 0, 1, 1); -webkit-transition: width 0.2s cubic-bezier(0.4, 0, 1, 1);
@@ -120,23 +120,25 @@
opacity: 1; opacity: 1;
cursor: pointer; cursor: pointer;
} }
.youtube-theme .shaka-seek-bar-container input[type=range]::-webkit-slider-thumb { .youtube-theme
background: #FF0000; .shaka-seek-bar-container
input[type="range"]::-webkit-slider-thumb {
background: #ff0000;
cursor: pointer; cursor: pointer;
} }
.youtube-theme .shaka-seek-bar-container input[type=range]::-moz-range-thumb { .youtube-theme .shaka-seek-bar-container input[type="range"]::-moz-range-thumb {
background: #FF0000; background: #ff0000;
cursor: pointer; cursor: pointer;
} }
.youtube-theme .shaka-seek-bar-container input[type=range]::-ms-thumb { .youtube-theme .shaka-seek-bar-container input[type="range"]::-ms-thumb {
background: #FF0000; background: #ff0000;
cursor: pointer; cursor: pointer;
} }
.youtube-theme .shaka-video-container * { .youtube-theme .shaka-video-container * {
font-family: 'Roboto', sans-serif; font-family: "Roboto", sans-serif;
} }
.youtube-theme .shaka-video-container .material-icons-round { .youtube-theme .shaka-video-container .material-icons-round {
font-family: 'Material Icons Sharp'; font-family: "Material Icons Sharp";
} }
.youtube-theme .shaka-overflow-menu, .youtube-theme .shaka-overflow-menu,
.youtube-theme .shaka-settings-menu { .youtube-theme .shaka-settings-menu {
@@ -170,14 +172,14 @@
} }
.youtube-theme .shaka-settings-menu button[aria-selected="true"] span { .youtube-theme .shaka-settings-menu button[aria-selected="true"] span {
-webkit-box-ordinal-group: 3; -webkit-box-ordinal-group: 3;
-ms-flex-order: 2; -ms-flex-order: 2;
order: 2; order: 2;
margin-left: 0; margin-left: 0;
} }
.youtube-theme .shaka-settings-menu button[aria-selected="true"] i { .youtube-theme .shaka-settings-menu button[aria-selected="true"] i {
-webkit-box-ordinal-group: 2; -webkit-box-ordinal-group: 2;
-ms-flex-order: 1; -ms-flex-order: 1;
order: 1; order: 1;
font-size: 18px; font-size: 18px;
padding-left: 5px; padding-left: 5px;
} }
@@ -192,25 +194,25 @@
display: -ms-flexbox; display: -ms-flexbox;
display: flex; display: flex;
-webkit-box-pack: justify; -webkit-box-pack: justify;
-ms-flex-pack: justify; -ms-flex-pack: justify;
justify-content: space-between; justify-content: space-between;
-webkit-box-orient: horizontal; -webkit-box-orient: horizontal;
-webkit-box-direction: normal; -webkit-box-direction: normal;
-ms-flex-direction: row; -ms-flex-direction: row;
flex-direction: row; flex-direction: row;
-webkit-box-align: center; -webkit-box-align: center;
-ms-flex-align: center; -ms-flex-align: center;
align-items: center; align-items: center;
cursor: default; cursor: default;
outline: none; outline: none;
height: 40px; height: 40px;
-webkit-box-flex: 0; -webkit-box-flex: 0;
-ms-flex: 0 0 100%; -ms-flex: 0 0 100%;
flex: 0 0 100%; flex: 0 0 100%;
} }
.youtube-theme .shaka-overflow-menu button .shaka-overflow-button-label span { .youtube-theme .shaka-overflow-menu button .shaka-overflow-button-label span {
-ms-flex-negative: initial; -ms-flex-negative: initial;
flex-shrink: initial; flex-shrink: initial;
padding-left: 15px; padding-left: 15px;
font-size: 13px; font-size: 13px;
font-weight: 500; font-weight: 500;
@@ -218,11 +220,11 @@
display: -ms-flexbox; display: -ms-flexbox;
display: flex; display: flex;
-webkit-box-align: center; -webkit-box-align: center;
-ms-flex-align: center; -ms-flex-align: center;
align-items: center; align-items: center;
} }
.youtube-theme .shaka-overflow-menu span + span { .youtube-theme .shaka-overflow-menu span + span {
color: #FFF; color: #fff;
font-weight: 400 !important; font-weight: 400 !important;
font-size: 12px !important; font-size: 12px !important;
padding-right: 8px; padding-right: 8px;
@@ -230,7 +232,7 @@
} }
.youtube-theme .shaka-overflow-menu span + span:after { .youtube-theme .shaka-overflow-menu span + span:after {
content: "navigate_next"; content: "navigate_next";
font-family: 'Material Icons Sharp'; font-family: "Material Icons Sharp";
font-size: 20px; font-size: 20px;
} }
.youtube-theme .shaka-overflow-menu .shaka-pip-button span + span { .youtube-theme .shaka-overflow-menu .shaka-pip-button span + span {
@@ -270,10 +272,10 @@
} }
.youtube-theme .shaka-overflow-menu button, .youtube-theme .shaka-overflow-menu button,
.youtube-theme .shaka-settings-menu button { .youtube-theme .shaka-settings-menu button {
color: #EEE; color: #eee;
} }
.youtube-theme .shaka-captions-off { .youtube-theme .shaka-captions-off {
color: #BFBFBF; color: #bfbfbf;
} }
.youtube-theme .shaka-overflow-menu-button { .youtube-theme .shaka-overflow-menu-button {
font-size: 18px; font-size: 18px;

View File

@@ -225,11 +225,6 @@ pub async fn open_live(
use std::str::FromStr; use std::str::FromStr;
let platform = PlatformType::from_str(&platform)?; let platform = PlatformType::from_str(&platform)?;
let recorder_info = state
.recorder_manager
.get_recorder_info(platform, room_id)
.await
.unwrap();
let builder = tauri::WebviewWindowBuilder::new( let builder = tauri::WebviewWindowBuilder::new(
&state.app_handle, &state.app_handle,
format!("Live:{room_id}:{live_id}"), format!("Live:{room_id}:{live_id}"),
@@ -243,10 +238,7 @@ pub async fn open_live(
.into(), .into(),
), ),
) )
.title(format!( .title(format!("Live[{}] {}", room_id, live_id))
"Live[{}] {}",
room_id, recorder_info.room_info.room_title
))
.theme(Some(Theme::Light)) .theme(Some(Theme::Light))
.inner_size(1200.0, 800.0) .inner_size(1200.0, 800.0)
.effects(WindowEffectsConfig { .effects(WindowEffectsConfig {

View File

@@ -455,7 +455,7 @@ impl RecorderManager {
.get_account_by_platform(platform.clone().as_str()) .get_account_by_platform(platform.clone().as_str())
.await; .await;
if platform != PlatformType::Huya && account.is_err() { if platform != PlatformType::Huya && account.is_err() {
log::error!("Failed to get account: {}", account.err().unwrap()); log::warn!("Failed to find an account for {platform:?} {room_id}");
continue; continue;
} }
let account = if let Ok(account) = account { let account = if let Ok(account) = account {