Convert Instance and Telemtry to MDX

This commit is contained in:
Korbs 2024-07-11 18:04:34 -04:00
parent 3640917c71
commit 44157a2d87
4 changed files with 86 additions and 142 deletions

View file

@ -1,88 +0,0 @@
---
import i18next,{ t, changeLanguage } from "i18next";
import Base from "@layouts/Default.astro";
import Dialog from '@components/Dialog.astro'
// Configuration
import {
SERVER_ADMIN,
ANALYLICS_TOOL,
DEFAULT_MEDIA_DATA_PROXY,
DEFAULT_MEDIA_DATA_PROXY,
DEFAULT_IMAGE_PROXY,
DEFAULT_PLAYER,
SERVER_LOCATION,
MODIFIED,
CUSTOM_SOURCE_CODE,
STATISTICS
} from '@utils/GetConfig'
import { FireFlame, Frame, Gamepad, GraphUp, Movie, MusicDoubleNote } from "@iconoir/vue";
---
<Base Title="MinPluto" Description="">
<div class="force-center">
<img src="/images/logo/MinPluto - Image Logo Full with Shadow.png"/>
<hr/>
<div class="video-grid">
<div class="in">
<h2>Operated By</h2>
<p>{SERVER_ADMIN}</p>
</div>
<div class="in">
<h2>Analytics Software</h2>
<p>
{
STATISTICS
?
<p>{ANALYLICS_TOOL}</p>
:
<p>None</p>
}
</p>
</div>
<div class="in">
<h2>Location</h2>
<p>{SERVER_LOCATION}</p>
</div>
<div class="in">
<h2>Modified</h2>
<p>{MODIFIED ? <p>Yes</p> : <p>No</p>}</p>
</div>
<div class="in">
<h2>Video Proxy</h2>
<a href={DEFAULT_MEDIA_DATA_PROXY}>{DEFAULT_MEDIA_DATA_PROXY}</a>
</div>
<div class="in">
<h2>Image Proxy</h2>
<a href={DEFAULT_IMAGE_PROXY}>{DEFAULT_IMAGE_PROXY}</a>
</div>
</div>
{MODIFIED ? <p>Modified Source Code <a href={CUSTOM_SOURCE_CODE}>{CUSTOM_SOURCE_CODE}</a></p> : null}
<img src="/images/backgrounds/1.webp"/>
</div>
</Base>
<style is:inline>a[href="/"] {background: rgb(255 255 255 / 25%) !important;border: 2px rgba(255, 255, 255, 0.25) solid !important;}</style>
<style>
img[src="/images/backgrounds/1.webp"] {
position: fixed;
bottom: 0px;
left: 50%;
transform: translate(-57%);
-webkit-mask-image: linear-gradient(180deg, transparent 5%, rgb(0 0 0) 52%, rgb(0 0 0) 44%, transparent 95%);
}
@media only screen and (min-width: 875px) {
img[src="/images/backgrounds/1.webp"] {
display: none;
}
.category-select-grid {
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
}
}
.force-center {
text-align: center;
padding-top: 10%;
}

48
src/pages/instance.mdx Normal file
View file

@ -0,0 +1,48 @@
---
layout: '@layouts/Markdown.astro'
---
import {
SERVER_ADMIN,
SERVER_LOCATION,
DEFAULT_MEDIA_PROXY,
DEFAULT_MEDIA_DATA_PROXY,
DEFAULT_STREAM_PROXY,
DEFAULT_STREAM_DATA_PROXY,
DEFAULT_IMAGE_PROXY,
MODIFIED,
CUSTOM_SOURCE_CODE,
ANALYTICS,
} from '@utils/GetConfig'
import InstanceList from '@components/InstanceList.astro'
MinPluto Instance Information
-----------------------------
Server Operator: {SERVER_ADMIN}
Location: {SERVER_LOCATION}
Invidious Media Proxy: {DEFAULT_MEDIA_PROXY}
Invidious Data Proxy: {DEFAULT_MEDIA_DATA_PROXY}
SafeTwitch Data Proxy: {DEFAULT_STREAM_PROXY}
SafeTwitch Media Proxy: {DEFAULT_STREAM_DATA_PROXY}
Image Proxy: {DEFAULT_IMAGE_PROXY}
Modified: {MODIFIED}
{MODIFIED ? <p>Modified Source Code: {CUSTOM_SOURCE_CODE}</p> : null}
Analytics Software: {ANALYTICS}
___
MinPluto Instances
---------------------------
<InstanceList/>

View file

@ -1,54 +0,0 @@
---
import i18next,{ t, changeLanguage } from "i18next";
import Base from "@layouts/Default.astro";
if (Astro.cookies.get("Telemtry").value === "Enabled") {
var UserIsOptedIn = true
}
else if (Astro.cookies.get("Telemtry").value === "Disabled") {
var UserIsOptedIn = false
}
---
<Base Title="MinPluto Telemtry" Description="">
<div style="max-width: 600px; margin: auto;" class="force-center">
<center>
<h2>MinPluto Telemtry</h2>
<hr/>
<p>Telemtry data is used in MinPluto to see metrics of usage on different features and other aspects. This is help SudoVanilla, the developer of MinPluto, make better and informed decisions on what needs priority.</p>
<p>By default, you're opted-out for privacy purposes.</p>
<hr/>
<p>If you decide to opt-in, the following is tracked:</p>
<ul style="text-align: left; max-width: 300px;">
<li>Language</li>
<li>Browser Useragent</li>
<li>Operating System</li>
<li>Errors</li>
<li>Location</li>
<li>All settings, except for some</li>
<li>Platforms you've imported from</li>
</ul>
<p>The following will not be tracked:</p>
<ul style="text-align: left; max-width: 300px;">
<li>Searches</li>
<li>Videos/Streams you watched</li>
<li>Subscribed Channels</li>
<li>Downloads</li>
<li>Shares</li>
<li>Embeds</li>
<li>Personal Information in your account, such as name and email</li>
<li>CSS/JS Customization</li>
<li>Themes</li>
</ul>
<p style="font-size: 14px; opacity: 0.4;">Note that this can change at anytime.</p>
<hr/>
{UserIsOptedIn ?
<a style="color: white;text-decoration: none;margin-bottom: 6px;border-radius: 6px;padding: 8px 24px;background: #1a1a1a;font-size: 14px;border: 2px rgba(255, 255, 255, 0.25) solid;" href="/api/telemtry/disable">Opt-Out</a>
:
<a style="color: white;text-decoration: none;margin-bottom: 6px;border-radius: 6px;padding: 8px 24px;background: #1a1a1a;font-size: 14px;border: 2px rgba(255, 255, 255, 0.25) solid;" href="/api/telemtry/enable">Opt-In</a>
}
</center>
</div>
</Base>
<style is:inline>a[href="/telemtry"] {background: rgb(255 255 255 / 25%) !important;border: 2px rgba(255, 255, 255, 0.25) solid !important;}</style>

38
src/pages/telemtry.mdx Normal file
View file

@ -0,0 +1,38 @@
---
layout: '@layouts/Markdown.astro'
---
import OptButtons from '@components/buttons/Telemtry.astro'
MinPluto Telemtry
-----------------
Telemtry data is used in MinPluto to see metrics of usage on different features and other aspects. This is help SudoVanilla, the developer of MinPluto, make better and informed decisions on what needs priority.
By default, you're opted-out for privacy purposes.
If you decide to opt-in, the following is tracked:
* Language
* Browser Useragent
* Operating System
* Errors
* Location
* All settings, except for some
* Platforms you've imported from
The following will not be tracked:
* Searches
* Videos/Streams you watched
* Subscribed Channels
* Downloads
* Shares
* Embeds
* Personal Information in your account, such as name and email
* CSS/JS Customization
* Themes
Note that this can change at anytime.
<div style="text-align: right"><OptButtons/></div>