From 47888de5f26cacf414e71ffd041b8fce39c32ab9 Mon Sep 17 00:00:00 2001
From: Jacob Paris
Date: Sun, 22 Sep 2024 17:38:53 +0800
Subject: [PATCH 1/2] Update from upstream
---
.github/workflows/deploy.yml | 6 --
.../assets}/favicons/apple-touch-icon.png | Bin
{public => app/assets}/favicons/favicon.svg | 0
app/components/error-boundary.tsx | 2 +-
app/components/forms.tsx | 8 +--
app/components/search-bar.tsx | 2 +-
app/components/ui/input-otp.tsx | 2 +-
app/components/ui/input.tsx | 2 +-
app/components/ui/textarea.tsx | 2 +-
app/entry.server.tsx | 14 ++--
app/root.tsx | 13 ++--
app/routes/_seo+/sitemap[.]xml.ts | 4 +-
app/routes/resources+/healthcheck.tsx | 2 +-
app/routes/resources+/theme-switch.tsx | 25 ++++---
app/utils/cache.server.ts | 16 ++---
app/utils/misc.tsx | 20 +++---
app/utils/misc.use-double-check.test.tsx | 3 +-
app/utils/timing.server.ts | 4 +-
app/utils/user.ts | 6 +-
fly.toml | 6 +-
index.js | 2 +-
...{.dockerignore => Dockerfile.dockerignore} | 0
other/build-icons.ts | 10 +--
other/build-server.ts | 4 +-
package.json | 8 ++-
playwright.config.ts | 2 +-
prisma/seed.ts | 4 +-
public/favicons/README.md | 7 +-
public/favicons/favicon-16x16.png | Bin 669 -> 0 bytes
public/favicons/favicon-32x32.png | Bin 1435 -> 0 bytes
public/favicons/mask-icon.svg | 1 -
server/index.ts | 38 ++++++----
tests/playwright-utils.ts | 18 +++--
tests/setup/custom-matchers.ts | 16 ++---
tests/setup/setup-test-env.ts | 3 -
vite.config.ts | 66 ++++++++++++------
vitest.config.ts | 19 -----
37 files changed, 174 insertions(+), 161 deletions(-)
rename {public => app/assets}/favicons/apple-touch-icon.png (100%)
rename {public => app/assets}/favicons/favicon.svg (100%)
rename other/{.dockerignore => Dockerfile.dockerignore} (100%)
delete mode 100644 public/favicons/favicon-16x16.png
delete mode 100644 public/favicons/favicon-32x32.png
delete mode 100644 public/favicons/mask-icon.svg
delete mode 100644 vitest.config.ts
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index dd0cf06..bb32785 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -156,12 +156,6 @@ jobs:
file: 'fly.toml'
field: 'app'
- # move Dockerfile to root
- - name: 🚚 Move Dockerfile
- run: |
- mv ./other/Dockerfile ./Dockerfile
- mv ./other/.dockerignore ./.dockerignore
-
- name: 🎈 Setup Fly
uses: superfly/flyctl-actions/setup-flyctl@1.5
diff --git a/public/favicons/apple-touch-icon.png b/app/assets/favicons/apple-touch-icon.png
similarity index 100%
rename from public/favicons/apple-touch-icon.png
rename to app/assets/favicons/apple-touch-icon.png
diff --git a/public/favicons/favicon.svg b/app/assets/favicons/favicon.svg
similarity index 100%
rename from public/favicons/favicon.svg
rename to app/assets/favicons/favicon.svg
diff --git a/app/components/error-boundary.tsx b/app/components/error-boundary.tsx
index 715b8c8..573b412 100644
--- a/app/components/error-boundary.tsx
+++ b/app/components/error-boundary.tsx
@@ -19,7 +19,7 @@ export function GeneralErrorBoundary({
),
statusHandlers,
- unexpectedErrorHandler = error => {getErrorMessage(error)}
,
+ unexpectedErrorHandler = (error) => {getErrorMessage(error)}
,
}: {
defaultStatusHandler?: StatusHandler
statusHandlers?: Record
diff --git a/app/components/forms.tsx b/app/components/forms.tsx
index 7e6651a..326fd2b 100644
--- a/app/components/forms.tsx
+++ b/app/components/forms.tsx
@@ -29,7 +29,7 @@ export function ErrorList({
if (!errorsToRender?.length) return null
return (
- {errorsToRender.map(e => (
+ {errorsToRender.map((e) => (
-
{e}
@@ -214,15 +214,15 @@ export function CheckboxField({
aria-invalid={errorId ? true : undefined}
aria-describedby={errorId}
checked={input.value === checkedValue}
- onCheckedChange={state => {
+ onCheckedChange={(state) => {
input.change(state.valueOf() ? checkedValue : '')
buttonProps.onCheckedChange?.(state)
}}
- onFocus={event => {
+ onFocus={(event) => {
input.focus()
buttonProps.onFocus?.(event)
}}
- onBlur={event => {
+ onBlur={(event) => {
input.blur()
buttonProps.onBlur?.(event)
}}
diff --git a/app/components/search-bar.tsx b/app/components/search-bar.tsx
index 816950e..30c77d3 100644
--- a/app/components/search-bar.tsx
+++ b/app/components/search-bar.tsx
@@ -32,7 +32,7 @@ export function SearchBar({
method="GET"
action="/users"
className="flex flex-wrap items-center justify-center gap-2"
- onChange={e => autoSubmit && handleFormChange(e.currentTarget)}
+ onChange={(e) => autoSubmit && handleFormChange(e.currentTarget)}
>