Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyiya committed Jul 28, 2024
1 parent 806fb5f commit 1118dda
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
9 changes: 3 additions & 6 deletions packages/shared/components/player/OPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,21 @@ const OPlayer = React.forwardRef(({ playerIsPlaying, duration, onEvent, autoplay
{
icon: `<svg viewBox="0 0 256 256"><rect width="256" height="256" fill="none" /><path fill="white" d="M252 128a60 60 0 0 1-102.43 42.43l-.49-.53l-59.86-67.59a36 36 0 1 0 0 51.38l3.08-3.48a12 12 0 1 1 18 15.91l-3.35 3.78l-.49.53a60 60 0 1 1 0-84.86l.49.53l59.86 67.59a36 36 0 1 0 0-51.38l-3.08 3.48a12 12 0 1 1-18-15.91l3.35-3.78l.49-.53A60 60 0 0 1 252 128" /></svg>`,
name: 'Power By OPlayer',
type: 'switcher',
onChange() {
window.open('https://github.com/shiyiya/oplayer')
},
},
{
icon: '',
icon: `<svg viewBox="0 0 256 256"><rect width="256" height="256" fill="none" /><path fill="white" d="M252 128a60 60 0 0 1-102.43 42.43l-.49-.53l-59.86-67.59a36 36 0 1 0 0 51.38l3.08-3.48a12 12 0 1 1 18 15.91l-3.35 3.78l-.49.53a60 60 0 1 1 0-84.86l.49.53l59.86 67.59a36 36 0 1 0 0-51.38l-3.08 3.48a12 12 0 1 1-18-15.91l3.35-3.78l.49-.53A60 60 0 0 1 252 128" /></svg>`,
name: 'Share',
type: 'selector',
onChange({ value }) {
onChange(value) {
const url = `https://x.com/intent/post?url=${window.location.href}&text=${document.title}`
if (value == 'Twitter') {
window.open(url)
} else if (value == 'copy') {
copyToClipboard(url)
}
},
key: 'x',
children: [
{
name: 'Copy link',
Expand All @@ -69,7 +66,7 @@ const OPlayer = React.forwardRef(({ playerIsPlaying, duration, onEvent, autoplay
name: 'Twitter',
value: 'Twitter',
},
] as any,
],
},
],

Expand Down
14 changes: 7 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1118dda

Please sign in to comment.