diff --git a/astro.config.mjs b/astro.config.mjs index 62e2d66..4a16a0b 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -4,7 +4,6 @@ import partytown from "@astrojs/partytown"; import sitemap from "@astrojs/sitemap"; import robotsTxt from "astro-robots-txt"; import vue from "@astrojs/vue"; -import matomo from "astro-matomo"; import astroI18next from "astro-i18next"; export default defineConfig({ @@ -30,23 +29,11 @@ export default defineConfig({ partytown(), sitemap(), robotsTxt(), - vue(), - matomo({ - enabled: import.meta.env.PROD, // Only run Matomo in production - host: "#", - setCookieDomain: "#", - trackerUrl: "js/", // Defaults to matomo.php - srcUrl: "js/", // Defaults to matomo.js - siteId: 143, - heartBeatTimer: 5, - disableCookies: true, - debug: false, - }) + vue() ], // Others devToolbar: {enabled: false}, experimental: { - actions: true, directRenderScript: true, }, }); \ No newline at end of file diff --git a/bun.lockb b/bun.lockb index a75c709..c3bb152 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index f97c57f..5d24b2a 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,9 @@ "license": "GPL-3.0-or-later", "scripts": { "start": "astro dev", - "build": "astro build" + "build": "astro build", + "translate": "astro-i18next generate", + "docker:build": "docker build -t poke ." }, "repository": { "url": "https://codeberg.org/korbs/poke-but-in-astro" @@ -13,33 +15,27 @@ "keywords": [ "poketube", "private", + "privacy", "ytdl", - "youtube" + "youtube", + "astro", + "frontend" ], "dependencies": { "@astrojs/node": "^8.3.1", "@astrojs/partytown": "^2.1.1", - "@astrojs/react": "^3.6.0", "@astrojs/sitemap": "^3.1.6", "@astrojs/vue": "^4.5.0", "@fontsource-variable/roboto-flex": "^5.0.15", "@iconoir/vue": "^7.7.0", - "@innologica/vue-dropdown-menu": "^0.1.4", - "@shoelace-style/shoelace": "^2.15.1", - "@types/react": "^18.3.3", - "@types/react-dom": "^18.3.0", "astro": "^4.11.0", + "astro-analytics": "^2.7.0", "astro-i18next": "^1.0.0-beta.21", - "astro-matomo": "^1.6.0", "astro-robots-txt": "^1.0.0", - "iconoir-react": "^7.7.0", - "react": "^18.3.1", - "react-dom": "^18.3.1", "vue": "^3.4.29" }, "devDependencies": { "@types/bun": "^1.1.5", - "accessible-astro-components": "^2.3.6", "sass": "^1.77.6" } } \ No newline at end of file diff --git a/src/components/common/VideoItem.astro b/src/components/common/VideoItem.astro index c1906ee..25b6689 100644 --- a/src/components/common/VideoItem.astro +++ b/src/components/common/VideoItem.astro @@ -23,7 +23,7 @@ const ViewsConversion = Intl.NumberFormat('en', { notation: 'compact'}) const ViewsFormat = ViewsConversion.format(Views) --- - +
diff --git a/src/components/global/Header.astro b/src/components/global/Header.astro index 447ad73..c35963a 100644 --- a/src/components/global/Header.astro +++ b/src/components/global/Header.astro @@ -5,7 +5,17 @@ import { Trans, HeadHrefLangs } from "astro-i18next/components"; // Components import { Image } from 'astro:assets'; -import Dropdown from '@components/global/HeaderDropdown.astro' +import Dropdown from '@components/global/HeaderDropdown.astro'; +import InlinePlayer from "./InlinePlayer.astro"; + +// Check URL +if (Astro.url.pathname.startsWith('/watch')) { + console.log('true') + var WatchPage = true +} else { + console.log('false') + var WatchPage = false +} // Images import Poke from '@assets/poke-text.svg' @@ -39,6 +49,9 @@ import { + +{WatchPage ? null : } + + + \ No newline at end of file diff --git a/src/layouts/Default.astro b/src/layouts/Default.astro index f740214..a868852 100644 --- a/src/layouts/Default.astro +++ b/src/layouts/Default.astro @@ -12,7 +12,6 @@ import Footer from '@components/global/Footer.astro' // Styles import '@styles/index.scss' -import '@shoelace-style/shoelace/dist/themes/dark.css'; import '@fontsource-variable/roboto-flex'; --- diff --git a/src/pages/search.astro b/src/pages/search.astro index ebd5653..1fb3548 100644 --- a/src/pages/search.astro +++ b/src/pages/search.astro @@ -47,7 +47,7 @@ const TwitchData = await TwitchResponse.json()

Twitch Live streams with the tag "{Query}"

{TwitchData.data.relatedChannels.map((channel) => - +
diff --git a/src/pages/watch.astro b/src/pages/watch.astro index bf39404..fc27fa3 100644 --- a/src/pages/watch.astro +++ b/src/pages/watch.astro @@ -5,19 +5,24 @@ import Base from "@layouts/Default.astro"; // Environment Variables const DEFAULT_INVIDIOUS_INSTANCE = import.meta.env.DEFAULT_INVIDIOUS_INSTANCE -// Components - // Fetch const SWV = Astro.url.href.split("watch?v=").pop(); const video = await fetch('https://' + DEFAULT_INVIDIOUS_INSTANCE + "/api/v1/videos/" + SWV).then((response) => response.json()); const comments = await fetch('https://' + DEFAULT_INVIDIOUS_INSTANCE + "/api/v1/comments/" + SWV).then((response) => response.json()); + +// Set Cookies +/// This is used for the "Link" button so users can return to the video +Astro.cookies.set("InlinePlayerId", SWV, { + path: "/", + sameSite: "strict", +}); ---