mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-23 08:02:06 +00:00
chore: improve readability
This commit is contained in:
@ -45,7 +45,7 @@ export const onMainLoad = async ({
|
||||
window.setMaximizable(false);
|
||||
window.setFullScreenable(false);
|
||||
|
||||
send('ytmd:pip-toggle', true);
|
||||
send('peard:pip-toggle', true);
|
||||
|
||||
app.dock?.hide();
|
||||
window.setVisibleOnAllWorkspaces(true, {
|
||||
@ -63,7 +63,7 @@ export const onMainLoad = async ({
|
||||
window.setMaximizable(true);
|
||||
window.setFullScreenable(true);
|
||||
|
||||
send('ytmd:pip-toggle', false);
|
||||
send('peard:pip-toggle', false);
|
||||
|
||||
window.setVisibleOnAllWorkspaces(false);
|
||||
window.setAlwaysOnTop(false);
|
||||
|
||||
@ -12,12 +12,12 @@ import { t } from '@/i18n';
|
||||
|
||||
import { PictureInPictureButton } from './templates/picture-in-picture-button';
|
||||
|
||||
import type { YoutubePlayer } from '@/types/youtube-player';
|
||||
import type { MusicPlayer } from '@/types/music-player';
|
||||
import type { PictureInPicturePluginConfig } from './index';
|
||||
import type { RendererContext } from '@/types/contexts';
|
||||
|
||||
export const onPlayerApiReady = async (
|
||||
_: YoutubePlayer,
|
||||
_: MusicPlayer,
|
||||
{ ipc, getConfig }: RendererContext<PictureInPicturePluginConfig>,
|
||||
) => {
|
||||
const config = await getConfig();
|
||||
@ -89,7 +89,7 @@ export const onPlayerApiReady = async (
|
||||
await togglePictureInPicture();
|
||||
};
|
||||
|
||||
ipc.on('ytmd:pip-toggle', (isPip: boolean) => {
|
||||
ipc.on('peard:pip-toggle', (isPip: boolean) => {
|
||||
if (exitFullScreenButton && player) {
|
||||
if (isPip) {
|
||||
exitFullScreenButton?.addEventListener('click', pipClickEventListener);
|
||||
|
||||
Reference in New Issue
Block a user