mirror of
https://code.castopod.org/adaures/castopod
synced 2025-06-05 08:52:00 +00:00
fix(audio-player): set player icons to default instead of missing Castopod's
This commit is contained in:
parent
c21864ee25
commit
0ba0a25b11
@ -352,7 +352,6 @@ if (! function_exists('audio_player')) {
|
||||
id="castopod-vm-player"
|
||||
theme="light"
|
||||
language="{$language}"
|
||||
icons="castopod-icons"
|
||||
class="{$class} relative z-0"
|
||||
style="--vm-player-box-shadow:0; --vm-player-theme: hsl(var(--color-accent-base)); --vm-control-focus-color: hsl(var(--color-accent-contrast)); --vm-control-spacing: 4px; --vm-menu-item-focus-bg: hsl(var(--color-background-highlight));"
|
||||
>
|
||||
@ -360,7 +359,7 @@ if (! function_exists('audio_player')) {
|
||||
<source src="{$source}" type="{$mediaType}" />
|
||||
</vm-audio>
|
||||
<vm-ui>
|
||||
<vm-icon-library name="castopod-icons"></vm-icon-library>
|
||||
<vm-icon-library></vm-icon-library>
|
||||
<vm-controls full-width>
|
||||
<vm-playback-control></vm-playback-control>
|
||||
<vm-volume-control></vm-volume-control>
|
||||
|
@ -36,14 +36,6 @@ import "@vime/core/themes/default.css";
|
||||
import "@vime/core/themes/light.css";
|
||||
import "./modules/play-episode-button";
|
||||
|
||||
// Register Castopod's icons library
|
||||
const library: HTMLVmIconLibraryElement | null = document.querySelector(
|
||||
'vm-icon-library[name="castopod-icons"]'
|
||||
);
|
||||
if (library) {
|
||||
library.resolver = (iconName) => `/assets/icons/${iconName}.svg`;
|
||||
}
|
||||
|
||||
// Vime elements for audio player
|
||||
customElements.define("vm-player", VmPlayer);
|
||||
customElements.define("vm-file", VmFile);
|
||||
|
@ -62,7 +62,6 @@ const player = html`<div
|
||||
id="castopod-vm-player"
|
||||
theme="light"
|
||||
language="en"
|
||||
icons="castopod-icons"
|
||||
class="flex-1"
|
||||
style="--vm-player-box-shadow:0; --vm-player-theme: hsl(var(--color-accent-base)); --vm-control-focus-color: hsl(var(--color-accent-contrast)); --vm-menu-item-focus-bg: hsl(var(--color-background-highlight));"
|
||||
>
|
||||
@ -70,7 +69,7 @@ const player = html`<div
|
||||
<source src="" type="" />
|
||||
</vm-audio>
|
||||
<vm-ui>
|
||||
<vm-icon-library name="castopod-icons"></vm-icon-library>
|
||||
<vm-icon-library></vm-icon-library>
|
||||
<vm-controls full-width>
|
||||
<vm-playback-control></vm-playback-control>
|
||||
<vm-volume-control></vm-volume-control>
|
||||
@ -86,14 +85,6 @@ const player = html`<div
|
||||
|
||||
render(player, document.body);
|
||||
|
||||
// Register Castopod's icons library
|
||||
const library: HTMLVmIconLibraryElement | null = document.querySelector(
|
||||
'vm-icon-library[name="castopod-icons"]'
|
||||
);
|
||||
if (library) {
|
||||
library.resolver = (iconName) => `/assets/icons/${iconName}.svg`;
|
||||
}
|
||||
|
||||
// Vime elements for audio player
|
||||
customElements.define("vm-player", VmPlayer);
|
||||
customElements.define("vm-file", VmFile);
|
||||
|
@ -35,14 +35,6 @@ import {
|
||||
import "@vime/core/themes/default.css";
|
||||
import "@vime/core/themes/light.css";
|
||||
|
||||
// Register Castopod's icons library
|
||||
const library: HTMLVmIconLibraryElement | null = document.querySelector(
|
||||
'vm-icon-library[name="castopod-icons"]'
|
||||
);
|
||||
if (library) {
|
||||
library.resolver = (iconName) => `/assets/icons/${iconName}.svg`;
|
||||
}
|
||||
|
||||
// Vime elements for audio player
|
||||
customElements.define("vm-player", VmPlayer);
|
||||
customElements.define("vm-file", VmFile);
|
||||
|
@ -40,7 +40,6 @@
|
||||
id="castopod-vm-player"
|
||||
theme="<?= str_starts_with($theme, 'dark') ? 'dark' : 'light' ?>"
|
||||
language="<?= service('request')->getLocale() ?>"
|
||||
icons="castopod-icons"
|
||||
class="w-full mt-auto"
|
||||
style="--vm-player-box-shadow:0; --vm-player-theme: hsl(var(--color-accent-base)); --vm-control-focus-color: hsl(var(--color-accent-contrast)); --vm-control-spacing: 4px; --vm-menu-item-focus-bg: hsl(var(--color-background-highlight)); --vm-control-icon-size: 24px; <?= str_ends_with($theme, 'transparent') ? '--vm-controls-bg: transparent;' : '' ?>"
|
||||
>
|
||||
@ -55,7 +54,7 @@
|
||||
<source src="<?= $source ?>" type="<?= $episode->audio->file_mimetype ?>" />
|
||||
</vm-audio>
|
||||
<vm-ui>
|
||||
<vm-icon-library name="castopod-icons"></vm-icon-library>
|
||||
<vm-icon-library></vm-icon-library>
|
||||
<vm-controls full-width>
|
||||
<vm-playback-control></vm-playback-control>
|
||||
<vm-volume-control></vm-volume-control>
|
||||
|
Loading…
x
Reference in New Issue
Block a user