This commit is contained in:
Korbs 2024-07-12 01:08:17 -04:00
parent f8687744ee
commit 4c6ab07a25
14 changed files with 7344 additions and 15 deletions

1
.dockerignore Normal file
View file

@ -0,0 +1 @@
node_modules

View file

@ -1,4 +1,4 @@
FROM ark.sudovanilla.org/korbs/nodejs:alpine AS runtime
FROM codeberg.org/korbs/nodejs:alpine AS runtime
WORKDIR /app
COPY . .

View file

@ -53,16 +53,11 @@ ___
- [ ] Theater Mode
- [ ] Cast
- [ ] Video Page
- [ ] Important Infomation Card ([Example](https://img.sudovanilla.org/pXqzT10.png))
- [ ] ~~Important Infomation Card ([Example](https://img.sudovanilla.org/pXqzT10.png))~~ Controversial, do not proceed
- [ ] Viewers Note (Like Community Notes, in [experimental phase at YouTube](https://blog.youtube/news-and-events/new-ways-to-offer-viewers-more-context/))
- [ ] Toggle:
- [ ] Audio Only
- [ ] Autoplay
- [ ] YouTube Music
- [ ] Music Player
- [ ] Artist Page
- [ ] Album Page
- [ ] Search Experience
- [ ] Custom Embed Page
- [ ] User Settings
- [ ] Invidious Server Selection
- [ ] [SafeTwitch](https://codeberg.org/SafeTwitch/safetwitch) Backend Server Selection

BIN
bun.lockb

Binary file not shown.

7262
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{
"name": "minpluto",
"version": "2024.07.11",
"version": "2024.07.12",
"description": "An open source frontend alternative to YouTube.",
"repository": "https://sudovanilla.org/MinPluto/MinPluto",
"author": "Korbs <korbs@sudovanilla.org>",
@ -24,7 +24,8 @@
],
"scripts": {
"start": "astro dev --host",
"translate": "astro-i18next generate"
"translate": "astro-i18next generate",
"build": "astro build"
},
"dependencies": {
"@astrojs/mdx": "^3.1.2",
@ -41,7 +42,6 @@
"undici": "^6.19.2"
},
"devDependencies": {
"@sudovanilla/zorn": "^2024.2.26-1",
"sass": "^1.71.1"
}
}

View file

@ -0,0 +1,46 @@
---
// Properties
const {
FetchData,
CategoryName,
CategoryDescription,
GradientHero
} = Astro.props
// Configuration
import {
DEFAULT_MEDIA_DATA_PROXY,
DEFAULT_IMAGE_PROXY
} from '@utils/GetConfig'
// Fetch
const fetchFrom = DEFAULT_MEDIA_DATA_PROXY + '/api/v1/trending' + FetchData
const response = await fetch(fetchFrom)
const data = await response.json()
---
<div class="Td-row">
{data.map((data) =>
<img src={DEFAULT_IMAGE_PROXY + '/https://i.ytimg.com/vi/' + data.videoId + '/maxresdefault.jpg'}/>
)}
</div>
<style lang="scss">
.Td-row {
display: grid;
grid-template-columns: repeat(auto-fit,minmax(60px,1fr));
grid-gap: 12px;
transform: rotate3d(3,-3,0,45deg);
position: fixed;
box-sizing: border-box;
box-decoration-break: revert;
overflow: clip;
width: 230px;
height: 330px;
img {
width: 100%;
}
}
</style>

View file

@ -0,0 +1,14 @@
---
import {
DEFAULT_MEDIA_PROXY,
DEFAULT_MEDIA_DATA_PROXY,
} from '@utils/GetConfig'
const InvidiousDataInfomation = await fetch(DEFAULT_MEDIA_DATA_PROXY + '/api/v1/stats').then((response) => response.json());
console.log(InvidiousDataInfomation)
---
{InvidiousDataInfomation.map((server) =>
<p>Version:</p>
)}

View file

@ -0,0 +1,5 @@
---
// Components
import Trending from "@components/category/trending.astro";
---
<Trending FetchData=""/>

View file

@ -9,6 +9,9 @@ import {
} from '@utils/GetConfig'
import { FireFlame, Frame, Gamepad, GraphUp, Movie, MusicDoubleNote } from "@iconoir/vue";
// Components
import Trending from "@components/category/trending.astro";
// Fetch
const TrendingFetch = DEFAULT_MEDIA_DATA_PROXY + '/api/v1/trending'
const TrendingResponse = await fetch(TrendingFetch)

View file

@ -15,7 +15,8 @@ import {
ANALYTICS,
} from '@utils/GetConfig'
import InstanceList from '@components/InstanceList.astro'
import Invidous from '@components/information/Invidious.astro'
import InstanceList from '@components/information/InstanceList.astro'
MinPluto Instance Information
-----------------------------

View file

@ -3,7 +3,7 @@ import { t, changeLanguage } from "i18next";
import Base from "@layouts/Default.astro";
import "@styles/video.scss";
// Configuration
import { DEFAULT_MEDIA_DATA_PROXY, DEFAULT_MEDIA_DATA_PROXY, DEFAULT_IMAGE_PROXY, SERVER_DOMAIN } from '@utils/GetConfig'
import { DEFAULT_MEDIA_PROXY, DEFAULT_MEDIA_DATA_PROXY, DEFAULT_IMAGE_PROXY, SERVER_DOMAIN } from '@utils/GetConfig'
import { Donate, Download, ShareIos, ThumbsUp, MediaVideo } from "@iconoir/vue";
// Components
@ -80,7 +80,7 @@ if (EightK === true) { // 571
>
</video>
<audio class="main-audio">
<source src={DEFAULT_MEDIA_DATA_PROXY + '/latest_version?id=' + video.videoId} type="audio/mp3">
<source src={DEFAULT_MEDIA_PROXY + '/latest_version?id=' + video.videoId} type="audio/mp3">
</audio>
</div>
<div class="video-rea">

View file

@ -3,8 +3,10 @@ export var SERVER_LOCATION = import.meta.env.SERVER_LOCATION
export var SERVER_PROTOCOL = import.meta.env.SERVER_PROTOCOL
export var SERVER_DOMAIN = import.meta.env.SERVER_DOMAIN
export var SERVER_BASE = import.meta.env.SERVER_BASE
export var DEFAULT_MEDIA_PROXY = import.meta.env.DEFAULT_MEDIA_PROXY
export var DEFAULT_MEDIA_DATA_PROXY = import.meta.env.DEFAULT_MEDIA_DATA_PROXY
export var DEFAULT_MEDIA_MEDIA_PROXY = import.meta.env.DEFAULT_MEDIA_MEDIA_PROXY
export var DEFAULT_STREAM_PROXY = import.meta.env.DEFAULT_STREAM_PROXY
export var DEFAULT_STREAM_DATA_PROXY = import.meta.env.DEFAULT_STREAM_DATA_PROXY
export var DEFAULT_IMAGE_PROXY = import.meta.env.DEFAULT_IMAGE_PROXY
export var DEFAULT_PLAYER = import.meta.env.DEFAULT_PLAYER
export var SIDEBAR_CATEGORIES = import.meta.env.SIDEBAR_CATEGORIES