Release 202506101742

This commit is contained in:
pluja
2025-06-10 17:42:42 +00:00
parent 459d7c91f7
commit 812937d2c7
50 changed files with 1347 additions and 335 deletions

View File

@@ -4,6 +4,7 @@ import { Icon } from 'astro-icon/components'
import { actions } from 'astro:actions'
import Button from '../components/Button.astro'
import CopyButton from '../components/CopyButton.astro'
import PushNotificationBanner from '../components/PushNotificationBanner.astro'
import TimeFormatted from '../components/TimeFormatted.astro'
import Tooltip from '../components/Tooltip.astro'
@@ -84,6 +85,7 @@ const [dbNotifications, notificationPreferences, totalNotifications, pushSubscri
aboutServiceSuggestion: {
select: {
status: true,
type: true,
service: {
select: {
name: true,
@@ -256,7 +258,7 @@ const notifications = dbNotifications.map((notification) => ({
label="Reload"
icon="ri:refresh-line"
color="white"
class="ml-auto"
class="no-js:hidden ml-auto"
onclick="window.location.reload()"
/>
</div>
@@ -404,11 +406,73 @@ const notifications = dbNotifications.map((notification) => ({
<Button type="submit" label="Save" icon="ri:save-line" color="success" />
</div>
</form>
<div
class="relative isolate mt-3 overflow-hidden rounded-lg border border-zinc-800 bg-zinc-900 p-6 shadow-sm"
>
<div aria-hidden="true" class="pointer-events-none absolute inset-0 -z-10 overflow-hidden">
<div
class="absolute top-0 -left-16 h-full w-1/3 bg-gradient-to-r from-zinc-500/20 to-transparent opacity-50 blur-xl"
>
</div>
<div
class="absolute top-0 -right-16 h-full w-1/3 bg-gradient-to-l from-zinc-500/20 to-transparent opacity-50 blur-xl"
>
</div>
</div>
<div class="mb-4 flex items-center gap-3">
<div class="rounded-md bg-zinc-800 p-2">
<Icon name="ri:rss-line" class="size-6 text-zinc-300" />
</div>
<h3 class="font-title text-xl font-bold text-zinc-200">RSS feeds available</h3>
</div>
<div class="space-y-4">
<div>
<p class="mb-1 text-sm text-zinc-400">
Subscribe to receive your notifications in your favorite RSS reader.
</p>
<div class="flex items-center gap-2">
<input
type="text"
readonly
value={`${Astro.url.origin}/feeds/user/${user.feedId}/notifications.xml`}
class="flex-1 rounded border border-zinc-700 bg-zinc-800 px-3 py-2 text-sm text-zinc-200 select-all"
/>
<CopyButton
copyText={`${Astro.url.origin}/feeds/user/${user.feedId}/notifications.xml`}
color="white"
/>
</div>
</div>
<a
href="/feeds"
class="flex items-center justify-between rounded-lg border border-zinc-700/50 bg-zinc-800/30 p-3"
>
<div>
<h4 class="text-sm font-semibold text-zinc-300">Public RSS feeds</h4>
<p class="text-xs text-zinc-500">
Don't require an account to subscribe. Includes service comments and events.
</p>
</div>
<Button
as="span"
label="Browse all"
icon="ri:arrow-right-line"
variant="faded"
color="white"
class="pointer-events-none"
/>
</a>
</div>
</div>
</section>
</BaseLayout>
<script>
document.addEventListener('sse-new-notification', () => {
document.addEventListener('sse:new-notification', () => {
document.querySelectorAll<HTMLElement>('[data-new-notification-banner]').forEach((banner) => {
banner.style.display = ''
})