Compare commits

..

2 Commits

Author SHA1 Message Date
d0aec5c501 cmd/horsebot: compress served files 2026-04-02 10:45:30 -04:00
ccef87f0a3 zenno: resolve lint errors 2026-04-02 10:45:30 -04:00
7 changed files with 27 additions and 18 deletions

View File

@@ -23,6 +23,7 @@ import (
"github.com/disgoorg/disgo/handler/middleware"
"github.com/disgoorg/disgo/httpserver"
"github.com/disgoorg/disgo/rest"
httpmiddle "github.com/go-chi/chi/v5/middleware"
"git.sunturtle.xyz/zephyr/horse/horse"
)
@@ -111,7 +112,7 @@ func main() {
}
mux := http.NewServeMux()
mux.Handle("GET /", http.FileServerFS(os.DirFS(public)))
mux.Handle("GET /", httpmiddle.Compress(5)(http.FileServerFS(os.DirFS(public))))
if pubkey != "" {
pk, err := hex.DecodeString(pubkey)
if err != nil {

1
go.mod
View File

@@ -4,6 +4,7 @@ go 1.25.5
require (
github.com/disgoorg/disgo v0.19.0-rc.15
github.com/go-chi/chi/v5 v5.2.5
github.com/junegunn/fzf v0.67.0
golang.org/x/sync v0.20.0
zombiezen.com/go/sqlite v1.4.2

2
go.sum
View File

@@ -10,6 +10,8 @@ github.com/disgoorg/snowflake/v2 v2.0.3 h1:3B+PpFjr7j4ad7oeJu4RlQ+nYOTadsKapJIzg
github.com/disgoorg/snowflake/v2 v2.0.3/go.mod h1:W6r7NUA7DwfZLwr00km6G4UnZ0zcoLBRufhkFWgAc4c=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/go-chi/chi/v5 v5.2.5 h1:Eg4myHZBjyvJmAFjFvWgrqDTXFyOzjj7YIm3L3mu6Ug=
github.com/go-chi/chi/v5 v5.2.5/go.mod h1:X7Gx4mteadT3eDOMTsXzmI4/rwUpOwBHLpAfupzFJP0=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=

View File

@@ -32,7 +32,7 @@
{#if !required}
<option value="0" class={optionClass}></option>
{/if}
{#each character[region] as c}
{#each character[region] as c (c.chara_id)}
<option value={c.chara_id} class={optionClass}>{c.name}</option>
{/each}
</select>

View File

@@ -1,6 +1,7 @@
<script lang="ts">
import './layout.css';
import favicon from '$lib/assets/favicon.png';
import { resolve } from '$app/paths';
let { children } = $props();
</script>
@@ -13,14 +14,14 @@
<div class="flex h-screen flex-col">
<nav class="mb-4 flex min-w-full bg-mist-300 p-4 shadow-md dark:bg-mist-900">
<span class="hidden flex-1 md:inline">
<a href="/" class="text-4xl">Zenno Rob Roy</a>
<a href={resolve('/')} class="text-4xl">Zenno Rob Roy</a>
</span>
<span class="flex-1 text-center">
<a href="/" class="mx-8 my-1 block font-semibold md:hidden">Zenno Rob Roy</a>
<a href="/inherit" class="mx-8 my-1 inline-block">Inheritance Chance</a>
<a href="/spark" class="mx-8 my-1 inline-block">Spark Chance</a>
<a href="/vet" class="mx-8 my-1 inline-block">My Veterans</a>
<a href="/convo" class="mx-8 my-1 inline-block">Lobby Conversations</a>
<a href={resolve('/')} class="mx-8 my-1 block font-semibold md:hidden">Zenno Rob Roy</a>
<a href={resolve('/inherit')} class="mx-8 my-1 inline-block">Inheritance Chance</a>
<a href={resolve('/spark')} class="mx-8 my-1 inline-block">Spark Chance</a>
<a href={resolve('/vet')} class="mx-8 my-1 inline-block">My Veterans</a>
<a href={resolve('/convo')} class="mx-8 my-1 inline-block">Lobby Conversations</a>
</span>
</nav>
<div class="mx-4 grow lg:m-auto lg:max-w-7xl lg:min-w-7xl">

View File

@@ -1,27 +1,31 @@
<script lang="ts">
import { resolve } from '$app/paths';
</script>
<h1 class="m-8 text-center text-7xl">Zenno Rob Roy</h1>
<p>She's read all about Umamusume, and she's always happy to share her knowledge and give recommendations!</p>
<h2 class="mt-8 mb-4 text-4xl">Tools</h2>
<ul class="list-disc pl-4">
<li>
<a href="/inherit">Inheritance Chance</a><i>Not yet implemented</i> — Given a legacy, calculate the probability distribution
<a href={resolve('/inherit')}>Inheritance Chance</a><i>Not yet implemented</i> — Given a legacy, calculate the probability distribution
of activation counts for each spark.
</li>
<li>
<a href="/spark">Spark Chance</a><i>Not yet implemented</i> — Given a legacy, calculate the chance of generating each spark if
you fulfill the conditions to do so, and the distribution of total spark counts.
<a href={resolve('/spark')}>Spark Chance</a><i>Not yet implemented</i> — Given a legacy, calculate the chance of generating each
spark if you fulfill the conditions to do so, and the distribution of total spark counts.
</li>
<li>
<a href="/vet">My Veterans</a><i>Not yet implemented</i> — Set up and track your veterans for Zenno Rob Roy's inspiration and
spark calculators.
<a href={resolve('/vet')}>My Veterans</a><i>Not yet implemented</i> — Set up and track your veterans for Zenno Rob Roy's inspiration
and spark calculators.
</li>
<li>
<a href="/convo">Lobby Conversations</a> — Check participants in lobby conversations and get recommendations on unlocking them quickly.
<a href={resolve('/convo')}>Lobby Conversations</a> — Check participants in lobby conversations and get recommendations on unlocking
them quickly.
</li>
<li>
<a href="https://discord.com/oauth2/authorize?client_id=1461931240264568994" target="_blank" rel="noopener noreferrer"
>Discord Bot</a
>
— Skill search by name or unique owner within Discord. Install to a server or user.
> — Skill search by name or unique owner within Discord. Install to a server or user.
</li>
</ul>
<h2 class="mt-8 mb-4 text-4xl">About</h2>

View File

@@ -30,7 +30,7 @@
<div class="m-4 flex-1 md:mt-3">
<label for="convo" class="hidden md:inline">Conversation</label>
<select id="convo" bind:value={convo} class="w-full">
{#each options as opt}
{#each options as opt (opt.number)}
<option value={opt.number}>Slice of Life {opt.number}</option>
{/each}
</select>
@@ -57,7 +57,7 @@
<span>Other characters who appear here most often:</span>
</div>
<div class="mt-4 grid text-center shadow-sm transition-shadow ease-in hover:shadow-md hover:ease-out md:grid-cols-4">
{#each suggested as s}
{#each suggested as s (s.chara_id)}
<span>{charaNames.get(s.chara_id)?.en}: {s.count}&#xd7;</span>
{/each}
</div>