24 changed files with 281 additions and 31 deletions
@ -0,0 +1,48 @@
@@ -0,0 +1,48 @@
|
||||
name: Annotate linting |
||||
|
||||
permissions: |
||||
actions: read # download artifact |
||||
checks: write # annotate |
||||
|
||||
# this is done as a seperate workflow so |
||||
# the annotater has access to write to checks (to annotate) |
||||
on: |
||||
workflow_run: |
||||
workflows: ["Linting and Testing"] |
||||
types: |
||||
- completed |
||||
|
||||
jobs: |
||||
annotate: |
||||
name: Annotate linting |
||||
runs-on: ubuntu-latest |
||||
|
||||
steps: |
||||
- name: Download linting report |
||||
uses: actions/github-script@v6 |
||||
with: |
||||
script: | |
||||
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({ |
||||
owner: context.repo.owner, |
||||
repo: context.repo.repo, |
||||
run_id: ${{github.event.workflow_run.id }}, |
||||
}); |
||||
const matchArtifact = artifacts.data.artifacts.filter((artifact) => { |
||||
return artifact.name == "eslint_report.json" |
||||
})[0]; |
||||
const download = await github.rest.actions.downloadArtifact({ |
||||
owner: context.repo.owner, |
||||
repo: context.repo.repo, |
||||
artifact_id: matchArtifact.id, |
||||
archive_format: 'zip', |
||||
}); |
||||
const fs = require('fs'); |
||||
fs.writeFileSync('${{github.workspace}}/eslint_report.zip', Buffer.from(download.data)); |
||||
|
||||
- run: unzip eslint_report.zip |
||||
|
||||
- name: Annotate linting |
||||
uses: ataylorme/eslint-annotate-action@v2 |
||||
with: |
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}" |
||||
report-json: "eslint_report.json" |
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
/* |
||||
X-Frame-Options: DENY |
||||
X-XSS-Protection: 1; mode=block |
||||
X-Content-Type-Options: nosniff |
||||
Referrer-Policy: origin-when-cross-origin |
@ -1,7 +1,6 @@
@@ -1,7 +1,6 @@
|
||||
window.__CONFIG__ = { |
||||
// url must NOT end with a slash
|
||||
VITE_CORS_PROXY_URL: "", |
||||
|
||||
VITE_TMDB_API_KEY: "b030404650f279792a8d3287232358e3", |
||||
VITE_OMDB_API_KEY: "aa0937c0", |
||||
}; |
||||
|
@ -1,4 +1,4 @@
@@ -1,4 +1,4 @@
|
||||
export const DISCORD_LINK = "https://discord.gg/Jhqt4Xzpfb"; |
||||
export const GITHUB_LINK = "https://github.com/movie-web/movie-web"; |
||||
export const APP_VERSION = "3.0.4"; |
||||
export const APP_VERSION = "3.0.5"; |
||||
export const GA_ID = "G-44YVXRL61C"; |
||||
|
@ -0,0 +1,40 @@
@@ -0,0 +1,40 @@
|
||||
import { Icons } from "@/components/Icon"; |
||||
import { useIsMobile } from "@/hooks/useIsMobile"; |
||||
import { useTranslation } from "react-i18next"; |
||||
import { useControls } from "@/video/state/logic/controls"; |
||||
import { useVideoPlayerDescriptor } from "@/video/state/hooks"; |
||||
import { useCallback } from "react"; |
||||
import { |
||||
canPictureInPicture, |
||||
canWebkitPictureInPicture, |
||||
} from "@/utils/detectFeatures"; |
||||
import { VideoPlayerIconButton } from "../parts/VideoPlayerIconButton"; |
||||
|
||||
interface Props { |
||||
className?: string; |
||||
} |
||||
|
||||
export function PictureInPictureAction(props: Props) { |
||||
const { isMobile } = useIsMobile(); |
||||
const { t } = useTranslation(); |
||||
|
||||
const descriptor = useVideoPlayerDescriptor(); |
||||
const controls = useControls(descriptor); |
||||
|
||||
const handleClick = useCallback(() => { |
||||
controls.togglePictureInPicture(); |
||||
}, [controls]); |
||||
|
||||
if (!canPictureInPicture() && !canWebkitPictureInPicture()) return null; |
||||
|
||||
return ( |
||||
<VideoPlayerIconButton |
||||
className={props.className} |
||||
icon={Icons.PICTURE_IN_PICTURE} |
||||
onClick={handleClick} |
||||
text={ |
||||
isMobile ? (t("videoPlayer.buttons.pictureInPicture") as string) : "" |
||||
} |
||||
/> |
||||
); |
||||
} |
Loading…
Reference in new issue