Tweak boot, stop saving alert events

This commit is contained in:
Jon Staab
2025-04-23 11:05:28 -07:00
parent c8bc8ee8bf
commit 3a954201ce
4 changed files with 22 additions and 32 deletions
+3 -6
View File
@@ -1,6 +1,6 @@
<script lang="ts">
import {preventDefault} from "@lib/html"
import {randomInt} from "@welshman/lib"
import {randomInt, TIMEZONE} from "@welshman/lib"
import {displayRelayUrl, THREAD, MESSAGE, EVENT_TIME, COMMENT} from "@welshman/util"
import type {Filter} from "@welshman/util"
import type {Nip46ResponseWithResult} from "@welshman/signer"
@@ -18,11 +18,8 @@
import {publishAlert} from "@app/commands"
import {pushToast} from "@app/toast"
import {pushModal} from "@app/modal"
const timezone = new Date()
.toString()
.match(/GMT[^\s]+/)![0]
.slice(3)
const timezoneOffset = parseInt(timezone) / 100
const timezoneOffset = parseInt(TIMEZONE.slice(3)) / 100
const minute = randomInt(0, 59)
const hour = (17 - timezoneOffset) % 24
const WEEKLY = `0 ${minute} ${hour} * * 1`
+11 -9
View File
@@ -45,15 +45,17 @@
</script>
<div class="flex items-start justify-between gap-4">
<Button class="py-1" onclick={startDelete}>
<Icon icon="trash-bin-2" />
</Button>
<div class="flex-inline gap-1">
{cron?.endsWith("1") ? "Weekly" : "Daily"} alert for
{displayList(types)} on
<Link class="link" href={makeSpacePath(relay)}>
{displayRelayUrl(relay)}
</Link>, sent via {channel}.
<div class="flex items-start gap-4">
<Button class="py-1" onclick={startDelete}>
<Icon icon="trash-bin-2" />
</Button>
<div class="flex-inline gap-1">
{cron?.endsWith("1") ? "Weekly" : "Daily"} alert for
{displayList(types)} on
<Link class="link" href={makeSpacePath(relay)}>
{displayRelayUrl(relay)}
</Link>, sent via {channel}.
</div>
</div>
{#if status}
{@const statusText = getTagValue("status", status.tags) || "error"}