Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release/1.16.0 #59

Merged
merged 7 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ KOFI_USERNAME=zaanposni
SVELTEKIT_SENTRY_DSN=
UMAMI_ID=
API_ANALYTICS_KEY=

API_HOSTNAME=
16 changes: 14 additions & 2 deletions .github/workflows/docker_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,32 @@ on:
pull_request:

jobs:
build:
build_frontend:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Build frontend
working-directory: ./src/psaggregator
run: docker build -t ghcr.io/${{ github.repository_owner }}/psaggregator_frontend:latest .

build_nginx:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build nginx
working-directory: ./src/nginx
run: docker build -t ghcr.io/${{ github.repository_owner }}/psaggregator_nginx:latest .

build_dataimport:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build dataimport
working-directory: ./src/dataimport
run: docker build -t ghcr.io/${{ github.repository_owner }}/psaggregator_dataimport:latest .
2 changes: 1 addition & 1 deletion .github/workflows/docker_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
packages: write
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Determine version
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pythonlint_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ services:
environment:
- PRIVATE_DATABASE_URL=${DATABASE_URL}
- PRIVATE_API_ANALYTICS_KEY=${API_ANALYTICS_KEY}
- PRIVATE_API_HOSTNAME=${API_HOSTNAME}
- PUBLIC_LEGAL_URL=${LEGAL_URL}
- PUBLIC_UMAMI_ID=${UMAMI_ID}
- PUBLIC_KOFI_USERNAME=${KOFI_USERNAME}
Expand Down
249 changes: 130 additions & 119 deletions src/psaggregator/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/psaggregator/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "psaggregator",
"version": "1.15.1",
"version": "1.16.0",
"scripts": {
"dev": "vite dev",
"build": "vite build",
Expand Down
10 changes: 6 additions & 4 deletions src/psaggregator/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ if (process.env.PRIVATE_API_ANALYTICS_KEY) {
const apiAnalytics = expressAnalytics(process.env.PRIVATE_API_ANALYTICS_KEY, apiAnalyticsConfig);

const customMiddleware = (req, res, next) => {
if (req.path.startsWith("/api/")) {
return apiAnalytics(req, res, next);
}
next();
if (!req.path.startsWith("/api/")) return next();
if (req.path.endsWith("__data.json")) return next();
const referer = req.get("Referer");
if (referer && referer.includes(process.env.PRIVATE_API_HOSTNAME)) return next();

return apiAnalytics(req, res, next);
};

app.use(customMiddleware);
Expand Down
19 changes: 18 additions & 1 deletion src/psaggregator/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@

export let data: LayoutData;

let scrollableContent: HTMLElement;
let atTop = false;

afterNavigate(() => {
if (browser) {
disableScrollHandling();
Expand All @@ -37,11 +40,25 @@
}
});

function scrollToTop(event: TouchEvent) {
const touchY = event.touches[0].clientY;
if (touchY < 10 && !atTop) {
scrollableContent.scrollTo({ top: 0, behavior: "smooth" });
}
}

onMount(() => {
if (browser) {
SHOW_ABSOLUTE_DATES.set(localStorage.getItem(SHOW_ABSOLUTE_DATES_KEY) === "true");
VIDEO_COMPLEXE_VIEW.set(localStorage.getItem(VIDEO_COMPLEXE_VIEW_KEY) === "true");
LINK_YOUTUBE.set(localStorage.getItem(LINK_YOUTUBE_KEY) === "true");

scrollableContent &&
scrollableContent.addEventListener("scroll", () => {
atTop = scrollableContent.scrollTop === 0;
});

window && window.addEventListener("touchstart", scrollToTop, { passive: true });
}
});
</script>
Expand Down Expand Up @@ -70,7 +87,7 @@
</div>
{/each}
<div class="flex h-full w-full flex-auto overflow-hidden">
<div class="flex flex-1 flex-col overflow-x-hidden" style="scrollbar-gutter: auto;" id="page">
<div class="flex flex-1 flex-col overflow-x-hidden" style="scrollbar-gutter: auto;" id="page" bind:this={scrollableContent}>
<slot />
</div>
</div>
Expand Down
17 changes: 15 additions & 2 deletions src/psaggregator/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
import InstagramPost from "$lib/components/InstagramPost.svelte";
import TwitchEntry from "$lib/components/TwitchEntry.svelte";
import { version } from "$app/environment";
import { Notification } from "carbon-icons-svelte";
import * as Alert from "$lib/components/ui/alert/index.js";
import TwitterPost from "$lib/components/TwitterPost.svelte";
import { GITHUB_URL, MAIL_TO_URL } from "../config/config";

export let data: PageServerData;
</script>
Expand Down Expand Up @@ -143,4 +142,18 @@
</div>
</div>
</div>
{#if !matches}
<div class="md-px:8 flex w-full items-center justify-between px-4 pb-2">
<a href={MAIL_TO_URL} target="_blank">
<span>Kontakt</span>
</a>
<a href={GITHUB_URL} target="_blank">
<span>GitHub</span>
</a>
<span>v{version}</span>
</div>
<div class="w-full pb-4 text-center">
<span> Dies ist ein privates Projekt und steht in keiner Verbindung zur PietSmiet UG & Co. KG. </span>
</div>
{/if}
</MediaQuery>
18 changes: 18 additions & 0 deletions src/psaggregator/src/routes/changelog/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,24 @@
</style>

<div class="flex-col p-4">
<h2 class="mb-2 text-2xl font-bold">Version 1.16.0</h2>
<div class="changelog-contents w-full grow overflow-y-auto lg:w-1/2">
<h3 class="mb-2 text-xl font-bold">Neue Features</h3>
<div>
<span>Nach oben scrollen</span>
<span>Wenn auf mobilen Endgeräten nun auf den oberen Bildschirmrand getippt wird, wird die Seite nach oben gescrollt.</span>
</div>
</div>
<h3 class="mb-2 text-xl font-bold">Überarbeitungen</h3>
<div>
<span>Einheitlichere Überschriften</span>
<span>Die Überschriften wurden einheitlicher gestaltet.</span>
</div>
<div>
<span>Mehr Footer-Informationen</span>
<span>Auf mobilen Endgeräten wird nun mehr Information im Footer angezeigt.</span>
</div>

<h2 class="mb-2 text-2xl font-bold">Version 1.15.0</h2>
<div class="changelog-contents w-full grow overflow-y-auto lg:w-1/2">
<h3 class="mb-2 text-xl font-bold">Neue Features</h3>
Expand Down
2 changes: 0 additions & 2 deletions src/psaggregator/src/routes/news/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import NewsSmall from "$lib/components/NewsSmall.svelte";
import MediaQuery from "$lib/utils/MediaQuery.svelte";
import InstagramStoriesContainer from "$lib/components/InstagramStoriesContainer.svelte";
import { Notification } from "carbon-icons-svelte";
import * as Alert from "$lib/components/ui/alert/index.js";

export let data: PageData;
</script>
Expand Down
4 changes: 2 additions & 2 deletions src/psaggregator/src/routes/plan/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@

<MediaQuery query="(min-width: 768px)" let:matches>
<div class="p-4 md:p-8">
<div class="mb-4 md:mb-8">
<div class="mb-4">
{#if matches}
<div class="flex items-center gap-x-4">
<button type="button" class="btn btn-icon variant-filled" on:click={carouselLeft}>
<ArrowLeft />
</button>
<h1 class="text-3xl font-bold">Uploadplan - {moment(currentDate.toDate("utc")).format("DD MMMM YYYY")}</h1>
<h1 class="text-2xl font-bold md:text-4xl">Uploadplan - {moment(currentDate.toDate("utc")).format("DD MMMM YYYY")}</h1>
<DatePicker
bind:value={currentDate}
on:change={() => {
Expand Down
2 changes: 1 addition & 1 deletion src/psaggregator/src/routes/randomvideo/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<Button
on:click={() => {
invalidate("data:randomvideo");
}}>Nächstes Video</Button>
}}>Nächstes zufällige Video</Button>
<Button
variant="secondary"
on:click={() => {
Expand Down
6 changes: 4 additions & 2 deletions src/psaggregator/src/routes/settings/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
</script>

<div class="p-4 md:p-8">
<div class="mb-4 md:mb-8">
<h1 class="text-3xl font-bold">Einstellungen</h1>
<div class="mb-4">
<h1 class="text-2xl font-bold md:text-4xl">Einstellungen</h1>
</div>
<div class="mb-4">
<span>Einstellungen werden lokal auf deinem Endgerät gespeichert und sind nur für dich sichtbar.</span>
</div>
<div class="flex flex-col gap-y-2">
Expand Down
4 changes: 2 additions & 2 deletions src/psaggregator/src/routes/videos/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@

<MediaQuery query="(min-width: 768px)" let:matches>
<div class="p-4 md:p-8">
<div class="mb-4 flex w-full flex-col justify-between gap-y-4 md:mb-8 md:flex-row md:items-center">
<div class="mb-4 flex w-full flex-col justify-between gap-y-4 md:flex-row md:items-center">
<div class="flex items-center gap-4">
<h1 class="text-3xl font-bold">Alle Videos</h1>
<h1 class="text-2xl font-bold md:text-4xl">Alle Videos</h1>
{#if potentialNewVideos.length > 0}
<div>
<Button variant="default" on:click={loadNewVideos}>
Expand Down
Loading